Skip to content

feat(landing): give create-plugin a real, locale-fallback-safe Use/Build frontdoor - #180

Draft
777genius wants to merge 5 commits into
fix/authoring-usedocslinks-locale-fallbackfrom
feat/authoring-landing-frontdoor
Draft

feat(landing): give create-plugin a real, locale-fallback-safe Use/Build frontdoor#180
777genius wants to merge 5 commits into
fix/authoring-usedocslinks-locale-fallbackfrom
feat/authoring-landing-frontdoor

Conversation

@777genius

@777genius 777genius commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Scope

Stacked on #179 (rebased from #178 after #179's landing/utils/docsLinks.ts
API 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.vue composed the exact same shared installer
marketing sections as index.vue and download.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:

  • new AuthoringHeroSection.vue and AuthoringJourneysSection.vue
  • two clearly separated cards: "Use plugins" (available now) and "Build
    plugins" (unreleased preview badge), linking to the real prepared
    .../docs/en/use/ and .../docs/en/build/ routes from
    website/tools/lib/journeys.mjs
  • a historical-v1 link to .../docs/en/legacy/v1/
  • kept the existing shared LazyCustomLogicSection (the v1 job-first
    templates: online-service/local-tool/custom-logic) below, unchanged - it's
    still accurate content for v1 maintainers and isn't mine to touch
  • copy mirrors the already-reviewed wording in root 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

  • No locale publishing. nuxt.config.ts already 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.json
    only.
  • No header/footer/nav wiring. Nothing in the app currently links to
    /create-plugin (checked - no reference in AppHeader.vue, AppFooter.vue,
    index.vue, or download.vue); it's reachable only by direct URL, same as
    before. 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 is
    unchanged 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.vue built its use/, build/,
and legacy/v1/ links by string-concatenating a suffix onto useDocsLinks()'s
docsUrl (which only fallback-checks the docs-root docPath, ''). Since none
of use/build/legacy/v1 have real content in ru/es/fr/zh
(landing/data/docsLocaleAvailability.generated.json), those three links
would have silently served untranslated pages to non-English visitors the
moment landing gets locale-aware routing - reopening the exact bug #179's
replaceDocsLocale/resolveDocsLocale API exists to prevent.

Fixed by merging #179 and calling replaceDocsLocale(url, locale, docPath)
directly with the correct docPath ('use', 'build', 'legacy/v1') for each
link instead of suffixing the pre-resolved root. No behavior change today -
landing has no locale-aware routing yet, so the resolved locale is always
en and both approaches produce the same URL - but it's now correct once
that changes, instead of silently wrong.

Evidence

  • pnpm run lint: 0 errors on the whole project (4 pre-existing unrelated
    warnings).
  • pnpm run test:registry: 39/39 passing (includes fix(landing): fall back to English docs links for untranslated locale pages #179's 6 docsLinks.test.ts
    cases; uses a live signed registry mirror fetched locally for this run, not
    committed - landing/public/registry etc. are gitignored).
  • pnpm run generate (full static Nuxt build, same env as CI): succeeded,
    134 routes prerendered including /create-plugin; inspected the actual
    prerendered HTML and confirmed the Use/Build titles, badges, and the three
    use/, build/, legacy/v1/ links resolve exactly as written, through the
    fallback-aware path this time.
  • Playwright: the existing create-plugin noindex/sitemap-exclusion test
    still 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).
  • Ran the full tests/browser/landing.spec.ts file 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 now
    exposes that state via a data-scroll-reveal attribute instead - a
    pre-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

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

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

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.
…s fallback-aware docsLinks API

Needed for the follow-up fix to AuthoringJourneysSection.vue's use/build/
legacy-v1 links (see the code comment added in c4ecdbc and the
independent-review finding in PR #180's body).
…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
777genius changed the base branch from docs/authoring-d4a-switcher-fix to fix/authoring-usedocslinks-locale-fallback September 7, 2026 02:05
@777genius 777genius changed the title feat(landing): give create-plugin a real Use/Build frontdoor feat(landing): give create-plugin a real, locale-fallback-safe Use/Build frontdoor Sep 7, 2026
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