Improve chat navigation UX: last-used subtitle, resume action, clock indicator#135
Improve chat navigation UX: last-used subtitle, resume action, clock indicator#135mcintyre94 wants to merge 1 commit into
Conversation
…indicator
- SpriteRowView: show most recently used chat name + relative time as subtitle
("Chat #3 · 8m ago") via @query, falling back to sprite creation date when
no chats exist yet.
- DashboardView: add "Resume Chat" leading swipe action and "Resume Last Chat"
context menu item on both iPhone and iPad. On iPhone the action fetches the
most recent open chat and pushes SpriteDetailView via NavigationPath carrying
the chat ID, bypassing the overview. On iPad the flag pendingChatOpen skips
the onChange reset to .overview and jumps straight to the chat tab. Switched
iPhone NavigationStack to use an explicit NavigationPath so swipe actions can
push programmatically with a typed SpriteNavTarget value.
- SpriteDetailView: accept initialChatId parameter; when present, switch to
that chat on first appear and — on iPhone — set showingChat = true to push
ChatView directly without landing on the overview first.
- SpriteNavigationPanel: show a subtle clock SF Symbol next to the most
recently used open chat in the iPad sidebar, giving a visual anchor for
"where you left off".
Also fix two pre-existing CLAUDE.md violations in DashboardView:
- Move confirmationDialog off ForEach rows onto stable ancestor views to
prevent immediate dismiss on list re-render.
- Use .alert (not .confirmationDialog) for the iPad/Mac delete confirmation
since regular size class turns confirmationDialog into an anchored popover.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Code reviewIssue: Swipe action and context menu labels are out of sync In
This mismatch occurs in both the iPad branch (lines 106 / 128) and the iPhone branch (lines 176 / 199). Relevant code:
CLAUDE.md requires: "The two should be kept in sync whenever actions are added or removed." Fix: Pick one label and use it consistently in both the swipe action and context menu for both branches — e.g. change both context menu items to |
Summary
Last-used chat subtitle in sprite rows:
SpriteRowViewnow shows the most recently used open chat name and relative time as a subtitle (e.g. "Chat Thinking shimmer, inline tool steps, and Dynamic Island Live Activity #3 · 8m ago"), using a@Querywith a dynamic predicate. Falls back to sprite creation date when no chats exist."Resume Chat" swipe action + context menu: Both iPhone and iPad sprite rows get a leading swipe action and context menu item to jump directly to the last-used chat. On iPhone this uses a
NavigationPath-basedSpriteNavTargetto pushSpriteDetailViewcarrying the chat ID, then immediately pushesChatViewon appear — bypassing the overview entirely. On iPad it skips theonChangereset to.overviewvia apendingChatOpenflag and jumps straight to the chat tab.Clock indicator in iPad nav panel: The most recently used open chat in
SpriteNavigationPanelgets a subtle tertiary clock SF Symbol — a visual anchor for "where you left off" in the sidebar.Fix pre-existing CLAUDE.md violations in
DashboardView: Moved.confirmationDialogoffForEachrows onto stable ancestor views (prevents immediate dismiss on list re-render). Switched the iPad/Mac delete confirmation to.alertsince.confirmationDialogbecomes an anchored popover in regular size class.Test plan
ChatViewfor the last-used chat, skipping overview.alert, not an anchored popover🤖 Generated with Claude Code