Skip to content

Speak dialog choices in plain English, not renderable names - #353

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-5586-dialog-result-text
Aug 7, 2026
Merged

Speak dialog choices in plain English, not renderable names#353
TheGreatAxios merged 2 commits into
mainfrom
cl-5586-dialog-result-text

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • acceptOverlaySelection's echo built its transcript line from the internal overlay kind and raw item label, so a settings choice printed overlay chose (settings): compaction summarize ‹ drop › — the renderable name overlay, a state-transition shape, and the cycled field's own ‹ › selection markers all leaked straight to the operator.
  • Replaced it with overlayChoiceText, which names the field by its stable id and reports only the value that won (Set compaction to drop.), and overlayKindWord, which puts the overlay's kind in the meta column as a plain word instead of the literal overlay. Same path covers settings, permissions, and operator dialogs.
  • The free-text answer echo (answered: …) had the same meta: "overlay" leak; fixed to use the overlay kind.
  • Audit turned up one more leak: the goal/task/agents visibility toggles labelled themselves with the internal "chrome" zone name (goal chrome off, meta: "chrome"). Reworded to goal banner off / task banner off with a meta matching the zone (goal, task, agents).

Verification

  • Added a failing-first test (command-surfaces.test.ts) asserting the settings echo reads Set compaction to drop. with no overlay meta and no ‹ › markers.
  • Rendered before/after through withTestRenderer:
    • Before: chose (settings): compaction ‹ summarize › drop / meta: "overlay"
    • After: Set compaction to summarize. / meta: "settings"
  • bun run typecheck, bun run build, bun run test (3948 pass, 0 fail) all green.

Closes CL-5586

@linear-code

linear-code Bot commented Aug 7, 2026

Copy link
Copy Markdown

CL-5586

Accepting a settings or approval dialog echoed its internal overlay
kind and label straight to the transcript: "overlay    chose
(settings): compaction    summarize ‹ drop ›". The word "overlay"
named a renderable no operator knows, the "chose (kind): label"
shape read as a state transition, and a cycled field's own selection
markers survived into the line.

Build the echo from the field's id and the value that actually won,
worded as a sentence a person would say, and use the overlay's kind
as its meta column instead of the literal word "overlay". The same
path serves settings, permissions, and operator dialogs.

Also stop labelling the goal/task/agents visibility toggles with the
internal "chrome" zone name in their transcript text and meta.
overlayChoiceText recovered a cycled field's winning value by
regex-matching the ‹ › markers back out of its rendered display
label. That is scraping a paint artifact for data the caller already
had: cycleField builds the label from a known activeId and option
list, so the marker glyphs, spacing, or a label that legitimately
contains ‹/› could silently fall through to the raw-label branch and
reprint the exact marker-laden string this fix exists to remove.

Add itemValues alongside itemIds on the overlay open path, threaded
through OverlaySelection as an optional value, and have the settings
surface supply each cycled row's active option label directly. The
echo now reads that value; no parsing of the painted string remains.
@TheGreatAxios
TheGreatAxios force-pushed the cl-5586-dialog-result-text branch from bea8f72 to 86eec83 Compare August 7, 2026 07:30
@TheGreatAxios
TheGreatAxios merged commit b695c4d into main Aug 7, 2026
2 checks passed
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