fix(cli): omit render duration when feedback command has none (#1797)

The standalone `feedback` command runs separately from `render`, so it
has no access to the prior render's elapsed time, yet it always passed
renderDurationMs: 0 to the feedback analytics event. Since that path is
the one used in practice (the auto-prompt returns early for agent and
non-interactive runtimes), nearly every feedback event recorded a render
duration of exactly 0, which is misleading rather than absent.

Make renderDurationMs optional and only include render_duration_ms in the
event when a real value is supplied. The standalone command no longer
passes a duration; the auto-prompt path still forwards the real elapsed
time.
This commit is contained in:
Miguel Ángel
2026-06-30 10:43:34 -07:00
committed by GitHub
parent e7939ccd53
commit db61509ddc
3 changed files with 28 additions and 3 deletions
+2 -1
View File
@@ -42,9 +42,10 @@ export default defineCommand({
const doctorSummary = await getDoctorSummary();
// The standalone command runs separately from `render`, so it has no real
// elapsed time to report. Omit it rather than recording a fake duration.
trackRenderFeedback({
rating,
renderDurationMs: 0,
comment: args.comment || undefined,
doctorSummary,
});