Add Windows 1.0 screenshots to website#102
Conversation
|
Warning Review limit reached
Next review available in: 9 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (16)
📝 WalkthroughWalkthroughThis PR promotes Windows from beta to a stable release across i18n copy, docs pages, and layout components, and introduces a shared landing-platform detection/selection hook consumed by hero, features, and premium-features components to render platform-specific screenshots. Windows docs content pages gain embedded screenshots, and tests/mockup copy are updated accordingly. ChangesLanding Platform Detection and Screenshot Wiring
Windows Beta-to-Stable Release Rollout
Estimated code review effort: 3 (Moderate) | ~30 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/pages/docs/_ios.tsx (1)
56-56: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse a literal apostrophe in this string.
don'tis inside a JavaScript string literal here, so React will render the entity text instead ofdon't.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/pages/docs/_ios.tsx` at line 56, The string in the iOS docs copy uses an HTML entity inside a JavaScript string literal, so it should be changed to a literal apostrophe. Update the conditional text in the _ios page component where the English fallback string is defined, and keep the same wording but replace the escaped entity with the actual apostrophe character in the rendered string.
🧹 Nitpick comments (5)
src/pages/[locale]/docs/windows/api.astro (1)
18-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRelease copy duplicated verbatim across five pages.
The same
releaseTitle/releaseDescriptionpair ("Windows is a stable desktop release." / German equivalent) is hardcoded identically inapi.astro,features.astro,index.astro,installation.astro, andprofiles.astro. Since this PR's sibling cohort already centralizes other copy insrc/i18n/locales/*/docs/common.json, consider sourcing this shared release messaging from the i18n JSON as well to avoid five-way drift on future wording changes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/pages/`[locale]/docs/windows/api.astro around lines 18 - 27, The shared Windows release copy is duplicated across multiple docs pages, so centralize the repeated release messaging in the i18n docs copy instead of hardcoding it in each page. Update the Windows docs page logic in api.astro and the related sibling pages (features.astro, index.astro, installation.astro, profiles.astro) to read releaseTitle and releaseDescription from the shared docs/common.json locale data, keeping the page-specific title/description separate.src/pages/[locale]/docs/windows/index.astro (1)
69-74: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winConsider explicit dimensions to prevent layout shift.
The
Screenshotcomponent only acceptssrc/alt/className/loading— nowidth/height. Since the verification notes confirm assets are fixed at 1240×800, adding intrinsic dimensions (or anaspect-ratioutility class) would prevent CLS while the image loads, especially since this one usesloading="eager"above the fold.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/pages/`[locale]/docs/windows/index.astro around lines 69 - 74, The Windows docs page screenshot needs explicit sizing to avoid layout shift. In the Astro page that renders the Screenshot component, add a fixed intrinsic size approach using the known 1240×800 asset dimensions or an aspect-ratio-based class, since Screenshot only supports src, alt, className, and loading. Update the screenshot usage in the docs Windows page so the above-the-fold image reserves space before load while keeping the existing Screenshot component API unchanged.src/hooks/use-landing-platform.ts (1)
31-96: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftConsider adding unit tests for the selection/sync state machine.
useLandingPlatformSelectionanduseSyncedLandingPlatformencode non-trivial branching (auto-detect vs. user override vs. document/CustomEvent-based cross-island sync). This logic is shared across Hero, Features, and PremiumFeatures, so a regression here silently breaks platform-aware screenshots everywhere. Given there's no existing test file for this hook, consider addingrenderHook-based tests (jsdom supportsdocument/window/CustomEvent) covering: initial detection, user override freezing auto-sync, and event-driven sync between two hook instances.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/hooks/use-landing-platform.ts` around lines 31 - 96, The platform selection/sync logic in useLandingPlatformSelection and useSyncedLandingPlatform has several branches that should be protected by tests. Add renderHook-based unit tests for these hooks covering initial auto-detection, user override preventing later detectedPlatform changes from replacing the chosen value, and cross-instance synchronization via the landingPlatformEvent CustomEvent/document state path. Use the hook names and landingPlatformEvent to locate the behavior under test.src/pages/[locale]/index.astro (1)
50-51: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winConsider
client:visibleinstead ofclient:loadfor below-the-fold sections.
FeaturesandPremiumFeaturesrender afterTrustStrip/HowItWorks, so they're typically below the fold.client:loadhydrates them immediately alongsideHero, competing for main-thread/JS-payload budget on initial page load. SinceuseSyncedLandingPlatformreads the current platform fromdocument.documentElement.dataset.landingPlatformsynchronously on mount (not just via theCustomEvent), deferring hydration withclient:visibleshould still resolve the correct platform by the time a user scrolls to these sections, while reducing eager JS work at first paint.♻️ Proposed change
- <Features locale={locale} client:load /> - <PremiumFeatures locale={locale} client:load /> + <Features locale={locale} client:visible /> + <PremiumFeatures locale={locale} client:visible />🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/pages/`[locale]/index.astro around lines 50 - 51, The `Features` and `PremiumFeatures` islands in the landing page are hydrated too eagerly with `client:load` even though they are below the fold; switch both to `client:visible` so `src/pages/[locale]/index.astro` defers their hydration until scrolled into view. Keep `useSyncedLandingPlatform` behavior in mind: it reads `document.documentElement.dataset.landingPlatform` on mount, so delayed hydration will still pick up the correct platform when these components become visible.src/components/landing/features.tsx (1)
46-68: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTighten the screenshot map's typing and dedupe the iOS/mac entries; consider centralizing across files.
Two related concerns here:
Record<LandingPlatform, Record<string, string>>doesn't guarantee every platform defines the same set of feature keys. A typo or a future feature addition to one platform but not another would compile fine yet returnundefinedsilently at runtime (surfacing as a broken<img src>). A key union type would catch this at compile time.ios(Lines 61-67) is a byte-for-byte duplicate ofmac(Lines 47-53). If the mac paths change later, it's easy to forget to update the iOS placeholder in lockstep.Additionally, the same literal screenshot paths (
/screenshots/windows/dashboard.png,/screenshots/mac/home.png) are also hardcoded independently inhero.tsx(Lines 71-74) andpremium-features.tsx(Lines 55-57). Consolidating this mapping into a shared module would prevent drift across the three consumers.♻️ Proposed refactor
-const screenshotByPlatform: Record<LandingPlatform, Record<string, string>> = { - mac: { - private: "/screenshots/mac/home.png", - dictation: "/screenshots/mac/recording.png", - prompts: "/screenshots/mac/workflows.png", - profiles: "/screenshots/mac/plugins.png", - transcription: "/screenshots/mac/file-transcription.png", - }, - windows: { - private: "/screenshots/windows/dashboard.png", - dictation: "/screenshots/windows/dictation.png", - prompts: "/screenshots/windows/workflows.png", - profiles: "/screenshots/windows/integrations-installed.png", - transcription: "/screenshots/windows/file-transcription.png", - }, - ios: { - private: "/screenshots/mac/home.png", - dictation: "/screenshots/mac/recording.png", - prompts: "/screenshots/mac/workflows.png", - profiles: "/screenshots/mac/plugins.png", - transcription: "/screenshots/mac/file-transcription.png", - }, -}; +type FeatureScreenshotKey = + | "private" + | "dictation" + | "prompts" + | "profiles" + | "transcription"; + +const macScreenshots: Record<FeatureScreenshotKey, string> = { + private: "/screenshots/mac/home.png", + dictation: "/screenshots/mac/recording.png", + prompts: "/screenshots/mac/workflows.png", + profiles: "/screenshots/mac/plugins.png", + transcription: "/screenshots/mac/file-transcription.png", +}; + +const screenshotByPlatform: Record<LandingPlatform, Record<FeatureScreenshotKey, string>> = { + mac: macScreenshots, + windows: { + private: "/screenshots/windows/dashboard.png", + dictation: "/screenshots/windows/dictation.png", + prompts: "/screenshots/windows/workflows.png", + profiles: "/screenshots/windows/integrations-installed.png", + transcription: "/screenshots/windows/file-transcription.png", + }, + ios: macScreenshots, +};🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/landing/features.tsx` around lines 46 - 68, The screenshot mapping in screenshotByPlatform is too loosely typed and the iios entry duplicates mac exactly. Tighten the type by using a shared feature-key union instead of Record<string, string> so missing or misspelled feature keys are caught at compile time, and replace the duplicated iOS/mac literals with a shared source or alias. Also consider centralizing the screenshot path mapping used by features.tsx, hero.tsx, and premium-features.tsx into one module to keep platform screenshots in sync.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/i18n/locales/de/landing.json`:
- Around line 21-22: The German locale entry for the macOS stage label is still
using the English wording, so update the `hero.platformTabs.stage.mac` string in
the landing translations to a localized German form consistent with the other
stage labels, such as a natural German ordering like `1.5 Stabil`. Keep the
change in the same translation group as `hero.platformTabs.stage.windows` so the
`landing.json` locale entries stay aligned.
In `@src/pages/`[locale]/docs/windows/index.astro:
- Around line 57-64: The ReleaseStageNotice label is not localized for German
visitors because releaseStage="stable" ultimately maps through DocsLayout to
ReleaseStageNotice, where toneMap.stable.value is hardcoded to English. Update
ReleaseStageNotice so the stable label comes from locale-aware copy instead of a
fixed "Stable" string, and make sure the Windows docs pages that pass
releaseStage="stable" continue to render the localized banner text consistently
with their inline badge.
---
Outside diff comments:
In `@src/pages/docs/_ios.tsx`:
- Line 56: The string in the iOS docs copy uses an HTML entity inside a
JavaScript string literal, so it should be changed to a literal apostrophe.
Update the conditional text in the _ios page component where the English
fallback string is defined, and keep the same wording but replace the escaped
entity with the actual apostrophe character in the rendered string.
---
Nitpick comments:
In `@src/components/landing/features.tsx`:
- Around line 46-68: The screenshot mapping in screenshotByPlatform is too
loosely typed and the iios entry duplicates mac exactly. Tighten the type by
using a shared feature-key union instead of Record<string, string> so missing or
misspelled feature keys are caught at compile time, and replace the duplicated
iOS/mac literals with a shared source or alias. Also consider centralizing the
screenshot path mapping used by features.tsx, hero.tsx, and premium-features.tsx
into one module to keep platform screenshots in sync.
In `@src/hooks/use-landing-platform.ts`:
- Around line 31-96: The platform selection/sync logic in
useLandingPlatformSelection and useSyncedLandingPlatform has several branches
that should be protected by tests. Add renderHook-based unit tests for these
hooks covering initial auto-detection, user override preventing later
detectedPlatform changes from replacing the chosen value, and cross-instance
synchronization via the landingPlatformEvent CustomEvent/document state path.
Use the hook names and landingPlatformEvent to locate the behavior under test.
In `@src/pages/`[locale]/docs/windows/api.astro:
- Around line 18-27: The shared Windows release copy is duplicated across
multiple docs pages, so centralize the repeated release messaging in the i18n
docs copy instead of hardcoding it in each page. Update the Windows docs page
logic in api.astro and the related sibling pages (features.astro, index.astro,
installation.astro, profiles.astro) to read releaseTitle and releaseDescription
from the shared docs/common.json locale data, keeping the page-specific
title/description separate.
In `@src/pages/`[locale]/docs/windows/index.astro:
- Around line 69-74: The Windows docs page screenshot needs explicit sizing to
avoid layout shift. In the Astro page that renders the Screenshot component, add
a fixed intrinsic size approach using the known 1240×800 asset dimensions or an
aspect-ratio-based class, since Screenshot only supports src, alt, className,
and loading. Update the screenshot usage in the docs Windows page so the
above-the-fold image reserves space before load while keeping the existing
Screenshot component API unchanged.
In `@src/pages/`[locale]/index.astro:
- Around line 50-51: The `Features` and `PremiumFeatures` islands in the landing
page are hydrated too eagerly with `client:load` even though they are below the
fold; switch both to `client:visible` so `src/pages/[locale]/index.astro` defers
their hydration until scrolled into view. Keep `useSyncedLandingPlatform`
behavior in mind: it reads `document.documentElement.dataset.landingPlatform` on
mount, so delayed hydration will still pick up the correct platform when these
components become visible.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3b9b5904-d81e-406b-9614-9145fa87852a
⛔ Files ignored due to path filters (36)
public/screenshots/de/windows/about.pngis excluded by!**/*.pngpublic/screenshots/de/windows/advanced.pngis excluded by!**/*.pngpublic/screenshots/de/windows/appearance.pngis excluded by!**/*.pngpublic/screenshots/de/windows/dashboard.pngis excluded by!**/*.pngpublic/screenshots/de/windows/dictation.pngis excluded by!**/*.pngpublic/screenshots/de/windows/dictionary.pngis excluded by!**/*.pngpublic/screenshots/de/windows/file-transcription.pngis excluded by!**/*.pngpublic/screenshots/de/windows/general.pngis excluded by!**/*.pngpublic/screenshots/de/windows/history.pngis excluded by!**/*.pngpublic/screenshots/de/windows/integrations-installed.pngis excluded by!**/*.pngpublic/screenshots/de/windows/integrations-marketplace.pngis excluded by!**/*.pngpublic/screenshots/de/windows/license.pngis excluded by!**/*.pngpublic/screenshots/de/windows/premium-active.pngis excluded by!**/*.pngpublic/screenshots/de/windows/premium-required.pngis excluded by!**/*.pngpublic/screenshots/de/windows/recorder.pngis excluded by!**/*.pngpublic/screenshots/de/windows/shortcuts.pngis excluded by!**/*.pngpublic/screenshots/de/windows/snippets.pngis excluded by!**/*.pngpublic/screenshots/de/windows/workflows.pngis excluded by!**/*.pngpublic/screenshots/en/windows/about.pngis excluded by!**/*.pngpublic/screenshots/en/windows/advanced.pngis excluded by!**/*.pngpublic/screenshots/en/windows/appearance.pngis excluded by!**/*.pngpublic/screenshots/en/windows/dashboard.pngis excluded by!**/*.pngpublic/screenshots/en/windows/dictation.pngis excluded by!**/*.pngpublic/screenshots/en/windows/dictionary.pngis excluded by!**/*.pngpublic/screenshots/en/windows/file-transcription.pngis excluded by!**/*.pngpublic/screenshots/en/windows/general.pngis excluded by!**/*.pngpublic/screenshots/en/windows/history.pngis excluded by!**/*.pngpublic/screenshots/en/windows/integrations-installed.pngis excluded by!**/*.pngpublic/screenshots/en/windows/integrations-marketplace.pngis excluded by!**/*.pngpublic/screenshots/en/windows/license.pngis excluded by!**/*.pngpublic/screenshots/en/windows/premium-active.pngis excluded by!**/*.pngpublic/screenshots/en/windows/premium-required.pngis excluded by!**/*.pngpublic/screenshots/en/windows/recorder.pngis excluded by!**/*.pngpublic/screenshots/en/windows/shortcuts.pngis excluded by!**/*.pngpublic/screenshots/en/windows/snippets.pngis excluded by!**/*.pngpublic/screenshots/en/windows/workflows.pngis excluded by!**/*.png
📒 Files selected for processing (67)
public/screenshots/de/windows/about.webppublic/screenshots/de/windows/advanced.webppublic/screenshots/de/windows/appearance.webppublic/screenshots/de/windows/dashboard.webppublic/screenshots/de/windows/dictation.webppublic/screenshots/de/windows/dictionary.webppublic/screenshots/de/windows/file-transcription.webppublic/screenshots/de/windows/general.webppublic/screenshots/de/windows/history.webppublic/screenshots/de/windows/integrations-installed.webppublic/screenshots/de/windows/integrations-marketplace.webppublic/screenshots/de/windows/license.webppublic/screenshots/de/windows/premium-active.webppublic/screenshots/de/windows/premium-required.webppublic/screenshots/de/windows/recorder.webppublic/screenshots/de/windows/shortcuts.webppublic/screenshots/de/windows/snippets.webppublic/screenshots/de/windows/workflows.webppublic/screenshots/en/windows/about.webppublic/screenshots/en/windows/advanced.webppublic/screenshots/en/windows/appearance.webppublic/screenshots/en/windows/dashboard.webppublic/screenshots/en/windows/dictation.webppublic/screenshots/en/windows/dictionary.webppublic/screenshots/en/windows/file-transcription.webppublic/screenshots/en/windows/general.webppublic/screenshots/en/windows/history.webppublic/screenshots/en/windows/integrations-installed.webppublic/screenshots/en/windows/integrations-marketplace.webppublic/screenshots/en/windows/license.webppublic/screenshots/en/windows/premium-active.webppublic/screenshots/en/windows/premium-required.webppublic/screenshots/en/windows/recorder.webppublic/screenshots/en/windows/shortcuts.webppublic/screenshots/en/windows/snippets.webppublic/screenshots/en/windows/workflows.webpsrc/components/docs/release-stage-notice.astrosrc/components/landing/features.tsxsrc/components/landing/hero.tsxsrc/components/landing/premium-features.tsxsrc/components/layout/footer.astrosrc/components/use-cases/mockups/chat-mockup.tsxsrc/components/use-cases/mockups/meeting-mockup.tsxsrc/hooks/use-landing-platform.tssrc/i18n/locales/de/common.jsonsrc/i18n/locales/de/docs/common.jsonsrc/i18n/locales/de/landing.jsonsrc/i18n/locales/de/pricing.jsonsrc/i18n/locales/de/support.jsonsrc/i18n/locales/en/common.jsonsrc/i18n/locales/en/docs/common.jsonsrc/i18n/locales/en/landing.jsonsrc/i18n/locales/en/pricing.jsonsrc/i18n/locales/en/support.jsonsrc/pages/[locale]/docs/index.astrosrc/pages/[locale]/docs/windows/api.astrosrc/pages/[locale]/docs/windows/features.astrosrc/pages/[locale]/docs/windows/index.astrosrc/pages/[locale]/docs/windows/installation.astrosrc/pages/[locale]/docs/windows/profiles.astrosrc/pages/[locale]/index.astrosrc/pages/[locale]/release-status.astrosrc/pages/docs/_ios.tsxsrc/pages/docs/windows/_features.tsxsrc/pages/docs/windows/_installation.tsxsrc/pages/docs/windows/_profiles.tsxtests/download-routing.spec.ts
Summary
Verification
Summary by CodeRabbit
New Features
Bug Fixes
Documentation