Skip to content

fix(mobile): hide changed-files navigator and restore refresh in raw diff fallback - #9828

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
lnieuwenhuis:fix/mobile-review-fallback
Sep 7, 2026
Merged

fix(mobile): hide changed-files navigator and restore refresh in raw diff fallback#9828
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
lnieuwenhuis:fix/mobile-review-fallback

Conversation

@lnieuwenhuis

@lnieuwenhuis lnieuwenhuis commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

When the native diff view is unavailable, the changed-files widget falls back to a raw patch ScrollView but keeps a navigator whose scroll targets no-op and offers no way to refresh on iOS.

Hide the navigator and its toggle in fallback mode and add pull-to-refresh to the fallback ScrollView.

Builds on #7867 (null-safe fallback) by addressing its two unresolved review threads.

Built with muse-spark-1.3-contributor via OpenCode in T3 Code.


Note

Low Risk
Review UI fallback and visibility gating only; no changes to auth, networking, or diff data loading.

Overview
When resolveNativeReviewDiffView() returns null (missing native module or still registering), ReviewSheet no longer assumes a native component exists. The native diff branch runs only when resolution succeeds; otherwise parsedDiff.kind === "files" degrades to an inline raw patch with a short “native diff view unavailable” message instead of crashing.

The changed-files workspace inspector and the sidebar.right header toggle are gated on a resolved native surface, since file navigation depends on scrollToFile on that view. In raw fallback, opening the pane would show an empty column or non-functional controls, so both are hidden in that case.

The fallback ScrollView (raw patch, empty states, and the new files-without-native path) gets RefreshControl wired to the existing handlePullToRefresh, restoring pull-to-refresh on iOS where only Android had a “Refresh current diff” menu action.

Reviewed by Cursor Bugbot for commit 9b9b859. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Hide changed-files navigator and restore refresh in raw diff fallback for ReviewSheet

  • Changes native diff view resolution to return a nullable result instead of asserting a component is always available
  • Adds an inline raw-patch fallback for file diffs when native resolution returns null, with pull-to-refresh via RefreshControl
  • Gates changed-file inspector registration and the auxiliary-pane toolbar button so they are hidden when the native diff view is unavailable
  • Adds RefreshControl to the non-native review content ScrollView for empty and other fallback states

Macroscope summarized 9b9b859.

Exotic209093 and others added 2 commits September 5, 2026 00:38
ReviewSheet force-unwrapped resolveNativeReviewDiffView(), which is
documented to return null while Expo registers the native view config
and forever after a failed requireNativeView (e.g. a binary without
the T3ReviewDiffSurface module). Rendering a null component type throws
"Element type is invalid", which is fatal in release builds: the app
crashes the moment the diff widget appears, and since the thread's
review section auto-selects from persisted checkpoints, every reopen
crashes again and the chat is burned.

Null-check the resolver like ThreadFeed's ReviewCommentCard already
does, and fall back to showing the raw patch when the native surface
is unavailable.

Fixes pingdotgg#7800

ox-alpha via opencode
…diff fallback

When the native diff surface is unavailable, the inspector navigator could
not scroll or filter the raw patch, and iOS had no refresh affordance.
Gate the navigator (and its toolbar toggle) on the native view resolving,
and add a RefreshControl to the fallback ScrollView.
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 4, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 9b9b859

Macroscope's review found this PR approvable — This is a focused one-file mobile bug fix that preserves the native diff path while making unavailable-native-view states render safely, hiding unusable navigation controls, and restoring refresh through the existing handler. It introduces no schema, security, deployment, product-default, or static-analysis changes.

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

@juliusmarminge
juliusmarminge merged commit bc3dc26 into pingdotgg:main Sep 7, 2026
23 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 7, 2026
## What's Changed
* fix(mobile): keep pending messages in the chat timeline by @juliusmarminge in pingdotgg/t3code#10449
* fix(mobile): show connection status in the floating pill instead of a second one by @juliusmarminge in pingdotgg/t3code#10440
* fix: use Pierre icons consistently for attachments by @juliusmarminge in pingdotgg/t3code#10475
* feat(mobile): open the thread screen as soon as a new task is submitted by @juliusmarminge in pingdotgg/t3code#10435
* fix(devcontainer): make repository setup work by @saphid in pingdotgg/t3code#7875
* fix(projects): prevent invalid script IDs from crashing threads by @saphid in pingdotgg/t3code#10019
* fix(mobile): hide changed-files navigator and restore refresh in raw diff fallback by @lnieuwenhuis in pingdotgg/t3code#9828
* fix(ios): scroll short source files from blank space by @juliusmarminge in pingdotgg/t3code#10178
* feat(mobile): start a new thread on an existing branch by @StiensWout in pingdotgg/t3code#10359
* fix(mobile): improve font-size slider performance and prevent maximum update depth errors by @bbernag in pingdotgg/t3code#7138
* fix(web): keep composer toolbar controls anchored during transitions by @juliusmarminge in pingdotgg/t3code#10478
* fix(web): resize the floating preview from any edge by @juliusmarminge in pingdotgg/t3code#10467
* fix(mobile): prevent chat from disappearing when scrolling by @juliusmarminge in pingdotgg/t3code#10479
* fix(mobile): smooth composer status pill resizing by @juliusmarminge in pingdotgg/t3code#10484
* fix(mobile): release initial scroll target after dragging by @juliusmarminge in pingdotgg/t3code#10483
* fix(mobile): animate thread lifecycle transitions consistently by @juliusmarminge in pingdotgg/t3code#10487
* fix(mobile): restore assistant message bottom padding by @juliusmarminge in pingdotgg/t3code#10491
* fix(mobile): preserve chat rows when toggling commands by @juliusmarminge in pingdotgg/t3code#10492

## New Contributors
* @bbernag made their first contribution in pingdotgg/t3code#7138

**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260907.1332...v0.0.40-nightly.20260907.1346

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.40-nightly.20260907.1346
raman325 added a commit to raman325/t3code that referenced this pull request Sep 7, 2026
* origin/main: (675 commits)
  fix(web): tolerate servers that predate git identity in project import (pingdotgg#10547)
  chore(mobile): bump app version to 1.1.0
  fix(mobile): wait for native thread scroll before reveal (pingdotgg#10486)
  fix(mobile): match Working status color to desktop
  fix(web): remove inserted citations on cancel (pingdotgg#10518)
  feat(web): group onboarding project import by repository (pingdotgg#10493)
  fix(mobile): preserve chat rows when toggling commands (pingdotgg#10492)
  fix(mobile): restore assistant message bottom padding (pingdotgg#10491)
  fix(mobile): animate thread lifecycle transitions consistently (pingdotgg#10487)
  fix(mobile): release initial scroll target after dragging (pingdotgg#10483)
  fix(mobile): smooth composer status pill resizing (pingdotgg#10484)
  fix(mobile): prevent chat from disappearing when scrolling (pingdotgg#10479)
  fix(web): resize the floating preview from any edge (pingdotgg#10467)
  fix(web): keep composer toolbar controls anchored during transitions (pingdotgg#10478)
  fix(mobile): improve font-size slider performance and prevent maximum update depth errors (pingdotgg#7138)
  feat(mobile): start a new thread on an existing branch (pingdotgg#10359)
  fix(ios): scroll short source files from blank space (pingdotgg#10178)
  fix(mobile): hide changed-files navigator and restore refresh in raw diff fallback (pingdotgg#9828)
  fix(projects): prevent invalid script IDs from crashing threads (pingdotgg#10019)
  fix(devcontainer): make repository setup work (pingdotgg#7875)
  ...

# Conflicts:
#	apps/server/src/provider/builtInDrivers.ts
#	docs/README.md
#	docs/user/install.md
#	packages/contracts/src/settings.test.ts
#	packages/contracts/src/settings.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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.

3 participants