Skip to content

perf(mobile): reduce runtime work and refresh preview URLs (chase 261028 B30) - #1959

Merged
lidge-jun merged 11 commits into
devfrom
chase/261028-b30-mobile-runtime-cost
Oct 27, 2026
Merged

lidge-jun merged 11 commits into
devfrom
chase/261028-b30-mobile-runtime-cost

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Mobile thread rows repeat clock and SVG work, pending move holds can survive a snooze wake without an open list, and native playback can reuse an expired signed URL after suspension. This bundle shares the recurring work, gives holds their own wake subscriptions, and refreshes playback authorization while preserving GOAT's mobile UI.

Upstream commit Upstream PR Verdict What GOAT got
a4fbea86537af2afc7405417e63701555f267b07 #25612 adapt Shared visibility-gated second clock, shared snooze-gate deadlines, successful SVG fetch/parse caching across remounts; failed loads remain retryable.
edf5a24b568371b27f23cc5fff92b4a225df3276 #25854 adapt Subagent sheet and grouped elapsed labels use the shared visible clock.
03be432a5d8de7201cf46ca94100b45f4893278c #25809 adapt Pending moves subscribe to minute/deadline clocks independently of mounted lists and tear down superseded holds; the snooze clock reads time inside its state updater so React Compiler cannot retain a pre-deadline reading.
5811d5c846e8fae712da46a741870e620717a234 #25740 adapt Widget refreshes observe presentations outside React while retaining foreground, connection-change and interval refresh behavior.
0d88fcf3d541ed986a856a5e4eabdff433ad156b #25910 take Render-phase worktree snapshot hold removes the effect-triggered second commit. Cherry-picked with -x; resolved package names to GOAT.
220eb73524ca7882d53b6a12c824ccbcd97ad279 #25527 adapt Fresh native video URLs per presentation, destination origin read after signing across reconnect, source identity isolation, and a local file lease held through native dismissal.
58c31f293d9ca52aded8dcfbceb4f63c704a1b72 #25895 adapt Stable native permission observation with stale-result rejection, plus an explicit 20-second release-lookup timeout error on both update entry points.

GOAT adjustments:

  • Preserved GOAT's image retry behavior, native preview UI, Connect gating, permission request behavior, release-channel lookup, and UTC minuteTickToEpochMs conversion.
  • Kept the widget hook in its existing coordinator and kept existing app-service installation paths.
  • C4 coverage added for denied signing, disconnect during signing, the destination origin after reconnect, obsolete source results, native lease lifetime, denied permission results, out-of-order reads, explicit permission writes, and late reads after unmount. Added timeout/cancellation coverage using TestClock. These tests have not run locally.
  • Mobile is the affected client. Web/desktop, providers, wire contracts, MCP, and server paths do not change. Both home/sidebar pending-move callers and both settings update-check entry points were updated. No user workflow documentation changes are needed.

Not taken:

No full card row was left out. Excluded unrelated copy-button/PR-cache restructuring from #25612, file-sharing callback restructuring from #25854, list component restructuring from #25809, app-service relocation from #25740, broad media component/Atom reorganization from #25527, and settings Atom/state/microphone restructuring from #25895. Android already keys local playback loading by file identity (VideoPreviewModal.tsx); web PDF handling remains untouched.

Rename residue inventory (git show <sha> added lines matching ^\+.*\b[Tt]3):

Commit Names added upstream Disposition
a4fbea8653 @t3tools/client-runtime/clock, @t3tools/contracts Clock import uses @goat/ via existing package-scope rule (scripts/lib/goat-rename/rules.ts:333); PR-summary contracts hunk excluded.
edf5a24b56 none No new names.
03be432a5d @t3tools/client-runtime/clock Uses @goat/ via package-scope.
5811d5c846 @t3tools/contracts, @t3tools/client-runtime/state/runtime Installer and installer-test hunks excluded; existing GOAT hook retained.
0d88fcf3d5 none No new names in added lines; existing package imports kept as GOAT during conflict resolution.
220eb73524 @t3tools/contracts, @t3tools/client-runtime/state/runtime, t3code/react-effect-budget Broad Atom/helper and shared presentation-hook hunks excluded. All retained imports use @goat/; existing lint rule mapping is lint-rule-ids.
58c31f293d @t3tools/client-runtime/state/runtime, @t3tools/contracts, T3 Code release comment Atom rewrite and comment excluded; retained settings logic uses existing GOAT imports and release lookup.

No additional legacy/wire/frozen-wrapper name was introduced or kept by these changes. No rename rules changed.

