Repository navigation
Conversation
📝 WalkthroughWalkthroughThis change adds a 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
da52b60 to
b28539e
Compare
|
Rebased onto latest |
|
Correction: rebased tip is |
Regression tests for stablyai#7814 / stablyai#7817: with global agent status hooks on, disabledTuiAgents must prevent managed orca-*.ts extension install into ~/.pi and ~/.omp.
b28539e to
096790a
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
85b1762 to
7637a4e
Compare
Regression tests for stablyai#7814 / stablyai#7817: with global agent status hooks on, disabledTuiAgents must prevent managed orca-*.ts extension install into ~/.pi and ~/.omp.
7637a4e to
8037d92
Compare
|
Taking a look! |
823be4d to
ba94c0f
Compare
Greptile SummaryThis PR fixes a bug where Pi and OMP status hook extensions (
Confidence Score: 5/5Safe to merge — the change is narrowly scoped to gating filesystem writes for Pi/OMP extensions when those agents are disabled, with no risk to unrelated agents or hook infrastructure. The fix is minimal: two boolean guards added inside an already-guarded block, forwarding an existing settings field through three call sites. isTuiAgentEnabled correctly handles null/undefined as nothing disabled, preserving default behavior. All three buildPtyHostEnv call sites are updated with no others missed. Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| src/main/ipc/pty.ts | Adds disabledTuiAgents to BuildPtyHostEnvOptions and gates Pi/OMP extension installation with isTuiAgentEnabled checks; all three buildPtyHostEnv call sites updated consistently. |
| src/main/ipc/pty.test.ts | Adds disabledTuiAgents to the getSettings mock type and two new test cases covering Pi-disabled and OMP-disabled scenarios; correctly relies on isAgentStatusHooksEnabled defaulting to true when the field is absent. |
Reviews (2): Last reviewed commit: "fix(pty): type disabledTuiAgents as TuiA..." | Re-trigger Greptile
858eab7 to
07e6711
Compare
… extensions When `agentStatusHooksEnabled` was true, Orca would still install the managed `orca-*.ts` extension files into `~/.pi/agent/extensions` (and the OMP equivalent) even if the user had explicitly disabled the Pi agent in Settings > Agents. This happened because `buildPtyHostEnv` defaulted `piAgentKind` to "pi" for nearly all local PTY spawns (everything that was not OMP) and would unconditionally call `piTitlebarExtensionService.buildPtyEnv` as long as the global hooks flag was set. There was no check against the per-agent `disabledTuiAgents` list from user settings. We now guard both the Pi and OMP extension installation paths with `isTuiAgentEnabled(...)`, and forward `disabledTuiAgents` from settings in all three call sites of `buildPtyHostEnv`. Fixes stablyai#7814
Regression tests for stablyai#7814 / stablyai#7817: with global agent status hooks on, disabledTuiAgents must prevent managed orca-*.ts extension install into ~/.pi and ~/.omp.
Main's bare-shell shadow prep now passes materializeDefaultHome; keep the stablyai#7814 disabled-Pi assertion on that contract.
BuildPtyHostEnvOptions already imports TuiAgent; use it so callers get a compile-time check instead of silently dropping unknown values.
fdb1a86 to
5f67233
Compare
|
Closing as part of fork PR backlog cleanup. Long-conflicted against current main; reopen if still needed. |
Summary
When
agentStatusHooksEnabledis true globally, Orca was still installing managed status hook extensions (orca-*.ts) into~/.pi/agent/extensions(and the OMP equivalent) even if the user disabled Pi/OMP under Settings → Agents.buildPtyHostEnvnow gates Pi and OMP extension install withisTuiAgentEnabled(...), and all spawn call sites forwarddisabledTuiAgentsfrom settings.Fixes #7814
Screenshots
No visual change.
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildvitest run src/main/ipc/pty.test.ts -t "skips Pi managed extensions|skips OMP managed extensions|installs Pi managed extensions"(4 passed)AI Review Report
Scoped change in
buildPtyHostEnv+ settings plumbing. Checked:disabledTuiAgentslist; no platform-specific branching.buildPtyHostEnvon local, daemon, and related spawn paths that already pass settings.isTuiAgentEnabledcheck per spawn when hooks are enabled.Security Audit
disabledTuiAgentssettings into host env construction.~/.pi/~/.ompwhen the user disabled those agents.Notes
origin/main@0b65d725c98d.ELI5
Even if you disabled Pi/OMP under Agents, Orca still installed status hook files for them. Hooks now respect the per-agent disabled setting when the global toggle is on.