Skip to content

fix: header breadcrumb garbling when a long domain overflows the row#277

Merged
UtkarshBhardwaj007 merged 1 commit into
mainfrom
fix/header-breadcrumb-overflow
Jun 4, 2026
Merged

fix: header breadcrumb garbling when a long domain overflows the row#277
UtkarshBhardwaj007 merged 1 commit into
mainfrom
fix/header-breadcrumb-overflow

Conversation

@UtkarshBhardwaj007
Copy link
Copy Markdown
Member

Problem

With a long domain, the deploy TUI header rendered as:

playground deplo  ·  devsignerutkplayground.do  · paseo next v2v0.28.5
  • playground deploy clipped to playground deplo
  • the domain lost the final t of .dot
  • the version label glued onto the network name with no gap

Root cause

The header row is capped at LAYOUT.ruleWidthMax (72), and paddingLeft sits inside that width (yoga is border-box), so the breadcrumb really gets 70 columns. The content above needs 73+. On overflow, yoga distributes the shrink across every <Text> node, clipping each piece without ellipsis, and the gap before the version label (flexGrow leftover) collapses to zero. Reproduced character-for-character with a scripted Ink render.

Fix

New pure module src/utils/ui/theme/headerLayout.ts pre-computes the breadcrumb so the left side always fits and yoga never has to shrink anything. Degradation order, mildest first:

  1. narrow the separators ( · to ·)
  2. tighten the gap before the version label (2 spaces to 1)
  3. middle-truncate the username, then the domain, to a legible floor — middle-truncation keeps the .dot suffix visible
  4. below-floor truncation if still too tight
  5. drop the username, then the domain, entirely

cmd and the network label are never cut. The field repro now renders losslessly:

playground deploy · devsignerutkplayground.dot · paseo next v2 v0.28.5

Verification

  • 8 tests in headerLayout.test.ts, including the exact field repro pinned as a regression test
  • visual renders checked at 120/60/40 cols, with and without a username
  • pnpm format:check, pnpm lint:license, pnpm test (637 passed) all green; tsc --noEmit error count unchanged at the 13 baseline
  • changeset included (patch)

The header row is capped at ruleWidthMax (72) and paddingLeft sits inside
that width, so a long domain pushed the breadcrumb past the budget. Yoga
then distributed the shrink across every Text node: the cmd lost its last
char, the domain lost the final 't' of '.dot', and the flexGrow gap before
the version label collapsed to zero.

Pre-compute the breadcrumb in a pure sibling module so the left side
always fits and yoga never shrinks anything. Degradation order, mildest
first: narrow the separators, tighten the version gap, middle-truncate
username then domain (keeping the '.dot' suffix visible), below-floor
truncation, then drop the squeezable pieces entirely. cmd and network are
never cut. The exact field repro is pinned as a regression test.
@UtkarshBhardwaj007 UtkarshBhardwaj007 merged commit a9a8ad3 into main Jun 4, 2026
19 checks passed
@UtkarshBhardwaj007 UtkarshBhardwaj007 deleted the fix/header-breadcrumb-overflow branch June 4, 2026 14:39
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Dev build ready — try this branch:

curl -fsSL https://raw.githubusercontent.com/paritytech/playground-cli/main/install.sh | VERSION=dev/fix/header-breadcrumb-overflow bash

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

E2E Test Pass · ✅ PASS

Tag: e2e-ci-pr · Branch: fix/header-breadcrumb-overflow · Commit: 77f35b3 · Run logs

Cell Result Time
pr-preflight ✅ PASS 2m55s
pr-deploy-cdm ✅ PASS 3m39s
pr-deploy-frontend ✅ PASS 8m09s
pr-mod ✅ PASS 1m26s
pr-install ✅ PASS 0m50s
pr-init-session ✅ PASS 1m56s
pr-deploy-foundry ✅ PASS 1m29s
${{ matrix.cell }} ⏭️ SKIP 0m00s
${{ matrix.cell }} ⏭️ SKIP 0m00s

Sentry traces: view spans for this run

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.

1 participant