Commit a0114f7
workspace: Treat undeclared active_profile as no-op instead of clear
Preserves a manual settings_profile_selector::Toggle selection when the
effective active worktree declares no active_profile, composing cleanly
with the picker as a declarative/imperative pair (mirrors theme vs.
Theme Selector). Worktrees that declare active_profile still re-assert
on every activation hook fire, matching the "project-level default wins
on entry" intuition.
Previously the (None, Some(_)) match arm called
cx.remove_global::<ActiveSettingsProfileName>() on any activation event
in an undeclared worktree, which wiped a manual picker selection on
e.g. window-sidebar switches. The arm is now folded into a single
(None, _) => {} no-op, with an expanded doc comment stating the
interaction contract with settings_profile_selector explicitly so the
composition is self-documenting in the source.
See private/specs/persistent-active-profile.md Decision 3 and Decision 5
(both revised 2026-04-10) for the full rationale and example flows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent b186395 commit a0114f7
1 file changed
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5711 | 5711 | | |
5712 | 5712 | | |
5713 | 5713 | | |
| 5714 | + | |
| 5715 | + | |
| 5716 | + | |
| 5717 | + | |
| 5718 | + | |
| 5719 | + | |
| 5720 | + | |
| 5721 | + | |
| 5722 | + | |
| 5723 | + | |
| 5724 | + | |
| 5725 | + | |
| 5726 | + | |
5714 | 5727 | | |
5715 | 5728 | | |
5716 | 5729 | | |
| |||
5730 | 5743 | | |
5731 | 5744 | | |
5732 | 5745 | | |
5733 | | - | |
5734 | | - | |
5735 | | - | |
5736 | | - | |
| 5746 | + | |
| 5747 | + | |
| 5748 | + | |
| 5749 | + | |
5737 | 5750 | | |
5738 | 5751 | | |
5739 | 5752 | | |
| |||
0 commit comments