Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/components/layout/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ export const NavBar = () => {
href={crumb.href}
className="capitalize overflow-hidden text-ellipsis whitespace-nowrap text-zinc-500"
>
{startCase(crumb.label)}
{crumb.label}
</Link>
) : (
<span className="capitalize text-zinc-900 dark:text-zinc-100 overflow-hidden text-ellipsis whitespace-nowrap">
{startCase(crumb.label)}
{crumb.label}
</span>
)}
</div>
Expand Down
14 changes: 10 additions & 4 deletions frontend/utils/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,16 @@ export const generateBreadcrumbs = (ctx: NavigationContext): NavigationItem[] =>
export const generatePageTitle = (ctx: NavigationContext): string => {
const breadcrumbs = generateBreadcrumbs(ctx)

// Filter out empty labels and reverse for title (most specific first)
const titleParts = breadcrumbs
.filter((crumb) => crumb.label && crumb.label.trim())
.map((crumb) => startCase(crumb.label))
const filteredCrumbs = breadcrumbs.filter((crumb) => crumb.label && crumb.label.trim())

// Apply startCase to all except the first breadcrumb (team/org name)
const titleParts = filteredCrumbs
.map((crumb, index) => {
if (index === 0 && ctx.team) {
return crumb.label
}
return startCase(crumb.label)
})
Copy link

Choose a reason for hiding this comment

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

Bug: Breadcrumb Title Formatting Issue

The generatePageTitle function's logic to skip startCase for the first breadcrumb assumes it's always an organization name. This causes incorrect title formatting for non-team routes (e.g., "Sign Up") and when earlier breadcrumbs are filtered, leading to app names not being properly startCased.

Fix in CursorΒ Fix in Web

.reverse()

if (titleParts.length === 0) {
Expand Down