fix(focus-mode): never show mode selector during a running session

Mode switching mid-session was intentionally allowed for Flowtime,
but users reported the selector popping up unexpectedly as confusing.
Restrict isShowModeSelector to the Preparation state only.
This commit is contained in:
Johannes Millan 2026-05-20 16:01:49 +02:00
parent ea3626cde8
commit 236b4b704a
2 changed files with 3 additions and 7 deletions

View file

@ -697,8 +697,8 @@ describe('FocusModeMainComponent - notes panel (issue #5752)', () => {
(mockStore.dispatch as jasmine.Spy).calls.reset();
});
it('should show the mode selector while a focus session is in progress', () => {
expect(component.isShowModeSelector()).toBe(true);
it('should hide the mode selector while a focus session is in progress', () => {
expect(component.isShowModeSelector()).toBe(false);
});
it('should hide the mode selector while a Flowtime session is in progress', () => {

View file

@ -168,11 +168,7 @@ export class FocusModeMainComponent {
displayDuration = signal(25 * 60 * 1000); // Default 25 minutes
isTaskSelectorOpen = signal(false);
isShowModeSelector = computed(
() =>
this._isPreparation() ||
(this._isInProgress() && this.mode() !== FocusModeMode.Flowtime),
);
isShowModeSelector = computed(() => this._isPreparation());
isShowPomodoroSettings = computed(
() => this._isPreparation() && this.mode() === FocusModeMode.Pomodoro,
);