Repository navigation
fix(pixel): preserve oversized unsent drafts on restoration - #4322
Merged
gabsprogrammer merged 1 commit intoSep 13, 2026
Merged
gabsprogrammer merged 1 commit into
gabsprogrammer merged 1 commit into
Conversation
tang-vu
marked this pull request as ready for review
September 11, 2026 16:46
This was referenced Sep 13, 2026
This was referenced Sep 14, 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.
A user can paste a draft longer than the 16,384-character send limit and edit it before sending. The draft is saved in full, but reopening Pixel or selecting the conversation silently truncates it, and the persistence effect then saves the shortened version. Restore the complete draft and let the existing send-limit UI require an explicit edit.
Why this matters
The production path is composer paste -> saveConversation -> loadStoredChat during reload or sidebar selection -> persistence. The send limit must never become a destructive storage transformation. No oversized message is sent: existing inputOver validation and the disabled Send button remain authoritative.
Overlap check
Searched open/closed upstream PRs by draft/truncation keywords and all Pixel.jsx file changes. #4078 concerns cleared drafts, #4149 imports bounded JSON exports, #4150 previews drafts, #4236 reviews files, and #4230 handles assistant identity. #4220/#4219/#4255 extend context/scroll/search behavior. None preserves over-limit composer text on restoration.
Validation
npm test -- src/pages/PixelOversizedDraft.test.jsx src/pages/PixelComposerIntegration.test.jsx src/pages/PixelSendKey.test.jsx src/components/PixelConversationImport.test.jsx: 20 passed.git diff --check: passed.Risk and rollback
The retained draft was already stored and rendered before reload; restoration now preserves it. Stored message limits, request limits and import validation are unchanged. Shared browser behavior applies to Linux, Windows and macOS clients. No migration is needed; revert this commit to roll back, although the old restore path would again truncate oversized drafts.
Batch integration receipt
Validated with the other 19 public-beta PRs on integration commit ce0d0132, based on upstream f5f49b7. All 20 patches compose without conflicts in creation order; no new PR requires another to fix its own behavior. For shared files, use #4325 before #4327 and #4339 before #4356 as the tested order.
Latest candidate CI: 32 successful checks, 4 skipped. Draft status on filesystem/authorization changes is retained for independent human review despite green CI.