Upgrade to Astro 6 + Vite 7 + Tailwind v4 (supersedes #93)#98
Conversation
- run @tailwindcss/upgrade codemod (class renames, postcss → @tailwindcss/postcss) - drop @astrojs/tailwind integration (v3-only, unsupported on Astro 6) - keep existing JS config via @config directive in base.css - add @reference to isolated CSS (modules, JS-imported, scoped <style>) so @apply resolves - reorder postcss: @tailwindcss/postcss before cssnano Still on Astro 5. Build + functional e2e (incl. command palette) green.
- astro ^6.4.6, @astrojs/mdx ^6, @astrojs/markdown-remark ^7, @astrojs/solid-js ^6, @astrojs/sitemap ^3.7.3 - fix Image.astro placeholder lookup: resolve source image from project root (process.cwd) instead of an import.meta.url path hack that depended on Astro 5's emitted chunk layout (broke under Astro 6 .prerender/chunks) solid-js integration 6 is now on its supported Astro 6 / Vite 7 pairing. Build, typecheck, lint, and functional e2e (desktop + mobile) green. Known follow-ups (deprecation warnings, still functional in Astro 6.x): - markdown.gfm deprecated -> move onto unified processor - mdx() remarkPlugins/rehypePlugins -> markdown.processor
Tailwind v4 Preflight shifts text baselines by ~1px, exceeding the 0.02 diff tolerance. Layout/colors/fonts unchanged. Regenerated both -darwin (local) and -linux (Playwright v1.60.0 container, matching CI) snapshots.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughUpgrade Astro and markdown tooling, migrate Tailwind v3→v4 (dependencies and PostCSS), centralize base CSS with ChangesTailwind v4 Migration and Configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. 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)
package.json (1)
69-69:⚠️ Potential issue | 🔴 CriticalUpdate Vite to match Astro 6.4.6 (currently pinned to Vite 5)
Astro 6.4.6 requires Vite
^7.3.2, butpackage.jsonstill hasvite: ^5.2.12—this mismatch can break tooling and build behavior. Align the Vite devDependency to^7.3.2(or Astro’s required range) so the project uses the expected Vite major.🤖 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 `@package.json` at line 69, package.json currently pins "vite" to ^5.2.12 which conflicts with Astro 6.4.6; update the devDependency "vite" in package.json to the version range required by Astro (e.g., "^7.3.2") so the project uses Vite 7.x and matches Astro's expectations, then run your package manager to reinstall/update lockfile.
🤖 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/lib/Commands.tsx`:
- Line 158: The Tailwind open-state selector in the className string in Commands
(src/lib/Commands.tsx) is invalid: replace the nonstandard '[[open]]:flex' token
with a valid Tailwind variant such as 'open:flex' (or use the explicit attribute
form '[&[open]]:flex') inside the same className string so the dialog open state
correctly applies the flex rule.
In `@src/lib/Kbd.tsx`:
- Line 25: In src/lib/Kbd.tsx remove the leftover malformed selector fragment
"[&[data-pressed]]" from the concatenated class string (it is redundant because
the correct v4 variant "data-pressed:border-b" is already present); locate the
class construction in the Kbd component (the className string around
"data-pressed:border-b") and delete the stray "[&[data-pressed]]" token so the
resulting class string only includes valid Tailwind variants.
---
Outside diff comments:
In `@package.json`:
- Line 69: package.json currently pins "vite" to ^5.2.12 which conflicts with
Astro 6.4.6; update the devDependency "vite" in package.json to the version
range required by Astro (e.g., "^7.3.2") so the project uses Vite 7.x and
matches Astro's expectations, then run your package manager to reinstall/update
lockfile.
🪄 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: 5e54dc41-4123-4f6b-9469-5a8776d3fa81
⛔ Files ignored due to path filters (16)
e2e/visual-regression.spec.ts-snapshots/features-asides-desktop-darwin.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-asides-desktop-linux.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-asides-mobile-darwin.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-asides-mobile-linux.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-markdown-cheat-sheet-desktop-darwin.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-og-images-mobile-darwin.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-post-with-frontmatter-desktop-linux.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-post-with-frontmatter-mobile-darwin.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-post-with-frontmatter-mobile-linux.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-reading-time-desktop-darwin.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-reading-time-desktop-linux.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-reading-time-mobile-darwin.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/features-shiki-twoslash-mobile-darwin.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/index-mobile-darwin.pngis excluded by!**/*.pnge2e/visual-regression.spec.ts-snapshots/index-mobile-linux.pngis excluded by!**/*.pngpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (25)
astro.config.tspackage.jsonpostcss.config.cjssrc/global-styles/base.csssrc/global-styles/controls.csssrc/global-styles/integrations.csssrc/global-styles/shiki.csssrc/layouts/PostLayout.astrosrc/lib/CommandCenter.tsxsrc/lib/Commands.tsxsrc/lib/Kbd.tsxsrc/lib/Link.tsxsrc/lib/TableOfContents/PostProgressBar.tsxsrc/lib/TableOfContents/TableOfContents.astrosrc/lib/prose/Blockquote.module.csssrc/lib/prose/Blockquote.tsxsrc/lib/prose/Heading.module.csssrc/lib/prose/Image.astrosrc/lib/prose/Image.csssrc/lib/prose/Ol.module.csssrc/lib/prose/Paragraph.module.csssrc/lib/prose/Table.module.csssrc/lib/prose/code-and-pre.module.csssrc/lib/prose/prose.csssrc/pages/index.astro
💤 Files with no reviewable changes (1)
- astro.config.ts
Resolves the two Astro 6 deprecation warnings:
- markdown.gfm -> unified({ gfm })
- mdx() remarkPlugins/rehypePlugins -> markdown.processor (MDX inherits via
extendMarkdownConfig)
remark/rehype plugins and gfm now live on a single unified() processor;
syntaxHighlight/shikiConfig stay on markdown (passed through as shared opts).
Retyped build-time plugin exports to Astro's RemarkPlugins/RehypePlugins.
Verified: emitted HTML byte-for-byte identical to pre-migration build across
all pages; typecheck, lint, and full e2e (35 tests incl. visual regression)
green. No deprecation warnings remain.
|
@coderabbitai review |
✅ Action performedReview finished.
|
What
Upgrades the framework so the
@astrojs/solid-js6 bump (PR #93) lands on its supported pairing instead of running one major ahead of the framework.@tailwindcss/upgrade)@astrojs/mdx4 → 6,@astrojs/markdown-remark6 → 7,@astrojs/solid-js5 → 6,@astrojs/sitemap3.7.3@astrojs/tailwindintegration (v3-only; unsupported on Astro 6)Supersedes #93 — the solid-js 6 bump is included here on its correct Astro 6 / Vite 7 stack.
Notable changes
@configinbase.css; added@referenceto every isolated stylesheet (CSS modules, JS-imported CSS, Astro scoped<style>) so@applyresolves. PostCSS now uses@tailwindcss/postcss(beforecssnano).Image.astro: the build-time placeholder lookup resolved the source image via animport.meta.urlpath hack tied to Astro 5's emitted chunk layout. Astro 6's new.prerender/chunks/layout broke it (ENOENT dist/src/images/...). Now resolved from the project root (process.cwd()), independent of output layout.-darwin(local) and-linux(Playwright v1.60.0 container, matching CI).Verification
pnpm build(prod),pnpm typecheck,pnpm lintsite.spec.ts,agent-ready.spec.ts) on desktop + mobile — incl. the command-palette open/theme-switch flowKnown follow-ups (non-blocking)
Astro 6 deprecation warnings (still functional, removed in a future major) — left for a focused follow-up to avoid touching the markdown/MDX pipeline here:
markdown.gfm→ move onto aunifiedprocessormdx()remarkPlugins/rehypePlugins→markdown.processorSummary by CodeRabbit
New Features
Chores
Style