Skip to content

refactor(tui): extract shared session rendering primitives - #48393

Merged
jlongster merged 1 commit into
v2from
session-renderers
Sep 10, 2026
Merged

refactor(tui): extract shared session rendering primitives#48393
jlongster merged 1 commit into
v2from
session-renderers

Conversation

@jlongster

Copy link
Copy Markdown
Contributor

Summary

First small code increment toward shared, nested session rendering.

  • Move the existing session render context and hook into render-context.tsx.
  • Move text/reasoning components and the shared inline tool row into message-parts.tsx.
  • Preserve component bodies, context ownership, reactive reads and the existing InlineToolRow export.

This is a mechanical extraction. Grouping, scrolling, navigation, disclosure defaults and presentation remain unchanged. Larger tool-specific and group renderer extractions can follow in separate increments. The planning document and diagnostic scripts remain local.

Verification

  • bun typecheck in packages/tui: passed
  • Full TUI suite: 1352 passed, 4 skipped, 0 failed; 2 snapshots, 107855 assertions
  • Local baseline comparison: all 67 original function bodies unchanged apart from whitespace/export modifiers; context declaration and icon width preserved
  • OpenCode Drive against this checkout with --dev: replayed the baseline fixture and inspected busy exploration plus completed thought/read/text at 112x34 and 80x24. Layouts match visually; real durations and animation frames vary.
  • New modules pass Prettier; staged diff passes whitespace checks

Baseline: 8f4d7066473ea07d26c5dfc35e46cd9a94e3e292. Replaces the closed documentation-only PR #48392 with an actual code increment.

@jlongster
jlongster merged commit 0c1dfa9 into v2 Sep 10, 2026
10 checks passed
@jlongster
jlongster deleted the session-renderers branch September 10, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant