Skip to content

Commit c55d2e9

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-27829-searchfields-credential-refused
2 parents 1d6b7d0 + b13a1ed commit c55d2e9

71 files changed

Lines changed: 1652 additions & 150 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: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@object-ui/app-shell': patch
3+
'@object-ui/components': patch
4+
'@object-ui/fields': patch
5+
'@object-ui/i18n': patch
6+
---
7+
8+
fix(app-shell): Setup reads clearer — one name for the app, a confirm before Disable and before switching a packaged action off, the reason a package is read-only, and a forced password change in the user's words
9+
10+
Clause-②: no
11+
Metadata-protocol: none
12+
13+
Suggestions from the 18.3.0 RC Setup walkthrough, each in the console:
14+
15+
- **One name for Setup.** Home's link and the app switcher's entry now carry the Setup app's own label, the name its header shows, instead of "System Settings" and "Settings".
16+
- **A forced password change** reads in the console's own words, in the user's language: the body says an administrator set a temporary password, and the first field is "Temporary password". An expired password keeps the server's sentence and "Current password".
17+
- **The package sheet** says why a read-only package offers no write action (loaded from code, read-only here, or part of the platform), asks before Disable, and calls its delete action "Delete package". Installed Apps has its own subtitle.
18+
- **Packaged automation** asks before switching a packaged action off, says in a toast when a switch was accepted, shows each action's object by its label beside the machine name, and fits a phone screen without a sideways scroll.
19+
- **Record tab strips** that hold more tabs than fit scroll sideways and fade at the edge that hides a tab.
20+
- **A select value of `info` or `warning`** with no declared colour reads blue or yellow, not a hashed alarm orange.
21+
- **Setup's header tags** (Admin config, Platform schema, System-managed, Identity) take keyboard focus, which opens their explanation as hover does.
22+
- `@object-ui/i18n` adds `auth.remediation.password.resetBody`, `auth.remediation.password.temporary` and five `packagedAutomation.*` keys in all ten locales, and five `engine.packages.*` keys in the Studio namespace (en, zh); `engine.packages.detail.deleteApp` becomes `engine.packages.detail.deletePackage`.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
---
4+
5+
fix(plugin-approvals): a `field` approver id, or an out-of-office delegate, that names no account no longer opens a slot no one can take
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
#27397 made a `{ type: 'user' }` approver that names no account expand to nobody. Its two siblings now follow it:
11+
12+
- **`type: 'field'`.** Each id the record field holds is a slot only when an account carries it (the same predicate the reassign door asks, with no organization). An id no account carries logs the shared "expanded to nobody" warning, naming the field and the id, and adds no slot, so a slate it leaves empty reaches the node's `onEmptyApprovers`. A failed directory read keeps the slot.
13+
- **Out-of-office delegation.** A delegation chain that ends on a delegate no account carries routes the slot back to the original approver, with an "expanded to nobody" warning naming both. It never empties the slate, and no `ooo_substitute` action or notification is recorded for it. A failed read keeps the delegate. A removed delegator whose delegate is live still routes to the delegate, as before.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
---
4+
5+
fix(plugin-detail): the discussion header shows no count when a feed read was refused
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A member who may not read a record's comments saw `Discussion (0)` directly above "You don't have permission to view comments on this record." The timeline's heading counted the rows it holds, and a refused read holds none, so the header claimed the record had no comments when the server only withheld them. When the host reports a refused comment or activity read, the timeline heading now shows its title with no count, and the collapsed discussion toggle reads "Open discussion panel" instead of `Show Discussion (0)`. A readable feed keeps its count, `(0)` included.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/core': patch
3+
'@object-ui/i18n': patch
4+
'@object-ui/plugin-view': patch
5+
'@object-ui/plugin-detail': patch
6+
---
7+
8+
fix(console): a record delete says it cannot be undone, and the success toast names the record
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: none
12+
13+
A record delete is permanent (there is no recycle bin), yet the one-record confirm only asked "Are you sure you want to delete this record?" and the success toast said "Record deleted" (record page) or "Task deleted successfully" (list) without saying which record went.
14+
15+
- **The question.** `objectActions.deleteConfirm` (the list row, the record page and the object-view grid Delete) and plugin-detail's `detail.deleteConfirmation` now end with the pack's own "This cannot be undone." sentence, the one the batch question already carried, in all ten locale packs.
16+
- **The toast.** `recordDelete.successText` (`@object-ui/core`) names the deleted record by the same display-name resolver the confirm title reads: `Task "Website Relaunch" deleted`. A record with nothing nameable keeps `{{label}} deleted successfully`. The record page, the console list and the object-view grid all use it; `recordDelete.run` takes an optional `objectDef` so the name follows the object's declared `nameField`. A batch delete keeps its count.
17+
- `@object-ui/i18n` gains `objectActions.deletedNamed` in all ten packs. There is no Undo: there is nothing to restore from.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/plugin-list': patch
3+
'@object-ui/plugin-detail': patch
4+
---
5+
6+
fix(ui): a refused list or related-list read says "no access" and offers no Retry
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
- **List view.** A permission refusal (403) on a list read draws the no-access panel without the Retry button, the same way an object whose API is switched off already did: a retry re-reaches the same refusal. A network failure or a 5xx keeps Retry.
12+
- **Related list.** A related list the reader may not read draws a quiet, neutral line (`role="status"`, no destructive styling) with the list's no-access sentence, and no Retry. It no longer shows the generic action refusal ("You do not have permission to perform this action.") in red to someone who only opened the record. Other read failures are drawn as before.

