You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/08/26 07:34:16 UTC

[I] fix(tui): a Host-started Turn in /side makes the copied parent transcript visible again [maka]

Astro-Han opened a new issue, #3881:
URL: https://github.com/apache/maka/issues/3881

   ## What happened
   
   A TUI side conversation is a Session copy that carries the parent's transcript. The driver hides it by recording `#hiddenTranscriptThroughTurnId` and filtering every transcript it hands the runner through `visibleTranscriptMessages()`. One path skips that filter.
   
   `packages/cli/src/runtime-host-session-driver.ts:1155` builds the attached Turn for a Host-started Turn with the raw `opened.messages`:
   
   ```ts
   const turn = {
     sessionId,
     turnId,
     events: opened.channel.eventsForTurn(turnId),
     messages: opened.messages,   // unfiltered
     summary: projectSessionCatalogSummary(configuration.session),
   } satisfies MakaAttachedSessionTurn;
   ```
   
   Every sibling applies the filter — `switchSession` at line 563, the transcript-replacement subscriptions at lines 251 and 1243 — so this is the one gap rather than a deliberate exception.
   
   `packages/cli/src/pi-tui-runner.ts` then replaces the visible transcript with exactly those messages when it adopts the attached Turn, so the parent conversation the user opened `/side` to get away from reappears in full.
   
   Expected: `/side` shows only what happened inside the side conversation, on this path as on the others.
   
   ## How to reproduce
   
   1. Start the TUI on a Session that already has several Turns.
   2. Run `/side` to open a side conversation.
   3. Confirm the transcript is empty, as intended.
   4. Cause a Host-started Turn to arrive on the side Session — the reattach path at `runtime-host-session-driver.ts:1155`, e.g. reconnecting while a Turn is running there.
   5. The transcript is replaced with the copied parent transcript.
   
   Deterministic once step 4 is reached; the difficulty is arranging a Host-started Turn rather than a client-started one.
   
   ## Environment
   
   - Maka version or commit: `origin/main` (present since #3759, which introduced both sides of this path)
   - OS and version: platform-independent
   - Surface: TUI
   - Node.js version, if running from source: n/a
   
   ## Logs, screenshots, or additional context
   
   Found while reviewing #3803; not attributable to that PR — `git log -S` puts both the unfiltered `messages: opened.messages` and the runner's transcript replacement before its base commit.
   
   The fix is to route this path through the same filter the siblings use:
   
   ```ts
   messages: visibleTranscriptMessages(opened.messages, this.#hiddenTranscriptThroughTurnId),
   ```
   
   Worth landing after #3760, which is open against the same two files.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [I] fix(tui): a Host-started Turn in /side makes the copied parent transcript visible again [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han closed issue #3881: fix(tui): a Host-started Turn in /side makes the copied parent transcript visible again
URL: https://github.com/apache/maka/issues/3881


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org