Skip to content

fix(web): infra meta lines end in an ellipsis instead of clipping the last item - #1997

Merged
Makisuo merged 1 commit into
mainfrom
fix/meta-line-ellipsis
Oct 30, 2026
Merged

Makisuo merged 1 commit into
mainfrom
fix/meta-line-ellipsis

Conversation

@Makisuo

@Makisuo Makisuo commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #1992. Infra list rows show a sub-line like Function 1st gen · europe-west1 · acme-data. Every item in metaLine was shrink-0, so when the line overflowed, the last item was clipped mid-word with no ellipsis (acme-dat). #1992 made this visible on the GCP table, where the numeric columns rounded up to the width scale and the service column got about 26px narrower. The last item now shrinks (min-w-0), so its own truncate ends it in an ellipsis. Applies to every infra table that uses metaLine.

Screenshots

/lab/gcp-infra, dark, 1440px.

Before After

Verification

  • apps/web typecheck clean, oxlint -c .oxlintrc.effect.json clean.
  • Vitest: infra and GCP tests, 15 files / 79 tests pass.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Style
    • Improved metadata-line layout in narrow spaces: the final item can shrink to fit, while earlier items retain their width. This helps keep the line’s overflow display readable.

@Makisuo Makisuo added the preview:web Deploy a Workers-only PR preview (no ingest/Electric); see docs/pr-previews.md label Oct 30, 2026
@Makisuo
Makisuo deployed to pr-preview October 30, 2026 21:35 — with GitHub Actions Active
@maple-review-bot

maple-review-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 10/10 · safe to merge. One-line class change in a pure view helper; every metaLine caller traced, and plain-string last items keep their own truncate for the ellipsis.
1 note · tests not needed · risk low

Lets the last metaLine item shrink instead of staying shrink-0, so an overflowing infra sub-line ends in an ellipsis. Safe to merge; layout of non-overflowing lines is unchanged.

Findings

🔵 Note · F1 · Only plain-string last items get the new ellipsis; node items still clip

correctness · apps/web/src/page/infra/kit/meta-line.ts:35-38

Line 38 caps and truncates only plain strings, so a node last item shrinks without any truncate and the parent's overflow-hidden still cuts it mid-word — the new comment promises an ellipsis. The hosts sub-line's last item is platformLabel (infra/hosts/list/view-table.ts:101), so that table is unchanged.

Give the item wrapper `min-w-0`, and add `min-w-0 truncate` to `platformLabel`'s outer span so node last items ellipsize too.
🤖 Prompt to fix this finding with an AI agent
Findings from an automated review of commit 50ab2fb2cb2e942c0fc7ca167e700f2728cfbb26. Verify each one against the current code before changing anything, fix only those that still apply, and keep each fix to the lines it names.

---

F1 · Note · correctness · apps/web/src/page/infra/kit/meta-line.ts:35-38
Only plain-string last items get the new ellipsis; node items still clip
Line 38 caps and truncates only plain strings, so a node last item shrinks without any `truncate` and the parent's `overflow-hidden` still cuts it mid-word — the new comment promises an ellipsis. The hosts sub-line's last item is `platformLabel` (`infra/hosts/list/view-table.ts:101`), so that table is unchanged.
Suggested fix: Give the item wrapper `min-w-0`, and add `min-w-0 truncate` to `platformLabel`'s outer span so node last items ellipsize too.

50ab2fb · What was checked, coverage and telemetry details are on the Maple / review check. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: caecdc5a-0d28-447b-8fed-3746502130ea
Commits

Reviewing files that changed from the base of the PR and between 4fc0db5 and 50ab2fb.

Files selected for processing: 1
  • apps/web/src/page/infra/kit/meta-line.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Walkthrough

metaLine now allows its last item to shrink and keeps preceding items non-shrinking. A comment describes the intended overflow display.

Changes: Meta line layout

Layer / File(s) Summary
Item shrink behavior
apps/web/src/page/infra/kit/meta-line.ts
metaLine applies min-w-0 to the last item and shrink-0 to preceding items. A comment describes the last-item overflow behavior.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested labels: preview

Merge Risk: Minimal · up to 50ab2

No actionable merge-blocking risk is evident in the reviewed change.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: infra meta lines now end in an ellipsis instead of clipping the last item. The raw summary confirms the change to metaLine in apps/web/src/page/infra/kit/meta-line.ts,…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: infra meta lines now end in an ellipsis instead of clipping the last item. The raw summary confirms the change to metaLine in apps/web/src/page/infra/kit/meta-line.ts, where the last item can shrink (min-w-0) so its truncation shows an ellipsis. The title is specific, uses the conventional fix(web) prefix, and does not describe anything absent from the changeset.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🍁 Maple PR preview

Note

Preview resources were removed when this pull request closed.

Final commit 50ab2fb · View workflow run

@Makisuo
Makisuo deployed to pr-preview October 30, 2026 21:40 — with GitHub Actions Active
@Makisuo
Makisuo merged commit 35e3b34 into main Oct 30, 2026
32 checks passed
@Makisuo
Makisuo deleted the fix/meta-line-ellipsis branch October 30, 2026 21:53
@Makisuo
Makisuo deployed to pr-preview October 30, 2026 21:53 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
pr-preview — 50ab2fb2 Deployed Oct 30, 2026 by Makisuo via deploy-pr-preview #7978
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:web Deploy a Workers-only PR preview (no ingest/Electric); see docs/pr-previews.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant