Skip to content

refactor(ui): extract ChatView turn rendering - #832

Merged
Astro-Han merged 1 commit into
mainfrom
refactor/ui-chat-turn-boundary
Jul 12, 2026
Merged

Astro-Han merged 1 commit into
mainfrom
refactor/ui-chat-turn-boundary

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

  • Extract the complete materialized-turn renderer from chat-view.tsx into one cohesive chat-turn.tsx module.
  • Keep ChatView responsible for transcript materialization, streaming-tail selection, scroll lifecycle, and page composition.
  • Move turn-specific source contracts to the new owner without changing rendered DOM or behavior.

Why

Stage 2 of #829. ChatView still implemented attachments, message bodies, timeline entries, streaming/thinking content, lineage, and footer actions inline. Those concerns change as one rendered-turn subsystem, independently of the page container and its scroll lifecycle.

Refs #829.

Scope

This is a pure extraction. It does not redesign turn rendering, split every child component into a separate file, or move the #828 pinned-bottom and turn-size-warmup lifecycle out of ChatView; that scroll boundary is Stage 3.

Verification

  • npm --workspace @maka/ui test — 111 passed.
  • npm --workspace @maka/desktop test — 2,351 passed.
  • npm --workspace @maka/desktop run typecheck:stories — passed.
  • npm --workspace @maka/desktop run e2e -- scroll-geometry.spec.ts — 3 passed, including the section-switch re-warm contract from fix(ui): stabilize long-session scroll geometry for content-visibility turns #828.
  • Production build completed during E2E setup.
  • Codex review round 1 found one P1: a Storybook type still deep-imported TurnFooterActionMeta from chat-view.js. The import now uses the existing public components barrel and Storybook typecheck passes.
  • After fix(ui): stabilize long-session scroll geometry for content-visibility turns #828 merged, the branch was rebased onto current main; the warm-up conflict was resolved by keeping scroll lifecycle in ChatView.
  • Codex review round 2 after rebase and full verification: PASS, no P0–P2 findings.
  • No visual evidence: declarations and DOM were moved unchanged. Full rendering contracts and the deterministic scroll-geometry E2E suite are the substitute evidence.

Impact

No user-visible, storage, migration, documentation, or release-note impact. Public @maka/ui type exports remain unchanged.

Reviewer notes

Review chat-turn.tsx as a moved cohesive unit. TurnView and the two fallback indicators are exported only for the internal ChatView seam; the package barrel continues to expose only the existing turn metadata types.

Ready for review

  • Verification is complete and the results above are current
  • Impact, compatibility, migration, documentation, and release-note needs are addressed
  • User-visible UI/UX changes include visual evidence, or Verification explains why it is not applicable

@Astro-Han
Astro-Han merged commit 05c3d80 into main Jul 12, 2026
2 of 3 checks passed
@Astro-Han
Astro-Han deleted the refactor/ui-chat-turn-boundary branch July 12, 2026 14:57
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