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
aorwall added a commit to aorwall/t3code that referenced this pull request Oct 12, 2026
Merges `pingdotgg/t3code` `0f09627a11` (44 commits since `cd41c4ada0`)
into the fork. Branched from `main` at `75baf5f94`; no other merge PR is
open.

## Resolution

- **Counts:** 320 files landed against 320 in the upstream range, an
exact match. The fork delta is still 765 files.
- **Conflicts (2, both `converged`):**
- `apps/web/src/components/ChatMarkdown.tsx`: the fork's Moatless
Artifact chip still renders before upstream's new thread-link renderer
(pingdotgg#17017).
- `apps/web/src/components/chat/ThreadDetailsPanel.tsx`: took upstream's
merged environment and branch row (pingdotgg#16823) and re-applied
`FEATURES.openInEditor`.
- `pnpm-lock.yaml` was re-derived with `install.mjs`.
- `duplicate-adds.mjs` and `resolution-check.mjs` found nothing.
- **Unsupported methods:** added `UnsupportedMethodError` to
`mcpApps.callTool`, `toolInfo`, `readResource` and `updateModelContext`.
Nothing to drop.
- Formatted `docs/fork/inventory.json`, which was unformatted on `main`.

## Verification

`verify.mjs` passed duplicate-adds, tripwires, resolution-check,
unsupported-methods, lockfile, fmt, lint, typecheck and build. The
`test` step failed:
- `@t3tools/web` failed the full run and passed in isolation.
- In `t3`, `OpenCodeServerLedger`, `AcpAdapterV2`,
`OrchestratorReplayFixtures` and `ServerBrowserPage` fail when run
alone. This is the same set the 2026-10-07 merge recorded: the sandbox
does not reap process groups, `CLAUDE_CONFIG_DIR` leaks, and
Playwright's headless shell is missing. Machine, not code.

## Usable as-is
- Thread links reference the thread id and open in the app (pingdotgg#17017,
pingdotgg#16782 client half)
- Find in diffs with Cmd+F (pingdotgg#14623)
- Block-level Markdown in the rich-text composer (pingdotgg#14677)
- The live row shows the agent's latest thought (pingdotgg#16284), and running
subagent cards stay visible (pingdotgg#16878)
- Simplified workspace card rows (pingdotgg#16823), centred project monograms
(pingdotgg#16841), file icons for 14 more languages (pingdotgg#16974)
- Composer fixes: citation-cancel spacing (pingdotgg#16828), type-to-focus
scrambling (pingdotgg#14595)
- Lineage: Stop on hover (pingdotgg#16791), live names in thread-read activity
(pingdotgg#13140)
- Model catalogue: Claude Haiku 5.5, with Sonnet 5 and Opus 5 retired to
legacy (pingdotgg#16903)
- Mobile, desktop and onboarding fixes (pingdotgg#16713, pingdotgg#15856, pingdotgg#16733, pingdotgg#16886,
pingdotgg#16885, pingdotgg#16939, pingdotgg#16676, pingdotgg#16887)

## Unsupported in Moatless / needs implementation
- **MCP apps inline in threads** (pingdotgg#16236): `mcpApps.callTool`,
`mcpApps.toolInfo`, `mcpApps.readResource`,
`mcpApps.updateModelContext`, and the `McpAppFrame.tsx` UI. The frame
mounts only for a work-log item that carries an MCP app snapshot.
Upstream's Codex adapter projects that snapshot; Moatless does not, so
nothing renders. Moatless would need to project the snapshots and
dispatch the family. The new union entries are recorded in
`docs/fork/gaps.md`.
- **Provider update live progress** (pingdotgg#16958) and **install the `t3`
command from Settings** (pingdotgg#16683): behind `providerConfiguration` and the
desktop bridge respectively. Nothing new is reachable.
- **Copy MCP URL over plain http** (pingdotgg#16909): still behind
`FEATURES.connections`.

## Backend behavior to consider reproducing in Moatless
- The orchestrator MCP thread list and detail report and filter on
snooze state (`snoozed`, `snoozedUntil`; pingdotgg#16782).
- Idle Codex threads are unloaded from the shared app-server (pingdotgg#16917).
- A refused Claude turn keeps its session (pingdotgg#16287), and a prompt does
not hang on a uuid the session already holds (pingdotgg#16897).
- Claude 5-series models always run with 1M context (pingdotgg#16908).
- A background Claude subagent's work shows while its parent is idle
(pingdotgg#16486).
- Worktree cleanup: freed for terminal thread statuses (pingdotgg#15150), removed
after squash merges (pingdotgg#14847), files hidden by `showUntrackedFiles=no`
are kept (pingdotgg#15834), and Windows long paths work (pingdotgg#14917).
- Replaying a command or opening a long thread no longer blocks the
server (pingdotgg#17041, pingdotgg#17029).
- GitHub: rate limits are read from response headers, and GraphQL
batches use variables (pingdotgg#16986, pingdotgg#16960). `ChangeRequest` gained an
optional `headSha`.

All of these are recorded under "Runtime fixes upstream made to its own
server" in `docs/fork/gaps.md`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---
Moatless task:
https://moatless.soaplabstest.com/tasks/af277a83-a9de-4d81-9c77-866e383cdb99
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