Skip to content

Commit 4ce5f1c

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-36692-report-editing-own-entry
Conflicts with #36858 (menu rename translation), resolved so both survive: - designModeMenuCreate.ts: keep this branch's dashboard-only creator (no report kind, no saveAndPublishInPackage); take #36858's input type `AppMenuSaveInput & { item: NewMenuItem }` and its import, dropping the now-unused `Menu` import, so the dashboard path carries `labels`. - DesignModeMenu.tsx: drop the report-slot block #36858 had edited to pass `labels`; the dashboard save keeps #36858's `labels`. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhpykmQZe1yMupC2CU
2 parents cccd017 + 573a376 commit 4ce5f1c

176 files changed

Lines changed: 8505 additions & 606 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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/objectql': patch
4+
'@objectstack/metadata-protocol': patch
5+
'@objectstack/service-automation': patch
6+
---
7+
8+
feat(objectql)!: every row a sync-in pull writes records where it came from, and nothing else may write those columns
9+
10+
Clause-②: no (narrowing)
11+
Metadata-protocol: none
12+
Skills-docs: none (no skills/ page names the `_sync_` columns or the synced bucket's injected columns)
13+
14+
<!-- adr-0087: not-required (no-migration-prescription) No authorable key is added, removed, renamed or re-shaped, and every metadata document that parsed before parses the same. What changes is the registered shape of a `managedBy: 'synced'` object (five platform columns and one index the platform adds) and the answer a data write gets when it names a `_sync_` column: no authored value has to be rewritten, so there is nothing for a migration to prescribe and no tombstone. -->
15+
16+
ADR-0153 D4, the provenance half (#32062, slice 5).
17+
18+
- **Five `_sync_` columns on every `managedBy: 'synced'` object.** `resolveInjectedSystemColumns` (`@objectstack/spec/data`) now plans `_sync_source`, `_sync_external_id`, `_sync_pulled_at`, `_sync_run_id` and `_sync_deleted_at` on that bucket only (`plan.sync`), and the registry injects them as hidden, read-only system columns, with an index on (`organization_id`, `_sync_source`, `_sync_external_id`) placed after the tenant index. New exports: `SYNC_PROVENANCE_COLUMNS`, `SYNC_PROVENANCE_PREFIX`, `SyncProvenanceColumn`, `SYNC_PROVENANCE_FIELD_DEFS`. A synced object that declares `systemFields: false` gets none of them.
19+
- **Both pulls stamp them.** A connector pull and a datasource pull write `_sync_source` (the mapping), `_sync_external_id` (the row's `upsertKey` value as text; a key of several fields is a JSON array of the values in `upsertKey` order, such as `["10","A-1"]`), `_sync_pulled_at` and `_sync_run_id` (the `sys_sync_run` row; not written when no run ledger is composed) on every row. `_sync_deleted_at` exists but stays empty until delete marking (D3) lands. A mapping whose `fieldMapping` targets a `_sync_` column is refused with `400 mapping_target_refused` when it runs (it was refused before as an unknown target). A connector pull whose target object's definition cannot be read is now refused the same way before it calls the connector, instead of writing rows it cannot stamp; the datasource pull already refused it.
20+
- **BREAKING: a `_sync_` column in any other write is refused.** The engine refuses an insert or update naming a `_sync_` key with `400 ERR_SYNC_PROVENANCE_WRITE_REFUSED`, before middleware, defaults and hooks run, whatever the caller's context, `isSystem` included. A `_sync_` key a `beforeInsert` or `beforeUpdate` hook assigns, changes or removes is refused the same way before the driver is called, on any write, the pull's own included, so the pull's stamps are stored exactly as it wrote them. Only the pull's own write is admitted (`markSyncPullWrite`, exported from `@objectstack/objectql` with `SYNC_PULL_WRITE`, `SyncProvenanceWriteRefusedError` and `SYNC_PROVENANCE_WRITE_REFUSED_CODE`). The mark is consumed by that write, so a hook or flow it triggers writes as any other system caller and is refused the same way. Fix: leave the `_sync_` columns out of the write and out of your hooks; the next pull of the mapping stamps them.
21+
- Load-time diagnostics leave the injected `_sync_` columns out when they judge a served synced object, so it is not flagged for the reserved prefix; an author field under a `_sync_` name is still refused.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@objectstack/formula': minor
3+
'@objectstack/objectql': patch
4+
'@objectstack/lint': patch
5+
'@object-ui/core': patch
6+
'@objectstack/skills': patch
7+
---
8+
9+
feat(formula): `addWorkingDays()`, `workingDaysBetween()` and `addWorkingHours()` count with the organization's working calendar (ADR-0157 D4)
10+
11+
Clause-②: yes (widening)
12+
Metadata-protocol: added — a formula field's or a stored field's `expression` may now call `addWorkingDays(...)`, `workingDaysBetween(...)` and `addWorkingHours(...)`
13+
Skills-docs: updated here — skills/objectstack-formula/SKILL.md teaches the three functions and eval 8 of skills/objectstack-project/evals/project-process.json exercises them (the card's order names both)
14+
15+
Not released alone: it ships in the same release as the working calendar service and objects (#35355) and the approval escalation's working-time clock (#35357), ADR-0157 D4.
16+
17+
- **Three formula functions** (`@objectstack/formula`). `addWorkingDays(day, n[, code])` answers the calendar day `n` working days after `day` (before it, for a negative `n`); `day` itself never counts and `0` answers `day`. `workingDaysBetween(start, end[, code])` counts the working days after `start` up to and including `end`, negative when `end` is earlier, and is the inverse of `addWorkingDays`. `addWorkingHours(start, hours[, code])` answers the instant `hours` of working time after `start`, counted as elapsed time in the calendar's time zone (D11); a start outside working time begins at the next working period. All three step over the calendar's weekends and holidays and onto its make-up working days. Without `code` a call counts with the organization's default calendar; `code` names a calendar and is written as a quoted literal. They join the advertised standard library (`CEL_STDLIB_FUNCTIONS`).
18+
- **Where they count** (`@objectstack/objectql`). A `formula` field and a stored field's `expression` count with the record's own organization's calendars, which the engine loads through the calendar service before it evaluates them: only the calendars the expressions name, once per organization per read, from the service's cache. A formula field counts again on its next read after a calendar edit; a stored due time keeps the value of its last write.
19+
- **When the calendar cannot answer** (D8). With no default calendar in the organization, a code the organization has no calendar for, or a count that reaches past the span the calendar is maintained for, the formula reads `null` and the server logs one line naming the object, the field and the reason. A stored field's `expression` stores blank and the write goes through; the blank stays until that record's next write, and a write made while the calendar refuses blanks a value that was valid before. Nothing counts on the weekly pattern or the wall clock instead.
20+
- **No calendar arithmetic as a filter.** A query filter, a sharing rule's condition and every filter compiled from CEL refuse the three functions with a message that prescribes the stored due-time field (D6).
21+
- **Build refusals** (`@objectstack/lint`). `os build` / `os validate` refuse the three functions at every expression site but a formula field's and a stored field's `expression` (validation rules, visibility, action conditions, flow conditions and values, sharing rules, a field's expression `defaultValue` and a seed value), and refuse a calendar code that is not a quoted literal, with a branch between literal calls as the way to pick a calendar per record.
22+
- **Forms** (`@object-ui/core`). A form does not compute a formula that calls one of the three: its calendar is loaded for the server's read, never handed to the form, so the field is unservable there as on the server's write-path check.
23+
- **Teaching** (`@objectstack/skills`). objectstack-formula documents the three functions; the platform catalog moves working-day formulas from Planned into what the platform ships; the project-process eval for business-hours SLAs now expects the functions.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
fix(cli): `os lint --item` points at the draft publish verdict, not at publishing
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `os lint --item` text output ended its list of rules that need the rest of the stack with "Run `os lint` on the project, or publish the draft, for those." Publishing makes the item live. The line now names `os meta register <type> --data <file> --mode draft --package <id>`, filled with the item's type and file, which shows the full publish verdict while nothing goes live, beside `os lint` on the project. The `--json` output is unchanged.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/service-analytics': patch
3+
'@objectstack/driver-sql': patch
4+
'@objectstack/driver-turso': patch
5+
---
6+
7+
fix(analytics)!: the native dataset face and the draft preview refuse `=` / `$in` / `$ne` on a single-value `image` or `file` column the driver stores as JSON, as the data door does
8+
9+
Clause-②: yes (narrowing) — widened: `SqlDriver.jsonColumnFieldClass` (`@objectstack/driver-sql`) is now public, and so on every class that extends it (`TursoDriver`, `SqliteWasmDriver`), and the exported `AnalyticsServiceConfig` (`@objectstack/service-analytics` root) gains the optional key `jsonColumnFieldClass`; narrowed: the native dataset face and the draft preview newly answer `400 INVALID_FILTER` for a scalar comparison on a single-value media column the driver stores as JSON, which they answered `200` with a wrong count before
10+
Metadata-protocol: none
11+
Skills-docs: none — no published skill documents the dataset door's filter vocabulary per storage class; the refusal text itself carries the prescription (the media-column move), and the operator contract `skills/` describes (`$contains` for membership on a JSON column) is unchanged
12+
13+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no stored row, registry key or authored value changes. What moves is the answer the native dataset face and the draft preview give a scalar comparison on a single-value media column, so no stored row, registry key or authored value changes and there is nothing for a migration to rewrite. -->
14+
15+
**BREAKING** for a caller of the dataset query door whose filter compares a single-value `file` / `image` / `avatar` / `video` / `audio` field with `=` (explicit or implicit), `$in`, `$ne`, `$nin`, an ordering comparison, `$between` or the non-membership text family, on a deployment still inside the ADR-0104 dual-encoding window (its media columns not yet moved, which is every deployment that has not run the move).
16+
17+
- FROM: the native dataset face compiled the comparison against the stored JSON string (`"file_1"`) and answered `200` with the wrong count — `{ pic: 'file_1' }` and `{ pic: { $in: ['file_1'] } }` counted `0`, `{ pic: { $ne: 'file_1' } }` counted every row — and the draft preview answered `200` with its own counts, matching the bare id a drafted row holds. `POST /api/v1/data/:object/query` and this door's ObjectQL strategy already refused the same filter `400` `INVALID_FILTER`.
18+
- TO: all four faces refuse it `400` `INVALID_FILTER`, in `@objectstack/core`'s one refusal text for this column class — the media-column move, not the `$contains` membership repair, which finds no member in a single JSON string.
19+
20+
**Widened, alongside.** `SqlDriver.jsonColumnFieldClass(table, field)` is now a public, read-only member: it answers `'single-value-media'`, `'multi-value-or-json'` or `undefined` for a column on this deployment, the same answer the data door's refusal reads. A subclass that redeclares it as `protected` must widen it to `public`. `AnalyticsServiceConfig.jsonColumnFieldClass` is the optional hook the analytics host reads it through; `AnalyticsServicePlugin` wires it from the driver that stores the object, and a host that wires nothing keeps its earlier behaviour. `TursoDriver` answers it on the remote face from the same registry its remote transport already reads.
21+
22+
**Not moved.** `$contains` / `$notContains` and the null predicates (`$null`, `$exists`, `$empty`) on such a column, every operator on a scalar column, the multi-value and structured-JSON class (unchanged since it was refused on these faces), and a deployment whose media columns have moved — the column is not JSON there, and the comparison is answered.
23+
24+
The fix for a caller: filter on the record the attachment belongs to, ask presence with `$null` / `$empty`, or finish the deployment's media-column move (the column step of `objectstack migrate files-to-references --apply`, which the refusal text prescribes) so the column is comparable.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/i18n': patch
4+
'@object-ui/plugin-list': patch
5+
---
6+
7+
feat(console): Change Owner's queue picker searches the server, so a queue past the first 200 can be found and picked; a non-grid list says bulk Change Owner is in the grid
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
The Change Owner dialog's queue target used to read `sys_queue` once, capped at 200 rows, into a plain dropdown with no search, so an organization with more queues could not pick the rest. It now picks the queue the way the person tab picks a person: with the shared lookup picker over `sys_queue`, which reads one page at a time when it is opened and sends the typed term to the server as its search. The picker shows the queue's label and sends its `name`, which is what the Change Owner endpoint's `queue` takes. Nothing the endpoint accepts changes.
13+
14+
Bulk Change Owner lives in the grid's selection bar, and kanban, calendar, gallery, timeline, gantt, map and tree layouts select no rows. On those layouts, a reader the grid would offer bulk Change Owner to (the object offers the action and the object-level transfer verdict allows it) now sees one muted line above the list: "To change the owner of several records at once, switch to a grid view." The list view's `onBulkChangeOwner` documentation says the same.
15+
16+
`@object-ui/i18n`: adds `console.changeOwner.gridOnly` to every locale pack and removes the four keys the old queue dropdown read and nothing reads any more: `console.changeOwner.noClient`, `console.changeOwner.queuesLoading`, `console.changeOwner.queuesFailed` and `console.changeOwner.noQueues`.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/lint': patch
3+
'@objectstack/cli': patch
4+
---
5+
6+
fix(lint): the translation coverage check asks every named flow for its label, not only a flow with a screen or an approval step
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
`flows.FLOW_NAME.label` is now demanded for every flow a stack declares with a `name`. Until now it was demanded only for a flow with a `screen` or `approval` node, the two readers the key used to have (the screen-flow runner and the approvals inbox). The docs viewer's `type: flow` embed titles its card by the same key for whichever flow a page names, record-triggered, scheduled and API flows included, and the check already asks every flow's drawn steps for their `nodes` labels. So a zh-CN reader saw an English flow name above translated step names, and `os lint` and `os i18n check` did not report it.
12+
13+
What you see after upgrading: `os lint` reports one more `i18n/missing-flow` finding per untranslated locale for each flow that has neither a screen nor an approval step, and `os i18n extract` scaffolds its `label`. Translate it under `flows.FLOW_NAME.label` in each locale bundle, the key the runner and the approvals inbox already read. A flow with no `name` is not asked: no bundle entry can address it.
14+
15+
The repository's own coverage ratchet rises by those labels: `examples/app-showcase` 425 to 449 (24 flows, one untranslated locale each) and `examples/app-todo` 130 to 136 (3 flows in two locales). The other twelve configs, including the ten bundle packages, are unchanged.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
'@objectstack/rest': patch
4+
'@object-ui/console': patch
5+
'@object-ui/app-shell': patch
6+
---
7+
8+
fix(plugin-approvals): the decide refusal of a submitter's own approval, and a submitter notice that names several slots, read in the reader's language
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
**Widened door response.** The approvals decide door (`packages/rest/src/approvals-routes.ts`) gains one optional member, `userMessage`, at the top level of its flat `{ code, error }` refusal body. Two rows answer it today: the two `403 FORBIDDEN` decide refusals of a submitter's own approval, the `excludeSubmitter` refusal and the administrator-override self-approve refusal. It is absent whenever no producer marked one, so every other refusal body is unchanged.
14+
15+
- **The decide refusal.** When the decision door refuses a submitter's own approval (the step sets `excludeSubmitter`, or the administrator override would approve the actor's own request), the thrown error now carries a `userMessage`: the same refusal, with its remedy, in the decider's language (`approvalDecideRefused*` in every approvals message pack). A position is named by the decider's pack label, then its declared label, then its name. The error's `message` is unchanged: it stays English for the developer and the log. With no reader language, `userMessage` is English and names no user id.
16+
- **The REST door.** The approvals routes answer a refusal the service marked with `userMessage` at the top level of their flat `{ code, error }` body, beside `error`, on every mapped row. A refusal with no marking answers exactly as before.
17+
- **The console.** The record page's `type: 'api'` actions (the request's Approve button) read a flat body's top-level `userMessage` as well as the `error.userMessage` of the ADR-0112 envelope, and show it in place of the English `error`. The Approval Center's inline decision toast shows a marked refusal as written, before its generic line.
18+
- **The submitter notice.** A notice for a slate of 2 to 8 slots names each slot inline, one keyed type word and value per slot (`approvalNoApproverHoldingSlots2` to `…Slots8`, derived from each pack's own `approvalNoApproverHolding`, `approvalNoApproverSlot` and `approvalNoApproverSlotSeparator`), so the messaging service renders every slot in the recipient's language at delivery. A slate of more than 8 slots still names its slots in English inside the recipient's sentence. The literal English body is unchanged.

0 commit comments

Comments
 (0)