chore: force select only the matching guide when forced guide key is set#843
chore: force select only the matching guide when forced guide key is set#843thomaswhyyou wants to merge 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
3ca6b2e to
bfd9122
Compare
|
@cursor review |
| @@ -1,2 +1,2 @@ | |||
| nodejs 24.12.0 | |||
| nodejs 24.13.0 | |||
There was a problem hiding this comment.
Unrelated, upgrading to the same node version we are using in control.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
|
|
||
| // If in debug mode, put the forced guide at the beginning of the display sequence. | ||
| if (state.debug.forcedGuideKey) { | ||
| const forcedKeyIndex = displaySequence.indexOf(state.debug.forcedGuideKey); |
There was a problem hiding this comment.
Preview guides not in display sequence cannot be shown
Low Severity
The removal of the displaySequence.unshift(state.debug.forcedGuideKey) logic means guides that exist only in previewGuides (but aren't yet in the display_sequence) can no longer be force-shown. Previously, the forced guide key was always added to the front of the display sequence copy, allowing iteration over keys not originally in the sequence. Now, only keys already in display_sequence are iterated, so a newly-created guide being previewed before publication to a group won't appear.
There was a problem hiding this comment.
This is true, and I think we should move toward the behavior where only published guides can be rendered.
|
don't forget a changeset! |



Description
This is prep work ahead of actual Guide Toolbar v2 changes in downstream PRs.
Taking a step back - right now we have a fair amount of Live Preview logic living in the guide client module directly, and it's resulting in a lot of added complexities that I think would be better contained in a separate toolbar/debugging module. I want to pull out as much "debugging" related code out of the guide client, and try to keep to a minimal set of properties the guide client understands to provide debugging behaviors/functionalities.
This PR simplifies the current live preview related logic by only force rendering the target guide when
forcedGuideKeyis present (vs rendering other guides also). This was brought up a few times as a point of confusion when using live preview, so I think this makes sense from both the code and the product perspectives. I think eventually I want to get rid of "live preview" with streaming updates altogether, but that's to be discussed later.