Repository navigation
feat: expose stable reasoning block IDs for per-card controls - #82
Merged
Merged
Conversation
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.
Why
The reading view gives display transformers an opaque
blockKey, but its reasoning DOM roots do not expose that identity. An extension adding a per-card original/translated control cannot reliably associate a visible card with the right transform request: separate blocks can have identical text, cards can move, and one reasoning card can group multiple blocks. A global toggle is not a substitute for a per-card control.Changes
blockKeyintoReasoningStreamin both transformed and untransformed paths.data-reader-reasoning-block-keyon the reasoning text root.This does not change React keys, text, session records, layout, or the native conversation view. It adds no translation dependency and is independent of the example/docs PR #75.
Validation
npm run typecheck: passed.npm test -- tests/reasoning-block-key.test.ts tests/text-transform.test.ts: 15 passed.git diff --check: passed.tests/skill-status.test.ts; this patch does not modify that code/test.check:harnesswas unavailable because the Harness source-pointer configuration is absent. This is not a claim that compatibility verification passed.The new tests use isolated hooks/presentation mocks and exercise the actual component paths and transform registry; they are not browser lifecycle or end-to-end UI tests.
This small identity seam is consumed by the independent
dsh-cot-translation-readeradapter to make each card's original/translation button affect only its own reasoning blocks, without matching text or guessing DOM order.