Skip to content

fix(plans): plan list ramp label ignores percent/interval and disagrees with Edit #1185

Closed

Description

@cristim

Summary

The plans list and plan details label a stored ramp from its type alone, which can disagree with Edit (#1183) and with the real interval.

Evidence (origin/main with #1183)

formatBackendRampSchedule (frontend/src/plans.ts:1061-1069) keys only on type:

  • A stored weekly 20%/7d plan shows "Weekly 20%" in the list, while Edit opens it as Custom 20% / 7 days.
  • A stored weekly 25%/14d plan shows "Weekly 25%" in the list, which hides the 14-day interval, while Edit opens it as Custom 25% / 14 days.

Related cosmetic gap: generatePlanName (plans.ts:1882) uses Math.ceil for "(N steps)", while the backend and the preview floor. A 30% plan gets a name saying "(4 steps)" for a 3-step schedule.

Proposed fix

Derive the list label from the same preset-equality rule Edit uses: a preset name only when type, percent and interval match, otherwise "Custom N% every D days". Use the same step count as the backend in generatePlanName. Add jest cases for weekly 20%/7d, weekly 25%/14d and a 30% custom plan name.

Found by review of #1183.

Activity

  1. IAmJSD commented on Oct 24, 2026

    @IAmJSD
    Collaborator

    Claiming: working on this

  2. self-assigned this
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions