Skip to content

bug(docs): 404 suggestions show English slugs, section pages lose Previous/Next, the search button's name doesn't match its label, and copy buttons fail silently #4909

Closed

Description

@yannickmonney

Problem

Several defects in the public docs site (docs.tale.dev) and the design-system docs site, mostly in the shared frame. Paths at main 715dc15ad.

# Site Defect Code What a reader sees
1 docs 404 suggestions are English slugs, not page titles services/docs/app/pages/not-found-page.tsx:2, :36-43 label each "Did you mean" card with slugLabel(slug). That helper is for pages "with no title to offer" (packages/ui/src/components/docs/suggest-pages.ts:59-73). Every docs page has translated titles, and the design-system site's 404 already uses them (services/ui-docs/app/pages/not-found-page.tsx:37, navPage(slug)) A German reader sees "Seite nicht gefunden" above cards such as "Develop / Mcp Endpoint" or "Platform / Admin / Api Keys": English, slug-cased, with "Api", "Mcp" and "Webdav"
2 docs Section landing pages have no Previous/Next /cloud resolves to slug cloud (services/docs/app/routes/$.tsx:20-28), but docs/nav.json lists cloud/index, and the same for self-hosted/index, self-hosted/install/index, platform/index and tutorials/videos/index. navNeighbours looks for the exact slug (services/docs/lib/content/nav-sections.ts:103-115), finds nothing and returns no neighbours The "Next" card from the page before leads to /cloud, which offers no "Next". Reading page by page dead-ends on 5 section pages, 15 across en/de/fr
3 both Search button: spoken name ≠ visible text (WCAG 2.5.3, Label in Name) packages/ui/src/components/docs/docs-search-trigger.tsx:31 sets aria-label={t('openSearch')} ("Open search", "Suche öffnen", "Ouvrir la recherche") over visible text t('searchPlaceholder') (:39: "Search documentation", "Dokumentation durchsuchen", "Rechercher dans la documentation") A voice-control user who says the visible label can't activate it, and screen readers announce a different name than the one shown
4 ui-docs A failed demo "Show code" load is an empty code panel that never retries services/ui-docs/app/components/demo/demo.tsx:31-40: a failed loadDemoSource sets source to '', and the next toggle returns early (if (source !== null) return;). :71-78 renders <CodeBlock code={source ?? ''} …> After a deploy or while offline, "Show code" opens an empty <name>.tsx block with no error, now and on every later toggle. Copying it copies nothing and still says "Copied"
5 both Copy buttons fail silently "Copy page" (packages/ui/src/components/docs/page-actions.tsx:51-62), "Copy code" (packages/ui/src/markdown/code-block.tsx:92-101) and "Copy link" (packages/ui/src/markdown/anchored-heading.tsx:93-106) only console.warn on failure; the heading button returns silently when navigator.clipboard is missing. The shared useCopy hook shows an error toast (packages/ui/src/hooks/use-copy.ts), but these don't use it When the clipboard is denied (permissions policy, embedded view, plain HTTP), the click does nothing visible and the reader pastes whatever was on their clipboard before
6 docs Assistant hand-off prompts are English (low) page-actions.tsx:25-35: Read ${markdownUrl} and answer my questions. and Use ${markdownUrl} as documentation context. German and French readers open ChatGPT, Claude or Cursor with an English prompt
7 docs Recent searches are shared across languages (low) services/docs/lib/content/use-docs-search-config.ts:37-38 uses one search index per language but one storage key, tale.docs.recentSearches.v1 A German reader's recent searches list English page titles from earlier English sessions

Expected

  1. Label suggestions with the localized page titles, as ui-docs does.
  2. Normalize foo to foo/index (or compare by slugRoute) in navNeighbours.
  3. Drop the aria-label so the visible text names the button, or start the label with the visible text.
  4. Keep failed loads retryable (null), show an error line with Try again, and show a loading state.
  5. Use useCopy or an equivalent error toast.
    6–7. Localize the prompts, and add the locale to the storage key.

Regression:

  • a not-found test in German asserts a translated title;
  • a navNeighbours('en', 'cloud') test returns neighbours;
  • a test finds the search button by its visible text;
  • a demo test with a rejected load shows an error and refetches on the next toggle.

On 715dc15ad all four fail.

Severity and owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions