Skip to content

refactor(mobile): share inline citation ranges across renderers - #635

Merged
nixuuu merged 1 commit into
devfrom
fix/mobile-inline-citations
Nov 13, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/mobile-inline-citations

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Current dev already 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 applies inlineLegacyQuotes.

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

Related: #591, #612, #628

Verification

  • Passed with nice -n 19: install, generated-code check, final-head typecheck, lint, formatting check, web build, and the full test inventory through the repository's four check:tmp shards: 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.
  • The default local shard 4 twice failed the unchanged startup recovery test in 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 on 2be705574aeb9b2c6d8785f59af95a81da4211e4, including all four default test shards, static checks and builds.
  • Tests cover the reported two-note message after protobuf decoding (including 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:generate before/after JSON comparisons are empty for both platforms: iOS 74705db3a68907bc28379bb9b1080a227bc0755b; Android 7d38be8f5c9bf842d62060c75820a206f99c87e3 (same local configuration and environment).
  • Device check unavailable: MacStudio returned Device list failed: Could not communicate with device support. Try refreshing devices. Refreshing once and attempting device_open for 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 quote and 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.

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
nixuuu force-pushed the fix/mobile-inline-citations branch from a6b7a8f to 2be7055 Compare November 13, 2026 11:36
@nixuuu
nixuuu marked this pull request as ready for review November 13, 2026 12:21
@nixuuu
nixuuu merged commit bd89660 into dev Nov 13, 2026
11 checks passed
@nixuuu
nixuuu deleted the fix/mobile-inline-citations branch November 13, 2026 12:22
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.

1 participant