pingdotgg / pingdotgg/t3code

[Feature]: Use NumberField for the auto-settle inactivity days input

Open Beginner friendly
#12,418 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted enhancement via-triage
Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I am describing a concrete problem or use case.
Area

apps/web Settings (desktop wraps the same UI)

Problem or use case

Settings has two day-count inputs that look and behave differently:

  1. Storage cleanup (RetentionControl, apps/web/src/components/settings/StorageSettings.tsx) uses the shared NumberField: − / value / inline days / +, size="sm", commits on onValueCommitted.
  2. Auto-settle inactivity (AutoSettleDaysInput, apps/web/src/components/settings/SettingsPanels.tsx) is still a plain <Input type="number">: native browser spinner, no unit label, commits on every keystroke and snaps back on blur.

Same kind of value, two controls. SettingsPanels already uses NumberField for the Git fetch interval, so the older days input is the odd one out.

Proposed solution

Render AutoSettleDaysInput with the same NumberField composition Storage cleanup uses (steppers, inline days, size="sm", commit on onValueCommitted). Keep the 1–90 range (MIN/MAX_SIDEBAR_AUTO_SETTLE_AFTER_DAYS) and leave the enable switch on its current row. Do not fold this into RetentionControl; it owns its own switch, range, and default.

Out of scope: mobile (already has native days fields), port and price inputs, browser toolbar viewport fields. No contract or server change.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with AutoSettleDaysInput in apps/web/src/components/settings/SettingsPanels.tsx, then compare RetentionControl in apps/web/src/components/settings/StorageSettings.tsx and the existing NumberField use for the Git fetch interval. Done means the auto-settle field uses the shared steppers, inline days label, small size, and committed-value behavior while preserving its 1–90 range and current enable-switch row.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.