feat(cockpit): a dot on the favicon while the inbox holds work - #30
Merged
Conversation
The cockpit is a background tab most of the day, where the only part of it still on screen is the tab icon. The bell is the loud half of telling you a PR is waiting; this is the quiet half — the paw wears a red dot while the inbox has anything in it, and drops it when the last review is dealt with. Re-derived on every read of the queue, so whichever screen polled last leaves the tab honest, and off the same `walkable` list the ‹ › arrows walk and the bell announces — three ways of saying "there is work here" that would be worth nothing if they disagreed about which rows count. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a “work waiting” badge to the cockpit tab icon so users can tell (at a glance, from the tab strip) whether the inbox currently contains actionable items.
Changes:
- Introduces
hasInboxWork,faviconHref, andmarkFaviconto compute and apply a dotted favicon when the inbox has walkable work. - Updates
fetchReviewsto re-derive favicon state on every queue fetch so it stays in sync across screens. - Adds a new
favicon-dot.svgasset and documents the behavior inREADME.mdandCLAUDE.md.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web/src/favicon.ts | New favicon state logic (work detection + DOM update). |
| web/src/favicon.test.ts | Unit tests for hasInboxWork and faviconHref. |
| web/src/api.ts | Re-badges favicon during fetchReviews() so the tab stays accurate. |
| web/public/favicon-dot.svg | New dotted favicon asset (dark-mode aware). |
| README.md | Documents the favicon dot behavior for users. |
| CLAUDE.md | Updates architecture notes to include favicon badging behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…b/src The single quotes were only there to carry rel="icon" unescaped; the CSS value takes single quotes just as well, so the file can match its neighbours. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
🎉 This PR is included in version 0.22.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cockpit is a background tab most of the day, and the only part of it still
on screen is the tab icon. Until now that icon said nothing: whether two PRs
were waiting or none, the paw looked the same, so the only way to find out was
to switch to the tab and look.
The bell already covers the loud half of this — it interrupts when a PR lands.
This is the quiet half: while the inbox holds anything, the favicon wears a red
dot, and the dot goes away when the last review is dealt with. No permission to
grant, no switch to find; a glance at the tab strip answers "is there anything
for me?".
What it does
web/public/favicon-dot.svg— the badged twin of the paw: the same threetoes and pad, stood down slightly to make room for a dot in the top-right
rather than cut away under it (at 16px a chewed toe reads as a broken icon).
A masked gap keeps the dot a separate shape whatever colour the tab bar
behind it is, and the dark-mode fills follow favicon.svg's own convention.
web/src/favicon.ts—hasInboxWorkis the whole decision, and it isdeliberately the same
walkablelist the ‹ › arrows walk and the bellannounces. Three ways of saying "there is work here" that would be worth
nothing if they disagreed about which rows count.
web/src/api.ts—fetchReviewsre-badges the tab on every read. Threescreens poll that list on their own timers; doing it in the one function they
all go through is the only version of "the tab matches the last queue the
cockpit saw" that cannot go stale on whichever screen forgot.
The dot tracks the inbox only — not the open-requests tab. Those are PRs you
already settled here; GitHub still listing a request is a fact about GitHub,
not work the tab should nag you about.
Verification
pnpm typecheck && pnpm test— 390 passing, including new unit tests forhasInboxWork(empty queue, awaiting, ready, all-filed, one live row amongfiled ones) and
faviconHref.pnpm build— the new asset ships inweb/dist.legible at 16px.
favicon.svg;with a live row →
favicon-dot.svg; back to empty → plain again.