Skip to content

feat(pods): add an agent from the pod's Agents fold, with the pod already chosen (F370 #5) - #3981

Merged
lilyshen0722 merged 2 commits into
mainfrom
swe/f370-pod-add-agent
Nov 12, 2026
Merged

lilyshen0722 merged 2 commits into
mainfrom
swe/f370-pod-add-agent

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

What

This is F370 rough spot #5 from the D275 walk. The pod's Agents fold listed agents but had no way to add one. The only way in was rail → Agents → Bring your own, where you then picked the pod again.

The fold now ends with an Add an agent row. It opens Bring your own with this pod already chosen (/v2/agents/byo?pod=<id>, the param that page and the invite modal already use). The row:

  • shows only where people can be invited, so never in a DM, an agent room or an admin room. It keys off the same onOpenInvite gate as the Members button;
  • lines up with the agent rows. A dashed empty avatar slot with a plus marks it, and the label is in secondary text that darkens on hover;
  • has strings in en and zh-CN (添加智能体).

Screenshots (loopback, a real pod with Scout and one BYO agent)

Light Dark Hover

I clicked through on loopback. The BYO page opened at ?pod=… with "My Workspace (chat)" selected.

Tests

  • A new V2Inspector test checks that the row navigates to /v2/agents/byo?pod=pod-1, and that it's absent without onOpenInvite.
  • Inspector, layout and locale suites: 528 pass.
  • tsc is clean. ESLint has no findings on added lines (the file's existing no-literal-string hits are older).

🤖 Generated with Claude Code

https://claude.ai/code/session_01MDs9DPXBiwPK6RMAX2e277

…eady chosen (F370 #5)

The only way to add an agent was rail, Agents, Bring your own, then picking
the pod again. The pod's Agents fold now ends with an "Add an agent" row
that opens Bring your own with this pod chosen (?pod=). It shows where
people can be invited, so never in a DM or an agent room.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MDs9DPXBiwPK6RMAX2e277
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0b843bd and 8fc41e8.

Files selected for processing: 5

  • frontend/src/i18n/locales/en.json
  • frontend/src/i18n/locales/zh-CN.json
  • frontend/src/v2/__tests__/V2Inspector.test.tsx
  • frontend/src/v2/chat/chat-inspector.css
  • frontend/src/v2/components/V2Inspector.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

…pod (F370 #5)

From the gate review: the invite gate also let the row show on public and
agent-admin pods, which Bring your own drops from its picker, so the link
quietly landed on another pod. The row now needs a member, a pod that isn't
public, and a pod that isn't DM-shaped, matching that page's own filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MDs9DPXBiwPK6RMAX2e277

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate review: one subagent pass, Claude Sonnet (medium effort). This is a UI entry point only: one inspector row, a CSS rule and two strings. No auth, schema or kernel code is touched.

Checked

  • Pod id: encodeURIComponent(pod._id) round-trips. Bring your own keeps only hex characters from ?pod=.
  • CSS:
    • The add row's 2-column grid beats the agent row's 3-column one: same specificity, later in the file.
    • The base hover background applies.
    • The agent row has no disabled rules for the add row to inherit.
    • Colours come from --v2-text-* and --v2-surface-hover tokens only.
  • zh-CN: 添加智能体 follows the glossary and matches the existing 添加智能体 key.
  • Screenshots (light, dark and hover at e23df08): the row lines up with the agent rows. The dashed 28px slot reads in both themes.

Medium, fixed at 8fc41e8

  • Problem: the row keyed off the invite gate, which blocks only agent-room and agent-dm pods. It showed on public pods and on agent-admin pods, but Bring your own drops both from its picker. The link quietly fell back to another pod, with a form that looked ready to install there.
  • Fix: the row now needs four things, matching that page's own filter:
    • the viewer is a member;
    • invites are on;
    • publicRead isn't true;
    • the pod isn't agent-room, agent-dm or agent-admin.
  • Test: each of the four hidden cases is now covered: no invite, non-member, public, agent-admin.
  • Recheck: I confirmed again on loopback that the row shows for a member of their own workspace.

Low, covered by the same fix: a non-member reading a public pod saw the row. The test also pinned only the prop being present or absent; it now covers each case.

Tests: V2Inspector + V2Layout 57/57. tsc is clean.

GATE: PASS

Written by Lily Shen, via Claude Code.

@lilyshen0722
lilyshen0722 added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 9ad959c Nov 12, 2026
31 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