feat(landing): give create-plugin a real, locale-fallback-safe Use/Build frontdoor - #180
Draft
777genius wants to merge 5 commits into
Draft
Conversation
… frontdoor The page composed the same shared installer sections as index.vue and download.vue, so it never actually described authoring. Give it its own Hero and Use/Build journey cards that link to the real prepared use/ and build/ docs routes, mirroring the wording already accepted in README.md (Build stays explicitly labelled unreleased preview, and this is not an announcement that the standard-first plugin-kit-ai v2 package is on npm). The historical v1 job-first templates keep their existing shared section below, unchanged, since that content is still accurate for v1 maintainers. English only: landing's locale routes are not published yet (see the existing note in nuxt.config.ts), so the new copy lives in locales/en.json only and relies on i18n's fallback rather than adding unpublished translations. Page stays noindex and unlinked from the header/footer, same as before.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
Card color comes from the --use/--build CSS class selector, not this field; independent review of #180 flagged it as dead code.
Independent review found that these three links bypass useDocsLinks()'s new fallback-aware resolution (PR #179) since they suffix docsUrl directly instead of resolving their own docPath. No live effect today (landing has no locale-aware routing yet), but whoever enables it needs to route through the fallback-aware API here instead of concatenating a suffix onto the always-'en'-today root URL.
…ck API Now that #179's landing/utils/docsLinks.ts API is stable, use replaceDocsLocale(url, locale, docPath) directly for the use/build/ legacy-v1 links instead of suffixing the docs root, closing the gap independent review found: string concatenation on top of docsUrl only fallback-checks the docs root docPath, so once landing gets locale-aware routing these three links would have silently served untranslated pages to non-English visitors instead of falling back to English like every other docs link on the site. No behavior change today (landing has no locale-aware routing yet, so currentLocale is always 'en' and both approaches produce the same URL).
777genius
changed the base branch from
docs/authoring-d4a-switcher-fix
to
fix/authoring-usedocslinks-locale-fallback
September 7, 2026 02:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Stacked on #179 (rebased from #178 after #179's
landing/utils/docsLinks.tsAPI landed and was confirmed stable - see "Locale-fallback correction"
below). First bounded slice of STATUS_AND_REMAINING item 3 (Phase 6 D4
landing), English only.
landing/pages/create-plugin.vuecomposed the exact same shared installermarketing sections as
index.vueanddownload.vue(Hero/Features/Screenshots/CustomLogic/Download/Comparison/FAQ). It never actually described
authoring - editing those shared sections in place would also have changed
the real installer pages, so this replaces the page's composition instead of
the shared components:
AuthoringHeroSection.vueandAuthoringJourneysSection.vueplugins" (unreleased preview badge), linking to the real prepared
.../docs/en/use/and.../docs/en/build/routes fromwebsite/tools/lib/journeys.mjs.../docs/en/legacy/v1/LazyCustomLogicSection(the v1 job-firsttemplates: online-service/local-tool/custom-logic) below, unchanged - it's
still accurate content for v1 maintainers and isn't mine to touch
README.md(D4a, docs: classify README/examples (D4a) and close switcher viewport-coverage gap #178):"Build plugins - unreleased preview", "not an announcement that the
standard-first plugin-kit-ai v2 package is available on npm"
What this deliberately does not do
nuxt.config.tsalready has an explicit,reasoned hold: "Localized landing routes are not published yet. Avoid
redirecting users and crawlers to locale URLs that GitHub Pages correctly
serves as 404." Publishing 5-locale landing routes (translated copy +
hreflang/canonical/sitemap/robots parity) is a separate, larger, riskier
slice that needs its own verification against the actual GitHub Pages
static-hosting shape - not bundled here. New copy lives in
locales/en.jsononly.
/create-plugin(checked - no reference inAppHeader.vue,AppFooter.vue,index.vue, ordownload.vue); it's reachable only by direct URL, same asbefore. Left it that way rather than surfacing an unreleased-authoring entry
point through primary navigation ahead of the release gates. Page stays
robots: noindex, follow(existing Playwright assertion for that isunchanged and still passes).
Locale-fallback correction (why this now depends on #179)
Independent review of this PR alongside #179 found a real latent gap: the
first version of
AuthoringJourneysSection.vuebuilt itsuse/,build/,and
legacy/v1/links by string-concatenating a suffix ontouseDocsLinks()'sdocsUrl(which only fallback-checks the docs-root docPath,''). Since noneof
use/build/legacy/v1have real content in ru/es/fr/zh(
landing/data/docsLocaleAvailability.generated.json), those three linkswould have silently served untranslated pages to non-English visitors the
moment landing gets locale-aware routing - reopening the exact bug #179's
replaceDocsLocale/resolveDocsLocaleAPI exists to prevent.Fixed by merging #179 and calling
replaceDocsLocale(url, locale, docPath)directly with the correct docPath (
'use','build','legacy/v1') for eachlink instead of suffixing the pre-resolved root. No behavior change today -
landing has no locale-aware routing yet, so the resolved locale is always
enand both approaches produce the same URL - but it's now correct oncethat changes, instead of silently wrong.
Evidence
pnpm run lint: 0 errors on the whole project (4 pre-existing unrelatedwarnings).
pnpm run test:registry: 39/39 passing (includes fix(landing): fall back to English docs links for untranslated locale pages #179's 6docsLinks.test.tscases; uses a live signed registry mirror fetched locally for this run, not
committed -
landing/public/registryetc. are gitignored).pnpm run generate(full static Nuxt build, same env as CI): succeeded,134 routes prerendered including
/create-plugin; inspected the actualprerendered HTML and confirmed the Use/Build titles, badges, and the three
use/,build/,legacy/v1/links resolve exactly as written, through thefallback-aware path this time.
create-pluginnoindex/sitemap-exclusion teststill passes unmodified; added a new focused test asserting the Use/Build
titles, badges, and real docs-journey links; both pass (re-verified after
the locale-fallback fix).
tests/browser/landing.spec.tsfile for a regression check:18 of 24 tests fail locally, entirely in homepage/download/catalog/mobile-
nav/security-badge areas this PR never touches (e.g. a stale
toHaveClass(/scroll-reveal/)assertion against#plugins, which nowexposes that state via a
data-scroll-revealattribute instead - apre-existing test/implementation mismatch unrelated to this change). Not
investigated further and not fixed here - flagging so it isn't confused
with a regression from this diff.
Not claimed
docs(authoring): prepare site consumer, historical routes, and locale corrections (D2b/D3) #176/docs: freeze generated preparation reference baseline (generated, mechanical) #177/docs: classify README/examples (D4a) and close switcher viewport-coverage gap #178/fix(landing): fall back to English docs links for untranslated locale pages #179 (draft).
header/footer nav changes are separate, unstarted work.