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'); } }