Commit graph

62 commits

Author SHA1 Message Date
jlightner
84d8dc4455 feat: Added shorts router with generate/list/download endpoints, fronte…
- "backend/routers/shorts.py"
- "backend/main.py"
- "frontend/src/api/shorts.ts"
- "frontend/src/pages/HighlightQueue.tsx"
- "frontend/src/pages/HighlightQueue.module.css"

GSD-Task: S03/T03
2026-04-04 09:52:01 +00:00
jlightner
d1efdbb3fa feat: Added personality_weight (0.0–1.0) to chat API; modulates system…
- "backend/routers/chat.py"
- "backend/chat_service.py"
- "backend/tests/test_chat.py"

GSD-Task: S02/T01
2026-04-04 09:28:35 +00:00
jlightner
cc60852ac9 feat: Built post CRUD and file upload/download API routers with auth, o…
- "backend/routers/posts.py"
- "backend/routers/files.py"
- "backend/minio_client.py"
- "backend/auth.py"
- "backend/main.py"

GSD-Task: S01/T02
2026-04-04 09:07:35 +00:00
jlightner
2d9076ae92 feat: Added personality extraction pipeline: prompt template, 3-tier tr…
- "prompts/personality_extraction.txt"
- "backend/pipeline/stages.py"
- "backend/schemas.py"
- "backend/routers/admin.py"

GSD-Task: S06/T02
2026-04-04 08:28:18 +00:00
jlightner
10cd175333 feat: Added personality_profile JSONB column to Creator model with migr…
- "backend/models.py"
- "backend/schemas.py"
- "backend/routers/creators.py"
- "alembic/versions/023_add_personality_profile.py"

