Skip to content

feat(web): Fork settings page rows for automatic updates, handoff and playtest - #544

Merged
scuttletoby merged 4 commits into
mainfrom
fork-settings-page-b
Nov 19, 2026
Merged

scuttletoby merged 4 commits into
mainfrom
fork-settings-page-b

Conversation

@scuttletoby

Copy link
Copy Markdown
Owner

Stacked on #543, which is stacked on #542. Merge in that order. Like #543, this PR's "Fork lines in upstream files" check is red until #542 is on main. This PR adds no upstream line of its own.

Problem

automaticUpdates, automaticUpdatesQuietCommand, handoff and playtest had no screen: changing them meant editing settings.json by hand.

Fix

Three more sections on Settings → Fork (#543), each in a fork file under apps/web/src/components/settings/fork/:

  • Updates (server only, hidden on a project screen):
    • "Update automatically" switch, with a reset.
    • "Quiet check before an update": the program asked before each automatic update. It saves on blur or Enter, has a reset to empty, and a refused save puts the stored value back.
  • Handoff:
    • Mode: a select with Off / Handoff / Compact. Each choice is explained, and Compact is described as the way to keep one project or thread out of a Handoff above it.
    • Mode per thread: each thread's own mode, shown by its title where this client knows the thread. A thread it does not know (a deleted one) shows as "Unknown thread" plus its id. Each can be changed or removed. A new one is added by thread id, refused if blank, a duplicate, or past the 500 cap.
    • Advanced:
      • the size backstop and the idle size (0 = never, otherwise at least 20,000 tokens);
      • who writes the handoff: the old session, or a command entered one argument per line. Choosing "a command" with no command is refused before saving, as the server would;
      • the instructions.
    • modelSelection has no row: a model picker is its own piece of work. Every save keeps the stored value. The docs say so.
  • Playtest:
    • The switch stays disabled until claim, renew, push and release are set, and its description names the missing steps.
    • Edit steps opens a dialog with the four steps as JSON, the same shape as the settings file. Saving checks the text with the server's own strict schema: full program path, unique push names, unknown fields refused, all four steps while on. A refusal keeps the text and says why.
    • Renew, idle and session limits are under Advanced, clamped to their ranges.

The page ends with a marked place for the later MCP profiles section. Every new row has a search item (13 more), so the settings search finds them.

Upstream fit

No upstream file changes. All changes are in fork files: the panels, the logic files and their tests, the fork search items and the fork docs. The seam check against #542's list passes. Labels are English only, as the fork's other panels.

General vs project

Setting Server Project override
automaticUpdates, automaticUpdatesQuietCommand yes no (section hidden on a project screen)
handoff yes yes. The project's value replaces the environment's whole. On a project screen, a change saves the whole value it shows as the project's own, and the row says so; the row's project-override control clears it
playtest yes yes, the same way

Screenshot

Not captured: the browser tests and dev server could not run on the machine that wrote this, which is missing Chromium's system libraries and has no root. CI runs the browser tests. What the page shows below Reviews:

  • Updates:
    • "Update automatically" with a switch on the right;
    • "Quiet check before an update" with a text field (placeholder /usr/local/bin/quiet-check).
  • Handoff:
    • "Handoff instead of compaction" with a select (Off);
    • "Handoff mode per thread": a list of "Fix the login page thread-1 [Compact ▾] [Remove]", then a row with a Thread id field, a mode select and "Add thread";
    • a folded "Advanced" with the two token fields, "Handoff written by" (select plus a command box) and "Handoff instructions".
  • Playtest:
    • "Playtest sessions" with a disabled switch and "Set the steps below first (missing: claim, renew, push, release)";
    • "Playtest steps" with an "Edit steps" button and, once set, one line per step ("claim /usr/local/bin/game claim");
    • a folded "Advanced" with the three limits.

Tests

  • fork/handoffSettings.logic.test.ts:
    • adding, changing and removing a thread's mode keeps the rest of the value, and the result passes the server's schema;
    • a blank id, a duplicate and the 500 cap are refused;
    • known threads are titled and unknown (deleted) ones listed last;
    • the command round-trips one argument per line, and a command source without a command is refused.
  • fork/playtestSettings.logic.test.ts:
    • an empty settings file has all four steps missing;
    • edited steps replace the old ones and keep the switch and limits, and the shown text reads back to the same value;
    • a step left out is removed, but not while playtest is on;
    • each kind of text the server refuses is refused.
  • fork/ForkPanels.browser.test.tsx (CI only): the exact patch each control sends, with settings decoded from a settings file as the server loads it (empty and stored):
    • the updates switch and quiet check;
    • the handoff mode, adding a thread by id, and removing a titled one;
    • playtest: the switch disabled from an empty file, bad steps text refused with nothing saved, edited steps saved whole, and a complete adapter switched on.
  • vp run check:changed: format, lint, knip, typecheck, the react compiler check and all 62 unit tests pass. Only the three browser test files fail, at browser launch on this machine.

State question

  • Runs again: each control sends one ordinary patch. Handoff and playtest replace the whole value (their patch rule), so saving twice gives the same file; of two saves at once, the last wins, as for review rules.
  • Stops half-way:
    • A refused save restores the field's stored value.
    • The steps dialog stays open with the typed text until the server saves it. Nothing partial is ever written: a value the client cannot check is not sent.
  • Old or empty state:
    • A settings file with none of these keys shows: updates off, no quiet check, handoff Off with no threads, playtest off with no steps.
    • A hand-edited value the server reads as off shows as off, and the next save writes a valid value.
    • A thread that was deleted keeps its entry, shown by id, and can be removed.

🤖 Generated with Claude Code

scuttletoby added a commit that referenced this pull request Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scuttletoby added a commit that referenced this pull request Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scuttletoby added a commit that referenced this pull request Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scuttletoby added a commit that referenced this pull request Nov 19, 2026
…ws lock and reset per row

Fix round for the review of #544:

- On a project screen a save of handoff or playtest merged the shown
  value into the project's current one, so a removed playtest step or
  an emptied handoff command came back. Both now replace the project's
  value whole, as waitChecks and reviewRules do (the server reads them
  so). A test saves through the real writer and settings patch.
- A thread's title and id are in their own elements, so the title
  reads (and is found) on its own.
- A managed lock or a missing write permission makes every handoff and
  playtest control inert: the thread list, Add thread, the command and
  instructions too. A refused Add thread keeps the typed id.
- On a project screen each Handoff and Playtest sub-row resets only its
  own fields to the environment's value; the section's first row still
  clears the whole override.
- "Reset playtest to default" restores the real default (steps
  included), and a clamped number shows the saved value.
- The playtest test switches the adapter on and then off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scuttletoby added a commit that referenced this pull request Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scuttletoby added a commit that referenced this pull request Nov 19, 2026
…ws lock and reset per row

Fix round for the review of #544:

- On a project screen a save of handoff or playtest merged the shown
  value into the project's current one, so a removed playtest step or
  an emptied handoff command came back. Both now replace the project's
  value whole, as waitChecks and reviewRules do (the server reads them
  so). A test saves through the real writer and settings patch.
- A thread's title and id are in their own elements, so the title
  reads (and is found) on its own.
- A managed lock or a missing write permission makes every handoff and
  playtest control inert: the thread list, Add thread, the command and
  instructions too. A refused Add thread keeps the typed id.
- On a project screen each Handoff and Playtest sub-row resets only its
  own fields to the environment's value; the section's first row still
  clears the whole override.
- "Reset playtest to default" restores the real default (steps
  included), and a clamped number shows the saved value.
- The playtest test switches the adapter on and then off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scuttletoby added a commit that referenced this pull request Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scuttletoby added a commit that referenced this pull request Nov 19, 2026
…ws lock and reset per row

Fix round for the review of #544:

- On a project screen a save of handoff or playtest merged the shown
  value into the project's current one, so a removed playtest step or
  an emptied handoff command came back. Both now replace the project's
  value whole, as waitChecks and reviewRules do (the server reads them
  so). A test saves through the real writer and settings patch.
- A thread's title and id are in their own elements, so the title
  reads (and is found) on its own.
- A managed lock or a missing write permission makes every handoff and
  playtest control inert: the thread list, Add thread, the command and
  instructions too. A refused Add thread keeps the typed id.
- On a project screen each Handoff and Playtest sub-row resets only its
  own fields to the environment's value; the section's first row still
  clears the whole override.
- "Reset playtest to default" restores the real default (steps
  included), and a clamped number shows the saved value.
- The playtest test switches the adapter on and then off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scuttletoby added a commit that referenced this pull request Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scuttletoby added a commit that referenced this pull request Nov 19, 2026
…ws lock and reset per row

Fix round for the review of #544:

- On a project screen a save of handoff or playtest merged the shown
  value into the project's current one, so a removed playtest step or
  an emptied handoff command came back. Both now replace the project's
  value whole, as waitChecks and reviewRules do (the server reads them
  so). A test saves through the real writer and settings patch.
- A thread's title and id are in their own elements, so the title
  reads (and is found) on its own.
- A managed lock or a missing write permission makes every handoff and
  playtest control inert: the thread list, Add thread, the command and
  instructions too. A refused Add thread keeps the typed id.
- On a project screen each Handoff and Playtest sub-row resets only its
  own fields to the environment's value; the section's first row still
  clears the whole override.
- "Reset playtest to default" restores the real default (steps
  included), and a clamped number shows the saved value.
- The playtest test switches the adapter on and then off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scuttletoby added a commit that referenced this pull request Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scuttletoby added a commit that referenced this pull request Nov 19, 2026
…ws lock and reset per row

Fix round for the review of #544:

- On a project screen a save of handoff or playtest merged the shown
  value into the project's current one, so a removed playtest step or
  an emptied handoff command came back. Both now replace the project's
  value whole, as waitChecks and reviewRules do (the server reads them
  so). A test saves through the real writer and settings patch.
- A thread's title and id are in their own elements, so the title
  reads (and is found) on its own.
- A managed lock or a missing write permission makes every handoff and
  playtest control inert: the thread list, Add thread, the command and
  instructions too. A refused Add thread keeps the typed id.
- On a project screen each Handoff and Playtest sub-row resets only its
  own fields to the environment's value; the section's first row still
  clears the whole override.
- "Reset playtest to default" restores the real default (steps
  included), and a clamped number shows the saved value.
- The playtest test switches the adapter on and then off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scuttletoby
scuttletoby changed the base branch from fork-settings-page to main November 19, 2026 20:41
scuttletoby and others added 4 commits November 19, 2026 20:41
… playtest

These fork settings had no screen. Settings > Fork gets three sections:

- Updates (server only): "Update automatically" and the quiet check program asked before an
  automatic update.
- Handoff: the mode (Off, Handoff, Compact), each thread's own mode (added by thread id, shown
  with its title where this client knows the thread, removable), and under Advanced the size and
  idle sizes, who writes the handoff with its command (one argument per line) and the instructions.
- Playtest: the switch, which stays off until claim, renew, push and release are set; the steps as
  JSON in a dialog, checked as the server's save checks them; the renew, idle and session limits
  under Advanced.

Handoff and playtest are project-scoped and replace the environment's value whole, so a change on a
project screen saves the whole value it shows as the project's own, and the row's override control
clears it. The page leaves a marked place for MCP profiles. Every new row is in the settings search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ws lock and reset per row

Fix round for the review of #544:

- On a project screen a save of handoff or playtest merged the shown
  value into the project's current one, so a removed playtest step or
  an emptied handoff command came back. Both now replace the project's
  value whole, as waitChecks and reviewRules do (the server reads them
  so). A test saves through the real writer and settings patch.
- A thread's title and id are in their own elements, so the title
  reads (and is found) on its own.
- A managed lock or a missing write permission makes every handoff and
  playtest control inert: the thread list, Add thread, the command and
  instructions too. A refused Add thread keeps the typed id.
- On a project screen each Handoff and Playtest sub-row resets only its
  own fields to the environment's value; the section's first row still
  clears the whole override.
- "Reset playtest to default" restores the real default (steps
  included), and a clamped number shows the saved value.
- The playtest test switches the adapter on and then off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…reset never builds a refused value

- Handoff size and idle size are bounded above by the server's limit (HANDOFF_MAX_TOKENS, now
  exported), so the field never offers a value the save refuses.
- A project sub-row reset is offered only when its result passes the server's strict check: a
  project whose own playtest is on no longer gets a step reset missing a step it needs.
- The reset helper's test covers an object field (threads) and a list field (push) by value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scuttletoby
scuttletoby merged commit 4aa6b1b into main Nov 19, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant