docs(vt): slice-1 contract amended from the Part B reviews (text onclick, auto width, no header); review ledger

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-09-06 20:34:18 +02:00
parent dc91245ba8
commit 054bf32605

View file

@ -84,24 +84,29 @@ B1. Markup, exactly doc 08 §3's proposal: `<list>` accepts child
`<column type="text|check|icon" width="…" [iconkind] [colors]/>` elements,
each binding its own per-row source parallel to the row count (per-attribute
binding like every other element; no new `Plugin.Abstractions` type):
`items="{IReadOnlyList<string>}"` for text, `values="{IReadOnlyList<bool>}"`
`items="{IReadOnlyList<string>}"` for text (plus an OPTIONAL
`onclick="{Action<int>}"` that fires INSTEAD of selecting — review finding:
none of VTank's eight lists uses row selection, every text cell is an action
target, `PluginCore.cs:7948-8089`), `values="{IReadOnlyList<bool>}"`
+ `onchange="{Action<int>}"` (row index; the plugin flips its own bool) for
check, `values="{IReadOnlyList<uint>}"` + `iconkind` + `onclick="{Action<int>}"`
for icon. Row count = the longest bound column; short columns draw empty
cells. The list's own `selected`/`onchange` stay as today; a click in a
check/icon column fires that column's callback and does NOT change
selection; a click in a text column selects. No header row (VTank's idiom
is `<label>`s above the list; document it). Per-column widths in px, the
last column absorbs the remainder, per-cell horizontal clipping, scrolling
as today. Without `<column>` children the element is byte-for-byte the old
is `<label>`s above the list; document it). Per-column widths in px; `width="*"` marks an auto column and all auto
columns share the remainder equally (VVS's rule, `Decal3XMLParser.cs:409-418`),
the last column absorbing the rounding slack; a non-last column with a
missing/non-positive width throws at Build; per-cell horizontal clipping;
scrolling as today. Without `<column>` children the element is byte-for-byte the old
single-column list (existing `items`/`icons`/`colors` attributes unchanged).
B2. Widget: extend `UiMarkupList` (or a sibling) — draw header, per-cell
text/check/icon, hit-test to (row, column), keyboard-free. Icons through the
B2. Widget: extend `UiMarkupList` (or a sibling) — per-cell
text/check/icon (no header row; B1 governs), hit-test to (row, column), keyboard-free. Icons through the
existing `IMarkupIconResolver` with the column's `iconkind`.
B3. Docs: `docs/plugin-ui-markup.md` section for columns; remove the
"single text column" limitation note.
Tests: parse + binding-type tests, draw-level tests with the recording
renderer (column x-offsets, header, check glyph, icon per row), hit-test
renderer (column x-offsets, check glyph, icon per row), hit-test
tests for cell clicks, and a MossTank markup contract test proving the
existing single-column lists still bind.
@ -115,3 +120,6 @@ under WSL if available).
## Out of scope
Rebuilding the tabs on the new columns (slice 7, visual gate), any behavior
change in combat/buff/loot/nav (slices 2-6).
## Ledger
- 2026-09-06 Part B landed on `worktree-agent-a4da5c8764f9e7f71` at `959a69482` (6 files, 27 tests). Opus architecture lens: APPROVE-WITH-FIXES (row-bound guard on callbacks, try/finally clip, column-identifying binder contexts, per-frame allocations, width silent-zero, contract test unaware of `<column>`, shared lamp helper). Opus fidelity lens: REJECT — text columns had no per-cell callback (VTank never uses row selection), missing width silently hid the Meta tab's condition column, single-absorber vs VVS's equal-share auto width, short check columns drew nothing, no Meta/Monsters-shaped end-to-end test, no pitch convention. Both lists folded into one fix round (11 items) dispatched on the same worktree; B1 amended above (text `onclick`, `width="*"`), B2's stray "draw header" struck.