Skip to content

A joined answer envelope is read as the person's text: split it where a user frame becomes the model's event #704

Closed

Description

@SSFSKIM

The fault

MAWS delivers the answer to a non-blocking maws ask as a user frame at the engine's next step whose text is an envelope (a first line starting [MAWS ask <id>] , readable lines, a closing fenced json block). When that envelope and a person's prompt both wait at the next step, the engine joins them into ONE user message, exactly as it joins two prompts: when the turn ends by itself, and on Send now pressed before the call is a task. Recorded by a probe, every case twice: spikes/protocol-probe/findings-uxwave-u4b-envelope-join.txt and the fixtures spikes/protocol-probe/fixtures/uxwave/u4b-env-* (branch ux-wave/U4b-probes-2, merged into ux-wave/U4b). The joined text is the members in writing order with one newline between, each member's bytes intact, under the last-written member's uuid.

parseAskSteer (src/shared/maws/ask.ts) needs the tag at the text's start and the fence at its end, so it reads none of the joined texts, and every reader that hides or interprets an envelope does so only for a text that is all envelope. A joined message is therefore read as the person's own text, envelope and JSON included. This exists on master: the path where a person sends during a turn that then ends by itself needs nothing from the UX wave.

What the UX wave's U4b landing already fixes

A shared reader that finds the envelope(s) inside a user text and returns the rest (the shortest slice from the tag that parseAskSteer reads whole). It is used for: the transcript bubble (and, through derive, the owner report view and the desk web app's transcript), the answers recorded from a joined line (so a session read from the engine's file alone shows the capsule answered), Copy on a user row, the Edit prefill, the up-arrow history and the history search.

What is left (this ticket)

Readers of a user event's raw text that would still show or use the envelope for a joined message (a static reading at U4b's head; none was run):

  • an engine mod's UserMessage renderer (transcript/surface/adapters.ts, surface/Rows.tsx);
  • the hook-refusal Edit prompt (view/rows/Error.tsx, request-card/initiating-prompt.ts);
  • the rewind picker's line, the rewind prefill (the engine's own text; not checked against an engine) and the rewind boundary's tooltip;
  • the composer stack's "handed" row while the joined row is unread;
  • the search index and its snippet (engine-host/fs/search-text.ts, session-search.ts): whole envelopes are indexed today too;
  • the resume chooser's preview (services/sessions/recent-turns.ts): whole envelopes too;
  • /export (the engine's own text);
  • edge: a session's title, the title search and the desk's titles when the first prompt lies outside the head window and the engine's last-prompt fallback is a joined text;
  • edge, untraced: userTextOf runs the anchored-comment reader over the whole text when it holds an anchor tag, so an anchored comment joined with an envelope may swallow it or fail to frame;
  • personsText (src/shared/engine/…/backfill.ts) yields no answer arrival for a joined text on any route.

The fix this ticket asks for

One split at the place where a user frame or transcript line becomes the model's user event, on every route (live, read from the file, another machine's plane, the desk), so that no reader downstream ever holds the envelope as the person's text, and the per-reader calls U4b added can go. To design: whether the envelope becomes an event of its own (of today's shape, hidden as an all-envelope message is) or a field of the user event (a wire and stored-form question: events cross to other machines and older builds); what id and placement the split-out part gets; that rewind and the joined-message handling in the reducer keep addressing the message by its uuid; what the search index and the resume preview should hold for an answer (probably nothing).

Acceptance

Over the recorded joins (u4b-env-*), on each route: the person's message holds their own words only on every surface listed above; the ask's capsule reads answered with its answers; the not-joined control is unchanged; an older build receiving this build's events is unaffected.

Activity

  1. added
    bug
    status:ready-for-architect
    priority:P2
    status:in-design
    and removed
    status:ready-for-architect
    on Nov 15, 2026
  2. SSFSKIM commented on Nov 15, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-design: The execution document is being written on branch ux-wave/704-envelope-split (on the head of the U4b landing, which this fix builds on).

  3. added
    status:in-progress
    and removed
    status:in-design
    on Nov 15, 2026
  4. SSFSKIM commented on Nov 15, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: Document final after one adversarial review and the architect's rulings; probes 1 to 3 recorded and merged (32c5a24). Build starts: M1 to M3 on a tree that holds the joined-answer landing; lands after it.

  5. added
    status:in-review
    and removed
    status:in-progress
    on Nov 17, 2026
  6. SSFSKIM commented on Nov 17, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: Pull request open in the short form; Linux half (class 1a + the desk's web app) green on the head; the Mac half pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P2status:in-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions