Skip to content

feat(expo): refresh app icon and adaptive icon config#31

Merged
TriForMine merged 9 commits into
mainfrom
feat/expo-icon-refresh
May 28, 2026
Merged

feat(expo): refresh app icon and adaptive icon config#31
TriForMine merged 9 commits into
mainfrom
feat/expo-icon-refresh

Conversation

@TriForMine

@TriForMine TriForMine commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Scan panel now captures camera images before scanning
    • Scanner now accepts image-based input for analysis
  • Bug Fixes

    • Improved error handling and validation in encode and scan operations
    • Added fallback messages for encoding failures
  • Chores

    • Updated Android adaptive icon configuration
    • Enhanced native library fetching for improved compatibility

Review Change Stack

Copilot AI review requested due to automatic review settings May 28, 2026 21:52
@TriForMine TriForMine changed the title fix(ci,jni): install Rust Android targets before JNI builds feat(expo): refresh app icon and adaptive icon config May 28, 2026
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e99b744e-2200-44f7-8d4e-e00c08e5cff7

📥 Commits

Reviewing files that changed from the base of the PR and between 9f3c491 and 94bb3f3.

⛔ Files ignored due to path filters (2)
  • apps/expo-glyphnet/assets/images/adaptive-icon.png is excluded by !**/*.png
  • apps/expo-glyphnet/assets/images/icon.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • apps/expo-glyphnet/app.json
  • apps/expo-glyphnet/scripts/eas-fetch-jni-libs.sh
  • apps/expo-glyphnet/src/adapters/scanner/types.ts
  • apps/expo-glyphnet/src/features/encode/EncodePanel.tsx
  • apps/expo-glyphnet/src/features/scan/ScanPanel.tsx
  • crates/glyphnet-jni/src/lib.rs

📝 Walkthrough

Walkthrough

This PR adds camera image capture for scanning with improved error handling. It extends the ScanRequest contract, implements camera-based photo capture in ScanPanel, refactors the JNI handler to support both base64 images and legacy RGBA data, improves encode error detection, hardens the JNI build artifact extraction with ABI detection, and consolidates Android icon configuration.

Changes

Image Capture Scanning Feature

Layer / File(s) Summary
Scanner request type extension
apps/expo-glyphnet/src/adapters/scanner/types.ts
ScanRequest extends with optional imageBase64, width, height, and rgbaBase64 to accommodate either direct image data or structured RGBA input.
Camera image capture and ScanPanel integration
apps/expo-glyphnet/src/features/scan/ScanPanel.tsx
Camera ref is added to ScanPanel, image is captured with takePictureAsync in base64 format at 0.9 quality, validated, and passed to the scanning adapter as imageBase64.
JNI handler dual-mode image input
crates/glyphnet-jni/src/lib.rs
scanStillNative now accepts either imageBase64 (decoded and loaded directly) or falls back to width/height/rgbaBase64, with distinct error handling for each path.

Encode and Scan Error Handling

Layer / File(s) Summary
EncodePanel error detection and rendering
apps/expo-glyphnet/src/features/encode/EncodePanel.tsx
runEncode distinguishes SVG responses from errors by checking for <svg prefix, attempts JSON error extraction on non-SVG responses, and renders error messages or "No output yet" instead of assuming all responses are valid SVGs.

JNI Build Artifact Extraction

Layer / File(s) Summary
JSON parser tool selection and GitHub API parsing
apps/expo-glyphnet/scripts/eas-fetch-jni-libs.sh
Script detects available JSON parsers (node or python3) and uses the selected tool to parse workflow ID, run ID, and artifact ID from GitHub Actions API responses instead of hard-coding Python.
ABI-aware artifact extraction and install
apps/expo-glyphnet/scripts/eas-fetch-jni-libs.sh
Extraction replaces wholesale directory copy with ABI-specific detection (arm64-v8a, armeabi-v7a, x86_64), validates presence, and copies only matching ABI folders into the JNI destination.

Android Icon Configuration

Layer / File(s) Summary
Android adaptiveIcon configuration update
apps/expo-glyphnet/app.json
adaptiveIcon.foregroundImage now references a consolidated ./assets/images/adaptive-icon.png file; redundant icon image entries are removed.

🎯 3 (Moderate) | ⏱️ ~20 minutes

A camera wakes and frames the glyph,
Two paths now speak to JNI's gift—
RGBA waits, or images fly,
Errors are caught before they hide.
Build scripts choose their tools with care. 🐰✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/expo-icon-refresh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@TriForMine TriForMine merged commit 0feaa4f into main May 28, 2026
10 of 12 checks passed
@TriForMine TriForMine deleted the feat/expo-icon-refresh branch May 28, 2026 21:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions

Copy link
Copy Markdown

Burst reliability (loss sweep)

PR gate status: PASS

  • Gating rows: 4 pass / 0 fail
  • Non-gating rows: none
Drop rate Gating PR success Base success Delta PR median frames Base median frames
10% Yes 100.0% 100.0% 0.0pp 14 14
20% Yes 100.0% 100.0% 0.0pp 16 16
30% Yes 100.0% 100.0% 0.0pp 19 19
40% Yes 50.0% 50.0% 0.0pp 18 18

@github-actions

Copy link
Copy Markdown

Scanner perf (ribbon + matrix fixtures)

PR gate status: PASS

  • Ribbon budget: 25.000 ms (allowed 75.000 ms)
  • Matrix budget: 20.000 ms (allowed 60.000 ms)
  • Tolerance: 200.0%
  • Ribbon gating benches: 3 pass / 0 fail
  • Matrix gating benches: 1 pass / 0 fail
Benchmark Gating PR median (ms) Base median (ms) Delta (ms) Delta %
scan_generated_ribbon_canvas_small (RibbonPrint) Yes 44.848 44.730 0.118 0.26%
scan_generated_ribbon_canvas_medium (RibbonPrint) Yes 6.672 6.658 0.013 0.20%
scan_generated_ribbon_canvas_large (RibbonPrint) Yes 23.694 23.729 -0.035 -0.15%
scan_generated_matrix_roi (MatrixCompat) Yes 2.919 2.908 0.011 0.36%
scan_generated_matrix_canvas (MatrixCompat) No 174.690 174.671 0.019 0.01%
scan_real_debugger_screenshot (RibbonPrint) No 263.235 263.127 0.108 0.04%

Matrix subset

Benchmark Gating PR median (ms) Base median (ms) Delta (ms) Delta %
scan_generated_matrix_roi (MatrixCompat) Yes 2.919 2.908 0.011 0.36%
scan_generated_matrix_canvas (MatrixCompat) No 174.690 174.671 0.019 0.01%

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.

2 participants