feat(FN-1375): add null-as-delete pattern for settings with Reset button
- Send null instead of undefined when clearing token cap to explicitly delete setting - Handle null values as delete operations in updateSettings (for clearing keys) - Add Reset button in Settings modal to clear token cap with one click - Update placeholder and help text for token cap input - Fix TypeScript cast error for config.settings
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
- Browser directory pickers (`webkitdirectory`) cannot provide a server filesystem path; for dashboard import flows, parse selected `AGENTS.md` files client-side and send `{ agents }` payloads instead of trying to submit a directory `source` path.
|
||||
- For conditionally rendered mobile inputs in dashboard components, prefer React `autoFocus` on the input over effect+`setTimeout` focus logic keyed to open-state booleans; mount timing is more reliable and simpler.
|
||||
- Checkout leasing is explicit: use `checkoutTask`/`releaseTask` (or `/api/tasks/:id/checkout` + `/release`) for ownership, treat 409 conflicts as non-retryable contention, and let `HeartbeatMonitor.executeHeartbeat()` only validate `checkedOutBy` (never auto-acquire leases).
|
||||
- The null-as-delete pattern for settings: In `TaskStore.updateSettings()`, `null` values in the settings patch are treated as "delete this key from settings" (since `JSON.stringify` drops `undefined` keys). This allows the frontend to explicitly clear a setting by sending `null`. The key is deleted from both `config.settings` and `projectPatch` before merging, so cleared settings fall back to `DEFAULT_SETTINGS`.
|
||||
|
||||
## Color Theme System
|
||||
|
||||
|
||||
Reference in New Issue
Block a user