History

fix(settings): sync auto-settle and other shared preferences across environments (#9147)

Theo Browne committed 2 months ago

Commit 8efd4e91 parent 5014e5f10 files · +489 −44Browse files

Showing the changes to docs (2 of 10 files). Show all

Unified · Split

2 files
  1. docs/internals/overview.md +4 −1
  2. docs/user/thread-sidebar.md +11 −5
docs/internals/overview.md+4−1
@@ -88,7 +88,10 @@ A turn is complete when its session leaves `running` status, projected by · 87 unmodified lines
88`settledTurnStateForSessionStatus` in [`projector.ts`][projector]. Checkpoint work settling later88`settledTurnStateForSessionStatus` in [`projector.ts`][projector]. Checkpoint work settling later
89does not define turn end.89does not define turn end.
90 90
91Thread settlement is server-owned. Per-environment settings control PR and inactivity settlement.91Thread settlement is server-owned. Each server's own settings control PR and inactivity
92settlement. Those keys are user preferences, so clients write them to every connected environment
93(`SHARED_SERVER_SETTING_KEYS` in `packages/client-runtime/src/state/sharedSettings.ts`) and warn
94when a connected environment drifts.
92[`ThreadSettlementReactor`][settlement] checks threads at startup, when those settings change, and95[`ThreadSettlementReactor`][settlement] checks threads at startup, when those settings change, and
93once per minute, including when no client is connected. It dispatches the guarded internal96once per minute, including when no client is connected. It dispatches the guarded internal
94`thread.auto-settle` command, which uses the existing settlement event lifecycle. Automatic97`thread.auto-settle` command, which uses the existing settlement event lifecycle. Automatic
docs/user/thread-sidebar.md+11−5
@@ -10,16 +10,22 @@ confirmation applies to the sidebar controls, thread menus, and the `mod+shift+p · 9 unmodified lines
10Pinned threads still move to **Settled** when they become inactive. They also move when their pull10Pinned threads still move to **Settled** when they become inactive. They also move when their pull
11request merges if **Auto-settle merged threads** is enabled.11request merges if **Auto-settle merged threads** is enabled.
12 12
13Each environment owns its automatic settlement settings. The server checks them even when no web,13Each server stores its own copy of the automatic settlement settings and checks them even when no
14desktop, or mobile client is connected. By default, it settles threads after three days without14web, desktop, or mobile client is connected. By default, it settles threads after three days without
15activity and when their pull request merges. An eligible idle thread also settles when its pull15activity and when their pull request merges. An eligible idle thread also settles when its pull
16request closes. An open pull request blocks inactivity settlement. Active work, pending input, and16request closes. An open pull request blocks inactivity settlement. Active work, pending input, and
17live background work keep the thread active. T3 Code settles from a closed or merged pull request17live background work keep the thread active. T3 Code settles from a closed or merged pull request
18only when its timestamp is not older than the user's latest activity. If that timestamp is not18only when its timestamp is not older than the user's latest activity. If that timestamp is not
19available, the inactivity rule still applies. A manual un-settle also keeps the thread active.19available, the inactivity rule still applies. A manual un-settle also keeps the thread active.
20Change these rules in **Settings > General** for the environment. A settings change affects future20
21settlement and does not reopen a settled thread. Settings saved by older clients on one device no21Change these rules in **Settings > General**. The change is written to every environment you are
22longer control this behavior.22connected to at that moment. An environment that is offline keeps its old value. When a connected
23environment holds a different value, **Settings > General** shows a warning that names it. Choose
24**Apply to all** to write your current values to every connected environment. The same applies to
25the new-thread workspace mode and the source control writing style.
26
27A settings change affects future settlement and does not reopen a settled thread. Settings saved
28by older clients on one device no longer control this behavior.
23 29
24When you un-settle a thread, it returns to the top of the active list so you can find it right30When you un-settle a thread, it returns to the top of the active list so you can find it right
25away. Its timestamps do not change. Other threads keep their positions.31away. Its timestamps do not change. Other threads keep their positions.