Skip to content

Commit 4a15359

Browse files
committed
Merge origin/main into claude/issue-36897-list-objectgrid
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNtKtppbRbXmHGH8x
2 parents 23cc54e + c75453e commit 4a15359

59 files changed

Lines changed: 2777 additions & 596 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/skills': patch
3+
'@objectstack/spec': patch
4+
'@objectstack/trigger-schedule': patch
5+
---
6+
7+
docs(skills): the automation skill, the schedule trigger README and the start-node schedule refusals spell only flow shapes the publish checks accept
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
Ten flow checks of `os validate` and publish (`flow-schedule-timezone-missing`, `flow-condition-option-label`, `flow-node-write-unknown-option`, `flow-subflow-unknown` and the rest) landed without the text that teaches flows. Three of them are warnings and refuse nothing: `flow-schedule-timezone-missing`, `flow-subflow-unknown` (run by the CLI only) and `flow-create-update-pair`. Wording only; no schema, rule or reader changes.
13+
14+
- `@objectstack/spec`: the three refusals of a start node's `config.schedule` (an empty string, a typed schedule the published schema refuses, a value the readers read nothing from) now offer `{ type: 'cron', expression: '0 8 * * *', timezone: 'UTC' }` as the cron to write. They no longer offer a bare cron string or a cron object with no `timezone`, which `os validate` warns on. The typed-alias hint names `{ type: 'cron', expression: '…', timezone: 'UTC' }`. What is refused is unchanged.
15+
- `objectstack-automation` skill: recipe 1's nightly cron states `timezone: 'UTC'`; the schedule example's comment says a cron with no `timezone` (a bare string) runs in UTC and warns, where it said a bare cron string also works; the `subflow` row says `os validate` warns `flow-subflow-unknown` on any name the stack does not hold, a correct call to another package's flow included, where it said `os validate` passes; the select-label rule says a start condition or a `fields` write that uses an option's label is refused at publish where the options are inline, where it said the flow stages clean, and says a label in a `filter` or an edge condition is never checked and silently matches nothing, where it said a `filter` fails the run. Eval 1's expected answer states the cron's `timezone`, and eval 20's states that warning. No skill file passes its token ceiling: `SKILL.md` gains one line, paid for by shorter wording and shorter table separator rows in the same file, and two node labels in recipe 1 are shortened to pay for the `timezone` key.
16+
- `@objectstack/trigger-schedule` README: the time-relative example's cron states `timezone: 'UTC'`, and the schedule-shapes table is followed by the UTC reading and the warning.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
---
5+
6+
feat(studio): a metadata item fills the content pane under one detail header, and its tools are tabs instead of side sheets
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
Studio's generic item page and the form editor of an email template or a translation now draw the shared Studio detail header: × back to the type's list (its search, filters, sort and package scope kept), ‹ › to the previous and next item in the list's order with "index / total", the type and source package as chips, and the page's actions at the right. Both × and ‹ › ask first when the page holds unsaved edits; the browser's Back is not intercepted.
12+
13+
The six side sheets of the generic item page are tabs of the page: Details, Preview (a type with an editing canvas), Related (a type with anchors), Referenced by, History (the versions with rollback, and the audit log read inside it; shown to a caller who may read the authoring trail) and Source (the JSON source, and the layered comparison read inside it, for read-only callers too). The open tab is in the address as `?tab=`; the values the sheets wrote still open the same place (`?tab=layers` opens Source on the layers, `?tab=audit` opens History on the audit log). The draft review is a status chip in the header while a draft is pending, and `?review=1` still opens it.
14+
15+
On a type with a canvas the page opens on Preview; Details shows the whole item's form. Both edit one draft, and one Save (the header's button, ⌘S or autosave) saves it whichever tab is open, so a tab switch keeps every unsaved edit.
16+
17+
The address `/studio/PACKAGE/metadata/TYPE/NAME/history` opens the item on its History tab; the permission set, whose item page is its own matrix editor, and an item a pillar's designer opens (a flow, an object) keep the standalone history page there.
18+
19+
New in `@object-ui/app-shell`: `item-tools/ItemToolTabs.tsx` (the tab strip, the address helpers and the References, History and Source panels, for the designers to mount) and `metadata-admin/ResourceDetailHeader.tsx`. New locale keys `engine.studio.itemTabs.*` in the studio catalogue (en, zh). No metadata changes; nothing to migrate.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@object-ui/types': patch
3+
'@object-ui/plugin-grid': patch
4+
'@object-ui/app-shell': patch
5+
'@object-ui/i18n': patch
6+
---
7+
8+
fix(console): a per-record bulk flow action counts a refused record as refused, with its own message, and stacks no refusal notice
9+
10+
Clause-②: yes (seat ruling: the published `@object-ui/types` `ActionResult` gains a member; L1-a owes a lane-keep L2 review)
11+
Metadata-protocol: none
12+
13+
The published `@object-ui/types` adds two optional members, `ActionResult.refusal` and `ActionContext.reportsRefusal`. Nothing existing is narrowed.
14+
15+
A list view's selection bar can run a `type: 'flow'` action once per selected record. A run that ended on an `end` node with `outcome: 'refused'` answers `200` with `status: "refused"` and a `refusalMessage`. Before this change the bulk result counted such a record as succeeded ("Succeeded 3 / 3"), and one refusal dialog opened on top of the result showing a single record's message, so the other refused records' reasons were lost.
16+
17+
- The result now counts refused records apart: "Succeeded 1 / 3 · Refused 2". Each refused record is listed with the sentence the flow wrote for it. A refused record has no Retry and is not written to the error CSV: re-running it would get the same answer. When a failed record is retried and the action refuses it, it moves to the refused list.
18+
- No refusal dialog opens during a bulk run. The same action launched from a row menu still opens its Close-only refusal notice, unchanged.
19+
- `ActionResult.refusal` (`{ message }`) is set by the console's flow launch on a run that ended `refused`, beside `success: true` and `handedOff: true`. A caller that counts outcomes reads it as refused, never as done.
20+
- `ActionContext.reportsRefusal` is passed for one dispatch through `ActionRunner.execute`'s `callContext`. A caller that lists refusals itself sets it, and the console's flow handler then opens no notice of its own.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
---
4+
5+
fix(plugin-approvals): the approvals inbox search finds a request by the record title, process label, object label and requester name its row shows
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The inbox search box ("Search record, process, requester…", `GET /api/v1/approvals/requests?q=`) matched only the stored machine columns (`process_name`, `object_name`, `record_id`, `submitter_id`) and, where the caller reads it unmasked, the raw snapshot. Text a row actually shows, such as a record title, a process label, a requester's name or an object label, found nothing, while a machine fragment like `crm_` found every row.
11+
12+
`q` now also matches the four labels a row shows, each worked out the way that caller is served it:
13+
14+
- the record title, as served to the caller: a title field the caller may not read, or reads masked, does not match;
15+
- the process label in the caller's language: the translated label where the reader's language pack has one, otherwise the stored label. A reader who is shown the translation is not found by the stored text;
16+
- the object label, chosen the same way;
17+
- the requester's display name.
18+
19+
Matching stays case-sensitive, like the existing arms (`$contains`). The `q` parameter accepts the same values as before. A title that comes only from a deleted record's snapshot is not searched by this path.

‎examples/app-showcase/src/automation/flows/index.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ export const ScheduledDigestFlow = defineFlow({
442442
// this filled dev.db to 260MB+ over a multi-day `pnpm dev`. 60s keeps
443443
// the schedule trigger observable within a minute while cutting the
444444
// write rate 3x. Production digests use a cron expression instead,
445-
// e.g. { type: 'cron', expression: '0 8 * * *' }. Real bounding comes
446-
// from the lifecycle/retention work (ADR-0057), not this number.
445+
// e.g. { type: 'cron', expression: '0 8 * * *', timezone: 'UTC' }. Real
446+
// bounding comes from the lifecycle/retention work (ADR-0057), not this number.
447447
schedule: { type: 'interval', intervalMs: 60000 },
448448
},
449449
},
@@ -2044,7 +2044,7 @@ export const TaskDueReminderFlow = defineFlow({
20442044
filter: { status: { $ne: 'done' } }, // optional, ANDed with the date window
20452045
},
20462046
// schedule defaults to daily 08:00 UTC; override with
2047-
// schedule: { type: 'cron', expression: '0 8 * * *' }
2047+
// schedule: { type: 'cron', expression: '0 8 * * *', timezone: 'UTC' }
20482048
},
20492049
},
20502050
// "Your task is due" has nobody to address on a task with no assignee, so

‎packages/plugins/plugin-approvals/src/approval-free-text-scope.test.ts‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,15 @@ function lastFreeTextColumns(engine: ReturnType<typeof makeEngine>): string[] {
207207
return lastFreeTextArms(engine).map(a => Object.keys(a)[0]).sort();
208208
}
209209

210+
/**
211+
* `process_label` is the served-text arm over the stored process label, which
212+
* this fixture's rows serve (no reader's-locale label is picked): a column of
213+
* the request itself, unrelated to the snapshot, so present in both shapes.
214+
*/
210215
const UNMASKED_COLUMNS =
211-
['object_name', 'payload_json', 'process_name', 'record_id', 'submitter_id'];
216+
['object_name', 'payload_json', 'process_label', 'process_name', 'record_id', 'submitter_id'];
212217
const MASKED_COLUMNS =
213-
['object_name', 'process_name', 'record_id', 'submitter_id'];
218+
['object_name', 'process_label', 'process_name', 'record_id', 'submitter_id'];
214219

215220
describe('#11040 free-text search does not push a predicate onto a masked snapshot', () => {
216221
let engine: ReturnType<typeof makeEngine>;
@@ -276,13 +281,14 @@ describe('#11040 free-text search does not push a predicate onto a masked snapsh
276281
expect(rows.map(r => r.id)).toEqual([REQ_B]);
277282
});
278283

279-
it('the `$or` is never empty — four arms always remain', async () => {
284+
it('the `$or` is never empty — the four machine arms always remain', async () => {
280285
await service.listRequests({ object: OBJECT, q: SPLIT_TOKEN }, asUser(APPROVER));
281286

282287
const arms = lastFreeTextArms(engine);
283288
// An empty `$or: []` reads as match-none on some drivers and match-all on
284-
// others; either would be a silent second defect.
285-
expect(arms.length).toBe(4);
289+
// others; either would be a silent second defect. The fifth is the
290+
// stored process label's served-text arm.
291+
expect(arms.length).toBe(5);
286292
expect(lastFreeTextColumns(engine)).toEqual(MASKED_COLUMNS);
287293
for (const arm of arms) {
288294
expect(Object.values(arm)[0]).toEqual({ $contains: SPLIT_TOKEN });

0 commit comments

Comments
 (0)