Repository navigation
fix(components): a wide table's right seam shadow shows when the table widens after its rows are drawn - #37253
Merged
objectstack-fleet[bot] merged 3 commits intoNov 25, 2026
Conversation
…idth useHorizontalOverflow watched the scroll box and its direct children only. A shadcn Table sits in a full-width wrapper, so when the <table> widened past the box with no row added, nothing called the read and the right seam shadow never drew (Studio metadata list, nightly live spec). Claude-Session: https://claude.ai/code/session_01QSeKYnxVj5xoUcFUWLa5Aw Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnxVj5xoUcFUWLa5Aw Co-authored-by: Claude <noreply@anthropic.com>
…le's width Claude-Session: https://claude.ai/code/session_01QSeKYnxVj5xoUcFUWLa5Aw Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
Contributor
Author
|
repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H Landing · 2026-11-25T08:54Z · head
|
objectstack-fleet
Bot
deleted the
claude/issue-37239-sharing-rules-seam-shadow
branch
November 25, 2026 09:17
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #37239
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ui/packages/components/src/custom/use-horizontal-overflow.ts(useHorizontalOverflow): the box re-reads its overflow when the box, each child of the box, or each child's own children resize. Before, it watched the box and its direct children only.Tablewrapper (relative w-full,overflow-visibleinside a box that scrolls). The wrapper keeps the box's width, so when the table element widens past the box with no row added and the box unchanged, no observer fired,overflowRightstayedfalse, anddata-table's right seam shadow (data-table-scroll-shadow-right) was never drawn.HorizontalOverflowBox(data-overflow-rightand its edge or pinned seam), so a table placed in that box inside a wrapper (the approvals inbox mounts one that way) follows the table's width too. Pinned below; not measured live.@object-ui/componentspatch.Why
Nightly
nightly-tiersrun 45554381420 (0a1b69c0b) failedui/e2e/live/declared-sharing-rules-reach-13091.spec.ts: the seam shadow was not found within 5 s although the table's scroll box was wider than its client box.Which suspect it is. #36978 (
c48f06c87, the metadata list on ObjectGrid) is the change that exposed it, and is not itself wrong. It moved the list ontodata-tableand pointed the spec atdata-table's shadow. That shadow carried a latent defect inuseHorizontalOverflow, and the new list's layout hits it about half the time. #37089 (the permission set full-screen) is ruled out: it does not touch this list's grid or the overflow hook. Nothing else changed the data-table seam shadow between the last green nightly (d9c799c10, 2026-11-24) and the red one. The only otherdata-table.tsxedit in that window is #37124 (the footer summary row), which does not touch the overflow read.Measured DOM (Chromium 1440x1000, this tree's Console against the workspace showcase backend, a requestAnimationFrame log of the scroll box from first paint):
childis the wrapper, the box's only child, and it stays at 1134 throughout. That is why the old read never ran. The scrollbar-at-rest read indata-tablealready observed the table element itself, which is why the bar showed while the shadow did not.So the product regressed, and the spec is unchanged. It still measures that the controls are in reach and that a seam shows while columns remain to the right.
Tests
data-table-scroll-shadow-12463.test.tsx: a new top-level describe. A recordingResizeObservercalls back only the observers watching the element that resized, as a browser does. The table element alone grows past the box (no scroll, no row added), and the shadow is drawn. CONTROL: a table that grows but still fits draws none.horizontal-overflow-12708.test.tsx: a new top-level describe, the same reading forHorizontalOverflowBoxwith a wrapped table. CONTROL: a resize of the wrapper itself still re-reads.Read first (by risk):
use-horizontal-overflow.ts: the nested observe loop. It adds observers on grandchildren and changes no read.data-table-scroll-shadow-12463.test.tsx: the recording observer and the new describe.Two-minute check:
pnpm --dir ui exec vitest run packages/components/src/renderers/complex/__tests__/data-table-scroll-shadow-12463.test.tsx. Expect 8 passed, including "draws the shadow once the table alone grows past the box".Unit and package runs at ddb6f6f: both pin files 15/15; the whole components package 510 files passed, 1 skipped; type-check green
Local gate families at ddb6f6f: 38 derived, 38 run, every one exit 0
Acceptance notes
scripts/ablation-replace.mjs): deleting the grandchild-observe line,anchor 1 -> 0, blob 7965aaa9a907 -> aae15c0c6be7, makes both new pins fail. The data-table one fails with "Unable to find an element by: data-testid=data-table-scroll-shadow-right", and both CONTROLs stay green (Tests 2 failed | 13 passed (15)). Restored:blob == HEAD (7965aaa9a907),git diff HEADempty. Both test files import the hook from source, so no build is involved.Verification
The stack the nightly boots, step for step:
ui/e2e/live/ci/start-backend.sh(this tree's CLI servingexamples/app-showcase, a throwaway database), the Console built withVITE_BASE_PATH=/and served byvite preview, then Playwright fromui/withplaywright.live.config.ts, Chromium.Before the fix (main at d7f299c): the spec fails 5 of 10 repeats, with the nightly's error
After the fix (Console rebuilt from this branch): 20 of 20, and the whole nightly list 28 of 28
The backend and the preview server this run started were stopped by their recorded PIDs.
Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (CI)main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code