Commit 41412ed
feat(web,api): filter org release feed by source type, hide prereleases by default (#797)
* feat(web,api): filter org release feed by source type, hide prereleases by default
Adds two filters to `/v1/orgs/:slug/releases` and the org Releases tab:
- `?source_type=github,feed` (catalog-shaped tolerant parser; unknowns dropped)
- `?include_prereleases=true` (default false)
Prerelease detection runs at ingest. The GitHub adapter captures the
authoritative `prerelease` field from the GitHub API; other adapters fall
back to a SemVer-prerelease regex via `@buildinternet/releases-core/prerelease`
covering -alpha/-beta/-rc/-pre/-preview/-nightly/-canary/-snapshot/-dev/-edge
/-insider/-experimental/-early-access/-ea/-mN identifiers.
Migration `20260507000000_releases_prerelease.sql` adds the column with
default 0; `20260507000001_releases_prerelease_backfill.sql` retags existing
rows by version pattern. The existing `idx_releases_source_suppressed_published`
composite carries the per-org join — a standalone bool index would have
near-zero selectivity and sit unused.
Web frontend renders a filter row above the release list: source-type chips
(auto-hidden when only one source type exists for the org) and a "Show
prereleases" checkbox. Pre-release rows get a small "pre" pill.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Address PR #797 review: error UI, decouple prerelease toggle, missed call sites
- Surface non-abort fetch failures via a fetchError banner above the list
(CodeRabbit catch was real — re-throwing escaped the promise chain)
- Decouple "Show prereleases" checkbox from source-type tab visibility:
feed/scrape/agent-only orgs need the toggle too (their adapters fall back
to the version-pattern detector)
- Add `-next` and `-milestone` to the SQL backfill (`-next.x` is common
for pnpm/Supabase; the regex already covered both)
- Add `prerelease` column to the `releasesVisible` Drizzle view declaration
so type-safe queries can reference it; plumb through the GraphQL loader
- Set `prerelease` on the single-release seed endpoint
(POST /sources/:slug/releases) — it was hitting the column default of 0
- Bump cron releases-insert chunk from hardcoded 5 to RELEASES_BATCH_CHUNK_SIZE
(7), aligning with the bind-budget convention used elsewhere
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9f94c96 commit 41412ed
24 files changed
Lines changed: 415 additions & 67 deletions
File tree
- packages
- adapters/src
- api-types/src/schemas
- core
- src
- tests
- api
- unit
- web/src
- app
- [orgSlug]
- api
- format/[orgSlug]
- org-releases/[slug]
- components
- lib
- workers/api
- migrations
- src
- cron
- graphql
- lib
- queries
- routes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
407 | 408 | | |
408 | 409 | | |
409 | 410 | | |
| |||
467 | 468 | | |
468 | 469 | | |
469 | 470 | | |
| 471 | + | |
470 | 472 | | |
471 | 473 | | |
472 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
12 | 20 | | |
13 | 21 | | |
14 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| |||
820 | 821 | | |
821 | 822 | | |
822 | 823 | | |
| 824 | + | |
823 | 825 | | |
824 | 826 | | |
825 | 827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments