@@ -190,6 +190,83 @@ Runtime/probe failures MAY present `Save anyway`.
190190- ** THEN** the editor may show ` Save anyway `
191191- ** AND** the operator can choose to persist the structurally valid config
192192
193+ ### Requirement: Inline config editors autosave completed actions consistently
194+
195+ Every inline ` netclaw config ` leaf editor SHALL use a shared autosave
196+ interaction contract. The UI SHALL NOT require an explicit save key for
197+ ordinary config edits.
198+
199+ Completed actions SHALL save immediately after validation. Completed actions
200+ include accepted text or multi-field forms, toggles, audience changes,
201+ enable/disable actions, add/remove actions, and confirmed reset actions.
202+ Incomplete text input SHALL remain an in-memory draft until accepted with
203+ ` Enter ` or an equivalent Apply action.
204+
205+ ` Esc ` SHALL only navigate back or cancel incomplete input. It SHALL NOT save
206+ pending edits and SHALL NOT be required to complete a save.
207+
208+ All autosaves SHALL be atomic: validation SHALL complete before files are
209+ written, and failed validation SHALL leave persisted config and secrets
210+ unchanged.
211+
212+ #### Scenario: Completed toggle autosaves immediately
213+
214+ - ** GIVEN** an inline config leaf editor contains a boolean toggle
215+ - ** WHEN** the operator toggles the setting
216+ - ** THEN** the editor validates the resulting state
217+ - ** AND** persists the change immediately when validation succeeds
218+ - ** AND** shows a saved status without asking the operator to press a save key
219+
220+ #### Scenario: Esc cancels draft text without persisting
221+
222+ - ** GIVEN** an inline config leaf editor contains a text field
223+ - ** AND** the operator has typed a draft value but has not accepted it
224+ - ** WHEN** the operator presses ` Esc `
225+ - ** THEN** the editor navigates back or cancels the draft
226+ - ** AND** the persisted config is unchanged
227+
228+ #### Scenario: Invalid completed action writes nothing
229+
230+ - ** GIVEN** an inline config leaf editor contains a structurally invalid draft
231+ - ** WHEN** the operator accepts the action
232+ - ** THEN** validation fails
233+ - ** AND** no config or secrets file is modified
234+ - ** AND** the UI shows the validation error
235+
236+ ### Requirement: Inline config persistence is section-preserving
237+
238+ Inline config leaf editors SHALL persist only the sections, providers,
239+ fields, and sidecar files they own. Saving one provider or sub-area SHALL NOT
240+ delete or reset unrelated providers, inactive values, secrets, audiences, or
241+ sidecar files.
242+
243+ Disable actions SHALL preserve dormant configuration and secrets while writing
244+ only the runtime-enabled flag. Destructive removal SHALL require an explicit
245+ reset/confirm action and SHALL be scoped to the confirmed target.
246+
247+ #### Scenario: Disabling one channel provider preserves its dormant setup
248+
249+ - ** GIVEN** Slack has saved channels, audiences, allowed users, and secrets
250+ - ** WHEN** the operator disables Slack from the Channels config area
251+ - ** THEN** Slack ` Enabled ` is persisted as ` false `
252+ - ** AND** Slack channels, audiences, allowed users, and secrets remain
253+ persisted
254+
255+ #### Scenario: Saving one channel provider does not wipe another provider
256+
257+ - ** GIVEN** Slack and Discord both have saved channel configuration
258+ - ** WHEN** the operator adds a Discord channel and the action autosaves
259+ - ** THEN** the Discord addition is persisted
260+ - ** AND** the saved Slack configuration remains present and unchanged except
261+ for any explicit Slack action the operator completed
262+
263+ #### Scenario: Reset is the only provider-destructive action
264+
265+ - ** GIVEN** a provider has saved channel configuration and secrets
266+ - ** WHEN** the operator confirms reset for that provider
267+ - ** THEN** only that provider's config and secrets are removed
268+ - ** AND** other providers remain unchanged
269+
193270### Requirement: Coverage follows leaf ownership
194271
195272Leaf editors SHALL receive substantive round-trip and smoke coverage.
0 commit comments