Skip to content

feat: improve Resume Conversation UX on mobile#77

Open
TeigenZhang wants to merge 1 commit intoArk0N:masterfrom
TeigenZhang:feat/mobile-resume-conversation-ux
Open

feat: improve Resume Conversation UX on mobile#77
TeigenZhang wants to merge 1 commit intoArk0N:masterfrom
TeigenZhang:feat/mobile-resume-conversation-ux

Conversation

@TeigenZhang
Copy link
Copy Markdown
Contributor

Summary

On narrow screens the Resume Conversation list on the welcome page was hard to scan: the first prompt was clipped almost immediately by a single-line layout, and the working-dir subtitle was truncated at the end — exactly where the identifying project name lives. The ~/ shorthand also never fired on macOS because only /home/ was handled.

This PR reworks the history item layout without changing the API:

  • Title switches to a 2-line clamp so more of the first prompt is visible.
  • Subtitle is now case-aware: workingDir is matched against loaded cases (incl. linked cases). Exact matches render as #caseName, subpaths as #caseName/sub, otherwise it falls back to the directory basename. # labels are styled in accent blue.
  • Home shorthand now normalizes both /home/<user>/ and /Users/<user>/ to ~/ so macOS paths are collapsed.
  • Inline detail toggle: each item gets a button that expands an in-place panel with the full prompt, full path, timestamp, size, and short session id. Click again to collapse. Clicking the card body still triggers resume; the toggle uses stopPropagation to avoid accidental resume. The chevron rotates 90° in the expanded state.

Also fixes a small CSS bug where .history-item-detail used display: flex and therefore defeated the HTML hidden attribute's default display: none — an explicit [hidden] override was added.

Test plan

  • Verify default render: title clamps to 2 lines, subtitle shows #case label when a case matches, basename otherwise.
  • Verify detail panel is collapsed by default.
  • Click → panel expands with full prompt/path/meta. Click again → collapses.
  • Click card body (outside the button) → resume flow still runs.
  • macOS /Users/<me>/... paths display as ~/... in the detail panel.
  • npm run build succeeds; assets rehash cleanly.

🤖 Generated with Claude Code

Default layout was a single nowrap row with path + date + size, which on
narrow screens truncated both the first prompt and the directory suffix
(where project names actually live). The /Users/ home shorthand was also
never applied on macOS.

Changes:
- Title now uses 2-line clamp so more of the first prompt is visible.
- Subtitle resolves workingDir against known cases: exact match shows
  "#caseName", subpath shows "#caseName/sub", otherwise falls back to
  basename. Case labels are styled distinctly.
- Normalize both /home/<user>/ and /Users/<user>/ prefixes to "~/".
- Each history item gets a "..." toggle that expands an in-place detail
  panel with the full prompt, full path, timestamp, size, and short
  session id. Collapses back on second click; clicking the card body
  still triggers resume.
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