Skip to content

feat(notifications): add mark-as-unread session action - #1966

Draft
wen2zhou wants to merge 3 commits into
aipoch:mainfrom
wen2zhou:feat/mark-session-unread
Draft

feat(notifications): add mark-as-unread session action#1966
wen2zhou wants to merge 3 commits into
aipoch:mainfrom
wen2zhou:feat/mark-session-unread

Conversation

@wen2zhou

Copy link
Copy Markdown
Contributor

Problem

A Session that has already been acknowledged cannot be deferred from its sidebar menu. Users need a quick way to return its latest Messages entry to the unread queue without reopening or changing the Session.

Proposed change

  • Add an eye-icon Mark as unread action to the desktop and mobile Session action menus.
  • Add the typed renderer, Electron IPC, and local/remote Web command path for marking Sessions unread.
  • Transactionally restore the latest valid notification for each requested Session to unread and promote its stable notification identity across the bounded Messages snapshot window.
  • Refresh the shared notification store and badge after the mutation.
  • Add renderer translations for Spanish, French, Simplified Chinese, Traditional Chinese, Japanese, Korean, and Russian.

Scope and non-goals

  • Only the latest valid notification for a Session is marked unread; older history remains read.
  • Sessions without an existing Messages notification do not get a synthetic activity item.
  • No database schema, migration, native notification delivery, or Session persistence format changes.

Acceptance criteria and validation

All listed checks ran after the final material edit and after rebasing onto origin/main at cb795e8.

  • Session menu rendering and action wiring -> npx vitest run with WorkspaceSidebar.render.test.tsx -> passed.
  • Latest-notification unread persistence and bounded snapshot promotion -> notification-inbox-repository.test.ts -> passed.
  • Renderer store, controller, IPC, host command, preload, renderer-contract, surface inventory, and i18n consumers -> targeted 12-file Vitest set -> 952 tests passed.
  • Node and Web type safety -> npm run typecheck -> passed.
  • Source lint -> npm run lint -> passed.
  • Final impact selection -> npm run test:affected -- --base origin/main --head HEAD -> unknown host-command module ownership failed closed to the complete portable suite; 21,997 tests passed and 238 were conditionally skipped.

The exact-head full portable suite covered the cross-process consumers. No platform-specific native behavior changed, so packaging and Electron E2E lanes were not run locally. No independent code review was performed locally; PR review and CI remain authoritative.

Review focus

  • The transaction in NotificationInboxDbRepository preserves notification id, dedupe key, content, and action state while assigning a fresh sequence so an older marked-unread item re-enters the bounded Messages snapshot.
  • The new action remains in the Session-management menu group and applies consistently to desktop and mobile navigation.
  • Request validation and contracts remain identical across Electron and Web transports.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 31, 2026
@wen2zhou
wen2zhou marked this pull request as draft August 31, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant