From 4bbe1e05dd6e53566b35a0b55f1faeb5083c4252 Mon Sep 17 00:00:00 2001 From: Sawyer Cutler Date: Sun, 23 Aug 2026 11:13:23 -0700 Subject: [PATCH] CL-6841: Delete dead AgentSection and CredentialsSection Neither section is registered or called. Connections owns key management; agent prefs have no hub store. Drop the files, exports, orphaned agent* strings (keep timezone copy used by Account), and credentials-only strings. --- packages/settings-ui/README.md | 4 +- packages/settings-ui/src/agent-section.tsx | 161 ------- .../settings-ui/src/credentials-section.tsx | 453 ------------------ packages/settings-ui/src/index.ts | 5 - packages/settings-ui/src/section-registry.tsx | 4 +- packages/settings-ui/src/strings.ts | 54 --- .../test/credentials-section.test.tsx | 113 ----- .../settings-ui/test/grants-section.test.tsx | 2 +- 8 files changed, 5 insertions(+), 791 deletions(-) delete mode 100644 packages/settings-ui/src/agent-section.tsx delete mode 100644 packages/settings-ui/src/credentials-section.tsx delete mode 100644 packages/settings-ui/test/credentials-section.test.tsx diff --git a/packages/settings-ui/README.md b/packages/settings-ui/README.md index 2e06d732e..f61041aa4 100644 --- a/packages/settings-ui/README.md +++ b/packages/settings-ui/README.md @@ -23,8 +23,8 @@ alongside these. - `section-registry.tsx` — the Account/Everyone grouping, ordering, icons, and tenancy gates - `people-section.tsx` / `roles-section.tsx` / `grants-section.tsx` / - `credentials-section.tsx` / `connections-section.tsx` — the Everyone-group - and account-scoped management surfaces, each with its own API module + `connections-section.tsx` — the Everyone-group and account-scoped + management surfaces, each with its own API module - `account-section.tsx` / `notifications-section.tsx` / `audit-section.tsx` — the Account-group surfaces - `access.ts` / `tenancy-api.ts` — tenancy-gate resolution and the diff --git a/packages/settings-ui/src/agent-section.tsx b/packages/settings-ui/src/agent-section.tsx deleted file mode 100644 index d449dfe59..000000000 --- a/packages/settings-ui/src/agent-section.tsx +++ /dev/null @@ -1,161 +0,0 @@ -// Personal "Your agent" settings: autonomy, morning brief, standing -// instructions, pinned skills, and inference dials. No hub preference store -// exists yet for these fields — the form is interactive for layout parity and -// holds draft state only; save is honest about that. -// -// REMOVED FROM THE SETTINGS REGISTRY (see section-registry.tsx): six fields -// that save nothing are fake controls, not a settings section — honest -// absence beats that. Re-add the "agent" section to -// `SETTINGS_SECTION_GROUPS`'s "personal" group only once a hub preference -// store exists for these fields and `handleSave` actually persists them, -// not before. - -import { Button, Input, SettingsPanel } from "@corbits/react-ui"; -import { useState } from "react"; - -import { SETTINGS_STRINGS } from "./strings"; - -const AUTONOMY_OPTIONS = [ - { value: "prepare", label: SETTINGS_STRINGS.agentAutonomyPrepare }, - { value: "gated", label: SETTINGS_STRINGS.agentAutonomyGated }, - { value: "autonomous", label: SETTINGS_STRINGS.agentAutonomyAutonomous }, -] as const; - -const BRIEF_OPTIONS = [ - { value: "off", label: SETTINGS_STRINGS.agentBriefOff }, - { value: "07:30", label: SETTINGS_STRINGS.agentBrief0730 }, - { value: "09:00", label: SETTINGS_STRINGS.agentBrief0900 }, -] as const; - -const DEFAULT_PINNED = ["Web research", "Long-form write", "Spreadsheet ops"]; - -export function AgentSection() { - const [autonomy, setAutonomy] = useState("gated"); - const [brief, setBrief] = useState("07:30"); - const [instructions, setInstructions] = useState( - SETTINGS_STRINGS.agentInstructionsDefault, - ); - const [pinned, setPinned] = useState(DEFAULT_PINNED); - const [creativity, setCreativity] = useState(35); - const [thinking, setThinking] = useState(60); - const [note, setNote] = useState(null); - - function handleSave() { - setNote(SETTINGS_STRINGS.agentSaveHonesty); - } - - function removePin(skill: string) { - setPinned((prev) => prev.filter((s) => s !== skill)); - } - - return ( - -

- {SETTINGS_STRINGS.agentAutonomyHeading} -

- - - -

- {SETTINGS_STRINGS.agentInstructionsHeading} -

-