Skip to content

fix(version): sync across viewer + README, drop historical union#173

Merged
rohitg00 merged 1 commit intomainfrom
fix/version-sync
Apr 20, 2026
Merged

fix(version): sync across viewer + README, drop historical union#173
rohitg00 merged 1 commit intomainfrom
fix/version-sync

Conversation

@rohitg00
Copy link
Copy Markdown
Owner

@rohitg00 rohitg00 commented Apr 20, 2026

Summary

Three drift bugs across version displays:

  1. Viewer brand badgesrc/viewer/index.html:793 hardcoded v0.7.0. Two releases stale.
  2. README "New in" bannerREADME.md:158 still said v0.8.2. Package is 0.9.0.
  3. src/version.ts literal 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 own supportedVersions Set, which is the actual compat contract.
  • src/viewer/index.html → placeholder __AGENTMEMORY_VERSION__.
  • src/viewer/document.ts → substitute VERSION at render time. Same mechanism as the existing CSP nonce — one .replaceAll call.
  • README.md → banner rewritten for v0.9.0 with link to CHANGELOG section.

Scope note

User screenshot showed V0.0.0 in the website hero. Live check of https://www.agent-memory.dev/ returns v0.9.0 correctly, so the website path is already wired via website/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 placeholder
  • npm test — 777 pass
  • Verified dist/viewer/index.html contains placeholder and no hardcoded v0.7.0
  • Manual: start server, hit http://localhost:3113, confirm brand reads v0.9.0

Summary by CodeRabbit

  • Documentation

    • Updated release notes to v0.9.0 with new feature highlights including filesystem connector support and improved MCP standalone behavior.
  • Chores

    • Version bumped to v0.9.0.
    • Viewer now displays dynamically injected version information instead of hardcoded version.

- 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.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agentmemory Ready Ready Preview, Comment Apr 20, 2026 9:12pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cde3bdf5-c873-42f2-bfe3-b10fd6b9ba05

📥 Commits

Reviewing files that changed from the base of the PR and between 4f8c4ca and ca626f3.

📒 Files selected for processing (4)
  • README.md
  • src/version.ts
  • src/viewer/document.ts
  • src/viewer/index.html

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Version Bump & Configuration
README.md, src/version.ts
Updated version callout to v0.9.0 with new feature highlights; simplified VERSION constant by removing union type constraint.
Viewer Version Injection
src/viewer/document.ts, src/viewer/index.html
Introduced build-time version placeholder substitution in viewer rendering; replaced hardcoded version string in HTML template with __AGENTMEMORY_VERSION__ placeholder for runtime injection.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A version hops forth, from old to anew,
No longer shackled by type constraints true,
The viewer now whispers its age through the air,
Injected with grace at the build-time fair! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main changes: version synchronization across multiple files and removal of an unnecessary historical union type.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/version-sync

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rohitg00 rohitg00 merged commit 944ad30 into main Apr 20, 2026
5 checks passed
@rohitg00 rohitg00 deleted the fix/version-sync branch April 20, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant