Skip to content

Commit 7497850

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-26710-alipay-v3-signing
2 parents 13787d0 + bf74607 commit 7497850

58 files changed

Lines changed: 3006 additions & 428 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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
'@object-ui/i18n': patch
3+
---
4+
5+
feat(i18n)!: the record page's tab row in all ten packs; the enlarged face's Back label leaves
6+
7+
Clause-②: yes (narrowing)
8+
Metadata-protocol: none
9+
10+
<!-- adr-0087: not-required (runtime-interface-only ui/packages/i18n/src/locales/en.ts#TranslationKeys) the key type of the console's own translation catalogue: no Zod schema, no spec declaration and no stored metadata reads it, so the compiler is the channel that reaches every caller -->
11+
12+
The record page's tab row (record page v4) arrives in all ten packs:
13+
14+
- `detail.recordTabOverview`: the row's first tab, 「概览」 · Overview · 概要 · 개요 · Übersicht · Aperçu · Resumen · Visão geral · Обзор · نظرة عامة.
15+
- `detail.recordTabs`: the row's accessible name.
16+
- `detail.recordTabsMore`, with its plural forms: the 「+N ▾」 trigger's accessible name.
17+
- `detail.recordTabsHidden`: the dropdown's heading over the hidden panels' tabs.
18+
19+
**BREAKING** (`@object-ui/i18n`, TypeScript only). The exported `TranslationKeys` (`typeof en`) loses `detail.relatedEnlargedBack`, the ‹ back line of the enlarged face that the active tab replaces. The key leaves every pack. A `t()` call that names it still compiles, because its key is a `string`, and reads the key back. Nothing replaces it: 「概览」 and Esc return.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
'@object-ui/app-shell': patch
4+
---
5+
6+
feat(plugin-detail)!: a tab row closes the record header — 概览, 动态, then each related panel with its count, as many as the row's width fits; an open panel face is the active tab
7+
8+
Clause-②: yes (narrowing)
9+
Metadata-protocol: none
10+
11+
<!-- adr-0087: not-required (runtime-export-retired @object-ui/plugin-detail#ArrangedRelatedTab) the retired operand is a component in a published ui package's entry that only the console's own record view imported, for the tabbed tier the record page no longer has; no packages/spec schema, no registered node type, no ADR-0087 conversion surface and no stored shape names it, so there is nothing for `objectstack migrate meta` to rewrite -->
12+
13+
The synthesized record page (record page v4) gets a persistent tab row at the bottom edge of its record header, on every face: the full page, the split pane, the overlay drawer, the maximized pane and a phone.
14+
15+
- **The tabs.** 「概览」 (Overview) first, then 「动态」 (Activity), then one tab per related panel in the reader's arrangement (`record.related.arrangement`), each with its count. 「动态」 shows the stream's size and a related tab its list's count. The counts come from the same request set the right column's panels read, so no relationship is counted twice.
16+
- **Width.** The row shows as many tabs as fit its own width, measured on every resize (the window, the sidebar collapsing, a pane dragged wider). The rest fold into 「+N ▾」, which lists them with their counts, and the hidden panels' tabs come at its end. 「概览」 and at least one more tab are always on the row. So is the active tab: when it would fold, it takes the row's last slot instead.
17+
- **The open face is the active tab.** Choosing a tab, a panel's header or 「查看全部 N 条」 draws that panel's whole face below the tab row, at the page's full width: the related list with every column, paging, sort and inline edit, or the 动态 stream with its chips. The top of the page and the record header stay as they are. The URL keeps `?related=<object>.<field>` and `?related=timeline`. 「概览」 or Esc returns. The face no longer draws a ‹ back line or a title of its own, because the tab names it. Moving from one tab to another replaces the history entry, so one Back, Esc or 「概览」 always returns to the page. Inside the pane the face fills the pane body, and maximizing widens it in place.
18+
- A body table that is open in place (its ⤢ in the details) takes a tab of its own while it is open.
19+
- **Reads.** The page now counts every related panel, including the hidden ones and those behind a closed ⊟, because their tabs show the counts.
20+
- A synthesized page whose tab strip cannot be laid out is drawn as written. Its 关联 tab no longer reorders its lists to the reader's arrangement, which the right column and the tab row now carry.
21+
22+
**BREAKING** (`@object-ui/plugin-detail`, TypeScript only). The only importer was the console's own record view. `ArrangedRelatedTab` leaves the package entry. It laid the reader's arrangement over the 关联 tab of the tabbed tier, which the record page no longer has. FROM `ArrangedRelatedTab` TO no wrapper: draw the page with `RecordPageColumns`, whose right column and tab row read the arrangement, or draw an unlaid page as written. A caller still naming it gets a compile error that names it.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@object-ui/data-objectstack': patch
3+
'@object-ui/app-shell': patch
4+
---
5+
6+
feat(console): entering an app loads its metadata bundle once, and a record open reads no metadata
7+
8+
Clause-②: yes (widening)
9+
Metadata-protocol: none
10+
11+
Entering an app now loads that app's metadata bundle (`GET /api/v1/meta/app/{appId}/bundle`) in one request, through the new `ObjectStackAdapter.loadAppBundle(appId)`. The bundle holds the app, the objects its navigation reaches together with the objects that reference them, and their views, pages and dashboards. Re-entering the app sends `If-None-Match` with the held `ETag` exactly as served, and a `304` keeps the bundle the console already holds. The request goes through the client's conditional `meta.getAppBundle(appId, { ifNoneMatch })`. A bundle served `no-store` with no `ETag` answers the reads that waited on it and is not kept.
12+
13+
- **Reads of bundled items.** A by-name metadata read of an item the bundle holds is answered from the bundle, as that item's own envelope, and never goes to its by-name route. This covers `getObjectSchema`, `getView`, `getPage`, `getApp`, `getItems`, and every caller of the client's `meta.getItem(type, name)`, including app-shell's `MetadataProvider`. A record open in a warm session therefore sends its page request and no metadata request. A cold open adds at most the one bundle request, sent alongside the page request.
14+
- **Reads of everything else.** Items outside the app (Studio's reads, a lookup to `sys_user`, an item the caller may not read) keep their by-name routes. A read with options does too. An item withheld from the caller is absent from the bundle and carries no name there, so its by-name read gives that item's own refusal.
15+
- **Staying current.** A metadata write through any of the client's write doors, or a host invalidation that names a bundled item, makes the next bundled read revalidate the bundle first. An answer older than the adapter cache's lifetime is revalidated the same way. A cache clear, which happens on an organization, session or locale switch, downloads the bundle again with no validator.
16+
- **No bundle.** If the bundle is refused, the app is unknown, or the server has no such route, every read goes to its by-name route as before.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/components': patch
3+
---
4+
5+
fix(components): in the record drawer, an `Esc` a field takes stays the field's — below the stack's root it no longer steps the pane back, and maximized it no longer restores the pane
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The drawer's dialog layer hears `Esc` on the document in the capture phase, before any field in the record does, and its handler stepped back one level (below the root) or restored the pane (maximized) on every `Esc`. So closing a mention list in the composer, cancelling a cell edit, or leaving an enlarged face also lost the reader's level or the maximized width.
11+
12+
- The drawer now asks what the split pane beside a list already asks: an `Esc` already marked handled, or pressed in a text field, an editable region, or an open menu, list box or dialog inside the record, is not the pane's. The pane stays where it is and the field gets the key.
13+
- A bare `Esc`, or one pressed on a control that owns no key (a button in the record), still steps back below the root and still restores from maximized; at the root it still closes the drawer.
14+
- With focus in a text field, `Esc` never steps the pane back, as in the split pane: move focus out of the field, or use `←`.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/plugin-report': patch
3+
'@objectstack/spec': patch
4+
'@objectstack/lint': patch
5+
---
6+
7+
feat(plugin-report): a report chart draws its `seriesBy` split
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
A report chart that sets `chart.seriesBy` now draws the split it declares: one bar per `xAxis` value, split into one series per value of the `seriesBy` dimension (a bar per owner, split by stage). The chart's own dataset query asks for `[xAxis, seriesBy]` × `[yAxis]` and the rows are pivoted the way a dashboard widget with two dimensions pivots them, null group included. The series follow the split dimension's declared option order, and a `chart.series[]` entry whose `name` is a split value lands its colour and label on that series. Before this, the key was accepted and checked at publish, but the chart still drew a single series.
13+
14+
- **Liveness.** The `chart.seriesBy` row of the report ledger is graded `live` with the renderer as its evidence, so `os validate` no longer prints the "nothing draws it yet" author warning for it.
15+
- **Lint.** `os explain chart-axis-not-selected` now says the report chart queries its `xAxis` dimension and, when set, its `seriesBy` split. No rule, severity or finding changes.
16+
17+
Nothing to do for existing reports. A chart without `seriesBy` queries and draws exactly as before.

‎content/docs/frontend/data-objectstack.mdx‎

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,19 +234,48 @@ either form):
234234

235235
- `connect()` - Establish the connection (called lazily by every operation)
236236
- `getCacheStats()` / `invalidateCache(key?)` / `clearCache()` - Cache control
237+
- `loadAppBundle(appId)` - Load the app's metadata bundle (`GET /meta/app/{appId}/bundle`), or revalidate the one held with `If-None-Match`; by-name metadata reads of the items it holds are answered from it (see [App metadata bundle](#app-metadata-bundle))
237238
- `getClient()` - Access the underlying `@objectstack/client` instance
238239
- `getConnectionState()` / `isConnected()` - Connection introspection
239240
- `onConnectionStateChange(listener)` - Subscribe to state changes (returns unsubscribe)
240241
- `onBatchProgress(listener)` - Subscribe to bulk progress (returns unsubscribe)
241242

242-
Those six bullets cover nine members, and they are the documented subset.
243+
Those seven bullets cover ten members, and they are the documented subset.
243244
`ObjectStackAdapter` declares more members beyond `DataSource` than these —
244245
`Exclude<keyof ObjectStackAdapter<unknown>, keyof DataSource<unknown>>` lists
245246
them all; the rest are lower-level seams — client discovery, cache-key
246247
invalidation, dataset and dashboard access and advisory subscriptions among
247248
them — which this page does not document and which carry no compatibility
248249
promise here.
249250

251+
### App metadata bundle
252+
253+
The console calls `loadAppBundle(appName)` when it enters an app. One request,
254+
`GET /api/v1/meta/app/{appId}/bundle`, returns the app, the objects its
255+
navigation reaches with the objects that reference them, and their views,
256+
pages and dashboards. Each one is the envelope its own
257+
`GET /meta/{type}/{name}` read would return to this caller.
258+
259+
- A by-name read of an item the bundle holds is answered from the bundle and
260+
never sent: `getObjectSchema`, `getView`, `getPage`, `getApp`, `getItems`,
261+
and the client's `meta.getItem(type, name)` with no options.
262+
- An item the bundle does not hold keeps its by-name read. That covers objects
263+
outside the app, reads made with options, and an item withheld from the
264+
caller, which is absent from the bundle and gets its own read's refusal.
265+
- Calling `loadAppBundle` again for the same app sends `If-None-Match` with the
266+
held `ETag` exactly as served (a weak `W/` validator included), and a `304`
267+
keeps the bundle already held.
268+
- A bundle served `no-store` with no `ETag` (the server could not settle a member's field
269+
visibility) answers the reads that waited on it and is not kept. Later reads
270+
go by name until the app is entered again.
271+
- A metadata write through the client, or an `invalidateCache(key)` that names
272+
a bundled item, makes the next bundled read revalidate the bundle first. So
273+
does an answer older than the cache TTL. `clearCache()` drops every bundle,
274+
and the next read downloads it again.
275+
276+
If the bundle is refused, or the server has no such route, every read stays on
277+
its by-name route.
278+
250279
### Per-element data binding
251280

252281
A schema node's `dataSource` key is the spec's `ElementDataSource` (validated by

‎content/docs/ui/pages.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ its own. **动态** is one stream: the discussion, the activity and, with
190190
Its panel shows a one-line composer and the newest entries, and its header opens the whole
191191
stream (`?related=timeline`), filtered by All / Activity / Discussion / Changes. A related
192192
panel's header opens that list's whole table the same way (`?related=<object>.<field>`).
193+
Each of those faces is also a tab: a row of tabs closes the record header, **Overview** first,
194+
then **动态**, then one tab per related panel in the reader's order, each with its count. The
195+
row shows as many tabs as its width fits and folds the rest into a **+N** menu; the open tab
196+
is always on the row, and **Overview** or Esc returns to the page.
193197
Moving a child table into the record's body is therefore a one-word change on the
194198
relationship field, not a page-authoring task, and `relatedList: false` leaves a child off the
195199
page.

‎packages/lint/src/rule-explanations.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3302,8 +3302,9 @@ const CHART_AXIS_NOT_SELECTED_EXPLANATION: RuleExplanation = {
33023302
'chart drawn is unaffected. Advisory: the selection may legitimately be widened at runtime. A ' +
33033303
'query position is never reported: it IS the selection, or the query itself.',
33043304
'The selection is per surface. On a page chart it is `values`, the measure set the query asks ' +
3305-
'for. On a report it is the chart\'s own `chart.yAxis`: the embedded chart queries ' +
3306-
'exactly one dimension × one measure and derives ONE series, while `report.values` is the ' +
3305+
'for. On a report it is the chart\'s own `chart.yAxis`: the embedded chart queries its ' +
3306+
'`chart.xAxis` dimension (and its `chart.seriesBy` split, when set) × that one measure and, ' +
3307+
'without a split, derives ONE series, while `report.values` is the ' +
33073308
'selection of the table beneath it. So a report\'s `chart.yAxis` is never reported — a chart ' +
33083309
'cannot fail to select what it queries — and a `chart.series[].name` override lands only when ' +
33093310
'it names `chart.yAxis`. With `chart.seriesBy` set the chart derives one series per value of ' +

‎packages/lint/src/validate-chart-bindings.ts‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@
5858
* the three surfaces do not agree, so the tier and the consequence are per
5959
* POSITION rather than per rule:
6060
*
61-
* - **Report charts.** The chart runs its OWN query out of the two axis
62-
* strings — `useDatasetRows(dataset, [xAxis], [yAxis], …)` in
61+
* - **Report charts.** The chart runs its OWN query out of the axis
62+
* strings — `useDatasetRows(dataset, [xAxis], [yAxis], …)`, or
63+
* `[xAxis, seriesBy]` × `[yAxis]` with a split, in
6364
* `plugin-report/src/DatasetReportRenderer.tsx`, and in that file's own
64-
* words *"the embedded chart queries only `chart.xAxis` × `chart.yAxis`"*.
65+
* words *"the embedded chart queries only `chart.xAxis` (with
66+
* `chart.seriesBy`) × `chart.yAxis`"*.
6567
* So `chart.yAxis` IS the binding and keeps `error`. `chart.series[]` is
6668
* not: it is *"The author's per-chart override for ONE measure's display
6769
* name — the entry of `chart.series[]` whose `name` IS that measure"*,
@@ -117,13 +119,15 @@
117119
*
118120
* The consequence is per POSITION; the selection it is measured against is per
119121
* SURFACE — and on the report surface that selection is not `report.values`.
120-
* At the same pinned revision `DatasetReportRenderer.tsx` runs
121-
* `useDatasetRows(dataset, plan.kind === 'series' && xAxis ? [xAxis] : [],
122-
* wantsQuery && yAxis ? [yAxis] : [], …)` and derives the plotted series with
123-
* `buildChartSeries(…, [xAxis], [yAxis], …)` — *"the selection is exactly one
124-
* dimension × one measure, so this takes the helper's single-dimension branch
125-
* and returns ONE series"*. `report.values` is the selection of the TABLE
126-
* beneath the chart; the chart's own is the axis pair. Two things follow:
122+
* `DatasetReportRenderer.tsx` queries `[xAxis]` (`[xAxis, seriesBy]` with a
123+
* split) × `[yAxis]` through `useDatasetRows` and derives the plotted series
124+
* with `buildChartSeries(…, queryDimensions, [yAxis], …)` — *"Without
125+
* `seriesBy` the selection is one dimension × one
126+
* measure, so this takes the helper's single-dimension branch and returns ONE
127+
* series"*; with it, one series per `seriesBy` value, whose override names a
128+
* value and is not judged here (below). `report.values` is the selection of
129+
* the TABLE beneath the chart; the chart's own is the axis pair. Two things
130+
* follow:
127131
*
128132
* - **Nothing to report at the report `chart.yAxis`.** That position IS the
129133
* chart's query, so it cannot fail to select itself. The warning that fired
@@ -293,8 +297,9 @@ interface ChartBinding {
293297
/**
294298
* The measures THIS chart's own query selects, when that is narrower than
295299
* the `values` limb above (#15734). Set on the report surface and nowhere
296-
* else: the embedded report chart queries `chart.xAxis` × `chart.yAxis`
297-
* alone and derives exactly ONE series from it, while `report.values` is the
300+
* else: the embedded report chart queries `chart.xAxis` (with its
301+
* `chart.seriesBy` split, when set) × `chart.yAxis` alone and, without a
302+
* split, derives exactly ONE series from it, while `report.values` is the
298303
* selection of the table beneath it. `chart-axis-not-selected` resolves
299304
* against this set where it is present — which is both why a `series[].name`
300305
* override is measured against the singleton `{ chart.yAxis }`, and why the

0 commit comments

Comments
 (0)