Skip to content

fix(mobile): hide threads from switched-off environments - #16886

Merged
juliusmarminge merged 1 commit into
pingdotgg:mainfrom
entity:fix/mobile-hide-switched-off-environment-threads
Oct 7, 2026
Merged

juliusmarminge merged 1 commit into
pingdotgg:mainfrom
entity:fix/mobile-hide-switched-off-environment-threads

Conversation

@entity

@entity entity commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Problem

On iOS, switching an environment off in Settings → Environments leaves its threads in the home list, the iPad sidebar, and the thread arrangement sheet. Because settle and snooze support only covers enabled environments, those threads also drop off the Settled and Snoozed shelves and show as active. Reported in #15098.

Change

navigationThreadShellsAtom in packages/client-runtime/src/state/threadShell.ts looped over every saved environment (catalog.entries.keys()). It now uses enabledEnvironmentIds(...), like threadRefsAtom, threadShellsAtom, the project atoms, and the server-config atoms beside it.

This puts mobile back to how it behaved before #2829 and matches web, which still uses the enabled-only useThreadShells(): threads from a switched-off environment leave the list and come back, with their settled state, when it's switched back on. The atom is only used by mobile (HomeRouteScreen, ThreadNavigationSidebar, ThreadArrangementSheet), so web is unaffected.

Scope and approval

Fixes #15098. The triage comment on that issue confirms the regression, traces it to this atom, and notes that web, and mobile before #2829, hide threads from switched-off environments. This PR restores that behavior. It doesn't take on the alternative of keeping the threads visible and still settled, which would need server configs or settled state kept for switched-off environments and is a separate product choice.

Verification

  • Added leaves switched-off environments out of navigation to packages/client-runtime/src/state/threadShell.test.ts. With two environments, switching one off removes its threads from navigationThreadShellsAtom, and switching it back on brings them back.
  • Without the fix, the new test fails (expected Set{ 'environment-v2', 'remote-environment-v2' } to deeply equal Set{ 'environment-v2' }). With the fix, all 5 tests in the file pass (vp test run packages/client-runtime/src/state/threadShell.test.ts).
  • vp fmt --check and vp lint on both files and tsc --noEmit in packages/client-runtime pass.
  • I haven't checked this in the iOS app, and there are no before/after screenshots from a device yet. The issue has before screenshots from the reporter.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 7, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at f7913ce

Macroscope's review found this PR approvable — This is a narrowly scoped mobile bug fix that reuses the existing enabled-environment filter and adds a regression test for disabling and re-enabling environments. Existing enabled-environment behavior remains unchanged, with no schema, infrastructure, security, billing, or authentication impact.

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

@juliusmarminge
juliusmarminge enabled auto-merge (squash) October 7, 2026 17:04
@juliusmarminge
juliusmarminge merged commit 8d564a3 into pingdotgg:main Oct 7, 2026
29 checks passed
@entity
entity deleted the fix/mobile-hide-switched-off-environment-threads branch October 7, 2026 17:29
@entity

entity commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Wow that was quick, thanks @juliusmarminge 🎉

github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Oct 7, 2026
## What's Changed
* fix(web): replace Lineage timers with Stop on hover by @Bil0000 in pingdotgg/t3code#16791
* fix(clients): running subagent cards stay visible after their parent turn settles by @juliusmarminge in pingdotgg/t3code#16878
* feat: MCP apps render and run inline in threads by @juliusmarminge in pingdotgg/t3code#16236
* fix(server): a background Claude subagent's work shows while its parent is idle by @Vantrongs in pingdotgg/t3code#16486
* fix(mobile): hide threads from switched-off environments by @entity in pingdotgg/t3code#16886
* fix(server): a refused Claude turn no longer throws away its session by @SunkenInTime in pingdotgg/t3code#16287
* fix(web): onboarding Continue no longer locks on computers that won't connect by @juliusmarminge in pingdotgg/t3code#16887
* fix(server): worktree cleanup no longer deletes files hidden by showUntrackedFiles=no by @SunkenInTime in pingdotgg/t3code#15834
* fix(server): merged-worktree cleanup removes worktrees after squash merges by @tris203 in pingdotgg/t3code#14847
* fix(server): free worktrees for terminal thread statuses by @ANSHSINGH050404 in pingdotgg/t3code#15150
* fix(server): Windows worktrees with long paths no longer fail or strand by @That1Drifter in pingdotgg/t3code#14917
* fix(server): main typechecks again after a test used renamed helpers by @juliusmarminge in pingdotgg/t3code#16895
* fix(server): Claude prompts no longer hang on a uuid the session already holds by @juliusmarminge in pingdotgg/t3code#16897

## New Contributors
* @Vantrongs made their first contribution in pingdotgg/t3code#16486
* @entity made their first contribution in pingdotgg/t3code#16886
* @ANSHSINGH050404 made their first contribution in pingdotgg/t3code#15150
* @That1Drifter made their first contribution in pingdotgg/t3code#14917

**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261007.2774...v0.0.46-nightly.20261007.2787

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261007.2787
github-actions Bot added a commit to davidvanderklay/t3code-flake that referenced this pull request Oct 7, 2026
## What's Changed
* fix(web): replace Lineage timers with Stop on hover by @Bil0000 in pingdotgg/t3code#16791
* fix(clients): running subagent cards stay visible after their parent turn settles by @juliusmarminge in pingdotgg/t3code#16878
* feat: MCP apps render and run inline in threads by @juliusmarminge in pingdotgg/t3code#16236
* fix(server): a background Claude subagent's work shows while its parent is idle by @Vantrongs in pingdotgg/t3code#16486
* fix(mobile): hide threads from switched-off environments by @entity in pingdotgg/t3code#16886
* fix(server): a refused Claude turn no longer throws away its session by @SunkenInTime in pingdotgg/t3code#16287
* fix(web): onboarding Continue no longer locks on computers that won't connect by @juliusmarminge in pingdotgg/t3code#16887
* fix(server): worktree cleanup no longer deletes files hidden by showUntrackedFiles=no by @SunkenInTime in pingdotgg/t3code#15834
* fix(server): merged-worktree cleanup removes worktrees after squash merges by @tris203 in pingdotgg/t3code#14847
* fix(server): free worktrees for terminal thread statuses by @ANSHSINGH050404 in pingdotgg/t3code#15150
* fix(server): Windows worktrees with long paths no longer fail or strand by @That1Drifter in pingdotgg/t3code#14917
* fix(server): main typechecks again after a test used renamed helpers by @juliusmarminge in pingdotgg/t3code#16895
* fix(server): Claude prompts no longer hang on a uuid the session already holds by @juliusmarminge in pingdotgg/t3code#16897

## New Contributors
* @Vantrongs made their first contribution in pingdotgg/t3code#16486
* @entity made their first contribution in pingdotgg/t3code#16886
* @ANSHSINGH050404 made their first contribution in pingdotgg/t3code#15150
* @That1Drifter made their first contribution in pingdotgg/t3code#14917

**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261007.2774...v0.0.46-nightly.20261007.2787

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261007.2787
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: iOS App 2.0.0 (103) Settled Thread Behavior When Environment Disabled

2 participants