Route thread commands through daemon - #309
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR adds thread and message management commands routed through daemon text endpoints to project-service APIs. It extends CORE_API_ROUTES with thread/message path constants, adds rendering helpers in core-text.ts, implements new shim CLI commands (threads, thread, message), adds corresponding daemon route handlers with validation, and updates dispatch wiring and tests. Documentation reclassifies these commands from LEGACY to CUT. ChangesThread/message text routes
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Shim as installed-aimux-shim.sh
participant Daemon as daemon.ts
participant ProjectService as Project Service API
participant Render as core-text.ts
Shim->>Daemon: GET/POST /core/thread(s)/*-text or /core/message/send-text
Daemon->>Daemon: validate input (requiredProjectServiceObject, csvParam)
Daemon->>ProjectService: getProjectServiceJson/postProjectServiceJson
ProjectService-->>Daemon: thread/message JSON response
Daemon->>Render: renderCoreThread*/MessageSendLines(payload)
Render-->>Daemon: formatted text lines
Daemon-->>Shim: CLI text/json response
Possibly related PRs
🚥 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: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/command-ownership-inventory.md`:
- Line 61: The `aimux thread ...` and `aimux message ...` row is classified as
`CUT` before the family has text/JSON parity, which conflicts with the
document’s own enforcement rule. Update the inventory entry to keep these
commands in `SIDEcar`/`LEGACY` until the related shim commands such as `thread
open/send/mark-seen/status` and `message send` support `--json`, or otherwise
close the JSON gap first before reclassifying this family in the table.
In `@scripts/installed-aimux-shim.sh`:
- Around line 750-925: The new subcommand parsers in aimux_try_message and the
thread command branches (open, send, mark-seen, status) bypass the same input
validation used by aimux_parse_project_json_args and
aimux_parse_project_json_args_with_session. Add the missing guards for every
parsed option so each flag rejects values that start with "-" and rejects empty
"--flag=" values, matching the shared helpers’ behavior. Apply this consistently
to the per-flag case handling for project_root, title, from, participants, to,
assignee, tool, worktree, kind, status, owner, and waiting_on so invalid input
falls back cleanly instead of being forwarded to aimux_post_query_text_route.
- Around line 750-925: The threaded and message mutation fast paths are missing
`--json` support, so they do not preserve the same JSON/text behavior as the
other CUT mutation commands. Update the argument parsing in `aimux_try_thread`
and `aimux_try_message` for `open`, `send`, `mark-seen`, `status`, and `message
send` to recognize `--json` and carry that flag through to
`aimux_post_query_text_route` by appending `?json=1` when set, matching the
existing pattern used by the other mutation paths.
In `@src/daemon.ts`:
- Around line 784-807: The participants guard in threadOpenTextRoute only checks
for a falsy value, so an empty array from csvParam still slips through. Update
the validation in threadOpenTextRoute to reject both missing and empty
participants, matching the pattern used in messageSendTextRoute by checking for
no value or zero length before calling postProjectServiceJson.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c204f9c5-2939-452d-bb15-3737dcbf59c8
📒 Files selected for processing (8)
docs/command-ownership-inventory.mdscripts/installed-aimux-shim.shsrc/core-command-contract.tssrc/core-command-ownership.test.tssrc/core-text.tssrc/daemon.test.tssrc/daemon.tssrc/installed-shim.test.ts
Summary
Verification
Summary by CodeRabbit
New Features
Bug Fixes
Documentation