Skip to content

fix(pixel): preserve oversized unsent drafts on restoration - #4322

Merged
gabsprogrammer merged 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-oversized-draft-restore
Sep 13, 2026
Merged

gabsprogrammer merged 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-oversized-draft-restore

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Both full-page regression tests fail on base f5f49b7, showing the missing draft suffix after reload and conversation selection.
  • npm test -- src/pages/PixelOversizedDraft.test.jsx src/pages/PixelComposerIntegration.test.jsx src/pages/PixelSendKey.test.jsx src/components/PixelConversationImport.test.jsx: 20 passed.
  • Tests verify exact persisted text, disabled sending, successful shortening, and no chat request.
  • Scoped pre-commit checks and git diff --check: passed.
  • Dashboard baseline lint/build passed. Hardware inference is not exercised by this browser-only fix.

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.

  • Final combined dashboard: 118 test files / 932 tests pass; ESLint 0 errors (575 warnings); production build passes.
  • Affected API suites: 292 pass. APE full suite: 52 pass. Scoped pre-commit secret/private-key/large-file checks and git diff --check pass.
  • Native Linux make gate reaches an existing CLI-update failure also reproduced on the untouched base; fix(update): keep host-agent refresh non-fatal #3159 supplies its separate fix. BATS: 419/421 pass, with the same two baseline failures (non-GNU OSTYPE fixture detects the real WSL host; skip-Docker fixture lacks production helpers). Smoke tests and installer simulation pass. These are explicit validation gaps, not a claim that the whole release gate is green.

Latest candidate CI: 32 successful checks, 4 skipped. Draft status on filesystem/authorization changes is retained for independent human review despite green CI.

@tang-vu
tang-vu marked this pull request as ready for review September 11, 2026 16:46
@gabsprogrammer
gabsprogrammer merged commit ccbe7c7 into Osmantic:public-beta Sep 13, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants