fix(mobile): Android home UI fixes — favicons, wordmark, collapse state#3774
fix(mobile): Android home UI fixes — favicons, wordmark, collapse state#3774PixPMusic wants to merge 10 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. This PR introduces new collapse state persistence logic with complex hydration handling. An open review comment identifies a potential race condition bug where persisted collapsed state could be lost if the user interacts before preferences load. The new functionality and unresolved bug concern warrant human review. You can customize Macroscope's approvability policy. Learn more. |
ae4873a to
7c4ed3a
Compare
|
Force-pushed to fix my git identity, sorry! My Github isn't linked to my work email :) |
7c4ed3a to
e9e9825
Compare
RN's built-in Image (Fresco) cannot decode SVG on Android, and the server's favicon resolver prefers favicon.svg, so project logos fell back to the folder glyph. expo-image decodes both SVG and ICO on Android and iOS.
Text measured with the fallback font kept its stale width when DM Sans swapped in, intermittently clipping trailing glyphs in the home header wordmark and stage badge on Android cold starts.
Render the T3 SVG mark with a muted "Code" label, mirroring SidebarBrand in the web app instead of a single white text.
Collapse state lived in component state only. Store the collapsed group keys in the preferences blob and hydrate them on mount, skipping keys the user already toggled this session.
The render gate keyed off fontsLoaded alone, so a font load error left the app stuck behind the splash screen forever.
Rapid toggles fired unawaited full-list writes that could complete out of order, resurrecting a stale collapsed-group list. Chain writes on a queue so the newest state always lands last.
preventAutoHideAsync was never called, so Expo auto-hid the splash on first render and slow font loads showed a blank screen instead.
savePreferencesPatch read-modify-writes the whole blob, so concurrent patches from different screens could drop each other's fields. Queue writes module-wide, and move the collapse persistence out of the state updater into a post-commit effect so it runs once per change.
35f5c13 to
319117c
Compare
e9e9825 to
e2aa122
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e2aa122. Configure here.
A toggle made before the async preference read finished persisted a partial collapsed-group list, silently dropping groups saved in earlier sessions. Persistence now waits for hydration; the hydration state update re-runs the effect so a pending toggle flushes with the merged list.
Hydration skipped any group already present in the map, so a pre-hydration "show more" on a group that should start collapsed discarded the stored preference for the session. Only groups the user explicitly collapse-toggled now win over the stored flag; other existing entries keep their visibleCount and gain the stored collapse.


Summary
Four home-screen fixes for the Android app, stacked on #3579:
ProjectFaviconfrom RNImagetoexpo-imageso SVG and ICO decode on Android. RN's Fresco decoder handles neither, and the server's favicon resolver prefersfavicon.svg, so project logos fell back to the folder glyph.SidebarBrand— the T3 SVG mark plus a muted "Code" label, instead of a single white text.Validation
vp check,pnpm exec tsc --noEmit, mobile tests passassembleRelease, production variant) installed and verified on a Pixel 7 Pro: favicons render (t3code logo instead of folder glyph), wordmark matches desktop, collapse state survives restartNote
Low Risk
Mobile UI and local preference persistence only; no auth, networking, or shared backend changes.
Overview
Android home-screen fixes: project favicons now use
expo-imageinstead of RNImageso SVG/ICO decode (Fresco couldn’t, so logos fell back to the folder glyph). Cold-start text clipping is addressed by keeping the native splash up and returningnulluntil DM Sans loads or fails, avoiding stale layout from the fallback font.Branding on the home header matches desktop: new
T3WordmarkSVG plus muted “Code” label instead of bold “T3 Code”. Collapsed project groups are stored in preferences (collapsedProjectGroups) and hydrated on mount, with guards so early toggles aren’t overwritten by async load or partial writes.Reviewed by Cursor Bugbot for commit 3f6a479. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix Android home UI with favicon rendering, T3 wordmark header, and persistent group collapse state
Imagewithexpo-imageinProjectFaviconImagefor correct favicon rendering usingcontentFit="contain"T3WordmarkSVG component and updatesAndroidHomeHeaderto display it alongside a muted "Code" label, matching the desktop sidebar brandHomeScreen, loading saved preferences on mount and writing changes after user togglesMacroscope summarized 3f6a479.