Skip to content

Team switcher dropdown: drop invite-link row, merge groups, add self-managed agent entry #2137

Description

@liuchao-001

Summary

Three UX changes to the team switcher dropdown (packages/web/src/components/team-switcher.tsx), which currently renders three groups: ① Current team (identity row / Invite teammates / Leave team), ② Switch team (other-team rows), ③ Add or join (Create team / Join with invite link).

1. Remove "Join with invite link"

People who receive an invite link open it directly — the link lands them on the invite-accept page. Nobody navigates to this dropdown to paste a link, so the row is dead weight. Remove the row (and the join action wiring into TeamSetupModal if nothing else uses it).

2. Merge "Create team" into the "Switch team" group

With "Join with invite link" gone, "Add or join" holds a single row. Fold Create team into the Switch team group (e.g. as the last row after the team list) and delete the third group entirely. One fewer section label and divider.

The "Switch team" group is currently hidden for single-team users (others.length > 0); after the merge it should always render since it now also hosts Create team. Group heading copy can stay "Switch team" or become "Teams" — implementer's choice.

3. New row in "Current team": add self-managed agents

Add an action row in the Current team group for connecting self-managed coding agents (Claude Code / Codex).

  • Behavior: clicking opens a popup with the same setup-prompt preview/copy flow as Context Tree settings → "Use with Claude Code or Codex". Reuse ByoSetupPromptActions (packages/web/src/components/byo-setup-prompt-actions.tsx) with prepareSettingsByoSetupPrompt (packages/web/src/pages/settings/context-enablement.tsx) — likely a small dialog wrapping those actions, or opening the Review-prompt dialog directly.
  • Copy: keep it short, menu-row length. Suggestion: "Add coding agent" (with a Terminal icon carrying the Claude/Codex association). Alternatives: "Connect coding agent", "Add Claude/Codex agent". Pick whichever reads best in the row width.
  • Placement suggestion: after "Invite teammates" (it is conceptually "invite an agent"), before "Leave team".

Notes

  • Update packages/web/src/components/__tests__/team-switcher-dom.test.tsx for the regrouping and the new row.
  • The new row should follow the existing askAgentNavLocked disabled/guard pattern used by the other action rows.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions