Skip to content

Updating theme of the website#436

Open
srinivaspendem wants to merge 4 commits intomasterfrom
new-theme
Open

Updating theme of the website#436
srinivaspendem wants to merge 4 commits intomasterfrom
new-theme

Conversation

@srinivaspendem
Copy link
Copy Markdown
Member

@srinivaspendem srinivaspendem commented Apr 23, 2026

Summary by CodeRabbit

  • New Features

    • Homepage redesigned with card-based layout and improved cards (link/description/CTA) and flexible column support.
    • Theme integration updated to surface a new variant and ensure sign-in CTA placement and dark-mode toggling behave consistently.
  • Style

    • Documentation theme refresh with updated visuals, spacing, and responsive layout improvements across breakpoints.
    • Navbar and sign-in styling refined for better alignment and interaction.
  • Chores

    • Editor, TypeScript, and dependency configuration updated for the docs workspace.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 23, 2026 11:55am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Warning

Rate limit exceeded

@srinivaspendem has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 26 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 26 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 92c86e6d-ac6d-49ea-8d4b-05c65e0b3cbf

📥 Commits

Reviewing files that changed from the base of the PR and between b9b7b89 and 6eede2d.

📒 Files selected for processing (2)
  • docs/.vitepress/config.ts
  • docs/.vitepress/theme/index.ts
📝 Walkthrough

Walkthrough

Migrates the docs site to the VoidZero VitePress theme, adds a custom Layout that forwards slots, enriches card and card-group components, relocates the sign-in CTA via runtime DOM logic, updates styles and TypeScript/VSCode configs, and restructures the homepage content to use inline components.

Changes

Cohort / File(s) Summary
VitePress Config
docs/.vitepress/config.ts
Export now uses extendConfig(config); theme variant set to "voidzero"; themeConfig.siteTitle set to "Plane"; sign-in nav entry updated (noIcon: true).
Theme Core & Boot
docs/.vitepress/theme/index.ts
Switched extension to @voidzero-dev/vitepress-theme (VoidZeroTheme); adds Layout; enhanceApp now delegates to VoidZeroTheme.enhanceApp?.(ctx), provides planeThemeContext, registers components via ctx.app, and implements sign-in CTA relocation, mutation/resize listeners, route-change handling, and dark-mode class sync.
Layout & Slot Forwarding
docs/.vitepress/theme/Layout.vue
Adds custom Layout wrapping VoidZero Layout, captures slots via useSlots(), computes and forwards named slots with bound props, and exposes local <slot> fallbacks.
Theme Components
docs/.vitepress/theme/components/Card.vue, docs/.vitepress/theme/components/CardGroup.vue
Card.vue adds link, description, cta props and conditional rendering of <a> vs <div>, computed resolvedHref, conditional description/slot fallback, CTA label and updated icon stroke; CardGroup.vue adds columns alias for cols and uses computed columnCount.
Styling
docs/.vitepress/theme/style.css
Replaces direct Tailwind imports with centralized VoidZero stylesheet; scopes .hidden helper; introduces .home-feature-cards styles, revamped navbar/search/sign-in styling, and responsive doc layout adjustments (media queries, sidebar/aside tweaks).
Content
docs/index.md
Homepage layout changed from home to doc; removed YAML hero/features; content reworked to inline header, intro links, and <CardGroup>/<Card> usage with icon name strings and cta fields.
Types & TS Config
docs/.vitepress/types/modules.d.ts, tsconfig.json
Adds *.vue and vitepress-plugin-tabs/client module declarations; switches TS moduleResolution to node; adjusts types to include Node and VitePress client; updates project include to docs/.vitepress/**.
Editor & Package
.vscode/settings.json, package.json
Adds VSCode settings to ignore unknown at-rules for CSS/SCSS/LESS; adds runtime dependency @voidzero-dev/vitepress-theme and dev dependency @types/node.

Sequence Diagram(s)

sequenceDiagram
  participant App as VitePress App
  participant Theme as VoidZeroTheme
  participant Layout as Plane Layout (Slot Forwarder)
  participant DOM as Document (Navbar/Sign-in)
  participant Router as Router

  App->>Theme: enhanceApp(ctx)
  Theme->>App: registers components & provides planeThemeContext
  App->>Layout: mount Layout (after tabs render)
  Layout->>DOM: querySelector('.docs-layout') -> find sign-in element
  Layout->>DOM: relocate sign-in CTA to right utility area
  Note right of DOM: MutationObserver & resize listener installed
  Router->>Layout: on route change -> trigger relocate
  DOM->>Layout: header mutations -> trigger debounce relocate
  Layout->>DOM: on unmount -> remove observers/listeners
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I hopped through slots and styled the land,
I nudged the sign-in with a gentle hand,
Cards learned new words — link, cta, and more,
A VoidZero tune upon Plane's door,
I leave a tiny paw-print on the docs' bright floor. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Updating theme of the website' accurately describes the main change: migrating from DefaultTheme to VoidZeroTheme across configuration, components, styles, and dependencies.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch new-theme

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/.vitepress/theme/components/Card.vue (1)

1-1: ⚠️ Potential issue | 🟡 Minor

Fix the formatting failure before merge.

CI reports oxfmt --check failures for this file; please run pnpm fix:format and confirm pnpm check:format passes. As per coding guidelines, Run pnpm fix:format before committing and ensure CI check via pnpm check:format passes; formatting is enforced.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/.vitepress/theme/components/Card.vue` at line 1, CI flagged a formatting
error in docs/.vitepress/theme/components/Card.vue; run the project's formatter
and commit the result by running the repository scripts to fix and verify
formatting (execute pnpm fix:format then pnpm check:format) and ensure the
updated Card.vue (the <script setup> block) is saved/committed so the CI oxfmt
--check passes.
package.json (1)

31-35: ⚠️ Potential issue | 🟠 Major

Align Node typings with the declared runtime floor.

@types/node is pinned to version 25 major, but engines.node specifies >=24.0.0. This mismatch allows Node 25-only APIs to pass type-checking while failing at runtime on Node 24. Align the versions by using Node 24 typings or raising the minimum Node version.

Proposed fix
-    "@types/node": "^25.6.0",
+    "@types/node": "^24.0.0",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 31 - 35, The `@types/node` dev dependency (symbol:
"@types/node") does not match the declared runtime floor (symbol:
"engines.node"), causing potential type-checks for Node 25 APIs while the
runtime may be Node 24; fix by either downgrading "@types/node" to a 24.x major
(e.g., "^24.0.0") to match "engines.node": ">=24.0.0" or by raising
"engines.node" to ">=25.0.0" so it aligns with the installed "@types/node"
major—update package.json accordingly and run a reinstall/type-check to verify
no new type/runtime mismatches remain.
🧹 Nitpick comments (2)
docs/.vitepress/theme/index.ts (1)

129-139: Verify slot forwarding behavior with VoidZeroTheme defaults.

The Layout.vue file uses useSlots() with Object.keys(slots) to forward slots, which only forwards slots the parent actively provides. If VoidZeroTheme.Layout has default content for slots like home-hero-before that aren't explicitly overridden, those defaults won't render. Test with a commonly-used VoidZero slot to confirm the theme's default fallbacks still appear when not overridden, or explicitly enumerate known slots from the base theme to ensure all expected defaults are preserved.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/.vitepress/theme/index.ts` around lines 129 - 139, The Layout
enhancement currently forwards only slots provided by the parent (via
useSlots/Object.keys) and can suppress VoidZeroTheme's default slot content
(e.g., home-hero-before); update enhanceApp/Layout handling to ensure theme
defaults are preserved by forwarding either the full list of known VoidZeroTheme
slots or delegating slot forwarding to VoidZeroTheme.Layout: locate the Layout
component and its slot forwarding logic (referencing Layout and VoidZeroTheme),
then replace Object.keys(slots) usage with an explicit array of base-theme slot
names (include commonly used names such as "home-hero-before",
"home-hero-after", etc.) or call through to VoidZeroTheme.Layout's slot
resolution so default content in the base theme still appears when parents don’t
override those slots.
docs/.vitepress/theme/style.css (1)

699-709: CSS selectors unnecessarily couple to Tailwind utility class names.

The rules targeting a[href="/"].flex.flex-col and img.h-4 will silently break if the upstream @voidzero-dev/vitepress-theme (currently ^4.8.4) changes how it renders the OSSHeader logo markup—for instance, swapping flex-col for flex-row or h-4 for a different size utility. No build-time error signals the breakage.

Consider requesting stable customization hooks from the theme (e.g., a custom class or data-* attribute on the logo container), or refactor these rules to target only header a[href="/"] and override flex-direction/height without depending on the presence of specific utility classes. If the theme provides no documented override point, this workaround may be necessary for now.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/.vitepress/theme/style.css` around lines 699 - 709, The CSS selectors
a[href="/"].flex.flex-col and img.h-4 are too tightly coupled to upstream
Tailwind utilities and will break if the theme changes those classes; update the
selectors to target only the stable elements (e.g., header a[href="/"] and
header a[href="/"] img) and apply the needed overrides (flex-direction,
align-items, gap, height) without relying on .flex .flex-col or .h-4; if the
theme exposes a stable hook (class or data-*), switch selectors to that hook
instead and document the change so OSSHeader styling is resilient to
markup/utility-class changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/.vitepress/theme/components/Card.vue`:
- Line 18: The computed resolvedHref currently falls back to "#" which makes
non-link cards act like anchors; change the computed (resolvedHref) to return
null/undefined when neither props.link nor props.href are provided, and update
the template logic that renders the card (where an anchor element is used) to
render a non-anchor wrapper (e.g., a div/button or plain element) when
resolvedHref is falsy; ensure you reference props.link and props.href in the new
computed and adjust the conditional rendering used around the anchor (the same
spots that currently use resolvedHref) so informational cards are not clickable
nor navigate to "#" anymore.

In `@docs/.vitepress/theme/index.ts`:
- Around line 97-127: The relocation logic in moveSignInToUtilityArea is
race-prone and brittle (first-paint, header re-renders, selector changes);
update it to reliably relocate the sign-in link by observing the header DOM
until the target appears: use a MutationObserver on the header (or a short retry
loop) to look for the sign-in anchor and the appearance/extra menu elements,
perform the insertBefore and add the "sign-in-relocated" class once, then
disconnect the observer; also add a debounced window resize handler to re-run
the relocation with a guard to avoid repeated work, and emit a console.warn when
the function bails because selectors are not found so regressions are visible
(reference moveSignInToUtilityArea, ".sign-in-relocated", and the
appearance/extra menu selectors).
- Around line 132-139: The call to VoidZeroTheme.enhanceApp is currently invoked
directly in enhanceApp(ctx) and can throw if that method is undefined in future
versions; change the call to use optional chaining
(VoidZeroTheme.enhanceApp?.(ctx)) to guard against undefined, and optionally
move ctx.app.provide(themeContextKey, planeThemeContext) to after the
VoidZeroTheme.enhanceApp?.(ctx) call so the child theme's provided value cannot
be overwritten by the base theme; update the enhanceApp function accordingly
(refer to enhanceApp, VoidZeroTheme.enhanceApp, ctx.app.provide,
themeContextKey, planeThemeContext).

In `@docs/.vitepress/theme/style.css`:
- Around line 749-753: The CSS rule .docs-layout header
.VPLink[href*="sign-in"]:not(.sign-in-relocated) currently hides the Sign-in
link for no-JS or failed-JS cases; update the relocation flow so the link is
visible by default and only hidden while awaiting relocation: either (A) add an
initial "not-yet-relocated" marker class to the Sign-in element server-side or
from your startup JS and have moveSignInToUtilityArea() remove that marker and
add .sign-in-relocated, or (B) narrow the CSS selector to target only the
in-menu container (e.g., scope to .VPNavBarMenu
.VPLink[href*="sign-in"]:not(.sign-in-relocated)) so the link remains reachable
if relocation fails; modify the code that manipulates .sign-in-relocated in
index.ts (moveSignInToUtilityArea) accordingly.
- Around line 612-616: The selector uses the Vue SFC scoped-styles pseudo-class
:deep which is invalid in a global CSS file; update the rule targeting .vp-doc
.home-feature-cards .card-icon :deep(svg) to target the SVG directly (remove the
:deep wrapper) so the browser sees a valid selector and keep the
width/height/flex-shrink declarations for the svg element.

In `@docs/index.md`:
- Line 1: The repo-wide formatting failed for docs/index.md; run the project
formatter and checks: execute pnpm fix:format to apply oxfmt formatting changes
to docs/index.md, commit the updated file, and verify pnpm check:format passes
in your local CI; ensure you do not modify content beyond formatting and include
the formatted docs/index.md in the same commit so the CI oxfmt --check will
succeed.
- Line 11: The H1 currently includes the tagline ("# Plane Documentation Plan,
track, and ship your work with Plane.") — split them by making the H1 just the
title (e.g., "# Plane Documentation") and move the tagline ("Plan, track, and
ship your work with Plane.") into its own body paragraph directly under the H1
in docs/index.md so the heading and tagline render separately.

---

Outside diff comments:
In `@docs/.vitepress/theme/components/Card.vue`:
- Line 1: CI flagged a formatting error in
docs/.vitepress/theme/components/Card.vue; run the project's formatter and
commit the result by running the repository scripts to fix and verify formatting
(execute pnpm fix:format then pnpm check:format) and ensure the updated Card.vue
(the <script setup> block) is saved/committed so the CI oxfmt --check passes.

In `@package.json`:
- Around line 31-35: The `@types/node` dev dependency (symbol: "@types/node") does
not match the declared runtime floor (symbol: "engines.node"), causing potential
type-checks for Node 25 APIs while the runtime may be Node 24; fix by either
downgrading "@types/node" to a 24.x major (e.g., "^24.0.0") to match
"engines.node": ">=24.0.0" or by raising "engines.node" to ">=25.0.0" so it
aligns with the installed "@types/node" major—update package.json accordingly
and run a reinstall/type-check to verify no new type/runtime mismatches remain.

---

Nitpick comments:
In `@docs/.vitepress/theme/index.ts`:
- Around line 129-139: The Layout enhancement currently forwards only slots
provided by the parent (via useSlots/Object.keys) and can suppress
VoidZeroTheme's default slot content (e.g., home-hero-before); update
enhanceApp/Layout handling to ensure theme defaults are preserved by forwarding
either the full list of known VoidZeroTheme slots or delegating slot forwarding
to VoidZeroTheme.Layout: locate the Layout component and its slot forwarding
logic (referencing Layout and VoidZeroTheme), then replace Object.keys(slots)
usage with an explicit array of base-theme slot names (include commonly used
names such as "home-hero-before", "home-hero-after", etc.) or call through to
VoidZeroTheme.Layout's slot resolution so default content in the base theme
still appears when parents don’t override those slots.

In `@docs/.vitepress/theme/style.css`:
- Around line 699-709: The CSS selectors a[href="/"].flex.flex-col and img.h-4
are too tightly coupled to upstream Tailwind utilities and will break if the
theme changes those classes; update the selectors to target only the stable
elements (e.g., header a[href="/"] and header a[href="/"] img) and apply the
needed overrides (flex-direction, align-items, gap, height) without relying on
.flex .flex-col or .h-4; if the theme exposes a stable hook (class or data-*),
switch selectors to that hook instead and document the change so OSSHeader
styling is resilient to markup/utility-class changes.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: dcce00e2-11a6-4df6-982e-961846857dce

📥 Commits

Reviewing files that changed from the base of the PR and between dbacd6e and 781e2b9.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • .vscode/settings.json
  • docs/.vitepress/config.ts
  • docs/.vitepress/theme/Layout.vue
  • docs/.vitepress/theme/components/Card.vue
  • docs/.vitepress/theme/components/CardGroup.vue
  • docs/.vitepress/theme/index.ts
  • docs/.vitepress/theme/style.css
  • docs/.vitepress/types/modules.d.ts
  • docs/index.md
  • package.json
  • tsconfig.json

Comment thread docs/.vitepress/theme/components/Card.vue Outdated
Comment thread docs/.vitepress/theme/index.ts Outdated
Comment thread docs/.vitepress/theme/index.ts
Comment thread docs/.vitepress/theme/style.css Outdated
Comment thread docs/.vitepress/theme/style.css Outdated
Comment thread docs/index.md
Comment thread docs/index.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
docs/.vitepress/theme/index.ts (1)

244-263: Symmetric cleanup for the poll-fallback interval and the hashchange listener.

The rest of this onMounted block is careful about teardown (headerObserver?.disconnect(), resize listener removed), but two hooks leak past unmount in principle:

  • The setInterval(id, 120) / 5s setTimeout(...) fallback on Lines 245-251 captures id in closure; neither is tracked for onUnmounted.
  • The hashchange handler added on Lines 260-262 uses an anonymous callback and is never removed.

In practice the theme setup() only runs once per app load so this isn't user-visible, but mirroring the cleanup pattern you already established avoids surprise if this code is ever reused in a more dynamic host (HMR, Storybook, tests).

🧹 Suggested cleanup
-      const onHeaderMutations = debounce(() => {
+      const onHeaderMutations = debounce(() => {
         runSignInRelocationWithRetries();
       }, 100);
 
       const tryAttachHeaderObserver = () => {
         if (headerObserver) return;
         const h = document.querySelector(".docs-layout header");
         if (!h) return;
         headerObserver = new MutationObserver(onHeaderMutations);
         headerObserver.observe(h, { childList: true, subtree: true });
       };
       tryAttachHeaderObserver();
+      let pollIntervalId: number | undefined;
+      let pollTimeoutId: number | undefined;
       if (!headerObserver) {
-        const id = window.setInterval(() => {
+        pollIntervalId = window.setInterval(() => {
           tryAttachHeaderObserver();
           if (headerObserver) {
-            clearInterval(id);
+            if (pollIntervalId !== undefined) clearInterval(pollIntervalId);
           }
         }, 120);
-        window.setTimeout(() => clearInterval(id), 5000);
+        pollTimeoutId = window.setTimeout(() => {
+          if (pollIntervalId !== undefined) clearInterval(pollIntervalId);
+        }, 5000);
       }
 
       onResize = debounce(() => {
         runSignInRelocationWithRetries();
       }, 150);
       window.addEventListener("resize", onResize);
 
-      // Listen for hash changes
-      window.addEventListener("hashchange", () => {
-        nextTick(handleTabHash);
-      });
+      onHashChange = () => {
+        nextTick(handleTabHash);
+      };
+      window.addEventListener("hashchange", onHashChange);
     });
 
     onUnmounted(() => {
       headerObserver?.disconnect();
       headerObserver = null;
       if (onResize) {
         window.removeEventListener("resize", onResize);
         onResize = null;
       }
+      if (onHashChange) {
+        window.removeEventListener("hashchange", onHashChange);
+        onHashChange = null;
+      }
+      if (pollIntervalId !== undefined) clearInterval(pollIntervalId);
+      if (pollTimeoutId !== undefined) clearTimeout(pollTimeoutId);
     });

(Declare let onHashChange: (() => void) | null = null; alongside the existing let headerObserver / let onResize declarations.)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/.vitepress/theme/index.ts` around lines 244 - 263, The poll-fallback
interval/timeout and the anonymous hashchange listener are never cleaned up on
unmount; declare tracking variables (e.g., let pollId: number | null = null, let
pollTimeoutId: number | null = null, and let onHashChange: (() => void) | null =
null) alongside headerObserver and onResize, assign pollId/pollTimeoutId when
calling window.setInterval/window.setTimeout and assign the hash handler to
onHashChange (call nextTick(handleTabHash) inside it), then in the existing
onUnmounted cleanup block clearInterval(pollId), clearTimeout(pollTimeoutId),
and removeEventListener("hashchange", onHashChange) (and keep removing the
resize listener via onResize) so all resources (headerObserver, resize, poll
interval/timeout, and hashchange) are torn down symmetrically.
docs/.vitepress/theme/style.css (1)

699-709: Consider using stable selectors instead of Tailwind utility classes for OSSHeader overrides.

The CSS rules coupling to .flex.flex-col and .h-4 depend on the exact Tailwind utility classes emitted by @voidzero-dev/vitepress-theme's OSSHeader component. Since the package uses semver ^4.8.4, minor version updates (e.g., 4.9.x) can change component markup without breaking the version constraint. If OSSHeader's classes change, these rules will silently no-op, reverting the logo to its stacked layout.

Use more stable selectors instead: scope via [class*="Logo"] or target the anchor by aria-label attribute. Alternatively, pin @voidzero-dev/vitepress-theme to a specific version so these coupled rules are revisited and tested at upgrade time.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/.vitepress/theme/style.css` around lines 699 - 709, The current CSS
targets fragile Tailwind utilities `.docs-layout header
a[href="/"].flex.flex-col` and `.docs-layout header a[href="/"] img.h-4` which
may break if OSSHeader markup changes; update these selectors to stable ones
(e.g., target the OSSHeader anchor via an ARIA attribute like
`a[aria-label="Home"]` or a class name pattern such as `[class*="Logo"]` and
adjust the image selector accordingly) so the layout override survives minor
theme updates, or alternatively pin the `@voidzero-dev/vitepress-theme`
dependency to a fixed patch version to ensure these utility classes are
re-evaluated on upgrade; modify the selectors referenced above (the anchor and
image rules) to use the chosen stable selector approach.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/.vitepress/theme/index.ts`:
- Around line 244-263: The poll-fallback interval/timeout and the anonymous
hashchange listener are never cleaned up on unmount; declare tracking variables
(e.g., let pollId: number | null = null, let pollTimeoutId: number | null =
null, and let onHashChange: (() => void) | null = null) alongside headerObserver
and onResize, assign pollId/pollTimeoutId when calling
window.setInterval/window.setTimeout and assign the hash handler to onHashChange
(call nextTick(handleTabHash) inside it), then in the existing onUnmounted
cleanup block clearInterval(pollId), clearTimeout(pollTimeoutId), and
removeEventListener("hashchange", onHashChange) (and keep removing the resize
listener via onResize) so all resources (headerObserver, resize, poll
interval/timeout, and hashchange) are torn down symmetrically.

In `@docs/.vitepress/theme/style.css`:
- Around line 699-709: The current CSS targets fragile Tailwind utilities
`.docs-layout header a[href="/"].flex.flex-col` and `.docs-layout header
a[href="/"] img.h-4` which may break if OSSHeader markup changes; update these
selectors to stable ones (e.g., target the OSSHeader anchor via an ARIA
attribute like `a[aria-label="Home"]` or a class name pattern such as
`[class*="Logo"]` and adjust the image selector accordingly) so the layout
override survives minor theme updates, or alternatively pin the
`@voidzero-dev/vitepress-theme` dependency to a fixed patch version to ensure
these utility classes are re-evaluated on upgrade; modify the selectors
referenced above (the anchor and image rules) to use the chosen stable selector
approach.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bbb83923-feaa-4e26-8d3e-6d1c824ec11b

📥 Commits

Reviewing files that changed from the base of the PR and between 781e2b9 and b9b7b89.

📒 Files selected for processing (4)
  • docs/.vitepress/theme/components/Card.vue
  • docs/.vitepress/theme/index.ts
  • docs/.vitepress/theme/style.css
  • docs/index.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/index.md
  • docs/.vitepress/theme/components/Card.vue

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