Skip to content

Split the TUI root component into focused modules - #285

Merged
TheGreatAxios merged 14 commits into
mainfrom
cl-4364-split-the-tui-root-component-into-focused-modules
Aug 2, 2026
Merged

Split the TUI root component into focused modules#285
TheGreatAxios merged 14 commits into
mainfrom
cl-4364-split-the-tui-root-component-into-focused-modules

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Splits src/tui/app.tsx into focused sibling hooks under src/tui/hooks/, along the seams: layout/scroll geometry, message pipeline, quota retry, image attach, command context, and drain logic (plus a provider-auth hook for Codex/xAI login and re-auth handling). This is pure code motion — no logic changes, no behavior changes.

New files:

  • src/tui/hooks/use-quota-retry.ts
  • src/tui/hooks/use-image-attach.ts
  • src/tui/hooks/use-drain-logic.ts
  • src/tui/hooks/use-message-pipeline.ts
  • src/tui/hooks/use-command-context.ts
  • src/tui/hooks/use-transcript-layout.ts
  • src/tui/hooks/use-provider-auth.ts

src/tui/app.tsx drops from 2409 to 1766 lines. src/tui/runner.tsx (including the CycleTextRecorder dispose/reset wiring) is untouched.

Closes CL-4364

Verification

  • bun run typecheck — passes
  • bun run build — passes
  • bun test — 3565 pass, 0 fail, across 274 files (full suite, including the previously-flaky tests/unit/tui/{app,use-scroll,onboarding,use-gates} suites, run both individually and as part of the full suite)

@linear-code

linear-code Bot commented Aug 1, 2026

Copy link
Copy Markdown

CL-4364

@TheGreatAxios TheGreatAxios changed the title cl 4364 split the tui root component into focused modules Split the TUI root component into focused modules Aug 1, 2026
@TheGreatAxios
TheGreatAxios force-pushed the cl-4364-split-the-tui-root-component-into-focused-modules branch from b18d53a to aab0732 Compare August 1, 2026 22:15
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review August 2, 2026 03:49
@TheGreatAxios
TheGreatAxios merged commit b8bfe1d into main Aug 2, 2026
1 check 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