Skip to content

Backlog sweep: compact toggle and hunk jump fixes, opencode v1 temp file, docs sync - #434

Merged
umputun merged 16 commits into
masterfrom
backlog-sweep
Nov 4, 2026
Merged

umputun merged 16 commits into
masterfrom
backlog-sweep

Conversation

@umputun

@umputun umputun commented Nov 4, 2026

Copy link
Copy Markdown
Owner

fixes compact toggles during file switches and stale cross-file hunk jumps, isolates OpenCode v1 plan files, and syncs the plugin docs. Removes 12 addressed backlog items.

UI fixes

  • compact toggle (C) is ignored, with a status-bar hint, while a file other than the displayed one is loading. Before, C after n reloaded the old file and cancelled the pending one, so the tree and the diff pane showed different files. C during the first load flipped the mode while the load in flight used the old context
  • the cross-file hunk jump queued by ]/[ with --cross-file-hunks now carries the sequence of the load it was queued for. Before, the next accepted load applied it whatever file it was for, so a file-list reload (toggling untracked files) or a compact reload after a failed load moved the cursor to the first hunk of the wrong file. A failed load now clears it
  • dropped the firstVisibleInHunk(...) < 0 guards in moveToNextHunk and hunkStops. They could not trigger, and their comment claimed delete-only hunks were skipped in collapsed mode, which they are not

opencode v1

  • plan review writes the plan to plan.md in a private mkdtemp directory instead of /tmp/revdiff-plan-<session>.md, so two reviews of one session no longer share a file and another local user cannot pre-create it
  • tool description and plan plugin header list every terminal the shared launchers support

docs

  • codex usage.md synced with the claude copy (multi-file stdin, 64 MiB cap, signal-safe history save, the launcher env var sections)
  • agterm and Kaku added to both install references, agterm to site/llms.txt
  • --word-diff guidance in all three SKILL.md copies, kaku in both skill descriptions
  • CLAUDE.md bundled theme count corrected to 8

tests

  • the fake tmux gets a background new-window mode and a killed-window mode, so TestTmuxWindowWaitLoop runs the window wait loop in the claude, codex and plan-review launchers. Before, the fake finished the review inside new-window and the loop never ran
  • adds coverage for stepping back to the displayed file during a cross-file hunk load, and strengthens the existing test for hunk-jump precedence over --start-at-change

The codex usage.md had drifted: it still described --stdin as one
context-only file and lacked the multi-file stdin mode, the 64 MiB cap,
the signal-safe history save and the launcher env var sections
(REVDIFF_TMUX_WINDOW, REVDIFF_HERDR_PANE, REVDIFF_AGTERM_PANE,
REVDIFF_AGTERM_SIZE_PERCENT). The codex launcher copies carry all four
env vars, so the reference is now a copy of the claude one.
Both install.md copies left agterm out of the overlay terminal list, and
the claude copy also left it out of the terminals the osascript sandbox
restriction does not affect, while README and the site list it.
The supported-terminal line omitted agterm, the first backend the
launcher checks, so a model reading llms.txt answered no for it.
Eight gallery themes are bundled; CLAUDE.md said seven in two places.
README, the site and both config references already say eight.
None of the three SKILL.md copies mentioned --word-diff, so agents never
passed it. They now pass it for changes made mostly of small in-line
edits and skip it for changes that add or remove whole blocks.
README and the site list kaku beside wezterm; the two skill descriptions
listed wezterm alone.
…plugin

The v1 tool description and the plan-review plugin header named only
part of the terminals the shared launchers support, so the model
deciding whether to call the tool was told agterm, zellij, herdr and
cmux do not work. The opencode README already had the full list.
The plan went to /tmp/revdiff-plan-<session>.md, a name fixed by the
session id: two reviews of one session overwrote each other's file, and
another local user could pre-create the path. It now goes to plan.md in
a mkdtemp directory, removed with the directory once the review ends.
Pressing C after n (or any key that requests another file) reloaded the
file still on screen, which superseded the pending load: the tree
highlighted the new file while the pane kept the old one, with nothing
outstanding to bring them back together. C during the first load
flipped the mode while the load in flight used the old context.

The toggle now does nothing while a load of a file other than the
displayed one is outstanding, and the status bar says so. The
cross-file motion test that pinned the old reload is rewritten to
this contract: the toggle keeps the queued landing and the new file
lands with it.
With --cross-file-hunks, ] on a file's last hunk queued a landing for
the next file, and the next accepted successful load applied it, whatever
file that load was for. A load that failed left it armed. So a file-list
reload (toggling untracked files) that re-requested the displayed file,
or a compact reload after a failed load, moved the cursor to the first
hunk of the wrong file and skipped the compact anchor.

The landing now carries the sequence of the request it was queued for,
set after the request the way the cross-file motion landing is, and a
load with another sequence drops it. A failed load clears it.
moveToNextHunk and hunkStops skipped a hunk when firstVisibleInHunk
returned -1, commented as skipping delete-only hunks in collapsed mode.
That never happens: both pass findHunks starts, a delete-only hunk keeps
its first removed line visible as the placeholder, and a mixed hunk has
a visible add, so ] lands on delete-only hunks (pinned by
TestModel_CollapsedHunkNavigationDeleteOnly). The guards are removed
and firstVisibleInHunk's doc states that guarantee instead of the
false delete-only claim.
The fake tmux ran the review to completion inside new-window, so the
sentinel existed on the launchers' first check and the wait loop that
polls list-windows never ran: dropping the loop, or a loop that never
breaks, passed CI.

FAKE_TMUX_WINDOW_LIVE now runs the review in the background with
list-windows reporting the window while it lives, and
FAKE_TMUX_WINDOW_KILLED models a window gone without a sentinel.
TestTmuxWindowWaitLoop covers both for the claude, codex and plan-review
launchers, with a bounded run so a loop that never breaks fails instead
of hanging the package.
Both shared launchers drive kaku through kaku cli, but the v1 tool
description and the plan plugin header left it out, so the model was
told the overlay does not support it.
The overlay terminal lists and the sandbox note in the install
references left out Kaku, which the launchers support and README lists.
…le hunk load

] at a file's last hunk then [ before the next file lands steps the tree
back to the displayed file; crossFileForHunk then cancels the pending
load and queues no landing. Nothing pinned that branch.
…g apart

The 'pending hunk jump wins' fixture had a single change, so the
backward hunk landing and start-at-change both put the cursor on it and
the subtest passed whichever branch placed it. It now uses two hunks,
where the landing gives the last one and start-at-change the first.
Copilot AI balanced review requested due to automatic review settings November 4, 2026 06:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@umputun
umputun merged commit 507f8a3 into master Nov 4, 2026
7 checks passed
@umputun
umputun deleted the backlog-sweep branch November 4, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants