chore: remove dead segments surface#447
Conversation
Deletes GET /api/artist/segments, GET /api/chats/[id]/segment, the
create_segments MCP tool registration, and the lib/segments,
lib/artist/*segments*, lib/chats/getChatSegmentHandler, and
lib/supabase/{artist_segments,fan_segments,segments,segment_rooms}
modules. Also prunes the two remaining tool-chain references to the
create_segments tool in lib/chat/toolChains/{toolChains.ts,
createNewArtistToolChain.ts} so the orchestration does not reference
a tool that no longer exists.
The Segments feature is being removed entirely; the earlier migration
plan is abandoned. Part of SEGMENTS_SURFACE_REMOVAL_PLAN.md.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 58 minutes and 25 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (25)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
No issues found across 26 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Large-scale feature removal (26 files, 950+ lines) with explicit cross-repo dependencies and a 'Do not merge' warning requires human coordination and verification of the removal plan.
Architecture diagram
sequenceDiagram
participant UI as Client / Chat UI
participant API as API Route Handler
participant TC as Tool Chain Orchestrator
participant MCP as MCP Tool Server
participant LLM as LLM (Model)
Note over UI,LLM: Flow 1: External API Access (Segments Surface)
UI->>API: GET /api/artist/segments
API-->>UI: CHANGED: 404 Not Found (Route Handler Deleted)
UI->>API: GET /api/chats/[id]/segment
API-->>UI: CHANGED: 404 Not Found (Route Handler Deleted)
Note over UI,LLM: Flow 2: Artist Onboarding Orchestration (createNewArtistToolChain)
TC->>LLM: Request next tool execution
LLM-->>TC: Tool: update_artist_knowledges
TC->>MCP: execute(update_artist_knowledges)
MCP-->>TC: success
Note over TC,MCP: CHANGED: 'create_segments' tool removed from chain and registration
TC->>LLM: Request next tool execution
LLM-->>TC: Tool: youtube_login
TC->>MCP: execute(youtube_login)
MCP-->>TC: success
Note over MCP,LLM: Tool Registration & Discovery
MCP->>MCP: internal: registerAllTools()
Note right of MCP: CHANGED: registerCreateSegmentsTool() call removed
MCP-->>LLM: Updated Tool Manifest (create_segments no longer available)
Promote test → main (includes #447 segments-surface removal)
Summary
GET /api/artist/segmentsandGET /api/chats/[id]/segmentroute handlerscreate_segmentsMCP tool registration fromlib/mcp/tools/index.tsand deleteslib/mcp/tools/registerCreateSegmentsTool.tscreate_segmentsinlib/chat/toolChains/toolChains.tsandlib/chat/toolChains/createNewArtistToolChain.tslib/segments/*,lib/artist/{getArtistSegments,getArtistSegmentsHandler,mapArtistSegments,validateArtistSegmentsQuery}.ts, andlib/chats/getChatSegmentHandler.ts(+ its test)lib/supabase/{artist_segments,fan_segments,segments,segment_rooms}/directoriesContext
The Segments surface is being removed entirely from chat, api, and docs. The earlier migration effort (docs #135, #136, api #443, #444, chat #1679, #1680) was abandoned and those PRs were closed unmerged.
Do not merge until the chat cleanup PRs are merged, otherwise the chat frontend will 404 on
/api/chats/[id]/segmentand on the segment list surface it still references.Depends on:
Followed by:
Test plan
pnpm lint:checkcleanpnpm testgreen (328 files, 2067 tests pass)npx tsc --noEmitno new errors vs.testbaseline (204 on baseline, 201 on branch — 3 fewer from deleted test file)pnpm buildsucceeds modulo pre-existing env-var failures (RESEND_API_KEY, PRIVY_PROJECT_SECRET, etc.)Notes
Synced
testwithmainsuccessfully before branching (no push rejection).The two
create_segmentsreferences outside the MCP registration (inlib/chat/toolChains/) were pruned in this PR — they are dead orchestration references to the now-removed tool, not a separate product surface.