Skip to content

feat: add skipEngagementTracking debug setting to guide toolbar#877

Merged
thomaswhyyou merged 7 commits intomainfrom
thomas-kno-11771-toolbar-setting-to-ignore-throttling-while-debugging-default
Feb 27, 2026
Merged

feat: add skipEngagementTracking debug setting to guide toolbar#877
thomaswhyyou merged 7 commits intomainfrom
thomas-kno-11771-toolbar-setting-to-ignore-throttling-while-debugging-default

Conversation

@thomaswhyyou
Copy link
Contributor

@thomaswhyyou thomaswhyyou commented Feb 25, 2026

Description

Adds an skipEngagementTracking debug setting to the guide client and in the toolbar.

By default it's turned ON when opening the toolbar and going into debug mode. When turned on, we limit engagement updates to the client side store state only, without hitting the API. This is so you can interact/dismiss and walk through guides without having to reset each guide's status to go back.

Linear: https://linear.app/knock/issue/KNO-11772/toolbar-setting-to-intercept-engagement-actions-while-previewing

Screenshots or videos

CleanShot 2026-02-25 at 15 16 17@2x

@linear
Copy link

linear bot commented Feb 25, 2026

@changeset-bot
Copy link

changeset-bot bot commented Feb 25, 2026

⚠️ No Changeset found

Latest commit: e118147

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

@vercel
Copy link

vercel bot commented Feb 25, 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 25, 2026 9:03pm
javascript-nextjs-example Ready Ready Preview, Comment Feb 25, 2026 9:03pm
javascript-slack-connect-example Ready Ready Preview, Comment Feb 25, 2026 9:03pm
javascript-slack-kit-example Ready Ready Preview, Comment Feb 25, 2026 9:03pm

Request Review

Copy link
Contributor Author

thomaswhyyou commented Feb 25, 2026


default:
return undefined;
guide: KnockGuide,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Minor refactor to take guide's archived_at timestamp into consideration, along with a "mark_as_archived" marker.

To be clear, the backend should always return a "mark_as_archived" ineligibility marker for any guide that has been marked as archived previously. But now that we provide a toolbar setting to limit engagement actions to the client side only without sending engagement events to the API, we need to look at guides' engagement timestamps in the client state also.

"@popperjs/core": "^2.11.8",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-hover-card": "^1.1.15",
"@telegraph/button": "^0.4.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.

Not a new dep. We already use buttons in the react package, but never explicitly listed it as a dep.

@thomaswhyyou
Copy link
Contributor Author

@cursor review

@thomaswhyyou thomaswhyyou changed the title add support for skipEngagementTracking debug setting to isolate guide engagement in the client side only feat: add skipEngagementTracking debug setting to guide toolbar Feb 25, 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.

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.

case "guide_not_active":
return {
active: {
status: false,
Copy link

Choose a reason for hiding this comment

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

Empty steps guide incorrectly marked archived

Low Severity

Guides with zero steps are incorrectly marked as archived because [].every(...) returns true in JavaScript (vacuous truth). The intent is to mark a guide archived when all steps have archived_at; a guide with no steps has nothing to archive and should not be considered archived.

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, guides should always have one step at the moment.

Copy link
Contributor

@andy-knock andy-knock left a comment

Choose a reason for hiding this comment

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

lgtm

@thomaswhyyou thomaswhyyou merged commit 84357ad into main Feb 27, 2026
10 of 12 checks passed
@thomaswhyyou thomaswhyyou deleted the thomas-kno-11771-toolbar-setting-to-ignore-throttling-while-debugging-default branch February 27, 2026 18:15
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 63.04348% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.19%. Comparing base (785251a) to head (e118147).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...uide/components/Toolbar/V2/GuideContextDetails.tsx 10.52% 34 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #877      +/-   ##
==========================================
- Coverage   67.34%   67.19%   -0.15%     
==========================================
  Files         205      205              
  Lines        8855     8917      +62     
  Branches     1183     1191       +8     
==========================================
+ Hits         5963     5992      +29     
- Misses       2868     2901      +33     
  Partials       24       24              
Files with missing lines Coverage Δ
packages/client/src/clients/guide/client.ts 89.85% <100.00%> (+0.27%) ⬆️
packages/client/src/clients/guide/types.ts 100.00% <ø> (ø)
...omponents/Toolbar/V2/useInspectGuideClientStore.ts 100.00% <100.00%> (ø)
...uide/components/Toolbar/V2/GuideContextDetails.tsx 7.89% <10.52%> (+0.20%) ⬆️

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