Repository navigation
fix(mobile): support animated refs when opening Android chats - #6
Merged
Merged
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
khoi
added a commit
that referenced
this pull request
Oct 3, 2026
Mermaid fences currently appear as source in chat and Markdown previews. Supported fences now render as selectable text diagrams, with source switching and copying. Unsupported, invalid, or oversized inputs keep their source. The renderer is vendored into a standalone workspace package with no runtime dependencies. Web and desktop lazily render visible, closed fences in a browser worker. Mobile renders completed messages in a dedicated Worklets runtime. Its build produces one self-contained worklet, using the existing Expo/Babel setup. Native output uses ASCII borders so Android font fallback cannot misalign Unicode box characters. The text renderer omits terminal coloring and its extra canvases. The clients share serialized admission, source deduplication, and a bounded cache. Input, graph, allocation, pathfinding, and cooperative time limits bound rendering work. Unsupported syntax and titles that cannot fit their layout retain source. Browser workers have startup and execution deadlines with replacement after failure. Native Worklets has no termination API and relies on the renderer's deterministic bounds and cooperative deadline. The server still delivers the original Markdown. Implementation and submission were requested by the repository maintainer in the originating thread. This uses the shared Markdown paths for chat and previews, is provider-independent, and requires no server contract or connection-mode changes. The Android chat prerequisite in #6 has merged; this PR targets `main`. **Verification:** 272 focused tests passed, including 100 golden fixtures, parser and drawing fidelity, deep-chain layout, bounds, queue/cache behavior, browser recovery, clipboard fallback, native representation switching, and native packaging. Packaging tests execute the actual serialized worklet for both platform Babel configurations, check parity for six diagram types, and exercise rejected inputs and deadlines. Scoped typechecks, targeted lint, and the mobile dependency check passed. The web production build passed with a separate 77,427-byte worker (23,651 bytes gzip). Production exports for iOS and Android produced Hermes bytecode. An integrated web pass verified rendering, source switching, copying without the Clipboard API, and source fallback. The actual browser worker passed the statement, label, bottom-to-top, sequence-note, and long-title regressions. An installed Android API 35 development client verified cold startup, pairing with isolated server state, flowchart and sequence rendering, horizontal panning, source switching after panning, copy feedback, fallback-source copy/paste, and light/dark appearance. A renderer source edit appeared in the native background runtime through Fast Refresh; reverting it restored the original diagram. Native verification caught and fixed the startup integration, Android copy icon, scroll reset, and border alignment issues. **iOS simulator execution remains unverified.** The installed Xcode 26.3 fails while compiling ExpoModulesJSI before application code runs. [Expo documents this toolchain incompatibility](expo/expo#49214); the simulator pass needs a newer Xcode. Packaged Electron and Android release APK execution were not tested. Landing checks exposed stale test fixtures left by the existing app-identity change; their WSL paths, branch prefixes, and release URLs now match production. The four affected test files pass locally (108 tests), and their 13 Linux-only cases pass in CI. CI passes the full test suite, lint, typecheck, build, Rust, and release smoke checks. ## Screenshots Web: rendered sequence diagram and unsupported-input fallback.  <details> <summary>Web before: Mermaid source</summary>  </details> Android: selectable ASCII diagrams with horizontal scrolling.  <details> <summary>Android source view</summary>  </details> Recordings: [web switching and copying](https://github.com/supabitapp/supa3/releases/download/pr-evidence-mermaid-ascii/mermaid-toggle-and-copy.mp4), [Android switching and copying](https://github.com/supabitapp/supa3/releases/download/pr-evidence-mermaid-ascii/android-mermaid-toggle-copy.mp4). Model: GPT-6-Astra. Harness: Codex.
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.
Opening an Android chat can throw
Object is not a functionwhen keyboard padding changes. The existing keyboard controller calls an animated ref as a function, while Reanimated 4.7 passes an object containing the native node.Backport the mounted-node guard from the upstream fix, reported by bompus in keyboard-controller#1655. Both callable refs and object refs keep the unmounted-view check.
Verified by reproducing the failure in the Android API 35 development client, installing the patch, and opening the same chat successfully. Executed the patched callback with mounted and unmounted refs in both formats; all four cases passed.
vp iapplies the patch successfully.Model: GPT-6-Astra. Harness: Codex.