Skip to content

feat(notifications): step through the feed with the Up and Down keys - #16243

Merged
bolichen97 merged 1 commit into
kirodotdev:mainfrom
unstablebrainiac:feat/inbox-arrow-key-navigation
Oct 4, 2026
Merged

bolichen97 merged 1 commit into
kirodotdev:mainfrom
unstablebrainiac:feat/inbox-arrow-key-navigation

Conversation

@unstablebrainiac

@unstablebrainiac unstablebrainiac commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Let a user read through their notifications with the Up and Down keys.

In the inbox page's Activity feed and in the bell's notification sheet, moving from one notification to the next takes a click on each row, or Tab through every control of every row. Up and Down do not move between notifications.

Why it matters

Reading a batch of notifications (a night's cron results, a run's subagent reports) is a one-after-another task. By mouse it means aiming at each row in turn. By keyboard it costs at least two Tab stops per row.

Not a goal

  • No shortcut that opens the inbox or the bell sheet. The keys act once focus is on a row.
  • No Home, End, Page Up or Page Down, and no change to Enter, Space, Escape or Tab.
  • No change to what selecting a row does. It opens the note and marks it read, exactly as a click does.

What changed (motivation → approach → change)

Key Result
Down / Up on a focused row the next / previous row opens in the detail view, and focus moves to it
Down on the last row, Up on the first left to the browser
Down / Up on a control inside a row (Approve, Dismiss, a code block) left to that control
Alt, Ctrl, Cmd or Shift with an arrow left to the browser and the app's own chords

Both surfaces render the same feed component, notifications/NotificationFeed.tsx, so one onKeyDown on its list covers the inbox page and the bell sheet. It opens the neighbouring row through the same onSelect a click calls, so both hosts mark it read as they do for a click. Focus moves with the selection, so the next press steps on from the new row and the browser scrolls it into view.

The step follows the rows as drawn: a collapsed stack is one stop, its newest note. The list div is not itself a control, so its jsx-a11y/no-static-element-interactions warning is suppressed on that one line with the reason, as the lint step in ci.yml asks.

Backwards compatibility

Compatible: the feed had no Up or Down handler, and every other key, click and prop behaves as before.

Removes nothing: the diff adds one key handler, its test and the evidence frames.

Tests

website/src/test/NotificationFeed.arrowKeys.test.tsx:

  • Down and Up open the neighbouring row and move focus to it, in the panel variant (inbox page) and the mac variant (bell sheet).
  • At either end, and with Alt, Ctrl, Meta or Shift held, the key is left unclaimed and nothing is selected.
  • A collapsed stack is one stop.
  • From a control inside a row (Approve, Dismiss), the key is left to that control: nothing is selected and focus stays.

Seven mutations of the handler each turn at least one of these red: dropping the modifier guard, the inner-control guard, the preventDefault or the focus move, stepping through every note instead of the rows as drawn, wrapping at the ends, and stepping from the selection instead of the focused row.

Manual verification

Scripted Playwright in Chromium, against a Vite dev server that mounts the real NotificationsPage and the real bell sheet over seeded notifications. On both surfaces, a click on a row and then Down moved the selection, the detail view and focus to the next row. In a window short enough for the list to scroll, stepping to the last row brought it into view, and stepping back up returned the list to the top. No console errors.

Screenshots / video

Inbox page, Activity feed: after a click on "Nightly digest ready", then after Down. The next row is open and holds focus.

Inbox page after a click on Nightly digest ready

Inbox page after Down: Subagent finished is open and focused

Bell sheet: after a click on "Task run completed", then after Down.

Bell sheet after a click on Task run completed

Bell sheet after Down: Nightly digest ready is open and focused

Related Issues

no linked issue: no open issue asks for this; it comes from reading the inbox day to day.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable): not applicable, no doc lists the feed's keys
  • No secrets, credentials, or internal references in the diff

@unstablebrainiac
unstablebrainiac requested a review from a team October 2, 2026 20:12
@unstablebrainiac
unstablebrainiac requested a review from a team as a code owner October 2, 2026 20:12
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed c21c09830957fb9b55f9790fabb2d2bc87c9692d via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c21c098

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of c21c09830957fb9b55f9790fabb2d2bc87c9692d via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check that the four committed screenshots under temp-screenshots/inbox-arrow-keys/ are removed or kept on purpose before merge.

[DESIGN-REVIEWED] c21c098

Description read

[DESCRIPTION-READ] 359caadfc45f881d22f16f245af7ddf2e7bed14cdd51ac1980a06b35bed63fc3

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — 🟡 CONCERNS

UX-level review of c21c09830957fb9b55f9790fabb2d2bc87c9692d via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

No first-time reader has tried the Up/Down stepping. The four stills show it working on both surfaces, but this fork lane has no blind read, which caps the verdict at CONCERNS.

Watch

  • Arrowing past a row marks it read. The handler calls onSelect(next.n) on every press, so holding Down to reach an older note marks each note it passes as read. The unread count in screenshots 1→2 drops from 3 to 2 after one press. This is the stated intent (it matches a click), and "Mark unread" undoes it one note at a time. But a user who steps through quickly to triage can lose their unread markers in bulk. Frequency is moderate, and the impact is lost triage state that has to be restored by hand.

[UX-REVIEWED] c21c098

Description read

[DESCRIPTION-READ] ee7c158bed3907f5fb4da489ac3874ba0fbf9e8ebf196a96827f9ecdc6fe53c4

That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of c21c09830957fb9b55f9790fabb2d2bc87c9692d via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Each Down press calls onSelect, so every note you step past is marked read. The sidebar rove in pages/chat/sessionRowNav.ts deliberately moves focus only. Confirm that difference is intended.

What this change ships

Inventory (4 items) — 4 justified

Intent: let a user read through notifications one after another with Up/Down instead of clicking or tabbing through every row. This is an ADDITION.

  1. Down/Up on a focused row opens the next or previous row in the detail view, in both the inbox Activity feed and the bell sheet — justified
  2. Each step marks the opened note read, the same as a click — justified
  3. Focus moves to the newly opened row, so the list scrolls it into view — justified
  4. Four review screenshots committed under temp-screenshots/inbox-arrow-keys/ — justified

[FIRST-PRINCIPLES-REVIEWED] c21c098

Description read

[DESCRIPTION-READ] 6073b9286c4a08ae79f7801a8863498a6a854736a51fad15691852a01a37c0fa

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author
  • span=3788a99c3cb9: each step opens and marks read the row it lands on (rebutted)

Select-on-navigate is the intended trade. The requester asked to read through notifications with Up and Down, as the Goal line says; a focus-only step needs an Enter per note, which Tab already gives.
A step opens the row through the same onSelect a click calls, so it marks read exactly what clicking that row would.
The Mark unread control in the detail view reverses it. The chat sidebar steps focus only because opening a session loads it; opening a note is cheap.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author
  • span=d36253e8f503: no blind read of the committed frames (rebutted)

The lane names this as its own limitation, not an author gap: the blind read needs the branch pushed to this repository, which a fork contributor cannot do.
The four frames show each surface before and after one Down press; the selection, the detail view and the focus ring all move to the next row.

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed c21c09830957fb9b55f9790fabb2d2bc87c9692d via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] c21c098

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author
  • span=d274b87e68ef: each arrow step opens and acks the row it lands on (rebutted)

Select-on-navigate is the intended trade: the Goal is reading through notifications with Up and Down, and a focus-only step needs an Enter per note, which Tab already gives.
A step opens the row through the same onSelect a click calls, so it acks exactly what clicking that row would; Mark unread in the detail view reverses it.
On a collapsed stack in the bell sheet the step opens the stack's newest note, as a click on that row does on the inbox page; Enter on the head still expands the stack.
The chat sidebar steps focus only because opening a session loads it; opening a note is cheap.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 2, 2026
@unstablebrainiac
unstablebrainiac force-pushed the feat/inbox-arrow-key-navigation branch from 5f50df8 to ba18bef Compare October 2, 2026 23:56
@unstablebrainiac

unstablebrainiac commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Fixed in ba18bef.

Up/Down now act only when the event target is the row's own open control (its [role="button"]), not any element inside the row. From Approve, Dismiss or a command code box the keys keep their normal behaviour. A regression test covers it.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Oct 3, 2026
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author
  • Up/Down is not listed in the shortcuts help modal (deferred)

Valid and non-blocking. Listing the keys in the shortcuts modal is a separate surface change and is deferred to a follow-up PR to keep this one minimal.

@iamwhatever

Copy link
Copy Markdown
Contributor

Read-only review: the guard covers inner controls, modifiers and both list ends, and the tests are solid. Holding for a maintainer to accept select-on-step: stepping acks each note it lands on, unlike the sidebar's focus-only navigation. Also worth a look: in the bell sheet, clicking a collapsed stack's head expands it but Down opens it, and the disposition misdescribes the guard.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

@iamwhatever Corrected the Opus disposition above: the guard compares the event target with the row's own [role="button"], not with currentTarget (the list).
On a collapsed stack in the bell sheet, Down opens the stack's newest note, the same note a click on that row opens on the inbox page, while a click or Enter on the head still expands it. Aligning the two is left to a follow-up so this PR stays at the reviewed head.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 3, 2026
Up and Down on a row's open control now select the row above or below
it and move focus with the selection, so holding the key reads down the
feed while the detail panel follows. The feed is shared, so this covers
both the inbox page's Activity feed and the bell's notification sheet.

Rows are stepped in the order rendered: a collapsed stack is one stop.
Keys from a control inside a row (Approve, Dismiss, a code block),
modified arrows and the two ends of the list are left to the browser.
@unstablebrainiac
unstablebrainiac force-pushed the feat/inbox-arrow-key-navigation branch from ba18bef to c21c098 Compare October 3, 2026 07:49
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Rebased: ba18bef -> c21c098 onto main (patch-id unchanged). #16238 renamed the required review lanes to Opus 5.5 / GPT 6.1, which only start on a push, so PR Readiness could not re-pass on the old head.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 3, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 3, 2026
@bolichen97
bolichen97 merged commit 0a3181e into kirodotdev:main Oct 4, 2026
100 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants