Skip to content

fix: netlify - Resolve direct navigation and refresh 404s - #15

Open
netlify-coding[bot] wants to merge 1 commit into
mainfrom
agent-website-ee42
Open

netlify-coding[bot] wants to merge 1 commit into
mainfrom
agent-website-ee42

Conversation

@netlify-coding

@netlify-coding netlify-coding Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Bugfix Pull Request

Organisation-wide changelog, release and label governance applies.
See the Automation Governance & Release Strategy. Repository-specific instructions take precedence where applicable; this PR’s checks do not establish that every organisation-wide rule is enforced.

Linked issues

Relates to GitHub issue #3.

Addresses Linear TOA-4, currently Todo. Keep both issues open until deployed acceptance and production verification are recorded. These are references, not auto-closing links; no formal Linear PR relationship is currently recorded.

Issue #3’s “No implementation PR” wording is stale. Updating either issue is outside this metadata proposal.

Context

  • Impact: direct-navigation and refresh failures reported by the implementation agent; severity not separately assessed.
  • Environment: React/Vite SPA on production Netlify.
  • Implementation commit: ac620c461fa0809abffd333e56639136db325729.
  • Scope: correct unreadable redirect output without changing unrelated application code or deployment settings.

Implementation agent, as recorded in the original PR: Claude.
GitHub author: netlify-coding[bot]. Model attribution is not supplied.
Original agent run.

Original captured prompt, truncated:

Work on the Netlify website connected to lightspeedwp/ThisOneTimeOnAcidCom and resolve the remaining deployment-routing problems tracked in:
#3

Read that GitHub issue and the repository’s cu...

The implementation addresses the reported configuration problem. Deployed functional acceptance remains unverified. Pre-fix runtime findings and local validation below remain attributed to the implementation agent.

Reproduction

  1. Inspect the historical redirect directory and generated dist/_redirects.
  2. Review Netlify redirect-processing output.
  3. Directly visit and refresh /journal, /journal/berlin-morning-light and /ebook.
  4. Check homepage/in-app navigation, real asset responses and an unknown route.

Expected: valid redirect processing; supported routes render the intended pages; real assets retain their content types; unknown routes render NotFound.

Actual before the fix, agent-reported: / returned 200, while affected routes and unknown routes returned Netlify 404 responses. The build reportedly produced an unreadable redirect directory with no processed rules.

Root Cause

  • The historical public/_redirects/main.tsx contained comments and /* /index.html 200, not application code.
  • The agent reports Vite generated dist/_redirects/main.tsx, causing Could not read redirects file: /opt/build/repo/dist/_redirects. Generated output and historical runtime behaviour were not independently reproduced in this metadata review.
  • Agent-reported dashboard configuration: empty base directory, npm run build, publish directory dist, production branch main.
  • No root netlify.toml is tracked at the implementation commit. The existing src/app/netlify.toml was reportedly inactive under that root-based configuration. Dashboard settings were not independently inspected.

Fix Summary

  • Replaced the malformed directory structure with plain-text public/_redirects. Old and new file contents have identical blob SHA 8fd679b385c11d6ddd7561d8c0ac48b0efd0c22e; comments and the fallback rule are unchanged.
  • Added no force (!) or TOML redirect rule. Existing static-file precedence is intended to remain unchanged; deployed asset behaviour still requires acceptance evidence.
  • Updated CHANGELOG.md, Unreleased → Fixed.
  • Updated CONTRIBUTING.md to identify the effective redirect source under the reported dashboard configuration.

Unchanged: build command, publish directory, vite.config.ts, React/Tailwind plugins, figmaAssetResolver(), package manager, runtimes, environment variables, headers, caching and artwork.

Nested TOML remains untouched: moving it could activate unrelated headers and runtime settings outside issue #3’s scope.

Verification

  • Tests added/updated to cover the bug
  • Manual verification steps (browsers/devices)
  • Negative/edge cases checked

Local validation reported by the implementation agent, not independently repeated:

  • Reproduced the warning, checked Netlify dashboard settings through the API and confirmed pre-fix production 404s.
  • Served copied existing build output with corrected redirects using netlify dev, outside the repository without rebuilding.
  • Reported no redirect/syntax warnings.
  • /, the affected routes and /no-such-route returned 200 text/html; React Router’s * route reportedly rendered NotFoundPage.
  • Real JS/CSS assets reportedly returned 200 with application/javascript and text/css, rather than fallback HTML.

Independently retrieved check and review evidence:

  • Preview notification confirms the deploy preview is ready at the implementation commit.
  • Redirect rules check succeeded: “All redirect rules processed without errors.”
  • Header rules and Pages changed checks are neutral; both dependency-validation jobs were skipped. No retrieved check or commit status is failing or pending.
  • CodeRabbit skipped review because the author is a bot. Its successful status is not an approval.
  • No submitted reviews or review threads are recorded.
  • The recent metadata audit identifies outstanding acceptance safeguards; it is not code approval.

Outstanding before merge:

  • Record a clean install/build and confirm generated dist/_redirects is a regular file containing the intended fallback.
  • Retain the deploy log. Exact artefact shape, processed rule count and complete warning-free build output remain independently unverified.
  • Record preview browser/device results for direct navigation, refresh, homepage/in-app navigation, real assets/content types, rendered NotFound and console errors. HTTP 200 alone does not prove the intended page rendered.
  • Obtain an actual review; document risk and an agreed rollback procedure.
  • Confirm the maintainer’s decision on the nonconforming branch name.

After authorised merge:

Repeat checks on production and record the production deployment URL and results before closing either linked issue.

No automated tests were added. package.json has no test, lint or typecheck script at the implementation commit. Record manual validation rather than marking automated testing complete.

Risk & Rollback

  • Risk level: not supplied or independently assessed.
  • Rollback plan: not documented or agreed in the available evidence.

Notes and follow-ups:

  • The agent reports /assets/missing.js returns fallback HTML with 200; real assets were reportedly unaffected locally. Deployed negative-case evidence remains outstanding.
  • The pnpm lockfile/overrides mismatch is out of scope; separate tracking remains unverified.
  • Branch agent-website-ee42 lacks the documented fix/ prefix. No branch change is proposed.
  • AGENTS.md and deployment troubleshooting guidance retain nested-TOML guidance differing from the updated contributor guide. Clarification is needed; no repository-file edits are included.
  • Full branch-protection requirements were not independently inspected.

Changelog

Added

None.

Changed

None.

Fixed

  • Corrected Netlify SPA redirect output for direct navigation and refresh, retaining the fallback rule and intended static-file precedence. Preview browser QA and production confirmation remain outstanding.

Removed

None.


Checklist (Global DoD / PR)

  • All AC met and demonstrated
  • Tests added/updated (unit/E2E as appropriate)
  • Accessibility checklist completed (where relevant):
    • Semantic HTML and heading order verified
    • Keyboard navigation and visible focus states verified
    • ARIA used only where needed
    • Contrast and non-colour cues reviewed (WCAG 2.1 AA or higher)
  • Docs/readme/changelog updated (if user-facing)
  • Security checklist completed (where relevant):
    • Untrusted input validated and sanitised
    • Output escaped for its rendering context
    • Privileged actions enforce nonce and capability checks
    • No secrets/sensitive data introduced; OWASP risks reviewed
  • Code/design reviews approved
  • CI green; linked issues closed; release notes prepared (if shipping)

Only contributor-guide/changelog updates are confirmed complete. Documentation inconsistency, QA, review and release completion remain unresolved. Checklist wording follows the template; applicability must be assessed for this React/Vite repository.

Status checked 5 October 2026: contributor-guide/changelog updates, preview availability and redirect-processing success are confirmed. Clean install/build, generated redirect artefact verification, deployed browser/device QA, accessibility/security review, actual review approval, risk/rollback and production acceptance remain outstanding. CodeRabbit skipped review; successful checks do not establish approval. Linked issues remain open.


Proposed closing comment for #3 (post only after production verification)

Future draft only; do not post now. Replace placeholders with verified evidence and confirm separate lockfile tracking before using the final sentence.

Fixed by replacing the malformed public/_redirects/ directory, containing main.tsx, with a plain-text public/_redirects file retaining /* /index.html 200. Under the confirmed empty-base-directory configuration, src/app/netlify.toml was not read; the unreadable directory prevented redirect processing.

Verified on preview <preview URL> at <sha> and production <production deploy URL>: no redirect warnings; affected routes load directly and on refresh; homepage/navigation work; JS/CSS retain correct content; unknown routes show NotFound; no new console errors.

The pnpm lockfile mismatch is tracked separately at <verified tracking reference>.

@netlify

netlify Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for thisonetimeonacid ready!

Name Link
🔨 Latest commit ac620c4
🔍 Latest deploy log https://app.netlify.com/projects/thisonetimeonacid/deploys/6ac08eb9bcf7f40008ce8a74
😎 Deploy Preview https://deploy-preview-15--thisonetimeonacid.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: lightspeedwp/ThisOneTimeOnAcidCom/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1eb6f0a6-6fa3-4a93-8aaa-fc950ac00334

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@ashleyshaw ashleyshaw changed the title Fix Netlify routing issues for ThisOneTimeOnAcidCom website fix: netlify - Resolve direct navigation and refresh 404s Oct 3, 2026
@ashleyshaw ashleyshaw added the type:bug label Oct 3, 2026 — with Linear

Copy link
Copy Markdown
Member

Verdict: technically mergeable, but merge readiness has not yet been demonstrated.

Audited head: ac620c461fa0809abffd333e56639136db325729.

Verified current state

  • The PR is open and non-draft, with no conflicts; the branch is not behind its target.
  • The Netlify preview deployed successfully. The redirect check passed with “All redirect rules processed without errors.”
  • Header and page checks are neutral; both dependency-validation jobs were skipped. No retrieved check is failing or pending.
  • There are no submitted reviews or review threads. CodeRabbit skipped review because the author is a bot. Its successful status is not an approval.

What remains before merge

  1. Build and generated-output evidence. Record a clean install/build and confirm that dist/_redirects is a regular file containing the intended fallback rule. Retain the deployment log. Redirect processing is confirmed; artifact shape and exact rule count are not independently established.
  2. Deployed preview QA. Record browser/device results for direct navigation and refresh on /journal, /journal/berlin-morning-light and /ebook; homepage and in-app navigation; real JS/CSS responses and content types; rendered unknown-route NotFound; and console errors. HTTP 200 alone does not prove the correct page rendered. Existing local results are implementation-agent reports, not independent preview verification.
  3. Review and release safeguards. Obtain an actual review and document risk and rollback. Confirm the maintainer’s decision on branch naming: agent-website-ee42 lacks the repository’s documented fix/ prefix. Full branch-protection requirements were not independently inspected.

Documentation and tracking

  • CONTRIBUTING.md identifies the effective redirect source, while AGENTS.md and docs/deployment-troubleshooting.md retain conflicting nested-TOML guidance. Clarify the authoritative instructions or explicitly track the inconsistency; moving configuration could activate unrelated settings.
  • bug: netlify - Fix unreadable redirects output and validate routing #3 remains Todo with all six acceptance checkboxes unchecked and no recorded deployed QA. The PR and issue reference one another in their descriptions, but formal Linear links are absent; wording that no implementation PR exists is now stale.
  • The repository has no configured test runner. Record the manual validation used rather than marking automated tests complete.

After an authorised merge

Repeat routing and asset checks on production, record the production deployment URL, and only then close #3 and GitHub #3. Production verification is a post-merge acceptance step, not a prerequisite for merging. Keep the lockfile/overrides mismatch separate and provide its tracking reference.

Conclusion: successful deployment and redirect processing support the fix, but do not complete functional acceptance or substitute for review. This is a metadata/evidence audit, not a code approval.

@ashleyshaw ashleyshaw added release:patch Backwards‑compatible bug fixes requiring a PATCH version bump (e.g., small fixes, docs updates). status:needs-review Awaiting code review area:core meta:needs-changelog labels Oct 5, 2026 — with Linear
@ashleyshaw ashleyshaw added this to the Website v1.0 milestone Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core meta:needs-changelog release:patch Backwards‑compatible bug fixes requiring a PATCH version bump (e.g., small fixes, docs updates). status:needs-review Awaiting code review type:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants