fix(ratewise): 修復冷啟動 multi 還原 hydration 未觸發#488
Merged
Conversation
- RememberedHomeRoute 補 queueMicrotask 與 store subscribe fallback - 新增 production MODE 回歸測試(hasHydrated=false 但 store 已同步) - 新增 patch changeset 測試:RememberedHomeRoute + coldStartRestore 11 項通過;pnpm --filter @app/ratewise test 2469 項通過 Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
|
✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。
|
This was referenced Jun 27, 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
RememberedHomeRoute因hasHydrated()/onFinishHydration未觸發而永遠卡在hydrated=false,導致 multi 冷啟動無法還原的問題queueMicrotask與useConverterStore.subscribefallback:當 store 已與 localStorage persist 同步時即標記 hydratedhasHydrated=false但 store 已有lastConverterView=multi)@app/ratewiseRoot cause
#487已修復 persist/store 同步時序競態,但生產環境仍存在 zustand persist 資料已 merge、hydration callback 卻從未觸發的路徑,使 restore gate 永遠關閉。Test plan
RememberedHomeRoute.test.tsx+coldStartRestore.test.ts(11 項)pnpm --filter @app/ratewise test(2469 項通過)/multiNotes
offline.html漂移Made with Cursor