Skip to content

fix(plans): empty-step run-now follow-ups: drop the internal issue reference from the 409, make the disabled reason reachable #1708

Closed

Description

@cristim

Follow-up to #1695 / #1706, from review notes on #1706.

1. User-facing 409 text names an internal issue

When run-now is refused for a plan step with no recommendations, the API answers 409 with purchase.ErrPlanStepNoRecommendations text (internal/purchase/execution.go:29). That text ends with "(platform#631: plan steps cannot yet carry recommendations)". The retry refusal for the same case (internal/api/handler_purchases.go, retryPurchase) carries the same suffix. User-facing errors shouldn't reference internal issue numbers.

Expected: user-facing text such as "This plan step has no recommendations attached, so there is nothing to run." Keep any issue reference in logs or code comments only.

2. The disabled Run now button's reason may not be reachable

#1706 renders Run now disabled for an empty step, and puts the reason in title and aria-label. A disabled <button> isn't keyboard-focusable, and some browsers don't show title tooltips on disabled controls. So sighted keyboard users, and some pointer users, may never see why the button is disabled.

Expected: check it in Chrome, Firefox and Safari. If the reason isn't reachable, use aria-disabled="true" (focusable, with the click handled as a no-op), or show the reason as visible text in the row, for example next to "No recommendations attached".

3. Revisit when #631 lands

Once plan steps carry recommendations (#631), empty steps should become rare. Re-check whether the empty-step guards in runPlannedPurchase and retryPurchase, and the disabled-button state, are still needed, and keep their wording aligned.

Related

Activity

  1. cristim commented on Nov 4, 2026

    @cristim
    MemberAuthor

    Note for item 3 (from CodeRabbit on #1706): once #631 lets plan steps carry recommendations, the Plans page's planned-purchases list should refresh when the view regains focus (or after the scheduler attaches recommendations), so a newly runnable step's Run now button and "No recommendations attached" badge update without a manual reload. Keep the disabled state for empty steps; don't enable the button to re-check on click.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions