Skip to content

🤖 fix: stabilize /btw transcript placement#3393

Open
ammar-agent wants to merge 1 commit into
mainfrom
fix/btw-scroll-hold-placement
Open

🤖 fix: stabilize /btw transcript placement#3393
ammar-agent wants to merge 1 commit into
mainfrom
fix/btw-scroll-hold-placement

Conversation

@ammar-agent
Copy link
Copy Markdown
Collaborator

Summary

  • Fixes recurring /btw transcript tail stickiness by making side-question display placement explicit and by limiting scroll ownership to valid interrupted branches.

Background

  • /btw rows are durable history, but interrupted /btw branches are projected into the interrupted assistant message by the renderer. The previous display walk decided inline ownership during rendering, and scroll hold logic only looked at broad isSideQuestion / isSideAnswer flags. That made standalone or stale side-question rows eligible for sticky scroll behavior.

Implementation

  • Adds display-only sideQuestionBranch placement metadata for /btw user and assistant rows.
  • Precomputes a side-question display plan before rendering transcript rows so anchored /btw rows are emitted exactly once inside the interrupted assistant split.
  • Validates interruptedHistorySequence when present to avoid splitting stale anchors.
  • Makes side-question scroll hold require interrupted placement and expire once the side answer and interrupted main message have both settled.

Validation

  • bun test src/browser/utils/messages/StreamingMessageAggregator.sideQuestion.test.ts
  • bun test src/browser/components/ChatPane/sideQuestionScrollHold.test.ts
  • bun test src/browser/stores/WorkspaceStore.test.ts --test-name-pattern "/btw|side-question|side answer"
  • bun run typecheck
  • make static-check

Risks

  • Moderate localized risk around transcript projection and /btw scroll behavior. Legacy side-question answers without questionMessageId still use the existing adjacency fallback; stale or mismatched anchors now render chronologically instead of splitting an unrelated assistant row.

Generated with mux • Model: openai:gpt-5.5 • Thinking: xhigh • Cost: $31.98

@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 353238ff8a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/components/ChatPane/sideQuestionScrollHold.ts Outdated
@ammar-agent ammar-agent force-pushed the fix/btw-scroll-hold-placement branch from 353238f to ebe981c Compare May 26, 2026 22:39
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the scroll-hold initialization issue by tracking standalone/stale /btw question IDs as seen, and added a regression test for rows that first render standalone and later become interrupted.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebe981c79b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/utils/messages/StreamingMessageAggregator.ts
@ammar-agent ammar-agent force-pushed the fix/btw-scroll-hold-placement branch from ebe981c to 0b7d3cc Compare May 26, 2026 22:46
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the hidden-owner case by excluding hidden synthetic assistant anchors from the inline /btw display plan, so side-question rows remain visible chronologically when their split owner will not render. Added regression coverage.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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