Consume reusable Photon Fumadocs theme - #17
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
astrolabe-docs | fdca47e | Jul 12 2026, 02:31 AM |
📝 WalkthroughWalkthroughThe docs application now uses the shared Photon Fumadocs theme for providers, layout configuration, styling, page actions, and sidebar actions. Local provider, search, theme-toggle, and action components are removed, dependencies are updated, and setup documentation is added. ChangesPhoton theme migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant DocsApp
participant PhotonProvider
participant PhotonDocsPageHeader
participant PhotonDocsPageActions
participant PhotonSidebarActions
DocsApp->>PhotonProvider: wrap documentation children with searchEndpoint
DocsApp->>PhotonDocsPageHeader: pass page title, description, and actions
PhotonDocsPageHeader->>PhotonDocsPageActions: render page URLs and neighbors
DocsApp->>PhotonSidebarActions: pass repositoryUrl
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/app/layout.tsx (1)
18-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDerive the search endpoint from
withDocsBasePathinstead of hardcoding it.
searchEndpoint="/astrolabe/api/search"duplicates the base-path prefix thatwithDocsBasePath(used elsewhere in this stack, e.g.docs/app/(docs)/[[...slug]]/page.tsx) already centralizes. A future change to the base path constant would silently desync this literal.♻️ Proposed fix
-import { PhotonProvider } from 'fumadocs-theme-photon/provider'; +import { PhotonProvider } from 'fumadocs-theme-photon/provider'; +import { withDocsBasePath } from '`@/lib/shared`';- <PhotonProvider searchEndpoint="/astrolabe/api/search"> + <PhotonProvider searchEndpoint={withDocsBasePath('/api/search')}>🤖 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 `@docs/app/layout.tsx` around lines 18 - 20, Update the PhotonProvider configuration in the layout component to build searchEndpoint through the existing withDocsBasePath helper instead of hardcoding the /astrolabe prefix, preserving the /api/search suffix and the current child rendering.
🤖 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.
Nitpick comments:
In `@docs/app/layout.tsx`:
- Around line 18-20: Update the PhotonProvider configuration in the layout
component to build searchEndpoint through the existing withDocsBasePath helper
instead of hardcoding the /astrolabe prefix, preserving the /api/search suffix
and the current child rendering.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5d2bf83b-5d70-4f7b-90cc-abf3b3868363
⛔ Files ignored due to path filters (1)
docs/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (16)
.gitignoredocs/README.mddocs/app/(docs)/[[...slug]]/page.tsxdocs/app/(docs)/layout.tsxdocs/app/global.cssdocs/app/layout.tsxdocs/components/brand.tsxdocs/components/docs-page-actions.tsxdocs/components/provider.tsxdocs/components/search.tsxdocs/components/sidebar-actions.tsxdocs/components/theme-toggle.tsxdocs/lib/cn.tsdocs/lib/layout.shared.tsxdocs/package.jsondocs/pnpm-workspace.yaml
💤 Files with no reviewable changes (6)
- docs/components/sidebar-actions.tsx
- docs/components/search.tsx
- docs/components/theme-toggle.tsx
- docs/components/docs-page-actions.tsx
- docs/lib/cn.ts
- docs/components/provider.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: CodeRabbit
- GitHub Check: Workers Builds: astrolabe-docs
⚠️ CI failures not shown inline (1)
GitHub Check: Workers Builds: astrolabe-docs: Workers Builds: astrolabe-docs
Conclusion: failure
Build ID: [30abb85a-929c-4dcd-b77f-87801bec7df4](https://dash.cloudflare.com/b5176398b5d13edecba1cb601f72e326/workers/services/view/astrolabe-docs/production/builds/30abb85a-929c-4dcd-b77f-87801bec7df4)
Script: [astrolabe-docs](https://dash.cloudflare.com/b5176398b5d13edecba1cb601f72e326/workers/services/view/astrolabe-docs/production)
🔇 Additional comments (9)
docs/README.md (1)
6-18: LGTM!.gitignore (1)
3-3: LGTM!docs/pnpm-workspace.yaml (1)
1-3: LGTM!docs/lib/layout.shared.tsx (1)
6-11: 🎯 Functional CorrectnessConfirm theme-switch default in
createPhotonBaseOptions.The previous
baseOptions()explicitly disabledthemeSwitch; the new call tocreatePhotonBaseOptionspasses onlyname,mark,homeUrl. If the Photon helper defaults to showing the theme switcher, this reintroduces UI that was intentionally disabled before.Please check
fumadocs-theme-photon'screatePhotonBaseOptionssignature/defaults (at the pinned commit2a45c727b85e3e09be9dbfbd5d592cdfd12592c4) for athemeSwitchoption and its default value.docs/app/(docs)/layout.tsx (1)
1-26: LGTM!docs/app/global.css (1)
5-5: 🩺 Stability & Availability
@importorder is valid here. All@importrules come before the first regular CSS rule, so this stylesheet is fine as-is.> Likely an incorrect or invalid review comment.docs/package.json (1)
13-16: 🎯 Functional CorrectnessNo remaining direct imports.
@orama/orama,cnfast, andlucide-reactare no longer referenced underdocs/.docs/components/brand.tsx (1)
1-1: 🎯 Functional CorrectnessNo remaining
BrandTitleimports.docs/app/(docs)/[[...slug]]/page.tsx (1)
30-45: 🎯 Functional CorrectnessCheck
previous/nexthandling inPhotonDocsPageActions. If those props become plainhrefs, they also needwithDocsBasePath; if the component wraps them inLink, the extra prefix is unnecessary.
Summary
@photon-hq/fumadocs-theme@0.1.1Dependency
@photon-hq/fumadocs-theme@0.1.1is published with Internal visibilityDeployment
GITHUB_PACKAGES_TOKENis configuredVerification
corepack pnpm install --frozen-lockfilecorepack pnpm types:checkcorepack pnpm build@photon-hq/fumadocs-theme@0.1.1Linear: https://linear.app/photonhq/issue/ENG-1949/extract-reusable-photon-fumadocs-theme