Skip to content

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

Draft
miguel-heygen wants to merge 1 commit into
mainfrom
fix/feedback-no-fake-zero-duration
Draft

fix(cli): omit render duration when feedback command has none#1797
miguel-heygen wants to merge 1 commit into
mainfrom
fix/feedback-no-fake-zero-duration

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Problem

The standalone hyperframes feedback command always passed renderDurationMs: 0 to the feedback analytics event. The command runs separately from render, so it has no access to the prior render's elapsed time. Because the auto-prompt path returns early for agent and non-interactive runtimes, the standalone command is the one used in practice, so nearly every feedback event recorded a render duration of exactly 0. A hardcoded 0 is misleading: it reads as a real measurement when the value is simply unknown. Absent data is more honest than a fake zero.

Fix

Make renderDurationMs optional on trackRenderFeedback and only include the render_duration_ms field in the event when a real value is supplied. The standalone command no longer passes a duration, so the field is omitted; the auto-prompt path still forwards the real elapsed time after a render.

Tests

Added unit coverage in events.test.ts:

  • standalone feedback (no duration) emits no render_duration_ms property
  • a supplied duration is still included

bunx vitest run for the telemetry suite is green; oxfmt + oxlint clean; pre-commit fallow/typecheck/commitlint gates passed.

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.
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.

1 participant