Skip to content

PR time decay subline shows "1.0 days" instead of "{t} day(s) since merge" #1238

@galuis116

Description

@galuis116

Description

For a merged pull request, buildDecaySubline (used in PRTimeDecayChart) returns how many days have passed since merge. The string was built as ${projection.daysSinceMerge.toFixed(1)} days since merge, which reads incorrectly at 1.0 (e.g. “1.0 days since merge”). It should use {t} day(s) since merge (e.g. 1.0 day(s) since merge, 2.0 day(s) since merge).

Steps to Reproduce

  1. Open /miners/pr?repo=...&number=... for a PR that is merged and still inside the decay lookback window.
  2. Find the Time Decay card and read the subline under the “Time Decay” title (not the chart axis).
  3. When daysSinceMerge is 1 (shown as 1.0 via toFixed(1)), read the noun after the number.

Expected Behavior

  • Subline uses {t} day(s) since merge (e.g. 1.0 day(s) since merge, 2.0 day(s) since merge).

Actual Behavior

  • buildDecaySubline always appended “days since merge” (e.g. “1.0 days since merge”).

Environment

  • Browser: any.
  • OS: any.
  • URL: /miners/pr?repo=...&number=... (merged PR).

Additional Context

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions