Repository navigation
feat(web): Settings page "Fork" with the fork's agent and review settings, and usage pacing rows - #543
Conversation
Review (independent, Opus)Covers #543 (head 460e13c) and #544 (head 51dd533). Read-only: code read against BLOCKING
SHOULD-FIX
NIT
|
321cc16 to
531a93a
Compare
|
Fix round for the review above. #543 is now
Checks run locally: |
Re-check (round 2)Covers #543 at Round-1 findings
BlockingA. Test Web 2 is red on both heads, and the cause is this PR's own new test.
Should-fixB. Model policy: the "Edit allowed models" dialog throws away the unreadable text without saying so.
Nits
New code checked and fine
CI
Blocking findings: 1 (A). |
…k report, and a model policy row Fix round for the review of #543: - A managed-policy lock or a missing write permission now makes every control of a Fork row inert (the switches and lists below the title too), through a fork row wrapper; upstream's row only greys its main control. - The Overview reads where each feature is on with the fork report's own rules, now shared from the contracts (forkFeatures.ts): a project's override or one thread's handoff entry counts on a server screen, a project screen reads its effective value, and selected servers that differ show "Mixed". The fork report uses the same function, and the Overview's labels are typed by every feature, so the two cannot drift. - A reserve typed above 100 is saved as 100 and the field shows 100 again (the field restarts when the bound changes the number). - The lower-effort map refuses a level no model on the server offers (a typo such as hgih=medium). - Model policy (#268): a section in the Agents group after Usage pacing, server only: the mode, the allowed rows edited as JSON and checked as the server's save checks them, a warning with the kept text when the stored value cannot be read, an Overview line and search items. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
531a93a to
0bf753b
Compare
Fix round 2Both PRs are rebased onto #542's
The state question:
Format, lint, typecheck, contracts tests and web unit tests (5718) all pass locally. The seam check against #542 passes for both heads. Browser tests could not run on this PC, and CI is running now. |
73796c2 to
c50b20a
Compare
0bf753b to
b184d4f
Compare
…ings, and usage pacing rows Every fork setting gets one Settings page, Fork (/settings/fork), next to Threads in the Agents nav group. Its top lists each fork feature as on or off (the fork report's rules). Group Agents holds Waits, Wait checks and Agent slots, moved here from Settings > Threads (the Threads page is upstream's again), and the new Usage pacing section; group Reviews holds Review rules. A project screen shows only what a project may override (wait checks, review rules). Usage pacing had no screen: the gate (off, advise, enforce), the lower-effort map as pairs like high=medium, and one row per provider account by its display name with its reserve percent and its spend-first and no-limits switches. An entry for an account that is gone is listed with Remove; a stored entry has a reset. Every row is in the settings search. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k report, and a model policy row Fix round for the review of #543: - A managed-policy lock or a missing write permission now makes every control of a Fork row inert (the switches and lists below the title too), through a fork row wrapper; upstream's row only greys its main control. - The Overview reads where each feature is on with the fork report's own rules, now shared from the contracts (forkFeatures.ts): a project's override or one thread's handoff entry counts on a server screen, a project screen reads its effective value, and selected servers that differ show "Mixed". The fork report uses the same function, and the Overview's labels are typed by every feature, so the two cannot drift. - A reserve typed above 100 is saved as 100 and the field shows 100 again (the field restarts when the bound changes the number). - The lower-effort map refuses a level no model on the server offers (a typo such as hgih=medium). - Model policy (#268): a section in the Agents group after Usage pacing, server only: the mode, the allowed rows edited as JSON and checked as the server's save checks them, a warning with the kept text when the stored value cannot be read, an Overview line and search items. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ks for the mode; flag unknown drivers - The unreadable-value test used exact text matches; use toMatchTextContent, as vitest 5's toHaveTextContent(string) is exact. - "Edit allowed models" on an unreadable stored value repeats the warning with the kept text, starts from the value's own rows, and saves only after the person picks the mode (the file's own mode is marked), so a save no longer turns the mode into the fail-closed Enforce. - The row warning names the mode select and reset as replacing the value too. - A policy row whose driver no provider on the selected environments has is flagged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nknown-driver flag Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b184d4f to
6b5148d
Compare
|
Rebased onto main after #542 merged (dropped #542's own commits; #544 rebased on top, its base unchanged). Conflicts and how they were resolved:
Local checks on both branches: typecheck, lint, |
Stacked on #542 (the seam gate). Merge #542 first. Until then this PR's "Fork lines in upstream files" check is red: CI judges it by main's seam list, which does not yet announce these lines.
Problem
Fork settings were spread across Settings > Threads (Waits, Wait checks, Agent slots, Review rules), and usage pacing had no screen at all. Changing usage pacing meant editing
settings.jsonby hand. The owner's rule is that every fork setting can be changed in the Settings UI, and all of them live on one page.Fix
A new Settings page, Fork (
/settings/fork). It has one nav entry in the Agents group, right after Scheduled tasks, with a fork icon. It is routed like Threads: its own route file and one panel component.apps/server/src/golive/forkReport.ts) on the selected scope's settings. A hand-edited value the server reads as off shows Off.SettingsPanels.tsx, which is now line for line upstream's, and its "pending" entry is dropped.high=medium(comma or newline separated). Text it cannot read gets an inline error and is never saved; empty clears the map.A project screen shows only what a project may override: Wait checks and Review rules, each with its existing project-override control. Usage pacing, waits and slots are server-wide and hidden there. With no server connected, the page says so instead of showing empty sections.
Search. Every row on the page is in the settings search:
Search items for the moved rows now point at
/settings/fork.Docs.
docs/fork/README.mdnow names Settings → Fork for every row that moved or is new.FORK_CHANGES.md's settings-page line covers the page.Upstream fit
Upstream files changed, all through the seam lines #542 announces:
settingsSearch.ts: 6 lines. TheSettingsPathmember, label, nav entry, search scope, the changed import, and the reworded spread comment.SettingsSidebarNav.tsx: 2 lines (icon import and icon entry).routeTree.gen.ts: generated by TanStack's own generator. fork seams: judge the route tree as generated output; announce the Fork settings page lines #542's proof test checks it.SettingsPanels.tsx: 4 fork lines removed, so it is upstream's again.Everything else is in fork files:
components/settings/fork/,forkSettingsSearchItems.ts, and the route file_chat.settings.fork.tsx. Upstream's Threads page loses no upstream rows. Labels are English only, as the fork's other panels (upstream's translation catalogs hold no fork keys).General vs project
waitFor,agentSlots,usagePacing,usagePacingGate,usagePacingLowerEffortwaitChecksreviewRulesScreenshot
The browser tests could not run on the machine that wrote this PR: the headless Chromium is missing system libraries there and no root is available. CI runs them. What the page shows:
0 %number field, its summary ("No reserve" / "20% kept free, spent first" / "No usage limits") and two small switches beneath.Tests
fork/forkStatus.logic.test.ts:fork/usagePacingSettings.logic.test.ts:fork/UsagePacingSettings.browser.test.tsx(CI only, see Screenshot). Settings are decoded from a settings file as the server loads it, and each test checks the exact patch:vp run check:changed: format, lint, knip and typecheck pass. All unit tests pass (52). The only failure is the browser launch on this machine.--from-upstream) with this branch's list. Against main's list it fails, as expected until fork seams: judge the route tree as generated output; announce the Fork settings page lines #542 merges.State question
mergeEntriespatch for that account only, so saving twice gives the same file, and two people editing different accounts keep both.onFailed).🤖 Generated with Claude Code