feat(mobile): ACP-backed workspace pages — restyled home, native workspace screen, diff surface
Merged
SA
4mo ago+2288+2288+0123456789012345678901234567890123456789-442-442-012345678901234567890123456789
Summary
Reworks the mobile workspace UX end to end on the new ACP session architecture:
- Home list restyle — chat-card background removed; sessions hang off a thread rail under their workspace, date sections separate on whitespace, ghost + button starts a chat in that workspace, row tap opens the workspace page.
- ACP sessions everywhere — home and workspace chat lists read host-wide
acpSessions.list(useHostAcpSessions, 30s poll + focus refetch); the composer creates an ACP session and prompts it; threads open atchat/acp/[sessionId]. The legacy live-sessions surface is removed. - Native workspace page — flattened into the root stack for a real back chevron; transparent glass header with title + branch subtitle, native toolbar (compose + workspace menu); chat list with workspace-pinned composer and a glass "View changes" chip.
- Diff surface — Changes screen (files/commits/PR checks), files-changed list with per-file viewer, commits formSheet with a native pinned header and continuous timeline rail.
- Composer polish — whole-pill tap-to-focus via
contentShape+onTapGesture, tighter SwiftUI edge padding,fixedTarget/aboveslots for the workspace page. - Client plumbing —
host-clientlistSessionsaccepts optional host-wide input; git router gains commit-file stats; ACP client-unification proposal inplans/.
Test plan
- Home lists workspaces with their ACP sessions; + targets the composer; sends create a session and land in the thread
- Workspace page: back chevron, title/subtitle header, tridot menu (rename/delete/copy/share), full-screen scroll, pinned composer sends
- Chat thread: native back + session-title header
- Changes → files changed / commits sheet render real data (verified in sim against local host)
-
bun run lintand turbo typecheck green across mobile, host-client, host-service - Cold-mount check of the commits formSheet on a fresh install
Summary by cubic
Rebuilt the mobile workspace around ACP: home shows per‑workspace session rails, a native workspace page hosts chats with a pinned composer and “View changes,” and a full diff surface covers files, commits, and PR checks. Also fixes diff cache correctness, a viewed‑files selector render loop, large‑changeset fetch stampedes, and improves commit avatar resolution.
-
New Features
- Home: restyled rows; sessions from host‑wide
acpSessions.listwith 30s polling; tap workspace opens its page; plus button starts a chat. - ACP threads:
workspace/[id]/chat/acp/[sessionId]route with a glass title header; legacy live‑sessions view removed. - Workspace screen: native transparent header with back chevron, title + branch, toolbar menu; session list; pinned composer; glass “View changes” chip.
- Diff surface: Changes (files/commits/PR checks), per‑file viewer, commits formSheet with a timeline rail and author avatars; avatars resolve by email or display name; viewed‑file tracking; cache/key fixes and finite stale times to prevent fetch stampedes.
- Client plumbing:
host-clientlistSessions(routingKey, input?)supports host‑wide input;gitrouter adds per‑file stats andauthorEmail; addeduseHostAcpSessions; new dependencydiff.
- Home: restyled rows; sessions from host‑wide
-
Migration
- Update navigation to
/(authenticated)/workspace/[id]/chat/acp/[sessionId]; remove links to the old live‑sessions screen. - Update calls to
listAcpSessionsto pass an optional input object (e.g.,{ workspaceId, cursor, limit }). - Install
diffinapps/mobileand the lockfile. - Hosts must expose
acpSessions.listand the updatedgitprocedures (commit files andauthorEmail) for diff/commits views.
- Update navigation to
Summary by CodeRabbit
- New Features
- Added ACP-based session browsing on Home and Workspace, with session navigation into the ACP chat flow.
- Introduced workspace screens for Diff (PR/status summaries), Files Changed (pull-to-refresh, viewed tracking, per-file comments/actions), File Viewer, and Commits (timeline with author avatars and per-commit additions/deletions).
- UX Improvements
- Refreshed the “new chat” experience to support a fixed target, plus refined workspace header/glass presentation and session list typography/spacing.