Skip to content

fix: fix framework switcher#810

Merged
qw-in merged 8 commits intomainfrom
quinn/fix-framework-switcher
Apr 17, 2026
Merged

fix: fix framework switcher#810
qw-in merged 8 commits intomainfrom
quinn/fix-framework-switcher

Conversation

@qw-in
Copy link
Copy Markdown
Member

@qw-in qw-in commented Apr 17, 2026

Simplifies framework switching logic to ensure full page gets updated.

Fixed some dependency warnings and notices as well.

@qw-in qw-in requested a review from davidmytton April 17, 2026 19:57
@qw-in qw-in self-assigned this Apr 17, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

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

Project Deployment Actions Updated (UTC)
arcjet-docs Ready Ready Preview, Comment Apr 17, 2026 8:01pm

Request Review

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​clerk/​nextjs@​6.39.0 ⏵ 6.39.278100 +7595 +1100100
Updatedhono@​4.12.12 ⏵ 4.12.1499 +1100 +297 +196100
Updatedfastify@​5.8.4 ⏵ 5.8.599 +1100 +1610098 +2100

View full report

Copy link
Copy Markdown

@arcjet-review arcjet-review Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arcjet Review — 🟢 Low Risk

Decision: Approved

Rationale: Small, well-scoped fix to the framework switcher plus three patch-level dependency bumps and a pnpm override refactor. The switcher now validates input via isValidFrameworkKey before storing, and a new getInitialFramework() bootstraps the store from query param or stored preference with a proper SSR guard (typeof window === 'undefined'). The query param value is validated before being cast to FrameworkKey and before being written back to the URL, so there is no injection/XSS surface. Dependency bumps (@clerk/nextjs 6.39.0→6.39.2, hono 4.12.12→4.12.14, fastify 5.8.4→5.8.5) are patch releases. The dependency-changes trigger fires but the updates are minimal; I'm approving with Low risk.

Summary of Changes

Fixes the framework switcher by validating the selected key up-front, persisting it, and doing a full page reload with the new f query param instead of a pushState + in-memory store update. Adds getInitialFramework() in store.ts to seed the nanostore from the URL param or stored preference on client init (SSR-safe). Also bumps @clerk/nextjs, hono, and fastify to patch versions, and replaces a nested vite-node>vite pnpm override with a top-level vite override.

Escalation Triggers

  • Dependency Changes: package.json and snippets/fastify/package.json updated — @clerk/nextjs, hono, fastify patch bumps and a pnpm overrides change for vite.

Notes

PR size is well under the 1000-line threshold. lib/prefs was not included in the diff — the review assumes isValidFrameworkKey and getStoredFramework already exist and behave as the new call sites expect.

Path filtering: 1 file excluded by ignore paths. 4 of 5 files included in review.

Review: 3b5ff3bc | Powered by Arcjet Review

Comment thread package.json
Comment thread src/components/FrameworkSwitcher.tsx
@qw-in qw-in enabled auto-merge April 17, 2026 20:00
@qw-in qw-in added this pull request to the merge queue Apr 17, 2026
Merged via the queue into main with commit e669538 Apr 17, 2026
11 checks passed
@qw-in qw-in deleted the quinn/fix-framework-switcher branch April 17, 2026 20:13
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.

2 participants