Skip to content

refactor(mobile): organize native chat view and transcript modules - #37054

Merged
nwparker merged 1 commit into
mainfrom
module-organization/pr70-pr74-mobile-native-chat-mb29e7f53
Nov 1, 2026
Merged

nwparker merged 1 commit into
mainfrom
module-organization/pr70-pr74-mobile-native-chat-mb29e7f53

Conversation

@nwparker

@nwparker nwparker commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Groups the mobile chat code into folders so related pieces are easier to find. App behavior stays the same.

What Changed

Combines two related batches: 63 file moves covering the native chat view, controller, and transcript modules. Five imports now point to concrete defining owners and four forwarding exports are removed. Callers, recording adapters, pilot scenarios, reliability paths, and test baselines follow the new locations.

Two recording adapters use erased namespace type imports; their emitted JavaScript is byte-identical to the previous version. Existing upstream test cleanup and current main changes are preserved.

Why

Organizes related code by responsibility while keeping a larger, coherent review scope. Direct owner imports avoid adding barrels or forwarding shims.

Linked Issue

N/A — internal repository organization work; no existing linked issue.

Visual Proof

N/A — file organization and import paths only; no visual or interaction change.

Testing

  • I manually tested these changes locally
  • Automated tests updated for moved paths; no new behavior to test

On macOS: 48 mobile test files / 418 tests and two consumer files / 19 tests passed. Mobile production and test typechecks, React Doctor, changed-code quality, formatting, reliability, path-literal, and test-runner checks passed. The final erased-type amendment preserves emitted JavaScript exactly; both mobile typechecks and static checks were rerun. Fresh hosted CI on the final commit passed, including all twelve Node test shards and mobile verification.

Review

Two independent source audits checked behavior preservation, concrete import owners, hooks, literals, mocks, and moved callers. The unchanged refactor merge gate and whole-tree comparison run against current main before merge.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

No runtime API, wire format, platform path semantics, or remote compatibility changes. Mobile behavior remains unchanged. Tests and validation ran without bringing app windows into focus.

Checklist

  • This PR is focused on the mobile native-chat domain (63 moves across two related batches)
  • I explained what changed and why
  • Visual proof is N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered
  • Focused local validation and the applicable hosted CI checks pass

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4a457028-61ed-4499-87bb-8dfb92bb89f2
Commits

Reviewing files that changed from the base of the PR and between 3da7453 and d946b3a.

Files selected for processing: 122
  • config/flaky-test-pattern-baseline.txt
  • config/reliability-gates.jsonc
  • mobile/rpc-foundation/pilot-scenarios.json
  • mobile/src/session/MobileAgentSessionTabActionSheet.tsx
  • mobile/src/session/MobileNativeChatEmptyStateView.tsx
  • mobile/src/session/MobileNativeChatScrollRootsBoundary.tsx
  • mobile/src/session/MobileNativeChatView.streaming-rows.test.ts
  • mobile/src/session/MobileSessionActiveContent.tsx
  • mobile/src/session/TerminalPaneView.test.tsx
  • mobile/src/session/__mocks__/mobile-prompt-controller.ts
  • mobile/src/session/mobile-dictation-agent-chat-start.test.tsx
  • mobile/src/session/mobile-dictation-mode-refresh.test.tsx
  • mobile/src/session/mobile-dictation-session-outcomes.test.tsx
  • mobile/src/session/mobile-native-chat-reading-place.ts
  • mobile/src/session/mobile-session-terminal-frame-layout.test.tsx
  • mobile/src/session/mobile-structured-agent-session-contract.ts
  • mobile/src/session/mobile-terminal-action-sheet-actions.ts
  • mobile/src/session/mobile-terminal-layout-choice.test.tsx
  • mobile/src/session/native-chat/MobileNativeChatCardHeaderAction.test.tsx
  • mobile/src/session/native-chat/MobileNativeChatCardHeaderAction.tsx
  • mobile/src/session/native-chat/MobileNativeChatDiffCard.tsx
  • mobile/src/session/native-chat/MobileNativeChatFloatingControls.tsx
  • mobile/src/session/native-chat/MobileNativeChatFullContent.test.tsx
  • mobile/src/session/native-chat/MobileNativeChatFullContent.tsx
  • mobile/src/session/native-chat/MobileNativeChatLongPressContent.tsx
  • mobile/src/session/native-chat/MobileNativeChatOverlay.test.ts
  • mobile/src/session/native-chat/MobileNativeChatOverlay.tsx
  • mobile/src/session/native-chat/MobileNativeChatResolutionReceipt.tsx
  • mobile/src/session/native-chat/MobileNativeChatView.composer-lock.test.ts
  • mobile/src/session/native-chat/MobileNativeChatView.failure-banner.test.ts
  • mobile/src/session/native-chat/MobileNativeChatView.harness.test-fixture.ts
  • mobile/src/session/native-chat/MobileNativeChatView.history-paging.test.ts
  • mobile/src/session/native-chat/MobileNativeChatView.prompt-presentation.test.ts
  • mobile/src/session/native-chat/MobileNativeChatView.render-stubs.test-fixture.ts
  • mobile/src/session/native-chat/MobileNativeChatView.rows.test.ts
  • mobile/src/session/native-chat/MobileNativeChatView.stop.test.ts
  • mobile/src/session/native-chat/MobileNativeChatView.tail-follow.test.ts
  • mobile/src/session/native-chat/MobileNativeChatView.tsx
  • mobile/src/session/native-chat/MobileNativeChatView.turn-status.test.ts
  • mobile/src/session/native-chat/MobileNativeChatView.waiting-rows.test.ts
  • mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx
  • mobile/src/session/native-chat/composer/use-mobile-native-chat-drafts-glued-pending.test.ts
  • mobile/src/session/native-chat/input/MobileNativeChatAsk.tsx
  • mobile/src/session/native-chat/input/MobileNativeChatPermission.tsx
  • mobile/src/session/native-chat/input/MobileNativeChatQuestion.tsx
  • mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-cards.ts
  • mobile/src/session/native-chat/mobile-native-chat-attach-actions.ts
  • mobile/src/session/native-chat/mobile-native-chat-blocks.test.ts
  • mobile/src/session/native-chat/mobile-native-chat-cli-fork.ts
  • mobile/src/session/native-chat/mobile-native-chat-controller-contract.ts
  • mobile/src/session/native-chat/mobile-native-chat-diff.test.ts
  • mobile/src/session/native-chat/mobile-native-chat-host-journal-frames.test-fixture.ts
  • mobile/src/session/native-chat/mobile-native-chat-item-read.ts
  • mobile/src/session/native-chat/mobile-native-chat-list-footer.tsx
  • mobile/src/session/native-chat/mobile-native-chat-list-header.tsx
  • mobile/src/session/native-chat/mobile-native-chat-merge.test.ts
  • mobile/src/session/native-chat/mobile-native-chat-merged-snapshot-parity-hooks.test.tsx
  • mobile/src/session/native-chat/mobile-native-chat-merged-snapshot-parity.test.ts
  • mobile/src/session/native-chat/mobile-native-chat-merger-oracle.test.ts
  • mobile/src/session/native-chat/mobile-native-chat-noise.test.ts
  • mobile/src/session/native-chat/mobile-native-chat-reading-place.test.tsx
  • mobile/src/session/native-chat/mobile-native-chat-render-data.test.ts
  • mobile/src/session/native-chat/mobile-native-chat-render-data.ts
  • mobile/src/session/native-chat/mobile-native-chat-run-descriptors.ts
  • mobile/src/session/native-chat/mobile-native-chat-stop-journal.test-fixture.ts
  • mobile/src/session/native-chat/mobile-native-chat-stopped-before-start.test.tsx
  • mobile/src/session/native-chat/mobile-native-chat-toggle-action.ts
  • mobile/src/session/native-chat/mobile-native-chat-unsent-notices.test.ts
  • mobile/src/session/native-chat/mobile-native-chat-unsent-notices.ts
  • mobile/src/session/native-chat/mobile-native-chat-view-styles.ts
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessage.copy.test.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tool-result-availability.test.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessage.work-run.test.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatMessageActionsSheet.test.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatNoticeRow.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatOwnedScrollView.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatPageList.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatPageScroll.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatReasoningRow.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatRowItemSource.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatRowList.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatRowOverlaysHost.test.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatRowOverlaysHost.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatToolLine.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatToolRun.tsx
  • mobile/src/session/native-chat/transcript/MobileNativeChatUserMessageFold.tsx
  • mobile/src/session/native-chat/transcript/mobile-native-chat-disclosure-store.ts
  • mobile/src/session/native-chat/transcript/mobile-native-chat-page-rejection.test.ts
  • mobile/src/session/native-chat/transcript/mobile-native-chat-row-keys.ts
  • mobile/src/session/native-chat/transcript/mobile-native-chat-scroll-ownership.test.tsx
  • mobile/src/session/native-chat/transcript/mobile-native-chat-scroll-root-handle.ts
  • mobile/src/session/native-chat/transcript/mobile-native-chat-scroll-roots.ts
  • mobile/src/session/native-chat/transcript/use-mobile-native-chat-message-detail.test.tsx
  • mobile/src/session/native-chat/transcript/use-mobile-native-chat-message-detail.ts
  • mobile/src/session/native-chat/transcript/use-mobile-native-chat-row-renderer.tsx
  • mobile/src/session/native-chat/transcript/use-mobile-native-chat-session-tool-result-paging.test.tsx
  • mobile/src/session/native-chat/transcript/use-mobile-native-chat-tail-follow.ts
  • mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure-opening-send.test.tsx
  • mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.ts
  • mobile/src/session/native-chat/use-mobile-native-chat-active-resolution.ts
  • mobile/src/session/native-chat/use-mobile-native-chat-controller.test.ts
  • mobile/src/session/native-chat/use-mobile-native-chat-controller.ts
  • mobile/src/session/native-chat/use-mobile-native-chat-conversation-state.ts
  • mobile/src/session/native-chat/use-mobile-native-chat-input-lease.ts
  • mobile/src/session/native-chat/use-mobile-native-chat-session-lane.ts
  • mobile/src/session/native-chat/use-mobile-native-chat-session-stream-end.test.ts
  • mobile/src/session/native-chat/use-mobile-native-chat-session.test.ts
  • mobile/src/session/native-chat/use-mobile-native-chat-session.ts
  • mobile/src/session/native-chat/use-mobile-native-chat-stop.test.ts
  • mobile/src/session/native-chat/use-mobile-native-chat-stop.ts
  • mobile/src/session/use-mobile-bridge-chat-prompt-writes.ts
  • mobile/src/session/use-mobile-native-chat-capability-demand.test.tsx
  • mobile/src/session/use-mobile-native-chat-prompt-controller.ts
  • mobile/src/session/use-mobile-native-chat-terminal-turn.ts
  • mobile/src/session/use-mobile-session-native-chat-dictation.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.test.ts
  • mobile/src/session/use-mobile-structured-agent-session-send.test.tsx
  • mobile/src/test-support/rpc-recording/adapters/native-chat-paging-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-read-mount-adapters.ts
  • tests/e2e/journal-restored-consumers.unit.test.ts
  • tests/e2e/native-chat-transcript-file-order.unit.test.ts
Files with no reviewable changes: 4
  • mobile/src/session/native-chat/transcript/use-mobile-native-chat-tail-follow.ts
  • mobile/src/session/native-chat/MobileNativeChatLongPressContent.tsx
  • mobile/src/session/native-chat/use-mobile-native-chat-conversation-state.ts
  • mobile/src/session/native-chat/transcript/MobileNativeChatPageScroll.tsx
Files skipped from review as they are similar to previous changes: 1
  • mobile/src/session/native-chat/use-mobile-native-chat-session.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

Walkthrough

The mobile native-chat modules now use import paths that match their reorganized directory structure. Related session references, tests, fixtures, reliability-gate entries, baseline paths, and pilot-scenario paths were updated. The summaries report no changes to runtime logic or test expectations, except for removed fixture and scroll-roots re-exports.

Merge Risk: Minimal · up to d946b

No actionable merge-blocking risk was identified in the native-chat reorganization.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: organizing mobile native chat view and transcript modules.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description covers the required sections, explains the refactor and rationale, documents the lack of visual changes, lists testing results, and addresses review, compatibility, and checklist items…
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 50 files. (68 skipped: 3 unsupported, 65 over the file limit.)

Full details: Description check

Explanation

The description covers the required sections, explains the refactor and rationale, documents the lack of visual changes, lists testing results, and addresses review, compatibility, and checklist items. The linked issue is marked N/A, which is acceptable only if the author is an internal maintainer under the template’s exception.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@nwparker
nwparker force-pushed the module-organization/pr70-pr74-mobile-native-chat-mb29e7f53 branch from 3da7453 to d946b3a Compare November 1, 2026 15:12
@nwparker
nwparker merged commit 1ad332d into main Nov 1, 2026
45 checks passed
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