Skip to content

Commit f3c0fc1

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/issue-25233-external-role
2 parents 3ec8ff7 + 5ea211c commit f3c0fc1

23 files changed

Lines changed: 1922 additions & 999 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/plugin-approvals': patch
3+
---
4+
5+
fix: the approval request page's Timeline shows each action's step by its label, not the node's machine id
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The Timeline tab of the `sys_approval_request` record page lists the request's `sys_approval_action` rows. Its step column asked for `step_name`, which holds the Approval node's id (for example `dual_signoff`), so every row showed that id. The column is now `step_label`, the step's label that the service writes on every row and the boot backfill fills on older rows. The strip's step chip (`current_step_label`) and the object's own lists already show this label.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/service-settings': patch
3+
---
4+
5+
fix: Setup → AI's "Reset to environment defaults" button is now translated in zh-CN, ja-JP and es-ES
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
The `ai` settings manifest declares an `action_button` with id `reset`, but no locale bundle carried `settings.ai.actions.reset.label`, so the button rendered in English beside its translated siblings. The bundles now carry it (en, zh-CN, ja-JP, es-ES).
11+
12+
The settings translation coverage test now reads every manifest's `action_button` labels: each shipped non-English locale must carry `settings.<namespace>.actions.<id>.label` for every action button, and no bundle may carry action copy for a button no manifest declares.

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

Lines changed: 78 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,13 +1747,37 @@ export const InquiryPurgeFlow = defineFlow({
17471747
* pattern (钉钉/Salesforce style) that needs no parallel branches. Set
17481748
* `minApprovals` > 1 for "two from each group"; use `behavior: 'quorum'` +
17491749
* `minApprovals` for M-of-N collective sign-off.
1750+
*
1751+
* **The decision is written back onto the report** — an explicit
1752+
* `update_record` on each outcome branch: approve → `status: 'approved'`,
1753+
* reject → `status: 'draft'` (back to the submitter, who can rework and
1754+
* resubmit — the same revert-on-reject {@link InvoiceDualSignoffFlow} does).
1755+
* Without these two nodes both outcomes were bare `end`s, so an expense report
1756+
* both groups had approved kept reading "Submitted" forever.
1757+
*
1758+
* Why not the approval node's `approvalStatusField` mirror instead: the mirror
1759+
* writes the REQUEST's status vocabulary verbatim (`pending` on open,
1760+
* `approved` / `rejected` on decide, `recalled`, `returned`), has no value
1761+
* mapping, and writes only values the target field declares among its options
1762+
* (anything else is skipped with a warn). `status` here is the report's own
1763+
* lifecycle select (`draft` / `submitted` / `approved` / `reimbursed`) — it
1764+
* declares neither `pending` nor `rejected`, so a mirror onto it would warn on
1765+
* every submit and leave a REJECTED report reading "Submitted", the very
1766+
* defect being fixed. The spec also advises a mirror target be readonly, and
1767+
* this one is the field the submitter edits. A business-lifecycle field
1768+
* driven by the decision is what `update_record` per branch is for.
1769+
*
1770+
* `runAs: 'system'` for the same reason as the invoice flow: the write-back is
1771+
* an outcome of the approval process, not an act of the submitter, so it must
1772+
* land whatever the submitter's edit rights on a submitted report are.
17501773
*/
17511774
export const ExpenseSignoffFlow = defineFlow({
17521775
name: 'showcase_expense_signoff',
17531776
label: 'Expense Report Sign-off',
17541777
description: 'Manager + finance per-group sign-off (会签) on a submitted expense report (#3266).',
17551778
type: 'autolaunched',
17561779
status: 'active',
1780+
runAs: 'system',
17571781
nodes: [
17581782
{
17591783
id: 'start',
@@ -1779,13 +1803,35 @@ export const ExpenseSignoffFlow = defineFlow({
17791803
lockRecord: true,
17801804
},
17811805
},
1806+
{
1807+
id: 'mark_approved',
1808+
type: 'update_record',
1809+
label: 'Mark Report Approved',
1810+
config: {
1811+
objectName: 'showcase_expense_report',
1812+
filter: { id: { dialect: 'cel', source: 'record.id' } },
1813+
fields: { status: 'approved' },
1814+
},
1815+
},
1816+
{
1817+
id: 'return_to_draft',
1818+
type: 'update_record',
1819+
label: 'Return Report to Draft',
1820+
config: {
1821+
objectName: 'showcase_expense_report',
1822+
filter: { id: { dialect: 'cel', source: 'record.id' } },
1823+
fields: { status: 'draft' },
1824+
},
1825+
},
17821826
{ id: 'approved', type: 'end', label: 'Approved' },
17831827
{ id: 'rejected', type: 'end', label: 'Rejected' },
17841828
],
17851829
edges: [
17861830
{ id: 'e1', source: 'start', target: 'dual_signoff' },
1787-
{ id: 'e2', source: 'dual_signoff', target: 'approved', label: 'approve' },
1788-
{ id: 'e3', source: 'dual_signoff', target: 'rejected', label: 'reject' },
1831+
{ id: 'e2', source: 'dual_signoff', target: 'mark_approved', label: 'approve' },
1832+
{ id: 'e3', source: 'dual_signoff', target: 'return_to_draft', label: 'reject' },
1833+
{ id: 'e4', source: 'mark_approved', target: 'approved' },
1834+
{ id: 'e5', source: 'return_to_draft', target: 'rejected' },
17891835
],
17901836
});
17911837

@@ -1797,13 +1843,19 @@ export const ExpenseSignoffFlow = defineFlow({
17971843
* `minApprovals` clamps to the approver count so a misconfiguration can never
17981844
* deadlock. Where `per_group` requires one from EACH group, `quorum` counts a
17991845
* flat tally across all approvers.
1846+
*
1847+
* The decision is written back onto the report exactly as in
1848+
* {@link ExpenseSignoffFlow} (approve → `approved`, reject → `draft`), and for
1849+
* the same reasons — see that flow's docblock for why this is an
1850+
* `update_record` per branch and not an `approvalStatusField` mirror.
18001851
*/
18011852
export const CommitteeQuorumFlow = defineFlow({
18021853
name: 'showcase_committee_quorum',
18031854
label: 'High-Value Expense — Committee Quorum',
18041855
description: 'Any 2-of-3 committee members approve a high-value expense report (#3266 quorum / M-of-N).',
18051856
type: 'autolaunched',
18061857
status: 'active',
1858+
runAs: 'system',
18071859
nodes: [
18081860
{
18091861
id: 'start',
@@ -1830,13 +1882,35 @@ export const CommitteeQuorumFlow = defineFlow({
18301882
lockRecord: true,
18311883
},
18321884
},
1885+
{
1886+
id: 'mark_approved',
1887+
type: 'update_record',
1888+
label: 'Mark Report Approved',
1889+
config: {
1890+
objectName: 'showcase_expense_report',
1891+
filter: { id: { dialect: 'cel', source: 'record.id' } },
1892+
fields: { status: 'approved' },
1893+
},
1894+
},
1895+
{
1896+
id: 'return_to_draft',
1897+
type: 'update_record',
1898+
label: 'Return Report to Draft',
1899+
config: {
1900+
objectName: 'showcase_expense_report',
1901+
filter: { id: { dialect: 'cel', source: 'record.id' } },
1902+
fields: { status: 'draft' },
1903+
},
1904+
},
18331905
{ id: 'approved', type: 'end', label: 'Approved' },
18341906
{ id: 'rejected', type: 'end', label: 'Rejected' },
18351907
],
18361908
edges: [
18371909
{ id: 'e1', source: 'start', target: 'committee' },
1838-
{ id: 'e2', source: 'committee', target: 'approved', label: 'approve' },
1839-
{ id: 'e3', source: 'committee', target: 'rejected', label: 'reject' },
1910+
{ id: 'e2', source: 'committee', target: 'mark_approved', label: 'approve' },
1911+
{ id: 'e3', source: 'committee', target: 'return_to_draft', label: 'reject' },
1912+
{ id: 'e4', source: 'mark_approved', target: 'approved' },
1913+
{ id: 'e5', source: 'return_to_draft', target: 'rejected' },
18401914
],
18411915
});
18421916

0 commit comments

Comments
 (0)