Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

feat(init): measure interactive prompt wait time - #1257

Merged
betegon merged 1 commit into
mainfrom
feat/init-prompt-wait-telemetry
Jul 16, 2026
Merged

betegon merged 1 commit into
mainfrom
feat/init-prompt-wait-telemetry

Conversation

@betegon

@betegon betegon commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Separates human think-time from actual sentry init execution time. Every real Ink prompt now emits a ui.prompt child span, while automatic --yes and non-interactive paths remain uninstrumented.

The root transaction also gets an accumulated wizard.user_wait_ms measurement, so active wizard time can be calculated as total duration minus user wait. Workflow prompts include the active step ID (for example select-features); welcome, git, and preflight prompts are marked as preflight.

Feature selection now records wizard.features.offered before the prompt and wizard.features.selected after the response. This preserves the offered set even when the user cancels at the feature prompt or the workflow fails later.

Test plan

  • pnpm exec tsc --noEmit
  • pnpm exec biome check src/lib/telemetry.ts src/lib/init/interactive.ts src/lib/init/ui/ink-ui.ts test/lib/telemetry.test.ts test/lib/init/interactive.test.ts test/lib/init/ui/ink-ui-telemetry.test.ts
  • pnpm vitest run test/lib/init
  • pnpm vitest run test/lib/telemetry.test.ts

@betegon
betegon marked this pull request as ready for review July 16, 2026 08:27
@github-actions

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-16 09:56 UTC

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit eb105b5. Configure here.

Comment thread src/lib/init/ui/ink-ui.ts Resolved
@github-actions

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ Patch coverage is 85.00%. Project has 5571 uncovered lines.
❌ Project coverage is 81.27%. Comparing base (base) to head (head).

Files with missing lines (2)
File Patch % Lines
src/lib/init/ui/ink-ui.ts 70.00% ⚠️ 6 Missing and 1 partials
src/lib/telemetry.ts 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    81.77%    81.27%     -0.5%
==========================================
  Files          424       425        +1
  Lines        29453     29742      +289
  Branches     19190     19317      +127
==========================================
+ Hits         24082     24171       +89
- Misses        5371      5571      +200
- Partials      2000      2012       +12

Generated by Codecov Action

@betegon
betegon force-pushed the feat/init-prompt-wait-telemetry branch 3 times, most recently from 062d9e1 to 6ad246f Compare July 16, 2026 09:27
@betegon
betegon force-pushed the feat/init-prompt-wait-telemetry branch from 6ad246f to 60cc143 Compare July 16, 2026 09:39
@betegon
betegon merged commit df6803b into main Jul 16, 2026
32 checks passed
@betegon
betegon deleted the feat/init-prompt-wait-telemetry branch July 16, 2026 09:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant