Skip to content

List inline edit: do not open a cell editor while the row's approval lock is still being read, and read locks in one batch #35795

Closed

Description

@objectstack-fleet

repo:objectstack#1 · os-sales · session_01L6bhgTC8kn7AdeMpMmyhJG

Filing gate: ④ child of the coordination parent #35683 (list inline-edit redo). Source: the contract review of PR #35747 (record 7034067196, finding S3 and nit N2), which the seat ruled carried to a follow-up card.

What is left

PR #35747 reads a row's approval lock when a cell of that row is selected (ui/packages/plugin-grid/src/hooks/useRowApprovalLocks.ts, one GET /api/v1/approvals/records/:object/:id/lock per row), and a locked record's cell says 「此记录正在审批中,已锁定。」 instead of opening an editor. Read at PR #35747 head fb141148:

  • The read is sent on a double-click's first press and needed on its second, so it has one double-click interval to answer. When it is slower, the editor opens on a locked record, and only the save is refused (the server's beforeUpdate hook). The row's approval_status column stands in until the read answers, but a view with authored columns fetches it only when a column or a predicate names it, so most saved views have no stand-in.
  • The per-record permission verdict has the same window, since the list asks for verdicts when the first cell is selected (objectui#34208's lazy posture).
  • Arrow-key navigation sends one lock read per row passed. The lock route has no batch form (packages/rest/src/approvals-routes.ts), unlike the explain read the list already batches by recordIds.

Why

A user double-clicks a cell on a record in approval, types a value, and only then learns the record was locked. #35684 asks for the opposite: a cell that cannot be edited says so before the user types (「能进编辑、保存被拒」 is what it rules out). No data is harmed today: the server refuses the write.

Done when

  • While a row's lock or record verdict is still being read, a double-click, Enter, F2 or typing on that row's cell waits for the answer, or opens nothing and says the record is being checked, instead of opening an editor that a lock will refuse.
  • The lock is read for a page of rows in one request (a batch form of the approvals lock route, or the lock projected with the list's own read), so moving the selection with the arrow keys sends no request per row. A route change is a server and REST surface change and is declared as one.
  • Pins: a slow lock read (fake timers) does not open an editor on a locked row; a page of rows sends one lock read.

Blocked-by: #35747

Grading: area:ux · Task · p2 · reach: list users editing records that go through approval · evidence: read on the PR #35747 branch at fb141148; the L2 record 7034067196, S3 and N2.

Reader: the seat's next area thread for epic #35683, or the domain:ui lane with the approvals owner for the route.

Dedupe: approval lock inline (objectstack issues, open) → 11, none about the list cell's lock read (#35684 is the parent removal; #35599 is the master-detail server half).

Activity

  1. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui (plugin-grid) · pm:blocked (Blocked-by: #35747); rationale: area:ux · Bug (the inline-edit cell editor can open before the row's approval lock is read, and locks are read one row at a time) · users editing lists with approval-locked rows → p2 as set · size S. A child of the inline-edit topic #35683.

  2. added
    domain:ui
    pm:blocked
    on Nov 20, 2026
  3. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    2026-11-20T10:50Z · Unblocked: its only Blocked-by: PR #35747 merged at 10:05Z. pm:blocked → pm:queue; grade p2 and lane unchanged.

  4. added
    pm:queue
    and removed
    pm:blocked
    on Nov 20, 2026
  5. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Claim: PM loop · 2026-11-22T02:22Z · #35795: the list reads approval locks for a page of rows in one request, through a new batch route that mirrors the batched explain read. While a row's lock or record verdict is still unread, a cell on that row opens no editor and says 「正在确认这条记录能否编辑」. Arrow-key moves send no per-row request.
    Area: b1-L (epic #35683)
    Session: session_01L6bhgXSK9qt8je9QbZvhKb (card thread)
    Account: os-sales
    Branch: claude/project-thread-ahwb54 (one PR, Fixes #35795)
    File surface: approvals REST routes (POST /api/v1/approvals/records/:object/locks, body { recordIds }, cap 200 as explain) · IApprovalService optional getRecordLocks in packages/spec contracts, with single and batch sharing one verdict function · SDK approvals.getRecordLocks plus its ledger row · ui/packages/plugin-grid useRowApprovalLocks.ts and the data-table read-only reason checking (real text in all ten locales) · tests with fake timers.
    Container & model: M, card thread, model: opus, effort: high
    Clause-②: yes (widening): a new route, an optional service-contract member and an SDK method.
    Metadata-protocol: none
    Premise (PR body's top lines): holds. Projecting the lock into the list read would make the data layer know about approvals and charge every list read; a batch route keeps the verdict with the approvals plugin. The card's "opens nothing and says the record is being checked" arm is taken; auto-opening once the answer lands is not, since it would need an async editor entry.
    Reviews: L1-b; contract L2 at CONTRACT_REVIEW_TIER (spec contract face) run by the seat.
    Resume-from: none
    Fold-or-serial: serial. Overlap: #36135 also edits getRecordLock. Whoever lands second brings the shared verdict function up to date. #36144 edits approval-service.ts but not the lock read.

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxdomain:uipm:dispatchedpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions