Skip to content

Commit 1dad6d3

Browse files
authored
chore(web): remove now view (#1850)
* chore(web): remove now view * test(e2e): remove now view expectations
1 parent 902b9ff commit 1dad6d3

38 files changed

Lines changed: 110 additions & 2080 deletions

docs/acceptance/shortcuts.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This runbook covers keyboard shortcut parity in Compass. The principle: anything
66

77
Use this guide to validate:
88

9-
- navigating between views with the keyboard (D, W, N)
9+
- navigating between views with the keyboard (D, W)
1010
- navigating between days in Day view (J, K, T)
1111
- navigating between weeks in Week view (J, K, T)
1212
- opening and using the command palette (Cmd+K)
@@ -20,7 +20,6 @@ Use this guide to validate:
2020

2121
Do not use this guide to validate:
2222

23-
- Now mode navigation shortcuts (see `tasks.md`, Scenarios 10–13)
2423
- full event CRUD flows (see `events.md`)
2524
- full task management flows (see `tasks.md`)
2625

@@ -45,7 +44,6 @@ Helpful notes:
4544
| --------------------------- | --------- | --------------------------------- |
4645
| `D` | Global | Navigate to Day view |
4746
| `W` | Global | Navigate to Week view |
48-
| `N` | Global | Navigate to Now view |
4947
| `R` | Global | Edit personal reminder note |
5048
| `Z` | Global | Log out |
5149
| `Cmd+K` / `Ctrl+K` | Global | Open command palette |
@@ -61,8 +59,6 @@ Helpful notes:
6159
| `Ctrl+Meta+ArrowRight` | Day view | Move focused task to next day |
6260
| `Ctrl+Meta+ArrowLeft` | Day view | Move focused task to previous day |
6361
| `Cmd+Z` / `Ctrl+Z` | Day view | Undo last action |
64-
| `E` | Now view | Edit focused task description |
65-
| `Cmd+Enter` / `Ctrl+Enter` | Now view | Save focused task description |
6662
| `J` | Week view | Previous week |
6763
| `K` | Week view | Next week |
6864
| `T` | Week view | Go to today |
@@ -77,23 +73,18 @@ Helpful notes:
7773

7874
### UX
7975

80-
Pressing `D`, `W`, or `N` from anywhere in the app (while not focused in an input) navigates to Day view, Week view, or Now view respectively.
81-
82-
View shortcuts keep the same meaning in Now mode. `D` still navigates to Day view.
76+
Pressing `D` or `W` from anywhere in the app (while not focused in an input) navigates to Day view or Week view respectively.
8377

8478
### Steps
8579

8680
1. Navigate to `/week`.
8781
2. Press `D`.
8882
3. Press `W`.
89-
4. Press `N`.
90-
5. Press `D` to return to Day view.
9183

9284
### Expected Results
9385

9486
- `D` navigates to `/day`.
9587
- `W` navigates to `/week`.
96-
- `N` navigates to `/now`.
9788
- Each transition happens without a full page reload.
9889

9990
---

docs/acceptance/tasks.md

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ Use this guide to validate:
1212
- deleting tasks and undoing deletions
1313
- reordering tasks by drag and drop
1414
- moving tasks to adjacent days
15-
- Now mode — locking in on a single task
16-
- navigating and completing tasks in Now mode
17-
- editing a task description in Now mode
1815

1916
Do not use this guide to validate:
2017

@@ -218,90 +215,6 @@ Pressing Ctrl+Meta+ArrowLeft moves the focused task to the previous calendar dat
218215

219216
---
220217

221-
## Scenario 10: Use Now Mode — Lock In On A Task
222-
223-
### UX
224-
225-
Now mode (`/now`) shows all of today's incomplete tasks. Selecting one locks the view to that single task, removing other distractions.
226-
227-
### Steps
228-
229-
1. Create at least two incomplete tasks for today.
230-
2. Press `N` to navigate to `/now`.
231-
3. Select a task from the available task list.
232-
233-
### Expected Results
234-
235-
- Now mode opens and displays all incomplete tasks for today.
236-
- After selecting a task, the view focuses on that single task with a large title display.
237-
- The other tasks are hidden from view.
238-
239-
---
240-
241-
## Scenario 11: Navigate Tasks In Now Mode (J/K)
242-
243-
### UX
244-
245-
In Now mode with a task focused, pressing `J` and `K` cycles through the available incomplete tasks without leaving the view.
246-
247-
### Steps
248-
249-
1. Enter Now mode with at least three incomplete tasks (see Scenario 10).
250-
2. Select a task to focus it.
251-
3. Press `K` to move to the next task.
252-
4. Press `J` to move to the previous task.
253-
254-
### Expected Results
255-
256-
- `K` advances to the next incomplete task (wrapping around at the end).
257-
- `J` goes back to the previous incomplete task (wrapping around at the start).
258-
- The currently focused task is displayed prominently.
259-
260-
---
261-
262-
## Scenario 12: Complete A Task In Now Mode And Advance To Next
263-
264-
### UX
265-
266-
Pressing Enter in Now mode marks the focused task complete and automatically moves to the next incomplete task. When all tasks are done, a completion state is shown.
267-
268-
### Steps
269-
270-
1. Enter Now mode with exactly two incomplete tasks.
271-
2. Select the first task.
272-
3. Press Enter to mark it complete.
273-
4. Press Enter again to mark the second task complete.
274-
275-
### Expected Results
276-
277-
- After the first Enter, the view advances to the second task automatically.
278-
- After the second Enter, the "No tasks available" or all-done state is shown.
279-
- Both tasks appear as completed in Day view.
280-
281-
---
282-
283-
## Scenario 13: Edit A Task Description In Now Mode
284-
285-
### UX
286-
287-
Pressing `E` while a task is focused in Now mode opens an inline description editor (max 255 characters). Pressing Cmd+Enter (Mac) or Ctrl+Enter (Windows/Linux) saves the description.
288-
289-
### Steps
290-
291-
1. Enter Now mode and select a task.
292-
2. Press `E`.
293-
3. Type a description (keep it under 255 characters).
294-
4. Press Cmd+Enter (Mac) or Ctrl+Enter (Windows/Linux) to save.
295-
296-
### Expected Results
297-
298-
- An inline editor appears for the description.
299-
- After saving, the description is displayed below the task title.
300-
- The description persists after leaving and re-entering Now mode.
301-
- Characters beyond 255 are not accepted.
302-
303-
---
304-
305218
## Focused Regression Checks
306219

307220
If time is limited, run these checks before shipping task-related changes:
@@ -313,7 +226,3 @@ If time is limited, run these checks before shipping task-related changes:
313226
5. Cmd+Z / Ctrl+Z restores the deleted task with its original properties.
314227
6. Drag-and-drop reordering persists after a page reload.
315228
7. Ctrl+Meta+ArrowRight moves a task to the next day; Ctrl+Meta+ArrowLeft to the previous day.
316-
8. Now mode shows all incomplete tasks for today and locks focus to a selected task.
317-
9. J/K navigate between tasks in Now mode without leaving the view.
318-
10. Enter in Now mode marks the task complete and auto-advances.
319-
11. D opens the description editor; Cmd+Enter / Ctrl+Enter saves; max 255 characters is enforced.

docs/development/feature-file-map.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,14 @@ Use this document to find the first files to inspect for common Compass changes.
4242
- Drag handle floating placement guard: `packages/web/src/views/Day/components/Task/DraggableTask.tsx`
4343
- Local storage for tasks: `packages/web/src/common/storage/adapter`
4444

45-
## Day / Week / Now Views
45+
## Day / Week Views
4646

4747
- Day view route and content: `packages/web/src/views/Day/view`
4848
- Day view header (includes Planner Sidebar toggle control): `packages/web/src/views/Day/components/Header/Header.tsx`
4949
- Day keyboard shortcuts (includes `[` toggle): `packages/web/src/views/Day/hooks/shortcuts/useDayViewShortcuts.ts`
5050
- Day view hooks: `packages/web/src/views/Day/hooks`
5151
- Week view: `packages/web/src/views/Week`
52-
- Now view: `packages/web/src/views/Now`
53-
- Now shortcuts sidebar component: `packages/web/src/views/Day/components/ShortcutsSidebar/ShortcutsSidebar.tsx`
5452
- Shared responsive sidebar state hook (`xl` breakpoint behavior): `packages/web/src/common/hooks/useSidebarState.ts`
55-
- Now keyboard shortcuts (includes `[` toggle): `packages/web/src/views/Now/shortcuts/useNowShortcuts.ts`
5653
- Dedication dialog implementation (native `dialog` + hotkeys): `packages/web/src/views/Week/components/Dedication/Dedication.tsx`
5754
- Dedication dialog mount points:
5855
- week view: `packages/web/src/views/Week/WeekView.tsx`

docs/development/testing-playbook.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ Files:
190190
- `packages/web/src/common/hooks/useSidebarState.ts`
191191
- `packages/web/src/views/Day/components/ShortcutsSidebar/ShortcutsSidebar.tsx`
192192
- `packages/web/src/views/Day/view/DayViewContent.tsx`
193-
- `packages/web/src/views/Now/view/NowView.tsx`
194193

195194
Reliable setup pattern:
196195

docs/frontend/frontend-runtime-flow.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -167,35 +167,6 @@ Pitfalls:
167167
- do not call `dialog.close()` directly in new close handlers unless you intentionally want to bypass the fade/scale exit animation
168168
- keep imports pointed at `.../Dedication/Dedication` (no barrel file in this folder)
169169

170-
## Now Shortcuts Sidebar Runtime
171-
172-
Files:
173-
174-
- `packages/web/src/common/hooks/useSidebarState.ts`
175-
- `packages/web/src/views/Day/components/ShortcutsSidebar/ShortcutsSidebar.tsx`
176-
- `packages/web/src/views/Now/view/NowView.tsx`
177-
- `packages/web/src/views/Now/shortcuts/useNowShortcuts.ts`
178-
179-
Runtime behavior:
180-
181-
- sidebar state is responsive-first: `useSidebarState` sets open/closed from `window.innerWidth >= 1280` (`xl`) and subscribes to `matchMedia("(min-width: 1280px)")`
182-
- breakpoint transitions are authoritative: crossing the `xl` boundary re-syncs the sidebar state even if the user manually toggled it earlier
183-
- users can toggle via:
184-
- Now header sidebar button (`Header` tooltip + `SidebarIcon`)
185-
- `[` keyboard shortcut in Now view
186-
- the sidebar is desktop-only in layout (`hidden xl:flex`), so on sub-`xl` widths toggling updates state but the sidebar content remains visually hidden
187-
- `ShortcutsSidebar` filters out empty sections and returns `null` when no section has shortcuts
188-
189-
Animation and visibility contract:
190-
191-
- opening uses `requestAnimationFrame` to set visible state so entry transition classes apply (`translate-x-0 opacity-100`)
192-
- closing sets hidden classes (`-translate-x-4 opacity-0`) and unmounts when closed/not visible
193-
194-
Pitfalls:
195-
196-
- `useSidebarState` reads `window` during state initialization and uses `window.matchMedia`; browser-like globals must exist in tests/non-browser runtimes
197-
- when adding shortcuts sidebar interactions, verify Now view because Day uses the Planner Sidebar instead
198-
199170
## State Systems
200171

201172
The web app uses multiple state layers:
@@ -350,4 +321,4 @@ Connect-later guardrail:
350321
- Auth/session issue: read session provider, user provider, router loaders.
351322
- Event refresh issue: read SSE hooks, sync slice, event sagas.
352323
- Offline issue: read storage adapter and migration runner.
353-
- Rendering issue in day/week/now: start at the route view, then its hooks.
324+
- Rendering issue in day/week: start at the route view, then its hooks.

e2e/navigation/week-view-switch.spec.ts

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { expect, type Page, test } from "@playwright/test";
22

3-
type ViewName = "day" | "now" | "week";
3+
type ViewName = "day" | "week";
44

55
const shortcutByView = {
66
day: "d",
7-
now: "n",
87
week: "w",
98
} as const satisfies Record<ViewName, string>;
109

@@ -59,10 +58,9 @@ test.describe("View dropdown", () => {
5958

6059
await openViewMenu(page, "week");
6160

62-
await expect(viewOption(page, "now")).toHaveAttribute(
63-
"aria-selected",
64-
"false",
65-
);
61+
await expect(
62+
page.getByTestId("view-select-dropdown").getByRole("option"),
63+
).toHaveText(["Dayd", "Weekw"]);
6664
await expect(viewOption(page, "day")).toHaveAttribute(
6765
"aria-selected",
6866
"false",
@@ -72,7 +70,6 @@ test.describe("View dropdown", () => {
7270
"true",
7371
);
7472

75-
await expectShortcutHint(page, "now");
7673
await expectShortcutHint(page, "day");
7774
await expectShortcutHint(page, "week");
7875
});
@@ -117,22 +114,6 @@ test.describe("View dropdown", () => {
117114
expect(consoleErrors).toEqual([]);
118115
});
119116

120-
test("switches from Week to Now and paints the Now view", async ({
121-
page,
122-
}) => {
123-
const consoleErrors = collectUnexpectedConsoleErrors(page);
124-
125-
await page.goto("/week");
126-
127-
await openViewMenu(page, "week");
128-
await viewOption(page, "now").click();
129-
130-
await expect(page).toHaveURL(/\/now$/);
131-
await expect(viewButton(page, "now")).toBeVisible();
132-
await expect(viewButton(page, "week")).toHaveCount(0);
133-
expect(consoleErrors).toEqual([]);
134-
});
135-
136117
test("supports keyboard navigation and Enter selection", async ({ page }) => {
137118
await page.goto("/week");
138119

@@ -141,7 +122,7 @@ test.describe("View dropdown", () => {
141122
await page.keyboard.press("ArrowDown");
142123
await page.keyboard.press("Enter");
143124

144-
await expect(page).toHaveURL(/\/now$/);
145-
await expect(viewButton(page, "now")).toBeVisible();
125+
await expect(page).toHaveURL(/\/day\/\d{4}-\d{2}-\d{2}$/);
126+
await expect(viewButton(page, "day")).toBeVisible();
146127
});
147128
});

packages/web/src/common/constants/navigation.cmd.constants.test.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,13 @@ describe("getNavigationCommandItems", () => {
1717

1818
it("returns the other views and today for the week palette", () => {
1919
expect(getItemLabels("week")).toEqual([
20-
"Go to Now [n]",
2120
"Go to Day [d]",
2221
"Go to Today (Thursday, May 28) [t]",
2322
]);
2423
});
2524

2625
it("returns the other views and today for the day palette", () => {
2726
expect(getItemLabels("day")).toEqual([
28-
"Go to Now [n]",
29-
"Go to Week [w]",
30-
"Go to Today (Thursday, May 28) [t]",
31-
]);
32-
});
33-
34-
it("returns the other views and today for the now palette", () => {
35-
expect(getItemLabels("now")).toEqual([
36-
"Go to Day [d]",
3727
"Go to Week [w]",
3828
"Go to Today (Thursday, May 28) [t]",
3929
]);
@@ -43,7 +33,7 @@ describe("getNavigationCommandItems", () => {
4333
const navigatedViews: ViewName[] = [];
4434
let didGoToToday = false;
4535
const items = getNavigationCommandItems({
46-
currentView: "now",
36+
currentView: "day",
4737
onGoToToday: () => {
4838
didGoToToday = true;
4939
},
@@ -53,11 +43,10 @@ describe("getNavigationCommandItems", () => {
5343
today,
5444
});
5545

56-
items.find((item) => item.id === "go-to-day")?.onClick?.({} as never);
5746
items.find((item) => item.id === "go-to-week")?.onClick?.({} as never);
5847
items.find((item) => item.id === "today")?.onClick?.({} as never);
5948

60-
expect(navigatedViews).toEqual(["day", "week"]);
49+
expect(navigatedViews).toEqual(["week"]);
6150
expect(didGoToToday).toBe(true);
6251
});
6352
});

packages/web/src/common/constants/navigation.cmd.constants.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ interface GetNavigationCommandItemsArgs {
1414

1515
const viewIcons: Record<ViewName, IconName> = {
1616
day: "CalendarDaysIcon",
17-
now: "ClockIcon",
1817
week: "CalendarIcon",
1918
};
2019

21-
const navigationViewOrder: ViewName[] = ["now", "day", "week"];
20+
const navigationViewOrder: ViewName[] = ["day", "week"];
2221

2322
export const getNavigationCommandItems = ({
2423
currentView,

packages/web/src/common/constants/routes.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ export const ROOT_ROUTES = {
66
WEEK: "/week",
77
DAY: "/day",
88
DAY_DATE: "/day/:dateString",
9-
NOW: "/now",
109
};

packages/web/src/common/constants/shortcuts.constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { ROOT_ROUTES } from "./routes";
55
* Single source of truth for keyboard shortcuts used to navigate between views.
66
*/
77
export const VIEW_SHORTCUTS = {
8-
now: { key: "n", label: "Now", route: ROOT_ROUTES.NOW },
98
day: { key: "d", label: "Day", route: ROOT_ROUTES.DAY },
109
week: { key: "w", label: "Week", route: ROOT_ROUTES.WEEK },
1110
} as const;

0 commit comments

Comments
 (0)