fix(desktop): send quote-only and attachment-only messages - #4805
Open
Jarad-z wants to merge 1 commit into
Open
Conversation
Generated-by: OpenAI Codex
Jarad-z
force-pushed
the
codex/structured-only-messages
branch
from
September 4, 2026 18:11
c1036d8 to
0311ad1
Compare
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.
Summary
Maka Desktop treated
MessageContent.textas the only substantive input at several boundaries even though quotes and attachments are model-visible content. A quote-only send could be blocked in the composer or rejected during admission; after reaching the runtime, the durable replay predicate classified it as empty and failed the turn before the provider request. Attachment-only sends hit the same text-only admission assumption.This change:
RuntimeEventreplay;Fixes #4804
Verification
npm run build:with-depsfromapps/desktopnode --test packages/ui/dist/__tests__/composer-send-toggle.test.js packages/ui/dist/__tests__/chat-turn-answer-identity.test.jsnode --test apps/desktop/dist/main/__tests__/permission-response-ipc-boundary.test.jsnode --test packages/core/dist/__tests__/runtime-event.test.js packages/storage/dist/__tests__/root-turn-admission-normalization.test.jsnode --test packages/runtime-host/dist/__tests__/protocol.test.jsnode --test packages/runtime/dist/__tests__/ai-sdk-backend.test.js packages/runtime/dist/__tests__/directory-reference-model-context.test.js packages/runtime/dist/__tests__/runtime-event-read-model.test.jsnpx playwright test e2e/send-message.spec.ts --grep "reference-sized paste" --config e2e/playwright.config.tsfromapps/desktopnpm run lintnpx biome checkon the 16 changed files;git diff --checkNot run: the full Electron E2E suite. The focused user journey and all affected lower-tier suites passed.
Full-tree
npm run format:checkandnpm run check:asf-headersare not claimed: the checkout contains unrelated untracked artifacts and Windows-line-ending baseline files outside this PR that fail those whole-tree commands. All changed files pass the targeted formatter check and retain their ASF headers.Root cause
runtimeEventHasModelVisibleContentreturned false for every text event whose text field was empty. The model-history formatter separately folds quotes, attachments, and directory references into provider-visible text, so the visibility predicate and the materializer disagreed. The durable current-turn replay therefore emittedempty_text_skipped, materialized no current user message, and failed closed as a non-replayable projection. The UI and admission boundaries repeated the same text-only predicate.AI use
Select exactly one:
Tool(s) and scope: OpenAI Codex — reproduced the Desktop failures, traced the persisted
RuntimeEventand replay diagnostics, implemented the UI/admission/replay fixes, added regression coverage, ran the verification above, and drafted the issue and PR descriptions. The commit carries aGenerated-by: OpenAI Codextrailer.Checklist
Does this PR entail a change in behavior?