Feature Description
CommitPulse allows users to scale tower heights using either a linear scale or a logarithmic log scale (?scale=linear or ?scale=log).
- Linear scaling can cause high-volume days (e.g., 20+ commits) to completely tower over days with 1-2 commits.
- Logarithmic scaling compresses values so much that the visual difference between a 1-commit day and a 10-commit day is barely noticeable.
A Square Root (sqrt) scaling model acts as the perfect middle ground. It visually highlights variances in low-to-medium commits while keeping high-volume commits from dominating the grid.
Proposed Solution
- Update the
scale option validation in lib/validations.ts (streakParamsSchema) to support sqrt as an allowed value.
- Locate the tower height computation logic in the codebase (e.g.,
lib/svg/layout.ts or lib/svg/generator.ts).
- Implement the square root scaling formula:
$$h_{scaled} = h_{max} \times \sqrt{\frac{commits}{maxCommits}}$$
- Update parameter lists and descriptions in docs/customization.md.
Definition of Done (DoD)
- The API accepts
?scale=sqrt without failing back to the default linear scale.
- Tower heights are calculated correctly according to the square root of the contribution counts.
- Visual alignment of the isometric towers remains precise and does not clip or overflow.
- Unit tests are implemented to verify the math is correct for
scale=sqrt.
Feature Description
CommitPulse allows users to scale tower heights using either a
linearscale or a logarithmiclogscale (?scale=linearor?scale=log).A Square Root (
sqrt) scaling model acts as the perfect middle ground. It visually highlights variances in low-to-medium commits while keeping high-volume commits from dominating the grid.Proposed Solution
scaleoption validation inlib/validations.ts(streakParamsSchema) to supportsqrtas an allowed value.lib/svg/layout.tsorlib/svg/generator.ts).Definition of Done (DoD)
?scale=sqrtwithout failing back to the defaultlinearscale.scale=sqrt.