Skip to content

feat(tui): clickable pane-border toggle in the modeline - #1308

Merged
edwin-zvs merged 5 commits into
mainfrom
modeline-border-toggle
Aug 25, 2026
Merged

edwin-zvs merged 5 commits into
mainfrom
modeline-border-toggle

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

What

/border was the only way to flip the pane side borders. This adds a click affordance for it in the modeline status bar.

It lives inside the theme notice's own group rather than as a notice of its own:

 theme:matrix ║ | ● remote:0 | 0.17.10      borders shown
 theme:matrix ╎ | ● remote:0 | 0.17.10      borders hidden

Both controls govern how the views look, so they read as one cluster. Hover bolds the glyph and shows a tooltip (Pane side borders shown. Click to hide).

Glyph choice

The glyph pictures the state it is in, which is what lets it go unlabelled in a row of otherwise-labelled notices.

The obvious pick — a light vertical │ — turned out to be unusable: the notices are joined by " | ", and │ is indistinguishable from that ASCII pipe in most terminal fonts, so the control vanished into the punctuation. ║ / ╎ depict the same border while staying visibly unlike a separator. Both stay box-drawing characters, so they render at the single-cell width the hit rect is measured at.

The click stays silent

/border still acks in the status area; the click does not.

A transient status renders on the left of the modeline and preempts the right-aligned notice block whenever the two collide on a narrow terminal — which would blank the very glyph just clicked, and drop its hit zone, until the status expired. CycleTheme skips its status for exactly this reason (see cycle_theme_keeps_persistent_notices_clickable). The click has its own feedback anyway: the glyph swaps on the next frame.

Tests

New modeline_border_glyph_toggles_pane_side_borders covers the hit zone landing adjacent to the theme label, the glyph tracking state, the tooltip, the click flipping the same state /border does, and the click staying silent.

Three existing tests pinned the modeline's literal notice run (theme:matrix | ○ remote | …) and are realigned for the glyph now sitting inside it.

Full workspace suite green apart from one pre-existing, unrelated failure — availability::auto_unavailable_when_only_a_subscription_credential_exists fails on any machine exporting OPENROUTER_API_KEY, which became an auto-rung credential in #1303 but was never added to that test's scrub list. Passes with the key unset, so CI is green. Happy to send a one-line fix separately.

Binaries

Only crates/cli is touched → the relevant binary is construct:

/Users/moon/agentd/.claude/worktrees/modeline-border-toggle/target/debug/construct

`/border` was the only way to flip the pane side borders. Add a
click affordance for it in the modeline status bar, inside the theme
notice's own group (`theme:matrix │`) rather than as a notice of its
own: both control how the views look, so they read as one cluster —
and a bare vertical rule standing alone between the " | " notice
separators would read as a separator rather than a control.

The glyph pictures the state it is in — │ while the pane sides are
drawn, ┆ once they are hidden — which is what lets it go unlabelled in
a row of otherwise-labelled notices. Both are box-drawing characters,
so they render at the single-cell width the hit rect is measured at.

The click path stays silent where `/border` still acks in the status
area. A transient status renders on the left of the modeline and
preempts the right-aligned notice block when the two collide on a
narrow terminal, which would blank the very glyph just clicked, and
drop its hit zone, until the status expired. CycleTheme skips its
status for the same reason.
…parators

A single light vertical (│) is indistinguishable from the ASCII pipe
the notices are joined by, so the control vanished into the
punctuation. ║ / ╎ depict the same border while staying visibly
unlike a separator.

Also realigns the two tests that pin the modeline's literal notice
run, which the glyph now sits inside.
@edwin-zvs

Copy link
Copy Markdown
Contributor Author

Rendering

Modeline, both states — recorded with vhs against this branch's construct:

Top: borders shown (theme:matrix ║ | ○ remote). Bottom: borders hidden (theme:matrix ╎ | ○ remote).

The glyph reads as a control rather than punctuation in both states — which was not true of the light vertical │ this started as, where it was indistinguishable from the " | " separators on either side.

Full frame with the borders drawn, showing the toggle actually taking effect on the panes:

(Media committed at 7922c3e and removed in the following commit; refs/pull keeps the blobs reachable.)

@edwin-zvs
edwin-zvs merged commit 776a1c8 into main Aug 25, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the modeline-border-toggle branch August 25, 2026 16:49
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.

1 participant