Skip to content

fix: restore worktree status and resource indicators - #9048

Closed
slashdevcorpse wants to merge 2 commits into
stablyai:mainfrom
slashdevcorpse:slashdevcorpse/bug-visual-indicators-for-statuses-within-the-pr
Closed

slashdevcorpse wants to merge 2 commits into
stablyai:mainfrom
slashdevcorpse:slashdevcorpse/bug-visual-indicators-for-statuses-within-the-pr

Conversation

@slashdevcorpse

@slashdevcorpse slashdevcorpse commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #8813.

Root causes

  • The new-card status lane treated activity, review/branch identity, and unread state as replacements. Quiet activity could disappear behind a PR/MR icon, while working or permission could hide review/unread signals.
  • Child lifecycle handling was Codex-specific. Other Orca-compatible agents could publish lead completion while live children were still running, lose ownership through nested-agent events, or replay the wrong provider state after a relay/restart.
  • Windows resource collection used an independent WMIC-only query and hardcoded CPU to zero. Current Windows 11 installations can omit WMIC entirely.

Changes

  • Compose activity, PR/MR or branch identity, and unread in the existing 20px lane. Done has a distinct check icon; legacy cards remain unchanged.
  • Replace the Codex-only roster with a provider-neutral lifecycle contract. Claude, Codex, Copilot, OpenCode, and MiMo adapters now feed the same bounded child model; compatible custom status producers can provide deduplicated child snapshots without an agent allowlist.
  • Keep one lifecycle owner per pane. Nested agents can contribute prompt/tool/completion content without replacing the owner's provider, children, permission state, interruption state, or resumable session identity. Relay replay and disk hydration retain the same ownership metadata.
  • Ignore unmatched child-stop events so late delivery cannot create phantom working indicators. Providers without paired child signals remain lead-only rather than fabricating a roster.
  • Make OpenCode/MiMo lifecycle announcements ordered, bounded, timeout-protected, retryable after failed/non-2xx delivery, and generation-aware after an Orca endpoint restart.
  • Install the MiMo plugin overlay for native, WSL, and SSH launches while preserving user configuration. WSL path interop and relay materialization use the host that actually runs the agent.
  • Keep resource attribution a PTY/worktree process-tree contract, independent of provider metadata. Share the cached Windows process table between foreground detection and resource collection; use CIM working set immediately and interval CPU sampling with PID-reuse, counter, timing, missing-field, and logical-core guards, while retaining WMIC fallback and the Unix ps path.

Compatibility

  • Native, WSL, and SSH lifecycle state use the same normalized payload and bounded child rules.
  • WSL resource totals remain the host-visible WSL process tree.
  • SSH preserves child state through relay/replay; remote resources are not added to local totals.
  • Review rendering remains provider-neutral with PR/MR wording.
  • Hook/plugin-driven lifecycle reporting still requires the corresponding integration to be enabled. Copilot's general-purpose subtype does not currently emit paired child hooks upstream, so it remains lead-only.

Validation

  • Final affected-surface matrix: 24 test files passed; 727 tests passed, 7 platform-skipped.
  • Independent adversarial lifecycle/relay/server review: 435/435 passed.
  • OpenCode/MiMo generated-plugin delivery coverage: 52 passed, 3 skipped.
  • MiMo SSH/WSL overlay coverage: 93 passed, 13 skipped.
  • Full typecheck and lint/reliability/localization gates passed.
  • Relay builds passed for Linux, macOS, Windows, and WSL; the production Electron build passed.
  • Formatting, max-lines ratchet, staged diff audit, and git diff --check passed.
  • Live Windows 11 proof: WMIC unavailable; the latest 697-row CIM scan returned complete CreationDate, counter, and working-set fields for every process.
  • The broader repository suite still has unrelated Windows baseline failures (POSIX signal/path expectations and platform fixture tests); representative failures reproduce in isolation outside this diff.

Reproduction note

On the reproducing machine, agent hooks are separately disabled and Codex managed hooks are not installed. This PR does not toggle or auto-enable that user preference; live lifecycle verification requires the relevant agent integration to be enabled.

ELI5

Worktree cards were hiding useful status—activity, PR info, and unread badges could overwrite each other. Indicators are restored so you can see working state, reviews, and unread signals at the same time.

@BluesYoung-web

Copy link
Copy Markdown
Contributor

MiMo auth/runtime ownership blocker

The new WSL/SSH MiMo materialization in this PR repeats an existing native authentication bug tracked in #9132. I opened draft PR #9133 with a config-only native fix and regression coverage.

MiMoCode 0.1.6 resolves credentials from <Global.Path.data>/auth.json, and MIMOCODE_HOME redirects data, cache, config, and state together. In the current #9048 head (8dbeaceeb716):

  • src/relay/plugin-overlay.ts::materializeMimo() creates a complete per-pane home
  • it mirrors only config/
  • it creates fresh data/cache/state directories
  • buildMimoCodePluginOverlayEnv() then exports that home as MIMOCODE_HOME
  • shell-ready restores the overlay after user startup files

That means successful SSH materialization changes auth lookup from the remote canonical data directory to:

~/.orca-relay/mimocode-overlays/<pane-hash>/data/auth.json

The overlay data directory is empty. If a user logs in inside that pane, the new credential is pane-local and is deleted by overlay cleanup instead of updating canonical storage.

The WSL path has the same ownership issue: the Windows-created complete home is passed through WSLENV, so WSL MiMo no longer reads its own canonical guest data/auth store. A guest POSIX source home is also resolved by Windows existsSync, so config preservation is not sufficient there either.

The current tests assert that data/ exists, but do not create a canonical MiMo auth sentinel or verify provider/auth visibility, first-login writeback, credential refresh sharing, or fallback restoration. An empty data/ directory is the failure condition here, not proof of preservation.

Orca 1.4.143 SSH provides a useful baseline: MIMOCODE_HOME and ORCA_MIMOCODE_HOME are unset, and MiMo resolves remote canonical data under ~/.local/share/mimocode; authenticated requests succeed. The overlay path should preserve that invariant while adding the plugin.

Suggested integration

Use target-host MIMOCODE_CONFIG_DIR overlays instead of complete MIMOCODE_HOME overlays:

  • native: fix(mimo): preserve canonical data when injecting status hooks #9133 provides the config-only service, PTY isolation, failure safety, and contract probe
  • WSL: materialize the same config-only overlay inside the target distro
  • SSH: use this PR's relay transport/materializer, but return a config overlay path and set MIMOCODE_CONFIG_DIR
  • preserve target-host canonical auth, sessions, memory, data, cache, state, and SQLite
  • plugin installation failure must leave MiMo usable without status reporting

I recommend treating canonical auth visibility as a merge gate for the WSL/SSH MiMo additions. I am happy for #9133 to be cherry-picked/rebased or for its config-only contract/tests to be folded into this PR, depending on maintainer preference.

@failpunk

Copy link
Copy Markdown

This fix is a pretty core issue with the platform. If you run more than just a couple of agents, it's impossible to tell who is working and who's not.

@brennanb2025

Copy link
Copy Markdown
Contributor

Taking a look!

@nwparker

nwparker commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Closing as superseded by focused fixes that have now landed: Windows CPU and memory attribution in #8845, OpenCode lifecycle delivery in #11017, and the #8813 workspace status visual fix in #12658. This 43-file branch also bundles lifecycle, subagent, WSL, SSH, relay, and provider work that should not be merged as one stale cross-cutting change. Please open narrow follow-ups for any remaining reproducible gaps.

@nwparker nwparker closed this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] visual indicators for statuses within the project dont appear

5 participants