refactor(mobile): git sheets use uniwind platform variants instead of className ternaries - #13161
Conversation
… className ternaries The mobile audit found hundreds of Platform.OS checks where Uniwind's ios:/android: className variants already express the same thing. This converts the inline Platform.OS === "android" ? "..." : "..." className ternaries in the git sheet family (GitCommitSheet, GitBranchesSheet, GitConfirmSheet, GitOverviewSheet, gitSheetComponents) to single class strings with ios:/android: variants. Structural platform branches, style objects, and icon-size props are unchanged. apps/mobile Platform.OS occurrences drop from 385 to 336; the five files now contain zero className ternaries and ~210 platform-variant utilities in their place. Verified with targeted tsc, lint, feature tests, and a Metro iOS export confirming every new variant class compiles.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused refactor that replaces existing iOS/Android className ternaries with equivalent Uniwind platform variants across five Git sheet files. Functional logic, native platform branches, and product defaults remain unchanged; the impact is limited to existing presentation styling. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: 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. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Limit details: You’ve used all 10 included reviews currently available. 📝 WalkthroughWalkthroughChangesNativeWind platform styling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~15 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete current-head regression was established; the styling migration is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Root cause found — closing this PR (revert pushed:
|
#13161 replaced Platform.OS className ternaries in the git sheets with ios:/android: Uniwind variants; record the tiering: class variants for styling, Platform.OS for behavior, file variants for wholesale UI. Co-authored-by: Apex <noreply@callstack.com>
Device root-cause analysis showed Uniwind 1.11.0 ios:/android: class variants are not platform-guarded in this repo's Metro pipeline; classes leak across platforms. Keep Platform.OS className branches for styling until #13161 is reverted on main and re-proved on both devices. Co-authored-by: Apex <noreply@callstack.com>
#13169 reverted #13161 on main, but Uniwind 1.11.0 platform variants stay unguarded in the Metro pipeline. Say they must not be used until the pipeline is fixed/upgraded and proved on both devices, and that existing variant usages are unsafe and should not be copied. Co-authored-by: Apex <noreply@callstack.com>
## What's Changed * chore(mobile): drop dead nitro-markdown tgz override and @expo/metro-runtime by @juliusmarminge in pingdotgg/t3code#13148 * feat(web): show settings scope as a sentence at the top of the page by @juliusmarminge in pingdotgg/t3code#13139 * refactor(web): move settings scope pickers into breadcrumbs by @Yash-Singh1 in pingdotgg/t3code#13165 * feat(auth): share provider sign-in flows and credential bindings by @juliusmarminge in pingdotgg/t3code#12983 * refactor(mobile): git sheets use uniwind platform variants instead of className ternaries by @juliusmarminge in pingdotgg/t3code#13161 * chore(mobile): name the two project favicon caches by their job by @juliusmarminge in pingdotgg/t3code#13160 * revert(mobile): git sheets back to Platform.OS ternaries (un-guarded uniwind variants broke both platforms) by @juliusmarminge in pingdotgg/t3code#13169 * docs(mobile): document the two mobile routes that intentionally skip deep links by @juliusmarminge in pingdotgg/t3code#13164 * refactor(mobile): break module cycles with focused extractions by @juliusmarminge in pingdotgg/t3code#13151 * fix(server): generate PR diffs from branch changes by @Yash-Singh1 in pingdotgg/t3code#13170 * fix(web): preserve nested scroll behavior in chat timeline by @Yash-Singh1 in pingdotgg/t3code#13167 * test(web): cover usage model ordering without static markup by @flamboh in pingdotgg/t3code#13104 * fix(desktop): find linuxbrew node for the WSL backend by @CodyRay in pingdotgg/t3code#7827 * chore(models): use GPT-6 Luna for text generation by @extoci in pingdotgg/t3code#13115 * fix(mobile): keep ordinary offline outbox failures out of console.warn by @juliusmarminge in pingdotgg/t3code#13144 * feat(providers): check remote compatibility ranges by @juliusmarminge in pingdotgg/t3code#13130 * chore(lint): keep mobile theme escape-hatch allowlist honest by @juliusmarminge in pingdotgg/t3code#13146 * fix(web): the pull request badge reads at the meta size again by @juliusmarminge in pingdotgg/t3code#13175 * fix(mobile): uniwind platform variants stay guarded on both platforms by @juliusmarminge in pingdotgg/t3code#13172 * refactor(mobile): git sheets use uniwind platform variants instead of className ternaries by @juliusmarminge in pingdotgg/t3code#13185 * refactor(mobile): remaining className platform ternaries become class variants by @juliusmarminge in pingdotgg/t3code#13188 * fix(web): align provider emails without clipping by @Derpedyea in pingdotgg/t3code#13174 * perf(mobile): recycle the default v2 home list and scope the snooze minute tick by @juliusmarminge in pingdotgg/t3code#13149 * refactor(mobile): retire the legacy grouped thread list by @juliusmarminge in pingdotgg/t3code#13183 * fix(server): background PR checks spend less GitHub quota by @juliusmarminge in pingdotgg/t3code#13189 * fix(server): background PR sync reads summaries in batches by @juliusmarminge in pingdotgg/t3code#13198 * fix(server): GitHub PR lookups stop probing owner-qualified heads by @juliusmarminge in pingdotgg/t3code#13200 * chore(mobile): clear the legacy-list deletion fallout by @juliusmarminge in pingdotgg/t3code#13203 ## New Contributors * @CodyRay made their first contribution in pingdotgg/t3code#7827 **Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260922.2123...v0.0.43-nightly.20260923.2135 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260923.2135
Problem
The mobile audit found 389
Platform.OSchecks inapps/mobilewhile Uniwind'sios:/android:className variants were used only a handful of times — including 65 inlinePlatform.OS === "android" ? "..." : "..."className ternaries. The git sheet family was one of the densest clusters.Change
Converts every inline platform className ternary in the git sheet family to a single class string using Uniwind
ios:/android:variants, following the pattern already used inapps/mobile/src/features/settings:GitCommitSheet,GitBranchesSheet,GitConfirmSheet,GitOverviewSheet,gitSheetComponentsios:/android:prefixes, so the two platforms never fight over the same utility. Where the converted call site renders anAppText/AppTextInput, the component's own defaults (font-sans text-foreground) stay in the base layer and the newios:/android:utilities override them through Uniwind's variant cascade — the same mechanism the existing settings-screenandroid:usage relies on.Measurements
Platform.OSoccurrences inapps/mobile/srcios:/android:variant utilities inapps/mobile/srcHomeScreen and ThreadNavigationSidebar were deliberately left alone (active recycler/error work). ReviewSheet/AddProjectScreen can follow the same pattern in a separate pass.
Verification
tsc --noEmit(apps/mobile): cleanvp lint apps/mobile/src/features/threads/git/: 0 errors; the four react-compiler warnings are pre-existing (identical on the HEAD versions of the same files)vp test run src/features/threads/git: passingexpo export --platform ios --dev false: succeeds, and the exported bundle contains compiled selector artifacts for the new variant classes (e.g.ios:border-border-subtle,android:active:bg-subtle), confirming Uniwind compiles them rather than dropping themGitConfirmSheetdescription line, where baseleading-normalcoexists with per-platform text sizes (android:text-base/ios:text-sm) — Tailwind 4 emits a paired line-height ontext-*, so the effective line-height (original: multiplier 1.5 fromleading-normal) needs a visual confirmation on both platforms.Surface checklist
Model: Claude (Apex by Callstack, pi harness).
Summary by CodeRabbit