Repository navigation
Conversation
This was referenced Sep 16, 2026
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.
Evaluate each selected-passage action using its full prompt wrapper, the existing composer separator rules, and the actual 16,384-character page limit. Disable only actions that would overflow, explain how to recover, and recompute as the draft changes. Exact fits and slash-command replacement remain available.
Why this matters
Selecting text in an assistant reply and choosing Explain/Tone can currently append onto a nearly full draft and make it unsendable. The selection-length guard only bounds the passage itself; it never accounts for the existing draft or generated wrapper.
Behavioral invariant: A selection action never makes the composer exceed its page limit, silently truncates a passage, discards the existing draft, or consumes the selection when insertion is unavailable.
Overlap check
Searched all states for selected text capacity, selection composer limit and PixelSelectionActions length, plus PixelSelectionActions.jsx/Pixel.jsx history. #4445 concerns touch selection events. #4951 protects prompt/file insertion and #5494 advice insertion; neither passes draft capacity into the separate selected-passage toolbar. This retains their independent entry boundaries and the same shared separator semantics. Batch #5531 changes only Markdown code rendering in Pixel.jsx.
Production/test paths:
ods/extensions/services/dashboard/src/components/PixelSelectionActions.jsx,ods/extensions/services/dashboard/src/pages/Pixel.jsx,ods/extensions/services/dashboard/src/pages/Pixel.selection-capacity.test.jsx. The original main was fast-forwarded from verified upstream before branching; the explicitly requested target ispublic-betaat3c186f3f12ba21dad7b7266ec5449393529abb00.Regression and validation
Exact candidate:
239f0ee45733790745629ff9ea10c3e6dd3043b0.npx vitest run src/pages/Pixel.selection-capacity src/components/PixelSelectionActions --maxWorkers=4: 7 passed on Windows Node 24.14.1. 2 new public-boundary assertions fail with untouched beta production code, demonstrating the behavior addressed here.git diff --check, and changed-file secret/private-key/large-file hooks pass.make lint, smoke and simulation passed. Full gate remains limited by two existing no-sudo Docker assertions under root; BATS has five baseline WSL/root/disk-space failures. Full-tree hooks also find dummy private-key fixtures and missing Windows awk. These are not represented as successful runtime gates.Compatibility and review
Uses the same JavaScript character counting as the composer. This does not change backend token limits or claim that 16,384 characters always fit model context. No persisted schema or automatic submission; revert restores the previous unbounded selection action.
Implementation and relevant local checks are complete, so this PR is Ready for review immediately. Independent review remains outstanding. No upstream merge or deployment is authorized by this PR.
Codex assisted with implementation and validation.