fix(web): apply WEB_DOCS_URL to mobile nav button and SEO artifacts#1687
Conversation
Two follow-ups to #1686: 1. The mobile-nav 'Read Docs' button still hardcoded the URL — the previous replace only matched the desktop button due to a different indentation level. Switch it to DOCS_URL like its desktop sibling. 2. scripts/build-llms-artifacts.ts now uses WEB_DOCS_URL for the docs reference in llms.txt and the sitemap entry in robots.txt — but the web Dockerfile didn't run the script, so production builds kept serving the stale checked-in services/web/public/robots.txt. Run the script before vite build so the public/ artifacts (and their copy into dist/) reflect the configured WEB_DOCS_URL.
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR extends the Docker build process for Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 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 |
Summary
Two follow-ups to #1686 caught when verifying the deployment:
Mobile-nav "Read Docs" button still hardcoded. The previous
replace_allin feat(web): make docs URL configurable via WEB_DOCS_URL build arg #1686 only matched the desktop button because the mobile one inside the<div className="mt-2 flex flex-col gap-2">block sits at a different indentation level. The bundle still ships a literalhttps://docs.tale.devfor the mobile menu. This commit switches it toDOCS_URLlike the desktop sibling.build-llms-artifacts.tschanges never reached production. The webDockerfileonly ranvite build+ the server bundle — it never invokedscripts/build-llms-artifacts.ts, soservices/web/public/robots.txt(a stale checked-in file containingSitemap: https://docs.tale.dev/sitemap.xml) was whatvite buildcopied intodist/. The npmbuildanddevscripts run the artifact builder before vite, so this is purely a Dockerfile inconsistency. Mirror that order in the Dockerfile.Pre-PR checklist
bun run check— not run by author; please verify locallyservices/platform/messages/{en,de,fr}.json— N/A/docs/{en,de,fr}/— N/Abun run --filter @tale/web lintandbun run --filter @tale/web test— not run by author; please verify locallyREADME.mdand translations — N/ATest plan
WEB_DOCS_URL=https://tale.dev/docs. Confirm the bundled JS no longer contains the literal"https://docs.tale.dev"outside of the fallback constant declaration, and thatdist/robots.txt's secondSitemap:line points athttps://tale.dev/docs/sitemap.xml.robots.txtstill referencehttps://docs.tale.devas before.Summary by CodeRabbit
Release Notes
Build Updates
Mobile Navigation