Commit 5d39b7f
feat: insights pages — stats, plot of the day, similar specs (#5233)
## Summary
- **Stats Dashboard** (`/stats`): Library quality/LOC histograms,
coverage dot matrix, top rated implementations, tag cloud, timeline,
Plausible analytics link
- **Plot of the Day**: Daily featured high-quality implementation on
homepage (dismissable, sessionStorage persisted)
- **Similar Specifications/Implementations**: Tag-based Jaccard
similarity — spec pages use spec tags, impl pages use spec + impl tags,
with hover-highlighting of shared tags
- **Deferred code loading**: Heavy DB fields (`code`,
`review_criteria_checklist`, `review_image_description`, `tested`)
deferred in model (~25MB saved per `get_all()`), new lightweight
`/specs/{id}/{lib}/code` endpoint, frontend prefetch on impl page open
- **Collapsible spec tabs** with always-visible tags and metadata footer
showing updated dates
- **New insights API router** (`/insights/dashboard`,
`/insights/plot-of-the-day`, `/insights/related/{spec_id}`)
- Updated sitemap, Plausible docs, API docs, footer links
Closes #5228
Closes #5229
Closes #5230
## Test plan
- [ ] Verify `/stats` page loads with all sections (counters, library
histograms, coverage matrix, top rated, timeline, tags)
- [ ] Verify Plot of the Day appears on homepage when no filters active,
dismiss persists across navigation
- [ ] Verify similar specifications on spec overview page (spec tags
only, links to specs)
- [ ] Verify similar implementations on impl detail page (spec + impl
tags, links to impls, same library preferred)
- [ ] Verify tag hover highlighting works between similar cards and tag
chips
- [ ] Verify code tab loads lazily (check network tab — no code in
`/specs/{id}` response)
- [ ] Verify all tabs collapse/expand on click including re-click to
close
- [ ] Run `uv run pytest tests/unit` — 1068 tests pass
- [ ] Run `yarn lint && yarn build` — 0 errors
🤖 Generated with [Claude Code](https://claude.ai/claude-code)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d45c640 commit 5d39b7f
File tree
22 files changed
+1679
-135
lines changed- api
- routers
- app/src
- components
- hooks
- pages
- types
- core/database
- docs/reference
- tests/unit/api
22 files changed
+1679
-135
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
| |||
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| 148 | + | |
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
0 commit comments