Skip to content

Mobile app phase 5: v3 design, diff review with keep and undo (#326) - #879

Merged
Dkm0315 merged 8 commits into
mainfrom
feat/326-mobile-phase5
Nov 15, 2026
Merged

Dkm0315 merged 8 commits into
mainfrom
feat/326-mobile-phase5

Conversation

@Dkm0315

@Dkm0315 Dkm0315 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Part of #326.

Phase 5 of the mobile app: the v3 design across the app, then diff review with keep and undo. Built spec-first: cases MUS-SPEC-23-24A to 24P in docs/spec/clauses/23-mobile.md, each with a red test committed before it went green.

The v3 restyle (24A to 24I)

  • Tokens in packages/mobile/src/theme.ts and motion.ts: the v3 dark and light palettes (tonal surfaces, separators inside cells only, 16 % and 26 % tints), the iOS type scale (nothing under 12; prose 17/26; code 13/21, 14 in code blocks), 20 pt text margins and 16 pt card margins, radii 26/24/38, capsule buttons (50 and 36), snappy/gentle/bouncy springs, and a 150 ms crossfade under Reduce Motion.
  • Haptics per the v3 table: selection, light, medium, success, warning, and the 320 ms stream tick.
  • Glass: iOS 26 Liquid Glass through expo-glass-effect, an expo-blur fallback with the v3 tint and top highlight, and a tonal surface on Android. Scroll-edge fades under the title and above the tab bar.
  • Chats: a large title with the computer line, two-line rows in Active and Earlier with 36 pt status glyphs (running ring, amber hand, accent bubble, red triangle, green check, dashed idle ring, clock for queued). No filter chips; search is its own circle beside the glass tab bar.
  • Chat: tool steps and thinking fold into one "Worked · N steps" capsule. A live line names the running step, and the streaming reply ends with the accent caret. Send turns into Stop with a moving ring (new chat.stop, act only); with text typed it becomes Steer, with a hint. The composer shows its chips only while focused. A run that finishes while the chat is open resolves into a summary card with Review.
  • Approvals lead with their question, then the command well and one line of why. Approve is the one filled action. A watch-only phone is told where to answer.
  • Moments: All clear (one success haptic, with receipts of what was just answered), Paired (a shield, who can read the link, Continue), and Run finished.
  • Also restyled: Needs you, New chat (task first, grouped Where/Agent/Model, Start at the bottom), Settings (iOS anatomy, an eye for watch-only), the computer switcher, the offline banner, the Projects placeholder, the pair screen (the check code in boxes) and the tablet shell.

Diff review with keep and undo (24J to 24P)

  • Desktop, packages/agent-app/src/runtime/mobile/:
    • changes.list: the chat's latest turn, the same one the desktop's changed-files card uses, through review.baselines, review.changes and review.marks. Paths are folder-relative.
    • changes.diff: the desktop's own hunks with their ids, named after the enclosing function, with three lines of context and changed-word ranges. Pages hold 400 lines. Highlighting runs on the desktop with Shiki (JavaScript regex engine, the desktop's dark-plus/light-plus themes, sent as [dark, light] colour pairs), so the phone does no parsing. A new file past the line diff's budget is one whole-file hunk.
    • changes.keep and changes.undo go through review.keep, review.undoHunk and review.undoFile. They are act only, with access checked again right before the write (after a test gate). A stale hash writes nothing, and the path must be one of the turn's changes.
  • Phone: the Changes screen has a review ring, files that swipe right to keep and left to undo, and Keep all / Undo all in a glass bar. The diff has one gutter, 13 pt wrapped code, function-named hunk pills, a glass toolbar (previous, next, "1 of 3", Undo, Keep) and swipeable hunks; kept hunks fold into a pill. Widths of 600 pt and up get a split diff. The list is virtualized and asks for the next page near its end. Changes is a glass header button with its count.

Security tests

  • A read-only phone's keep and undo are refused, and nothing changes on disk or in the marks.
  • A phone revoked while an undo waits at the gate leaves the file as it was.
  • A stale hash writes nothing.
  • A path outside the turn's changes (README.md, ../../etc/passwd) is refused.
  • Read-only chat.stop is refused.

Receipts

  • 5,000-line diff (24K), measured locally: 13 pages of at most 400 lines, each page 204 to 257 ms, and the slowest of 130 pings from a second session answered in 6 ms while pages were read.

Device evidence

No phone was attached (adb devices lists nothing), so there are no device screenshots. The restyle is checked in jest only; glass, blur, the shimmer and caret timing, the spring feel and the split diff on rotation are not verified on a device.

Deferred

  • The file viewer (item 3): this PR is already past about 2,500 lines.
  • The full-width shimmer sweep: it needs a masked view, so the live line brightens and dims instead.
  • Large-title collapse into the bar, shared-element transitions, Face ID before Approve (app lock), hinge-aware foldables, and model/access chips in the composer (they need the mid-chat switch).

@Dkm0315
Dkm0315 marked this pull request as ready for review November 15, 2026 16:41
@Dkm0315
Dkm0315 merged commit 4c7336b into main Nov 15, 2026
14 checks passed
@Dkm0315
Dkm0315 deleted the feat/326-mobile-phase5 branch November 15, 2026 16:42
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