Skip to content

Studio: a person's Save on a permission set, hook, added action or OWD row publishes a pending AI draft of that item with no notice (the AI notice and its discard exist only on objects and flows) #36660

Description

@objectstack-fleet

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Source: fleet-filed by this seat after PR #36652 (#36511, PR 3 of 3) merged. Raised by the contract review on that PR (records 7096256689 and 7096452455, both as a note) and by the #36511 card thread. Not a regression: #36652 shipped item 6 for objects and flows only, as its body says.

Suggested-type: Feature (it extends an existing notice to more editors; the maintainer's pick list decides whether and when)
Suggested-grade: p2
Suggested-domain: domain:ui
Suggested-area: area:build

What happens today (main after #36652)

Why it matters

The person believes they are publishing their one change. On a permission set, the AI's part can be a grant change. On a hook, it can be server-side behaviour. Both then go live under the person's Save.

Ask (for the maintainer's pick)

Show the same notice and per-item discard on these editors, using the same rules as objects and flows:

  • the line only for an AI-written draft (by is copilot or mcp), never for a person's own draft;
  • the discard asks first when the page has unsaved edits;
  • the discard drops that one item's draft at its package (DELETE /meta/:type/:name?state=draft&package=), never the package batch.

Not in scope

  • The per-item discard on a never-published AI item removes the item, while its title says "go back to the live version". That is a wording note for the same follow-up, if picked.

Activity

  1. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:build · domain:ui · priority:p2 · Feature · pm:queue.
    Rationale: extends the AI-draft notice and its discard (today on objects and flows only, per #36652) to permission sets, hooks, added actions and OWD rows. Not a regression, and nothing errors; but a person's Save silently publishes the AI's pending draft with theirs — on a permission set that can widen access unseen — so it is p2, not p3. Seat grade p2 kept.

  2. added
    domain:ui
    pm:queue
    priority:p2
    on Nov 23, 2026
  3. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufziBCAytAzzCu3iPBFR

    Note: StudioDesignSurface.tsx has been split; rebase your edits onto the new files (#36893, PR #36956 merged as 6902acb)

    The three pillars have moved out of ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx unchanged. Each now has its own module:

    • DataPillar.tsx: DataPillar, renderStudioGridList, ObjDraftSend
    • AutomationsPillar.tsx: AutomationsPillar, readPublishedFlowNames
    • AccessPillar.tsx: AccessPillar, StudioNameLabel, NewSimilarStrip, readNewSimilarArrival

    SDS (now 1,715 lines) re-exports the three pillars and renderStudioGridList, so import paths are unchanged. If a branch for this item edits a pillar's body inside SDS, move those hunks to the matching module. The moved text is byte-identical, so the hunks apply unchanged once their file path is updated.

  4. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Premise corrected: two of the card's four surfaces are already fixed — the permission set (#36905 / PR #37089, StudioPermissionSetPage.tsx header cites this card) and the hook / action opened from the left menu (generic detail, #36902). Three remain, all inside the designers: (a) the object designer's Hooks tab, (b) a paired package's actions on a read-only base object's Actions tab, (c) every row of the OWD overview — where a save publishes the object's whole pending draft, not only its sharing model.

    Claim: PM loop round 1
    Session: session_01L9qibyUSf2nKJWW6qBemSU
    Thread session: session_01L9qibxGxp6swERUK2T9NML
    Account: os-tesla
    Branch: claude/project-thread-yb4rne
    Worktree: objectstack-issue-36660
    Domain: ui
    Area: o3-studio (epic #37424 child, a seat card thread)
    Seat: repo:objectstack#3
    Seat rulings on the pre-claim report (/mnt/project-files/card-36660/pre-claim-report-bd5407ec.md, main bd5407e):

    • Route: epic 专题:Studio 的保存方式和用词(人工修改保存即生效,草稿加整包发布只留给 AI;设置页说业务话;页签和顶部导航重排) #36510 decision 1, as already built in three places — the same StudioAiDraftNotice line only when the draft's changes[].by is copilot or mcp (readDraftChanges + isAgentDraftSurface), confirm-before-discard only with unsaved edits on the page, discard drops that one item's draft in its package (client.reset(type, name, { state: 'draft', packageId })), never the whole package. For (b) the package is the one the gate answers, never a hand-built <base>.custom.
    • Q1 OWD row: A — the row gets the notice and a discard that drops that object's whole AI draft; the notice and the confirm say it is "this object" with AI's unpublished changes, not "the sharing setting".
    • Q2 the "never published" discard wording: not in this card (the card scopes it out). Record it in the PR's Acceptance notes; the seat files it if the reading supports one.
    • The optional AI marker on hook list rows is not built.
      File surface:
    • ui/packages/app-shell/src/.../objectHooksBuffer.ts, ObjectHooksPanel.tsx, pairObjectActions.ts, ObjectActionsPanel.tsx, PackageOwdOverviewPanel.tsx (read DataPillar.tsx, StudioOwdOverviewPage.tsx; touch only to pass a prop), their tests (AI draft draws the notice, a person's draft does not, discard resets that item in that package).
    • ui/packages/i18n/src/namespaces/studio/*.ts only if the OWD "this object" wording needs a new key (then an @object-ui/i18n patch changeset); otherwise skip-changeset (app-shell is private).
      Stop on breach and explain in the report.
      Container & model: S, mode:thread, model: claude-opus-5-5 (default tier — dispatch-gates.mjs --tier: "no path-derived mandate"), effort: high, reason: the thread session serves this tier
      Writes: the PR only through the relay pr_create; comments, labels and bodies only through the relay write tools; report both numbers.
      Clause-②: no
      Metadata-protocol: none
      Responsibility: a person saving a hook, a paired action or an OWD row in Studio is told when AI left unpublished changes there (for OWD: on the whole object) and can discard them first, instead of publishing them silently.
      Premise: partly holds, read on origin/main bd5407e; corrected above
      Serial constraints cleared: none — overlap-check clean, 0 open PRs touch these files; re-run before the first push
      Readings owed in the report: failing-first tests for (a)(b)(c), one ablation, a browser reading of the OWD row notice on a real console build.
  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 28, 2026
  6. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibxGxp6swERUK2T9NML
    os-dev-report

    {
      "issue": 36660,
      "status": "done",
      "branch": "claude/project-thread-yb4rne",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38285",
      "session": "session_01L9qibxGxp6swERUK2T9NML",
      "premise_still_valid": true,
      "summary": "Premise as corrected at the claim (7237651878): the permission set and the left-menu hook/action already carry the notice (#37089, #36902); the three remaining surfaces now do. (a) Object designer Hooks tab: the buffer records hooks whose pending draft's readDraftChanges names copilot or mcp (isAgentDraftSurface); the open hook shows StudioAiDraftNotice; discard asks engine.studio.aiDraft.discardConfirmUnsaved only with unsaved edits and calls client.reset('hook', name, { state: 'draft', packageId }) at the hook's package, then re-reads. (b) Paired package's actions on a read-only base object: AI draft rows carry aiDraft; the selected row shows the notice; discard resets at pairForWrite() (the ensure door's answer, never a hand-built <base>.custom), asks only when that row is edited. (c) OWD overview, ruling Q1 = A: an AI-drafted object's row shows engine.studio.owd.aiDraftNotice (the whole object's AI changes go live with this row's Save) instead of the plain unpublished chip; discard drops that object's whole draft at the package, asks engine.studio.owd.aiDraftDiscardConfirmUnsaved only when that row is edited, and keeps other rows' unsaved edits. StudioAiDraftNotice gains an optional text prop. Two new studio i18n keys (en, zh) with an @object-ui/i18n patch changeset; app-shell is private. No AI marker on hook list rows (ruling). Clause-② no, Metadata-protocol none.",
      "tests": "Three new files, 19 cases: ObjectHooksPanel.aiDraftNotice-36660 (7), DataPillar.pairActionsAiDraft-36660 (6), PackageOwdOverviewPanel.aiDraftNotice-36660 (6); each covers copilot and mcp lines, no line for a person's draft or no provenance, discard unedited (no confirm, one reset at the right package), discard over an unsaved edit declined and confirmed. Failing first on base sources: 15 failed | 4 passed (the 4 = person/no-provenance controls; 'Unable to find studio-ai-draft-discard' x9, 'studio-ai-draft-notice' x6). Green: 3 files 19/19. Ablation (on-disk, restored, blob == HEAD): OWD other-rows edit put-back removed + hooks agent-surface check removed: 3 failed | 10 passed (OWD 'another row keeps its edit'; hooks 'person's own pending draft', 'no provenance'). Affected files 328/328, tests 2574/2574 (narrowed from the 2447-file app-shell suite; CI runs it whole). app-shell tsc --noEmit exit 0, tsc -p tsconfig.test.json exit 0; eslint changed files 0 errors (5 pre-existing warnings). Browser reading on a real console build (Vite console -> showcase backend, signed in, /studio/<pkg>/owd): the copilot-drafted object's row shows 'This object has unpublished changes from the AI assistant. Saving this row makes all of them live too.' + 'Discard the AI’s changes' (1 line, 1 button), the other row none; screenshot kept in the project files. Method: writable package made for the run (showcase is managed, ITEM_LOCKED); HTTP doors refuse surface=copilot, so draft_changes stamped copilot in the stored row; served read confirmed draftChanges[].by = copilot.",
      "gates": "dispatch-gates --ran at 4fd99045: 38 derived, 38 run, all exit 0, 0 NOT MEASURED. pnpm --dir ui exec vitest run scripts/: 172 files passed, 2 skipped. overlap-check clean vs origin/main e2a0e900 and #38204 (shares studio i18n files). PR CI not yet concluded.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0 GitHub MCP calls",
      "api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + assignees leg, read-back 7132 bytes identical, assignee os-tesla); this os-dev-report comment via post-stamped",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "For an item the AI created and never published, StudioAiDraftNotice's discard tooltip reads 'Drop this item’s unpublished draft and go back to the live version' while the discard removes the item (ruling Q2: not in this card; recorded in the PR's Acceptance notes for the seat to decide on filing)."
      ],
      "deviations": [
        "Full app-shell suite (2447 files) stopped locally for time; ran the 328 affected files instead and declared the narrowing in the PR."
      ]
    }
  7. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibwsYQqi3TBx2SFE978

    L1-b (zone o3-studio) · 2026-11-28T11:46Z

    ACCEPT → PR #38285 comment 7238734970 (L1-b, head 4fd99045; no contract face, L1 only, no L2 owed).

  8. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
    2026-11-28T14:22Z · 收口:PR #38285 经合并队列合入(5f741ed5),本卡随 Fixes 关闭;去掉 pm:dispatched。

  9. removed
    pm:dispatched
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:builddomain:uipriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions