Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 26 additions & 0 deletions .changeset/35685-list-cell-autosave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
'@object-ui/components': patch
'@object-ui/plugin-grid': patch
'@object-ui/i18n': patch
'@object-ui/react': patch
'@object-ui/plugin-list': patch
---

feat(list): a list cell saves the moment it is committed, and Space types into the selected cell

Clause-②: yes (widening) — new members on the `@object-ui/react` package entry: `createOwnWrites`, `OwnWritesContext`, `useOwnWrites` and the `OwnWrites` type, and an optional third parameter on `useDataInvalidation`; three new `table.*` keys in every `@object-ui/i18n` locale (`cellSaving`, `cellSaved`, `openRecordToFinish`); nothing removed or renamed
Metadata-protocol: none

In a grid that mounts `GridCellSelection` (the select-first grid every `ListView` draws), a committed cell edit is now saved at once, as one update for that record:

- **No save bar, no row Save/Cancel column, no amber row.** The cell shows a small spinner while the save runs and a check mark once it landed.
- **Only that row is redrawn**, from the record the write answered with, so a value a server hook rewrote shows as stored. The list is not read again, though the write is still announced to every other reader (the record's detail pane, related lists, counts): the grid holds the record in the list's `OwnWritesContext` registry for the length of its write, and `ListView` lets that one write go by. So a row whose new value would sort it elsewhere stays where it is until the next load (refresh, sort, filter or page change). The counts on group headers, read with the rows, follow on the next load too; the footer's whole-set summary is its own reader and still refreshes on the write.
- **A refused save keeps the typed value** and shows the server's reason on the cell. Esc puts the stored value back. Later edits on the same row are sent together with the refused one as one update. When the reason names a field the list does not show (a rule that needs another field), the notice offers to open the record.
- **The 409 conflict dialog is unchanged.** The next save on a row sends the version the previous save answered.
- **Space** on a selected cell now types a space and opens its editor, as any other key does. A two-state (boolean) cell still flips. The record opens from the title link or a touch tap; the "Space opens the record" key added in #35747 is gone, so a master-detail page opens its pane only that way too.

`@object-ui/react` adds that registry: `createOwnWrites()`, `OwnWritesContext` / `useOwnWrites()`, and `useDataInvalidation(objectName, recordId, ownWrites)`, which skips a change naming a held record.

Grids without `GridCellSelection` keep the staged save bar and its batch save unchanged.

New `table.*` strings in every locale: `cellSaving`, `cellSaved`, `openRecordToFinish`.
33 changes: 25 additions & 8 deletions content/docs/frontend/plugins/plugin-grid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -370,17 +370,31 @@ object and the view does not declare `userActions.editInline: false`, and
move right / left, and Escape cancels and keeps the cell selected. In a
multi-line editor Enter is a new line and Ctrl/Cmd+Enter commits. A click
elsewhere commits.
- **Selected cell keys:** the arrows and Tab move the selection; Space opens the
record (a checkbox cell flips instead, as does a second click on it);
Ctrl/Cmd+C copies; Ctrl/Cmd+V converts the text to the field's type and
commits it; Escape clears the selection.
- **Selected cell keys:** the arrows and Tab move the selection; Space is typed
like any other key and opens the editor (a checkbox cell flips instead, as
does a second click on it); Ctrl/Cmd+C copies; Ctrl/Cmd+V converts the text
to the field's type and commits it; Escape clears the selection. The record
opens from the name link, or a tap on a touch screen.
- **A cell that opens no editor says why** on the cell: the field is read-only,
calculated or not editable in a list, the reader may not edit the field, the
object or the record, the view turned editing off, or the record is locked
by an approval.

Commits are the grid's own staged edits: the row's Save / Cancel and the Save
All bar save them, as before.
**Each commit is saved at once** (objectstack#35685), as one update for that
record; there is no Save All bar, no row Save / Cancel and no amber row. The
cell shows a small spinner while its save runs and a check mark once it
landed. Only that row is redrawn, from the record the server answered with (a
value a server hook rewrote shows as stored); the list is not read again, so a
row whose new value would sort it elsewhere stays in place until the next load
(a refresh, a sort, a filter or a page change).

- **A refused save** keeps the typed value and shows the server's reason on the
cell. Escape puts the stored value back. A later edit on the same row is sent
together with the refused one, as one update. When the reason names a field
the list cannot edit, the notice offers to open the record.
- **A newer version** (409) still opens the conflict dialog: "Reload latest"
re-reads the list, "Overwrite anyway" writes over it and keeps the row in
place.

### Keyboard navigation

Expand Down Expand Up @@ -419,8 +433,11 @@ WAI-ARIA grid pattern (objectui#11068):
### Batch Editing & Multi-Row Save

Edit multiple cells across multiple rows and save them individually or all at
once. The schema half is just `editable` — the save/cancel affordances appear on
their own once a row has pending changes:
once. This is the model of a grid without the select-first cell model (a
related list, a dashboard table, an `object-grid` outside a list page); a list
page saves each cell as it is committed (above). The schema half is just
`editable` — the save/cancel affordances appear on their own once a row has
pending changes:

```json
{
Expand Down
12 changes: 9 additions & 3 deletions docs/qa/platform-checklist/areas/ux-conventions.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"title": "Every user-initiated write answers visibly — success names what changed, a refusal says why, and a no-op claims nothing",
"since": "v17.7",
"status": "active",
"revision": 14,
"revision": 15,
"priority": "P1",
"surface": "browser",
"personas": [
Expand All @@ -25,14 +25,14 @@
],
"knownGaps": [
"FIXED, regression row, expected PASS (objectui#11817): Setup → Users → Invite User toasts the copy of the delivery outcome the server answers (#27843): on a deployment that does not deliver mail the declared outcomeMessages.link_only, 'Invitation created for EMAIL. Mail is not configured on this server, so no email went out. Use Copy Invite Link on the invitation to share it.' (QA run #29890 read it verbatim), and 'Invitation sent to EMAIL' (outcomeMessages.sent) only where mail is delivered (packages/platform-objects/src/identity/invite-outcome-messages.ts#INVITE_USER_OUTCOME_MESSAGES on packages/platform-objects/src/identity/sys-user.object.ts#invite_user, whose successMessage `Invitation sent to {{ result.email }}` is the fallback for an answer without an outcome), interpolating the invitee from the action result — while the sys_invitation and sys_email rows are written (QA run #23163 at objectui 1fb1ced36243; pin ObjectView.inviteFeedback-11817.test.tsx)",
"FIXED, regression rows, expected PASS (QA run #23953 at objectui daeb77fc84dd): Studio Publish gives a success confirmation (objectui#11807); the task grid's 'Save All' toasts '1 row saved' (objectui#12303 fixed for this row); the approval decision's Approve toasted the framework-declared successMessage, read in the approvals drawer that route no longer has (variants[6]) `Approved \"{{ result.request.record_title }}\"` (packages/plugins/plugin-approvals/src/sys-approval-request.object.ts), e.g. Approved \"EXP-2001\" (#23157, closed). Studio's 'Discard draft' toast and its confirm now name the item by its LABEL — QA run #24570 at objectui 4016370a read 'Draft discarded: QA Widget' — a regression row, expected PASS (objectstack-ai/objectui#12690, closed by objectui PR #12830, 0f42aaf8, in the console pin 4016370a and on objectui main; ResourceEditPage.tsx falls back to type/name only for an item with no label)",
"FIXED, regression rows, expected PASS (QA run #23953 at objectui daeb77fc84dd): Studio Publish gives a success confirmation (objectui#11807); the task grid's row save toasts '1 row saved' (objectui#12303 fixed for this row; since #35685 it is the save each committed cell makes, with no Save All); the approval decision's Approve toasted the framework-declared successMessage, read in the approvals drawer that route no longer has (variants[6]) `Approved \"{{ result.request.record_title }}\"` (packages/plugins/plugin-approvals/src/sys-approval-request.object.ts), e.g. Approved \"EXP-2001\" (#23157, closed). Studio's 'Discard draft' toast and its confirm now name the item by its LABEL — QA run #24570 at objectui 4016370a read 'Draft discarded: QA Widget' — a regression row, expected PASS (objectstack-ai/objectui#12690, closed by objectui PR #12830, 0f42aaf8, in the console pin 4016370a and on objectui main; ResourceEditPage.tsx falls back to type/name only for an item with no label)",
"FIXED, regression row, expected PASS (objectui#11816): leaving an inline editor with no value change no longer reads '1 row modified · Save All (1)' (QA run #23163 at objectui 1fb1ced36243; pin data-table-noop-edit-11816.test.tsx) — negative[1]",
"Undo is scored only where a surface offers it, and on stock ONE surface does: the import. An import run as a job (the wizard's 'runs as an undoable job' option) is listed in the import history with 'Undo import', which deletes the records it created and restores the records it updated to their previous values; QA run #25817 at 6679644a read it working in both create and update modes. Elsewhere no stock surface offers Undo: only an action declaring `undoable` pushes an Undo op (inline and form edits push none), and the showcase declares no undoable action (records-forms.record-edit-undo, blocked(fixture)). So acceptance[5] is scored on the import variant. Undo's absence elsewhere is recorded in the evidence and is never a FAIL of this item: which writes should offer Undo is a product decision, not this item's oracle"
]
},
"variants": [
"record create — New form save on showcase_task",
"record inline edit — on any task list (since #35684 a list is editable in place wherever its reader may edit and its view declares no userActions.editInline: false; there is no 'Edit inline' toggle), double-click a Priority cell (a single click only selects it), change it, then Save row or Save All",
"record inline edit — on any task list (since #35684 a list is editable in place wherever its reader may edit and its view declares no userActions.editInline: false; there is no 'Edit inline' toggle), double-click a Priority cell (a single click only selects it), change it and commit it (Enter, Tab or a click elsewhere): since #35685 the cell saves at once, as one update — a spinner on the cell while it runs, then a check mark and the '1 row saved' toast; there is no Save row and no Save All",
"bulk delete — select two rows → Delete in the selection bar → confirm",
"kanban move — drag a card Backlog → To Do (direct manipulation: the card in its new column IS the success feedback; a move the transition rule blocks never leaves the client — its lane is dimmed, data-kanban-drop-blocked, and the drop sends nothing, #25933)",
"declared record action — Mark Done on a task record (declared successMessage `{{ record.title | default:'Task' }} marked done.`, which names the task, examples/app-showcase/src/ui/actions/index.ts#MarkDoneAction). The action patches only done and progress, so the record's Status still reads its old value (e.g. 'To Do') beside the toast: that is the declaration, not a failed write (QA run #33861)",
Expand Down Expand Up @@ -189,6 +189,12 @@
"date": "2026-11-20",
"change": "variants[1] follows #35684: every task list is editable in place, not only the Grid view that declares inlineEdit: true, and a single click selects a cell while a double-click edits it. The clauses are unchanged. Read at base 238661f4",
"ref": "#35684"
},
{
"revision": 15,
"date": "2026-11-20",
"change": "variants[1] and knownGaps[1] follow #35685: a list cell saves the moment it is committed, with a saving and a saved mark on the cell and the '1 row saved' toast, and there is no Save row or Save All to press. The clauses are unchanged. Read at base 2ad42b5d",
"ref": "#35864"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ describe('objectstack#33219 — a list-only object\'s rows open no record page',
it('a row click opens nothing: no `?recordId=`, no drawer, the list stays', async () => {
await mountList(LIST_ONLY_OPERATIONS);
fireEvent.click(screen.getByText('okta-staging'));
openWithSpace('scim_ab12');
openWithTap('scim_ab12');
await settle();
expect(search()).toBe('');
expect(pathname()).toBe(LIST_PATH);
Expand Down Expand Up @@ -290,12 +290,14 @@ describe('objectstack#33219 — a list-only object\'s rows open no record page',

/**
* objectstack#35684 — the list's other way to open a row: a click on a data
* cell selects it (and opens nothing), and Space on the selected cell opens
* its record, as the row's click used to.
* cell selects it (and opens nothing), and a touch tap on a cell opens its
* record, as the row's click used to. (It was Space on the selected cell until
* objectstack#35685 made Space type into the cell, per the maintainer.)
*/
function openWithSpace(text: string): void {
fireEvent.click(screen.getByText(text).closest('td') as HTMLElement);
fireEvent.keyDown(document.activeElement as HTMLElement, { key: ' ' });
function openWithTap(text: string): void {
const cell = screen.getByText(text).closest('td') as HTMLElement;
fireEvent.pointerDown(cell.closest('tr') as HTMLElement, { pointerType: 'touch' });
fireEvent.click(cell);
}

async function mountDataPage(apiOperations: string[] | undefined, search = '') {
Expand Down Expand Up @@ -333,7 +335,7 @@ describe('objectstack#33219 — the bare data page opens no record of a list-onl
await mountDataPage(LIST_ONLY_OPERATIONS);
fireEvent.click(screen.getByText('scim_ab12'));
fireEvent.click(screen.getByText('scim_ab12'), { metaKey: true });
openWithSpace('scim_ab12');
openWithTap('scim_ab12');
await settle();
expect(search()).toBe('');
expect(openSpy).not.toHaveBeenCalled();
Expand All @@ -348,9 +350,9 @@ describe('objectstack#33219 — the bare data page opens no record of a list-onl
expect(findOne).not.toHaveBeenCalled();
});

it('CONTROL — the same object served with no restriction: Space on a selected cell opens the drawer', async () => {
it('CONTROL — the same object served with no restriction: a touch tap on a cell opens the drawer', async () => {
await mountDataPage(undefined);
openWithSpace('scim_ab12');
openWithTap('scim_ab12');
await waitFor(() => expect(search()).toBe('?recordId=c1'));
expect(await screen.findByRole('dialog', undefined, { timeout: 5000 })).toBeTruthy();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,14 @@ const OPEN_ITEMS = ['row-context-open', 'row-context-open-new-tab'];

/**
* objectstack#35684 — the list's other way to open a row: a click on a data
* cell selects it (and opens nothing), and Space on the selected cell opens
* its record, as the row's click used to.
* cell selects it (and opens nothing), and a touch tap on a cell opens its
* record, as the row's click used to. (It was Space on the selected cell until
* objectstack#35685 made Space type into the cell, per the maintainer.)
*/
function openWithSpace(text: string): void {
fireEvent.click(screen.getByText(text).closest('td') as HTMLElement);
fireEvent.keyDown(document.activeElement as HTMLElement, { key: ' ' });
function openWithTap(text: string): void {
const cell = screen.getByText(text).closest('td') as HTMLElement;
fireEvent.pointerDown(cell.closest('tr') as HTMLElement, { pointerType: 'touch' });
fireEvent.click(cell);
}

describe('objectstack#33317 — the console object list: a row that opens nothing does not look clickable', () => {
Expand All @@ -313,7 +315,7 @@ describe('objectstack#33317 — the console object list: a row that opens nothin
fireEvent.click(screen.getByText('scim_ab12'), { button: 1 });
// The name cell, no longer a link of its own, hands its click to the row too.
fireEvent.click(screen.getByText('okta-staging'), { metaKey: true });
openWithSpace('scim_ab12');
openWithTap('scim_ab12');
expect(openSpy).not.toHaveBeenCalled();
expect(screen.queryByTestId('left-the-list')).toBeNull();
});
Expand Down Expand Up @@ -385,7 +387,7 @@ describe('objectstack#33549 — the console object list: `navigation.preventNavi
await mountList({ navigation: PREVENTED_DRAWER });
fireEvent.click(screen.getByText('scim_ab12'));
fireEvent.click(screen.getByText('okta-staging'));
openWithSpace('scim_ab12');
openWithTap('scim_ab12');
expect(drawerRecordId()).toBeNull();
expect(screen.queryByTestId('left-the-list')).toBeNull();
expect(openSpy).not.toHaveBeenCalled();
Expand All @@ -412,14 +414,14 @@ describe('objectstack#33549 — the console object list: `navigation.preventNavi
it('a `page` view with `preventNavigation: true` draws no link face either', async () => {
await mountList({ navigation: { mode: 'page', preventNavigation: true } });
expect(looksLikeALink('okta-staging')).toBe(false);
openWithSpace('scim_ab12');
openWithTap('scim_ab12');
expect(screen.queryByTestId('left-the-list')).toBeNull();
});

it('CONTROL — the same `drawer` view with `preventNavigation: false`: Space on a selected cell writes `?recordId=`, and the name cell is the record link', async () => {
it('CONTROL — the same `drawer` view with `preventNavigation: false`: a touch tap on a cell writes `?recordId=`, and the name cell is the record link', async () => {
await mountList({ navigation: { mode: 'drawer', preventNavigation: false } });
expect(looksLikeALink('okta-staging')).toBe(true);
openWithSpace('scim_ab12');
openWithTap('scim_ab12');
await waitFor(() => expect(drawerRecordId()).toBe('c1'));
});

Expand Down
Loading
Loading