[codex] Port review diff surface to Android#7
Draft
HorusGoul wants to merge 4 commits into
Draft
Conversation
Android APK previewA self-contained Android preview APK was built for this PR.
Re-add the |
…d-review-diff-surface # Conflicts: # .github/workflows/mobile-android-apk-preview.yml
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
Closes #4.
Adds an Android implementation of
T3ReviewDiffSurfacefor the mobile review diff native module. The Android view decodes the same row/theme/style/token JSON contract as iOS, renders file headers, hunks, code lines, notices, and comments on a custom canvas, supports token patches/reset keys, collapsed/viewed/selected state, initial row scroll, and emits visible-range/draw debug events for incremental highlighting.Also registers the module for Expo Android autolinking and makes
ReviewSheettolerate missing native view registration with a raw diff fallback instead of force-unwrapping the native surface.Local Benchmark
Ran a temporary Vite+ benchmark against the shared review diff pipeline that feeds both native implementations. This is not a device render benchmark; it measures parse, adapter, bridge serialization, and JavaScript highlighter costs in Node.
Dataset sizes:
Observed p50 timings:
Takeaway: diff parsing and bridge serialization are not the bottleneck on this synthetic workload. Syntax highlighting dominates; keeping it visible-range driven is important for large diffs. Native iOS-vs-Android draw timing still needs an on-device harness using the emitted
draw-metrics/visible-rangeevents.Validation
vp checkpasses with existing lint warningsvp run typecheckvp run lint:mobilepasses; localktlintanddetektare not installed, so the script skipped those checks as designedvp testvp run --filter @t3tools/mobile typecheckvp run --filter @t3tools/mobile test -- --run nativeReviewDiffSurface.test.ts