Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
2521160
feat(console): the side preview opens 460 wide and drags from 380 to …
claude Nov 22, 2026
01f2ad0
feat(record-page): the side preview's header puts the record's name f…
claude Nov 22, 2026
c779a7d
test(record-page): the preview's copy-id assertions find the icon by …
claude Nov 22, 2026
ae96065
feat(record-page): a child list's tab in the side preview draws one r…
claude Nov 22, 2026
097c165
chore(changeset): the side preview tightening (36149, 36201)
claude Nov 22, 2026
ee38012
Merge remote-tracking branch 'origin/main' into claude/issue-36149-pr…
claude Nov 22, 2026
79bcf99
chore(changeset): grade the side preview changeset patch, as Metadata…
claude Nov 22, 2026
8b2b665
Merge remote-tracking branch 'origin/main' into claude/issue-36149-pr…
claude Nov 22, 2026
d890096
fix(console): an object that authors its drawer width keeps it in the…
claude Nov 22, 2026
e3fd50c
Merge branch 'main' into claude/issue-36149-preview-tighten
objectstack-fleet[bot] Nov 22, 2026
88832eb
Merge branch 'main' into claude/issue-36149-preview-tighten
objectstack-fleet[bot] Nov 22, 2026
f4aaee6
docs(console): an authored-width object's preview shares its per-obje…
claude Nov 22, 2026
db0edef
fix(console): reset a drawer's width on a key switch; the record-page…
claude Nov 22, 2026
192a0fe
docs(console): a record page's drawer reads the authored size; a key …
claude Nov 22, 2026
9be7333
docs(console): a drawer's width belongs to its root; the list reads t…
claude Nov 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .changeset/36149-side-preview-tighten.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'@object-ui/components': patch
'@object-ui/plugin-grid': patch
'@object-ui/plugin-detail': patch
'@object-ui/app-shell': patch
---

feat(record-page): the side preview opens 460 wide, puts the record's name first with one labelled action, and lists a child tab one row per record

Clause-②: yes (widening) — new optional members only: `RecordHeaderBar.preview` and `PageHeaderActionsProps.preview` on `@object-ui/components`, `ObjectGridComponentProps.cardFace` on `@object-ui/plugin-grid`; nothing removed or renamed
Metadata-protocol: none

The record preview that opens beside a list (and a record page's drawer level) is now a narrow pane:

- **Width.** It opens 460 px wide (at most 92% of the window). Its left edge drags it from 380 to 900 px. The dragged width is remembered in the browser under one key for every object's preview, not per object. A drawer whose `navigation` authors its width (`navigation.size` other than `auto`, or a `navigation.width`, pixel or percent) does not use that key. The list's preview reads the view's `navigation`, then the object's; a record page's drawer reads only its root record's object's `navigation`. Such a drawer keeps the object's per-object key (`recordOverlayWidthStorageKey`, unchanged), which it shares with that object's calendar, gantt, kanban, tree and grid overlays and a resizable `RecordDetailDrawer`, and opens at the authored width until a width is dragged in that drawer or one of those overlays. For an object that authors no size or width, the console's preview no longer shares a width with that object's calendar, gantt, kanban, tree or grid overlay or its `RecordDetailDrawer`. The width and its key belong to the drawer's root and stay with it: child levels keep the root's width, and in the list a record a lookup chip opens as the root takes the list's width and key (the list object's, not the opened record's). On a record page, a drawer closed and next opened on another object's record opens at that object's width, not the width dragged for the previous one.
- **Header.** The record's name comes first. The row shows at most one labelled action, the page's primary. The host's Edit and every other action go into the `⋯` in their usual order. The primary folds into the `⋯` too while the name would be cut below 16 characters' width. The copy-id icon after the name is gone, and 「Copy record ID」 is in the `⋯` instead. The full name is the name's tooltip. An approval's approve / reject levers and the record page's edit state (Cancel, Save) are drawn as before. A page's own header is unchanged.
- **`@object-ui/components`: every resizable drawer's range.** The range lives in `NavigationOverlay`, so it applies to every drawer opened with a `storageKey`: the calendar, gantt, kanban, tree and grid overlays, a resizable `RecordDetailDrawer`, and the console's preview. The drag range was 360 px to 60% of the window; it is now 380 to 900 px. On a 1920 px window the widest drag drops from 1152 to 900 px. On a 1024 px window a dragged or remembered width can now reach 900 px, where 60% of the window (614 px) capped it before; the drawer still never draws wider than the window less 1rem. A remembered width under 380 px is no longer used: the drawer opens at its host's width. A drawer whose `storageKey` changes while it stays mounted now drops the previous key's width when the new key remembers none, and opens at its host's width.
- **Child tabs.** A child list's tab draws one row per record (its title, one summary line and its status chip), the phone's card rows, instead of a table cut off at the pane's edge. `ObjectGrid` takes a new host prop, `cardFace`, that draws those rows at any window width.
22 changes: 19 additions & 3 deletions content/docs/frontend/plugins/plugin-view.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -508,13 +508,29 @@ ignore a modifier click too.

In the Console's object pages, a record that opens in the drawer opens in a
drawer **over the list**, and the list keeps its full width. The drawer is
720 px wide, and the reader can drag its edge from 360 px to 60% of the
viewport. It draws no dimming overlay and is non-modal, so the list behind it
stays readable and clickable:
460 px wide, and the reader can drag its edge from 380 px to 900 px. The
dragged width is remembered in the browser and applies to every object's
drawer, except one whose `navigation` authors a `size` (other than `auto`) or a
`width` (pixel or percent). The list's drawer reads the view's `navigation`,
then the object's; a record page's drawer reads its root record's object's.
Such a drawer keeps that object's own remembered width, shared with its
calendar, gantt, kanban, tree and grid overlays and a resizable
`RecordDetailDrawer`: it opens at the authored width until a width is dragged
in it or in one of them. The width belongs to the drawer's root. A child level
keeps the root's width, and in the list a record a lookup chip opens as the
root takes the list's width and remembered width, not those of the opened
record's object. The drawer draws no dimming overlay and is non-modal, so the
list behind it stays readable and clickable:

- the open record's row is highlighted and follows the drawer's ↑ ↓;
- clicking another row swaps the record.

The drawer's header puts the record's name first. It draws at most one
labelled action, the page's primary, and only while the name keeps room for
about 16 characters. There is no Edit button and no copy-id icon: Edit, Copy
record ID and every other action are in the header's `⋯`. A child list's tab
in the drawer lists one row per record (its title and one summary line).

Readers who prefer the full page choose it in the list's Display menu (Open
records: Drawer or Full page). That choice is the reader's own, stored in the
browser, never metadata.
Expand Down
2 changes: 1 addition & 1 deletion docs/qa/platform-checklist/areas/records-forms.json
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,7 @@
]
},
"steps": [
"open the Northwind account's full record page: from /_console/apps/com.example.showcase/showcase_account, clicking Northwind opens a ~720 px record DRAWER (the console's default record-open mode, ui/packages/app-shell/src/views/ObjectView.tsx), not the full page steps[1] reads — open it full page with the drawer's 'Open as full page' (↗), or load /_console/apps/com.example.showcase/showcase_account/record/ID directly",
"open the Northwind account's full record page: from /_console/apps/com.example.showcase/showcase_account, clicking Northwind opens a ~460 px record DRAWER (the console's default record-open mode, ui/packages/app-shell/src/views/ObjectView.tsx), not the full page steps[1] reads — open it full page with the drawer's 'Open as full page' (↗), or load /_console/apps/com.example.showcase/showcase_account/record/ID directly",
"screenshot at 1440×900; enumerate the related lists. The page draws the record's tab row — Details (详情), one tab per related list in its order (an empty one muted, with no number), Attachments, Approvals (while a request exists), then Activity (动态) last with its count, the tabs that do not fit folded into its 'More N' (更多 N) dropdown (ui/packages/plugin-detail/src/RecordPageColumns.tsx, the tab row; ui/packages/plugin-detail/src/RecordTabRow.tsx; #35595), so a role=tab strip is expected: enumerate the lists from it (QA run #33861 read the earlier records-first row). The primary lists (relatedList: 'primary' — Invoices on showcase_invoice.account, Projects on showcase_project.account) are body tables among the 详情 tab's details and take no tab, and every non-primary child — Contacts among them — is a tab of its own whose face is the whole list with its pager (packages/spec/src/data/field.zod.ts relatedList: 'true = an auxiliary panel on the record page; absent = an auxiliary panel, except that a master_detail field becomes a body table when a field group of the parent names it (fieldGroups[].relatedList)', and for 'primary': 'a body table: part of the record's main content'). With those tables among its details the account's full page never pins the details in a left column (ui/packages/plugin-detail/src/synth/recordPageColumns.ts#recordPagePinsDetails, #35890): the same tab row at every width, and no right rail (retired, #35890)",
"open Contacts' whole list: its tab opens it in place (?related=showcase_contact.account); capture the page-1 data request. An enlarged list whose block names no limit pages 25 rows (ui/packages/plugin-detail/src/RecordPageColumns.tsx, ENLARGED_PAGE_SIZE), so the pager reads 'Page 1 of 2' for Northwind's 26 contacts (QA run #27438)",
"click next-page; capture the page-2 request; note the pager text ('Page 2 of 2', one row)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
* ruling on objectstack#36112 (7069868269) moved it to 1280 px and accepted
* the cost. `CONSOLE_EXPANDED_SIDEBAR_WIDTH` restates the sidebar primitive's
* `--sidebar-width` (fixed at 256, objectstack#36112 F2) and
* `RECORD_DRAWER_WIDTH` plugin-view's default drawer width, so this reads both
* off their owners and holds them equal, and the cost stated on the ruling is
* the one the code pays.
* `RECORD_DRAWER_WIDTH` the side preview's default width (objectstack#36149),
* so this reads both off their owners and holds them equal, and the cost the
* code pays is the one stated beside the threshold.
*/

import '@testing-library/jest-dom/vitest';
import { render } from '@testing-library/react';
import { SidebarProvider } from '@object-ui/components';
import { overlayWidthFor } from '@object-ui/plugin-view';
import { RECORD_PREVIEW_DEFAULT_WIDTH } from '../../views/recordDrawerContext';
import { describe, expect, it } from 'vitest';
import {
CONSOLE_EXPANDED_SIDEBAR_WIDTH,
Expand Down Expand Up @@ -56,23 +56,23 @@ describe('the console sidebar threshold (objectstack#27593, #29109, #36112)', ()
expect(CONSOLE_EXPANDED_SIDEBAR_WIDTH).toBe(256);
});

it('restates the drawer a list record opens in (plugin-view’s md bucket)', () => {
// `min(92vw, 720px)`: the px term is the drawer's width on any desktop window.
const match = /^min\(92vw, (\d+)px\)$/.exec(overlayWidthFor('md', {}));
expect(match, 'overlayWidthFor answers min(92vw, Npx)').not.toBeNull();
it('restates the drawer a list record opens in (the side preview’s default, objectstack#36149)', () => {
// `min(92vw, 460px)`: the px term is the drawer's width on any desktop window.
const match = /^min\(92vw, (\d+)px\)$/.exec(RECORD_PREVIEW_DEFAULT_WIDTH);
expect(match, 'the default answers min(92vw, Npx)').not.toBeNull();
expect(Number(match![1])).toBe(RECORD_DRAWER_WIDTH);
});

it('is 1280 px, the ruling’s number (7069868269)', () => {
expect(CONSOLE_SIDEBAR_RAIL_BELOW_WIDTH).toBe(1280);
});

it('pays the cost the ruling accepted: at 1280 px the expanded sidebar leaves the list 304 px beside the drawer, the collapsed one 560', () => {
it('at 1280 px the expanded sidebar leaves the list 564 px beside the 460 px preview, the collapsed one 820: the cost the ruling accepted at 720 is gone', () => {
const { expanded } = primitiveSidebarWidths();
expect(listBesideDrawer(CONSOLE_SIDEBAR_RAIL_BELOW_WIDTH, expanded)).toBe(304);
expect(listBesideDrawer(CONSOLE_SIDEBAR_RAIL_BELOW_WIDTH, expanded)).toBeLessThan(LIST_MIN_COLUMNS_WIDTH);
expect(listBesideDrawer(CONSOLE_SIDEBAR_RAIL_BELOW_WIDTH, expanded)).toBe(564);
expect(listBesideDrawer(CONSOLE_SIDEBAR_RAIL_BELOW_WIDTH, expanded)).toBeGreaterThanOrEqual(LIST_MIN_COLUMNS_WIDTH);
// Collapsed, the sidebar is hidden and takes no width (objectstack#35062).
expect(listBesideDrawer(CONSOLE_SIDEBAR_RAIL_BELOW_WIDTH, 0)).toBe(560);
expect(listBesideDrawer(CONSOLE_SIDEBAR_RAIL_BELOW_WIDTH, 0)).toBe(820);
});

it('a 1440 px window’s expanded sidebar still leaves the list its columns beside the drawer', () => {
Expand Down
24 changes: 13 additions & 11 deletions ui/packages/app-shell/src/layout/consoleSidebarRail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ import {
export const CONSOLE_EXPANDED_SIDEBAR_WIDTH = 256;

/**
* The record drawer's width in CSS pixels: a list record opens in the drawer
* at plugin-view's `md` overlay bucket, `overlayWidthFor('md', …)` =
* `min(92vw, 720px)` (objectstack#27545). `consoleSidebarRail.width-27593.test.tsx`
* The record drawer's width in CSS pixels: a list record opens in the side
* preview at `RECORD_PREVIEW_DEFAULT_WIDTH` = `min(92vw, 460px)`
* (objectstack#36149; 720 before). `consoleSidebarRail.width-27593.test.tsx`
* reads that value and holds this equal to it.
*/
export const RECORD_DRAWER_WIDTH = 720;
export const RECORD_DRAWER_WIDTH = 460;

/**
* The narrowest list that still draws its columns, in CSS pixels: the 440 px
Expand All @@ -84,13 +84,15 @@ export const LIST_MIN_COLUMNS_WIDTH = 440;
* wide and the narrow choice are kept on either side of it.
*
* Chosen, not derived. The record drawer beside the narrowest list that still
* draws its columns, next to an expanded sidebar, needs 440 + 720 + 256 =
* 1416 px, the threshold before; the ruling accepts the cost below that. A
* 1280 px window with the sidebar expanded leaves the list beside an open
* record drawer 1280 − 256 − 720 = 304 px (560 with the sidebar collapsed),
* and on 1280 to 1415 px with the sidebar expanded, opening the record page's
* comment panel returns its fields to the tab row; collapsing the sidebar
* gives the content the width back. The record page's own column tiers are
* draws its columns, next to an expanded sidebar, needed 440 + 720 + 256 =
* 1416 px when the drawer was 720, the threshold before; the ruling accepted
* the cost below that. Since the side preview opens at 460
* (objectstack#36149), a 1280 px window with the sidebar expanded leaves the
* list beside it 1280 − 256 − 460 = 564 px (820 with the sidebar collapsed),
* so the cost is gone at the preview's default width; a reader who drags it
* wider pays it again. On 1280 to 1415 px with the sidebar expanded, opening
* the record page's comment panel returns its fields to the tab row;
* collapsing the sidebar gives the content the width back. The record page's own column tiers are
* measured on the container it gets, so they follow either way.
*/
export const CONSOLE_SIDEBAR_RAIL_BELOW_WIDTH = 1280;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,33 @@ describe('a list opens a record one way: the name opens the page, the icon besid
},
);
});

/**
* objectstack#36149 — the list host hands its preview the width key the
* navigation resolved (`drawerWidthKey` → `widthKey`): the shared preview key
* for a view that authors no width, the object's own key for one that
* authors a size. Without that hand-over every preview reads the shared key.
*/
describe('the list preview remembers its width under the key its navigation resolves (objectstack#36149)', () => {
const SHARED = 'ov:drawer-width:record-preview';
const paneWidth = () =>
(document.querySelector('[data-record-drawer-card]') as HTMLElement | null)?.style.getPropertyValue('--ov-w').trim();
afterEach(() => window.localStorage.clear());

it('a view that authors `size: xl` opens at its size, not at the shared remembered width', async () => {
window.localStorage.setItem(SHARED, '600');
await openList(objectsWith({ size: 'xl' }));
fireEvent.click(panelIconOf('Alpha'));
await screen.findByRole('dialog', undefined, { timeout: 5000 });
expect(paneWidth()).toMatch(/^min\(92vw, \d+px\)$/);
expect(paneWidth()).not.toBe('600px');
});

it('CONTROL: a view that authors no width opens at the shared remembered width', async () => {
window.localStorage.setItem(SHARED, '600');
await openList(objectsWith());
fireEvent.click(panelIconOf('Alpha'));
await screen.findByRole('dialog', undefined, { timeout: 5000 });
expect(paneWidth()).toBe('600px');
});
});
3 changes: 2 additions & 1 deletion ui/packages/app-shell/src/views/ObjectView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ function ObjectViewInner({ dataSource, objects, onEdit, externalRefreshKey }: Co
// objectstack#27058 — on a phone the record is always a page: a row tap
// navigates to it, and no pane is mounted beside or over the list.
const phone = usePhoneViewport();
const { listRecordActions, navOverlay, handleDrawerClose, handleRowClick, handleOpenAsPage, handleOpenRowInPanel, handleOpenReferencedRecord, drawerRoot, drawerRestore, handleListRowsChange, handleListTotalChange, handleRootStep, listLabel } = useObjectViewRecordNavigation({
const { listRecordActions, navOverlay, drawerWidthKey, handleDrawerClose, handleRowClick, handleOpenAsPage, handleOpenRowInPanel, handleOpenReferencedRecord, drawerRoot, drawerRestore, handleListRowsChange, handleListTotalChange, handleRootStep, listLabel } = useObjectViewRecordNavigation({
activeView,
objectDef,
objects,
Expand Down Expand Up @@ -1704,6 +1704,7 @@ function ObjectViewInner({ dataSource, objects, onEdit, externalRefreshKey }: Co
<ObjectViewRecordOverlay
navOverlay={navOverlay}
mode={navOverlay.mode}
widthKey={drawerWidthKey}
list={pageColumn}
handleDrawerClose={handleDrawerClose}
objectDef={objectDef}
Expand Down
Loading
Loading