fix(version): sync across viewer + README, drop historical union#173
fix(version): sync across viewer + README, drop historical union#173
Conversation
- src/version.ts: collapse literal union to single `VERSION = "0.9.0"`; the historical enum was regenerated on every release and served no runtime purpose. Export-import keeps its supportedVersions set, which is the actual compat contract. - src/viewer/index.html: replace hardcoded `v0.7.0` brand badge with `__AGENTMEMORY_VERSION__` placeholder. - src/viewer/document.ts: substitute the placeholder with VERSION at render time (same mechanism as the CSP nonce). - README.md: "New in v0.8.2" banner was two releases stale. Replace with v0.9.0 highlights linking to CHANGELOG.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR bumps the project version to v0.9.0 and implements dynamic version injection in the viewer. The VERSION constant type constraint is simplified, README release notes are updated, and the viewer template now uses a build-time placeholder for its version display rather than a hardcoded value. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Three drift bugs across version displays:
src/viewer/index.html:793hardcodedv0.7.0. Two releases stale.README.md:158still saidv0.8.2. Package is0.9.0.src/version.tsliteral union — listed every historical version ("0.3.0" | "0.4.0" | ... | "0.9.0") with no runtime purpose. Regenerated on every release.Fix
src/version.ts→ single literal:export const VERSION = "0.9.0";. Export-import still validates against its ownsupportedVersionsSet, which is the actual compat contract.src/viewer/index.html→ placeholder__AGENTMEMORY_VERSION__.src/viewer/document.ts→ substituteVERSIONat render time. Same mechanism as the existing CSP nonce — one.replaceAllcall.README.md→ banner rewritten for v0.9.0 with link to CHANGELOG section.Scope note
User screenshot showed
V0.0.0in the website hero. Live check ofhttps://www.agent-memory.dev/returnsv0.9.0correctly, so the website path is already wired viawebsite/lib/meta.ts(#167). The screenshot was likely a cached/preview deploy. Not addressing website code in this PR.Test plan
npm run build— clean, viewer template emitted with placeholdernpm test— 777 passdist/viewer/index.htmlcontains placeholder and no hardcodedv0.7.0http://localhost:3113, confirm brand readsv0.9.0Summary by CodeRabbit
Documentation
Chores