Skip to content

设计模式:暂存的记录按钮顺序只在页头预览,行菜单要保存后才跟上 #36820

Todo

Description

@objectstack-fleet

triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

Filing gate: ① a product defect, filed by triage at repo:objectstack#3's request (mailbox #36743, comment 7119924174). Source: the Acceptance notes of PR #36815 (#36494) and its L1 record 7119889919. Part of #36359 (the design-mode epic).
Blocked-by: #36815

What happens

In design mode, an admin who rearranges the record action order sees the staged order previewed in the record header. The grid's row menu and right-click menu keep the saved order until the arrangement is saved. So the preview of one change disagrees across surfaces on the same page.

reach: disclosed by the PR's own Acceptance notes, not measured in a browser. It reaches every admin arranging record actions in design mode once #36815 lands.

Expected

A staged record-order arrangement previews on every surface it will govern once saved: the record header, the row menu and the right-click menu.

Acceptance

  • In design mode, a staged reorder shows in the row menu and the right-click menu before save, with a component or browser pin.
  • Discarding the staged change restores the saved order on all three surfaces.

Dedupe: open issues for "row menu record order" return #36494 (in flight, the saved-order half) and nothing on the staged preview.

Activity

  1. added
    bug
    priority:p2
    pm:blocked
    domain:ui
    on Nov 24, 2026
  2. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:ux · domain:ui · priority:p2 · Bug · pm:blocked (Blocked-by: #36815) · size S. Part of #36359.
    Rationale: the design-mode preview of a staged reorder disagrees across surfaces of one page. That is a UX problem, not hit by every user every time, so under the UX rule in North Star Priority rule 2 it is p2. It exists only once PR #36815 lands, so the card waits on it, and the unlock scan queues it at the merge.

  3. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Unlock: Blocked-by: #36815 is satisfied, so pm:blocked → pm:queue. The grade is unchanged (p2).

    PR #36815 merged at 2026-11-24T03:08Z. Row menus now follow actionLayout.record on main, so this follow-up can start.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

    Claim: PM loop round (a4-C, resumed)
    Session: session_01QSeKYnagJvGbCtNg2PhvgW
    Account: os-justin
    Branch: claude/issue-36820-staged-row-menu-order
    Worktree: objectstack-issue-36820
    Domain: domain:ui
    Seat: repo:objectstack#4
    Area: a4-C
    Epic: #36359 (part of; the design-mode epic)
    File surface: ui/packages/plugin-grid/src/{ObjectGrid.tsx,rowActionArrangement.ts,components/RowActionMenu.tsx} (the row menu and right-click menu's record-arm read), ui/packages/app-shell/src/layout/{DesignModeHeaderPins.tsx,designModeHeaderPinsModel.ts} (only to expose the staged record arrangement the header already previews), their tests, .changeset/* (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier: no path-derived mandate), effort: medium
    Clause-②: no (expected: a design-mode preview wiring, no export, key or schema change; the dev measures it)
    Metadata-protocol: none
    Responsibility: platform UI code in objectstack (the grid's row menus rank by the served actionLayout.record only, so a staged reorder previews in the header and not in the row menus) | the header preview path (DesignModeHeaderPins) already holds the staged arrangement | every admin arranging record actions in design mode; reached since #36815 landed
    Thread-read: 7121278880
    Premise: holds (on main dbc1765: ObjectGrid.tsx:1419 ranks row actions by objectSchema.actionLayout.record as served, with no read of a staged arrangement; #36815 merged)
    Serial constraints cleared: #36815 merged (the card's former Blocked-by). In flight in this zone: PR #37249 (Home files, locale packs), PR #37340 (StudioRoute, AiUnavailable, locale packs), PR #37336 (runtime/spec/core). No shared file; overlap-check on main is clean.
    Prior rulings read: none on this card; the epic #36359's design-mode rules and #36815's L1 7119889919.

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 25, 2026
  7. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW
    os-dev-report

    {
      "issue": 36820,
      "status": "needs_decision",
      "branch": "claude/issue-36820-staged-row-menu-order",
      "pr": null,
      "head": "c2f8bff93f (origin/main at worktree creation; the branch was pushed empty, no commits)",
      "session": "session_01QSeKYnagJvGbCtNg2PhvgW",
      "premise_still_valid": true,
      "summary": "Premise holds on main c2f8bff93f: ObjectGrid.tsx:1419 ranks row actions by `objectSchema.actionLayout.record`, where objectSchema is the grid's own `dataSource.getObjectSchema` read (ObjectGrid.tsx:1716), with no read of anything staged. Stopped before building, per the dispatch's stop condition: the staged arm lives only in app-shell's design-mode store (`useDesignModeChange(pinsChangeKey(name))`, designMode.tsx:321), app-shell is private and lists @object-ui/plugin-grid as a dependency, so plugin-grid cannot import it (cycle), and no context the grid already reads carries it. The record header reaches it only through a host channel added for it in @object-ui/components (`RecordHeaderState.actionLayout`, record-header-bar-context.ts:111), which the grid is not under on a list page. Every route therefore needs a new public export or prop on a published package (@object-ui/plugin-grid, @object-ui/react or @object-ui/plugin-list, all v18.6.0, not private), plus at least one file outside the claimed surface (a barrel and a mount site). Options below.",
      "tests": "none run: no code written (stopped at the dispatch's stop-and-report condition). Readings, all against c2f8bff93f in objectstack: ObjectGrid.tsx:1419 arm read; ObjectGrid.tsx:1018/1716 objectSchema from dataSource.getObjectSchema; app-shell/package.json lists @object-ui/plugin-grid (dependency + peer), app-shell private=true; plugin-grid private=undefined v18.6.0; DesignModeProvider mounted once at app-shell/src/layout/ConsoleLayout.tsx:296.",
      "gates": "none run: no diff. dispatch-gates --commands not run because the change set is empty.",
      "dogfood_battery": "n/a — no PR, no `!` title, no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "1 — POST repos/objectstack-ai/objectstack/issues/36820/comments via post-stamped.mjs (this report); plus one git push of the empty branch (landing marker, not a REST write)",
      "open_questions": [
        {
          "question": "How should the grid's row menus reach the design mode's staged record arrangement, given app-shell (which holds the store) cannot be imported by plugin-grid?",
          "options": [
            "A — plugin-grid exports a small context (e.g. a provider plus hook keyed by object name, answering a record arm or undefined); ObjectGrid reads it ahead of the served `actionLayout.record` at line ~1419. app-shell adds a bridge (exported from DesignModeHeaderPins.tsx, reading the staged `object-pins:NAME` changes, so the store stays the one source) and mounts it once under DesignModeProvider in ConsoleLayout.tsx. Widening: one new export on @object-ui/plugin-grid (Clause-②: no (widening) or yes, PM's call). Files outside the surface: plugin-grid/src/index.tsx, app-shell/src/layout/ConsoleLayout.tsx. Cost: small, ~80 lines + a component pin in the grid and a bridge pin; covers every grid under the shell (list page, related lists, split pane) with one mount. Discard restores automatically (unstage empties the context).",
            "B — a new runtime prop on ObjectGrid (the record arm the host holds ahead of the served one), threaded from app-shell through plugin-view/ListView (plugin-list) to the grid, and separately at each other grid mount (record-page related lists, split pane). Widening: props on @object-ui/plugin-grid and @object-ui/plugin-list. Cost: medium-large; ListView.tsx is ~8.8k lines and every mount site must thread it, so a missed site silently keeps the saved order — the defect class this card is.",
            "C — a generic host channel in a lower shared package (@object-ui/react): an object-scoped action-layout override context that the record header, the grid and any later surface (kanban card menu, list toolbar) all read, fed by the same app-shell bridge; the record-header-bar `actionLayout` field could later fold into it. Widening: new export on @object-ui/react. Cost: medium; most files outside the surface (react barrel, grid, app-shell mount, optionally components); best long-term single source.",
            "D (not recommended) — overlay staged `actionLayout` into the MetadataCtx objects under design mode. No new export, but it leaks staged state into every metadata reader (forms, lint, save paths) and the grid reads its schema from the data source, not MetadataCtx, so it still needs a grid change."
          ],
          "recommendation": "A, because it is the smallest widening (one export on the package that owns the consumer), keeps the design-mode store as the single source via a bridge in the file the surface already names, needs one mount for all grids, and mirrors the record header's existing host-channel precedent. Choose C instead if the PM wants one channel for every surface now. Note: the dispatch did not supply the decision axes the 停手 frame requires; the options above are costed on files touched, widening, mount-site count and miss risk, and the PM should re-frame them on the epic's axes if those differ."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  8. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

    维护者速读

    • 问题:管理员在设计模式里调整记录操作按钮的顺序后,页头马上按新顺序预览,但表格每一行的「更多」菜单和右键菜单要等保存后才变,同一个页面上两处顺序对不上。
    • 选项:A 表格组件开一个小入口,由设计模式把暂存的顺序递进去,所有表格一次接通,一个小 PR;B 把顺序当参数从外层一路传到每一个表格,改动大,漏传一处就还是旧顺序;C 做一个所有界面共用的通道,页头、表格、以后的看板菜单都读它,一个中等 PR;D 把暂存顺序混进全局元数据,不建议。
    • 推荐 A:改动最小、只有一个数据源,做法和页头现在拿暂存顺序的方式一致。
    • 不定会怎样:管理员调顺序时只能看到一半效果,要保存后才知道行菜单变成什么样。

    Analysis (for reviewers and agents)

    Background. #36820 (part of the design-mode epic #36359): a staged record-action order previews in the record header but not in the grid's row menu and right-click menu. The dev's report 7171750204 confirmed the premise on main c2f8bff93f and stopped at the dispatch's stop condition: every route needs a new public export or prop on a published package.

    Governing text. The record header's host channel: RecordHeaderState.actionLayout in ui/packages/components/src/renderers/layout/record-header-bar-context.ts (~111), added by PR #36629 (#36366) and fed the staged arm by design mode. git grep finds no design-mode or staged reader in ui/packages/plugin-grid/src. No ruling on staged previews for the grid was found (prior-rulings search below).

    Protocol. No spec or metadata-protocol change on any option. A and C each add one export to a published UI package (@object-ui/plugin-grid, or @object-ui/react for C): a widening (Clause-②: yes (widening)). B adds props on @object-ui/plugin-grid and @object-ui/plugin-list. Metadata-protocol: none.

    Premise (re-check). git grep -n "actionLayout?.record" origin/main -- ui/packages/plugin-grid/src/ObjectGrid.tsx shows the served arm only (~1419). The grid's objectSchema comes from dataSource.getObjectSchema (~1716). The staged arm lives in app-shell's design-mode store (useDesignModeChange(pinsChangeKey(name)), designMode.tsx:321). app-shell is private and depends on @object-ui/plugin-grid, so the grid cannot import it.

    The question. How do the grid's row menus reach the staged record arrangement?

    Option What it does What the admin sees Effort
    A plugin-grid exports a small context (a provider plus a hook keyed by object name). ObjectGrid reads it ahead of the served arm. An app-shell bridge in DesignModeHeaderPins.tsx feeds it from the store, mounted once in ConsoleLayout.tsx. Every grid under the shell (list page, related lists, split pane) previews the staged order; discarding restores the saved order with no extra code. domain:ui · 1 PR, ~80 lines plus 2 pins (dev's estimate) · no isolated precedent; the header channel came in as part of #36629 (+3726/−91, 82 files)
    B A new ObjectGrid prop carrying the host's arm, passed down through plugin-view and ListView, and separately at every other grid render site. The same, where the prop was passed; a missed site silently keeps the saved order. domain:ui · 1 large PR (ListView is ~8.8k lines; every render site) · no precedent
    C A generic, object-scoped action-layout override context in @object-ui/react, read by the header, the grid and later surfaces (kanban card menu, list toolbar), fed by the same bridge; the header's field can fold into it later. The same as A now, and one channel for later surfaces. domain:ui · 1 medium PR, the most files touched · no precedent
    D Overlay the staged actionLayout onto the objects in MetadataCtx while design mode is on. Staged state leaks into every metadata reader (forms, lint, save paths); the grid still needs a change, since it reads its schema from the data source. not recommended

    Business meaning. A is "the preview screen gets a feed from the editor"; B is "hand-carry the draft to every screen"; C is "one shared preview bus for every screen"; D is "write the draft into the master copy while editing".

    os-decision-facets
    ① Long-term soundness: A keeps the design-mode store as the single source and adds one narrow channel that mirrors the header's existing one; C is the cleanest end state (one channel for all surfaces); B multiplies wiring points; D blurs staged and saved state.
    ② Business pull: every admin arranging record actions in design mode today sees the header and the row menus disagree (reached since #36815 landed).
    ③ AI-error resistance: A and C fail safe (no provider ⇒ the saved order, the current behaviour); B fails silently at each missed render site; D can leak an unsaved order into save and lint paths.
    ④ Startup non-sprawl: A adds one export on the package that owns the consumer; C adds a more general export on a lower package; B adds props on two packages; D adds no export but a cross-cutting behaviour.
    

    Prior rulings read: staged action layout design mode grid → 52 hits, none on a grid preview channel; ADR none; thread: none

    Recommendation: A. Only reading ①: the end state is "design mode's staged edits preview on every surface they will govern, from one source". A reaches it for the grid with the smallest new surface and the same pattern the header already uses. C would be the pick if the maintainer wants one channel for every surface now. Its ① reading is close to A's, and its work is larger but under 3×, so the letter does not flip. Self-check: on ① alone, A; ②③④ do not flip it. Confidence gap: the ~80-line estimate is the dev's and has not been built; the related-list and split-pane grids are assumed to sit under ConsoleLayout (the dev read one mount at ConsoleLayout.tsx:296).

    After the ruling. The zone re-dispatches #36820 (S·medium, subagent) on the chosen option. The file surface adds the export file and the mount point. The PR declares Clause-②: yes (widening) for A or C and carries a pin for the staged order in both row menus, a discard control, and an ablation.

    Related. #36359 (epic), #36815 / PR #36815 (the saved-order half), PR #36629 (the header's host channel).

  9. added
    needs-user-decision
    and removed
    pm:dispatched
    on Nov 25, 2026
  10. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Ruled · 2026-11-25T22:53Z · A

    The maintainer's words, verbatim, in seat repo:objectstack#4's session: 「以上同意」. They were answering the seat's presentation of decision 7171807767, which recommended A. Freshness: I re-read up to 7171807767, the newest comment, which has no later edit.

    • A: @object-ui/plugin-grid exports a small context: a provider plus a hook that reads by object name. ObjectGrid reads it before the server's actionLayout.record. app-shell mounts a bridge once in ConsoleLayout, through DesignModeHeaderPins, that reads the staged object-pins edit. The widening is one new export on plugin-grid. This follows the precedent of the header's RecordHeaderState host channel.
    • The dev's file surface grows to include plugin-grid/src/index.tsx and ConsoleLayout.tsx. The declaration is Clause-②: yes (widening).

    State: needs-user-decision → pm:queue. Under the maintainer's wind-down order it is not dispatched today. Zone a4-C claims it next round and cites this comment as Ruling-ref:.

  11. added
    pm:queue
    and removed
    needs-user-decision
    on Nov 25, 2026
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:uxbugdomain:uipm:queuepriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions