Skip to content

design mode 0/9: staging area orders commits, reports per-item results and refuses unsaveable items at selection #39369

Backlog

Description

@objectstack-fleet

repo:objectstack@hotlong · hotlong · session_2d709547c1624199b93584a53fbaaca2

Part of epic #39368 (rulings and invariants there).

Blocks children 2–8 of the epic.

Today

ui/packages/app-shell/src/layout/designMode.tsx commits staged changes one by one, in Map insertion order. On the first failure it shows one toast and returns. Changes saved before the failure stay saved (designMode.tsx:282-292). That was enough while only the menu, header pins and record tabs were staged. It breaks once the mode stages several documents:

  • Order. If the menu is staged first and an item it references is staged later and then fails, the menu has already been published pointing at nothing. saveWith (designMode.tsx:35-41) solves this for one case only.
  • Reporting. One toast cannot say which items went live, which one failed and why.
  • Late refusal. The dashboard editor refuses an item with a pending draft when it opens (DashboardInPageEditor.tsx:18-23), but header pins refuse only at save (designModeHeaderPinsSave.ts:161).
  • Refresh. The mode has no address. A reload drops everything staged (designMode.tsx:76-77); only the browser's leave prompt protects it (designMode.tsx:322-327).

Change

  1. Commit order by dependency. A staged change can declare what it references. Referenced documents commit before the documents that point at them, e.g. menu last.
  2. Per-item results. After a save, list every staged item as saved / failed with its reason. Saved items leave the staging area. Failed items and everything not yet sent stay staged, and the mode stays on (decision 6 of the epic: no server batch).
  3. Refuse at selection. When an item is selected in the mode, check for a pending draft, a read-only package without a customization door, and the per-item gate (the mode's gate is per app package; a menu can link another package's dashboard). Show the item read-only with the reason.
  4. Refresh. At least keep the leave prompt for every staged kind. Decide in the PR whether staged changes survive a reload (e.g. sessionStorage); if not, say so in the bar.

Acceptance

  • A test pins the ordering case: stage a menu change, then a change to an item the menu references that fails. The menu is not published, and both stay staged.
  • A test pins the per-item result list.
  • A test pins the selection-time refusal for a pending draft.

Activity

  1. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ux · domain:ui · Feature · p2 · pm:queue · size M, touched 2026-12-03T16:14Z. Rationale: The maintainer approved the epic's rulings, scope and card split on 2026-12-03 (「按建议整体通过,立专题卡」), so the feature is pre-authorised. Runtime design mode is how the app looks and is used in place (area:ux ①②), and the grade is the epic's p2. Child 0 (the staging area orders commits and reports per-item results) blocks children 2–8, so it goes first.
    Grade: area:ux · Feature · p2 · admins in design mode · read (epic #39368).

  2. added
    domain:ui
    pm:queue
    priority:p2
    on Dec 3, 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:uxdomain:uienhancementpm:queuepriority:p2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions