Skip to content

Improve chat navigation UX: last-used subtitle, resume action, clock indicator#135

Open
mcintyre94 wants to merge 1 commit into
mainfrom
improve-chat-navigation-ux-832c4358
Open

Improve chat navigation UX: last-used subtitle, resume action, clock indicator#135
mcintyre94 wants to merge 1 commit into
mainfrom
improve-chat-navigation-ux-832c4358

Conversation

@mcintyre94

Copy link
Copy Markdown
Owner

Summary

  • Last-used chat subtitle in sprite rows: SpriteRowView now 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 @Query with 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-based SpriteNavTarget to push SpriteDetailView carrying the chat ID, then immediately pushes ChatView on appear — bypassing the overview entirely. On iPad it skips the onChange reset to .overview via a pendingChatOpen flag and jumps straight to the chat tab.

  • Clock indicator in iPad nav panel: The most recently used open chat in SpriteNavigationPanel gets 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 .confirmationDialog off ForEach rows onto stable ancestor views (prevents immediate dismiss on list re-render). Switched the iPad/Mac delete confirmation to .alert since .confirmationDialog becomes an anchored popover in regular size class.

Test plan

  • iPhone: sprite row subtitle shows last chat name + relative time; falls back to creation date for sprites with no chats
  • iPhone: leading swipe "Resume Chat" pushes directly into ChatView for the last-used chat, skipping overview
  • iPhone: normal row tap still lands on overview as before
  • iPad: leading swipe "Resume Chat" selects sprite and switches to chat tab
  • iPad: "Resume Chat" on already-selected sprite switches tab without navigating away
  • iPad: clock icon appears next to most recently used open chat in nav panel; disappears when that chat gets an unread indicator
  • iPad/Mac: delete confirmation appears as a centred .alert, not an anchored popover
  • Both: delete confirmation no longer dismisses immediately when the sprite list re-renders

🤖 Generated with Claude Code

…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>
@claude

claude Bot commented May 1, 2026

Copy link
Copy Markdown

Code review

Issue: Swipe action and context menu labels are out of sync

In DashboardView.swift, the new "Resume Chat" action uses different labels depending on the interaction surface:

  • Swipe action: Label("Resume Chat", ...)
  • Context menu: Label("Resume Last Chat", ...)

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 "Resume Chat" to match the swipe action label.

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.

1 participant