Skip to content

fix(web): apply WEB_DOCS_URL to mobile nav button and SEO artifacts#1687

Merged
yannickmonney merged 1 commit into
mainfrom
fix/web-docs-url-mobile
May 8, 2026
Merged

fix(web): apply WEB_DOCS_URL to mobile nav button and SEO artifacts#1687
yannickmonney merged 1 commit into
mainfrom
fix/web-docs-url-mobile

Conversation

@yannickmonney

@yannickmonney yannickmonney commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Two follow-ups to #1686 caught when verifying the deployment:

  1. Mobile-nav "Read Docs" button still hardcoded. The previous replace_all in 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 literal https://docs.tale.dev for the mobile menu. This commit switches it to DOCS_URL like the desktop sibling.

  2. build-llms-artifacts.ts changes never reached production. The web Dockerfile only ran vite build + the server bundle — it never invoked scripts/build-llms-artifacts.ts, so services/web/public/robots.txt (a stale checked-in file containing Sitemap: https://docs.tale.dev/sitemap.xml) was what vite build copied into dist/. The npm build and dev scripts run the artifact builder before vite, so this is purely a Dockerfile inconsistency. Mirror that order in the Dockerfile.

Pre-PR checklist

  • Ran bun run checknot run by author; please verify locally
  • Updated services/platform/messages/{en,de,fr}.json — N/A
  • Updated /docs/{en,de,fr}/ — N/A
  • Ran bun run --filter @tale/web lint and bun run --filter @tale/web testnot run by author; please verify locally
  • Updated README.md and translations — N/A

Test plan

  • Build with 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 that dist/robots.txt's second Sitemap: line points at https://tale.dev/docs/sitemap.xml.
  • Default build (no env): bundle and robots.txt still reference https://docs.tale.dev as before.

Summary by CodeRabbit

Release Notes

  • Build Updates

    • Web build process now generates and includes additional site-related assets during the build phase.
  • Mobile Navigation

    • The documentation link in mobile navigation is now configurable and can be customized through environment settings, replacing the previously hardcoded URL.

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.
@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 43e32a43-132d-4d98-bbf7-067e6d2db66f

📥 Commits

Reviewing files that changed from the base of the PR and between 9b6ebb0 and 64a2482.

📒 Files selected for processing (2)
  • services/web/Dockerfile
  • services/web/app/components/layout/site-header.tsx

📝 Walkthrough

Walkthrough

This PR extends the Docker build process for services/web to generate LLMS-related artifacts and sitemap/robots files before running Vite build, ensuring these assets are available in the final output. Additionally, the SiteHeader component's mobile documentation link is made configurable through the VITE_DOCS_URL environment variable instead of using a hardcoded URL.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the two main changes: applying WEB_DOCS_URL to the mobile nav button and fixing SEO artifacts in the Dockerfile.
Description check ✅ Passed The description provides a clear summary of the changes, explains the context from PR #1686, details test cases, and completes the pre-merge checklist with appropriate N/A markings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/web-docs-url-mobile

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 and usage tips.

@yannickmonney yannickmonney merged commit 61db4d5 into main May 8, 2026
12 checks passed
@yannickmonney yannickmonney deleted the fix/web-docs-url-mobile branch May 8, 2026 12:27
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.

1 participant