molecule-core/docs/guides
Hongming Wang eec4ea2e7d chore: delete TeamHandler.Collapse + docs cleanup (closes #2864)
Multi-model retrospective review of #2856 (Phase 1 Expand removal)
flagged that TeamHandler.Collapse is unreachable from the canvas UI:
the "Collapse Team" button calls PATCH /workspaces/:id { collapsed }
(visual flag toggle on canvas_layouts), NOT POST /workspaces/:id/collapse.
The destructive POST route — which stops EC2s, marks children removed,
and deletes layouts — has zero UI callers (verified via grep across
canvas/, scripts/, and the MCP tool registry; only docs referenced it).

Two semantically different operations had been sharing the word
"Collapse":

- Visual collapse (canvas) → PATCH { collapsed: true }. Hides
  children visually. Reversible. UI-only.
- Destructive collapse (POST /collapse) → Stops + marks removed.
  Irreversible. No caller.

Deleting the destructive one + its supporting machinery:

- workspace-server/internal/handlers/team.go (entirely)
- workspace-server/internal/handlers/team_test.go (entirely)
- POST /collapse route + teamh init in router.go
- findTemplateDirByName helper (zero non-test callers after Expand
  was deleted in #2856; package-private so no out-of-package consumers)
- NewTeamHandler constructor (no callers after route removed)

Plus stale doc references (the most dangerous was the MCP wrapper
mapping in mcp-server-setup.md — anyone generating MCP tool wrappers
from that table was wiring a 404):

- docs/agent-runtime/team-expansion.md (deleted entirely — whole
  guide taught the deleted flow)
- docs/api-reference.md (dropped two team.go rows)
- docs/api-protocol/platform-api.md (dropped /expand + /collapse
  rows)
- docs/architecture/molecule-technical-doc.md (dropped /expand +
  /collapse rows)
- docs/guides/mcp-server-setup.md (dropped expand_team +
  collapse_team MCP wrapper mappings)
- docs/glossary.md (dropped "(org template expand_team)"
  parenthetical)
- docs/frontend/canvas.md (dropped broken link to deleted
  team-expansion.md)

Kept: docs/architecture/backends.md mention of "TeamHandler.Expand
(#2367) bypassed routing on Start" — correct historical context for
the AST gate's existence, no live route reference.

Visual-collapse path unaffected:
  canvas/src/components/ContextMenu.tsx:227 → api.patch — unchanged
  canvas/src/components/WorkspaceNode.tsx:128 → api.patch — unchanged

go vet ./... clean. go test ./internal/handlers/ -count 1 — all green
(4.3s, no regression).

Net: -388/+10 = ~378 lines removed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 11:59:43 -07:00
..
external-agent-registration.md docs(guides): add 5-minute external-workspace quickstart for DevRel 2026-04-23 06:13:16 +00:00
external-workspace-quickstart.md docs(guides): add 5-minute external-workspace quickstart for DevRel 2026-04-23 06:13:16 +00:00
mcp-server-setup.md chore: delete TeamHandler.Collapse + docs cleanup (closes #2864) 2026-05-05 11:59:43 -07:00
org-api-keys.md docs: strip internal roadmap/followups from public org-api-keys docs 2026-04-20 14:31:46 -07:00
quickstart-audio.md docs(marketing): Phase 30 launch — content blog posts, DevRel assets, and execution suite 2026-04-21 06:22:27 +00:00
remote-workspaces-faq.md fix(docs): correct https://wss:// mixed protocol typo in remote-workspaces-faq.md 2026-04-21 06:37:25 +00:00
remote-workspaces.md docs(marketing): Phase 30 launch — content blog posts, DevRel assets, and execution suite 2026-04-21 06:22:27 +00:00
same-origin-canvas-fetches.md docs(marketing): Phase 30 launch — content blog posts, DevRel assets, and execution suite 2026-04-21 06:22:27 +00:00
skill-catalog.md fix: CWE-78 rm scope, go vet failures, delegation idempotency 2026-04-21 18:22:30 +00:00
token-management.md feat(platform): token management API + MCP setup + external agent guide 2026-04-16 08:37:42 -07:00