Skip to content

Conversation

@wotan-allfather
Copy link

Closes #320

  • Add custom 404 page matching the app's design system
  • Include PatternedBackground and proper dark mode support
  • Provide navigation links to homepage and boards
  • Add i18n support with @lingui/react

Copy link
Contributor

@hjball hjball left a comment

Choose a reason for hiding this comment

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

Great start @wotan-allfather, but this doesn't currently solve the cases in the issue. We'll need to:

  • Redirect/show /404 if the workspace doesn't exist for public boards, something like:
useEffect(() => {
    if (router.isReady && workspaceSlug && !isLoading) {
      if (error?.data?.code === "NOT_FOUND" || (!data && !isLoading)) {
        router.replace("/404");
      }
    }
  }, [router, workspaceSlug, isLoading, error, data]);
  • Same for any public card modal
// Redirect to 404 if card doesn't exist
  useEffect(() => {
    if (isOpen && cardPublicId && !isLoading) {
      if (error?.data?.code === "NOT_FOUND" || (!data && !isLoading && error)) {
        // Close modal first, then redirect
        closeModal();
        router.replace("/404");
      }
    }
  }, [isOpen, cardPublicId, isLoading, error, data, closeModal, router]);

wotan-allfather added a commit to wotan-allfather/kan that referenced this pull request Feb 8, 2026
Add useEffect hooks to redirect to /404 page when:
- Board does not exist in board view
- Card does not exist in card view

This addresses the cases mentioned in maintainer feedback where
the static 404 page wasn't being used for dynamic routes.

Addresses review feedback on PR kanbn#349
Closes kanbn#320

- Add custom 404 page matching the app's design system
- Include PatternedBackground and proper dark mode support
- Provide navigation links to homepage and boards
- Add i18n support with @lingui/react
Add useEffect hooks to redirect to /404 page when:
- Board does not exist in board view
- Card does not exist in card view

This addresses the cases mentioned in maintainer feedback where
the static 404 page wasn't being used for dynamic routes.

Addresses review feedback on PR kanbn#349
Per maintainer feedback:
- Add redirect logic to public boards view when workspace doesn't exist
- Add redirect logic to public card modal when card doesn't exist
- Uses error?.data?.code === 'NOT_FOUND' check as suggested
- Closes modal before redirecting for card modal
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.

404 page seems to be rather blank

2 participants