Repository navigation
Conversation
…niture OpenCode 1.18.31 draws the worker pane's working directory and branch right-aligned inside the left-bar composer rows above the Build footer, wrapped over up to three rail-width fragments whose final fragment continues onto the footer row's right end. The fragments are RGB 128 grey with luminance exactly on the ghost-luma ceiling, so they survive ghost stripping, and the left-bar classifier read them as unsent typed text: every idle 1.18.31 pane answered pending, which skipped the steering doorbell, the watcher's re-ring ladder, and /exit typing. _fm_composer_leftbar_cwd_start recognises the run structurally and position-gated: contiguous single-token rows immediately above the footer row whose gap after the bar exceeds half the row, whose fragments plus the footer row's gap-separated right-hand tail concatenate to a path, optionally followed by :<branch>. A path-shaped string typed at the composer's left edge is still typed text, so a wrong call can only defer, never inject. Extraction shares the same rule so extracted composer content stays user-scoped.
…st-fragment check
|
Speaking as Kun's firstmate: this is waiting on the author. HEAD Attestation: MISSING — PR body has no Contract-class: restore — inspected tip vs main on VISION (per rule):
Closing align/resist: deepens peace of mind by restoring fleet steering on a vendor TUI change; resists injecting on ambiguity. First-time fork CI: after full diff review I approved workflow runs Security FYI (not a captain gate): widening what reads Waiting on you: |
Review round on the independent PR review: the position gate now measures the gap against the region's width (the widest trimmed plain row across first..last), so a short space-prefixed home path typed into an otherwise empty composer no longer reads empty; the right-half lone-token residual is pinned explicitly. The cwd:branch furniture is documented as present since OpenCode 1.18.0 (upstream anomalyco/opencode#36457, merged 2026-07-11), not a 1.18.31 layout change. The 1.18.30 capture comment notes it omits the directory footer, and a cropped-composer extraction assertion scopes user content to the typed row above the rail.
…re, including absolute paths (#7307) * fix(composer): treat OpenCode >= 1.18 right-aligned cwd:branch as furniture OpenCode 1.18.31 draws the worker pane's working directory and branch right-aligned inside the left-bar composer rows above the Build footer, wrapped over up to three rail-width fragments whose final fragment continues onto the footer row's right end. The fragments are RGB 128 grey with luminance exactly on the ghost-luma ceiling, so they survive ghost stripping, and the left-bar classifier read them as unsent typed text: every idle 1.18.31 pane answered pending, which skipped the steering doorbell, the watcher's re-ring ladder, and /exit typing. _fm_composer_leftbar_cwd_start recognises the run structurally and position-gated: contiguous single-token rows immediately above the footer row whose gap after the bar exceeds half the row, whose fragments plus the footer row's gap-separated right-hand tail concatenate to a path, optionally followed by :<branch>. A path-shaped string typed at the composer's left edge is still typed text, so a wrong call can only defer, never inject. Extraction shares the same rule so extracted composer content stays user-scoped. * no-mistakes(review): drop dead footer-tail concat, add live short-cwd fixture * no-mistakes(review): accept only ~/ cwd rail; lone slash stays pending * no-mistakes(review): require footer row for leftbar cwd furniture walk * no-mistakes(review): Require topmost cwd fragment to carry ~/ prefix * no-mistakes(document): Correct cwd furniture recognition doc to topmost-fragment check * fix(composer): gate cwd rail on region width; correct version story Review round on the independent PR review: the position gate now measures the gap against the region's width (the widest trimmed plain row across first..last), so a short space-prefixed home path typed into an otherwise empty composer no longer reads empty; the right-half lone-token residual is pinned explicitly. The cwd:branch furniture is documented as present since OpenCode 1.18.0 (upstream anomalyco/opencode#36457, merged 2026-07-11), not a 1.18.31 layout change. The 1.18.30 capture comment notes it omits the directory footer, and a cropped-composer extraction assertion scopes user content to the typed row above the rail. * no-mistakes(document): correct OpenCode cwd-furniture version framing and doc typos * fix(composer): accept an absolute cwd rail outside $HOME as OpenCode furniture Refs #4632, builds on #5030. * no-mistakes(review): Harden live abs-cwd check waits and qualify rail comment * no-mistakes(review): Fix composer-lib relative path in OpenCode harness doc * no-mistakes(test): Relax live check's DONE wait for wide OpenCode panes * no-mistakes(document): Separate absolute-cwd verification output block from following prose --------- Co-authored-by: Konrad Heimel <[email protected]>
|
Speaking as Kun's firstmate: thank you @konih. Your cwd:branch rail fix has landed as part of #7307 (squash |
Summary
Since OpenCode 1.18.0 (upstream anomalyco/opencode#36457) the idle left-bar composer draws the pane's working directory and git branch right-aligned inside the composer rows above the
Build · <model>footer, wrapped over up to three fragments with the tail continuing onto the footer row. The shared composer classifier inbin/fm-composer-lib.shread those fragments as unsent typed text, so every idle OpenCode 1.18.x tmux worker answeredpending. That skipped the steering doorbell infm-send, the watcher's re-ring ladder, and the typed/exitinfm-control.sh exit|relaunch: idle workers could not be steered or stopped without typing into the pane by hand. This change teaches the left-bar classifier to recognise that rail structurally and skip it, so an idle pane readsemptyagain while every ambiguous shape still defers.Changes
Classifier (
bin/fm-composer-lib.sh)_fm_composer_leftbar_cwd_startfinds the rail inside a left-bar region and returns its top row, or nothing. Recognition is structural and position-gated, never a match on a specific path:~/. The prefix is checked on that fragment's own bytes, so a typed lone~above a rail starting with/cannot be assembled into a false~/._fm_composer_classify_leftbarandfm_composer_extract_selected_contentskip the recognised rows, so idle panes reademptyand extraction no longer returns rail fragments as user content./is deliberately not accepted as a rail start: it is the first keystroke of a slash command and must never readempty. A worker whose cwd is outside$HOMErenders a/...rail and therefore keeps the old conservativepending.FM_COMPOSER_GHOST_LUMA_MAX. The rail is drawn in RGB 128 grey, exactly on the ghost-luma ceiling, which is why ghost stripping never removed it.Tests and fixtures
#{cursor_y}) undertests/fixtures/opencode-1.18.31-cwd/: a long cwd:branch wrapping over three rows, and a short one occupying a single row directly above the footer (the rail is bottom-aligned, leaving blank bar rows above it).test_matrix_opencode_leftbar_cwd_furnitureintests/fm-composer-lib.test.shpins:emptyon both fixtures with the cursor inside the rail and on the cropped cursorless profiles;pendingfor left-edge typed prose, a left-edge typed path, a lone/, a lone~above an outside-$HOMErail, a space-prefixed short~/a, a right-aligned non-path token, and a bare branch fragment with no path start; extraction scoped to the typed row only; and the one accepted residual described under Notes.Docs
docs/verification/runtime-backends.md: dated 2026-09-18 entry with the live before/after read (pendingthenempty) on real fleet panes, the RGB 128 finding, and the upstream version history.docs/tmux-backend.md: describe the rail as furniture present since 1.18.0 and note the cursorless deferral below.Testing
bash tests/fm-composer-lib.test.sh: 36 pass, including the new matrix test. Against the pre-fix library the new test fails withexpected empty, got 'pending', so it is a real regression test.bash tests/fm-composer-ghost.test.sh: 33 pass.HOME, worktree whose path wraps the rail) and its rendered composer fed to the real classifier: idle long railempty(pre-fixpending); short railempty; typed left-edge prose, lone/, lone~, space-prefixed~/a, and an outside-$HOMEidle rail allpending. Extraction on the idle pane returns nothing instead of the fragments.fm_tmux_composer_staterun read-only against three real idle fleet panes on tmux:pendingbefore the fix,emptyafter.Not verified:
fm-senddoorbell andfm-control.sh exit) end to end against a live 1.18.x pane. Only the classifier verdict those commands consume was checked.unknown, because the status rail below the composer floor is contiguous non-blank content the cursorless selector refuses to outrank. This change does not repair that; it is a separate follow-up.test_matrix_opencode_leftbar_signalsshows the placeholder hint but no rail. The test comment offers two possible reasons; neither has been confirmed against the upstream source.Notes
~/...token typed so far right that it starts beyond the region's midpoint readsempty. Every other misfire path defers topendingorunknown. Tightening this further is a deliberate classifier change, not drift.$HOMEremain unsteerable on OpenCode 1.18.x, since their rail starts with/and keeps the conservativepending. Every evidenced fleet pane renders~/...; widening to absolute paths would need a stronger position proof.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
docs/tmux-backend.md:75- This sentence, added by this branch, still attributes the cwd:branch furniture to OpenCode 1.18.31 specifically ("OpenCode 1.18.31 also draws its working directory and branch..."), which is the version framing the captain's decision (1) requires replaced with "present since 1.18.0 (observed live on 1.18.31)". Every other file the decision enumerated (bin/fm-composer-lib.sh, the harness-adapters OpenCode reference, docs/verification/runtime-backends.md, the 1.18.30 test comment) was corrected, but this sibling doc line keeps the old story. Mechanical factual correction: say the furniture is present since OpenCode 1.18.x and was observed live on 1.18.31.bin/fm-composer-lib.sh:1262- Known, authorized residual, noted rather than flagged for action: the region-width gate (indent*2 > width, width = max trimmed plain row over first..last) still recognizes a lone whitespace-free~/...token typed far enough right as cwd furniture, so that composer readsempty. Traced concretely: the test's 200-space row has indent 200 and is itself the widest row (width 210), so 400 > 210 passes andfm_composer_classify_screenreturnsempty. The captain's own prescribed algorithm (width = max trimmed plain row length over the region) necessarily yields this, and the branch pins it explicitly with a comment calling it the accepted residual, so this is intentional containment rather than an unaddressed defect. Every other misfire path (left-edge typed text, path-shaped left-edge text, lone~, lone/, non-path right-aligned tokens, outside-$HOME rails) was verified to defer to pending/unknown.✅ **Test** - passed
✅ No issues found.
emptyby the real classifier (steering doorbell no longer skipped)pending(the reported bug reproduced end-to-end)pending(never treated as empty/injectable)/typed as the first keystroke of a slash command never readsemptyon a live OpenCode pane~above a rail whose top fragment starts with/(outside-$HOME cwd) does not assemble a false~/and stayspendingempty(no false pending for short paths)pending(accepted trade-off, neverempty)fm-send) rings against a live tmux OpenCode 1.18.31 worker throughfm_tmux_composer_statecommand -v tmuxempty) and no herdr binary is present, so the tmux capture-pane/cursor adapter and the fm-send doorbell could not be driven against a live pane. T…opencode --version-> 1.18.31 (installed at ~/.no-mistakes/bin/opencode)Drove the real OpenCode 1.18.31 TUI in a non-zero pty (272x70 via TIOCSWINSZ) under an isolated HOME and a git worktree whose path wraps the cwd:branch rail; captured the rendered grid and per-cell truecolorRan the realfm_composer_classify_screenwith tmux caps (styled=1 cursor=1 identity=1) and cursor row 64 against the live idle capture: fixempty, basependingAdversarial live typed cases against the same live rail: left-edge prosepending; lone/pending; lone~pending; space-prefixed~/apendingLive idle worker whose cwd is outside $HOME (rail starts with/): fixpending(documented conservative trade-off), typed lone~above itpendingLive short cwd:branch that fits entirely on the footer row (tmux palette):emptyRanfm_composer_extract_selected_contenton the live idle capture (cursorless): fix[], base returns the furniture fragmentsbash tests/fm-composer-lib.test.sh(after fix) -> all passbash tests/fm-composer-lib.test.shagainst the pre-fix library ->not ok - opencode 1.18.31 idle cwd:branch furniture on tmux: expected empty, got 'pending'bash tests/fm-composer-ghost.test.sh-> all passbash tests/fm-composer-matrix-live-e2e.test.sh-> skipped (opt-in; needs tmux, which is not installed)Read the corrected version framing in bin/fm-composer-lib.sh, .agents/skills/harness-adapters/references/harness/opencode.md, docs/tmux-backend.md, docs/verification/runtime-backends.md; confirmed noabsent on 1.18.4/from 1.18.31/>= 1.18/ footer-tail-concat-knob remnants✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.