‎.claude/skills/pm-dispatch/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报
197197
- 批准后再推亦不过期;席位落地 = 过落地前检、清标、ready、auto-merge,踢出/变基同法。
198198
- ③ 请审 = 席位交棒:ACCEPT 与现 head 同形 PASS 俱在案后,中继 `pr_request_reviewers` 请审批人。
199199
- 作者是审批人 ⇒ `assign` 它、请其余(请它必 422);⛔ 永不派/请席位自身账号;Tier S 不交人。
200-
- `pr_create` 不请不派;`pr_ready` 只补交棒漏;PASS 后 head 移 ⇒ 回等复核;脱中继 PR 自读请/派。
200+
- `pr_create` 不请不派;`pr_ready` 只补交棒漏;非例外 head 移 ⇒ 撤挂回等;脱中继 PR 自读请/派。
201201
- 速读「需要你做的」求批点名 PASS 评论 id+`Head-sha`;无 PASS ⇒ 写 contract review owed 不求批。
202202
- ④ 轮次报告单列 awaiting a human merge。
203203
- skills 车道自有 PR:纯代码面如 `scripts/pm/` 由本席按达档自审(清单不减)后落地。

‎.claude/skills/pm-dispatch/references/contract-review.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@
4646
- ④ 恒由起草者之外的 agent 达档跑,起草已达档不免;喂入同上,⛔ 不喂起草者的结论。
4747
- 轮次报告设复审清单专节,与呈裁清单同为强制审计。
4848
- 请审/求批与落地前检两条,过则 Tier S 入队、Tier H 等人批:① 现 head 同形达档 PASS 在案。
49-
- 例外:纯重生成或只动上列散文面的 head 后移原记录继续管;PR 落 `Regen-provenance:` 行。
49+
- head 后移例外:纯重生成或只动散文面原记录续管,落 `Regen-provenance:` 行;余移或现 head 落 FAIL
50+
而已挂 auto-merge ⇒ 派发席读到即照 AGENTS.md disarm 句撤挂,FAIL 记录点名欠撤挂;重挂照 ①。
5051
- ② PR check 全绿,⛔ 非 required 子集;例外:merge-base 同签名的红不计、按设计而红见 SKILL.md。
5152
- 签名 = 失败步 + 首错行,读 base check runs 的 API ⛔ 不凭口述;主干红止血立单不变。
5253
- 落地时仍欠复核的 PR 在落地 head 复审,车道席或分诊按 (a)(b)(c) 接;FAIL ⛔ 不修已关 PR。
5354
- 每条 must-fix 引该记录立新卡、按发现定级;回退仅限主干红(p0,main-red 约定①)或安全边界。
5455

5556
## 等复核标记 `needs:contract-review`
5657

57-
- 只作等复核标记,⛔ 不是闸门;单载体 = PR,卡上副本在规则外、不是要求。
58+
- 只作等复核标记,⛔ 不是闸门:无 check、workflow 或队列守卫读它与认领/hold 行;单载体 = PR。
5859
- 挂:ACCEPT 时条款②任一肢命中而现 head 无同形 PASS 在案 ⇒ 派发席同笔挂于 PR。
5960
- 摘:现 head 同形 PASS 在案 ⇒ 写记录的席同笔摘;PR 合并或关闭 ⇒ 派发席摘;FAIL 不摘。
60-
- ⛔ 无 check、workflow 或队列守卫读标记与认领/hold 行;入队只认同形记录,标记有无不改判。

‎.claude/skills/pm-dispatch/references/landing-operations.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- 路径肢 = diff 触及契约面 `packages/spec/src/**` 非测试,含 error-code-ledger、`*.zod.ts` 契约 schema。
1010
- 声明肢 = 认领评论声明 `Clause-②: yes`,与路径无关;错误的 `no` 是可审计的假申报。
1111
- 子代理起不来 ⇒ 复核缺席,PR 带 `needs:contract-review` 留 draft 队列外;旁路仅维护者逐次亲审
12-
- PASS ⇒ Tier S ready、auto-merge;Tier H 经 SKILL.md ③ 交棒请审;FAIL ⇒ 补丁轮;⛔ 免复核不放行。
12+
- PASS ⇒ Tier S ready、auto-merge;Tier H 经 SKILL.md ③ 交棒;FAIL ⇒ 撤挂,补丁轮;⛔ 免复核不放行。
1313
- 落地后才见欠复核 ⇒ 按 `contract-review.md` 复审落地 head、发现立新卡,⛔ 不修已关 PR。
1414
- DELIBERATE CORRECTION 红(`check-empty-changeset`)⛔ 不等维护者;确认件皆须点名每个被改 note:
1515
- diff 只改 release 文字或注释者:派发席 ACCEPT 确认,逐句引改前与改后,免第二次同 head 复核。
@@ -61,7 +61,6 @@
6161
- ② enable-auto-merge 调用根本没落地,重发与效果验证序列见 `platform-readings.md`。
6262
- ③ PR 碰 `.github/workflows/**`:令牌常驻 `workflows: write`(裁决评论 6104822731),仍拒即授权漂移。
6363
- 确认 MERGED 同一动作里给 `Part of` 卡收口、`Fixes` 卡代关但标也须摘,⛔ 不拆到下轮巡检。
64-
- `Part of` 卡开着不摘 `pm:dispatched`,无在飞物的卡就永远算进 `label:pm:dispatched is:open`。
6564
- 摘标换回 `pm:queue` 或按剩余物定级,加一条写清交付了什么、剩下归谁的评论。
6665
- 同刻读相关卡 `closed_by_pull_requests`,确认没有卡被正文闭合关键词误关。
6766
- 每次合并后重拉一次车道盘点与预期状态对账,⛔ 不留给下轮巡检。
@@ -70,6 +69,7 @@
7069
- MERGED 不是终点:发版后义务见 `release-aftercare.md`。
7170
- PR 开出至 MERGED,每看一眼(唤醒/巡检/报告前)同读检查与 `mergeable_state`;`unknown` 即重读。
7271
- `dirty` ⇒ 当即合 `origin/main` 推新提交,⛔ 不等冲突通知;未见非 `dirty` ⛔ 不报无需你做。
72+
这一移 head 的撤挂与重挂照 `contract-review.md` head 后移例外条。
7373
- MERGED 或关闭即退订,同刻把 `mode:cloud` 派的会话 `archive_session`。
7474
- 触发条件是卡终局且报告已收复核;⛔ 合并前不归档,误归档可 unarchive 但容器现场已失。
7575
- 暂停或交接时把在挂订阅清点进座位贴,⛔ 不留孤儿订阅。

