ui: closed alert + creative empty chamber + diff threshold + filename truncation - #50
Merged
Merged
Conversation
… truncation
Four issues from the visual review:
## Permission alert: every row closes
The alert's inner rows (tool/args/key hints) had a left `│` border
but no right border, so the box looked half-open. New `row` helper
in the alert renderer pads each content row to the inner width and
adds the right `│` border. The frame now reads as a single closed
box, not a left bracket with text hanging out.
## Empty tool chambers get distinct styling
When `close_tool_chamber_if_open` fires (permission denied, agent
errored, interjected mid-execution, or a fresh ToolCall before the
previous one finished), the chamber previously closed empty —
just a top border and bottom border with nothing inside. Now it
gets a small CRT-static signature inside:
╭─ WRITE_TODO_LIST ─ ... ──╮
│ ░▒░▓░▒▒░▓▒░▒░▓░▒▒░▓▒░▒░ │
│ ░▒▓ NO OUTPUT ▓▒░ │
│ tool denied · aborted · no result │
│ ▒░▓░▒▓░▒░▓▒░▓░▒▓░▒░▓▒░▓ │
╰────────────────────────────╯
Two `static_row` patterns (alternating glyph runs) sandwich a
centered `NO OUTPUT` label + reason. Reads as a "dead channel"
rather than a silent empty rectangle.
New helpers: `static_row(inner, seed)` builds the noise rows,
`chamber_row_centered(content, inner)` horizontally centers labels
inside the chamber.
## MODIFIED panel: left-truncate paths
`src/clj/yourname/guestbook/…` hid the filename — the most useful
information lived at the right edge. New module-level
`left_truncate(s, max)` produces `…clj/yourname/foo.rs` so the
filename always survives. Applied to the MODIFIED section's items
before they reach `push_section` (which still does its own
right-padding to fit the chamber width).
## Edit-tool diff threshold
`edit` was only emitting a unified diff when both old and new
sides were ≤ 20 lines. Larger edits silently dropped the diff —
the chat showed `Applied edit to <path>` with no `+`/`-` lines,
and the chamber renderer (which detects `--- a/`) fell back to
the plain-text path. Threshold bumped to 200 lines per side; that
covers virtually all edit-tool use without inflating LLM context
for genuinely massive refactors.
## Test plan
- [x] `cargo test --features plugin` -> 599 pass, 0 fail.
- [x] Both build profiles -> 0 warnings.
- [ ] Eyeball: deny a tool, verify the chamber shows the NO
OUTPUT static rows; check the alert is fully closed;
check MODIFIED filenames are readable; verify large edits
show the colorized diff in the chamber.
allen-munsch
pushed a commit
to allen-munsch/dirge
that referenced
this pull request
Jun 3, 2026
… truncation (dirge-code#50) Four issues from the visual review: ## Permission alert: every row closes The alert's inner rows (tool/args/key hints) had a left `│` border but no right border, so the box looked half-open. New `row` helper in the alert renderer pads each content row to the inner width and adds the right `│` border. The frame now reads as a single closed box, not a left bracket with text hanging out. ## Empty tool chambers get distinct styling When `close_tool_chamber_if_open` fires (permission denied, agent errored, interjected mid-execution, or a fresh ToolCall before the previous one finished), the chamber previously closed empty — just a top border and bottom border with nothing inside. Now it gets a small CRT-static signature inside: ╭─ WRITE_TODO_LIST ─ ... ──╮ │ ░▒░▓░▒▒░▓▒░▒░▓░▒▒░▓▒░▒░ │ │ ░▒▓ NO OUTPUT ▓▒░ │ │ tool denied · aborted · no result │ │ ▒░▓░▒▓░▒░▓▒░▓░▒▓░▒░▓▒░▓ │ ╰────────────────────────────╯ Two `static_row` patterns (alternating glyph runs) sandwich a centered `NO OUTPUT` label + reason. Reads as a "dead channel" rather than a silent empty rectangle. New helpers: `static_row(inner, seed)` builds the noise rows, `chamber_row_centered(content, inner)` horizontally centers labels inside the chamber. ## MODIFIED panel: left-truncate paths `src/clj/yourname/guestbook/…` hid the filename — the most useful information lived at the right edge. New module-level `left_truncate(s, max)` produces `…clj/yourname/foo.rs` so the filename always survives. Applied to the MODIFIED section's items before they reach `push_section` (which still does its own right-padding to fit the chamber width). ## Edit-tool diff threshold `edit` was only emitting a unified diff when both old and new sides were ≤ 20 lines. Larger edits silently dropped the diff — the chat showed `Applied edit to <path>` with no `+`/`-` lines, and the chamber renderer (which detects `--- a/`) fell back to the plain-text path. Threshold bumped to 200 lines per side; that covers virtually all edit-tool use without inflating LLM context for genuinely massive refactors. ## Test plan - [x] `cargo test --features plugin` -> 599 pass, 0 fail. - [x] Both build profiles -> 0 warnings. - [ ] Eyeball: deny a tool, verify the chamber shows the NO OUTPUT static rows; check the alert is fully closed; check MODIFIED filenames are readable; verify large edits show the colorized diff in the chamber. Co-authored-by: Yogthos <yogthos@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closed alert box (right borders on every row), CRT-static styled empty chambers when a tool errors/denies, left-truncated MODIFIED paths so filenames survive, and bumped the edit-tool diff threshold from 20 to 200 lines so meaningful diffs render. 599 tests pass, 0 warnings.