From 07d3e1d722b48bafbb30447cee738e60124ff0f5 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Wed, 17 Jun 2026 13:28:06 +0200 Subject: [PATCH] fix(finish-day): open daily summary from before-close dialog (#8449) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The before-close confirm dialog's 'Finish Day' option navigated to a bare '/daily-summary' route, which does not exist at the top level. It fell through to the '**' wildcard and redirected to the start page, so the daily summary never opened and the app appeared to do nothing. Navigate to '/active/daily-summary' instead — resolved by ActiveWorkContextGuard to the current context, matching the in-app Finish Day button. --- .../finish-day-before-close.effects.spec.ts | 6 ++++-- .../finish-day-before-close.effects.ts | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/app/features/finish-day-before-close/finish-day-before-close.effects.spec.ts b/src/app/features/finish-day-before-close/finish-day-before-close.effects.spec.ts index d1d58ebd47..b76edf922d 100644 --- a/src/app/features/finish-day-before-close/finish-day-before-close.effects.spec.ts +++ b/src/app/features/finish-day-before-close/finish-day-before-close.effects.spec.ts @@ -99,12 +99,14 @@ describe('FinishDayBeforeCloseEffects._handleCloseDecision()', () => { expect(router.navigateByUrl).not.toHaveBeenCalled(); }); - it('navigates to /daily-summary and does NOT close when user picks "finish-day"', async () => { + it('navigates to /active/daily-summary and does NOT close when user picks "finish-day"', async () => { showDialogSpy.and.returnValue(Promise.resolve('finish-day')); await effects._handleCloseDecision([doneTask, undoneTask]); - expect(router.navigateByUrl).toHaveBeenCalledWith('/daily-summary'); + // Must target the context-resolved route (issue #8449); a bare + // `/daily-summary` has no matching route and redirects to the start page. + expect(router.navigateByUrl).toHaveBeenCalledWith('/active/daily-summary'); expect(execBeforeCloseService.setDone).not.toHaveBeenCalled(); }); }); diff --git a/src/app/features/finish-day-before-close/finish-day-before-close.effects.ts b/src/app/features/finish-day-before-close/finish-day-before-close.effects.ts index 3a32caf464..e74615768e 100644 --- a/src/app/features/finish-day-before-close/finish-day-before-close.effects.ts +++ b/src/app/features/finish-day-before-close/finish-day-before-close.effects.ts @@ -103,7 +103,13 @@ export class FinishDayBeforeCloseEffects { if (choice === 'quit') { this._execBeforeCloseService.setDone(EXEC_BEFORE_CLOSE_ID); } else if (choice === 'finish-day') { - this._router.navigateByUrl('/daily-summary'); + // There is no top-level `/daily-summary` route — the daily summary only + // exists under the active work context (tag/project). `/active/...` is + // resolved by ActiveWorkContextGuard to the current context, same as the + // in-app Finish Day button. A bare `/daily-summary` falls through to the + // `**` wildcard and redirects to the start page, so the summary never + // opens (issue #8449). + this._router.navigateByUrl('/active/daily-summary'); } }