GSD-Task: S06/T01
2026-04-04 08:24:44 +00:00
jlightner
d13d6c3aa1 test: Added multi-turn conversation memory with Redis-backed history (1…
- "backend/chat_service.py"
- "backend/routers/chat.py"
- "backend/tests/test_chat.py"

GSD-Task: S04/T01
2026-04-04 07:50:30 +00:00
jlightner
243a7a3eb6 feat: Follow system + tier config page (M022/S02)
- CreatorFollow model + pure SQL migration 022
- Follow router: POST/DELETE /follows/{creator_id}, GET /follows/me, GET /follows/{id}/status
- follower_count on creator detail endpoint
- Follow button on CreatorDetail (authenticated users only)
- CreatorTiers page with Free/Pro/Premium cards, Coming Soon modals
- Tiers link in creator sidebar nav
- Route /creator/tiers (protected)
2026-04-04 07:34:03 +00:00
jlightner
c05e4da594 feat: Add creator-scoped highlight review endpoints (list/detail/status…
- "backend/models.py"
- "alembic/versions/021_add_highlight_trim_columns.py"
- "backend/routers/creator_highlights.py"
- "backend/main.py"

GSD-Task: S01/T01
2026-04-04 06:58:28 +00:00
jlightner
ab9dd2aa1b feat: Added write_mode support to impersonation tokens with conditional…
- "backend/auth.py"
- "backend/models.py"
- "backend/routers/admin.py"
- "backend/tests/test_impersonation.py"

GSD-Task: S07/T01
2026-04-04 06:24:04 +00:00
jlightner
ed9aa7a83a feat: Added ChapterStatus enum, sort_order column, migration 020, chapt…
- "backend/models.py"
- "backend/schemas.py"
- "alembic/versions/020_add_chapter_status_and_sort_order.py"
- "backend/routers/creator_chapters.py"
- "backend/routers/videos.py"
- "backend/main.py"

GSD-Task: S06/T01
2026-04-04 06:03:49 +00:00
jlightner
e44ec1d1d5 feat: Added media streaming endpoint and chapters endpoint to videos ro…
- "backend/routers/videos.py"
- "backend/schemas.py"
- "frontend/src/api/videos.ts"

GSD-Task: S05/T01
2026-04-04 05:47:16 +00:00
jlightner
6f12d5a240 feat: Wired stage_highlight_detection Celery task with bulk upsert, 4 a…
- "backend/pipeline/stages.py"
- "backend/routers/highlights.py"
- "backend/main.py"

GSD-Task: S04/T03
2026-04-04 05:36:10 +00:00
jlightner
a9589bfc93 test: Built ChatService with retrieve-prompt-stream pipeline, POST /api…
- "backend/chat_service.py"
- "backend/routers/chat.py"
- "backend/main.py"
- "backend/tests/test_chat.py"

GSD-Task: S03/T01
2026-04-04 05:19:44 +00:00
jlightner
a976129179 feat: Added 4-tier creator-scoped cascade (creator → domain → global →…
- "backend/search_service.py"
- "backend/schemas.py"
- "backend/routers/search.py"

GSD-Task: S02/T01
2026-04-04 05:02:30 +00:00
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
0fc0df1d29 feat: Added GET /api/v1/creator/dashboard returning video_count, techni…
- "backend/routers/creator_dashboard.py"
- "backend/schemas.py"
- "backend/main.py"
- "alembic/versions/016_add_users_and_invite_codes.py"

GSD-Task: S02/T01
2026-04-04 00:09:19 +00:00
jlightner
87cb667848 test: Added GET /videos/{video_id} and GET /videos/{video_id}/transcrip…
- "backend/routers/videos.py"
- "backend/schemas.py"
- "backend/tests/test_video_detail.py"

GSD-Task: S01/T01
2026-04-03 23:42:43 +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
db135f738e feat: Added consent API router with 5 endpoints (list, get, upsert with…
- "backend/routers/consent.py"
- "backend/schemas.py"
- "backend/main.py"

GSD-Task: S03/T02
2026-04-03 22:11:36 +00:00
jlightner
77f44b0b48 test: Implemented auth API router with register/login/me/update-profile…
- "backend/routers/auth.py"
- "backend/main.py"
- "backend/auth.py"
- "backend/requirements.txt"
- "backend/tests/conftest.py"
- "backend/tests/test_auth.py"

GSD-Task: S02/T02
2026-04-03 21:54:11 +00:00
jlightner
69335d8d6d chore: remove 2,367 lines of dead code — orphaned CSS, unused imports, stale files
Deleted files:
- generate_stage5_variants.py (874 lines) — superseded by pipeline.quality toolkit
- PROJECT_CONTEXT.md (461 lines) — stale, .gsd/PROJECT.md is the living doc
- CHRYSOPEDIA-ASSESSMENT.md (654 lines) — M011 triage artifact, all findings actioned

CSS cleanup (364 lines):
- 20 orphaned block groups from deleted review queue/old components
- Duplicate .btn base rule, .btn--warning, @keyframes stagePulse

Python imports:
- routers/pipeline.py: uuid, literal_column, over, text
- tests/test_pipeline.py: 9 unused imports (PropertyMock, create_engine, etc.)

Build verified: tsc --noEmit clean, npm run build clean (59 modules, 0 warnings).
2026-04-03 09:43:37 +00:00
jlightner
539274ce58 feat: Added summary, topic_tags, and key_moment_count fields to Creator…
- "backend/schemas.py"
- "backend/routers/creators.py"

GSD-Task: S03/T01
2026-04-03 09:07:34 +00:00
jlightner
cafbd0afb1 feat: Added moment_count field to CreatorDetail schema, router query (K…
- "backend/schemas.py"
- "backend/routers/creators.py"
- "frontend/src/api/public-client.ts"

GSD-Task: S02/T01
2026-04-03 08:58:05 +00:00
jlightner
c3e5a8fe86 feat: add embed-status endpoint for per-video embedding/Qdrant detail
GET /admin/pipeline/embed-status/{video_id} returns technique pages
linked to the video, Qdrant vector count, and last stage 6 event —
provides data for the currently non-functional Embed tab in admin UI.
2026-04-03 06:24:58 +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
44e5905bd7 feat: auto-avatar integration with TheAudioDB
- Added avatar_url, avatar_source, avatar_fetched_at columns to Creator
  model with Alembic migration 014
- New backend/services/avatar.py — TheAudioDB lookup with token-based
  name similarity scoring and genre overlap bonus
- New Celery task fetch_creator_avatar for background avatar fetching
- Admin endpoints: POST /creators/{id}/fetch-avatar (single) and
  POST /creators/fetch-all-avatars (batch for missing avatars)
- Wired avatar_url into CreatorRead, CreatorInfo, and CreatorBrowseItem
  schemas so all API responses include avatar data
2026-04-03 05:55:42 +00:00
jlightner
61546bf25b perf: eliminate N+1 queries in stale-pages, add videos pagination, cache related techniques
- Rewrote stale-pages endpoint to use a single query with row_number
  window function instead of per-page queries for latest version + creator
- Added optional offset/limit/status/creator_id params to videos endpoint
  (backward compatible — defaults return all results)
- Added 1-hour Redis cache to _find_dynamic_related technique scoring
2026-04-03 05:50:53 +00:00
jlightner
094e832032 feat: Added favicon (SVG + 32px PNG), apple-touch-icon, OG social image…
- "frontend/public/favicon.svg"
- "frontend/public/favicon-32.png"
- "frontend/public/apple-touch-icon.png"
- "frontend/public/og-image.png"
- "frontend/index.html"

GSD-Task: S03/T01
2026-04-03 05:45:51 +00:00
jlightner
9f0b0922b0 feat: add GET /api/v1/stats endpoint with technique and creator counts 2026-04-03 04:24:58 +00:00
jlightner
8c81c472ea fix: pass last_technique_at through row unpacking 2026-04-03 04:15:39 +00:00
jlightner
acd0567e3c feat: add last_technique_at to creators API endpoint 2026-04-03 04:12:31 +00:00
jlightner
f64a0c1107 perf: Added SearchLog model, Alembic migration 013, Pydantic schemas, f…
- "backend/models.py"
- "backend/schemas.py"
- "backend/routers/search.py"
- "alembic/versions/013_add_search_log.py"

GSD-Task: S01/T01
2026-04-03 04:02:55 +00:00
jlightner
495d1fa489 feat: Added paginated GET /admin/pipeline/technique-pages endpoint with…
- "backend/routers/pipeline.py"
- "backend/schemas.py"

GSD-Task: S06/T01
2026-04-03 01:55:35 +00:00
jlightner
dc18d0a543 feat: Wired source_videos and body_sections_format into technique detai…
- "backend/routers/techniques.py"

GSD-Task: S03/T02
2026-04-03 01:19:32 +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
e0c73db8ff feat: Added sort query parameter (relevance/newest/oldest/alpha/creator…
- "backend/routers/search.py"
- "backend/routers/topics.py"
- "backend/routers/techniques.py"
- "backend/search_service.py"

GSD-Task: S02/T01
2026-04-01 06:41:52 +00:00
jlightner
fa82f1079a feat: Enriched Qdrant embedding text with creator_name/tags and added r…
- "backend/pipeline/stages.py"
- "backend/pipeline/qdrant_client.py"
- "backend/routers/pipeline.py"

GSD-Task: S01/T02
2026-04-01 06:41:52 +00:00
jlightner
84e7a9906c feat: Refactored keyword_search to multi-token AND with cross-field mat…
- "backend/search_service.py"
- "backend/schemas.py"
- "backend/routers/search.py"
- "backend/tests/test_search.py"

GSD-Task: S01/T01
2026-04-01 06:41:52 +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
cd3b57a156 fix: Clean retrigger preserves transcript_segments (pipeline input data)
Deleting transcript_segments left the pipeline with nothing to process —
all stages would skip immediately. Segments come from the ingest step,
not from pipeline stages 2-6. Only pipeline_events and key_moments
(pipeline output) are deleted during clean reprocess.
2026-03-31 16:32:25 +00:00
jlightner
b0ad4c2dfc feat: Add real-time pipeline visibility — auto-refresh, stage timeline, activity feed, bulk log
- Backend: Video list now includes active_stage, active_stage_status, and
  stage_started_at fields via DISTINCT ON subquery
- Backend: New GET /admin/pipeline/recent-activity endpoint returns
  latest stage completions/errors with video context
- Frontend: 15-second auto-refresh with change detection — video rows
  flash when status changes
- Frontend: Stage timeline dots on processing/complete/error videos
  showing progress through stages 2-5, active stage pulses
- Frontend: Collapsible Recent Activity feed at top showing last 8
  stage completions/errors with duration and creator
- Frontend: Bulk operation scrollable log showing per-video results
  as they complete
- Frontend: Auto-refresh checkbox toggle in header
2026-03-31 16:12:57 +00:00
jlightner
e17132bd60 feat: Add bulk pipeline reprocessing — creator filter, multi-select, clean retrigger
- Backend: POST /admin/pipeline/clean-retrigger/{video_id} endpoint that
  deletes pipeline_events, key_moments, transcript_segments, and Qdrant
  vectors before retriggering the pipeline
- Backend: QdrantManager.delete_by_video_id() for vector cleanup
- Frontend: Creator filter dropdown on pipeline admin page
- Frontend: Checkbox selection column with select-all
- Frontend: Bulk toolbar with Retrigger Selected and Clean Reprocess
  actions, sequential dispatch with progress bar, cancel support
- Bulk dispatch uses 500ms delay between requests to avoid slamming API
2026-03-31 15:24:59 +00:00
jlightner
717f6c0785 feat: Added GET /api/v1/techniques/random endpoint returning {slug}, fe…
- "backend/routers/techniques.py"
- "frontend/src/api/public-client.ts"
- "frontend/src/pages/Home.tsx"
- "frontend/src/App.css"

GSD-Task: S01/T02
2026-03-31 08:24:38 +00:00
jlightner
1254e173d4 test: Added GET /api/v1/search/suggestions endpoint returning popular t…
- "backend/schemas.py"
- "backend/routers/search.py"
- "backend/tests/test_search.py"

GSD-Task: S04/T01
2026-03-31 06:35:37 +00:00
jlightner
5d0fd05b98 feat: Added scored dynamic related-techniques query returning up to 4 r…
- "backend/schemas.py"
- "backend/routers/techniques.py"
- "backend/tests/test_public_api.py"

GSD-Task: S02/T01
2026-03-31 06:13:59 +00:00
jlightner
8661549ab1 test: Added GET /topics/{category_slug}/{subtopic_slug} endpoint filter…
- "backend/routers/topics.py"
- "backend/tests/test_public_api.py"

GSD-Task: S01/T01
2026-03-31 05:59:36 +00:00
jlightner
0b27e5752e feat: Added sort=random|recent query param to list_techniques endpoint…
- "backend/routers/techniques.py"
- "frontend/src/api/public-client.ts"

GSD-Task: S03/T01
2026-03-31 05:46:31 +00:00
jlightner
95b11ae5bc feat: Added key_moment_count correlated subquery to technique list API…
- "backend/schemas.py"
- "backend/routers/techniques.py"
- "frontend/src/api/public-client.ts"
- "frontend/src/pages/Home.tsx"
- "frontend/src/App.css"

GSD-Task: S03/T01
2026-03-31 05:23:37 +00:00
jlightner
127919565a feat: Added hidden boolean column to Creator model, migration marking T…
- "backend/models.py"
- "backend/routers/creators.py"
- "alembic/versions/009_add_creator_hidden_flag.py"

GSD-Task: S02/T01
2026-03-31 05:13:17 +00:00