Commit graph

98 commits

Author SHA1 Message Date
jlightner
17b43d9778 feat: Added LightRAG /query/data as primary search engine with file_sou…
- "backend/config.py"
- "backend/search_service.py"

GSD-Task: S01/T01
2026-04-04 04:44:24 +00:00
jlightner
4115c8add0 feat: Built ConsentDashboard page with per-video consent toggles, expan…
- "frontend/src/pages/ConsentDashboard.tsx"
- "frontend/src/pages/ConsentDashboard.module.css"
- "frontend/src/pages/CreatorDashboard.tsx"
- "frontend/src/App.tsx"

GSD-Task: S03/T02
2026-04-04 00:24:17 +00:00
jlightner
da29a2a723 feat: Replaced 3 placeholder cards with real creator dashboard: 4 stat…
- "frontend/src/api/creator-dashboard.ts"
- "frontend/src/pages/CreatorDashboard.tsx"
- "frontend/src/pages/CreatorDashboard.module.css"
- "frontend/src/api/index.ts"

GSD-Task: S02/T02
2026-04-04 00:13:48 +00:00
jlightner
8417f0e9e0 feat: Built WatchPage with video player, synced transcript sidebar, laz…
- "frontend/src/api/videos.ts"
- "frontend/src/components/TranscriptSidebar.tsx"
- "frontend/src/pages/WatchPage.tsx"
- "frontend/src/App.tsx"
- "frontend/src/pages/TechniquePage.tsx"
- "frontend/src/App.css"

GSD-Task: S01/T03
2026-04-03 23:50:15 +00:00
jlightner
dbc4afcf42 feat: Normalized /topics and /videos endpoints from bare lists to pagin…
- "backend/schemas.py"
- "backend/routers/topics.py"
- "backend/routers/videos.py"
- "frontend/src/api/topics.ts"
- "frontend/src/pages/TopicsBrowse.tsx"
- "frontend/src/pages/Home.tsx"

GSD-Task: S05/T03
2026-04-03 23:09:33 +00:00
jlightner
39e169b4ce feat: Split 945-line public-client.ts into 10 domain API modules with s…
- "frontend/src/api/client.ts"
- "frontend/src/api/index.ts"
- "frontend/src/api/search.ts"
- "frontend/src/api/techniques.ts"
- "frontend/src/api/creators.ts"
- "frontend/src/api/topics.ts"
- "frontend/src/api/stats.ts"
- "frontend/src/api/reports.ts"

GSD-Task: S05/T01
2026-04-03 23:04:56 +00:00
jlightner
c60fc8c3b3 feat: Added ProtectedRoute component, CreatorDashboard with sidebar nav…
- "frontend/src/components/ProtectedRoute.tsx"
- "frontend/src/pages/CreatorDashboard.tsx"
- "frontend/src/pages/CreatorDashboard.module.css"
- "frontend/src/pages/CreatorSettings.tsx"
- "frontend/src/pages/CreatorSettings.module.css"
- "frontend/src/App.tsx"
- "frontend/src/App.css"
- "frontend/src/pages/Login.tsx"

GSD-Task: S02/T04
2026-04-03 22:02:04 +00:00
jlightner
b344307a89 feat: Added AuthContext provider with JWT persistence, auth API client…
- "frontend/src/context/AuthContext.tsx"
- "frontend/src/api/public-client.ts"
- "frontend/src/pages/Login.tsx"
- "frontend/src/pages/Login.module.css"
- "frontend/src/pages/Register.tsx"
- "frontend/src/pages/Register.module.css"
- "frontend/src/App.tsx"

GSD-Task: S02/T03
2026-04-03 21:58:08 +00:00
jlightner
18eb4e0ee8 feat: Added updateCreatorProfile() API client and inline bio/social-lin…
- "frontend/src/api/public-client.ts"
- "frontend/src/pages/CreatorDetail.tsx"
- "frontend/src/App.css"

GSD-Task: S04/T01
2026-04-03 09:18:39 +00:00
jlightner
47014f5a3f feat: Featured technique card with gradient border and enriched recent-…
- "frontend/src/api/public-client.ts"
- "frontend/src/pages/CreatorDetail.tsx"
- "frontend/src/App.css"

GSD-Task: S03/T02
2026-04-03 09:10:14 +00:00
jlightner
0234a87429 feat: Added SocialIcons component with 9 platform SVG icons, rendered s…
- "frontend/src/components/SocialIcons.tsx"
- "frontend/src/pages/CreatorDetail.tsx"
- "frontend/src/App.css"

GSD-Task: S02/T02
2026-04-03 09:00:34 +00:00
jlightner
bef8d5939d feat: Replaced compact creator header with full hero section: 96px avat…
- "frontend/src/pages/CreatorDetail.tsx"
- "frontend/src/App.css"

GSD-Task: S01/T02
2026-04-03 08:52:06 +00:00
jlightner
74a4f25402 feat: Synced CreatorDetailResponse with backend schema (7 new fields) a…
- "frontend/src/api/public-client.ts"
- "frontend/src/pages/CreatorDetail.tsx"

GSD-Task: S01/T01
2026-04-03 08:50:12 +00:00
jlightner
ff351b38d7 fix: run card collapse flicker — auto-expand only on first load, not on every re-render
The load callback had expandedRunId in its dependency array, so collapsing
(setting expandedRunId=null) triggered a reload which re-expanded it.
Replaced with a useRef flag that fires once.
2026-04-03 08:21:51 +00:00
jlightner
97abc7c80c style: back arrow inline with article title, title bumped to 1.5rem 2026-04-03 07:44:32 +00:00
jlightner
1d210faf68 style: related techniques cards use same recent-card styling as homepage Recently Added 2026-04-03 07:43:03 +00:00
jlightner
71183639ea fix: revert purple accents, move stats/tags into grid main column, shrink sidebar to 16rem, right-align ToC, fix stray CSS brace 2026-04-03 07:39:28 +00:00
jlightner
b132c4ac7b feat: restructure technique page — bibliography key moments, ToC-only sidebar, sticky title bar, solid featured border
- Move key moments below prose as bibliography-style sources with [N] indices
- Move signal chains and related techniques to main column below key moments
- Sidebar now dedicated to ToC only, sticky with scroll tracking
- Replace position:fixed reading header with sticky title bar within content area
- ToC smooth-scrolls on click with history.replaceState for hash updates
- Featured technique card: solid cyan-to-purple gradient border (border-image)
- Remove ReadingHeader component (replaced by title bar)
- Hide sidebar ToC on mobile (single-column reading)
- Related techniques grid defaults to 2-column in main content area
2026-04-03 07:16:03 +00:00
jlightner
6d910f504a fix: move scroll-spy hooks above early returns to fix React hooks ordering crash
M016 added useState/useMemo/useEffect hooks after conditional early
returns (loading/notFound/error), violating React rules of hooks.
Moved all hooks above the early returns so they execute on every render.
2026-04-03 06:46:16 +00:00
jlightner
7d4168c048 feat: Added .section-heading utility class to unify four heading styles…
- "frontend/src/App.css"
- "frontend/src/pages/Home.tsx"

GSD-Task: S06/T02
2026-04-03 06:22:11 +00:00
jlightner
e98f43193e feat: Lifted scroll-spy state from TableOfContents to TechniquePage, cr…
- "frontend/src/components/ReadingHeader.tsx"
- "frontend/src/components/TableOfContents.tsx"
- "frontend/src/pages/TechniquePage.tsx"
- "frontend/src/App.css"

GSD-Task: S05/T01
2026-04-03 06:01:13 +00:00
jlightner
0743d80b6a feat: Moved Table of Contents from main prose column to sidebar top; re…
- "frontend/src/pages/TechniquePage.tsx"
- "frontend/src/components/TableOfContents.tsx"
- "frontend/src/App.css"

GSD-Task: S04/T01
2026-04-03 05:52:47 +00:00
jlightner
657d604e5b fix: Added collapse arrow styling, stage chevrons, filter right-alignme…
- "frontend/src/App.css"
- "frontend/src/pages/AdminPipeline.tsx"

GSD-Task: S02/T01
2026-04-03 05:38:10 +00:00
jlightner
caedc9c224 fix: remove moments from recent cards, pin footer to bottom of card 2026-04-03 05:14:17 +00:00
jlightner
00cb865507 fix: admin dropdown hover gap bridge + recent card footer layout (creator left, moments, date right) 2026-04-03 05:07:06 +00:00
jlightner
8b912e5a6f feat: Added Trending Searches section to homepage with real-time popula…
- "frontend/src/api/public-client.ts"
- "frontend/src/pages/Home.tsx"
- "frontend/src/App.css"

GSD-Task: S04/T01
2026-04-03 04:37:36 +00:00
jlightner
3c5985f012 feat: Homepage displays a stats scorecard showing live article and crea…
- "frontend/src/api/public-client.ts"
- "frontend/src/pages/Home.tsx"
- "frontend/src/App.css"

GSD-Task: S03/T02
2026-04-03 04:29:21 +00:00
jlightner
8d3f9fd74f feat: render last-updated dates on creators page and homepage cards 2026-04-03 04:17:53 +00:00
jlightner
5a71539a2b fix: StageTabView limit 500→200 to stay within API max 2026-04-03 03:32:34 +00:00
jlightner
995d0c900d fix: StageTabView useCallback dependency loop — use ref for initial tab selection 2026-04-03 03:30:45 +00:00
jlightner
c7a4d8aa27 feat: Stage tab view for pipeline runs, rename stale→orphaned pages
- Expanded runs now show horizontal stage tabs (Segment→Extract→Classify→Synthesize→Embed)
- Each tab has status indicator dot (idle/running/done/error) with pulse animation
- Clicking a tab shows that stage's events with summary stats (LLM calls, tokens, duration)
- Error events auto-expanded with monospace error detail block
- Auto-selects the error stage or latest active stage on expand
- Renamed 'stale pages' to 'orphaned pages' in admin header
2026-04-03 03:24:43 +00:00
jlightner
bbea843235 feat: Show article + creator count stats on admin techniques page 2026-04-03 02:38:09 +00:00
jlightner
baa2a87243 style: Admin technique pages — full CSS styling, description text 2026-04-03 02:33:23 +00:00
jlightner
989ca41162 feat: Added technique_section result rendering with Section badge, deep…
- "frontend/src/api/public-client.ts"
- "frontend/src/pages/TechniquePage.tsx"
- "frontend/src/pages/SearchResults.tsx"
- "frontend/src/components/SearchAutocomplete.tsx"

GSD-Task: S07/T02
2026-04-03 02:15:07 +00:00
jlightner
7d805b80e3 feat: Built AdminTechniquePages page at /admin/techniques with table, e…
- "frontend/src/pages/AdminTechniquePages.tsx"
- "frontend/src/api/public-client.ts"
- "frontend/src/App.tsx"
- "frontend/src/components/AdminDropdown.tsx"

GSD-Task: S06/T02
2026-04-03 01:59:49 +00:00
jlightner
48bcf26bee feat: Added format-aware v2 body_sections rendering with nested TOC, ci…
- "frontend/src/api/public-client.ts"
- "frontend/src/pages/TechniquePage.tsx"
- "frontend/src/components/TableOfContents.tsx"
- "frontend/src/utils/citations.tsx"
- "frontend/src/App.css"

GSD-Task: S05/T01
2026-04-03 01:42:56 +00:00
jlightner
293d1f4df4 feat: add wipe-all-output admin endpoint and UI button
Deletes all technique pages, versions, links, key moments, pipeline
events/runs, Qdrant vectors, and Redis cache while preserving creators,
videos, and transcript segments. Resets all video status to not_started.
Double-confirm dialog in the UI prevents accidental use.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 22:17:48 +00:00
jlightner
f0d0b8ac1a feat: add pipeline iteration tooling — offline test harness, stage re-runs, chunking inspector
Drops prompt iteration cycles from 20-30 min to under 5 min by enabling
stage-isolated re-runs and offline prompt testing against exported fixtures.

Phase 1: Offline prompt test harness
- export_fixture.py: export stage 5 inputs from DB to reusable JSON fixtures
- test_harness.py: run synthesis offline with any prompt, no Docker needed
- promote subcommand: deploy winning prompts with backup and optional git commit

Phase 2: Classification data persistence
- Dual-write classification to PostgreSQL + Redis (fixes 24hr TTL data loss)
- Clean retrigger now clears Redis cache keys (fixes stale data bug)
- Alembic migration 011: classification_data JSONB column + stage_rerun enum

Phase 3: Stage-isolated re-run
- run_single_stage Celery task with prerequisite validation and prompt overrides
- _load_prompt supports per-video Redis overrides for testing custom prompts
- POST /admin/pipeline/rerun-stage/{video_id}/{stage_name} endpoint
- Frontend: Re-run Stage modal with stage selector and prompt override textarea

Phase 4: Chunking inspector
- GET /admin/pipeline/chunking/{video_id} returns topic boundaries,
  classifications, and synthesis group breakdowns
- Frontend: collapsible Chunking Inspector panel per video

Phase 5: Prompt deployment & stale data cleanup
- GET /admin/pipeline/stale-pages detects pages from older prompts
- POST /admin/pipeline/bulk-resynthesize re-runs a stage on all completed videos
- Frontend: stale pages indicator badge with one-click bulk re-synth

