fix: preserve prerelease metadata#144
Conversation
Greptile SummaryThis PR promotes the Confidence Score: 5/5Safe to merge — the prerelease metadata flow is consistent end-to-end and no new blocking issues were found beyond the NULL-filter concern already raised in the previous review thread. All changed files handle the three-state prerelease signal (true/false/null) correctly. The D1 version upsert always writes 0 or 1 (never NULL for new rows). The TOML generation preserves existing flags through the plain-text fallback path. The web UI and TOML endpoints are consistent. The only known concern (AND prerelease = 0 excluding NULL rows) was already flagged in a prior review thread and is not a new finding. web/src/pages/[...tool].ts and web/src/pages/tools/[...tool].ts — the AND prerelease = 0 filter (NULL-row exclusion) was already discussed in the previous thread but warrants attention if the prerelease column was added without DEFAULT 0 on existing rows. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["update.sh\nmise ls-remote --prerelease --json"] -->|NDJSON with prerelease flag| B["generate-toml.js\nprerelease = true when set"]
B -->|TOML files in docs/| C["versions/sync API\nprerelease stored as 0/1 in D1"]
C --> D[D1 versions table\nprerelease INTEGER]
D --> E["[...tool].toml.ts\nemit prerelease = true"]
D --> F["[...tool].ts\nAND prerelease = 0\nplain-text stable-only"]
D --> G["[tool].astro\nprerelease: row.prerelease === 1\nweb UI"]
G --> H["VersionsTable.tsx\nisPrerelease(v)\nstored flag OR regex fallback"]
B -->|prerelease data| I["sync-to-d1.js\nisPrerelease(ver, data)\nlatest_stable_version"]
Reviews (2): Last reviewed commit: "fix: preserve prerelease metadata" | Re-trigger Greptile |
0865db9 to
97bc9c6
Compare
There was a problem hiding this comment.
Code Review
This pull request transitions the project from regex-based prerelease detection to a metadata-driven approach. Key changes include updating scripts/update.sh to fetch prerelease flags using mise ls-remote --prerelease, modifying the database queries in Astro pages and TOML endpoints to include the prerelease column, and updating the VersionsTable component to filter based on this new property. The legacy isPrerelease utility and associated regex have been removed from web/src/lib/versions.ts and scripts/sync-to-d1.js. I have no feedback to provide.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 97bc9c6. Configure here.
| * Versions matching this pattern should be excluded when showing stable versions. | ||
| * | ||
| * Matches: | ||
| * - -src, -dev, -latest, -stm (build markers) |
There was a problem hiding this comment.
Exported function isPrereleaseVersion is never imported externally
Low Severity
The newly introduced isPrereleaseVersion is exported but never imported anywhere outside web/src/lib/versions.ts. It's only called internally by isPrerelease in the same file. The export keyword can be removed to keep the module's public surface minimal.
Reviewed by Cursor Bugbot for commit 97bc9c6. Configure here.


Summary
Follow-up
VersionInfo.prereleasewhen backend versions match mise prerelease patterns. Once that lands and mise-versions data is regenerated with it, this repo can remove its local regex fallback.Validation
Note: npm --workspace web run build is currently blocked before app compilation by an Astro/Cloudflare package export mismatch: Package subpath ./app/manifest is not defined by exports.
This PR description was generated by an AI coding assistant.