🤖 fix: make hidden-message indicators follow omission seams#2498
Merged
🤖 fix: make hidden-message indicators follow omission seams#2498
Conversation
Refactor truncation rendering to use a pure omission-segment planner, remove per-user hidden gap reminders, and harden deferred snapshot stale detection by row identity/order. Also updates truncation and message-utils tests for capped multi-segment history-hidden behavior and adds dedicated planner coverage. --- _Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.00`_ <!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.00 -->
Collaborator
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Member
|
Manually verified that a long chat appears to render more correctly after this change. |
github-actions bot
pushed a commit
that referenced
this pull request
Feb 19, 2026
The recent truncation refactoring (#2498) removed the truncation reminder JSX but left two near-identical <MessageWindow> return blocks (one for terminal output, one for user content) sharing the same 5 props. Merge into a single return with conditional children.
github-actions bot
pushed a commit
that referenced
this pull request
Feb 19, 2026
The recent truncation refactoring (#2498) removed the truncation reminder JSX but left two near-identical <MessageWindow> return blocks (one for terminal output, one for user content) sharing the same 5 props. Merge into a single return with conditional children.
github-actions bot
pushed a commit
that referenced
this pull request
Feb 19, 2026
The recent truncation refactoring (#2498) removed the truncation reminder JSX but left two near-identical <MessageWindow> return blocks (one for terminal output, one for user content) sharing the same 5 props. Merge into a single return with conditional children.
github-actions bot
pushed a commit
that referenced
this pull request
Feb 19, 2026
The recent truncation refactoring (#2498) removed the truncation reminder JSX but left two near-identical <MessageWindow> return blocks (one for terminal output, one for user content) sharing the same 5 props. Merge into a single return with conditional children.
github-actions bot
pushed a commit
that referenced
this pull request
Feb 20, 2026
The recent truncation refactoring (#2498) removed the truncation reminder JSX but left two near-identical <MessageWindow> return blocks (one for terminal output, one for user content) sharing the same 5 props. Merge into a single return with conditional children.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactors transcript truncation omission handling into an explicit planner that emits
history-hiddenmarker rows at omission seams, removes inline user-gap reminder rendering, and hardens deferred snapshot bypass logic so stale deferred ordering cannot temporarily misplace omission indicators.Background
The previous omission path mixed a single global marker with per-user hidden-gap reminders, which encoded placement policy in implicit loop state (
insertionIndex,pendingOmittedCount,consumedFirstOmittedRun). That made omission placement harder to reason about and produced edge cases where indicators felt disconnected from omitted runs.Implementation
buildTranscriptTruncationPlaninsrc/browser/utils/messages/transcriptTruncationPlan.ts:history-hiddenrows per run at seam positions,MAX_HISTORY_HIDDEN_SEGMENTS) by merging older runs to protect DOM size.StreamingMessageAggregatortruncation path to call the planner.hiddenCountBeforeUserfromDisplayedMessageuser type and removed inline reminder UI inUserMessage.shouldBypassDeferredMessages) to bypass when snapshots are same length but diverge in row identity/order.transcriptTruncationPlan.test.ts),Validation
make static-checkbun test src/browser/utils/messages/transcriptTruncationPlan.test.ts src/browser/utils/messages/StreamingMessageAggregator.test.ts src/browser/utils/messages/messageUtils.test.tsbun test ./tests/ui/chat/truncation.test.ts -t "shows a generic hidden indicator and preserves assistant meta rows"(environmental failure in this workspace:Cannot find module '@/version'from telemetry service import path)Risks
Generated with
mux• Model:openai:gpt-5.3-codex• Thinking:xhigh• Cost:$0.00