What
A new TRMNL screen that displays a summary of GitHub pull requests assigned to the user (bars0udin). The screen will show the total count of assigned open PRs and a list containing each PR's title and a "time ago" string (e.g., "3 hours ago").
Implementation details:
- A new Phoenix controller
TrmnlWeb.GithubPrsController to handle the view request.
- A new template
lib/trmnl_web/templates/github_prs/show.html.heex optimized for the 800x480 monochrome TRMNL display.
- A data fetching mechanism using
System.cmd/3 to execute gh pr list --assignee=bars0udin --state=open --json number,title,url,createdAt.
- Integration into the existing playlist via
lib/trmnl/playlist.ex.
Why
The user requires a way to monitor their PR review queue on their TRMNL device. Using the gh CLI leverages the existing authentication on the system, significantly simplifying the implementation by avoiding manual token management or complex API client configuration.
Quality Attributes
- Maintainability: Follows existing Phoenix controller/template patterns and uses the
gh CLI for simplicity.
- Reliability: The implementation must gracefully handle empty PR lists or failures in the
gh command execution.
- Performance: Data fetching via CLI should be efficient enough to ensure the screen regenerates within the expected TRMNL interval.
Verification
Automated Tests
test "parses JSON output from gh CLI command"
test "calculates relative time strings accurately (e.g., 'X hours ago')"
test "handles empty PR list response gracefully"
Manual Verification
- Access the screen via the
/screens/:api_key route.
- Compare the displayed PR count and list with the output of
gh pr list --assignee=bars0udin --state=open.
- Verify that the "time ago" information is correctly displayed for each item.
- Confirm the layout is legible and fits the 800x480 monochrome constraints.
What
A new TRMNL screen that displays a summary of GitHub pull requests assigned to the user (
bars0udin). The screen will show the total count of assigned open PRs and a list containing each PR's title and a "time ago" string (e.g., "3 hours ago").Implementation details:
TrmnlWeb.GithubPrsControllerto handle the view request.lib/trmnl_web/templates/github_prs/show.html.heexoptimized for the 800x480 monochrome TRMNL display.System.cmd/3to executegh pr list --assignee=bars0udin --state=open --json number,title,url,createdAt.lib/trmnl/playlist.ex.Why
The user requires a way to monitor their PR review queue on their TRMNL device. Using the
ghCLI leverages the existing authentication on the system, significantly simplifying the implementation by avoiding manual token management or complex API client configuration.Quality Attributes
ghCLI for simplicity.ghcommand execution.Verification
Automated Tests
test "parses JSON output from gh CLI command"test "calculates relative time strings accurately (e.g., 'X hours ago')"test "handles empty PR list response gracefully"Manual Verification
/screens/:api_keyroute.gh pr list --assignee=bars0udin --state=open.