Skip to content

revert(mobile): git sheets back to Platform.OS ternaries (un-guarded uniwind variants broke both platforms) - #13169

Merged
juliusmarminge merged 1 commit into
mainfrom
fix/mobile-git-sheets-variant-revert
Sep 23, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
fix/mobile-git-sheets-variant-revert

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 23, 2026

Copy link
Copy Markdown
Member

Problem

#13161 (merged as ec28eef) converted the mobile git sheets' Platform.OS className ternaries to Uniwind ios:/android: variants. Both device passes confirmed regressions on the merged head:

  • Android (Pixel 10 Pro, Android 17): GitOverview → Branches and GitCommit/GitConfirm render headers with blank bodies; baseline bed0b4 renders content (captures: /tmp/mobile-audit-pr13161-{before,after}-android-git-{branches,commit,confirm}.png).
  • iOS (18.6): GitCommitSheet footer shifted — commit-message label/input +14px down/right, button row ~28px lower, input fill changed white→gray (/tmp/mobile-audit-pr13161-{before,after}-ios-git-commit.png).

Root cause

ios:/android: variants are not platform-guarded in this repo's uniwind 1.11.0 pipeline. In a production-like expo export --platform ios of 5c191ec, the iOS bundle's compiled stylesheet contains the Android entries with their platform metadata stripped — e.g. "android:p-4": [{ "entries": [["padding", …]], "native": false, "complexity": 0 }] (native is literally platform !== null, so addMetaToStylesTemplate's exclusion never fires). The runtime store (uniwind/src/core/native/store.ts) has no platform check in its style filter. Net semantics: every platform variant applies on both platforms, and same-property conflicts resolve to the last className token, identically everywhere.

  • Android blanks: "android:shrink android:grow-0 ios:flex-1"ios:flex-1 is last, so Android also gets flexBasis: 0%/flexGrow: 1, collapsing content to zero height in the fitToContents sheets; the root bg-sheet ios:flex-1 compounds it.
  • iOS shift: the commit-message wrapper's android:p-4 leaks (no iOS counterpart for padding to overtake it; metro.config.js sets polyfills: { rem: 14 }, so p-4 = 14px), plus the input's android:bg-sheet-solid. Overview/branches/confirm matched only because same-property iOS utilities later in the string masked the leaks.

Full analysis: #13161 (comment)

Fix

Straight revert of ec28eef — the five files are now byte-identical to the pre-regression baseline bed0b4cdad4 (git diff bed0b4cdad4 HEAD -- apps/mobile/src/features/threads/git is empty), i.e. exactly the code the passing "before" device captures rendered.

Checks

  • git diff bed0b4cdad4..HEAD -- apps/mobile/src/features/threads/git0 lines (baseline bytes restored).
  • tsc --noEmit in apps/mobile on identical content: clean.
  • Post-fix expo export --platform ios of the reverted source: all converted variant classes are gone from the compiled stylesheet ("android:p-4", "ios:flex-1", "android:shrink", "android:bg-sheet-solid", "android:min-h-12", "android:rounded-[20px]", "ios:gap-2", "ios:bg-screen" → no entries), and the original ternaries are present at the call sites.
  • Device confirmation is the owner's integrated pass (same fixture, both platforms, all four sheets).

Known follow-up (not in this PR)

Pre-existing android: usages still ship their values on iOS through the same defect (SettingsControlRow android:text-base/android:min-h-14/android:py-3/android:gap-1, SettingsServerControlsRouteScreen android:px-4) — masked visually today. The uniwind platform-tagging gap should get its own fix before any further variant-based migration.

— Claude (Apex by Callstack, pi harness). Do not merge before the integrated device pass confirms both platforms.


Devin Review

Summary by CodeRabbit

  • Refactor
    • Updated Git-related mobile sheets and shared components to provide consistent platform-specific layouts and styling.
    • Preserved Android and iOS visual behavior across branch selection, commit, confirmation, overview, cards, list rows, inputs, and action controls.
    • Maintained platform-appropriate spacing, typography, borders, backgrounds, rounded corners, and interaction states.

…stead of className ternaries (#13161)"

This reverts commit ec28eef.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 23, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 76d2c87

Macroscope's review found this PR approvable — This is a narrowly scoped revert that restores explicit Android/iOS styling branches across the Git sheets, fixing layout regressions without changing Git operations, navigation, data contracts, or product defaults. The larger diff is primarily a mechanical replacement of unreliable platform class variants with already-established ternary logic.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

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 configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: cf9e819e-06f9-4f7b-adcd-6cf5973799e5

📥 Commits

Reviewing files that changed from the base of the PR and between 3409651 and 76d2c87.

📒 Files selected for processing (5)
  • apps/mobile/src/features/threads/git/GitBranchesSheet.tsx
  • apps/mobile/src/features/threads/git/GitCommitSheet.tsx
  • apps/mobile/src/features/threads/git/GitConfirmSheet.tsx
  • apps/mobile/src/features/threads/git/GitOverviewSheet.tsx
  • apps/mobile/src/features/threads/git/gitSheetComponents.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Git sheet platform styling

Layer / File(s) Summary
Shared sheet component styling
apps/mobile/src/features/threads/git/gitSheetComponents.tsx
MetaCard and SheetListRow now use Platform.OS branches for platform-specific layout, borders, backgrounds, spacing, and typography.
Branch and commit sheet styling
apps/mobile/src/features/threads/git/GitBranchesSheet.tsx, apps/mobile/src/features/threads/git/GitCommitSheet.tsx
Branch and commit sheets now use explicit platform branches for containers, controls, inputs, rows, cards, typography, and action layouts.
Confirmation and overview sheet styling
apps/mobile/src/features/threads/git/GitConfirmSheet.tsx, apps/mobile/src/features/threads/git/GitOverviewSheet.tsx
Confirmation and overview sheets now use explicit platform branches for sheet, card, header, content, and action styling.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: pixpmusic

Merge Risk: ⚪ Minimal · up to 76d2c

The revert restores the mobile Git sheet styling on both platforms, with no merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the mobile Git sheets change and explains that the PR restores Platform.OS ternaries because Uniwind variants caused regressions.
Description check ✅ Passed The description provides detailed problem, root cause, fix, validation results, and follow-up context. It does not use the template headings or include embedded before/after screenshots, but it contai…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB +13 B (+0.1%) 15.1 KiB
Codex Thread snapshot wire 7.1 KiB 7.1 KiB −5 B (−0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.4 KiB 6.5 KiB +18 B (+0.3%) 7.8 KiB
Codex Live turn WebSocket decoded 56.2 KiB 56.2 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 9 9 0 (0.0%) 21
Claude Total thread wire 13.5 KiB 13.5 KiB 0 B (0.0%) 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +1 B (+0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB −1 B (−0.0%) 7.8 KiB
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 9 9 0 (0.0%) 21

Baseline: 3409651 · PR result: 76d2c87 · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 114.0 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@juliusmarminge
juliusmarminge merged commit 6dcde21 into main Sep 23, 2026
23 of 24 checks passed
@juliusmarminge
juliusmarminge deleted the fix/mobile-git-sheets-variant-revert branch September 23, 2026 00:31
@juliusmarminge

Copy link
Copy Markdown
Member Author

Integrated device recheck on the reverted head 76d2c8777b522be58e5181d19380c09e3c157d53, against the seeded isolated backend:

Android — Confirm action, broken variant build then reverted build

Before revert: Android Confirm action sheet has only its header; its body and buttons are blank
After revert: Android Confirm action sheet shows title, description, and both actions

iOS — Commit changes, broken variant build then reverted build

Before revert: iOS Commit changes sheet has shifted content and a partially obscured footer
After revert: iOS Commit changes sheet has the baseline spacing and visible footer actions

The Android Branches and Commit sheets also render their full bodies on the reverted head. This confirms the specific device regressions that prompted the revert. The underlying Uniwind platform-variant bug is being addressed separately.

juliusmarminge added a commit that referenced this pull request Sep 23, 2026
#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>
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 23, 2026
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant