Repository navigation
fix(desktop): stop sending and rendering the 🧠 unset emoji on client projections - #23538
Merged
Merged
Conversation
…projections Follow-up to #23512 for the two desktop siblings it left out. The macOS client stamped 🧠 into ClientProcessing whenever local inference produced no emoji (assemble, assembleMinimum) and rendered 🧠 for a projection without one, so free-tier locally projected conversations kept showing the brain as if a model had chosen it. - Desktop send: omit the emoji key when the draft has none or a blank; the backend stamps the category fallback (💬 for other). - Desktop render: a projection without an emoji renders 💬. - Backend: ProjectedStructure routes its emoji through the shared fallback_emoji at validation, so no client can store 🧠 (or empty) as an unset value at any intake — the late-bind and chunk-assembly paths validate through the same model. - Backfill docstring: under the post-#23512 mapping every category maps (other → 💬), so no affected row keeps 🧠; script not run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch was successfully deployed
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.
What changed and why
Follow-up to #23512 (merged as 98e9bbd): the macOS desktop app still stored and showed the 🧠 "unset" emoji in two places that cleanup left out. This PR removes it from the desktop send path, the desktop render path, and closes the backend intake hole so no client can store 🧠 as an unset value.
ClientProcessingContract): when local inference has no emoji (or a blank one), theemojikey is omitted from the wire instead of carrying 🧠;assembleMinimumomits it too. The backend stamps the category fallback (💬 forother).ConversationProjectionRendering): a projection whose stored structure has no emoji renders 💬, not 🧠.ProjectedStructure): the emoji routes through the sharedfallback_emojiat validation — omitted, empty, whitespace, or the 🧠 sentinel all land on the category's emoji (💬 forother); a chosen emoji survives. Every intake path (from-segments, late-bind idempotency hit, chunk assembly) validates through this model, so no client can store 🧠 as an unset value.backfill_notes_v2_default_emoji.pyclaimed rows whose category has no mapping keep 🧠; under the post-fix(notes): stop persisting the 🧠 unset emoji default on deterministic and legacy paths #23512 mapping every category maps (other→ 💬), so each affected row is rewritten. Docstring only — the script was not run.Product invariants affected
none
How it was verified
pytest tests/unit/test_client_processing_schema.py(88 passed, including the new emoji-policy tests), plus the acceptance, trust-boundary, finalize, and free-tier suites run individually (141 passed). The prometheus-registry collision that appears when finalize+acceptance run in one pytest invocation reproduces on unmodified main and is unrelated to this change.xcrun swift build -c debugclean;swift test --filteronClientProcessingContractTests+ConversationProjectionRenderingTests(24 tests) and the adjacent local-projection suites (33 tests) all pass; pinned swift-format and SwiftLint report zero violations.Tests
ClientProcessingContractTests—assembleomits the emoji key when the draft has none or a blank (asserted on the encoded JSON, not just the in-memory optional), keeps a chosen emoji, andassembleMinimumomits it;ConversationProjectionRenderingTests— a projection without an emoji renders 💬.test_client_processing_schema.py— 🧠 is never stored (work → 🧑💻, other → 💬), empty/omitted/whitespace fall back to the category emoji, a chosen emoji (including 💬) survives, and the full intake payload binds the fallback on the embedded structure.UI evidence
UI-Evidence: none -- stored-projection decode fallback only; the visible change is which emoji glyph an existing row renders, with no new or changed UI state to capture
Failure-Class: FC-unset-schema-default-persisted-as-chosen-content
🤖 Generated with Claude Code