Skip to content

Commit 8cc708a

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/project-thread-8n1lrs
2 parents bb175bf + acc9c57 commit 8cc708a

122 files changed

Lines changed: 4517 additions & 2207 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: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
'@object-ui/auth': patch
3+
'@object-ui/collaboration': patch
4+
'@object-ui/components': patch
5+
'@object-ui/console': patch
6+
'@object-ui/core': patch
7+
'@object-ui/create-plugin': patch
8+
'@object-ui/data-objectstack': patch
9+
'@object-ui/fields': patch
10+
'@object-ui/i18n': patch
11+
'@object-ui/layout': patch
12+
'@object-ui/mobile': patch
13+
'@object-ui/permissions': patch
14+
'@object-ui/plugin-ai': patch
15+
'@object-ui/plugin-calendar': patch
16+
'@object-ui/plugin-charts': patch
17+
'@object-ui/plugin-chatbot': patch
18+
'@object-ui/plugin-dashboard': patch
19+
'@object-ui/plugin-designer': patch
20+
'@object-ui/plugin-detail': patch
21+
'@object-ui/plugin-editor': patch
22+
'@object-ui/plugin-form': patch
23+
'@object-ui/plugin-gantt': patch
24+
'@object-ui/plugin-grid': patch
25+
'@object-ui/plugin-kanban': patch
26+
'@object-ui/plugin-list': patch
27+
'@object-ui/plugin-map': patch
28+
'@object-ui/plugin-markdown': patch
29+
'@object-ui/plugin-report': patch
30+
'@object-ui/plugin-timeline': patch
31+
'@object-ui/plugin-view': patch
32+
'@object-ui/providers': patch
33+
'@object-ui/react': patch
34+
'@object-ui/types': patch
35+
---
36+
37+
docs: the README's Contributing Guide and Roadmap links point at the ObjectStack repository (objectstack#26080)
38+
39+
Every package README linked its "Contributing Guide" and "Roadmap" to `CONTRIBUTING.md` and `ROADMAP.md` in the archived `objectstack-ai/objectui` repository. Those documents now live at the root of `objectstack-ai/objectstack`, which is where the links point; the `@object-ui/console` README's roadmap links move there too. No code, export or behaviour changes.
40+
41+
Clause-②: no
42+
Metadata-protocol: none
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/plugin-approvals': patch
4+
'@object-ui/app-shell': patch
5+
'@object-ui/console': patch
6+
---
7+
8+
feat(spec,plugin-approvals,app-shell): the approvals get serves a request's own route, and both approval step lines draw it
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
The single request read (`GET /api/v1/approvals/requests/:id`) served one step list, `flow_steps`: the flow's trunk, walked from its start by taking the `approve` edge, else the `true` edge, else the first edge. A request a decision routed off the trunk was not on it. A contract routed from the manager to the finance-only rung was served the manager, the joint legal + finance rung, the executive and the general manager, all upcoming, and not its own rung.
14+
15+
What changes:
16+
17+
- `ApprovalRequestRow` gains `flow_route`, served on the same single reads as `flow_steps`. Its `steps` are the approval steps the request's flow run has passed (earlier requests of the same run, on another node, approved, in the order the run opened them, one entry per step), then the request's own step, then, for a pending request, the steps ahead that the flow's graph decides on its own when each step approves.
18+
- Nothing past an undecided branch is listed. The walk ahead stops at a decision node, a conditioned edge, several out-edges, a loop back, or a node that runs other nodes (`subflow`, `map`, `loop`). `ahead` then reads `undecided`. It reads `end` when the walk reached the flow's end, and `decided` for a request that is already decided, whose route ends at itself.
19+
- `flow_steps` is served unchanged. Its doc now says it is the trunk and that a step line never draws it.
20+
- The business record's approvals panel draws the pending request's `flow_route`, so a viewer who took no part in an earlier rung now sees it too. Before, the panel rebuilt the line from the request rows the list read served that viewer.
21+
- The approval request page draws its request's `flow_route`, at any status, where it had stopped drawing a step line at all.
22+
23+
What to do: nothing. A client that reads `flow_steps` reads what it read before. A client that draws a request's progress should draw `flow_route` instead.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
---
4+
5+
fix(app-shell): the delegated-admin scope facet shows the spec default for an unset key
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
In Studio › Access › a permission set › Delegated admin, each switch now draws the value the server enforces: the scope's own boolean when it sets one, and the `AdminScopeSchema` default when it leaves the key unset. Drawing a default writes nothing, so a save keeps an untouched key unset; flipping a switch writes an explicit boolean. Nothing the server accepts or enforces changes.
11+
12+
What to do: nothing. Review a delegated-admin scope that you set up by reading this screen, and confirm that its switches show the scope you intended.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/i18n': patch
3+
---
4+
5+
feat(i18n): `studio` namespace rows for the Studio nav-item inspector's badge, order and visible-condition fields
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- **Eleven new `engine.inspector.appNav.*` keys** in `@object-ui/i18n/namespaces/studio`, in `en` and `zh`: the badge and its style (with the four style names the spec's `badgeVariant` declares), the order and its hint, and two hints for the `visible` condition. They label the fields the Studio's Interfaces nav-item inspector now offers for keys a navigation entry already declares (objectstack#26740). Additive: no key changes or goes, no export changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/runtime': patch
3+
---
4+
5+
fix(runtime): a hook refused for a missing capability answers a coded 403 naming the hook and the capability, not a bare 500 (#26903)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
**What was wrong.** A hook whose sandboxed body calls something its `body.capabilities` does not grant (for example `ctx.api.object('note').find(...)` without `api.read`) is refused by the capability check. The QuickJS runner marked that denial as its own fault, so a save on the hook's object under `onError: 'abort'` answered `500 INTERNAL_ERROR` with `Internal server error`. Neither the caller nor the author was told which hook, or which capability, or what to change.
11+
12+
**What changes.** In a hook body, a capability denial is now a refusal. `POST /api/v1/data/OBJECT` (and every other door that answers through `mapDataError`) answers `403 INSUFFICIENT_PRIVILEGES`, an existing standard catalog code, with a sentence such as `capability 'api.read' not granted to hook 'note_guard' (called ctx.api.object('note').find). Grant it by adding 'api.read' to the hook's body.capabilities.` Nothing is written. The BodyRunner logs it once at `info` as a refusal, not at `error` with a stack. This applies to every gate: `api.read`, `api.write`, `api.transaction`, `crypto.uuid` and `log`, and `ctx.title(field)`.
13+
14+
**Unchanged.** The capability check is exactly as strict as before, and a hook that has the capability runs as before. Under `onError: 'log'` the denial is still recorded on the `[hook] handler failed (onError=log; suppressing)` line, now with the remedy, and the save proceeds. An action or job body's capability denial still answers `500 INTERNAL_ERROR`. No code is added.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/objectql': patch
3+
---
4+
5+
fix(objectql): a predicate update or delete (`multi: true` with a filter) recomputes the parent roll-up summaries its matched rows name (#26950)
6+
7+
Clause-②: no — no write is refused and no key, value or shape changes: a stored roll-up that a predicate write used to leave stale is now recomputed, as the same write done record by record recomputes it.
8+
Metadata-protocol: none
9+
10+
- **Before.** `engine.update(object, data, { where, multi: true })` and `engine.delete(object, { where, multi: true })`, which a flow's `update_record` / `delete_record` node with `multi: true` and a filter reaches, recomputed no `summary` roll-up. The parent's count, sum, min, max or average kept its old value until some by-id write on one of its children recomputed it. A bulk step that deleted or reassigned line items left the order totals wrong, with no error.
11+
- **Now.** When a roll-up aggregates the object, the predicate write reads the foreign-key columns those roll-ups name off the rows it matches, before it writes, through the same row-scoped query, and recomputes every parent they name after the write: for a delete the old parents, for an update the old and the new ones, so a reparent recomputes both. A recompute failure surfaces as the by-id write's does (`SummaryRecomputeError`: the rows were written, the roll-up may be stale).
12+
- **Unchanged.** An object no roll-up aggregates reads no extra row: its predicate write is still one bulk driver call. Where the write already reads its matched rows (per-row hooks, per-row validation, the referential walk of a predicate delete), that read carries the foreign keys and no second read is made.

‎.github/workflows/docs-deploy.yml‎

Lines changed: 149 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
name: Docs Deploy
22

3-
# The ONE path by which the docs site (Vercel project `objectstack`, Root
4-
# Directory `apps/docs`) reaches production.
3+
# The ONE path by which this repository's two docs sites reach production,
4+
# one job each:
5+
#
6+
# - `deploy`: the ObjectStack docs, Vercel project `objectstack`, Root
7+
# Directory `apps/docs`;
8+
# - `deploy-ui-site`: the Object UI docs at www.objectui.org, Vercel project
9+
# `objectui`, Root Directory `ui/apps/site`. That site came here with the
10+
# objectui tree; objectui's own copy of this workflow was deleted with the
11+
# rest of `ui/.github/workflows/`, and nothing else deploys it. Its header
12+
# below says what differs from `deploy`.
13+
#
14+
# Everything this header says applies to both jobs. The two are independent:
15+
# one going red does not stop or cancel the other.
516
#
617
# ## Why the build runs here and not on Vercel
718
#
@@ -206,3 +217,139 @@ jobs:
206217
echo
207218
echo "Deployment: ${{ steps.deploy.outputs.url || 'none (the run stopped before the deploy step finished)' }}"
208219
} >> "$GITHUB_STEP_SUMMARY"
220+
221+
# ── The Object UI docs site (www.objectui.org) ─────────────────────────────
222+
#
223+
# The same build-here, upload-prebuilt path as `deploy` above, for the Vercel
224+
# project `objectui`. `ui/apps/site/vercel.json` turns that project's Git
225+
# deployments off (`git.deploymentEnabled: false`), so this job is the only
226+
# thing that publishes the site, and every failure is red, as above.
227+
#
228+
# What differs from `deploy`, and why:
229+
#
230+
# - The project's Root Directory must read `ui/apps/site`. It read
231+
# `apps/site` while the site lived in the objectui repository, and it is
232+
# a dashboard setting that no file here can change. A step right after
233+
# `vercel pull` reads the setting the pull wrote and goes red, naming the
234+
# setting and its value, when it is anything else; without that step
235+
# the old value fails later inside `vercel build`, as an error that does
236+
# not say a dashboard setting is the cause.
237+
# - `vercel build` gets no token. It runs `vercel.json`'s install and build
238+
# commands, which run every workspace package's lifecycle scripts, and
239+
# it does not call the Vercel API. Only the `pull` and `deploy` steps,
240+
# which do, see VERCEL_TOKEN. objectui's own workflow made this choice
241+
# for the same reason.
242+
# - objectui's pinned-@objectstack restore and build steps are not ported.
243+
# In this repository every @objectstack package the site imports is a
244+
# workspace package, and `vercel.json`'s build command builds it from
245+
# this tree through turbo's `^build`.
246+
#
247+
# The site's own install and build commands live in `ui/apps/site/vercel.json`
248+
# and are unchanged from objectui: `pnpm i` installs this whole workspace from
249+
# any member directory, and its build command's `cd ../..` lands in `ui/`,
250+
# from which turbo resolves this repository's root and builds
251+
# `@object-ui/site` with its full closure (65 tasks, all built, on the
252+
# local run measured below).
253+
deploy-ui-site:
254+
name: Deploy objectui docs to Vercel (production)
255+
runs-on: ubuntu-latest
256+
# The build behind `vercel.json`'s command (the site, its @object-ui
257+
# packages and their @objectstack closure: 65 turbo tasks, none cached)
258+
# measured 596 s at `--concurrency=2` on a shared dev container; the runner
259+
# adds install and upload.
260+
timeout-minutes: 30
261+
env:
262+
# Identifiers, not credentials, as in `deploy`: the same team, and the
263+
# project that serves www.objectui.org.
264+
VERCEL_ORG_ID: team_06nvlGKZCkwhzdXmRdxeCNnB
265+
VERCEL_PROJECT_ID: prj_v1rXIczaI7YGmXmseQCLFUFOFxTB
266+
# The same pin as `deploy`'s VERCEL_CLI_VERSION; move the two together.
267+
VERCEL_CLI_VERSION: '60.1.3'
268+
# The value the project's Root Directory must have; see the header.
269+
VERCEL_ROOT_DIRECTORY: ui/apps/site
270+
steps:
271+
- name: Refuse any ref but main
272+
if: github.ref != 'refs/heads/main'
273+
run: |
274+
echo "::error::Docs Deploy publishes to PRODUCTION and runs only from main; this run is on ${GITHUB_REF}. Re-run it with 'main' selected in the branch picker."
275+
exit 1
276+
277+
- name: Require the Vercel token
278+
env:
279+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
280+
run: |
281+
if [ -z "${VERCEL_TOKEN:-}" ]; then
282+
echo "::error::The secret VERCEL_TOKEN is not visible to this run, so www.objectui.org cannot be deployed and production is NOT being updated. It is provided as an objectstack-ai ORGANIZATION secret: check that it still exists and that this repository is in its repository access list (org Settings -> Secrets and variables -> Actions). Then re-run this workflow."
283+
exit 1
284+
fi
285+
echo "VERCEL_TOKEN is set."
286+
287+
- name: Checkout repository
288+
uses: actions/checkout@v7
289+
290+
- name: Setup workspace
291+
uses: ./.github/actions/setup-workspace
292+
293+
# From the repository root, for the reason `deploy`'s comment on this
294+
# step gives: the CLI applies the Root Directory relative to its cwd.
295+
- name: Pull the production project settings
296+
env:
297+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
298+
run: npx --yes "vercel@${VERCEL_CLI_VERSION}" pull --yes --environment=production --token="$VERCEL_TOKEN"
299+
300+
- name: Require the project's Root Directory to be ui/apps/site
301+
run: |
302+
set -euo pipefail
303+
actual="$(node -e "
304+
const fs = require('node:fs');
305+
const file = '.vercel/project.json';
306+
if (!fs.existsSync(file)) { console.log('(vercel pull wrote no ' + file + ')'); process.exit(0); }
307+
const settings = JSON.parse(fs.readFileSync(file, 'utf8')).settings || {};
308+
console.log(settings.rootDirectory ?? '(not set)');
309+
")"
310+
if [ "$actual" != "$VERCEL_ROOT_DIRECTORY" ]; then
311+
echo "::error::The Vercel project ${VERCEL_PROJECT_ID} has Root Directory '${actual}', and this repository builds the site from '${VERCEL_ROOT_DIRECTORY}'. Nothing is deployed. A maintainer sets it in the Vercel dashboard: project objectui -> Settings -> Build and Deployment -> Root Directory = ${VERCEL_ROOT_DIRECTORY}. Then re-run this workflow."
312+
exit 1
313+
fi
314+
echo "Root Directory: ${actual}"
315+
316+
# No VERCEL_TOKEN here; see the header. TURBO_FORCE for the reason
317+
# `deploy`'s build step gives.
318+
- name: Build the site (vercel build --prod)
319+
env:
320+
TURBO_FORCE: 'true'
321+
run: npx --yes "vercel@${VERCEL_CLI_VERSION}" build --prod
322+
323+
- name: Assert the build produced a deployable output
324+
run: |
325+
set -euo pipefail
326+
if [ ! -f ui/apps/site/.next/BUILD_ID ]; then
327+
echo "::error file=ui/apps/site/vercel.json::vercel build exited 0 but produced no ui/apps/site/.next/BUILD_ID - the site was not built, so nothing is deployed."
328+
exit 1
329+
fi
330+
if [ ! -f .vercel/output/config.json ]; then
331+
echo "::error::vercel build exited 0 but wrote no .vercel/output/config.json at the repository root - there is no prebuilt output to deploy."
332+
exit 1
333+
fi
334+
echo "Built the objectui site: BUILD_ID=$(cat ui/apps/site/.next/BUILD_ID)"
335+
336+
- name: Deploy the prebuilt output to production
337+
id: deploy
338+
env:
339+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
340+
run: |
341+
set -euo pipefail
342+
url=$(npx --yes "vercel@${VERCEL_CLI_VERSION}" deploy --prebuilt --prod --token="$VERCEL_TOKEN")
343+
echo "url=${url}" >> "$GITHUB_OUTPUT"
344+
echo "Deployed: ${url}"
345+
346+
- name: Publish the run to the summary
347+
if: always()
348+
run: |
349+
{
350+
echo "### Docs Deploy (www.objectui.org) — ${{ job.status }}"
351+
echo
352+
echo "Commit: \`${{ github.sha }}\` (${{ github.event_name }})"
353+
echo
354+
echo "Deployment: ${{ steps.deploy.outputs.url || 'none (the run stopped before the deploy step finished)' }}"
355+
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)