Skip to content

Commit c729037

Browse files
fix(masthead): hide center comment on impl pages to free breadcrumb room
The center `""" specId.library """` echo at md+ steals ~340px from the `auto` grid column, leaving the breadcrumb cramped enough that the full `~/anyplot.ai · specId · language · library` truncates with `…` even on a 1280px viewport. The echo is also redundant on impl pages — the breadcrumb already shows all three parts. Hide the center cell once the URL has all three segments (`/:specId/:language/:library`). Landing, spec hub, and language hub keep their center comment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4adace8 commit c729037

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/src/components/MastheadRule.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ export function MastheadRule() {
131131
const parts = location.pathname.split('/').filter(Boolean);
132132
const isReserved = parts.length > 0 && RESERVED_TOP_LEVEL.has(parts[0]);
133133
const isSpecRoute = parts.length > 0 && !isReserved;
134-
const centerVisible = isLanding || isSpecRoute;
134+
// On impl pages (/:specId/:language/:library) the breadcrumb already shows
135+
// all three parts; the center `""" specId.library """` echo is redundant
136+
// and steals room that pushes the breadcrumb into truncation. Hide it.
137+
const isImplPage = isSpecRoute && parts.length >= 3;
138+
const centerVisible = (isLanding || isSpecRoute) && !isImplPage;
135139

136140
let centerContent = 'the open plot catalogue';
137141
let centerDelim: { open: string; close: string } = COMMENT_POOL[randomIdx];

0 commit comments

Comments
 (0)