Skip to content

Complete web API parity surface - #252

Merged
TraderSamwise merged 4 commits into
masterfrom
feat/web-api-parity-completion
Jun 26, 2026
Merged

Complete web API parity surface#252
TraderSamwise merged 4 commits into
masterfrom
feat/web-api-parity-completion

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • add typed app wrappers for teammate lifecycle/task routes and stream route helpers
  • mark remaining planned project API route gaps as covered or unsupported legacy
  • add web teammate controls to the agent chat screen for create/list/task/stop/resume/kill

Verification

  • cd app && yarn typecheck
  • cd app && yarn eslint components/teammate-panel.tsx components/screens/AgentChatScreen.tsx lib/api.ts lib/api.test.ts lib/project-api-route-coverage.ts lib/project-api-route-coverage.test.ts
  • cd app && yarn test
  • cd app && yarn test lib/project-api-route-coverage.test.ts
  • yarn verify

Note: full app lint still fails on pre-existing unrelated files: app/stores/projectViews.test.ts prettier plus existing react-hooks set-state-in-effect warnings.

Summary by CodeRabbit

  • New Features

    • Added a teammate management panel to the agent chat screen when a session is active.
    • Introduced teammate creation, task assignment, and lifecycle controls such as refresh, stop, resume, kill, and restore.
    • Added support for new agent and interaction streaming routes.
  • Bug Fixes

    • Improved session-specific rendering so multiple panels use distinct keys and update more reliably.
    • Updated route coverage to reflect current available endpoints and remove outdated gaps.

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jun 26, 2026 5:12am

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 792f5b0c-b457-49e2-a184-3964d0ea5a81

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds teammate management APIs and stream-route helpers, introduces teammate contract types, renders a new TeammatePanel in agent chat, and updates route coverage plus tests for the new endpoints.

Changes

Teammate and stream workflow

Layer / File(s) Summary
Stream and teammate contracts
src/project-api-contract.ts
Adds agent output stream, teammate task/lifecycle, and interaction stream contract types.
API routes and coverage
app/lib/api.ts, app/lib/project-api-route-coverage.ts, app/lib/project-api-route-coverage.test.ts
Adds stream-route builders and teammate API wrappers, reclassifies the new /agents/* routes, and updates the coverage test to expect no planned parity gaps.
API wrapper tests
app/lib/api.test.ts
Adds route-construction and relay-proxy tests for the new stream and teammate wrappers.
Teammate panel
app/components/teammate-panel.tsx
Implements teammate selection, creation, task assignment, lifecycle actions, and status/error handling in the new panel.
Chat screen wiring
app/components/screens/AgentChatScreen.tsx
Renders TeammatePanel alongside AgentManagementPanel when a session is present.

Sequence Diagram(s)

sequenceDiagram
  participant TeammatePanel
  participant runMutation
  participant createTeammate
  participant createTeammateTask
  participant listTeammates

  alt create teammate
    TeammatePanel->>runMutation: handleCreateTeammate
    runMutation->>createTeammate: POST teammate payload
  else assign task
    TeammatePanel->>runMutation: handleAssignTask
    runMutation->>createTeammateTask: POST task payload
  end
  runMutation-->>TeammatePanel: mutation response
  runMutation->>listTeammates: refresh teammate list
  listTeammates-->>runMutation: teammates
  runMutation-->>TeammatePanel: status and list update
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • TraderSamwise/aimux#184 — Introduces the shared PROJECT_API_ROUTES contract and the app/lib/api.ts migration this PR extends with teammate and stream helpers.
  • TraderSamwise/aimux#247 — Updates the same app-side API parity and relay scaffolding that this PR extends with new teammate and stream routes plus coverage changes.

Poem

I thump, I hop, I click today,
New teammate paths now find their way.
My whiskers twitch at stream and task,
A panel bright beneath the mask.
🐰✨ The chat burrows forward, hooray!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: completing the web API parity surface across wrappers, routes, and UI controls.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/web-api-parity-completion

Comment @coderabbitai help to get the list of available commands.

@TraderSamwise

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@TraderSamwise

Copy link
Copy Markdown
Owner Author

Independent review finding fixed in e089ff3: stream contract types now model SSE event names separately from payload data for /agents/output/stream and /agents/interaction/stream.

@TraderSamwise

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@TraderSamwise

Copy link
Copy Markdown
Owner Author

Independent review findings fixed in aa5ac57: teammate mutations now treat server mutation success separately from best-effort refresh, and list refreshes use a request sequence guard so stale responses cannot overwrite newer state.

@TraderSamwise

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@TraderSamwise
TraderSamwise merged commit 71b1c03 into master Jun 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant