Repository navigation
Fix noisy Grok tool notifications - #6306
Conversation
📝 WalkthroughWalkthroughThe PR adds Grok-specific routine permission prompt handling in shared hook normalization, returning null for that notification type. It also adds unit tests in shared and renderer hook notifications, a Grok hook POST helper, and an e2e scenario covering Grok hook status transitions and terminal completion dispatch timing. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/hooks/agent-hook-completion-notifications.test.ts (1)
444-493: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winThis test does not actually guard the suppression logic.
dispatchTerminalNotificationonly fires when the coordinator observes adonestate after the quiet period;working/waitingstatuses never trigger it. So thenot.toHaveBeenCalled()check at Line 471 and the final single-dispatch assertion would still pass even ifnormalizeGrokEventreturned awaitingpayload for the routine permission prompt instead ofnull. The test therefore doesn't distinguish "suppressed" from "routed as waiting" and won't catch a regression inisGrokRoutinePermissionPromptNotification.Consider asserting the normalization contract directly inside the simulator, e.g. capture/return the
eventand assert it isnullfor the permission-prompt payloads.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: dee497a2-8be8-406d-bfe2-2c44de144431
📒 Files selected for processing (5)
src/renderer/src/hooks/agent-hook-completion-notifications.test.tssrc/shared/agent-hook-listener.test.tssrc/shared/agent-hook-listener.tstests/e2e/droid-notification.spec.tstests/e2e/helpers/agent-hook-endpoint.ts
|
cc @JudouM |
…res (#39715) Cap merged atlas pages at FORCED_MAX_TEXTURE_SIZE instead of the device MAX_TEXTURE_SIZE (16384 on Apple Silicon), stop the link render layer from acquiring the shared atlas with a mismatched 2048 texture size, and reset GL texture slots of removed atlas pages to the 1x1 placeholder. Mirrors xtermjs/xterm.js#6187, #6156 and #6306 in the addon-webgl source patch and regenerates the runtime patch and lock hash. Co-authored-by: FlamingoPg <1106310035@qq.com>
Summary
Notification(permission_prompt)/Tool permission requestedinfo hook before tool useRepro / Diagnosis
Using installed
grok 0.2.64, Grok emits routine notification hooks before tool use:{ "hookEventName": "notification", "notificationType": "permission_prompt", "message": "Tool permission requested", "level": "info" }Orca previously treated that broad permission-looking notification as
waiting, which could drive non-actionable "Using Shell" / "Using Glob" notifications. The fix ignores only this routine info notification;PreToolUsestill reports progress and Grokstop/ real feedback notifications still flow normally.Evidence
grok --version->grok 0.2.64 (9a9ac25b10f) [stable]pnpm exec vitest run --config config/vitest.config.ts src/shared/agent-hook-listener.test.ts src/renderer/src/hooks/agent-hook-completion-notifications.test.ts-> 2 files passed, 60 tests passedpnpm exec oxlint src/shared/agent-hook-listener.ts src/shared/agent-hook-listener.test.ts src/renderer/src/hooks/agent-hook-completion-notifications.test.ts tests/e2e/helpers/agent-hook-endpoint.ts tests/e2e/droid-notification.spec.ts-> passedpnpm exec oxfmt --check src/shared/agent-hook-listener.ts src/shared/agent-hook-listener.test.ts src/renderer/src/hooks/agent-hook-completion-notifications.test.ts tests/e2e/helpers/agent-hook-endpoint.ts tests/e2e/droid-notification.spec.ts-> passedpnpm run typecheck-> passedpnpm exec playwright test tests/e2e/droid-notification.spec.ts --config tests/playwright.config.ts --project electron-headless --workers=1-> 4 passedThe new Electron e2e case verifies Grok reaches
working, the routine permission prompt does not setwaitingor dispatch a task-complete notification, and Grokstopstill reachesdone.