Commit Graph

5 Commits

Author SHA1 Message Date
d11e980a6a fix(webui): timeline opens on full landscape, drop undated points
Some checks failed
CI / test (3.11) (push) Failing after 9s
CI / test (3.12) (push) Failing after 9s
After the chronological-order fix the page opened on the earliest month
(1995-12), showing only a handful of same-colored dots while the legend
listed every category — looked broken.

- Initialise the plot on the LAST frame (full landscape); Play now replays
  the build-up from the start (fromcurrent: false), slider starts at the end.
- Make _extract_month robust: year-only / junk dates (ISO/ETSI 'time' like
  '2015/CD Amd 2', bare '2023', '') no longer yield malformed month labels
  ('2015-/C') or a garbled 'unknown' frame badge.
- Drop undated docs from the temporal animation (they remain on /landscape).

At the full initial frame every category has points, so the legend matches
what is drawn.
2026-05-23 12:41:06 +02:00
c3af38e0f9 fix(webui): timeline embedding landscape — sort points chronologically
The animated t-SNE landscape delivered points in embedding-dict order, not
chronological order. The front-end cumulative filter (p.month <= frame) then
inserted new points mid-array between frames, so Plotly's index-based frame
transition animated existing markers flying to other drafts' coordinates.
Visible symptom: a couple of points jumping around instead of a growing map.

Sorting points by (month, name) makes each frame's per-category marker list
an append-only prefix of the next, so transitions only add markers.
Verified on the live DB: 188 non-append-only frame transitions before, 0 after.
2026-05-23 12:41:06 +02:00
cdb2e505c6 fix: restore SAFETY/CAPABILITY_CATEGORIES lost in data.py split
Constants were defined in the old monolithic data.py but not carried
over to data/analysis.py during the split, breaking /trends page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 04:04:19 +01:00
c755b2bbf3 Add author detail, idea detail, and gap-draft reverse link pages
- Author detail page (/authors/<person_id>): shows author info, all drafts
  with ratings, and co-authors with shared draft counts. Public route.
- Idea detail page (/ideas/<idea_id>): shows idea metadata, source draft,
  and top-5 most similar ideas via embedding cosine similarity. Admin route.
- Gap detail page: added "Related Drafts" section that finds drafts by
  extracting draft names from evidence text and searching by topic keywords.
- Updated author links across templates to use /authors/<person_id> URLs.
- Added DB methods: get_author_by_id, get_author_drafts, get_coauthors.
- Extended top_authors to include person_id (5th tuple element).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 03:45:00 +01:00
3fb17100d7 Split webui into Flask blueprints and data domain modules
- Split app.py (66 routes) into 3 blueprints: pages (public), api (JSON), admin (@admin_required)
- Split data.py (4,360 LOC) into 7 domain modules: drafts, authors, ratings, gaps, analysis, search, proposals
- Add data/__init__.py re-exporting all public functions for backward compatibility
- Add custom 404/500 error pages matching dark theme
- Add request timing logging via before_request/after_request hooks
- Refactor app.py into create_app() factory pattern
- All 106 tests pass, all 66 routes preserved

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 03:37:15 +01:00