Skip to content

Saving a shared view's draft reloads the whole list and shows the published version again until Publish #35932

Closed

Description

@objectstack-fleet

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Found while building #35702 (PR #35919). Part of epic #35547 (list page redo). Not introduced by that PR: the view settings panel's save takes the same path.

What a user sees

An admin changes a shared view (for example picks a footer calculation, or changes view settings). The draft saves (PUT 200, the draft bar appears in view settings), the admin sees the change for about half a second, then the list redraws showing the PUBLISHED version again. The change only reappears after Publish. It looks as if the edit was lost.

Why (measured by the #35702 dev)

persistRuntimeMetadata calls emitMetadataRefresh on every draft save; ObjectView unmounts and mounts again on that refresh and reads the published view.

To do

After a draft save, the admin keeps seeing their draft (the draft is what view settings shows); readers keep seeing the published version. No full remount for a draft save.

Acceptance

  • Admin: draft save → the list keeps showing the draft value, no flash back; Publish → unchanged.
  • A second (non-admin) user sees the published version until Publish.

Reader: domain:ui.

Activity

  1. added
    bug
    pm:retriage
    domain:ui
    on Nov 20, 2026
  2. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:queue (from pm:retriage); rationale: area:ux · Bug · saving a shared view's draft reloads the list and shows the published version again until Publish, so the edit looks lost; measured by the #35702 dev; topic #35547 → p2 (UX rule) · size S.

  3. added
    pm:queue
    priority:p2
    and removed
    pm:retriage
    on Nov 20, 2026
  4. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Acceptance addition · 2026-11-20T19:55Z · Found by the L2 review of PR #35919 (#35702), by reading the code: the same remount also LOSES work. After a draft save the list remounts on the published view, so a second footer pick (or a second view-settings change) before Publish is built on the published view and the save writes the whole view as the draft, replacing the first change. Example: pick Sum, then Latest, then Publish: only Latest is kept.

    Added acceptance line: two successive draft changes to a shared view (two footer picks, or a pick and a view-settings change) both survive into the published version.

  5. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Claim: PM loop · 2026-11-21T06:24Z
    Area: b1-DB
    Session: session_01L6bhgW85kwjGaz7HqsmEuv (area b1-DB, session 2; its os-dev subagent runs under the same session)
    Account: os-sales
    Branch: claude/issue-35932-draft-save-no-remount
    Seat: repo:objectstack#1
    Domain: domain:ui
    File surface: ui/packages/app-shell/src/views/runtime-metadata-persistence.ts, objectViewViewCrud.tsx, possibly ObjectView.tsx and preview/usePendingDrafts.ts; new tests; a changeset (@object-ui/app-shell patch). MetadataProvider is left alone where possible.
    Container & model: S/M, mode:subagent, model: opus, effort: high
    Clause-②: no
    Metadata-protocol: none
    Premise: first read on main by the area: holds. A shared view's draft save goes through persistRuntimeMetadata, which emits the global metadata refresh on every draft save; MetadataProvider re-reads, ObjectView remounts and reads the published version. The footer calculation row's save uses the same path.
    Basis: card #35932, a p2 bug from epic #35547's #35702 work, in the derived p1/p2 bugs the maintainer gave this seat on 2026-11-20 22:31Z.
    Scope: a draft save no longer reloads the whole list: the admin keeps seeing the draft and a second change builds on it (both survive to Publish, per the acceptance added by the #35944 review); non-admins still read the published version. Reports also call persistRuntimeMetadata; their drafts must not regress. If the deeper read finds the fix needs a change to MetadataProvider's refresh contract, or reads M+, the dev stops and reports before building.
    Resume-from: none
    Fold-or-serial: serial; no fold. #35955's PR 1 does not touch objectViewViewCrud.tsx or runtime-metadata-persistence.ts (its claim 7058427316); its PR 2 (shared view Save) uses this path and is ordered after this card. overlap-check.mjs runs before the push. The PR carries Fixes #35932.

  6. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Claim amendment: PM loop · 2026-11-21T08:43Z (amends 7058585760)
    Seat call on the stop rule: the root cause sits one layer deeper than the card. A draft save sends the refresh pulse. While the view list re-reads, viewsForObjects counts only ready or error as answered, so the route's object scope reads settled: false. AppContent then falls back to the skeleton, ObjectView remounts, and the draft is lost. The seat accepts option A.
    File surface, widened:

    • ui/packages/app-shell MetadataProvider.tsx: a type that re-reads in place while it already holds an answer still counts as answered; only a whole-type invalidate or an org clear resets it.
    • objectViewViewCrud.tsx: a draft's publish or discard clears viewDraft on the next view read-back.
    • ObjectView.tsx: 2 lines.
    • Their tests, and an app-shell changeset.
      The pulse's meaning for its subscribers does not change.
      Conditions:
    1. The PR body states the side effect: a publish, an install, or a change in another tab no longer remounts the console route.
    2. Before L1, one browser reading of three cases: draft save, no skeleton; publish, no remount; invalidate('view'), skeleton as before.
    3. overlap-check.mjs against feat(console): a change on a list is a draft, with Discard and Save (#35955 PR 1) #36026 (在列表上的改动都改成临时的(排序、筛选、分组、列的显示和顺序):立即生效但不保存,出现「放弃」和「保存」;列宽、行高、标签页顺序只记在浏览器里;退掉服务端的个人列表偏好 #35955 PR 1) before the push.
      Option B (no pulse on draft save) is not taken. It needs a new ledger-only signal, and it would leave the same remount after publish or install.
  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uipm:dispatchedpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions