Repository navigation
fix(desktop): map branch targets through folded rows - #136209
Open
normaltank wants to merge 1 commit into
Open
normaltank wants to merge 1 commit into
normaltank wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
What does this PR do?
Fixes branch-from-message truncation when the clicked renderer bubble corresponds to a later source row inside a folded authoritative assistant message.
The hydrated transcript can fold several persisted assistant/tool rows into one bubble. The bubble keeps the first row as its top-level
rowId, while each text part retains its ownsourceRowId.selectBranchMessages()previously checked only the top-level ID, so a click on a later folded row could fail both mapping strategies and silently seed the child from the shorter renderer-local prefix.This change maps the clicked bubble against every durable row represented by both bubbles (top-level
rowIdplus partsourceRowId). The existing same-role/text ordinal and local-prefix fallbacks remain unchanged.Related Issue
Fixes #136193
Type of Change
Changes Made
apps/desktop/src/app/session/hooks/use-session-actions/utils.tsto match branch targets through folded part source rows.utils.branch.test.tswith a focused regression where the local clicked row is represented only by an authoritative partsourceRowId.How to Test
npx vitest run --project ui src/app/session/hooks/use-session-actionsfromapps/desktop.Additional validation:
npx tsc -p apps/desktop/tsconfig.json --noEmitgit diff --checkpython scripts/check --only footguns,shebangs,no-tmp,config-writers,os-marker-fakes,case-collisions,profile-archives,ruff --base origin/main(8 checks passed)The full
scripts/checkhealth measurement was attempted, but its unchanged-basegit grepscan timed out after 120 seconds in this sparse CI workspace; it did not report a code-health regression. The full Python suite was not run because this is a Desktop TypeScript-only change.Checklist
Code
pytest tests/ -qand all tests pass (not run; Desktop TypeScript-only change)python scripts/checkpasses (8 applicable checks pass; health measurement timed out as documented above)Documentation & Housekeeping
cli-config.yaml.example: N/ACONTRIBUTING.md/AGENTS.md: N/AScreenshots / Logs
Focused behavior evidence:
AI assistance disclosure: Codex investigated the issue, implemented the patch, added the regression test, and ran the validation listed above. No human code review is claimed.