Repository navigation
Fixes 30522: bound the incident severity chip so a long translation cannot push the Assignee column off screen - #31898
Conversation
… off screen Fixes open-metadata#30522. The inline severity/status chip carried `max-w-max` + `whitespace-nowrap`, so in an auto-layout table its intrinsic width was the column's floor — the column grew to whatever the translation needed, with no bound. In ru-RU the severity placeholder composes `label.no-entity` with `label.severity` into "Критичность инцидента отсутствует": 208px of text against 67px for English "No Severity". Measured on /incident-manager at 1440x900 with unassigned rows, the chip rendered 254px wide, the Severity column 306px (194px in en-US) and the table 1256px inside a 1178px scroll container — so the Assignee column sat at x=1508 and was cut off at the right edge. At 1280 the column and its header were gone entirely. The chip is now capped at 11rem and the label truncates inside it, with `title` surfacing the full string on hover. Truncation is visual only: the text stays in the DOM, so the button's accessible name is unchanged. 11rem is measured, not guessed. It leaves 140px of text room, which clears the longest translated *status* label in any of the 20 shipped locales (131px, ru-RU "Назначен исполнитель"), so the two status-chip call sites — the Incident Manager Status column and the Data Quality tab — do not start truncating. English is unchanged at the pixel: the chip measures 103px before and after, so the visual regression snapshots are unaffected. ru-RU at 1440 now lays out at 1178px, identical to English, with zero horizontal overflow and the Assignee column fully on screen. Note this is not the mechanism the 1.13.1 report described. That screenshot came from an antd Table whose Severity column was pinned at `width: 100`, which made the string overlap its neighbour; that table was replaced by the ui-core-components Table in 8570d36 / 2c90c83, which has no per-column width. What survived the migration is column inflation, not overlap. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Fixes open-metadata#30522. The regression this guards is a layout one, so the assertions are geometric: boundingBox widths and scrollWidth/clientWidth, never a class name. Asserting `toHaveClass('tw:truncate')` would pass just as happily with the column still overflowing. Three cases, all verified RED against the unfixed chip: - the Assignee cell's right edge stays inside the 1440px viewport (was 1508px); - the ru-RU severity pill is capped (was 254px), paired with an en-US control asserting a short label is still *not* clipped, so a cap that started ellipsising labels that already fit would fail too; - the truncated label is genuinely clipped (scrollWidth > clientWidth), exposes the full string via `title`, and keeps it in the button's accessible name. Rows are route-mocked so the geometry depends on string length rather than on whatever the environment happens to have ingested, and the helper waits on `document.fonts.ready` — fallback font metrics shift column widths by a few px and made the measurements flaky without it. This establishes the ru-RU pattern; LanguageOverride.spec.ts (de-DE) was the only other non-English spec in the repo. Note the visual regression suite cannot cover this: staticPages.spec.ts masks the incident table outright. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Follow-up to review on open-metadata#30522. The cap was applied to the shared CHIP_PILL_CLASS, which put the *status* chip 3.3px from truncating. The 176px budget was derived from an off-DOM probe span that under-reports Cyrillic by ~6px, because Inter's `unicode-range` subset is not active for a probe that never paints those glyphs. Measured in-DOM on the rendered chip, ru-RU "Назначен исполнитель" (Assigned) is a 136.7px label in a 172.7px pill, not the 130.2px the probe reported. Any retranslation, a fifth resolution status, or a typography-token change would have silently rendered "Назначен исполнит…" in the Incident Manager's primary column — a worse regression than the bug being fixed. A single shared constant cannot serve both columns. Measured by overriding max-width on the live pill, ru-RU at 1440x900: cap pill sevCol table overflow assignee right edge none 254px 306px 1263px 85px 1508px (off screen) 176px 176px 228px 1185px 7px 1430px (on screen) 192px 192px 244px 1201px 23px 1446px (off screen again) 192px is the smallest cap with real headroom over the 172.7px status pill, and it re-inflates the severity column by 16px and reinstates the bug. So the constraint is per-call-site: `truncateLabel` is opt-in and only severity uses it. Status keeps `max-w-max` and can no longer truncate by construction, which is a stronger guarantee than a threshold test. 176px still sits above every non-Russian severity pill (widest 168.6px, pt-BR) and below the Russian one, so exactly one locale truncates — the pathological one. The pill also gains its own `-pill` testid: react-aria's Button wraps children in an unstyled span.transition-inherit-all, so a positional `chip > span` locator measures that wrapper instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Follow-up to review on open-metadata#30522. - The pill assertion measured react-aria's `span.transition-inherit-all` wrapper, not the capped pill. It shrink-wraps to the same width today, so the test passed while measuring the wrong box and would have kept passing if the library ever added padding there. Addressed by its own testid now. - Test 2 asserts the severity `<td>` width before the pill width. The cell exists in both versions, so the RED is a real measurement (306px against a 240px budget) rather than a missing-testid error; the pill assertion then pins which box does the bounding. - Tests 3 and 4 assert `toBeVisible()` before measuring. `.evaluate()` on a missing locator never rejects, so without the fix they hung for 135s (tripled by test.slow) and reported "Target page has been closed". They now fail in 16.7s on the real assertion. - New guard: status chips must never truncate, exercised against all four resolution statuses in ru-RU where their labels are longest. This does not reproduce the bug — status is unbounded before and after — it guards the decision that the cap stays off the shared chip. The status fixture is deliberately separate from the reported-scenario fixture: in ru-RU an "Assigned" incident renders a 172.7px status pill and widens the Status column by ~98px, which would confound the severity geometry assertions. That is its own width contributor and is disclosed rather than fixed — the headline test is scoped to the reported all-New scenario and says so. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… bound Follow-up to round-2 review on open-metadata#30522. Two corrections, one of them to a claim this branch asserted as established fact. **The "forced choice" justification was wrong.** The previous comment said a shared cap safe for the status column "needs >= ~192px". It does not: the widest status pill is 172.7px (ru-RU "Назначен исполнитель") and 176 > 172.7, so a shared 176px cap is already safe today. Measured cap sweep on the live pill, ru-RU at 1440x900 with the nav expanded: cap severity td assignee right edge 176px 228 1430 on screen 180px 232 1434 on screen 184px 236 1438 on screen 188px 240 1442 off screen 192px 244 1446 off screen Any cap in [173, 184] satisfies both columns, so opt-in is a preference, not a necessity. The real argument — now the one in the code — is that the band is 11px wide and Tailwind's scale offers exactly one step inside it, and that a shared cap would leave status 3.3px of headroom where opt-in leaves it unbounded. Robustness, honestly labelled. **`title` and `truncate` were applied unconditionally**, so every status chip and every already-fitting chip advertised a native tooltip repeating its own visible text. Both are now gated on the bound. `truncateLabel` becomes `maxLabelWidth?: string`, which drops the 4th boolean and puts the value where it belongs: the budget is a property of the column, so the severity column now owns its own constant and its derivation. Status chips keep max-content sizing and gain no tooltip; their DOM gains one inert span wrapper, which is what makes the status guard test measurable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Follow-up to round-2 review on open-metadata#30522. The spec was passing for the wrong reason and failing on this branch. **It failed as committed.** `severity <td> <= 240px` is not a chip bound — it asserts how CSS auto-layout hands out *surplus* container width. The same correctly-capped 176px pill yields a 228px column with the nav expanded and 266px with it collapsed, so the assertion failed whenever the nav was collapsed. It is replaced by a bound on the chip button, which measures 258px unbounded and 180px capped in both states, and the case now runs against both. **The headline test was a false GREEN.** `isSidebarCollapsed` is persisted in localStorage per user, so it rides inside the saved storageState and varies by machine. It moves the table's container between 1178px (expanded) and 1334px (collapsed), and at 1334px the *unfixed* layout already fits — assignee edge 1423px, zero overflow. A run with a collapsed nav therefore passed against b4a27e7 without the fix present. The nav is now pinned explicitly, defaulting to expanded (the product default, `defaultPreferences.isSidebarCollapsed: false`), and the container width is asserted as a precondition so a layout change that moves it fails loudly instead of quietly changing what the geometry means. Pinning waits on the sidebar's settled offsetWidth rather than its `sidebar-open` class: the class flips synchronously with the preference while the Sider animates, so a class-based wait returns mid-transition and the container reads 1329px instead of 1178px. Verified RED under the pinned condition: 1508 > 1440 for the assignee edge, and 258 > 182 for the chip in both nav states. Also asserts status labels carry no `title`, matching the tooltip gating. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…hat it bounds Follow-up to round-3 review on open-metadata#30522. Both are cleanups; neither changes layout. **Dead test hook.** `data-testid="${dataTestId}-pill"` was added in round 2 to target the pill directly, then made redundant in round 3 when the assertion moved to the chip button (the button is the element that exists in both the fixed and unfixed trees, which is what gives that test a real geometric RED). Nothing referenced it — not the Jest suite, not the new spec, not any existing test — so it was shipping an unused hook into production DOM. Removed. **`maxLabelWidth` -> `maxChipWidth`.** The class lands on the pill, not the label: the pill also carries 16px of horizontal padding, 2px of border, a 2px gap and a 16px chevron. `tw:max-w-44` (176px) therefore leaves the label 140px, and the button around it measures 180px. The old name invited a future caller to size the prop from a measured text width and come out ~36px short — the same measure-the-wrong-thing mistake that cost this branch two review rounds. The JSDoc now states the chrome breakdown explicitly. Removing the attribute changes rendered DOM, so the Playwright spec was re-run: 5 passed. Jest 102 suites / 1305 tests pass; tsc unchanged at its 549-error baseline. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
| test('keeps the Assignee column on screen when the Russian severity placeholder is rendered', async ({ | ||
| openIncidentManager, | ||
| }) => { | ||
| test.slow(true); |
There was a problem hiding this comment.
Seems like we are not doing lot of thing in the test, so test.slow will not required here!
| const test = base.extend<{ openIncidentManager: OpenIncidentManager }>({ | ||
| openIncidentManager: async ({ browser }, use) => { | ||
| const contexts: BrowserContext[] = []; | ||
|
|
||
| await use( | ||
| async ( | ||
| locale: string, | ||
| { incidents = REPORTED_INCIDENTS, navExpanded = true }: OpenOptions = {} | ||
| ) => { | ||
| const context = await browser.newContext({ | ||
| locale, | ||
| storageState: 'playwright/.auth/admin.json', | ||
| viewport: VIEWPORT, | ||
| }); | ||
| contexts.push(context); | ||
|
|
There was a problem hiding this comment.
We do not need to perform this many steps in building fixture, this could lead in flakiness.
Also if test needs only admin user, that can be achieved by adding one line
test.use({ storageState: 'playwright/.auth/admin.json' });
ref.
and other stuff can be achieved via beforeEach block
| test(`bounds the Russian severity chip regardless of its column, with the nav ${navLabel}`, async ({ | ||
| openIncidentManager, | ||
| }) => { | ||
| test.slow(true); |
There was a problem hiding this comment.
same here we do not required test.slow
There was a problem hiding this comment.
Please check in bother blocks as well, seems we dont need elsewere
| className={`${CHIP_PILL_CLASS} ${ | ||
| maxChipWidth ?? 'tw:max-w-max' | ||
| } tw:bg-[var(--chip-bg)] tw:text-[var(--chip-color)] tw:border-[var(--chip-border)]`} |
There was a problem hiding this comment.
can we use classNames function here?
…Each Review feedback: the bespoke `base.extend` fixture stood up its own BrowserContext per call, which is both more setup than this spec needs and more surface to go flaky on. The admin session is one `test.use` line, and routing + navigation belong in `beforeEach`. Locale can then be declared per describe rather than threaded through a fixture argument, so the ru-RU and en-US assertions split into their own blocks — which also removes the one test that drove two pages at once. The status guard gets its own block for the same reason: its fixture rows differ, so it no longer has to re-navigate over the default ones. `test.slow` is dropped everywhere. Each case now loads a single page and measures it; the whole file runs in ~18s against the default 60s timeout. Behaviour is unchanged: 14/14 at --repeat-each=2, and with the bound removed the same four cases still fail RED (chip 258px vs <= 182px, label overflow 0 vs > 0, assignee edge off screen). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TXvtzE39do8yqojYWGKTaX
Review feedback on the template literal. The palette classes move to their own constant so the call reads as three named parts rather than an interpolation split across lines. The label's conditional class stays a ternary on purpose: it resolves to `undefined` so an unbounded chip carries no `class` attribute at all, where classNames would leave an empty one. Also collapses the `label.no-entity`/`label.severity` composition in InlineSeverity into one local — it was rendered three times, which is the sonarjs/no-duplicate-string warning CI reported on this PR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TXvtzE39do8yqojYWGKTaX
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
…ition Every severity assertion in this spec reached its element positionally, which is a strict-mode escape hatch rather than a locator: it resolves to whichever chip the DOM happens to order first and keeps passing if the row under test stops rendering one at all. The fixtures already give each row a unique test-case name, so scope to `pw_locale_incident_0` — the row deliberately built without a `severity`, which is what makes it render the "No Severity" placeholder these assertions measure. Each locator now resolves to exactly one element, and strict mode enforces that rather than the test silently measuring a neighbour. The status-chip guard kept a positional visibility check purely as a wait before `toHaveCount`, which already retries on its own. Drop it and assert the layout instead: a label that never laid out measures 0/0, which the clipping check below would read as "not clipped", so the widths are now established before anything is concluded from them. Titles and file path are untouched, so the seeded timing-baseline entries still key correctly — re-running discovery returns the same seven stable IDs. All seven pass locally against the branch's own UI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Code Review ✅ Approved 1 resolved / 1 findingsBounds the incident severity chip to prevent long translations from pushing the Assignee column off screen. No issues found. ✅ 1 resolved✅ Quality: Bounded chip always sets title, even when label is not truncated
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
…aseline The step built `history_args` from the downloaded full-run artifacts and reached for `.github/playwright/timing-baseline.json` only when that array came out empty. `gh run download` prints nothing on success, so a run could log 49 failures across its 50 candidates, quietly succeed on the 50th, and drop the baseline on the strength of that one artifact. Everything already covered by an artifact was unaffected, which is why this went unnoticed: the only entries that exist solely in the baseline are the ones an author seeds for a brand-new spec file, exactly as the stale-baseline gate's error text tells them to. Those were discarded, and the gate then failed the plan for a file that did have history — so a new spec file was unseedable whenever any artifact was available, which is most of the time. PR open-metadata#31898 hit this twice (runs 32933633223 and 32937328644). build_playwright_shards.py now folds the baseline in itself at lower precedence than anything passed via --history, so the fallback here is not just redundant but actively harmful — it re-introduces the baseline as a peer of the artifacts, diluting the p75 those weights are built from. Drop it, and log how many artifacts actually resolved so the next person can see at a glance what fed the planner. Blocked by open-metadata#31898, which carries the build_playwright_shards.py change. Merging this first would leave a zero-artifact run with no history at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>



Describe your changes:
Fixes #30522
The issue title says severity and assignee overlap. Nothing overlaps on current
main. The 1.13.1 screenshot came from an Ant DesignTablewhose Severity column was pinned atwidth: 100; that table was replaced by theui-core-componentsTablein8570d36830/2c90c83ae3, which has no per-columnwidthorellipsis. (overflow-xalso computes tovisibleon the<table>despite thetw:overflow-x-hiddenclass, becauseoverflowdoes not apply todisplay: table— the wrapper genuinely scrolls, nothing is clipped or collided.)What survived the migration is column inflation. In ru-RU,
label.no-entity+label.severitycomposes toКритичность инцидента отсутствует— 218px of rendered text against 67px for English "No Severity". The chip is nowrap and unbounded, so its intrinsic width becomes the column's floor:chip 258px → Severity column 306px → table 1263px inside a 1178px container → the Assignee column's right edge lands at 1508px on a 1440px viewport.
Validating against the original screenshot will not match. Validate against the before/after described under "UI screen recording" below.
The symptom requires the left nav to be EXPANDED. The nav moves the table's container between 1178px (expanded) and 1334px (collapsed); collapsed, the pre-fix layout happens to fit (assignee edge 1423px, zero overflow). A maintainer reproducing with the nav collapsed will see no bug and conclude the report was wrong.
What changed
Screen.Recording.2026-08-25.at.4.57.28.PM.mov
ChipTriggergains an opt-inmaxChipWidth; only the severity call site passes it (tw:max-w-44, 176px). The label truncates inside the pill, withtitlesurfacing the full string on hover. Truncation is visual only — the text stays in the DOM, so the button's accessible name is unchanged. Both the truncation and thetitleare gated on the prop, so an unbounded chip gains neither.Why 176px, measured on the live pill (ru-RU @1440, nav expanded):
<td>max-w-44, chosen)max-w-48)Why the bound is opt-in rather than on the shared pill. The widest status pill already renders 172.7px (ru-RU
Назначен исполнитель), so a shared cap would have to sit in the narrow [173, 184] band — and Tailwind's scale offers exactly one step inside it. A shared 176px cap would leave the Status column 3.3px of headroom, so any retranslation oflabel.assigned, a fifth resolution status, or a typography-token change would silently truncate the Incident Manager's primary column. Opt-in leaves status unbounded, which no future measurement can invalidate.All widths were measured in-DOM on the rendered chip after
document.fonts.ready. An off-DOM probe under-reports Cyrillic by ~6px, because Inter'sunicode-rangesubset is not active for glyphs it never paints.Result (ru-RU, 1440×900, nav expanded)
English is unchanged (chip 106.8px, table 1178px expanded / 1334px collapsed), so visual-regression snapshots are unaffected.
Known residuals — this improves the page, it does not fully resolve the locale's layout
Assignedincident in ru-RU still overflows.Назначен исполнительrenders a 172.7px status pill, adding ~98px to the Status column and putting the assignee edge at 1527px. Not fixed — bounding status would truncate the primary column (see above).tw:overflow-x-autowrapper scrolls.Separately,
label.severityis a generic key reused in 13 places whose ru-RU value means "criticality of the incident" rather than "severity". Shortening it would fix this at the source and shrink the column for free, but it is a translation change affecting every other consumer, so it is deliberately out of scope here.Type of change:
High-level design:
N/A — small change (2 source files, 3 lines of behaviour). The rationale and the measured constants live in the code comments on
maxChipWidthandSEVERITY_CHIP_MAX_WIDTH.Tests:
Use cases covered
title) and in its accessible name, and still opens the severity dropdown.Unit tests
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/TestCaseStatus/InlineIncidentStatus/ChipTrigger.test.tsx(4 cases, new file —ChipTriggerhad no test file).titleexposes it when bounded, and an unbounded chip gets no tooltip. The geometry is asserted in Playwright.src/components/DataQuality,src/components/IncidentManager,src/components/Database/Profiler,src/pages/IncidentManager: 102 suites / 1309 tests pass.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/IncidentManagerLocaleLayout.spec.ts(5 cases).The assertions are measured geometry (
boundingBox(),scrollWidth/clientWidth), never class names — atoHaveClass('tw:truncate')assertion would pass with the layout still broken. Each was verified RED against the unfixed tree:Expected: <= 1440 / Received: 1508Expected: <= 182 / Received: 258Expected: <= 182 / Received: 258titleNotes for reviewers:
<td>width, which is not a chip bound — CSS auto-layout hands surplus container width to the column, so the same 176px pill yields 228px expanded and 266px collapsed.isSidebarCollapsedis persisted per user inlocalStorage, so it rides inside the savedstorageStateand varies by machine; without pinning, a collapsed-nav run passes against the unfixed code.chromiumproject and route-mocks its data, so it creates no entities and needs no seeded fixtures — a cheap, non-mutating addition.--workers=2 --repeat-each=3, plus 10/10 at--workers=2 --repeat-each=2in an independent check.Manual testing performed
docker compose -f docker/development/docker-compose.yml up -d openmetadata-server) and served the UI from the branch on:3210.admin@open-metadata.org, an admin withEditAllon test cases so the chevron affordance renders.No Severityand the Assignee column is fully visible.Критичность инциде…with the chevron still visible, and the Assignee column (Исполнитель) is fully on screen, including its inline edit button.Критичность инцидента отсутствует.Критичность инцидента отсутствует,Severity 1…Severity 5; selectedSeverity 3and confirmed it saved and re-rendered unclipped.Assignedand confirmed the Status chip readsНазначен исполнительin full, with no ellipsis and no hover tooltip.UI screen recording / screenshots:
Not attached — this PR is opened as a draft for that reason.
The recording must capture, at minimum:
Исполнитель отсутствуетfully visible and the severity chip ellipsised;Assignedstate, showing the Status chip is not truncated and has no tooltip;Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>My PR is linked to a GitHub issue via
Fixes #<issue-number>above.I have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: N/A — no schema changes.
For UI changes: I attached a screen recording and/or screenshots above. — outstanding; PR is a draft until attached.
I have added tests (unit / integration / Playwright as applicable) and listed them above.
I have added a test that covers the exact scenario we are fixing. The issue number is referenced in both
IncidentManagerLocaleLayout.spec.tsand themaxChipWidthJSDoc.🤖 Generated with Claude Code
Greptile Summary
The PR bounds the Incident Manager severity chip so long localized labels truncate without pushing the Assignee column off screen, while retaining the full label for accessibility and hover discovery.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (5): Last reviewed commit: "test(playwright): address the incident r..." | Re-trigger Greptile