Repository navigation
Conversation
There was a problem hiding this comment.
Looks good. I reproduced the bug on the base: a four-file patch asked "Edit src/alpha.ts" and showed only alpha's diff. With this change the prompt reads "Edit 4 files" and shows each file's path with its own diff in a scrolling area. Single-file edits look the same as before. The TUI permission tests pass (52) and tsc -b in packages/tui is clean. I couldn't run the Rust tests because cargo isn't installed here, but the Rust code mirrors the TypeScript change.
Public API: unchanged. PermissionPresentation only gains an optional files field, and it is internal to the TUI.
No blocking concerns.
The permission prompt for an edit read only metadata.files[0], so a patch touching several files showed one diff under "Edit <first file>". Expose each file's own diff and render them under their paths, in the session prompt, the mini footer (including mono) and the Rust mini footer. The combined diff can't be used instead because the diff renderer only draws the first file of a multi-file patch. Fixes anomalyco#55337 Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-authored-by: drakeo338 <[email protected]>
fa7332e to
4540306
Compare
There was a problem hiding this comment.
This push only rewrites the commit message to credit @drakeo338. The code is identical to what I reviewed before, so my earlier review still stands and I have no new concerns. Public API: unchanged.


Issue for this PR
Fixes #55337
Type of change
What does this PR do?
This picks up #55344 by @drakeo338, which the stale-PR bot closed, and builds on its approach.
The edit permission prompt read only
metadata.files[0], so an apply_patch touching several files asked "Edit " and showed one diff. The others were approved without being shown.permission.tsnow returns each file's own diff, and the session prompt, the mini footer (including mono) and the Rust mini footer render one diff per file under its path. The combined patch can't be shown instead, because the diff renderer draws only the first file of a multi-file patch. Single-file edits look the same as before.How did you verify your code works?
From
packages/tui: the four permission test files (52 pass; 5 fail without the fix) and the full suite (3 failures insession-findanddialog-shell-outputalso fail ondev). Frompackages/cli-rs:cargo test -p opencode-ui -p opencode-mini, with two new tests (one existing editor test fails the same way ondev), clippy and fmt.bun run checkpassed.Screenshots / recordings
No screenshot; the render tests above cover the multi-file layout.
Checklist
Prepared with Claude Code.