Skip to content

feat(frontend): Anonymous repo indexing UI components (#114)#135

Merged
DevanshuNEU merged 2 commits into
OpenCodeIntel:mainfrom
DevanshuNEU:feature/114-anonymous-indexing-ui
Dec 26, 2025
Merged

feat(frontend): Anonymous repo indexing UI components (#114)#135
DevanshuNEU merged 2 commits into
OpenCodeIntel:mainfrom
DevanshuNEU:feature/114-anonymous-indexing-ui

Conversation

@DevanshuNEU

Copy link
Copy Markdown
Collaborator

Summary

Implements the foundation for anonymous repo indexing UI (Issue #114). Adds state machine hook, API service layer, and reusable UI components.

Changes

New Files

frontend/src/
├── services/
│   ├── playground-api.ts     # API client for all playground endpoints
│   └── index.ts
├── hooks/
│   └── useAnonymousSession.ts  # State machine for indexing flow
└── components/playground/
    ├── RepoModeSelector.tsx    # Demo/Custom repo tabs
    ├── RepoUrlInput.tsx        # URL input with debounce
    ├── ValidationStatus.tsx    # Valid/Invalid/Loading states
    ├── IndexingProgress.tsx    # Real-time progress bar
    └── index.ts

State Machine

idle → validating → valid ────→ indexing → ready
                  ↘ invalid     ↘ error

API Endpoints Covered

Endpoint Status
POST /playground/validate-repo 🟡 Mocked (blocked by #134)
POST /playground/index ✅ Ready
GET /playground/index/{job_id} ✅ Ready
GET /playground/session ✅ Ready
POST /playground/search ✅ Ready

Technical Highlights

Testing

  • tsc --noEmit passes
  • All imports resolve correctly
  • Components are tree-shakeable

Related Issues

Next Steps

  1. Wire components into Playground.tsx
  2. Flip USE_MOCK = false when Bug: CacheService missing get/set methods breaks validate-repo endpoint #134 is fixed
  3. Add E2E tests

Screenshots

Components ready, integration pending


Lines: ~1,180 | Files: 8 | Commits: 2

- Add useAnonymousSession hook with full state machine
- Add playground-api.ts service (mock validation for OpenCodeIntel#134)
- Add RepoModeSelector component (Demo/Custom tabs)
- Add RepoUrlInput with debounced validation
- Add ValidationStatus component (valid/invalid/loading)
- Add IndexingProgress with real-time updates

Part of OpenCodeIntel#114
- Fix NodeJS.Timeout type (use ReturnType<typeof setInterval>)
- Add AbortController for request cancellation
- Fix useEffect/useCallback dependencies
- Add proper aria-labels for accessibility
- Add APIError class for typed error handling
- Improve mock validation with language detection
- Add proper JSDoc comments (not excessive)
- Export ProgressData type
- Better number formatting (toLocaleString)
- Consistent button type='button' attributes

All TypeScript checks pass.
@vercel

vercel Bot commented Dec 26, 2025

Copy link
Copy Markdown

@DevanshuNEU is attempting to deploy a commit to the Dev's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Dec 26, 2025

Copy link
Copy Markdown

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

Project Deployment Review Updated (UTC)
opencodeintel Ready Ready Preview, Comment Dec 26, 2025 8:08pm

@DevanshuNEU DevanshuNEU merged commit 3359365 into OpenCodeIntel:main Dec 26, 2025
6 checks passed
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.

feat(frontend): Anonymous repo indexing UI flow

1 participant