Repository navigation
fix(commands): broadcast location catalog events to all stream clients - #406
Conversation
Location-scoped command, agent and skill catalog events were only delivered to clients subscribed to the originating directory, so a client attached to another location never saw a catalog change and its slash menu stayed on the builtin commands. Route command.updated, agent.updated and skill.updated through the resolved-event broadcast so every connected client receives them.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (2)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe SSE aggregator now broadcasts directory-bearing ChangesLocation-catalog event broadcast
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This change delivers command, agent, and skill catalog updates to all connected clients, which is the stated intent. No merge-blocking risk was found. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
…builtin seed The commands query seeded every new directory key with the builtin commands as initialData. With the app's 10s staleTime, React Query treated that seed as freshly fetched data, so switching to a session in another project never requested that location's commands and the slash menu showed only the builtins until some later invalidation. Mark the seed as stale with initialDataUpdatedAt: 0 so each directory fetches its commands on mount.
The slash menu prefixed every command with the Command (⌘) glyph, which the leading "/" already conveys and which only consumed horizontal space. Render the kind icon only for kinds that have one, so command rows start at the label while agent, skill and file rows keep theirs.
Summary
Location-scoped catalog events (
command.updated,agent.updated,skill.updated) were only delivered to clients subscribed to the originating directory. A client attached to another location never saw the change, so its slash menu stayed on the builtin commands. These events now route through the resolved-event broadcast so every connected client receives them.Type of Change
Checklist
pnpm lintpasses locallypnpm typecheckpasses locallyBackend
sse-aggregatortests pass (38/38), backend lint reports 0 errors, and backend typecheck passes.Summary by CodeRabbit