-
Notifications
You must be signed in to change notification settings - Fork 464
feat: add context-aware getting-started onboarding checklist #3084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
brandon-pereira
wants to merge
1
commit into
main
Choose a base branch
from
brandon/brandon-onboarding-steps
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| '@hyperdx/common-utils': minor | ||
| '@hyperdx/api': minor | ||
| '@hyperdx/app': minor | ||
| --- | ||
|
|
||
| Add a context-aware getting-started checklist to the sidebar. After the existing setup steps (connect ClickHouse, add data) complete, a second phase tracks product-usage milestones persisted per user on `user.onboardingData`: exploring data (running a non-trivial search), creating a dashboard, setting up an alert, and using the MCP server. Each task links to where to do it, the card can be dismissed, and the task registry is a single source of truth in `common-utils` (`ONBOARDING_TASK_IDS`) so adding a new task is a compile error until both the API validation enum and the frontend UI are updated. | ||
|
|
||
| Completion is recorded server-side so it is surface-agnostic: the `alert` and `dashboard` tasks complete whether the action came from the UI, the external REST API v2, or an MCP tool (all authenticate with the user's personal access key, so the action is attributable to that user). The `dashboard` task specifically means "built a chart" — it completes only once a dashboard has at least one tile, not for an empty dashboard shell. This includes adding a tile to a temporary (unsaved, URL-state) dashboard, which never touches the backend: the app records that case directly against `POST /me/onboarding/task`. Alert recording covers the standalone `/alerts` create path and dashboard-tile alerts. MCP usage is recorded in the tool-tracing chokepoint. Exploring data is recorded from the search page on any non-trivial search (a non-empty where clause in either Lucene or SQL, or an applied filter). All recording is fire-and-forget and never blocks the triggering operation. After a UI action the frontend patches only `onboardingData` in the cached `me` object (no `me` refetch, so the many `useMe` consumers — metadata, ClickHouse settings, nav — are untouched). | ||
|
|
||
| The checklist's "done" state is DERIVED from whether every current task is complete rather than a persisted flag, so adding or changing a task in `ONBOARDING_TASK_IDS` later automatically reopens the checklist for users who had finished the old set. Completing the final task in-session shows a brief celebration before the card hides; a user who was already finished on load sees nothing. The persisted `isDismissed` (`PATCH /me/onboarding/dismiss`) is only for the manual dismiss (X) when a user opts out early. The `me` response includes `onboardingData`, defaulted for users created before the field existed. |
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 minor — 'Build a dashboard' / 'Set up an alert' complete on edits where the user built nothing
updateDashboardrecordsdashboardon any successful update of a dashboard that already has tiles — renaming it, changing tags, or dragging a tile all tick the box. LikewisecreateOrUpdateDashboardAlerts(packages/api/src/controllers/alerts.ts:411) recordsalertwhenever the saved dashboard carries any tile alert, so a user who opens a teammate's dashboard and moves one tile gets both milestones without creating either.updateDashboardalready loadsoldDashboard, so record only when the tile count went from 0 to >0; for alerts, record only for the tiles whose alert was actually inserted (the upsert result exposes this).