Skip to content

chore: split toolbar into v1 and v2 placeholder#845

Open
thomaswhyyou wants to merge 9 commits intothomas-kno-11142-sdk-guide-toolbar-v2-poc-4from
thomas-kno-11142-sdk-guide-toolbar-v2-poc-5
Open

chore: split toolbar into v1 and v2 placeholder#845
thomaswhyyou wants to merge 9 commits intothomas-kno-11142-sdk-guide-toolbar-v2-poc-4from
thomas-kno-11142-sdk-guide-toolbar-v2-poc-5

Conversation

@thomaswhyyou
Copy link
Contributor

@thomaswhyyou thomaswhyyou commented Feb 2, 2026

Description

This PR re-organizes the existing toolbar component, so that we now have V1 (the existing toolbar) and V2 (a placeholder component for the new toolbar), with certain modules shared between the two:

Toolbar/
├── index.ts
├── KnockButton.tsx
├── shared.ts
├── styles.css
├── V1
│   ├── index.ts
│   └── V1.tsx
└── V2
    ├── GuideHoverCard.tsx
    ├── GuideRow.tsx
    ├── GuidesListDisplaySelect.tsx
    ├── helpers.ts
    ├── index.ts
    ├── useInspectGuideClientStore.ts
    └── V2.tsx

Also includes more prep work:

  • Adds a toolbar prop to KnockGuideProvider to allow opting into using the new toolbar "v2", while the development continues
  • Adds a trackDebugParams prop to KnockGuideProvider and the guide client, so we can turn off reading/writing debug params from the guide client when using the toolbar.
    • This is paving a path toward pulling out the bulk of the debug logic out of the guide client, and moving it to the toolbar modules to tame complexity in the guide client code
  • Adds a placeholder component for toolbar v2, that can render based on the knock_guide_toolbar query param and exit out of it.
CleanShot.2026-02-04.at.15.37.52.mp4
Cursor Bugbot reviewed your changes and found no issues for commit 1b10cb1

@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 4, 2026 9:18pm
javascript-nextjs-example Ready Ready Preview, Comment Feb 4, 2026 9:18pm
javascript-slack-connect-example Ready Ready Preview, Comment Feb 4, 2026 9:18pm
javascript-slack-kit-example Ready Ready Preview, Comment Feb 4, 2026 9:18pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 2, 2026

⚠️ No Changeset found

Latest commit: 1b10cb1

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

Copy link
Contributor Author

@thomaswhyyou thomaswhyyou force-pushed the thomas-kno-11142-sdk-guide-toolbar-v2-poc-5 branch from 968d4b2 to ac879d5 Compare February 2, 2026 20:10
@thomaswhyyou thomaswhyyou force-pushed the thomas-kno-11142-sdk-guide-toolbar-v2-poc-4 branch from 9c6bd46 to 34821df Compare February 2, 2026 20:10
@thomaswhyyou thomaswhyyou changed the base branch from thomas-kno-11142-sdk-guide-toolbar-v2-poc-4 to graphite-base/845 February 2, 2026 20:47
@thomaswhyyou thomaswhyyou changed the title split out toolbar into v1 and v2 chore: split toolbar into v1 and v2 Feb 2, 2026
@thomaswhyyou thomaswhyyou force-pushed the thomas-kno-11142-sdk-guide-toolbar-v2-poc-5 branch from ac879d5 to 84f9e9e Compare February 2, 2026 21:34
@thomaswhyyou thomaswhyyou force-pushed the thomas-kno-11142-sdk-guide-toolbar-v2-poc-5 branch from 84f9e9e to 0ebc110 Compare February 3, 2026 19:09
return;
}

// TODO: Transform the raw client state into more useful data for debugging.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be continued in downstream PRs.

>
<Box style={{ width: "220px" }}>
<Text as="div" size="1" weight="medium" w="full" maxWidth="40">
Toolbar v2 placeholder
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only placeholder in this PR, to keep each PR size manageable.

@thomaswhyyou
Copy link
Contributor Author

@cursor review


// TODO: Transform the raw client state into more useful data for debugging.
return {};
};
Copy link

Choose a reason for hiding this comment

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

Useless hook returns empty object placeholder

Medium Severity

useInspectGuideClientStore always returns an empty object {} when debugging is enabled, providing no actual data. This hook is currently dead code that serves no purpose beyond checking if debugging is enabled.

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 fine in this PR, will be followed up in downstream PRs.

@thomaswhyyou
Copy link
Contributor Author

@cursor review

@thomaswhyyou thomaswhyyou changed the title chore: split toolbar into v1 and v2 chore: split toolbar into v1 and v2 placeholder Feb 4, 2026
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 36.36364% with 126 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.92%. Comparing base (2c0551f) to head (1b10cb1).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...act/src/modules/guide/components/Toolbar/V2/V2.tsx 14.28% 72 Missing ⚠️
...c/modules/guide/components/Toolbar/KnockButton.tsx 10.00% 36 Missing ⚠️
...src/modules/guide/components/Toolbar/V2/helpers.ts 27.27% 8 Missing ⚠️
...src/modules/guide/providers/KnockGuideProvider.tsx 20.00% 8 Missing ⚠️
packages/client/src/clients/guide/client.ts 97.43% 1 Missing ⚠️
...act/src/modules/guide/components/Toolbar/V1/V1.tsx 80.00% 1 Missing ⚠️
Additional details and impacted files
@@                               Coverage Diff                               @@
##           thomas-kno-11142-sdk-guide-toolbar-v2-poc-4     #845      +/-   ##
===============================================================================
- Coverage                                        68.45%   67.92%   -0.54%     
===============================================================================
  Files                                              193      199       +6     
  Lines                                             8052     8199     +147     
  Branches                                          1066     1075       +9     
===============================================================================
+ Hits                                              5512     5569      +57     
- Misses                                            2515     2605      +90     
  Partials                                            25       25              
Files with missing lines Coverage Δ
packages/client/src/clients/guide/types.ts 100.00% <ø> (ø)
...e/src/modules/guide/context/KnockGuideProvider.tsx 96.49% <100.00%> (+0.19%) ⬆️
packages/react/src/index.ts 100.00% <ø> (ø)
...t/src/modules/guide/components/Toolbar/V1/index.ts 100.00% <100.00%> (ø)
...t/src/modules/guide/components/Toolbar/V2/index.ts 100.00% <100.00%> (ø)
...eact/src/modules/guide/components/Toolbar/index.ts 100.00% <100.00%> (ø)
...act/src/modules/guide/components/Toolbar/shared.ts 100.00% <100.00%> (ø)
...ckages/react/src/modules/guide/components/index.ts 100.00% <100.00%> (ø)
packages/react/src/modules/guide/index.ts 100.00% <ø> (ø)
packages/client/src/clients/guide/client.ts 88.85% <97.43%> (+0.20%) ⬆️
... and 5 more

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

@thomaswhyyou thomaswhyyou marked this pull request as ready for review February 4, 2026 22:09
@thomaswhyyou thomaswhyyou requested review from a team, MikeCarbone, connorlindsey and kylemcd and removed request for a team February 4, 2026 22:09
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.

2 participants