fix(pi): restrict state reporting to TUI sessions - #2159
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughThe ChangesSession reporting
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c21f1c06-1d84-4c26-813c-c7e00f9f6706
📒 Files selected for processing (1)
src/integration/assets/pi/herdr-agent-state.ts
Greptile SummaryThe PR restricts Pi lifecycle reporting to TUI sessions and increments the managed integration version so installed extensions receive the fix.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/integration/assets/pi/herdr-agent-state.ts | Restricts lifecycle initialization to TUI mode and updates the managed extension version. |
| src/integration/assets/herdr-agent-state.test.ts | Updates reporting fixtures with TUI mode and adds RPC-mode regression coverage. |
| src/integration/tests.rs | Updates the bundled-asset assertion to match the new mode gate. |
| src/integration/mod.rs | Bumps the Pi integration version so existing installations are recognized as outdated. |
| tests/cli/sessions.rs | Updates the integration-status expectation for Pi version 8. |
Reviews (3): Last reviewed commit: "fix(pi): restrict state reporting to tui..." | Re-trigger Greptile
2098122 to
f73a9de
Compare
f73a9de to
42849b2
Compare
Problem
Pi RPC mode reports hasUI as true because it exposes UI APIs over JSON. When an RPC process inherits a Herdr pane environment, the managed Pi extension therefore reports a headless process as the pane agent.
Reproduced with Pi 0.83.0: the original extension sent Herdr lifecycle requests from RPC mode. With this change it sends none, while TUI reporting continues normally.
Fix
Require ctx.mode to be tui before starting lifecycle reporting. This excludes RPC, JSON, and print sessions. Bump the managed Pi integration to version 8 so existing installations receive the updated extension.
Tests