Skip to content

feat(attention): optional 'mark seen on click' for waiting notifications#60

Merged
Ron537 merged 1 commit into
mainfrom
fix/attention-bell-click-clears-waiting
May 12, 2026
Merged

feat(attention): optional 'mark seen on click' for waiting notifications#60
Ron537 merged 1 commit into
mainfrom
fix/attention-bell-click-clears-waiting

Conversation

@Ron537
Copy link
Copy Markdown
Owner

@Ron537 Ron537 commented May 12, 2026

Closes #59.

Problem

Clicking a row in the attention bell for a session in waitingForApproval / waitingForInput state correctly navigates to the tab, but the event stays in the bell and keeps counting toward the unread badge. Only finished events are cleared on click. Reporter argued for Slack/Gmail-style "click = mark seen" UX.

The current behavior is intentional (the dedicated X button on each row is the explicit dismiss path; a row click is "passive — let me look"), but the alternative is reasonable. So this PR makes both available as a user choice.

Changes

  • New setting attentionClickClearsWaiting (default false, preserves historical behavior).
  • Inline mode pill at the top of the bell dropdown header — shows the current mode and toggles it with one click. Uses theme --dplex-accent so it's readable on both light and dark themes.
  • Mirror toggle under Settings → Notifications → Mark seen on click.
  • Decision logic extracted into a pure helper (rowClickAction.ts) for testability.
  • New unit test covers the helper at 100% (3 cases).

finished still always acknowledges on click — independent of the setting. The existing dismiss() flow handles re-surfacing: events come back on the next status transition or via sweepIdle() escalation.

Verification

  • npm run typecheck passes
  • npm run test:unit — 328/328 passing, including 3 new tests
  • Dual code review (Claude Opus 4.7 + GPT-5.5):
    • Opus flagged hardcoded color: 'white' invisible on light themes — fixed
    • GPT flagged stale package-lock.json version — fixed

Adds a new setting `attentionClickClearsWaiting` (default off, preserves
historical behavior) plus an inline mode pill in the attention bell
dropdown header. When enabled, clicking a row for a waitingForApproval /
waitingForInput session both navigates to the tab and dismisses the
notification, matching Slack/Gmail-style 'click marks seen' UX. The
attentionService.dismiss() flow already re-surfaces events on the next
status transition or via the idle-too-long escalation, so the bell will
keep nagging if the session genuinely still needs attention.

Closes #59

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Ron537 Ron537 merged commit fc780fd into main May 12, 2026
5 checks passed
@Ron537 Ron537 deleted the fix/attention-bell-click-clears-waiting branch May 12, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Attention bell events for waiting sessions don't clear after clicking the row

1 participant