‎examples/app-crm/src/apps/crm.app.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ export const CrmApp = App.create({
3030
label: 'Analytics',
3131
icon: 'chart-bar',
3232
children: [
33-
{ id: 'nav_pipeline_dashboard', type: 'dashboard', dashboardName: 'pipeline_dashboard', label: 'Pipeline', icon: 'layout-dashboard' },
33+
// Offered only to a member who can read the opportunities every
34+
// Pipeline widget aggregates (`opportunity_metrics` is bound to
35+
// `crm_opportunity`); anyone else would open a page whose every tile
36+
// the server refuses. `visible` hides; the dataset query's own 403
37+
// stays the enforcement (ADR-0066 D4).
38+
{ id: 'nav_pipeline_dashboard', type: 'dashboard', dashboardName: 'pipeline_dashboard', label: 'Pipeline', icon: 'layout-dashboard', visible: "current_user.can('crm_opportunity', 'read')" },
3439
],
3540
},
3641
],
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
/**
4+
* [#27735] The Pipeline nav entry is offered only to a member who can read
5+
* what the dashboard shows (ruling 6512784198, letter G).
6+
*
7+
* The entry carries a `visible` predicate, `current_user.can(OBJECT, 'read')`,
8+
* which the console's nav guard answers from the member's permissions payload.
9+
* It hides; it refuses nothing. The refusal stays where it already is: the
10+
* dataset query of every widget answers 403 to a caller who cannot read the
11+
* dataset's object (ADR-0066 D4: `visibleWhen` hides, `requiredPermissions`
12+
* refuses). So the one thing that can go wrong here is the predicate naming
13+
* an object other than the one the widgets read, and that is what is pinned,
14+
* off the parsed stack rather than the source constants.
15+
*/
16+
17+
import { describe, expect, it } from 'vitest';
18+
import stack from '../objectstack.config.js';
19+
20+
type NavEntry = {
21+
id?: string;
22+
type?: string;
23+
dashboardName?: string;
24+
visible?: { dialect?: string; source?: string };
25+
children?: NavEntry[];
26+
};
27+
28+
function findNav(entries: NavEntry[] | undefined, id: string): NavEntry | undefined {
29+
for (const entry of entries ?? []) {
30+
if (entry.id === id) return entry;
31+
const hit = findNav(entry.children, id);
32+
if (hit) return hit;
33+
}
34+
return undefined;
35+
}
36+
37+
const READ_PREDICATE = /^current_user\.can\('([a-z0-9_]+)', 'read'\)$/;
38+
39+
const app = (stack.apps ?? []).find((a) => a.name === 'crm_app');
40+
const navEntry = findNav(app?.navigation as NavEntry[] | undefined, 'nav_pipeline_dashboard');
41+
const dashboard = (stack.dashboards ?? []).find((d) => d.name === 'pipeline_dashboard');
42+
// The stack parse normalises an authored CEL string to `{ dialect, source }`.
43+
const predicate = navEntry?.visible;
44+
45+
describe('Pipeline nav entry audience (#27735)', () => {
46+
it('carries a read predicate on one object', () => {
47+
expect(navEntry).toMatchObject({ type: 'dashboard', dashboardName: 'pipeline_dashboard' });
48+
expect(predicate?.dialect).toBe('cel');
49+
expect(predicate?.source).toMatch(READ_PREDICATE);
50+
});
51+
52+
it('names the object of the dataset every pipeline_dashboard widget reads', () => {
53+
const named = predicate?.source?.match(READ_PREDICATE)?.[1];
54+
expect(named).toBeDefined();
55+
const widgets = (dashboard?.widgets ?? []) as Array<{ dataset?: string }>;
56+
expect(widgets.length).toBeGreaterThan(0);
57+
const objects = new Set(
58+
widgets.map((w) => (stack.datasets ?? []).find((d) => d.name === w.dataset)?.object),
59+
);
60+
expect([...objects]).toEqual([named]);
61+
});
62+
});

0 commit comments

Comments
 (0)