Verification:

  • vp fmt <29 changed files> — exit 0, formatted all 29 files.
  • git diff --check origin/dev...HEAD — exit 0.
  • git diff --exit-code — exit 0 after formatting; clean checkout.
  • node scripts/goat-rename.ts --apply — exit 0 after the take; dropped 0 paths, rewrote 0 files, moved 0 paths.
  • node scripts/goat-rename.ts --check — exit 0; 0 lines with T3 residue in 0 files, 0 dropped paths.
  • Push-range added-line scan found no developer paths, session IDs, credential names, or identifying developer email strings.
  • Regression tests were added before their corresponding fixes where practical, but no red/green execution is claimed. PR goat-ci is the test/typecheck verification; this lane does not wait for CI.

NOT RUN: vp test run <changed tests and tests beside changed code> (including vitest and regression red/green), vp run check:changed, vp run typecheck, server suites, all lockf-wrapped checks, builds, browser captures, native iOS/Android verification, and CI completion. Local suites/typechecking/builds were omitted under the explicit user override; browser/native verification is unavailable on this machine. No dev server was started.

Review round 1

  • Major finding 1 — omitted React Compiler-safe clock correction: addressed in b975ec57e7566e62b76f3f3ec8f7567dcf4de979. Adapted the 03be432a5d updater-based useNowAfter clock read while retaining GOAT's UTC conversion. Added a regression in the existing clock.test.ts and selected it in the existing release-compiler React project: mount before the queued-start deadline, retain the disabled snooze action at the inclusive two-minute boundary, then assert that the returned time advances and the real canSnooze gate opens one millisecond later. This shared hook covers Home/sidebar rows on iOS and Android.
  • Fresh static verification for this fix: vp fmt apps/mobile/src/lib/clock.ts apps/mobile/src/lib/clock.test.ts apps/mobile/vite.config.ts — exit 0; git diff --check — exit 0; node scripts/goat-rename.ts --check — exit 0 (0 lines with T3 residue in 0 files, 0 dropped paths).
  • NOT RUN: focused vp test run apps/mobile/src/lib/clock.test.ts, all other local test suites (including vitest), regression red/green, vp run check:changed, vp run typecheck, lint/knip suites, all lockf-wrapped runs, builds, browser captures and native iOS/Android verification. Local test/check suites are prohibited by the explicit user override; browser/mobile verification is unavailable. The pre-commit vp staged hook was bypassed for this commit to keep local verification within the permitted static commands. PR goat-ci remains the test/typecheck verification; this lane does not wait for CI completion. The known origin/dev ComputerUseLeases.ts budget failure is outside this fix.

Model: gpt-6.1-sol via GOAT delegated task (Codex harness)

CI fixes: 0476742d7caa09c00c2516cf564a43c30232a6c6 (on b975ec57e7566e62b76f3f3ec8f7567dcf4de979) preserves mocked platform reads in the permission hook's React test transform while keeping React Compiler enabled and release compiler coverage unchanged; replaces the iOS video effect's unsupported try/finally with Promise.finally to retain the local lease through native dismissal; replaces the update-check tests' manual Effect runtimes with promise handoffs; removes both unused nowMinute variables and the lint-rejected regression comment. Assertions and compiler bailout expectations remain unchanged. Fresh static checks: formatting of all 6 changed files, GOAT rename check (0 residue), changed-file Oxlint with the repository lint configuration, and git diff --check all exited 0. The staged-check hook was bypassed under the local-suite ban. The unrelated DesktopTargetHost.test.ts code-budget regression remains outside this lane.

NOT RUN for CI fixes: both named failing test files (useNotificationPermissionStatus.test.tsx, reactCompilerCoverage.test.ts), all other local test suites/Vitest and regression red/green, vp run check:changed, vp run typecheck, package tsc, all lockf-wrapped runs, builds, the single-file Babel compiler diagnostic, browser/native verification, and CI completion, under the explicit static-only override. PR goat-ci is the behavioral verification; this lane does not wait, merge, or watch.

lidge-jun and others added 10 commits October 28, 2026 04:19
Upstream: a4fbea86537af2afc7405417e63701555f267b07 (#25612)
Upstream: edf5a24b568371b27f23cc5fff92b4a225df3276 (#25854)
Upstream: 03be432a5d8de7201cf46ca94100b45f4893278c (#25809)
Upstream: 5811d5c846e8fae712da46a741870e620717a234 (#25740)
…25910)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0d88fcf3d541ed986a856a5e4eabdff433ad156b)
Upstream: 220eb73524ca7882d53b6a12c824ccbcd97ad279 (#25527)
Upstream: 58c31f293d9ca52aded8dcfbceb4f63c704a1b72 (#25895)
@lidge-jun lidge-jun closed this Oct 27, 2026
@lidge-jun lidge-jun reopened this Oct 27, 2026
@lidge-jun
lidge-jun merged commit b4a9adb into dev Oct 27, 2026
4 of 8 checks passed
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