fix(web): UX/a11y polish + middleware metadata route fix

- footer.tsx: Discord link → canonical discord.gg/PUwSMR9XNk
  (was outdated invite that 404'd).
- [locale]/layout.tsx: hooks count 40 → 54 (matches AGENTS.md).
- lib/stats.ts:88: drop '!' non-null assertion; use '??' fallback.
  Removes the only '!' in packages/web (project rule).
- nav-header.tsx: hamburger Button size='icon' → explicit h-11 w-11;
  mobile drawer links min-h-11 px-3 rounded-md. WCAG 2.5.5 tap
  target 44x44 minimum.
- install-command.tsx: copy button h-8 w-8 → h-11 w-11 (was 32px,
  below WCAG). Icon stays 16x16; padding fills to 44.
- middleware.ts: matcher excludes opengraph-image, twitter-image,
  icon, apple-icon, manifest.webmanifest, robots.txt, sitemap.xml.
  Previously next-intl redirected /opengraph-image → /en/opengraph-image
  breaking OG previews for crawlers that hit the unlocalized path.
This commit is contained in:
YeonGyu-Kim
2026-05-20 14:26:09 +09:00
parent 68b80e0343
commit 7e0406f4ec
6 changed files with 38 additions and 20 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
import type { Metadata } from "next"
import type { JSX } from "react"
import type { JSX, ReactNode } from "react"
import { notFound } from "next/navigation"
import { hasLocale } from "next-intl"
import { setRequestLocale } from "next-intl/server"
@@ -8,10 +8,10 @@ import { routing } from "@/i18n/routing"
export const metadata: Metadata = {
description:
"Meet Sisyphus: The batteries-included agent that codes like you. Multi-model orchestration, background agents, 40+ lifecycle hooks.",
"Meet Sisyphus: The batteries-included agent that codes like you. Multi-model orchestration, background agents, 54+ lifecycle hooks.",
}
export function generateStaticParams() {
export function generateStaticParams(): Array<{ readonly locale: string }> {
return routing.locales.map((locale) => ({ locale }))
}
@@ -19,7 +19,7 @@ export default async function LocaleLayout({
children,
params,
}: {
children: React.ReactNode
children: ReactNode
params: Promise<{ locale: string }>
}): Promise<JSX.Element> {
const { locale } = await params