Repository navigation
refactor(mobile): share inline citation ranges across renderers - #635
Merged
Merged
Conversation
Use the same range model for composer spans and sent-message Markdown, with pure coverage for notes, adjacent citations, UTF-16 offsets and legacy queue conversion.
nixuuu
force-pushed
the
fix/mobile-inline-citations
branch
from
November 13, 2026 11:36
a6b7a8f to
2be7055
Compare
nixuuu
marked this pull request as ready for review
November 13, 2026 12:21
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.
Current
devalready renders ranged citations inline in sent and queued mobile messages. Share the pure UTF-16 range helper between composer spans and sent-message Markdown so both paths retain the same model, and cover it with five regression tests. Legacy quotes without ranges keep their block presentation until the queue editor appliesinlineLegacyQuotes.The viewer already shows the full, literal note in a scrollable view. Keep the same chip convention as web, without an additional note indicator. No native code, dependencies, configuration or web UI changes.
Diagnosis and installed bundle
MessageQuotesand passed only mention ranges to Markdown. Its older protobuf schema also lacked citation ranges. That implementation matches the reported blocks plus raw placeholders. feat(threads): cite inline in the composer #591 added both the mobile range model and inline renderer; feat(quotes): render citation previews as markdown #612 retained notes inCitationViewer; fix(quotes): open the note editor right after citing #628 changed the web note editor only. The inspected current-dev rendering path and pure protobuf/range/sentinel tests do not reproduce the reported model failure. Device rendering remains unverified, so an older installed bundle is the supported explanation, not a confirmed observation of the user's installation. NoFixesattribution is warranted.v0.2.0-nightly.146. Publication is confirmed in Mobile release 43333842969: Android OTA groupe48b25a0-804b-417e-a044-a528b9cb526e, update01a1d239-0f22-7654-ad93-bbfc752d4c00.1c21f61a-57a6-4dc3-ba1d-43d357c3d3ef, update01a1d274-0b11-71a1-9aa6-37106c5b9608, commit31c7f87825b9756d8b1adf677f506519f248f770. Both Android updates target runtime5f6eae3ab278f1cd543e9ed763f923a319b65ec9. A compatible nightly installation needs to run that OTA or later; a different native runtime needs a matching build rather than that OTA. Updating desktop alone does not update the mobile JS bundle.Related: #591, #612, #628
Verification
nice -n 19: install, generated-code check, final-head typecheck, lint, formatting check, web build, and the full test inventory through the repository's fourcheck:tmpshards: 2753 pass, 166 skip, zero failures, 513 files, and no test temp leftovers. Shards 1–3 used the standard command; shard 4 passed with--isolate --parallel=2.prompt-after-turn-end.test.ts(backgroundTasks: expected 2, received 1). Its entire file passed separately (6 tests), and the full shard passed with Bun's built-in file isolation. No assertions or gateway code were changed. The exact interference between files was not investigated in this mobile change. Standard GitHub CI is green on2be705574aeb9b2c6d8785f59af95a81da4211e4, including all four default test shards, static checks and builds.start: 0), citation-only and adjacent tokens, reversed quote order, UTF-16 offsets around emoji and attachments, legacy queue conversion, truncated labels, and full multiline notes. No UI tests added.expo-updates fingerprint:generatebefore/after JSON comparisons are empty for both platforms: iOS74705db3a68907bc28379bb9b1080a227bc0755b; Android7d38be8f5c9bf842d62060c75820a206f99c87e3(same local configuration and environment).Device list failed: Could not communicate with device support. Try refreshing devices.Refreshing once and attemptingdevice_openfor the requested Android device returned the same error. No other device session was touched, no EAS build or OTA was started, and native visual/layout behavior is unverified.Copy audit
No UI copy changed. Existing
Citation,Copy quoteand source actions remain unchanged; labels and notes retain their existing presentation. The helper tests verify label truncation and unabridged notes, but do not replace a visual check.