Skip to content

Conversation

@serefyarar
Copy link
Contributor

@serefyarar serefyarar commented Jan 26, 2026

Note

Adds a cohesive SDK and agent for navigating users/intents/opportunities, plus proactive, prompt-driven discovery for index admins, and marketing/site polish.

  • SDK + Agent: New protocol/src/sdk/* (types, users.hyde, intents.list/mutual/infer, opportunities.between/synthesis, discover.run) and agents/index/* for reasoning over SDK data
  • Backend API: New admin route POST /admin/:indexId/opportunities using OpportunityService.discoverOpportunitiesWithPrompt and enhanced HydeGeneratorAgent (optional instruction)
  • Admin UI: New Opportunities page with DiscoveryForm (contentEditable + @mentions) and OpportunityCard; sidebar link added; admin service extended
  • Site/UX: Overhauled landing page (waitlist modal), new Footer component wired into blog pages, sticky header tweaks, new logo asset, and POST /api/subscribe (Buttondown)
  • Minor: .gitignore tweak, ClientLayout hideFeedback prop

Written by Cursor Bugbot for commit ac1aac2. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

Release Notes

  • New Features

    • Redesigned landing page with ambient discovery visualization and waitlist signup modal
    • Admin feature to discover member opportunities using natural-language prompts with @mentions support
    • Newsletter subscription capability integrated across the platform
    • New SDK framework providing programmatic access to user profiles, intents, opportunities, and discovery features
  • Chores

    • Refactored footer into reusable component
    • Updated blog page layout and styling
    • Enhanced admin sidebar with opportunities navigation

✏️ Tip: You can customize this high-level summary in your review settings.

Introduces a new admin UI and backend API for discovering opportunities among index members using natural language prompts. Adds frontend components for opportunity display and mention support, updates the admin service, and implements a generic prompt-driven discovery method in the backend. Sidebar navigation and supporting types are also updated.
Refactors the DiscoveryForm to use a contentEditable input supporting rich @mentions, atomic mention deletion, and improved suggestion handling. Updates the admin opportunities page to use new suggestion types and removes quick action buttons. Improves sidebar and header stickiness in ClientWrapper. Updates admin API to allow index admins (not just owners) to discover opportunities.
Introduces a new /api/subscribe endpoint for newsletter signups using Buttondown. The landing page is fully redesigned with new sections, interactive visualizations, and a newsletter subscription form integrated with the new API.
Introduces a new reusable Footer component and applies it to the landing page and blog pages, replacing inline footer code. Updates the Header to use a new logo asset and adjusts its size. Refactors ClientWrapper to support full-width layouts for landing and blog pages. Adds new logo assets to the public directory. Minor: adds a console.log in the subscribe API route for debugging.
@serefyarar serefyarar merged commit 0b27fe6 into dev Jan 26, 2026
1 check passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The changes introduce a standalone SDK framework with public classes (IndexSDK, Users, Intents, Opportunities, Discover) for managing user profiles, intent discovery, and opportunity matching. A new IndexAgent provides reasoning capabilities. The backend adds opportunity discovery services and admin endpoints to support prompt-driven member matching. The frontend receives substantial updates including a landing page redesign with ambient discovery visualization, a new admin interface for opportunity discovery, subscription functionality, and layout/navigation adjustments.

Changes

Cohort / File(s) Summary
SDK Framework
sdk/index.ts, sdk/types.ts
New SDK entry point exporting IndexSDK instance, public types (Bio, HyDE, Intent, MutualIntent, ImplicitIntent, Opportunity, Synthesis, DiscoveredMatch); wires domain modules.
SDK Domain Modules
sdk/users.ts, sdk/intents.ts, sdk/opportunities.ts, sdk/discover.ts
New public SDK classes with methods: Users (get, hyde), Intents (list, mutual, infer), Opportunities (between, synthesis), Discover (run); implement profile retrieval, embeddings, intent matching, and discovery logic.
Agent Framework
agents/index/index.agent.ts, agents/index/index.agent.types.ts
New IndexAgent extending BaseLangChainAgent with run() and reason() methods; defines IndexAgentInput, IndexAgentAction, IndexAgentOutput types for structured reasoning.
Protocol Opportunity Discovery
protocol/src/services/opportunity.service.ts, protocol/src/routes/admin.ts
New discoverOpportunitiesWithPrompt() service method and POST /admin/:indexId/opportunities route; implements prompt-driven discovery across member profiles with HyDE generation and aggregated result mapping.
Protocol HyDE Enhancement
protocol/src/agents/profile/hyde/hyde.generator.ts
Expanded HydeGeneratorAgent.generate() to accept optional HydeOptions with instruction parameter for guided match-type searches.
Frontend Admin Opportunities
frontend/src/app/admin/[indexId]/opportunities/page.tsx, frontend/src/components/OpportunityCard.tsx
New admin discovery page with DiscoveryForm for prompt-based searches with mention support; OpportunityCard renders discovered opportunities with score, type, and action buttons; integrates adminService.discoverOpportunities().
Frontend Admin Service
frontend/src/services/admin.ts
Added DiscoveredOpportunity, OpportunityDiscoveryRequest, OpportunityDiscoveryResponse types; new discoverOpportunities() service method posts to /admin/:indexId/opportunities endpoint.
Frontend Landing Page Redesign
frontend/src/app/page.tsx
Major rework: new ambient discovery visualization with dynamic nodes, collision detection, activation sequences; waitlist modal flow with form (name, email, whatYouDo, whoToMeet); Easter egg retro modal; sections for Open Source, Community Testimonial, Manifesto; extensive inline styles for visuals and animations.
Frontend Layout & Navigation
frontend/src/components/ClientLayout.tsx, frontend/src/components/ClientWrapper.tsx, frontend/src/components/Header.tsx, frontend/src/components/Sidebar.tsx
ClientLayout accepts optional hideFeedback prop; ClientWrapper computes isLandingOrBlog flag to conditionally bypass sidebar/chat layout on landing/blog pages; Header resized logo asset and updated Blog text; Sidebar adds new Opportunities admin menu item and hides Latest Intents in admin mode.
Frontend Blog & Shared Components
frontend/src/app/blog/[slug]/page.tsx, frontend/src/app/blog/page.tsx, frontend/src/components/Footer.tsx, frontend/src/components/DiscoveryForm.tsx
Blog pages replaced inline footer with Footer component and adjusted layout wrappers; new Footer component with newsletter subscription form posting to /api/subscribe; DiscoveryForm extended with mention support (MentionUser type, enableMentions, onMentionSearch props) and memberFilter suggestion type.
Frontend Subscription API
frontend/src/app/api/subscribe/route.ts
New POST /api/subscribe endpoint validates email, maps type to tags, builds metadata, calls Buttondown API with Authorization header, returns success or error response.
Configuration
.gitignore
Changed ignored path from .cursor to .cursor/rules.

Sequence Diagram(s)

sequenceDiagram
    participant Admin as Admin User
    participant Frontend as Frontend App
    participant AdminRoute as /admin/:indexId/<br/>opportunities Route
    participant OppService as OpportunityService
    participant HydeAgent as HydeGeneratorAgent
    participant ProfileDB as Profile Database
    participant Embedder as Embedder Service
    participant Results as Results

    Admin->>Frontend: Enter prompt + members
    Frontend->>Frontend: Validate & prepare params
    Frontend->>AdminRoute: POST /admin/{indexId}/opportunities<br/>{prompt, memberIds, limit}
    AdminRoute->>AdminRoute: Check admin access
    AdminRoute->>OppService: discoverOpportunitiesWithPrompt<br/>(prompt, memberIds, indexId, limit)
    
    loop For each memberId
        OppService->>ProfileDB: Fetch profile
        ProfileDB-->>OppService: Profile data
        OppService->>Embedder: Ensure profile embedding
        OppService->>HydeAgent: generate(profileContext, {instruction: prompt})
        HydeAgent-->>OppService: HyDE description
        OppService->>OppService: Run discovery using HyDE
        OppService->>OppService: Map results to DiscoveredOpportunity
    end
    
    OppService->>OppService: Sort by score
    OppService-->>AdminRoute: DiscoveredOpportunity[]
    AdminRoute-->>Frontend: OpportunityDiscoveryResponse
    Frontend->>Frontend: Display opportunities list
    Frontend-->>Admin: Render OpportunityCards with actions
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

Suggested labels

codex

Poem

🐰 Through SDK burrows deep we hop,
Where agents think and intents bloom,
Opportunities dance in ambient light,
Discovery matches in the night,
Landing pages leap and sway—
The Index SDK finds its way!

✨ Finishing touches
  • 📝 Generate docstrings

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.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.


// Handle contentEditable input with @ detection
const handleContentInput = useCallback(() => {
if (!inputRef.current || !enableMentions) return;
Copy link

Choose a reason for hiding this comment

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

Submit button permanently disabled when mentions disabled

High Severity

When enableMentions is false (the default), the handleContentInput function returns early without calling setInputValue, so inputValue state is never updated from user typing. However, the submit button's disabled prop still checks !inputValue.trim(), which will always be true since inputValue remains empty. This breaks the form for any usage without enableMentions={true}, including the main discovery flow in InboxContent.tsx.

Additional Locations (1)

Fix in Cursor Fix in Web

}),
});

console.log(res);
Copy link

Choose a reason for hiding this comment

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

Debug console.log left in production API route

Low Severity

A console.log(res) statement logs the entire Response object from the Buttondown API on every subscription request. This appears to be debug code that was inadvertently left in and will clutter server logs in production.

Fix in Cursor Fix in Web

async discoverOpportunitiesWithPrompt(
options: DiscoverOpportunitiesOptions
): Promise<DiscoveredOpportunity[]> {
const { prompt, memberIds, limit = 10 } = options;
Copy link

Choose a reason for hiding this comment

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

Index scoping parameter passed but never used

Medium Severity

The indexId parameter is passed to discoverOpportunitiesWithPrompt but never destructured or used in the implementation. The interface comment states it should "Scope to specific index," but discovery runs against all users in the system. This means admins could discover opportunities involving users outside their index, showing results that may be irrelevant or exposing user information they shouldn't access.

Fix in Cursor Fix in Web

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