Action

Type

Resolved On

Smart MappingFixing2025-12-22

Description

When there’s no direct mapping between a currently visit URL to teammate’s, currently it will return page 404.

e.g. visit the project: bearlabs with the level: testing.

However, we’d like to handle such situation more gracefully and map to the closest team area.

Solution

src/components/navigation/benben/Sidebar.astro:

  • Iterates through existing mappings and attempts exact path match
  • Falls back to converting “benben” to “hygge” if no mapping found
  • Ensures invalid benben paths gracefully degrade to hygge equivalents

src/components/navigation/hygge/Sidebar.astro:

  • Mirror implementation for hygge to benben mapping
  • Provides fallback to base benben URL if no exact mapping exists
  • Prevents 404 errors by always returning a valid route

This ensures that visiting unmapped paths (e.g., bearlabs project with testing level) will navigate to the closest available team area instead of resulting in a 404 error.