Repository navigation
Fix stuck diff review, model-picker focus, retry loop, and missing /help - #124
Merged
Merged
Conversation
Fixes for P0/P1 findings from a beta-readiness audit:
- Diff review panel could get permanently stuck: any filesystem event
marked the review stale before the async git-status refresh it
triggered had landed, so the "press r to Refresh" recovery could
never catch up and the panel felt unclosable. Staleness is now only
flagged once the changed-path set is confirmed to differ; also
accept uppercase R as a refresh alias.
- /model picker made it impossible to tell which column (Providers/
Models/Effort) had keyboard focus: all three always bold-highlighted
their cursor row and "current" tag regardless of actual focus.
Tab/BackTab already cycled focus correctly — only the highlighting
was wrong. Now only the focused column highlights.
- Denying a tool approval let the model keep autonomously retrying for
up to max_turns (128) steps before yielding control back. Two
consecutive denials within a turn now stop it outright.
- Ctrl+U (standard "clear line") had no binding in the composer.
- /help returned "unknown command" even though the help overlay was
reachable via `?` on an empty composer; wired it up as an alias.
- A denied (never-executed) tool call rendered as "{tool} exited with
code unknown", contradicting the model's own "was not run" message
shown next to it. Now reads "was not run (denied or blocked)".
Each fix ships with a regression test. Full workspace test suite and
a release build both pass clean.
mohitranka
added a commit
that referenced
this pull request
Aug 21, 2026
…elp (#124) * Fix stuck diff review, model-picker focus, retry loop, and missing /help Fixes for P0/P1 findings from a beta-readiness audit: - Diff review panel could get permanently stuck: any filesystem event marked the review stale before the async git-status refresh it triggered had landed, so the "press r to Refresh" recovery could never catch up and the panel felt unclosable. Staleness is now only flagged once the changed-path set is confirmed to differ; also accept uppercase R as a refresh alias. - /model picker made it impossible to tell which column (Providers/ Models/Effort) had keyboard focus: all three always bold-highlighted their cursor row and "current" tag regardless of actual focus. Tab/BackTab already cycled focus correctly — only the highlighting was wrong. Now only the focused column highlights. - Denying a tool approval let the model keep autonomously retrying for up to max_turns (128) steps before yielding control back. Two consecutive denials within a turn now stop it outright. - Ctrl+U (standard "clear line") had no binding in the composer. - /help returned "unknown command" even though the help overlay was reachable via `?` on an empty composer; wired it up as an alias. - A denied (never-executed) tool call rendered as "{tool} exited with code unknown", contradicting the model's own "was not run" message shown next to it. Now reads "was not run (denied or blocked)". Each fix ships with a regression test. Full workspace test suite and a release build both pass clean. * fmt: apply cargo fmt to new test
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
…elp (#124) * Fix stuck diff review, model-picker focus, retry loop, and missing /help Fixes for P0/P1 findings from a beta-readiness audit: - Diff review panel could get permanently stuck: any filesystem event marked the review stale before the async git-status refresh it triggered had landed, so the "press r to Refresh" recovery could never catch up and the panel felt unclosable. Staleness is now only flagged once the changed-path set is confirmed to differ; also accept uppercase R as a refresh alias. - /model picker made it impossible to tell which column (Providers/ Models/Effort) had keyboard focus: all three always bold-highlighted their cursor row and "current" tag regardless of actual focus. Tab/BackTab already cycled focus correctly — only the highlighting was wrong. Now only the focused column highlights. - Denying a tool approval let the model keep autonomously retrying for up to max_turns (128) steps before yielding control back. Two consecutive denials within a turn now stop it outright. - Ctrl+U (standard "clear line") had no binding in the composer. - /help returned "unknown command" even though the help overlay was reachable via `?` on an empty composer; wired it up as an alias. - A denied (never-executed) tool call rendered as "{tool} exited with code unknown", contradicting the model's own "was not run" message shown next to it. Now reads "was not run (denied or blocked)". Each fix ships with a regression test. Full workspace test suite and a release build both pass clean. * fmt: apply cargo fmt to new test
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
…elp (#124) * Fix stuck diff review, model-picker focus, retry loop, and missing /help Fixes for P0/P1 findings from a beta-readiness audit: - Diff review panel could get permanently stuck: any filesystem event marked the review stale before the async git-status refresh it triggered had landed, so the "press r to Refresh" recovery could never catch up and the panel felt unclosable. Staleness is now only flagged once the changed-path set is confirmed to differ; also accept uppercase R as a refresh alias. - /model picker made it impossible to tell which column (Providers/ Models/Effort) had keyboard focus: all three always bold-highlighted their cursor row and "current" tag regardless of actual focus. Tab/BackTab already cycled focus correctly — only the highlighting was wrong. Now only the focused column highlights. - Denying a tool approval let the model keep autonomously retrying for up to max_turns (128) steps before yielding control back. Two consecutive denials within a turn now stop it outright. - Ctrl+U (standard "clear line") had no binding in the composer. - /help returned "unknown command" even though the help overlay was reachable via `?` on an empty composer; wired it up as an alias. - A denied (never-executed) tool call rendered as "{tool} exited with code unknown", contradicting the model's own "was not run" message shown next to it. Now reads "was not run (denied or blocked)". Each fix ships with a regression test. Full workspace test suite and a release build both pass clean. * fmt: apply cargo fmt to new test
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.
Summary
Fixes six findings (one P0, three P1, two P2/P3) from a hands-on beta-readiness audit of the Forge TUI. Each was reproduced live, root-caused in source, fixed, and verified with a new regression test plus a full test-suite run.
P0 — Diff review panel could get permanently stuck. Any filesystem event marked the review "stale" before the async git-status refresh it triggered had actually landed, so the panel's own "press r to Refresh" recovery could never catch up — it looked unclosable. Staleness is now only flagged once the changed-path set is confirmed to differ from what's under review. Also accepts uppercase
Ras a refresh alias (crates/forge-tui/src/{app/watch.rs,app/commands.rs,git_status.rs,app/render.rs}).P1 —
/modelpicker made it impossible to tell which column had focus. Providers/Models/Effort always bold-highlighted their cursor row and "current" tag regardless of which column actually had keyboard focus. Tab/BackTab always cycled focus correctly — only the highlighting lied about it. Now only the truly focused column highlights (crates/forge-tui/src/overlays.rs).P1 — Denying an approval could burn up to 128 model steps. A single denied tool call let the model keep autonomously searching for a workaround for up to
max_turns(128 by default) before yielding control back. Two consecutive denials within a turn now stop it outright with a clear message (crates/forge-core/src/lib.rs,crates/forge-core/src/subagent.rs).P2 — Ctrl+U (standard "clear line") had no binding in the composer (
crates/forge-tui/src/app/input.rs).P2 —
/helpreturned "unknown command" even though the help overlay was reachable via?on an empty composer; wired it up as a documented alias (crates/forge-tui/src/commands.rs,crates/forge-tui/src/app/commands.rs).P3 — Contradictory denial wording. A denied (never-executed) call rendered as "
{tool} exited with code unknown", contradicting the model's own "was not run" message right next to it. Now reads "was not run (denied or blocked)" (crates/forge-core/src/completion.rs).Not included
Two visual findings (a light-theme rendering artifact and a residual highlight-bleed edge case) were investigated but not fixed — root-caused to the terminal-output rendering layer rather than Forge's own style/buffer computation (verified via direct buffer inspection and passing unit tests), which needs deeper escape-sequence-level debugging out of scope for this PR.
Test plan
cargo test -p forge-tui --lib— 681 passedcargo test -p forge-core --lib— 130 passedcargo build --release --locked --package forge-cli— clean, 0 warnings