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
8888 `settledTurnStateForSessionStatus` in [`projector.ts`][projector]. Checkpoint work settling later
8989 does not define turn end.
9090
91−Thread settlement is server-owned. Per-environment settings control PR and inactivity settlement.
91+Thread settlement is server-owned. Each server's own settings control PR and inactivity
92+settlement. 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
94+when a connected environment drifts.
9295 [`ThreadSettlementReactor`][settlement] checks threads at startup, when those settings change, and
9396 once per minute, including when no client is connected. It dispatches the guarded internal
9497 `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
1010 Pinned threads still move to **Settled** when they become inactive. They also move when their pull
1111 request merges if **Auto-settle merged threads** is enabled.
1212
13−Each environment owns its automatic settlement settings. The server checks them even when no web,
14−desktop, or mobile client is connected. By default, it settles threads after three days without
13+Each server stores its own copy of the automatic settlement settings and checks them even when no
14+web, desktop, or mobile client is connected. By default, it settles threads after three days without
1515 activity and when their pull request merges. An eligible idle thread also settles when its pull
1616 request closes. An open pull request blocks inactivity settlement. Active work, pending input, and
1717 live background work keep the thread active. T3 Code settles from a closed or merged pull request
1818 only when its timestamp is not older than the user's latest activity. If that timestamp is not
1919 available, the inactivity rule still applies. A manual un-settle also keeps the thread active.
20−Change these rules in **Settings > General** for the environment. A settings change affects future
21−settlement and does not reopen a settled thread. Settings saved by older clients on one device no
22−longer control this behavior.
20+
21+Change these rules in **Settings > General**. The change is written to every environment you are
22+connected to at that moment. An environment that is offline keeps its old value. When a connected
23+environment 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
25+the new-thread workspace mode and the source control writing style.
26+
27+A settings change affects future settlement and does not reopen a settled thread. Settings saved
28+by older clients on one device no longer control this behavior.
2329
2430 When you un-settle a thread, it returns to the top of the active list so you can find it right
2531 away. Its timestamps do not change. Other threads keep their positions.