Skip to content

Commit ebca15d

Browse files
authored
Merge branch 'main' into refactor/localize-google-callback-recovery-1833
2 parents cb68bdb + 6ecfe66 commit ebca15d

145 files changed

Lines changed: 3528 additions & 3890 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy production
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Release tag being deployed, such as v1.2.3'
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
deploy:
16+
name: Deploy to production
17+
uses: ./.github/workflows/_deploy-environment.yml
18+
with:
19+
tag: ${{ inputs.tag }}
20+
environment: production
21+
secrets: inherit
22+
23+
health-check:
24+
name: Health check production
25+
needs: deploy
26+
uses: ./.github/workflows/deploy-health-check.yml
27+
with:
28+
tag: ${{ inputs.tag }}
29+
environment: production
30+
profile: cloud
31+
secrets: inherit

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ Use a single-context domain-doc layout. See `.agents/config/domain.md`.
8787
and `user-event`; avoid CSS selectors and `data-*` locators.
8888
- New web styles should use Tailwind semantic colors from
8989
`packages/web/src/index.css`, not raw colors like `bg-blue-300`.
90+
- Prefer canonical Tailwind scale utilities over arbitrary values when an
91+
equivalent exists. Treat VS Code Tailwind IntelliSense
92+
`suggestCanonicalClasses` warnings as actionable cleanup before finishing
93+
changes.
9094
- Do not test login flows without the required backend setup.
9195
- Keep React components in their own files.
9296
- Do not add or use barrel files such as `index.ts` / `index.tsx`. Import from

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**A daily planner for minimalists. Organize your day and lock-in.**
44

5-
<https://github.com/user-attachments/assets/ba7b91b9-1984-49f2-afc6-7fcda1100b31>
5+
<img width="1512" height="860" alt="week-view-2026-06" src="https://github.com/user-attachments/assets/6dcfd741-883d-401c-b8e2-97300b1dd925" />
66

77
## Why Try Compass?
88

docs/CI-CD/workflows.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Compass uses GitHub Actions for continuous integration, Docker Hub for image dis
99
| Release on main | Push to `main` | Auto-increments patch version, publishes Docker images, then deploys staging |
1010
| Publish Docker images | Reusable workflow / manual dispatch / manual `v*.*.*` tag push | Builds and pushes Docker images only |
1111
| Deploy staging | Reusable workflow / manual dispatch | Pulls published images on staging, restarts the stack, then runs deploy health checks |
12+
| Deploy production | Manual dispatch | Deploys a release tag to production, then runs cloud deploy health checks |
1213
| Deploy health check | Reusable workflow | Validates the deployed staging stack and alerts Discord on failure |
1314
| Sync docs to compass-docs | Push to `main` touching `docs/**` | Mirrors this `docs/` directory to docs.compasscalendar.com |
1415

@@ -127,3 +128,19 @@ Secrets and variables are split between repository level (shared across workflow
127128
| `BACKEND_API_URL` | Staging backend API URL |
128129
| `FRONTEND_URL` | Staging frontend URL |
129130
| `GOOGLE_CLIENT_ID` | OAuth client ID |
131+
132+
---
133+
134+
## Production Deploy
135+
136+
Source: [`.github/workflows/deploy-production.yml`](../../.github/workflows/deploy-production.yml)
137+
138+
Production deploys are manual-only. Run `Deploy production` from GitHub Actions
139+
with an existing release tag, such as `v1.2.3`; it is not called by
140+
`release-on-main.yml` and does not run automatically after PR merges.
141+
142+
The workflow deploys to the GitHub `production` environment through
143+
`_deploy-environment.yml`, builds an environment-specific web image tagged
144+
`switchbacktech/compass-web:production-<version>`, then runs
145+
`deploy-health-check.yml` with the `cloud` profile. Production is expected to use
146+
external MongoDB and SuperTokens Cloud rather than self-hosted data services.

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: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ E2E workflow (`test-e2e.yml`) is separate and runs on pull requests to `main` vi
4545
## Current Test Strategy
4646

4747
- `bun run test:core` uses `bun test` with a small compatibility preload for the core BSON mock setup.
48-
- `bun run test:web`, `bun run test:backend`, and `bun run test:scripts` intentionally retain the existing Jest harness while their hoist-heavy module-mocking patterns are migrated.
49-
- `bun run test:<project>` is the stable CI-facing entrypoint for every package; the root dispatcher chooses the correct runner per project.
48+
- `bun run test:web` runs `bun test --cwd packages/web` directly. Web tests should be isolated enough to run in one Bun process without batching.
49+
- `bun run test:backend` and `bun run test:scripts` intentionally retain the existing Jest harness while their hoist-heavy module-mocking patterns are migrated.
5050

5151
## Retained Jest Layout
5252

@@ -116,6 +116,14 @@ Avoid:
116116
- implementation-detail assertions
117117
- unnecessary module-wide mocks
118118

119+
Isolation rules:
120+
121+
- Do not use top-level `mock.module` for shared production modules unless the test imports the subject through a local factory and the mock cannot affect later files. Prefer provider wrappers, real stores, explicit dependency factories, or `spyOn` with teardown.
122+
- Avoid mocking shared UI primitives such as `TooltipWrapper`, `@floating-ui/react`, or session hooks in broad component tests. A mock that only helps one file can change unrelated tests later in the same Bun process.
123+
- If a test replaces globals (`fetch`, `document.getElementById`, storage, timers, console methods), restore the original value in teardown.
124+
- Prefer `renderWithStore`, `createStoreWrapper`, or a focused provider harness over mocking `@web/store` or `store.hooks`.
125+
- `bun test --cwd packages/web` is the acceptance check for web test isolation. A focused test can pass while still leaking into the direct suite.
126+
119127
### Web Jest Harness Defaults (MSW + Globals)
120128

121129
Primary setup files:
@@ -182,7 +190,6 @@ Files:
182190
- `packages/web/src/common/hooks/useSidebarState.ts`
183191
- `packages/web/src/views/Day/components/ShortcutsSidebar/ShortcutsSidebar.tsx`
184192
- `packages/web/src/views/Day/view/DayViewContent.tsx`
185-
- `packages/web/src/views/Now/view/NowView.tsx`
186193

187194
Reliable setup pattern:
188195

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.

0 commit comments

Comments
 (0)