Phase 6: Automated iteration foundation
- Quality CLI --video-id flag auto-exports fixture from DB
- POST /admin/pipeline/optimize-prompt/{stage} dispatches optimization as Celery task

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 15:47:46 +00:00
jlightner
3c1f7a83fb fix: Retrigger button now uses clean-retrigger (wipes events + re-runs from scratch)
The plain trigger endpoint short-circuits on status=complete — 'nothing to do'.
Retrigger must use clean-retrigger to reset pipeline state first.
2026-04-01 07:34:01 +00:00
jlightner
3c2441ae38 fix: Rename 'Trigger (debug)' button to 'Retrigger' 2026-04-01 07:25:20 +00:00
jlightner
d58194ff96 feat: Store LLM request params (max_tokens, model, modality) in pipeline events
- _make_llm_callback now accepts request_params dict
- All 6 LLM call sites pass max_tokens, model_override, modality, response_model, hard_limit
- request_params stored in payload JSONB on every llm_call event (always, not just debug mode)
- Frontend JSON export includes full payload + request_params at top level
- DebugPayloadViewer shows 'Request Params' section even with debug mode off
- Answers whether max_tokens is actually being sent on pipeline requests
2026-04-01 07:01:57 +00:00
jlightner
a673e641b8 fix: Parallel search with match_context, deterministic Qdrant IDs, raised embedding timeout
- Search now runs semantic + keyword in parallel, merges and deduplicates
- Keyword results always included with match_context explaining WHY matched
- Semantic results filtered by minimum score threshold (0.45)
- match_context shows 'Creator: X', 'Tag: Y', 'Title match', 'Content: ...'
- Qdrant points use deterministic uuid5 IDs (no more duplicates on reindex)
- Embedding timeout raised from 300ms to 2s (Ollama needs it)
- _enrich_qdrant_results reads creator_name from payload before DB fallback
- Frontend displays match_context as highlighted bar on search result cards
2026-04-01 06:54:34 +00:00
jlightner
baef500de6 feat: Created SortDropdown component and useSortPreference hook, integr…
- "frontend/src/components/SortDropdown.tsx"
- "frontend/src/hooks/useSortPreference.ts"
- "frontend/src/pages/SearchResults.tsx"
- "frontend/src/pages/SubTopicPage.tsx"
- "frontend/src/pages/CreatorDetail.tsx"
- "frontend/src/api/public-client.ts"
- "frontend/src/App.css"

GSD-Task: S02/T02
2026-04-01 06:41:52 +00:00
jlightner
b68775ebfb feat: Added partial_matches fallback UI to search results — shows muted…
- "frontend/src/api/public-client.ts"
- "frontend/src/pages/SearchResults.tsx"
- "frontend/src/App.css"

GSD-Task: S01/T03
2026-04-01 06:41:52 +00:00
jlightner
9b2db11095 feat: Enrich in-progress stage display and memoize pipeline page
In-progress stages now show:
- Live elapsed time (ticks every second) next to the active stage dot
- Run-level token count so far

Performance: wrapped StageTimeline, StatusFilter, WorkerStatus, and
RecentActivityFeed with React.memo. Memoized filteredVideos with useMemo.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 22:10:07 -05:00
jlightner
9bc253f2c9 feat: Add real-time text search filter on pipeline admin page
Filters video list by filename or creator name as you type. Works
alongside the existing status and creator dropdown filters. Includes
a clear button when text is entered.
2026-03-31 17:38:31 +00:00
jlightner
44f2fbd4d6 feat: Add tooltips to stage timeline dots showing stage name on hover 2026-03-31 17:30:45 +00:00
jlightner
c1583820ea feat: Add context labels to multi-call pipeline stages
Stage 3 (extraction) LLM calls now show the topic group label (e.g.,
'Sound Design Basics') and Stage 5 (synthesis) calls show the category
name. Displayed as a cyan italic label in the event row between the
event type badge and model name. Helps admins understand why there are
multiple LLM calls per stage.
2026-03-31 17:27:40 +00:00
jlightner
c2db9aa011 feat: Pipeline runs — per-execution tracking with run-scoped events
Data model:
- New pipeline_runs table (id, video_id, run_number, trigger, status,
  started_at, finished_at, error_stage, total_tokens)
- pipeline_events gains run_id FK (nullable for backward compat)
- Alembic migration 010_add_pipeline_runs

Backend:
- run_pipeline() creates a PipelineRun, threads run_id through all stages
- _emit_event() and _make_llm_callback() accept and store run_id
- Stage 6 (final) calls _finish_run() to mark complete with token totals
- mark_pipeline_error marks run as error
- Revoke marks running runs as cancelled
- Trigger endpoints pass trigger type (manual, clean_reprocess)
- New GET /admin/pipeline/runs/{video_id} — lists runs with event counts
- GET /admin/pipeline/events supports ?run_id= filter

Frontend:
- Expanded video detail now shows RunList instead of flat EventLog
- Each run is a collapsible card showing: run number, trigger type,
  status badge, timestamps, token count, event count
- Latest run auto-expands, older runs collapsed
- Legacy events (pre-run-tracking) shown as separate collapsible section
- Run cards color-coded: cyan border for running, red for error,
  gray for cancelled
- EventLog accepts optional runId prop to scope events to a single run
2026-03-31 17:13:41 +00:00
jlightner
6f1c7dae00 fix: Auto-refresh EventLog every 10s for processing/queued videos
Previously the event log only loaded once when the row was expanded,
so mid-pipeline videos only showed start events. Now the EventLog
component accepts a status prop and polls every 10s when the video is
processing or queued, silently updating without showing a loading spinner.
2026-03-31 16:23:33 +00:00