feat(config-settings): add __config_settings_frame shared renderer

The width tier, title-border arithmetic, ON/OFF/DEFAULT badge, cursor cell
and table row are currently hand-copied across the three draw functions.
This adds them once, with the two geometry identities derived rather than
hand-maintained: a row's chrome is a fixed 21 columns, so field_w is
iw - 21 - label_w (reproducing both iw-33 and iw-34), and a title border is
dashes = iw - visible(segment) - 1 (reproducing all three of iw-23,
iw-len-3 and iw-L-S-22).

The frame owns no page height. Every verb prints exactly one line or
fragment, so the fixed-16 category and value pages and the dynamic
7+n sub-category page keep their heights, and config-settings.fish's
erase is unaffected.

No caller yet, so rendering cannot move: the golden's existing page
section is byte-identical (verified with cmp -n over its previous size)
and the file only gains frame-verb cases appended after it.
This commit is contained in:
2026-09-07 20:00:59 -04:00
parent 574b235b6f
commit 2ac8e5c0d4
3 changed files with 263 additions and 0 deletions
+54
View File
@@ -4938,3 +4938,57 @@
│──────────────────────────────────────────────────│
│ type value Enter save Esc cancel ⌫ delete │
└──────────────────────────────────────────────────┘
### frame width cols=100
76
<END>
### frame width cols=88
72
<END>
### frame width cols=84
68
<END>
### frame width cols=70
50
<END>
### frame badge onoff val=on
 ON<END>
### frame badge onoff val=off
OFF <END>
### frame badge onoff val=DEFAULT
DEFAULT<END>
### frame badge onoff val=
DEFAULT<END>
### frame badge boolean val=true
 ON<END>
### frame badge boolean val=false
OFF <END>
### frame badge boolean val=DEFAULT
DEFAULT<END>
### frame cursor hit
▶ <END>
### frame cursor miss
<END>
### frame title toggle-page
┌─ Opinionated Settings ─────────────────────────────────────────────────────┐
<END>
### frame title subcat-page
┌─ Sub-categories: aliases (Universal) ──────────────────────────────────────┐
<END>
### frame title value-page
┌─ Sponge Settings ──────────────────────────────────────────────────────────┐
<END>
### frame row pad lw=12
│ ▶ Aliases [  ON ] cmd shadows │
<END>
### frame row cut lw=13
│ Notifications [  ON ] done, WakaTime hook │
<END>
### frame row cut lw=13 overlong
│ ▶ Notifications [  ON ] ls, cat, cd, du, │
<END>
### frame row shorten lw=12
│ ▶ Log dir [  ON ] /home/tester/very/long/scrollback/history/… │
<END>
### frame row shorten lw=12 empty
│ Log max [  ON ] │
<END>