Skip to content

Conversation

@gcko
Copy link
Contributor

@gcko gcko commented Dec 8, 2025

Direct URL access to routes like /query, /lineage, and /checks was returning 404 errors because Next.js static export generated route.html files (e.g., query.html) while FastAPI's StaticFiles only looks for index.html inside directories.

Adding trailingSlash: true to next.config.js causes the build to generate index.html inside route directories (e.g., query/index.html), which FastAPI's StaticFiles with html=True can serve correctly.

PR checklist

  • Ensure you have added or ran the appropriate tests for your PR.
  • DCO signed

What type of PR is this?
fix

What this PR does / why we need it:
Ensure direct access to lineage, query, or checklist does not 404

Which issue(s) this PR fixes:
N/A

Special notes for your reviewer:

  • Test that you can navigate directly to /lineage, /query, and /checklist

Does this PR introduce a user-facing change?:

NONE

@gcko gcko requested a review from even-wei December 8, 2025 11:27
@gcko gcko self-assigned this Dec 8, 2025
@even-wei even-wei merged commit 69fe7c2 into main Dec 9, 2025
6 checks passed
@even-wei even-wei deleted the bugfix/fix-nextjs-static-export branch December 9, 2025 00:36
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.

3 participants