Skip to content

fix(mobile): new-task context no longer changes every render - #22134

Merged
maria-rcks merged 9 commits into
pingdotgg:mainfrom
flamboh:perf/mobile-new-task-context-memo
Oct 30, 2026
Merged

maria-rcks merged 9 commits into
pingdotgg:mainfrom
flamboh:perf/mobile-new-task-context-memo

Conversation

@flamboh

@flamboh flamboh commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Note

Written by gpt-6.1-sol on behalf of Maria

Problem

on mobile, the new-task provider and paginated branch hook lost compiler caches, causing unchanged renders to return new values and rerender consumers.

Change

moves sticky-model and model-clock subscriptions before model derivation, and host-environment derivation after the last hook, so the compiler retains those caches. two local useMemo calls keep branch page atoms stable while preserving live updates, pagination, refresh, and target changes. the scheduled-task branch picker uses the same hook.

keeps flamboh's original commits and the prior takeover fixes. merges current main (812c0a71c785) without rewriting history, preserving main's project-defaults flow. the diff remains four files.

Scope and approval

this is a focused fix for an existing cache invalidation bug, qualifying for the obvious-bug exemption in CONTRIBUTING.md. it restores stable values across unchanged renders without adding capabilities or changing defaults. both provider ordering and branch atom stability are needed to prevent new-task context churn.

Verification

verification at 510f5894e71c69443ad9e4d742d9aa2ff07d0fda:

  • vp run check:changed passed through blacksmith: formatting, lint, both knip passes, mobile/scripts typechecks, and 1,008 tests in four files.
  • existing tests check provider compiler-cache placement and render the release-compiled branch hook to verify stable identities, live updates, pagination, refresh, and directory/query/environment changes.
  • two independent read-only code reviews found no blockers or should-fix findings on this head.
  • reproduced the model-options cache regression after merging main, then moved the new minute-clock subscription before model derivation; the exact assertion and full changed-file checks pass. restored the branch hook's useMemo import after the merge.
  • prior-head android interaction and identity evidence remains in the pr discussion. native verification of this merged head is blocked: device access is off in this environment. no new appearance or timing claims. measured user-path performance and ios remain unverified.

originally also covers the branch-hook issue described in https://git.cafe/pingdotgg/t3code/pulls/22132.

gpt-6.1-sol via the codex harness in t3 code.

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

2 participants