Shell 16 follow-up: autostart off removes a system-disabled entry #927

Closed
charles wants to merge 0 commits from shell-16-core-autostart into shell
Owner

Follow-up to #861 (Refs #808), from a re-review.

Defect: reconcile(false, DisabledBySystem) returned None, so turning "Launch Flaxative at login" off while Windows "Startup apps" had the entry disabled left our Run value in place. Re-enabling it in Windows settings would then launch Flaxative with the switch off. Separately, DesktopRow::toggle hit unreachable! for a non-switch key (InputHook, PortalConsent).

Fix:

  • reconcile(false, DisabledBySystem) now returns SetAutostart(false), which deletes the Run value (StartupApproved is still never written). (true, DisabledBySystem) is still left alone.
  • DesktopRow::toggle returns Option<ShellAction>. The key-to-switch mapping lives once, in ShellSettingChange::switch, and the settings loader uses it too. The Settings → Desktop UI caller is updated.
  • The docs for the port (AutostartState::DisabledBySystem, ShellCommand::SetAutostart) and the README now describe the new contract.
  • New tests: switch_off_removes_entry_disabled_by_system and non_switch_rows_do_not_toggle. The reconcile_cases table is updated.

Gate: cargo xtask ci (screenshot tests on) passed after merging origin/shell.

🤖 Generated with Claude Code

Follow-up to #861 (Refs #808), from a re-review. **Defect:** `reconcile(false, DisabledBySystem)` returned `None`, so turning "Launch Flaxative at login" off while Windows "Startup apps" had the entry disabled left our `Run` value in place. Re-enabling it in Windows settings would then launch Flaxative with the switch off. Separately, `DesktopRow::toggle` hit `unreachable!` for a non-switch key (`InputHook`, `PortalConsent`). **Fix:** - `reconcile(false, DisabledBySystem)` now returns `SetAutostart(false)`, which deletes the `Run` value (`StartupApproved` is still never written). `(true, DisabledBySystem)` is still left alone. - `DesktopRow::toggle` returns `Option<ShellAction>`. The key-to-switch mapping lives once, in `ShellSettingChange::switch`, and the settings loader uses it too. The Settings → Desktop UI caller is updated. - The docs for the port (`AutostartState::DisabledBySystem`, `ShellCommand::SetAutostart`) and the README now describe the new contract. - New tests: `switch_off_removes_entry_disabled_by_system` and `non_switch_rows_do_not_toggle`. The `reconcile_cases` table is updated. Gate: `cargo xtask ci` (screenshot tests on) passed after merging `origin/shell`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- reconcile(false, DisabledBySystem) now asks for SetAutostart(false): the switch that
  wrote the Forked.Flaxative Run value removes it, as the original's disableAutostart
  does (Autostart.ts:529-552). (true, DisabledBySystem) is still left alone.
- DesktopRow::toggle returns Option<ShellAction>: None for InputHook and PortalConsent
  instead of unreachable!.
- The key-to-boolean-change mapping lives once, in ShellSettingChange::switch, used by
  the settings loader and by the Desktop rows.

Refs #808

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
Refs #808

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #808

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Merged into shell by hand (the merge API returns 405); the commits are in the branch.

Merged into `shell` by hand (the merge API returns 405); the commits are in the branch.
charles closed this pull request 2026-11-19 04:20:33 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.