Skip to content

Promote test → main (includes #447 segments-surface removal)#448

Merged
sweetmantech merged 1 commit into
mainfrom
test
Apr 17, 2026
Merged

Promote test → main (includes #447 segments-surface removal)#448
sweetmantech merged 1 commit into
mainfrom
test

Conversation

@sweetmantech
Copy link
Copy Markdown
Contributor

@sweetmantech sweetmantech commented Apr 17, 2026

Promotes `test` → `main`.

Includes

All checks passed on the originating PR.

🤖 Generated with Claude Code


Summary by cubic

Removes the Segments feature across the codebase, deleting dead endpoints, tools, and data helpers. This prevents calls to non-existent segment APIs and the create_segments tool, and simplifies the codebase.

  • Refactors

    • Deleted API routes and handlers: GET /api/artist/segments, GET /api/chats/:id/segment.
    • Removed MCP create_segments tool and registration; pruned references in lib/chat/toolChains/* and lib/mcp/tools/index.ts.
    • Removed segments code, tests, and Supabase helpers under lib/segments/*, lib/artist/*segments*, lib/chats/getChatSegmentHandler, and lib/supabase/{artist_segments,fan_segments,segments,segment_rooms}.
  • Migration

    • Stop calling GET /api/artist/segments and GET /api/chats/:id/segment; these routes no longer exist.
    • Do not invoke the create_segments tool in any automations or prompts; it has been removed.

Written for commit 83a58c8. Summary will update on new commits.

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>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 17, 2026

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

Project Deployment Actions Updated (UTC)
recoup-api Ready Ready Preview Apr 17, 2026 1:25am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Warning

Rate limit exceeded

@sweetmantech has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 38 minutes and 52 seconds before requesting another review.

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 38 minutes and 52 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 55afb361-040b-4849-ab3a-f7dd480c327e

📥 Commits

Reviewing files that changed from the base of the PR and between e81eba1 and 83a58c8.

⛔ Files ignored due to path filters (1)
  • lib/chats/__tests__/getChatSegmentHandler.test.ts is excluded by !**/*.test.*, !**/__tests__/** and included by lib/**
📒 Files selected for processing (25)
  • app/api/artist/segments/route.ts
  • app/api/chats/[id]/segment/route.ts
  • lib/artist/getArtistSegments.ts
  • lib/artist/getArtistSegmentsHandler.ts
  • lib/artist/mapArtistSegments.ts
  • lib/artist/validateArtistSegmentsQuery.ts
  • lib/chat/toolChains/createNewArtistToolChain.ts
  • lib/chat/toolChains/toolChains.ts
  • lib/chats/getChatSegmentHandler.ts
  • lib/mcp/tools/index.ts
  • lib/mcp/tools/registerCreateSegmentsTool.ts
  • lib/segments/consts.ts
  • lib/segments/createSegmentResponses.ts
  • lib/segments/createSegments.ts
  • lib/segments/generateSegments.ts
  • lib/segments/getAnalysisPrompt.ts
  • lib/segments/getFanSegmentsToInsert.ts
  • lib/supabase/artist_segments/insertArtistSegments.ts
  • lib/supabase/artist_segments/selectArtistSegments.ts
  • lib/supabase/artist_segments/selectArtistSegmentsCount.ts
  • lib/supabase/artist_segments/selectArtistSegmentsWithDetails.ts
  • lib/supabase/fan_segments/insertFanSegments.ts
  • lib/supabase/segment_rooms/selectSegmentRoomByRoomId.ts
  • lib/supabase/segments/deleteSegments.ts
  • lib/supabase/segments/insertSegments.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test

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

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

@sweetmantech sweetmantech merged commit db5c710 into main Apr 17, 2026
7 checks passed
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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 removal of the 'Segments' feature, including multiple API endpoints and toolchain logic, requires human verification to confirm no active dependencies remain.

Architecture diagram
sequenceDiagram
    participant Client as Client / UI
    participant API as Next.js API Routes
    participant MCP as MCP Tool Server
    participant LLM as Language Model (LLM)
    participant DB as Supabase Database

    Note over Client,DB: Flow 1: New Artist Creation (Tool Chain)

    MCP->>MCP: generate_txt_file (Arweave)
    Note right of MCP: CHANGED: createNewArtistToolChain pruned
    rect rgb(240, 240, 240)
        Note over MCP,DB: REMOVED: create_segments tool execution
        MCP--xLLM: analyze fan data & generate names
        MCP--xDB: insert segments, artist_segments, & fan_segments
    end
    MCP->>MCP: NEW: Proceed directly to youtube_login

    Note over Client,DB: Flow 2: Data Retrieval (Pruned Surface)

    Client->>API: GET /api/artist/segments
    API-->>Client: NEW: 404 Not Found (Route Deleted)

    Client->>API: GET /api/chats/[id]/segment
    API-->>Client: NEW: 404 Not Found (Route Deleted)

    Note over Client,DB: Flow 3: AI Tooling (MCP Registration)

    MCP->>MCP: registerAllTools()
    Note right of MCP: REMOVED: registerCreateSegmentsTool
    rect rgb(240, 240, 240)
        Note over MCP,DB: Deleted Data Helpers
        Note right of DB: lib/supabase/segments/* (Deleted)
        Note right of DB: lib/supabase/fan_segments/* (Deleted)
        Note right of DB: lib/supabase/artist_segments/* (Deleted)
        Note right of DB: lib/supabase/segment_rooms/* (Deleted)
    end
Loading

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.

2 participants