Skip to content

feat(pro): Day and Notifications live on Windows - #74

Open
Anurag-Wednesday wants to merge 1 commit into
mainfrom
feat/win-pro-day-notifications
Open

feat(pro): Day and Notifications live on Windows#74
Anurag-Wednesday wants to merge 1 commit into
mainfrom
feat/win-pro-day-notifications

Conversation

@Anurag-Wednesday

Copy link
Copy Markdown
Collaborator

Fifth and sixth Pro features on Windows, clubbed into one PR. Core-only again — neither needs a pro-side change.

Why these two ship together

proactive.ts builds its notifications from getDayPlan / getEventPrep (both from ahead.ts) plus listUpcomingEvents. Porting Notifications alone would have lit up an empty surface on Windows. Day produces the content; Notifications delivers it.

Audit

A sweep for osascript|process.platform|darwin|win32|pgrep|pkill|execFile|spawn returns zero hits across all thirteen files on the two paths:

day.ts, day-layout.ts, ahead.ts, ahead-heuristics.ts, calendar.ts, DayView.tsx, TodoCard.tsx, notify.ts, proactive.ts, proactive-window.ts, NotificationList.tsx, notification-target.ts, notification-routing.ts

No Mac / macOS / Cmd / Option copy in any of those surfaces or in either catalog entry, so no neutralization was needed.

  • Day's two data sources both work on Windows now: the calendar comes from connectors (HTTP), and the activity half reads observations, which Replay's port put there.
  • Notification delivery is Electron's Notification guarded by isSupported(), and core already calls setAppUserModelId (index.ts:301) — which Windows requires for a toast to appear at all. That prerequisite was already met.

The landing-screen landmine, fixed

Day forced this. App.tsx opened on:

const [viewMode, setViewMode] = useState<ViewMode>(isPro && isMac() ? 'day' : 'models')

A platform decision living outside the capability seam. It was right only by accident — it agreed with the catalog while Day was macOS-only. The moment Day is ported, nav and gating light it up from platforms while the landing screen still asks isMac(), so a Pro Windows user would be stranded on Models with no test catching it.

The decision moves into proCatalog.ts as a pure landingView(platform, isPro), beside the seam it reads. App.tsx no longer imports isMac.

Tests

WIN_PORTED gains day + notifications, deriving eight assertions from the parameterized suite. Plus a new five-case landingView describe:

  • the stranded-Day regression guard: landingView('win32', true) must be 'day' — the old isMac rule returns 'models'
  • the other half: linux/unknown must be 'models', so it isn't "any non-Mac gets Day" either
  • a DRY case asserting landingView agrees with the day feature's own platforms list on every platform, rather than re-hardcoding it

Verified the guard bites by reverting landingView to the old rule: 2 tests fail.

Verification

Test Files  377 passed | 2 skipped (379)
     Tests  3169 passed | 4 skipped (3173)

Node + web + pro typechecks clean. ESLint 0 new errors (App.tsx's 9 are pre-existing — identical count on main, confirmed by stashing).

E2E on this branch: 73 passed / 1 failed / 6 skipped. The single failure is settings-sections.spec.ts:124 "resource mode survives a relaunch" — a pre-existing core bug on main, unreachable from this change, root-caused and fixed in #73.

With #73 cherry-picked on top, the full suite is 74 passed / 0 failed. So this branch introduces no e2e regression, and the two together are completely green on a real display.

Notes for review

  • Branched off main, not stacked on feat(pro): Reflect live on Windows #72 (Reflect), per the working agreement — these are independent. Both edit the WIN_PORTED set line, so whichever merges second resolves that one line to the union. Trivial, but expected.
  • platforms is a renderer-only gate. pro/main/index.ts and pro/main/services.ts have zero platform references, so every Pro feature's backend already runs on Windows — only the UI is dark. That is why these ports keep coming out core-only.

Windows verification asked for

  • Day needs Google calendar connectors configured on the Windows box. Confirm the calendar surface populates, per-meeting prep renders, and the activity half (reading observations) is non-empty.
  • Confirm a Pro Windows user now lands on Day instead of Models.
  • Notifications: confirm a Windows toast actually appears — the morning briefing fires once per day after 6am, so it may need a clock nudge or a seeded run — and that clicking it routes to the right surface.

🤖 Generated with Claude Code

https://claude.ai/code/session_015U3TnnNULxfCb4TsjAGjiC

Two features in one PR because Notifications has no content without Day:
proactive.ts builds its notifications from getDayPlan / getEventPrep (both
from ahead.ts) plus listUpcomingEvents, so porting Notifications alone would
have lit up an empty surface on Windows.

Neither needs a pro-side change. A sweep for
osascript|process.platform|darwin|win32|pgrep|pkill|execFile|spawn returns
zero hits across day.ts, day-layout.ts, ahead.ts, ahead-heuristics.ts,
calendar.ts, DayView.tsx, TodoCard.tsx, notify.ts, proactive.ts,
proactive-window.ts, NotificationList.tsx, notification-target.ts and
notification-routing.ts. No Mac/macOS/Cmd/Option copy in any of those surfaces
or in either catalog entry, so no neutralization was needed.

Day's two data sources both work on Windows now: the calendar comes from
connectors (HTTP), and the activity half reads observations, which Replay's
port put there. Notification delivery is Electron's Notification guarded by
isSupported(), and core already calls setAppUserModelId (index.ts:301) - which
Windows REQUIRES for a toast to appear at all.

Also fixes the landing-screen landmine, which Day forced. App.tsx opened on
`isPro && isMac() ? 'day' : 'models'` - a platform decision living OUTSIDE the
capability seam. It was right only by accident: it agreed with the catalog
while Day was macOS-only, and would have stranded a ported Day on Windows,
with nav and gating lighting Day up from `platforms` while the landing screen
still asked isMac(). The decision moves into proCatalog as a pure
landingView(platform, isPro), so the landing screen can never disagree with
nav and gating again. App.tsx no longer imports isMac.

Tests: WIN_PORTED gains day + notifications, deriving eight assertions from
the parameterized suite. Plus a new five-case landingView describe, including
the stranded-Day regression guard (landingView('win32', true) must be 'day' -
the old isMac rule returns 'models') and a DRY case asserting landingView
agrees with the day feature's own platforms list on every platform. Verified
by reverting to the old rule: two tests fail.

Verified: npm test 3169 passed; node + web + pro typechecks clean; eslint 0 new
errors (App.tsx's 9 are pre-existing, identical count on main). e2e 73 passed /
1 failed, the one failure being settings-sections "resource mode survives a
relaunch" - a pre-existing core bug on main, fixed separately in #73 and not
reachable from this change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015U3TnnNULxfCb4TsjAGjiC
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Anurag-Wednesday, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c83a32f-3b4f-4e72-86ab-b35f323f9c36

📥 Commits

Reviewing files that changed from the base of the PR and between efcb0e9 and 2c78ba2.

📒 Files selected for processing (3)
  • src/renderer/src/App.tsx
  • src/renderer/src/components/pro/proCatalog.ts
  • src/renderer/src/lib/__tests__/proCatalog.lookup.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant