Skip to content

refactor(chat-mode): thin mobile Chat UI seams and fix Zen, tags, fork, and Classic toggle - #562

Merged
orbitingflea merged 2 commits into
mainfrom
refactor/chat-mobile-ui-seams
Dec 3, 2026
Merged

orbitingflea merged 2 commits into
mainfrom
refactor/chat-mobile-ui-seams

Conversation

@orbitingflea

@orbitingflea orbitingflea commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

Why

Reduce mobile Chat Mode upstream diff churn behind thin fork/chatMode/ seams while fixing mobile P1 regressions in Zen filtering, thread shell tag preservation, active-run Fork gating, Classic thread creation, and pre-upgrade outbox compatibility.

Closes #524, Closes #521, Closes #511, Closes #522, Closes #520, Closes #518, Closes #517, Closes #514.

What changed

  • Added apps/mobile/src/fork/chatMode/ (chatFeedPresentation.ts, ChatEditedMark.tsx, ClassicThreadToggle.tsx, classicThreadHandoff.ts) and relocated fork tests out of apps/mobile/src/lib/ (projectThreadStartTurn.test.ts restored to 0/0 vs dfba2c3b056; chatModeParity.test.ts removed from lib/).
  • Normalized Chat feed display once via resolveChatFeedDisplay(display) in threadActivity.ts, keeping zen and activityGroupForVisibility verbatim upstream so completed errors, pending approvals, and unanswered user_input_request cards stay visible under Zen in Chat mode.
  • Extracted chatTerminalAssistantMessageIds, canShowChatAssistantMeta, chatFeedDisplay, and <ChatEditedMark /> from ThreadFeed.tsx, and gated <AssistantForkButton> explicitly on !assistantTurnStillInProgress.
  • Forwarded tags in threadDetailToShell (use-thread-selection.ts) and stamped ...chatThreadInitialTags(creation.chat) in pendingThreadCreationShell (pending-thread-creation.ts).
  • Stored classicThread inside per-flow NewTaskFlowState (keyed by flowKey and pruned on route exit/cancel/promotion, with a one-shot standalone picker handoff), gated <ClassicThreadToggle /> in NewTaskRouteScreen.tsx on listScopes.length > 0 && searchText.trim().length === 0, mounted <ClassicThreadHint /> in NewTaskDraftScreen.tsx hero and short-viewport contextControls (zero chrome on default drafts), and added "Classic thread" / "Classic" to all 11 mobile i18n catalogs.
  • Changed projectThreadStartTurn.ts to pass chat through only when defined so pre-upgrade outbox entries stay Classic.

Scope

  • Strictly apps/mobile/ (no apps/server, apps/web, or native iOS/Android files).
  • Exact git diff --numstat dfba2c3b056..HEAD -- apps/mobile/:
    • Non-fork/ code/test/config (excluding i18n): +345/-30 (375 churn, 16 files) -> +133/-35 (168 churn, 19 files, -55.2%).
    • Mobile i18n catalogs (11 locales): +22/-11 -> +44/-11 (+22 lines for "Classic thread" and "Classic").
    • apps/mobile/src/fork/: +50/-0 (2 files) -> +1445/-0 (9 files); total apps/mobile/: +1622/-46 across 39 files.

Tradeoffs

  • Mounted <ClassicThreadToggle /> inside NewTaskRouteScreen.tsx with a "Classic" hint shown on NewTaskDraftScreen.tsx (hero and short-viewport contextControls) only when enabled, mirroring Web's project menu while keeping default drafts chrome-free.
  • Registered ClassicThreadToggle.test.tsx in apps/mobile/vite.config.ts (+1 line) to satisfy t3code(no-dom-test-environment) and run under the React Compiler transform.

Blast Radius

Mobile Chat feed presentation, assistant reply meta/fork controls, thread shell tag synthesis, new-task draft/project picker flow, and outbox turn bootstrap. Classic thread flows remain unchanged.

Verification

  • pnpm i18n:check: passed across apps/web, apps/mobile, apps/desktop.
  • pnpm --filter @t3tools/mobile typecheck: passed (0 errors).
  • pnpm run knip:check: passed.
  • vp check: passed (0 errors across 8,549 files; 8,945 files formatted).
  • pnpm --filter @t3tools/mobile test: 368/368 test files, 4,095/4,095 tests passed (including reactCompilerCoverage.test.ts 1,213/1,213 and dependency-graph.test.ts 2/2).

@orbitingflea
orbitingflea force-pushed the refactor/chat-mobile-ui-seams branch from 25a102f to 8e3aaaf Compare December 3, 2026 16:15
@orbitingflea
orbitingflea merged commit adad4f8 into main Dec 3, 2026
20 checks passed
@orbitingflea
orbitingflea deleted the refactor/chat-mobile-ui-seams branch December 3, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment