Skip to content

fix(tui): show completed write output - #41352

Merged
kitlangton merged 1 commit into
v2-migrationfrom
fix-write-output
Aug 9, 2026
Merged

fix(tui): show completed write output#41352
kitlangton merged 1 commit into
v2-migrationfrom
fix-write-output

Conversation

@kitlangton

@kitlangton kitlangton commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

What

Show the syntax-highlighted file contents after the V2 write tool completes.

Before / After

Before: The write renderer used metadata.diagnostics as its completion signal. V2 writes do not emit diagnostics yet, so successful writes remained as a compact Write <path> row and hid the content already present in input.content.

After: A completed write switches to the existing code-block presentation based on the durable tool status. Diagnostics remain optional and render when available.

How

  • packages/tui/src/routes/session/index.tsx keys the write block on state.status === "completed" instead of optional diagnostics metadata.
  • Audited the other mutation renderers: edit and patch already key their expanded views from final diff/file metadata emitted by their V2 tools.

Scope

This does not add V2 LSP diagnostics to write or edit tools.

Testing

  • bun typecheck in packages/tui
  • bun run test test/mini/tool.test.ts test/mini/entry.body.test.ts test/mini/scrollback.surface.test.ts test/cli/tui/inline-tool-wrap-snapshot.test.tsx in packages/tui (49 passed)
  • Repository pre-push typecheck (32 packages passed)

Demo

An OpenCode Drive before/after capture exposed that Drive 1.4.2's controlled-tool plugin still used the old plugin API and could not control write. anomalyco/opencode-drive#53 fixes that integration. No misleading failed-tool recording is attached while that dependency is pending.

@kitlangton
kitlangton merged commit ae951c9 into v2-migration Aug 9, 2026
9 of 11 checks passed
@kitlangton
kitlangton deleted the fix-write-output branch August 9, 2026 19:01
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