fix: resolve HMR, hydration, Windows dev, and supply chain issues#57
Merged
Conversation
This was referenced May 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 5 open issues in ClawSuite:
#54 — vite.config.ts: allowedHosts default breaks local dev HMR
Gate HMR/host overrides on
CLAWSUITE_ALLOWED_HOSTSenv var being explicitly set (viaexposedOverNetworkboolean), not on the derived array length. The['.ts.net']fallback madeallowedHosts.length > 0always true, forcingwss://:443HMR on local dev.#52 — Can't npm run dev on Windows without removing NODE_OPTIONS
Added
cross-envas a devDependency and wrapped allNODE_OPTIONSenv var assignments in package.json scripts. Windows cmd doesn't support Unix-styleVAR=value commandsyntax.#53 — White screen on fresh install (setState undefined in AwaitInner)
Fixed
useSyncExternalStorecalls insession-title-store.tsanduse-dashboard-settings.tsthat used the samegetSnapshotfor both client and server. The server snapshot was callinglocalStorage(undefined on server), causing hydration mismatches. Added propergetServerSnapshotfunctions that return stable defaults.#50 — Terminal xterm onData not wired after hydration mismatch
Same root cause as #53 — hydration mismatches from
useSyncExternalStore. The terminal route already hasssr: falseand lazy loading, so this was likely resolved by the broader hydration fixes.#51 — TanStack Router supply chain vulnerability (GHSA-g7cv-rxg3-hmpx)
Updated
@tanstack/react-startto 1.168.10 (above patched 1.167.72) and@tanstack/react-routerto ^1.170.0 (above patched 1.169.9). Both are now above the patched versions for the malware-affected packages.Changes
vite.config.ts: AddedexposedOverNetworkboolean, used for HMR/host gatingpackage.json: cross-env for NODE_OPTIONS, updated TanStack depssrc/screens/chat/session-title-store.ts: proper SSR server snapshotsrc/screens/dashboard/hooks/use-dashboard-settings.ts: proper SSR server snapshotCloses #50, #51, #52, #53, #54