Conversation
Replace middleware with Next.js 16 proxy convention for locale detection. Use @formatjs/intl-localematcher + negotiator for Accept-Language header negotiation, supporting en/ja locales with sub-path routing (/en/*, /ja/*). All pages moved under app/[lang]/ with next-intl for translations.
# Conflicts: # components/canvas/EvidenceDialog.tsx # components/canvas/EvidenceEdge.tsx # components/canvas/GenerateLogicModelDialog.tsx # components/canvas/ImagePreview.tsx
Use next-intl's built-in createMiddleware(routing) instead of manual Negotiator + intl-localematcher implementation. This adds cookie-based locale persistence, SEO alternate link headers, and efficient rewrites. Remove unused dependencies: @formatjs/intl-localematcher, negotiator.
…ic 'Workflow failed' Fix error extraction path in SSE streaming route - Mastra places the Error object at event.payload.error, not event.payload.output.error. Add error categorization (high demand, rate limit, timeout, etc.) with i18n-aware user-friendly messages in both English and Japanese. Closes #218
Fix workflow error dialog showing generic 'Workflow failed'
…ercert to インパクト証明書, simplify strength levels - Rename `intent` to `goal` across codebase (variable names, API schema, workflow, prompts, docs) - Update UI labels: "What do you want to achieve?" / "何を実現したいですか?" - Translate "ハイパーサート" to "インパクト証明書" in Japanese locale - Remove "Level X -" prefix from strength level dropdown (star rating is sufficient) - Update button text and placeholder with EBP-aligned example
Remove duplicate effectTranslationKeys definitions from effect-filter.tsx and effects/page.tsx, consolidating into effect-icons.tsx as the single source of truth.
Replace manual ternary-based plural branching with ICU plural syntax in translation keys (itemCount, metricCount, filterActive). Removes duplicate singular/plural keys.
Rename effects.no → effects.noEffect, effects.noDescription → effects.noEffectDescription, hypercerts.noFound → hypercerts.notFound for clarity.
Hide specific API/service names (Semantic Scholar) from user-facing text, using generic terms like "external academic papers" instead.
feat: add i18n support with proxy-based locale routing
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔄 Release PR UpdatedNew changes have been pushed to 🤖 Updated by GitHub Actions |
PR Review: i18n + Goal Rename + Error CategorizationGreat work overall. This is a substantial PR that adds next-intl internationalization, renames Critical BugMiddleware in wrong file — locale routing will not work The next-intl middleware is written to Fix: rename Issues1.
2. Zod validation error messages not translated In goal: z.string()
.min(1, "Please enter your goal")
.max(1000, "Goal must be 1000 characters or less"),Either add translation keys for these or build the schema inside the component where 3.
Minor Notes4. What is done well
The middleware filename issue is the blocker to merge - everything else is functional with varying degrees of importance. |
Export images were too small with unreadable text due to OGP compositing (1200×630 with header/footer/padding). Export mode now uses high-res capture (pixelRatio: 2) directly without branding overlay, while IPFS save retains the existing OGP format.
fix(canvas): remove branding and improve export image quality
🔄 Release PR UpdatedNew changes have been pushed to 🤖 Updated by GitHub Actions |
|
PR Review for Release 2026-03-26 - please see detailed review below |
|
CRITICAL proxy.ts must be middleware.ts: Next.js only recognizes middleware at middleware.ts in the root. Without this fix, visiting / will 404 since app/page.tsx was deleted, and locale routing will not work at all. This is a blocker. |
|
SECURITY rawError in API responses: app/api/compact/route.ts and the SSE stream route return rawError in the HTTP response body, which can expose internal error details, stack traces, and model names to clients. Remove rawError from client responses and keep it server-side (logs only). errorCategory is fine to return. |
|
PERFORMANCE hypercert.tsx client component: Added use client + useTranslations to access 4 strings (unknown, untitled, noDescription, viewDetails), opting the Hypercert card out of server rendering unnecessarily. Use getTranslations from next-intl/server in the parent HypercertsList (already a server component) and pass translated strings as props to keep SSR. Also minor: buildProgressSteps moved into component body recreates the array on every render - move it back outside with t as a param. Also minor: Zod validation error messages in GenerateLogicModelDialog are still hardcoded English strings and will not be translated for Japanese users. |
|
Overall the i18n integration and error categorization work is solid. Highlights: error categorization in lib/workflow-errors.ts is clean with good cause-chain walking; key={item.href} in the navigation list is a correct fix (translated titles as keys was fragile); the intent-to-goal rename is thorough and consistent across workflow, API routes, hooks, and UI; generateStaticParams in the locale layout is correct; next-intl routing helpers are used consistently throughout. Two things to fix before merging: proxy.ts to middleware.ts rename (blocker), and removing rawError from API responses (security). |
Replace static PR body with dynamic changelog that lists merged PRs with nested sub-PRs. Update existing release PRs by editing the body instead of adding comments.
PR Review: Release 2026-03-26Great release — the i18n architecture is solid and the error categorization work is a meaningful improvement for UX. A few issues worth addressing before merge: CriticalMiddleware file is misnamed (proxy.ts instead of middleware.ts) The Next.js middleware for locale routing lives in proxy.ts instead of middleware.ts. Next.js only auto-loads middleware from a file named middleware.ts at the project root. As-is, locale detection and redirects (e.g. / to /en/, /canvas to /en/canvas) will silently not work — users hitting root-path routes will get a 404 or land on a non-locale-prefixed page. Fix: rename proxy.ts to middleware.ts. MediumrawError exposed in HTTP 500 responses (app/api/compact/route.ts) The raw Mastra/LLM error message returned as rawError in the 500 response body may include internal hostnames, API key references, stack frames, or model provider internals. Consider logging it server-side only and omitting from the API response, or restricting to authenticated/admin consumers. Zod validation messages not translated (components/canvas/GenerateLogicModelDialog.tsx) The schema still has hardcoded English strings for .min(1) and .max(1000) error messages. Japanese users will see English validation errors. These can be translated by constructing the schema inside the component after calling useTranslations, or by using a Zod custom error map seeded with locale strings. MinorbuildProgressSteps moved inside component body Before this PR it was a module-level function; now it is a nested function inside GenerateLogicModelDialog (recreated each render). It is only called in handleSubmit so there is no observable perf issue, but wrapping it in useCallback would make the intent clearer. Hypercert component unnecessarily converted to a client component (app/[lang]/hypercerts/hypercert.tsx) The component was given "use client" solely to call useTranslations. Since HypercertsList is already a server component using getTranslations, it could pass translated strings as props to Hypercert, avoiding the client boundary and preserving server-side rendering. What looks good
|
🚀 Release 2026-03-26
Changes
feat: i18n support (#217)
fix: workflow error messages (#219)
fix: export image quality (#223)
docs