From 33b1810e97bcd63c95245a1740d60cc52d7b289f Mon Sep 17 00:00:00 2001 From: scuttletoby <123843277+scuttletoby@users.noreply.github.com> Date: Mon, 23 Nov 2026 14:56:49 +0000 Subject: [PATCH 1/4] Fork settings: group by task, plain help with defaults; fork README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Settings → Fork now groups its sections by what a person wants to do (plan usage and machine load, waiting, models and tools, long threads, reviews, assistant, playtesting, updates). Each row says what on and off do and shows its default; rare options fold under Advanced. Stored keys are unchanged; a test loads values an older settings file saved. docs/fork/about.md: what the fork is, how it follows upstream, every shipped feature with where to turn it on, and a Planned list from open issues. The README banner points to it. Co-Authored-By: Claude Opus 5.5 --- FORK_CHANGES.md | 2 +- README.md | 16 +- .../WaitsAndSlotsSettings.browser.test.tsx | 4 +- .../settings/WaitsAndSlotsSettings.tsx | 35 ++- .../settings/fork/AssistantSettings.tsx | 2 +- .../settings/fork/ForkPanels.browser.test.tsx | 2 + .../settings/fork/ForkSettingsPanel.tsx | 87 +++++-- .../settings/fork/HandoffSettings.tsx | 18 +- .../fork/McpProfileSettings.browser.test.tsx | 5 + .../settings/fork/McpProfileSettings.tsx | 229 +++++++++--------- .../settings/fork/ModelPolicySettings.tsx | 6 +- .../settings/fork/PlaytestSettings.tsx | 10 +- .../fork/StopFinishedChildrenSettings.tsx | 79 +++--- .../settings/fork/UpdatesSettings.tsx | 74 +++--- .../fork/UsagePacingSettings.browser.test.tsx | 4 +- .../settings/fork/UsagePacingSettings.tsx | 20 +- .../settings/fork/forkStatus.logic.test.ts | 38 +-- .../settings/fork/forkStatus.logic.ts | 26 +- .../settings/fork/handoffSettings.logic.ts | 11 +- .../fork/modelPolicySettings.logic.ts | 10 +- .../fork/usagePacingSettings.logic.ts | 6 +- .../settings/forkSettingsSearchItems.ts | 46 ++-- .../reviewRulesSettings.logic.test.ts | 2 +- .../settings/reviewRulesSettings.logic.ts | 4 +- .../waitsAndSlotsSettings.logic.test.ts | 4 +- .../settings/waitsAndSlotsSettings.logic.ts | 24 +- docs/fork/README.md | 38 +-- docs/fork/about.md | 214 ++++++++++++++++ docs/fork/assistant.md | 2 +- packages/contracts/src/forkDefaults.test.ts | 77 ++++++ 30 files changed, 743 insertions(+), 352 deletions(-) create mode 100644 docs/fork/about.md diff --git a/FORK_CHANGES.md b/FORK_CHANGES.md index 79ef142ea7bda..c32009d0e1a4b 100644 --- a/FORK_CHANGES.md +++ b/FORK_CHANGES.md @@ -25,7 +25,7 @@ setting is missing here or a setting named here does not exist. | Machine facts: `t3_environment_read` also returns `hostResources` (CPU, cores, memory; the field of upstream PR #34293, closed there unmerged) and `placement` (labels, available and reason, running agents, slots free, memory floor, facts time), for this machine and a linked one. | An agent choosing where to run work can see which machine has room without asking the person. | none | always | [#820](https://github.com/scuttletoby/t3code/pull/820) | | Waits: agents can wait for a pull request, a file, a system unit, a named check command or a free agent slot (`wait_for`, `wait_list`, `wait_cancel`), and are woken when it happens. | An agent no longer polls or sleeps while it waits. | `server.waitFor`, `server.waitChecks`, `projectOverride.waitChecks` | off | [#84](https://github.com/scuttletoby/t3code/pull/84), [#90](https://github.com/scuttletoby/t3code/pull/90), [#91](https://github.com/scuttletoby/t3code/pull/91), [#103](https://github.com/scuttletoby/t3code/pull/103), [#106](https://github.com/scuttletoby/t3code/pull/106), [#109](https://github.com/scuttletoby/t3code/pull/109), [#110](https://github.com/scuttletoby/t3code/pull/110), [#116](https://github.com/scuttletoby/t3code/pull/116), [#119](https://github.com/scuttletoby/t3code/pull/119) | | Delegated results: `task_list` lists a thread's delegated tasks whose result it has not read, and its running children per place from live status; a parent whose finished child's result never arrived gets one reminder. | A finished child's result can no longer sit unseen. | `server.waitFor` (the reminder) | off; `task_list` always (read only) | [#622](https://github.com/scuttletoby/t3code/pull/622), [#641](https://github.com/scuttletoby/t3code/pull/641) | -| The Settings page **Fork** (`/settings/fork`): every fork setting in one place, with one line per feature at the top saying whether it is on: waits, wait checks, agent slots, usage pacing (per account by name), model policy, review rules, automatic updates, handoff, playtest and MCP profiles. | Change every fork setting without editing a file. | `server.waitFor`, `server.waitChecks`, `server.agentSlots`, `server.usagePacing`, `server.usagePacingGate`, `server.usagePacingLowerEffort`, `server.reviewRules`, `server.modelPolicy`, `server.automaticUpdates`, `server.automaticUpdatesQuietCommand`, `server.handoff`, `server.playtest`, `server.mcpProfiles`, `server.mcpProfile`, `server.mcpSubagentProfile`, `server.mcpThreadProfiles` | off | [#104](https://github.com/scuttletoby/t3code/pull/104), [#543](https://github.com/scuttletoby/t3code/pull/543), [#544](https://github.com/scuttletoby/t3code/pull/544) | +| The Settings page **Fork** (`/settings/fork`): every fork setting in one place, grouped by what a person wants to do, each with one line of help saying what on and off do and its default, rare options under Advanced, and one line per feature at the top saying whether it is on: waits, wait checks, agent slots, usage pacing (per account by name), model policy, review rules, automatic updates, handoff, playtest and MCP profiles. | Change every fork setting without editing a file. | `server.waitFor`, `server.waitChecks`, `server.agentSlots`, `server.usagePacing`, `server.usagePacingGate`, `server.usagePacingLowerEffort`, `server.reviewRules`, `server.modelPolicy`, `server.automaticUpdates`, `server.automaticUpdatesQuietCommand`, `server.handoff`, `server.playtest`, `server.mcpProfiles`, `server.mcpProfile`, `server.mcpSubagentProfile`, `server.mcpThreadProfiles` | off | [#104](https://github.com/scuttletoby/t3code/pull/104), [#543](https://github.com/scuttletoby/t3code/pull/543), [#544](https://github.com/scuttletoby/t3code/pull/544) | | The fork's checks on `delegate_task` (pacing, slots) sit behind one fork module. | Fewer fork lines in upstream's code, so syncs conflict less. No change in behaviour. | none | always | [#174](https://github.com/scuttletoby/t3code/pull/174) | | The fork's service layers in the server are wired from one fork file (`apps/server/src/fork/forkLayers.ts`). | Fewer fork lines in upstream's code, so syncs conflict less. No change in behaviour. | none | always | [#384](https://github.com/scuttletoby/t3code/pull/384) | | A pure capacity rule for "dynamic slots" (one budget per machine), with shared test cases. Not wired into anything yet. | A later step replaces fixed agent counts with what the machine can take. | none | not used | [#203](https://github.com/scuttletoby/t3code/pull/203) | diff --git a/README.md b/README.md index 2e7a31efc3f1b..e5a97a7d69fc8 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -> **This is a fork of [T3 Code](https://github.com/pingdotgg/t3code).** It follows upstream's releases daily. With no fork -> settings it behaves like upstream, except that it updates from this fork's releases. What it adds: +> **This is a fork of [T3 Code](https://github.com/pingdotgg/t3code)** for people who run many coding agents on their own +> machines and plans. It rebases onto upstream's newest release daily and ships it as `v.fork.`. With no fork +> settings it behaves like upstream, except that it updates from this fork's releases. Every fork switch is off until you +> turn it on in **Settings → Fork**. Among what it adds: > -> - **Usage pacing and agent slots:** agents keep a reserve of each subscription limit free for you, and a machine never -> runs more agents than it has room for. -> - **Waits:** an agent sleeps until a pull request, file, system unit or check changes, and is woken then, instead of polling. -> - **Self-update:** a server running as a boot service can update itself once no thread is working. -> - **Fleet CI:** one-job runners on your own machines and desktops, each behind walls, a merge queue and shared CI actions. +> - **Plan usage pacing and agent slots:** agents leave you part of each plan, and a machine never runs too many. +> - **Waits** instead of polling, **model policy**, **tool profiles**, **handoff** instead of compaction and **self-update**. > -> Every change, one line each: [FORK_CHANGES.md](FORK_CHANGES.md). Settings and how to install: [docs/fork/README.md](docs/fork/README.md). +> About the fork, every feature with where to turn it on, and what is planned: [docs/fork/about.md](docs/fork/about.md). +> Install and every setting: [docs/fork/README.md](docs/fork/README.md). Every change: [FORK_CHANGES.md](FORK_CHANGES.md).

diff --git a/apps/web/src/components/settings/WaitsAndSlotsSettings.browser.test.tsx b/apps/web/src/components/settings/WaitsAndSlotsSettings.browser.test.tsx index e548c046890a4..79f02b099e262 100644 --- a/apps/web/src/components/settings/WaitsAndSlotsSettings.browser.test.tsx +++ b/apps/web/src/components/settings/WaitsAndSlotsSettings.browser.test.tsx @@ -120,8 +120,8 @@ describe("WaitsAndSlotsSettings (#105)", () => { await expect.element(screen.getByText("Agents on Claude A")).toBeVisible(); // The unit beside a field is separate text, so the field's own name has to say it. const names = [ - "Default time limit in hours", - "Open waits per thread in waits", + "Time limit when the agent sets none in hours", + "Waits open at once per thread in waits", "Agents on Claude A in agents", ]; const unnamed = names.filter( diff --git a/apps/web/src/components/settings/WaitsAndSlotsSettings.tsx b/apps/web/src/components/settings/WaitsAndSlotsSettings.tsx index cc578dc60dd4b..319166ae8d9fe 100644 --- a/apps/web/src/components/settings/WaitsAndSlotsSettings.tsx +++ b/apps/web/src/components/settings/WaitsAndSlotsSettings.tsx @@ -103,7 +103,7 @@ function NumberSettingRow({ serverScoped id={`${settingKey}-${field.key}`} title={field.title} - description={field.description} + description={`${field.description} Default: ${defaultValue} ${field.unit}.`} settingKeys={[settingKey]} mixed={mixed} resetAction={ @@ -153,7 +153,7 @@ function WaitForSection({ updateSettings }: { readonly updateSettings: UpdateSet )); return ( - + + + + {isProjectScope ? null : } + + + ); +} + +/** Agent slots are environment-wide, so a project screen does not show them. */ +export function AgentSlotsSettings() { + const updateSettings = useUpdateScopedSettings(); + return ; +} + /** * Waits and agent slots are environment-wide, so a project screen shows only its wait checks, * which a project may override as a whole map. */ export function WaitsAndSlotsSettings({ isProjectScope }: { readonly isProjectScope: boolean }) { - const updateSettings = useUpdateScopedSettings(); return ( <> - {isProjectScope ? null : } - - {isProjectScope ? null : } + + {isProjectScope ? null : } ); } diff --git a/apps/web/src/components/settings/fork/AssistantSettings.tsx b/apps/web/src/components/settings/fork/AssistantSettings.tsx index be1cd71251524..97966ec66815f 100644 --- a/apps/web/src/components/settings/fork/AssistantSettings.tsx +++ b/apps/web/src/components/settings/fork/AssistantSettings.tsx @@ -144,7 +144,7 @@ export function AssistantSettings() { {...searchableSetting("assistant")} settingKeys={["assistant"]} lockPaths={["assistant"]} - description="One thread you talk to across projects, Claude only. Its profile `assistant` has no shell, files, web or outside servers, but its T3 tools do more than read, start and message threads, and it uses them without asking you: it can also change another thread's model and settings, interrupt threads, stop workflows, link and unlink environments, create projects, clone a repository onto disk, and delete projects (a forced delete also deletes all of that project's threads, archived ones too). Splitting these tools is fork issue #954. Off: Settings offers no Make assistant." + description="On: Settings offers Make assistant, one Claude thread you talk to that works across all your projects. Off: no assistant is offered. Default: off. Know before you turn it on: its profile `assistant` has no shell, files, web or outside servers, but its T3 tools do more than read, start and message threads, and it uses them without asking you: it can also change another thread's model and settings, interrupt threads, stop workflows, link and unlink environments, create projects, clone a repository onto disk, and delete projects (a forced delete also deletes all of that project's threads, archived ones too). Splitting these tools is fork issue #954." control={ { await userEvent.click(toggle); expect(state.update.mock.calls[0]![0]).toEqual({ automaticUpdates: true }); + // The quiet check is a rarely changed option, folded under Advanced. + await userEvent.click(screen.getByRole("button", { name: "Advanced" })); await userEvent.type( screen.getByRole("textbox", { name: "Quiet check before an update" }), " /usr/local/bin/quiet {Enter}", diff --git a/apps/web/src/components/settings/fork/ForkSettingsPanel.tsx b/apps/web/src/components/settings/fork/ForkSettingsPanel.tsx index e50bbda61362f..8819ddee01d10 100644 --- a/apps/web/src/components/settings/fork/ForkSettingsPanel.tsx +++ b/apps/web/src/components/settings/fork/ForkSettingsPanel.tsx @@ -1,16 +1,17 @@ /** - * Fork: the Settings page "Fork" (/settings/fork), every fork setting in one place. Each group - * mounts the fork's own panels; a project screen shows only the settings a project may override. + * Fork: the Settings page "Fork" (/settings/fork), every fork setting in one place, grouped by what a + * person wants to do. Each group mounts the fork's own panels; a project screen shows only the + * settings a project may override, and a group with nothing to show is left out. */ /* oxlint-disable t3code/no-untranslated-copy -- Fork: this page is the fork's own and its text is English only; upstream's translation catalogs hold no fork keys. */ import { DEFAULT_SERVER_SETTINGS } from "@t3tools/contracts"; -import type { ReactNode } from "react"; +import { Children, type ReactNode } from "react"; import { ReviewRulesSettings } from "../ReviewRulesSettings"; import { useSettingsScope } from "../SettingsScopeContext"; import { SettingsPageContainer, SettingsRow, SettingsSection } from "../settingsLayout"; import { useSearchableSetting } from "../settingsSearch"; -import { WaitsAndSlotsSettings } from "../WaitsAndSlotsSettings"; +import { AgentSlotsSettings, WaitsSettings } from "../WaitsAndSlotsSettings"; import { AssistantSettings } from "./AssistantSettings"; import { forkFeatureStatuses } from "./forkStatus.logic"; import { HandoffSettings } from "./HandoffSettings"; @@ -36,23 +37,58 @@ export function ForkSettingsPanel() { ); } + const server = (node: ReactNode) => (isProjectScope ? null : node); return ( - - - {isProjectScope ? null : } - {isProjectScope ? null : } - {isProjectScope ? null : } + + {server()} + {server()} + {server()} + + + + + + {server()} + + + + - + - {isProjectScope ? null : } - - - - {isProjectScope ? null : } + + {server()} + + + + + + {server()} + ); } @@ -67,7 +103,7 @@ function ForkStatusSection() {