Skip to content

feat: add exponential backoff cooldown controls to Settings page#349

Merged
mcowger merged 1 commit into
mainfrom
pi/issue-345-1778041323634
May 6, 2026
Merged

feat: add exponential backoff cooldown controls to Settings page#349
mcowger merged 1 commit into
mainfrom
pi/issue-345-1778041323634

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 6, 2026

Summary

Fixes #345

Adds UI controls for the existing initialMinutes and maxMinutes exponential backoff settings in the Cooldown Manager, exposing them on the Configuration page.

The new "Cooldown Settings" card follows the same pattern as the existing "Failover Settings" Disclosure card.

Changes

Backend (packages/backend/src/routes/management/config.ts):

  • Added GET /v0/management/config/cooldown — returns current cooldown policy (initialMinutes, maxMinutes)
  • Added PATCH /v0/management/config/cooldown — merges updates and persists via ConfigService.setSetting

Frontend API (packages/frontend/src/lib/api.ts):

  • Added getCooldownPolicy() — fetches cooldown policy from backend
  • Added patchCooldownPolicy() — patches cooldown policy fields

Frontend UI (packages/frontend/src/pages/Config.tsx):

  • Added "Cooldown Settings" Disclosure card with:
    • Description of the exponential backoff formula: C(n) = min(C_max, C₀ × 2ⁿ)
    • Numeric input for Initial Cooldown (initialMinutes, default 2)
    • Numeric input for Maximum Cooldown (maxMinutes, default 300)
    • Save button that persists changes via the API

@mcowger mcowger merged commit b184f9f into main May 6, 2026
@mcowger mcowger deleted the pi/issue-345-1778041323634 branch May 6, 2026 04:27
github-actions Bot added a commit that referenced this pull request May 7, 2026
## Summary

Fixes #345

Adds UI controls for the existing `initialMinutes` and `maxMinutes`
exponential backoff settings in the Cooldown Manager, exposing them on
the Configuration page.

The new "Cooldown Settings" card follows the same pattern as the
existing "Failover Settings" Disclosure card.

### Changes

**Backend** (`packages/backend/src/routes/management/config.ts`):
- Added `GET /v0/management/config/cooldown` — returns current cooldown
policy (`initialMinutes`, `maxMinutes`)
- Added `PATCH /v0/management/config/cooldown` — merges updates and
persists via `ConfigService.setSetting`

**Frontend API** (`packages/frontend/src/lib/api.ts`):
- Added `getCooldownPolicy()` — fetches cooldown policy from backend
- Added `patchCooldownPolicy()` — patches cooldown policy fields

**Frontend UI** (`packages/frontend/src/pages/Config.tsx`):
- Added "Cooldown Settings" Disclosure card with:
- Description of the exponential backoff formula: `C(n) = min(C_max, C₀
× 2ⁿ)`
  - Numeric input for **Initial Cooldown** (`initialMinutes`, default 2)
  - Numeric input for **Maximum Cooldown** (`maxMinutes`, default 300)
  - Save button that persists changes via the API

Co-authored-by: Pi Bot <pi-bot@plexus.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exponential Backoff Controls are not exposed

1 participant