From 15b149ca4987be8f629f1377455b91a67dc38b63 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Nov 2026 03:37:00 +0000 Subject: [PATCH 1/3] fix(console): full-height edge drawers have square corners The console's dialog corner rule skips left/right Sheets (they carry inset-y-0), so drawers pinned to three viewport edges are square while centred dialogs and bottom sheets keep the 1.25rem radius. A pin matches the shipped selector against the DOM the real primitives render. Claude-Session: https://claude.ai/code/session_01L6bhgWpXbemoAH9WZiykjb Co-authored-by: Claude --- .changeset/35411-edge-sheet-square-corners.md | 10 +++ .../edgeSheetSquareCorners-35411.test.tsx | 74 +++++++++++++++++++ ui/apps/console/src/index.css | 7 +- 3 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 .changeset/35411-edge-sheet-square-corners.md create mode 100644 ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx diff --git a/.changeset/35411-edge-sheet-square-corners.md b/.changeset/35411-edge-sheet-square-corners.md new file mode 100644 index 00000000000..c21cfa9de91 --- /dev/null +++ b/.changeset/35411-edge-sheet-square-corners.md @@ -0,0 +1,10 @@ +--- +'@object-ui/console': patch +--- + +fix(console): full-height edge drawers have square corners + +Clause-②: no +Metadata-protocol: none + +- The console stylesheet gave every dialog surface a 1.25rem corner radius, which also rounded the left and right drawers (the notification center, the record drawer, the side form drawer and every other full-height Sheet). Those drawers sit against the top, side and bottom of the window, so the rounding showed as a notch at their inner corners. The rule now skips full-height edge sheets; they render with square corners. Centred dialogs and bottom sheets keep the rounded corners. Drawer width, animation and content are unchanged. diff --git a/ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx b/ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx new file mode 100644 index 00000000000..c79b34a1276 --- /dev/null +++ b/ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx @@ -0,0 +1,74 @@ +/** + * The console's extra-rounded dialog corners skip full-height edge drawers + * (objectstack#35411). + * + * `index.css` gives every `role="dialog"` surface a 1.25rem radius. A left or + * right Sheet is fixed against the top, side and bottom of the viewport, so the + * radius showed as a notch at each inner corner. The rule now skips the Sheet's + * edge variants by the `inset-y-0` class their variant carries, while centred + * dialogs and bottom sheets keep the radius. + * + * The selector is read from the shipped stylesheet and matched against the DOM + * the real primitives render, so a change to either side is seen here. + */ +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { describe, expect, it } from 'vitest'; +import { render, screen } from '@testing-library/react'; +import { + Dialog, + DialogContent, + DialogTitle, + Sheet, + SheetContent, + SheetTitle, +} from '@object-ui/components'; + +const HERE = path.dirname(fileURLToPath(import.meta.url)); +const CSS = fs.readFileSync(path.resolve(HERE, '../index.css'), 'utf8'); + +/** The selector of the one rule that sets the 1.25rem dialog radius. */ +function roundingSelector(): string { + const rules = [...CSS.replace(/\/\*[\s\S]*?\*\//g, '').matchAll(/([^{}]+)\{([^{}]*)\}/g)] + .filter(([, , body]) => /border-radius:\s*1\.25rem/.test(body)) + .map(([, selector]) => selector.trim()); + expect(rules).toHaveLength(1); + return rules[0]; +} + +function renderSheet(side: 'left' | 'right' | 'bottom' | 'top'): HTMLElement { + render( + + + {`${side} sheet`} + + , + ); + return screen.getByRole('dialog'); +} + +describe('edge sheets are not rounded by the dialog corner rule (#35411)', () => { + it('the rule still targets dialogs', () => { + expect(roundingSelector()).toContain('[role="dialog"]'); + }); + + it.each(['left', 'right'] as const)('a %s sheet is not matched', (side) => { + expect(renderSheet(side).matches(roundingSelector())).toBe(false); + }); + + it.each(['bottom', 'top'] as const)('a %s sheet keeps the rounded corners', (side) => { + expect(renderSheet(side).matches(roundingSelector())).toBe(true); + }); + + it('a centred dialog keeps the rounded corners', () => { + render( + + + centred + + , + ); + expect(screen.getByRole('dialog').matches(roundingSelector())).toBe(true); + }); +}); diff --git a/ui/apps/console/src/index.css b/ui/apps/console/src/index.css index 44658535c47..303259ad430 100644 --- a/ui/apps/console/src/index.css +++ b/ui/apps/console/src/index.css @@ -513,8 +513,11 @@ header.sticky { background-color: hsl(135 59% 49%) !important; } -/* iOS sheet/dialog: extra-rounded corners. */ -[role="dialog"] { +/* iOS sheet/dialog: extra-rounded corners, for surfaces that float or rise from + the bottom. A full-height edge drawer (the left/right Sheet, whose variant + pins it with `inset-y-0`) meets the viewport on three edges, so it keeps + square corners. */ +[role="dialog"]:not(.inset-y-0) { border-radius: 1.25rem !important; } From da6a95687d4a1826ac727aabdcca28f44644f7ed Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Nov 2026 04:04:40 +0000 Subject: [PATCH 2/3] test(console): read the corner rule's selector without a private comment strip The pin located the rule by stripping block comments with a regex, which the hand-rolled comment-mask gate refuses. It now finds the one declaration and slices back to the rule's selector. Claude-Session: https://claude.ai/code/session_01L6bhgWpXbemoAH9WZiykjb Co-authored-by: Claude --- .../edgeSheetSquareCorners-35411.test.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx b/ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx index c79b34a1276..eb238b3f56a 100644 --- a/ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx +++ b/ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx @@ -28,13 +28,20 @@ import { const HERE = path.dirname(fileURLToPath(import.meta.url)); const CSS = fs.readFileSync(path.resolve(HERE, '../index.css'), 'utf8'); -/** The selector of the one rule that sets the 1.25rem dialog radius. */ +const DECLARATION = 'border-radius: 1.25rem !important;'; + +/** + * The selector of the one rule that sets the 1.25rem dialog radius: the text + * between the end of whatever precedes the rule (a closing brace or the + * comment above it) and the rule's opening brace. + */ function roundingSelector(): string { - const rules = [...CSS.replace(/\/\*[\s\S]*?\*\//g, '').matchAll(/([^{}]+)\{([^{}]*)\}/g)] - .filter(([, , body]) => /border-radius:\s*1\.25rem/.test(body)) - .map(([, selector]) => selector.trim()); - expect(rules).toHaveLength(1); - return rules[0]; + const at = CSS.indexOf(DECLARATION); + expect(at).toBeGreaterThan(-1); + expect(CSS.indexOf(DECLARATION, at + 1)).toBe(-1); + const open = CSS.lastIndexOf('{', at); + const start = Math.max(CSS.lastIndexOf('}', open), CSS.lastIndexOf('*/', open) + 1) + 1; + return CSS.slice(start, open).trim(); } function renderSheet(side: 'left' | 'right' | 'bottom' | 'top'): HTMLElement { From 6d88e59bf54593a76495fc30fe31b075433a314d Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Nov 2026 04:51:51 +0000 Subject: [PATCH 3/3] test(console): the floating record drawer keeps its own radius The record drawer is a floating card that sets sm:rounded-xl; the pin now proves the console's dialog corner rule does not match it, so its own radius wins. The changeset no longer lists it among the square drawers. Claude-Session: https://claude.ai/code/session_01L6bhgWpXbemoAH9WZiykjb Co-authored-by: Claude --- .changeset/35411-edge-sheet-square-corners.md | 2 +- .../edgeSheetSquareCorners-35411.test.tsx | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/.changeset/35411-edge-sheet-square-corners.md b/.changeset/35411-edge-sheet-square-corners.md index c21cfa9de91..309c7cacc89 100644 --- a/.changeset/35411-edge-sheet-square-corners.md +++ b/.changeset/35411-edge-sheet-square-corners.md @@ -7,4 +7,4 @@ fix(console): full-height edge drawers have square corners Clause-②: no Metadata-protocol: none -- The console stylesheet gave every dialog surface a 1.25rem corner radius, which also rounded the left and right drawers (the notification center, the record drawer, the side form drawer and every other full-height Sheet). Those drawers sit against the top, side and bottom of the window, so the rounding showed as a notch at their inner corners. The rule now skips full-height edge sheets; they render with square corners. Centred dialogs and bottom sheets keep the rounded corners. Drawer width, animation and content are unchanged. +- The console stylesheet gave every dialog surface a 1.25rem corner radius, which also rounded the left and right drawers (the notification center, the side form drawer and every other full-height Sheet). Those drawers sit against the top, side and bottom of the window, so the rounding showed as a notch at their inner corners. The rule now skips full-height edge sheets; they render with square corners. The record drawer, a floating card, now shows its own corner radius instead of the global one. Centred dialogs and bottom sheets keep the rounded corners. Drawer width, animation and content are unchanged. diff --git a/ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx b/ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx index eb238b3f56a..421a7d2f33c 100644 --- a/ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx +++ b/ui/apps/console/src/__tests__/edgeSheetSquareCorners-35411.test.tsx @@ -8,6 +8,9 @@ * edge variants by the `inset-y-0` class their variant carries, while centred * dialogs and bottom sheets keep the radius. * + * The record drawer is the exception: it is a floating card (objectstack#35854) + * that sets its own radius, so the global rule must not override it either. + * * The selector is read from the shipped stylesheet and matched against the DOM * the real primitives render, so a change to either side is seen here. */ @@ -20,6 +23,7 @@ import { Dialog, DialogContent, DialogTitle, + NavigationOverlay, Sheet, SheetContent, SheetTitle, @@ -79,3 +83,37 @@ describe('edge sheets are not rounded by the dialog corner rule (#35411)', () => expect(screen.getByRole('dialog').matches(roundingSelector())).toBe(true); }); }); + +describe('the record drawer keeps its own floating-card radius (#35411, #35854)', () => { + // Renders the real NavigationOverlay drawer. Its own radius is asserted on + // the className it ships: the test DOM has no compiled Tailwind, so the + // utility's computed value is not readable here. + function renderRecordDrawer(): HTMLElement { + render( + {}} + setIsOpen={() => {}} + title="Lead" + width="720px" + mainContent={
} + > + {() =>
record body
} + , + ); + return screen.getByRole('dialog', { name: 'Lead' }); + } + + it('is not matched by the global rounding rule', () => { + const card = renderRecordDrawer(); + expect(card.hasAttribute('data-record-drawer-card')).toBe(true); + expect(card.matches(roundingSelector())).toBe(false); + }); + + it('carries its own radius class', () => { + expect(renderRecordDrawer().className.split(/\s+/)).toContain('sm:rounded-xl'); + }); +});