Repository navigation
Description
On a sprint that has not completed anything, the Cycle time and Lead time cards both say "Nothing completed yet" and stop. On a sprint that has completed something, they show a histogram with no explanation of what is being measured, from when to when.
Neither state tells a reader what these numbers mean, and both of them are terms that different teams define differently.
What the code actually measures
cycleFlowMetrics in packages/core/src/analytics/burndown.ts is the source of truth, and the UI should say out loud what it does:
- Which timestamps each metric runs between. The issue table has
created_at,started_at,state_entered_at,completed_atandcanceled_at, so there are several plausible definitions and only one implemented. - Whether cancelled issues are counted.
- Whether issues that moved into the sprint late are counted from when they were created or from when they entered the sprint.
Read the function, then write down what it does. If what it does is not what most teams would expect, say so on this thread rather than quietly changing it, because somebody is already reading these numbers.
What to build
A better empty state. "Nothing completed yet" is accurate and useless. Replace it with something that says what would fill it and when: which sprint it is looking at, that cycle time is measured over issues completed inside the sprint window, and that the card fills in once one is done. If the sprint has not started, say that instead.
A definition on the card. A short line under the title, or a hover, that states the measurement in one sentence. "Time from first moving into a started state to completion, for the 12 issues completed in this sprint." The count matters as much as the distribution, because a median over three issues is not a median.
Show the sample size and the spread. distributionOf in packages/core/src/analytics/math.ts already computes percentiles. Surface p50 and p90 as numbers next to the histogram rather than leaving the reader to estimate them off the bars. percentile is already there and already tested.
Document it. Add the definitions to docs/concepts.md, which is where Orbit explains what it calls things. Right now cycle time and lead time appear in the product and nowhere in the documentation.
Files
apps/web/src/features/analytics/cycle-panel.tsxpackages/core/src/analytics/burndown.tspackages/core/src/analytics/math.tsapps/web/src/features/charts/histogram.tsxdocs/concepts.md
Good first issue
The empty state and the definition line are small, self contained and need no database work. The percentile surfacing is slightly more involved. Any of the three is a complete contribution on its own.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
Activity
imshashank commentedon Aug 15, 2026
Most of this landed in #309. One piece is left, so re-scoping rather than closing.
Done. The sprint lens (
apps/web/src/features/analytics/sprint-lens.tsx) now shows, for both metrics:data.formulas.leadTimeanddata.formulas.cycleTime. These come fromformulas()inpackages/core/src/analytics/sprints.tsand state the measurement outright. Lead time is "current issue-row creation to durable completion for issues whose creation row remains available", cycle time is "current mutable startedAt column to completion".leadTimeCoverageandcycleTimeCoverage, which answers the question this issue raised about whether the numbers can be trusted for a given sprint. Completed sprints are labelledreconstructed-current-columnrather than presented as frozen, which is a more honest answer than the issue asked for.countis on each distribution, so the empty case is distinguishable from a real one and a median over three issues is visible as such.So the product no longer leaves a reader guessing what is being measured, and
cycle-panel.tsx, the file this issue named, is no longer rendered at all.Left to do, and the whole remaining scope of this issue. Cycle time and lead time still appear in the product and nowhere in the documentation.
docs/concepts.mdhas no mention of either. That was the fourth item here and it is now the only one outstanding.The definitions no longer have to be derived by reading
burndown.ts, which is what made this a harder task when it was filed. They can be lifted fromformulas()and rewritten in plain language, along with the coverage values and what they mean. That is a genuinely small, self-contained documentation change and it is still a good first issue.be-student commentedon Sep 6, 2026
I would like to take the remaining documentation scope described in the latest maintainer comment. I will document the current lead-time and cycle-time boundaries from the analytics formulas, including coverage and completed-sprint limitations, without changing the calculations.