feat: Upgrade Starlight, add Algolia DocSearch, sitemap discovery#71
feat: Upgrade Starlight, add Algolia DocSearch, sitemap discovery#71Quantumlyy wants to merge 20 commits into
Conversation
remove bun.lockb and generate bun.lock to standardize dependency resolution with Bun
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughThe PR replaces the Astro Tailwind integration with ChangesTailwind Vite Plugin and Build Configuration
Starlight Documentation Search Plugin
Content Collection Module Migration
Head & Routes
Styles & Custom CSS
Public scripts and lint
Documentation formatting changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Upgrades the Astro/Starlight docs site to support the official Starlight DocSearch integration, while updating SEO/crawler discovery and modernizing the Tailwind setup to Starlight’s current Tailwind v4 pattern.
Changes:
- Upgraded Astro → v6 and Starlight → v0.39; updated related tooling/dependencies and config shapes (e.g.,
social). - Added Algolia DocSearch integration + site verification meta tag.
- Added deploy-time
robots.txtendpoint that advertises the generated sitemap, and migrated content collections config tosrc/content.config.ts.
Reviewed changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tsconfig.json |
Enables skipLibCheck and updates tracked config file list for the new content config entrypoint. |
tailwind.config.ts |
Removes Tailwind v3 config as Tailwind v4 is now driven via CSS + Vite plugin. |
src/styles/tailwind.css |
Switches to Tailwind v4 + Starlight Tailwind import pattern and defines theme tokens. |
src/pages/robots.txt.ts |
Adds a robots.txt endpoint that includes a sitemap URL derived from site. |
src/content/i18n/en.json |
Adds an empty i18n data file to satisfy the new i18n loader expectations. |
src/content/config.ts |
Removes the old Astro content collections config location. |
src/content.config.ts |
Adds the new collections config using Starlight loaders (docsLoader/i18nLoader). |
src/components/Head.astro |
Removes an unused Head component previously intended for view transitions. |
package.json |
Upgrades dependencies to Astro 6/Starlight 0.39, adds DocSearch + Tailwind v4 Vite plugin, removes deprecated integrations. |
astro.config.ts |
Updates Starlight config for new versions, adds DocSearch + Algolia verification meta, and switches Tailwind integration to @tailwindcss/vite. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile SummaryThis PR upgrades the docs site from Astro 4 / Starlight 0.16 to Astro 6 / Starlight 0.39, primarily to enable the official
Confidence Score: 4/5Safe to merge after confirming dark-mode accent colours render correctly; the missing accent shades in the @theme block will leave interactive elements unstyled in dark mode. The Tailwind v4 @theme block defines accent colours only up to shade 600. Starlight's @astrojs/starlight-tailwind plugin maps shades 700–950 to its dark-mode CSS variables; without them those variables resolve to initial, making links, buttons, and focus rings potentially invisible in dark mode. Everything else in the migration — content loaders, Algolia wiring, robots.txt, CSS layer order — looks correct. src/styles/tailwind.css — accent shades 700–950 are missing from the @theme block Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[astro.config.ts] --> B[Starlight 0.39]
A --> C[tailwindcss vite plugin]
A --> D[Sentry v10]
B --> E[starlightDocSearch Algolia]
B --> F[starlightLlmsTxt]
B --> G[starlightLinksValidator]
B --> H[src/content.config.ts]
F --> F1[llms.txt]
F --> F2[llms-full.txt]
F --> F3[llms-small.txt]
A --> CSS[customCss order]
CSS --> J[tailwind.css]
CSS --> K[custom.css]
J --> M[theme accent 50-600 only]
M --> N[accent 700-950 missing]
N --> O[dark-mode interactive elements unstyled]
A --> L[robots.txt.ts]
L --> SiteMap[sitemap-index.xml]
Reviews (7): Last reviewed commit: "feat: Integrate starlight-llms-txt for a..." | Re-trigger Greptile |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
src/styles/tailwind.css (1)
30-30: 💤 Low value
--font-serifstarts with a sans-serif face.The serif stack leads with
Inter, which is a sans-serif typeface, before the serif fallbacks. If a genuine serif is intended for serif contexts, lead with an actual serif family; otherwise this token effectively renders sans-serif.🤖 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/styles/tailwind.css` at line 30, The CSS custom property --font-serif currently begins with the sans-serif "Inter", so update the definition of --font-serif to start with a true serif family (e.g., "Georgia, Cambria, 'Times New Roman', Times, serif") or, if the intent was to use Inter, rename the variable to --font-sans and keep the sans-serif stack; change the declaration in the CSS where --font-serif is defined accordingly.
🤖 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 `@astro.config.ts`:
- Around line 296-300: The config is embedding an Algolia API key that must be a
public search-only key; update the starlightDocSearch invocation to use a
search-only (search) API key instead of any admin/write key and avoid
hard-coding secrets—pull the key from a secure env var (referencing
starlightDocSearch and its apiKey parameter) or replace the literal with the
dedicated search-only key, and verify the referenced indexName ('EFP docs') only
contains content safe for public exposure.
In `@src/pages/robots.txt.ts`:
- Around line 10-11: The GET handler constructs sitemapURL using new
URL('sitemap-index.xml', site) but site can be undefined; add a guard at the
start of the exported GET function to check that the site parameter exists (site
!== undefined) and handle the undefined case (e.g., return an appropriate
Response with an error status or use a safe fallback base) before calling new
URL; update references to sitemapURL after this guard so the runtime TypeError
is prevented.
In `@src/styles/tailwind.css`:
- Around line 10-16: The accent color ramp variables (--color-accent-50,
--color-accent-100, --color-accent-200, --color-accent-300, --color-accent-400,
--color-accent-500, --color-accent-600) are inconsistent and contain a
duplicated hex (`#ffde60`) and mixed hues; pick the intended hue family (pink or
yellow) and replace --color-accent-200 and --color-accent-300 with progressive,
non-duplicated shades that form a monotonic ramp toward --color-accent-600 so
the theme scales predictably (e.g., if keeping the pink ramp, change 200/300/600
to pink variants; if keeping yellow, change 50/100/400/500 to yellow variants),
then run a quick visual check where Starlight consumes the ramp to confirm
links/accents look correct.
---
Nitpick comments:
In `@src/styles/tailwind.css`:
- Line 30: The CSS custom property --font-serif currently begins with the
sans-serif "Inter", so update the definition of --font-serif to start with a
true serif family (e.g., "Georgia, Cambria, 'Times New Roman', Times, serif")
or, if the intent was to use Inter, rename the variable to --font-sans and keep
the sans-serif stack; change the declaration in the CSS where --font-serif is
defined accordingly.
🪄 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: bcb3f8f9-a878-4455-8303-02409a0024ed
⛔ Files ignored due to path filters (2)
bun.lockis excluded by!**/*.lockbun.lockbis excluded by!**/bun.lockb
📒 Files selected for processing (10)
astro.config.tspackage.jsonsrc/components/Head.astrosrc/content.config.tssrc/content/config.tssrc/content/i18n/en.jsonsrc/pages/robots.txt.tssrc/styles/tailwind.csstailwind.config.tstsconfig.json
💤 Files with no reviewable changes (3)
- src/content/config.ts
- src/components/Head.astro
- tailwind.config.ts
- change accent color palette from pink to yellow/gold shades - remove Inter font from serif font stack
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
- disables `@typescript-eslint/consistent-type-imports` in MDX files due to parser limitations - updates `window.addEventListener` to `globalThis.addEventListener` for broader environment compatibility - standardizes whitespace, newlines, and markdown table formatting across documentation and configuration files
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/content/docs/production/silo.mdx (1)
109-112:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix broken PgBouncer table formatting.
Line 111 has the entire PgBouncer configuration table collapsed onto a single line, making it unreadable. This should be reformatted as a proper Markdown table like the other sections.
📋 Proposed fix
#### PgBouncer -(see [PgBouncer Docs](https://www.pgbouncer.org/config.html) for more information) | Variable Name | Description | |-----------------------------------|-----------------------------------------------------| | `PGBOUNCER_DEFAULT_POOL_SIZE` | Amount of connections per pool | | `PGBOUNCER_MAX_CLIENT_CONN` | Maximum number of client connections | | `PGBOUNCER_POOL_MODE` | 'Session' or 'Transaction' | | `PGBOUNCER_QUERY_TIMEOUT` | Amount of seconds to wait before dropping query | +(see [PgBouncer Docs](https://www.pgbouncer.org/config.html) for more information) + +| Variable Name | Description | +| ----------------------------- | --------------------------------------------------- | +| `PGBOUNCER_DEFAULT_POOL_SIZE` | Amount of connections per pool | +| `PGBOUNCER_MAX_CLIENT_CONN` | Maximum number of client connections | +| `PGBOUNCER_POOL_MODE` | 'Session' or 'Transaction' | +| `PGBOUNCER_QUERY_TIMEOUT` | Amount of seconds to wait before dropping query |🤖 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/content/docs/production/silo.mdx` around lines 109 - 112, The PgBouncer section header "PgBouncer" contains a collapsed single-line table; replace it with a properly formatted Markdown table under that heading matching the project's table style: include a header row ("Variable Name | Description"), a separator row ("--- | ---"), and one row per variable (`PGBOUNCER_DEFAULT_POOL_SIZE`, `PGBOUNCER_MAX_CLIENT_CONN`, `PGBOUNCER_POOL_MODE`, `PGBOUNCER_QUERY_TIMEOUT`) with their corresponding descriptions so the table is readable and consistent with other docs.
🧹 Nitpick comments (2)
.eslintrc.cjs (1)
33-34: 💤 Low valueClarify the comment—this rule is not type-aware.
@typescript-eslint/consistent-type-importsis a stylistic rule that doesn't requireparserServicesor type information. The actual reason for disabling it is likely that the MDX parser doesn't provide a compatible AST structure for TypeScript imports, causing the rule to error or misbehave.Consider revising the comment to be more accurate, e.g.:
// MDX parser doesn't provide proper TypeScript import AST; this rule errors on MDX files.🤖 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 @.eslintrc.cjs around lines 33 - 34, Update the comment above the '`@typescript-eslint/consistent-type-imports`' rule to accurately reflect why it's disabled: state that the MDX parser doesn't produce a proper TypeScript import AST so this stylistic rule errors or misbehaves on MDX files (e.g., "MDX parser doesn't provide proper TypeScript import AST; this rule errors on MDX files.").tailwind.config.ts (1)
16-20: 💤 Low valueUnused
themeparameter in the typography callback.The destructured
themeis never referenced in the returnedcssobject. With ESLint running at--max-warnings=0, an unused-argument rule could fail the lint step. Drop the parameter (and its type annotation) since the callback no longer needs it.♻️ Proposed simplification
- typography: ({ - theme - }: { - theme: (path: string) => string | number | Record<string, unknown> | unknown[] | undefined - }) => ({ + typography: () => ({🤖 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 `@tailwind.config.ts` around lines 16 - 20, The typography callback in tailwind.config.ts currently destructures a theme parameter that isn't used; remove the unused parameter and its type annotation from the typography: ({ theme }: ...) => (...) signature so the callback becomes a no-arg arrow function (e.g., typography: () => ({ ... })), updating the function declaration for the typography export accordingly to avoid lint failures for unused arguments.
🤖 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/content/docs/production/emergency-response.mdx`:
- Line 47: Replace the misspelled phrase "accouint metadata" with the correct
"account metadata" in the sentence that reads "If there is bad account
metadata..." so the sentence becomes "If there is bad account metadata in any of
the records from the affected account metadata contract, users may have to
re-execute any transactions that were called against the affected contract";
search for the exact incorrect token "accouint metadata" to locate the line to
edit.
In `@src/content/docs/production/interpreting-state.mdx`:
- Line 37: Fix the typo in the sentence "Query the list metadata record in the
listRecords contract using the slot to verify the 'user' role..." by replacing
"existance" with the correct spelling "existence" (update the word in the
paragraph that mentions checking for the 'primary-list' record that matches this
list id and the user's address).
- Line 45: Replace the misspelled word "existance" with "existence" in the text
that describes querying the listRecords contract to find the 'user' role and
checking for a 'primary-list' record; update both occurrences (the one near
"primary-list" and the earlier instance noted at line 37) so the document uses
"existence" consistently.
In `@src/content/docs/production/silo.mdx`:
- Line 70: The sentence contains a typo: "than" should be "then" in the
paragraph starting "Most of the Environment variables..."; update that word to
"then" so the sentence reads "...there are a few settings then can be
customized..." (actually ensure the full sentence becomes "...there are a few
settings then can be customized to fit your needs." or better "...there are a
few settings that can be customized to fit your needs."), editing the text in
the content block of the docs (silo.mdx) to replace "than" with "then" (or
replace with "that" for clearer grammar).
In `@src/styles/tailwind.css`:
- Around line 3-7: Move the two Tailwind CSS `@import` directives (the lines
importing 'tailwindcss/theme.css' layer(theme) and 'tailwindcss/utilities.css'
layer(utilities)) to appear before any `@plugin` '`@tailwindcss/typography`' and
`@config` '../../tailwind.config.ts' directives so imports are processed first;
reorder the entries in src/styles/tailwind.css so all `@import` statements come at
the top, followed by `@plugin` and then `@config` to ensure deterministic
Tailwind/CSS directive parsing and cascade.
---
Outside diff comments:
In `@src/content/docs/production/silo.mdx`:
- Around line 109-112: The PgBouncer section header "PgBouncer" contains a
collapsed single-line table; replace it with a properly formatted Markdown table
under that heading matching the project's table style: include a header row
("Variable Name | Description"), a separator row ("--- | ---"), and one row per
variable (`PGBOUNCER_DEFAULT_POOL_SIZE`, `PGBOUNCER_MAX_CLIENT_CONN`,
`PGBOUNCER_POOL_MODE`, `PGBOUNCER_QUERY_TIMEOUT`) with their corresponding
descriptions so the table is readable and consistent with other docs.
---
Nitpick comments:
In @.eslintrc.cjs:
- Around line 33-34: Update the comment above the
'`@typescript-eslint/consistent-type-imports`' rule to accurately reflect why it's
disabled: state that the MDX parser doesn't produce a proper TypeScript import
AST so this stylistic rule errors or misbehaves on MDX files (e.g., "MDX parser
doesn't provide proper TypeScript import AST; this rule errors on MDX files.").
In `@tailwind.config.ts`:
- Around line 16-20: The typography callback in tailwind.config.ts currently
destructures a theme parameter that isn't used; remove the unused parameter and
its type annotation from the typography: ({ theme }: ...) => (...) signature so
the callback becomes a no-arg arrow function (e.g., typography: () => ({ ...
})), updating the function declaration for the typography export accordingly to
avoid lint failures for unused arguments.
🪄 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: 575e7f84-145f-4b61-9ead-6c08fc63e3ec
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (21)
.eslintrc.cjsCLAUDE.mdfunding.jsonpackage.jsonpublic/anchor-targets.jssrc/content/docs/design/list-metadata.mdxsrc/content/docs/design/tags.mdxsrc/content/docs/intro/index.mdxsrc/content/docs/llmstxt.mdxsrc/content/docs/production/deployments.mdxsrc/content/docs/production/emergency-response.mdxsrc/content/docs/production/follow-bot.mdxsrc/content/docs/production/infra.mdxsrc/content/docs/production/interpreting-state.mdxsrc/content/docs/production/new-chain-support.mdxsrc/content/docs/production/silo.mdxsrc/content/docs/translationbounty.mdxsrc/pages/robots.txt.tssrc/styles/custom.csssrc/styles/tailwind.csstailwind.config.ts
💤 Files with no reviewable changes (1)
- src/content/docs/intro/index.mdx
✅ Files skipped from review due to trivial changes (6)
- src/content/docs/llmstxt.mdx
- src/content/docs/translationbounty.mdx
- src/content/docs/design/tags.mdx
- src/content/docs/production/deployments.mdx
- public/anchor-targets.js
- funding.json
🚧 Files skipped from review as they are similar to previous changes (1)
- src/pages/robots.txt.ts
Summary
Bumps the docs site to Astro 6 + Starlight 0.39 so we can use the official DocSearch plugin instead of a custom search component. Adds Algolia site verification,
robots.txtwith a sitemap URL, and moves the lockfile tobun.lock(text).Search in the header is now Algolia (
EFP docsindex). Pagefind is turned off by the DocSearch plugin. Sitemap was already generated via Starlight oncesiteis set; this PR adds crawler discovery throughrobots.txt.Why the big upgrade
@astrojs/starlight-docsearchneeds Starlight ≥0.38, which needs Astro 6. We were on Astro 4 / Starlight 0.16, so the upgrade is a package requirement, not a nice-to-have.Tailwind had to move too: Starlight’s current setup uses Tailwind v4 with
@tailwindcss/vite, not@astrojs/tailwind+tailwind.config.ts.Changes
Algolia DocSearch
@astrojs/starlight-docsearchin Starlightpluginswith app IDZNH496WHXH, indexEFP docs<meta name="algolia-site-verification" content="C3213343673844A1" />in globalheadfor domain verificationaskAinot wired yet (no assistant ID)SEO / crawlers
src/pages/robots.txt.ts— buildsrobots.txtat deploy time, sitemap URL derived fromsite(https://docs.efp.app/sitemap-index.xml)sitewas already set; Starlight still emitssitemap-index.xmlon buildStarlight / Astro
^4.2→^6.4, Starlight^0.16→^0.39src/content/config.ts→src/content.config.tswithdocsLoader()/i18nLoader()src/content/i18n/en.jsonadded (empty) so the i18n loader stops warningsocialconfig updated to the array shape Starlight expects nowexperimental.clientPrerender/contentCollectionCache(not valid on Astro 6)Tailwind
@astrojs/tailwindandtailwind.config.tssrc/styles/tailwind.cssuses Starlight’s Tailwind v4 pattern (@import '@astrojs/starlight-tailwind',@themefor accent/gray/fonts)custom.cssunchanged — that’s still where most of the visual branding livesOther dependency / repo cleanup
@sentry/astrobumped to v10@spotlightjs/astroremoved (peer/types broken on Astro 6; dev-only)bun.lockb→bun.locktsconfig.json:skipLibCheck, drop reference to deletedtailwind.config.tssrc/components/Head.astro— it was never registered incomponents.Head, so ViewTransitions weren’t actually runningSummary by CodeRabbit
New Features
Refactor
Documentation
Other