Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

decision: objectui#11168 — action:button.undoable is declared, but the block path never captures Undo for operation: 'update' (no row stash): deliver it on the block (B) or narrow it off the spec row (C)? #11754

Closed

Description

@objectstack-fleet

Ruled: 6030342264 · letter B · 2026-10-07T03:35Z

Filing gate: ② a decision only the maintainer can make. Filed by the triage seat (objectstack-wide, seat post objectstack-ai/objectstack#6015, session_01AavokzJ5DndAwitDXvKy4U), on the maintainer's instruction 「需要我决裁的问题,立决策卡」. ⛔ Not a claim. Once ruled, the ruling is recorded on this card and on the parent, and this card closes.

Parent: objectui#11168 (p2, pm:on-hold). Its Restart-when: is this ruling and nothing else: "the maintainer rules B or C on action:button.undoable" (5982135645). The question was raised in the slice-1 dev report (5907196304, open question 2) on 2026-09-30, and no decision card carried it until now.

维护者速读

页面上作者配置的"更新"按钮(action:button,operation: 'update')可以声明 undoable,spec 也接受这个写法,但点完之后没有"撤销"按钮。原因是运行时要靠一份行快照才能做撤销,而按钮区块从来不写这份快照。记录详情页上的 api 写法则能正常撤销。

  • B:改 objectui 的运行时,让按钮区块在有记录上下文时(记录页的当前记录、表格的当前行)也能撤销,然后把这个键发布出去。不破坏任何东西,现在就能做。
  • C:请 spec 把 undoable 从 action:button 这一行收窄掉。这是破坏性收窄,只能放进 v18;而且记录页上原本好用的 api 撤销会一并失去这个已声明的键。

推荐 B。回一个字母:B / C。

四棱(os-decision-facets)

  • ① 项目长远合理性:B 让 spec 的规范写法(operation: 'update')在区块上也兑现,符合"声明即兑现"。C 用删除的办法消除差距,代价是丢掉一条今天就能用的路径。
  • ② 实际业务拉动:撤销是用户直接看得到的能力,作者在页面上配的更新按钮今天会"静默没有撤销"。目前没有测到具体客户需求。
  • ③ 防 AI 犯错:B 之后,AI 按 spec 写出的 undoable 在区块上真的生效。C 之后,AI 写这个键会被拒,信号是响亮的,但能力也就没了。
  • ④ 创业阶段不扩散:B 是 objectui 内部一处运行时改动,加上它的 pins,不新增键。C 要动一次 spec,而且必须等 v18。

Prior rulings read: undoable / ActionSchema fulfilment → ruling 5754211444 (objectstack batch #203 item 5, letter C, landed as objectstack-ai/objectstack#19635). Its rule: undoable: true is legal only on a shape some runtime fulfils (operation: 'update' through the framework runtime; type: 'api' through the console), and is refused elsewhere. That rule is why D (publish with a caveat) is out. It does not choose between delivering and narrowing on the block. check-prior-rulings on these terms: 0 further hits. Thread: objectui#11168 5907196304, 5907833984, 5982135645.

一句话问题

spec 对 action:button 声明了 undoable,但按钮区块上 operation: 'update' 这种规范写法从来做不出撤销。是让它在区块上兑现(B),还是从 spec 行里收窄掉(C)?

选项 × 代价

选项 做什么 代价
A(现状) 继续不发布,记账留在 objectui#11168 卡片永远挂着;按钮上声明了也不生效
B @object-ui/core 的 update 路径在区块调用时,从作用域里的记录(记录页的当前记录、表格的当前行)取撤销基准;有基准时生效,然后发布 undoable 一处运行时改动加 pins。没有记录上下文的独立按钮仍然无法撤销,description 要写明这一点(这是声明写法所需的上下文,不是附带的免责说明)
C 请 spec 从 action:button 行收窄掉 undoable 破坏性收窄,要等 v18;记录页的 api 路径失去一个今天就兑现的已声明键
D 原样发布,加一句说明 声明了却做不到,5754211444 已排除这种做法

推荐 + 回退 + 置信缺口

  • 推荐 B。 它兑现的是 spec 自己的规范写法,5754211444 已认定框架运行时兑现 operation: 'update'。它不破坏任何东西,现在就能在 objectui 落地,并且不让任何已兑现的路径倒退。
  • 两年后的样子: 区块、记录页、列表上同一个 undoable 行为一致,只要有记录上下文就能撤销,与动作从哪个界面发起无关。
  • 回退 C,在 v18 里做。
  • 置信缺口: 没有量过有多少已存储页面在 action:button 上写了 undoable。B 的认领方先盘点一遍。
  • 只看①选 B;②③④ 是否翻转:否。

裁后执行

  • B: objectui#11168 回到 pm:queue,下一个切片做 B,加上发布和 pins。分诊记录裁决。
  • C: 在 objectstack 立 spec 收窄卡,带 target:v18,并挡在 #15193 之后。objectui#11168 的这条记账改为指向那张卡。

Activity

  1. added
    domain:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec lane
    area:recordsBusiness objects, records, the views that show data, usable forms, search
    on Oct 7, 2026
  2. objectstack-fleet commented on Oct 7, 2026

    @objectstack-fleet
    ContributorAuthor

    Ruling: batch #284 item 1 · letter B · maintainer 「同意」 2026-10-07T03:33Z

    Director seat, summon #35, session_01VYToj6PQehTEKNrjGM9akg (GitHub os-zhuang; written as objectstack-fleet[bot] via the relay). Batch #284 was presented in chat with this card's options B / C (A and D as the card lists them); the maintainer answered 「同意」, which takes the recommendation. Freshness gate: the body (no comments) and the parent's thread (objectui#11168: the hold correction 5982135645, triage's pointer 6029656672) were re-read before this record; nothing newer exists. Thread-read: none on this card.

    The ruling

    B. The button block delivers undoable where a record is in scope. The runtime already captures Undo whenever the invoking surface hands it the row (packages/core/src/actions/ActionRunner.ts:1788: action.undoable && rowRecord && writtenFields.length > 0), and the surfaces that do so today are the record page's declared-actions bar, the related-record bridge, the layout containers and the grid's rows; the action:button renderer hands it nothing. The change is at the block: when the block runs inside a record context (the record page's current record, a table's current row), it passes that record as the Undo baseline the runner already reads; the key is then published on action:button, with its description stating the one limit (a standalone button with no record in scope offers no Undo, because there is no row to restore). ⛔ Not taken: C (a breaking narrowing of the spec row, v18 only, which would also contradict the closed table the 5754211444 ruling fixed, where operation: 'update' is the shape the framework runtime fulfils, and would strip an already-fulfilled key from the record page's api path), A (the entry stays booked forever) and D (publishing a key that does not deliver, which 5754211444 already excluded).

    Why B: the spec's closed table of fulfillable shapes is already ruled; B makes the block honour it. In two years the same undoable behaves the same on the block, the record page and the list: wherever a record is in scope, the action can be undone, whatever surface it started from.

    State


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:recordsBusiness objects, records, the views that show data, usable forms, searchdomain:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec lanepriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions