Skip to content

Conversation

@tyler-dane
Copy link
Contributor

@tyler-dane tyler-dane commented Feb 7, 2026

Closes #1441

  • Introduced a new WEEK route in the routing constants for better navigation.
  • Updated SelectView component to default to WEEK route instead of ROOT.
  • Modified tests to reflect changes in routing behavior, ensuring correct rendering and navigation for the WEEK view.
  • Implemented loadRootData function to redirect from ROOT to DAY route, enhancing user experience.
  • Added tests for loadRootData to verify redirection functionality.

Note

Medium Risk
Touches core client routing and default entry behavior (/ now redirects), so any missed references to the old Week route could cause navigation regressions despite broad test updates.

Overview
Introduces ROOT_ROUTES.WEEK (/week) and updates Week-view navigation to use it (notably SelectView route detection/options and the global 3 shortcut).

Changes routing so the calendar view is served from /week, while / now has a loader (loadRootData) that redirects to today’s Day route; adds unit coverage for this redirect. Updates onboarding route configs and multiple unit/e2e tests/utilities to start on and assert against /week instead of /.

Written by Cursor Bugbot for commit 56a9589. This will update automatically on new commits. Configure here.

- Introduced a new WEEK route in the routing constants for better navigation.
- Updated SelectView component to default to WEEK route instead of ROOT.
- Modified tests to reflect changes in routing behavior, ensuring correct rendering and navigation for the WEEK view.
- Implemented loadRootData function to redirect from ROOT to DAY route, enhancing user experience.
- Added tests for loadRootData to verify redirection functionality.
Copilot AI review requested due to automatic review settings February 7, 2026 02:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an explicit /week route for the Week (calendar) view and updates navigation/tests to prefer it, while making / a redirect entrypoint.

Changes:

  • Introduced ROOT_ROUTES.WEEK = "/week" and moved the Calendar view route from / to /week.
  • Updated view selection + keyboard shortcut navigation to use /week (and adjusted related tests).
  • Added a root loader (loadRootData) so / redirects into the Day flow, plus tests for this redirect.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/web/src/views/Onboarding/hooks/useStepDetection.ts Removes special-casing for / route normalization in step route detection.
packages/web/src/views/Onboarding/hooks/useGuideOverlayState.test.ts Updates onboarding guide view detection test to treat /week as the week view.
packages/web/src/views/Onboarding/constants/onboarding.constants.ts Replaces hard-coded route strings with ROOT_ROUTES.* and switches week view route to /week.
packages/web/src/views/Day/components/DayCmdPalette.test.tsx Updates expectation for “Go to Week” navigation to /week.
packages/web/src/views/Calendar/hooks/useRefetch.test.ts Updates “week view” test path assumptions from / to /week.
packages/web/src/views/Calendar/hooks/shortcuts/useGlobalShortcuts.ts Changes the 3 shortcut navigation target from / to /week.
packages/web/src/views/Calendar/hooks/shortcuts/useGlobalShortcuts.test.ts Updates shortcut test to expect navigation to /week.
packages/web/src/routers/loaders.ts Adds loadRootData loader to redirect / to the Day route.
packages/web/src/routers/loaders.test.ts Adds unit test coverage for loadRootData redirect behavior.
packages/web/src/routers/index.tsx Routes Calendar view at /week and adds a loader-only / route for redirect.
packages/web/src/components/SelectView/SelectView.tsx Updates Week option route to /week (and treats /week as Week view).
packages/web/src/components/SelectView/SelectView.test.tsx Updates SelectView tests/default route assumptions to /week.
packages/web/src/common/constants/routes.ts Adds WEEK: "/week" to routing constants.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 7, 2026 02:23
tyler-dane and others added 3 commits February 6, 2026 18:24
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Changed the webpackChunkName from "home" to "week" for the Calendar import in the WEEK route, improving clarity and organization in code splitting.
- Modified test setup to navigate to the WEEK route instead of the root path, ensuring tests reflect the current routing behavior.
- Updated utility functions to wait for the correct URL after switching to the WEEK view, enhancing test reliability.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.

- Enhanced the loadRootData test to verify redirection to the DAY route with today's date appended, improving accuracy in routing behavior.
- Imported loadTodayData to retrieve the current date for the test, ensuring the test reflects the expected output.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on March 3

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@tyler-dane tyler-dane merged commit 4c06f9d into main Feb 7, 2026
6 checks passed
@tyler-dane tyler-dane deleted the feat/1441-day-route-default branch February 7, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make /day the default route

1 participant