fix(editor): fall back to existing currentPageId in loadSessionStateSnapshotIntoStore#7994
Merged
mimecuvalo merged 1 commit intomainfrom Feb 18, 2026
Merged
Conversation
…napshotIntoStore When a session state snapshot without currentPageId is loaded (e.g. via deep links in dotcom), the function now falls back to the existing instance's currentPageId instead of passing undefined to the validator.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
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.
Closes #7993
loadSessionStateSnapshotIntoStorecrashes with aValidationErrorwhen a session state snapshot withoutcurrentPageIdis loaded (e.g. via deep links in dotcom). This happens becausecurrentPageIdis passed asundefinedto the instance validator, which rejects it.The fix falls back to the existing instance's
currentPageIdwhen the snapshot doesn't include one, consistent with how the other fields in the function already use??fallbacks. Note thatpluckPreservingValuesdeliberately excludescurrentPageId(since the page may no longer exist), so we read it directly from the existing instance record instead.Change type
bugfixTest plan
?d=deep link parameterlastSessionStatein the file stateRelease notes
currentPageId(e.g. when using deep links).Note
Low Risk
Small, localized change to snapshot-loading fallback behavior with a focused regression test; minimal impact outside this edge case.
Overview
Prevents a crash when loading a
TLSessionStateSnapshotthat omitscurrentPageId(e.g. deep-link flows).loadSessionStateSnapshotIntoStorenow falls back to the existing instance record’scurrentPageIdwhen the snapshot doesn’t provide one, and a unit test was added to ensure the page id is preserved in this scenario.Written by Cursor Bugbot for commit 3599025. This will update automatically on new commits. Configure here.