Skip to content

fix(routes): unify not-found boundaries - #1240

Merged
mftee merged 2 commits into
CodeGirlsInc:mainfrom
kilodesodiq-arch:feat/issue-1173-not-found-consistency
Aug 26, 2026
Merged

fix(routes): unify not-found boundaries#1240
mftee merged 2 commits into
CodeGirlsInc:mainfrom
kilodesodiq-arch:feat/issue-1173-not-found-consistency

Conversation

@kilodesodiq-arch

@kilodesodiq-arch kilodesodiq-arch commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #1173
Closes #1170
Closes #1171
Closes #1172

Unifies the root, locale, and document-specific not-found boundaries around one shared branded presentation while preserving translated copy in the locale boundary. Boundaries without locale context use the default English copy instead of maintaining a second inconsistent visual implementation.

Why

The three not-found boundaries duplicated markup and diverged in layout, link styling, and messaging. Centralizing the structure removes that drift while keeping the locale boundary's existing next-intl message source and the document boundary's distinct missing-anchor explanation.

What was built

File What it contains
frontend/components/NotFoundContent.tsx Shared 404 layout with stable branding, home navigation, and optional detail copy.
frontend/app/not-found.tsx Root boundary using the default English copy through the shared presentation.
frontend/app/[locale]/not-found.tsx Locale boundary using the existing translated notFound messages.
frontend/app/(protected)/documents/[id]/not-found.tsx Document-specific boundary using consistent branding and default-locale missing-anchor copy.
frontend/test-utils/not-found.test.tsx Render coverage for all three boundaries and their copy/navigation contracts.

Integration changes outside frontend/components/

  • frontend/app/not-found.tsx — replaced duplicated root markup with the shared presentation.
  • frontend/app/[locale]/not-found.tsx — retained locale-aware message lookup while using the shared presentation.
  • frontend/app/(protected)/documents/[id]/not-found.tsx — replaced the divergent document-specific markup with the shared presentation.

Acceptance criteria coverage

  • All three not-found boundaries render consistent branding and appropriately localized copy (frontend/components/NotFoundContent.tsx, all three boundary files, and frontend/test-utils/not-found.test.tsx — root/default, locale/translated, and document-specific render coverage)

Deliberately deferred

None.

Test plan

  • npm test — not run per request
  • npm run typecheck — not run per request
  • npm run lint — not run per request
  • npm run build — not run per request
  • Formatter — not run per request

Env vars / Notes

No new environment variables or public API surfaces. The root and document boundaries intentionally use default English copy because those boundaries do not receive a locale parameter; the locale boundary continues to resolve notFound translations through next-intl.

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@kilodesodiq-arch Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@kilodesodiq-arch is attempting to deploy a commit to the Mftee's projects Team on Vercel.

A member of the Team first needs to authorize it.

@mftee mftee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No merge conflicts with main. Unifying not-found boundaries across routes is a good consistency fix - approving.

@mftee
mftee merged commit fcc7336 into CodeGirlsInc:main Aug 26, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants