Skip to content

fix(frontend): exclude preview versions from outdate notice#4677

Merged
jog1t merged 1 commit intomainfrom
04-17-fix_frontend_exclude_preview_versions_from_outdate_notice
Apr 17, 2026
Merged

fix(frontend): exclude preview versions from outdate notice#4677
jog1t merged 1 commit intomainfrom
04-17-fix_frontend_exclude_preview_versions_from_outdate_notice

Conversation

@jog1t
Copy link
Copy Markdown
Contributor

@jog1t jog1t commented Apr 17, 2026

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link
Copy Markdown

railway-app bot commented Apr 17, 2026

🚅 Deployed to the rivet-pr-4677 environment in rivet-frontend

Service Status Web Updated (UTC)
mcp-hub 🕒 Building (View Logs) Web Apr 17, 2026 at 10:42 am
kitchen-sink 🕒 Building (View Logs) Web Apr 17, 2026 at 10:42 am
website 🕒 Building (View Logs) Web Apr 17, 2026 at 10:42 am
frontend-inspector 🕒 Building (View Logs) Web Apr 17, 2026 at 10:42 am
frontend-cloud 🕒 Building (View Logs) Web Apr 17, 2026 at 10:42 am
ladle 🕐 Initializing (View Logs) Web Apr 17, 2026 at 10:42 am

@jog1t jog1t marked this pull request as ready for review April 17, 2026 10:42
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4677 April 17, 2026 10:42 Destroyed
Copy link
Copy Markdown
Contributor Author

jog1t commented Apr 17, 2026

Merge activity

  • Apr 17, 10:42 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 17, 10:42 AM UTC: @jog1t merged this pull request with Graphite.

Copy link
Copy Markdown
Contributor Author

jog1t commented Apr 17, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jog1t jog1t merged commit 14140ce into main Apr 17, 2026
20 of 30 checks passed
@jog1t jog1t deleted the 04-17-fix_frontend_exclude_preview_versions_from_outdate_notice branch April 17, 2026 10:42
@claude
Copy link
Copy Markdown

claude bot commented Apr 17, 2026

PR Review: fix(frontend): exclude preview versions from outdate notice

Summary

This PR adds a guard in isVersionOutdated to short-circuit version comparison when either argument starts with "0.0.0-", preventing preview/CI builds (e.g. 0.0.0-pr.4673.6d) from being falsely flagged as outdated in the inspector upgrade warning UI.


Correctness

The fix is correct and well-scoped. Without this guard, parseVersion strips the prerelease suffix and compares 0.0.0 against RIVET_KIT_MIN_VERSION = "2.0.35", which returns true (outdated) — a misleading false positive for developers on preview builds. The guard correctly returns false (not outdated) for any 0.0.0-* version.

The symmetry of the guard (version1 || version2) is appropriate, guarding both sides even though in practice only version1 (the running actor's version) would ever be 0.0.0-*.


Minor Issues

1. Implicit coupling to PREVIEW_BASE_VERSION

The check startsWith("0.0.0-") is implicitly coupled to PREVIEW_BASE_VERSION = "0.0.0" in scripts/publish/src/lib/context.ts. If that constant ever changed, this guard would silently stop working. A brief comment referencing the publish script constant would make the coupling explicit.

2. No tests added

isVersionOutdated is a pure function with three distinct behavioral paths after this change (preview version, pre-release comparison, stable comparison). There are no existing tests for it. Simple Vitest unit tests (no mocking needed) covering these paths would be low-effort and valuable:

  • stable vs stable
  • pre-release vs stable
  • 0.0.0-pr.* as version1
  • 0.0.0-pr.* as version2

3. Empty PR description

The PR template fields and checklist are unfilled. Not a blocker, but the PR type (bug fix) and a brief test plan would be helpful for reviewers and changelog purposes.


CLAUDE.md Conventions

  • No rivet.gg references: pass
  • No println!/eprintln! or Rust logging issues: N/A (TypeScript-only)
  • No vi.mock/jest.mock: pass (no new tests added)
  • Comment uses complete sentence with concrete example: pass
  • No em dashes or fragmented comment structure: pass

Verdict

The fix is correct and minimal. Two non-blocking follow-ups: (1) add a comment referencing PREVIEW_BASE_VERSION to make the coupling explicit, and (2) add unit tests for isVersionOutdated.

@github-actions
Copy link
Copy Markdown
Contributor

Preview packages published to npm

Install with:

npm install rivetkit@pr-4677

All packages published as 0.0.0-pr.4677.09d7a23 with tag pr-4677.

Engine binary is shipped via @rivetkit/engine-cli on linux-x64-musl, linux-arm64-musl, darwin-x64, and darwin-arm64. Windows users should use the release installer or set RIVET_ENGINE_BINARY.

Docker images:

docker pull rivetdev/engine:slim-09d7a23
docker pull rivetdev/engine:full-09d7a23
Individual packages
npm install rivetkit@pr-4677
npm install @rivetkit/react@pr-4677
npm install @rivetkit/rivetkit-native@pr-4677
npm install @rivetkit/sqlite-wasm@pr-4677
npm install @rivetkit/workflow-engine@pr-4677

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