Skip to content

[Refactor]: Extract decay JSON parsing to remove “ignore/keep default” comments #29

@AashishH15

Description

@AashishH15

Problem

UI decay parsing swallows parse failures with “ignore/keep default” comments, and logic is duplicated.

Evidence

  • DecayDashboard swallows parse failures with // ignore at DecayDashboard.tsx (line 18). NodeEditor has the same pattern with // keep default at NodeEditor.tsx (line 300).

Scope & constraints

No response

Proposed approach

Create shared helpers:

  • parseDecayStateOrDefault, getDecayRate, getDecayScore, setDecayRate

Acceptance criteria

  • No duplicated JSON parsing across components.
  • Failure behavior consistent and explicit.

Test plan

  • UI smoke test for dashboard/editor decay controls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorImprove internal structure without changing behavior

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions