You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three additive features on the session list:
1. Recent (last 12h) section
A flat list at the top of the session list, showing every session
updated in the last 12 hours regardless of project, sorted active-
first then by recency. Same SessionItem rendering as folder rows
with showPath=true so users can tell which project each entry
belongs to. Hidden during search.
2. Pin sessions (cross-device, server-side)
Long-press a session and pick "置顶 / Pin to top" to keep it at
the top of Recent permanently, even past the 12h window. Pin state
lives on the server in session metadata (metadata.pinnedAt: epoch
ms) so it syncs across browser tabs / devices via SSE. Cleared by
tapping the same menu item again.
- Hub: sessionCache.pinSession + syncEngine wrapper
- Hub: POST /api/sessions/:id/pin { pinned: boolean }
- Shared: PinSessionRequestSchema, pinnedAt on MetadataSchema +
SessionSummaryMetadata (copied through toSessionSummary)
- Web: usePinnedSessions hook derives from session metadata, uses
useMutation to call the API; sort + display in SessionList
3. Unread badge — synced with push notification triggers
When NotificationHub fires a ready / permission / task / session-
completion push, it also fire-and-forgets a markSessionUnread on
the syncEngine, which writes metadata.unreadAt = Date.now() with
a version-mismatch retry. Sessions with unreadAt show a small
#007AFF dot before the title in the list. When SessionChat mounts
(or while it's open and a new unreadAt arrives) it calls
POST /api/sessions/:id/mark-read which clears the flag and SSE
broadcasts the cleared state to every device.
Build: 44 → 48.
via [HAPI](https://hapi.run)
Co-Authored-By: HAPI <noreply@hapi.run>
0 commit comments