feat(inbox): add 'linear inbox' — Linear notifications from the CLI#25
Conversation
New command surfaces your Linear inbox (comments, mentions, assignments, status changes) via the GraphQL notifications query — no browser needed. Unread-only by default; --all includes read, --limit bounds the fetch, --json for raw output. Bumps 0.11.1 -> 0.12.0; adds InboxTypeLabelTest.
Code ReviewerVerdict: Changes requested (small, targeted fixes — not a blocker on the core feature) Build: N/A — single-file stdlib Python CLI, no build step. Read Changes that work well
Issues that need attention1. Row formatting breaks on any notification type not in label = _INBOX_TYPE_LABEL.get(n.get("type"), n.get("type") or "note")
...
print(f" {dot} {iss.get('identifier','-'):11s}{label:11s}{who:14.14s}{title}")
Notice the last row: no space between the raw type and the identifier padding, and the actor/title columns are pushed out of alignment. The PR's own new test, 2. limit = getattr(args, "limit", None) or 30argparse already sets Things to verify manually
Reviewed by Code Reviewer — actually ran the build and tests on this branch. |
…t, add cmd_inbox test
1. label column now uses {:11.11s} so an unmapped notification type is truncated
instead of overflowing and misaligning every following row.
2. --limit no longer silently coerces 0 to 30; explicit <1 gets a clear error.
3. Add cmd_inbox stdout test (monkeypatched gql) asserting a mapped + unmapped
type stay column-aligned — catches the alignment bug directly.
Code ReviewerVerdict: Ready to merge Build: N/A — single-file stdlib-only Python CLI, no build step ( Repo has no Changes that work well
Things to verify manually
Reviewed by Code Reviewer — actually ran the build and tests on this branch. |
What
Adds a
linear inboxcommand that shows your Linear inbox — notifications: comments, mentions, assignments, and status changes on issues you follow — directly from the CLI, no browser needed.Backed by the Linear GraphQL
notificationsquery. Output shows an unread marker, ticket id, a friendly type label (comment/mention/assigned/status), the actor, the title, and a comment snippet.Why
Progress notes and mentions land in the Linear inbox, but there was no CLI surface for them — you had to open the web app (or drive a browser profile). This closes that gap for agents and humans working from the terminal.
Verified
python3 test_linear.py— 22/22 pass (addedInboxTypeLabelTest).linear inboxreturned 24 unread notifications formatted correctly;--jsonreturns structured data;inboxappears in--help.Version 0.11.1 -> 0.12.0; CHANGELOG updated.