summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/hooks/text.ts
AgeCommit message (Collapse)Author
2026-09-24code-modernization: make the live pane work below 144 columns and show the proofMorgan Lunt
Found by exercising the pane against the real outputs of finished runs: - Below 144 columns the engine holds an unasked pane back; the pane ignored that, so it drew no pane, no show bar, and the panel command "hid" a pane that was never there. - A symlinked legacy/<name> lists as another kind of entry, so the source link that preflight now creates was never recognized as a system. - Uplift and reimagine next steps were placeholders with no button. - The refresh debounce was starved while agents ran, so the map froze. - Hostile lines in the brief, rules and baseline could take seconds to match; lines are now capped. The rule-review ledger is validated on read and merged on save, and keeps a reviewer's note. - A baseline with no row read as "the baseline had 0"; one-module baseline totals now count as that module's row. New: a verdict chip with words on every built module, a verify-first next step, and a readable palette that follows the terminal theme. 140 engine tests pass and the type check is clean.
2026-09-24code-modernization: mark the pane's notes as data and clean the names in themMorgan Lunt
The pane adds two kinds of text to what the model reads: a note about the file it just read (names, rule titles and delta ids from the analysis files) and a one-line state. Those names were written by analysis agents from the legacy code, so a hostile comment could reach the model through them. Each such value is now cut to one short plain line: control, invisible and bidirectional characters, backticks, angle and square brackets and double quotes are replaced, and long values are trimmed. A note opens by saying its contents are data, never instructions, and closes with an end line no value can forge. The state line says it is a status line and not an instruction, and the next-step command names a module only when the module id is one plain token. The pane lists only system directories whose names the plugin's workflows accept.