Skip to content

chore: force select only the matching guide when forced guide key is set#843

Open
thomaswhyyou wants to merge 2 commits intomainfrom
thomas-kno-11142-sdk-guide-toolbar-v2-poc-1
Open

chore: force select only the matching guide when forced guide key is set#843
thomaswhyyou wants to merge 2 commits intomainfrom
thomas-kno-11142-sdk-guide-toolbar-v2-poc-1

Conversation

@thomaswhyyou
Copy link
Contributor

@thomaswhyyou thomaswhyyou commented Feb 2, 2026

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 forcedGuideKey is 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.

@linear
Copy link

linear bot commented Feb 2, 2026

@vercel
Copy link

vercel bot commented Feb 2, 2026

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

Project Deployment Actions Updated (UTC)
javascript-ms-teams-connect-example Ready Ready Preview, Comment Feb 2, 2026 8:48pm
javascript-nextjs-example Ready Ready Preview, Comment Feb 2, 2026 8:48pm
javascript-slack-connect-example Ready Ready Preview, Comment Feb 2, 2026 8:48pm
javascript-slack-kit-example Ready Ready Preview, Comment Feb 2, 2026 8:48pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 2, 2026

⚠️ No Changeset found

Latest commit: 8c99027

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@thomaswhyyou
Copy link
Contributor Author

@cursor review

@thomaswhyyou thomaswhyyou changed the title force select only the matching guide when forced guide key is set chore: force select only the matching guide when forced guide key is set Feb 2, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@@ -1,2 +1,2 @@
nodejs 24.12.0
nodejs 24.13.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated, upgrading to the same node version we are using in control.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

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);
Copy link

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is true, and I think we should move toward the behavior where only published guides can be rendered.

@kylemcd
Copy link
Member

kylemcd commented Feb 3, 2026

don't forget a changeset!

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.

3 participants