Skip to content

fix(app-shell): a package create answers with a toast naming the new package; pin Studio Revoke toast - #35326

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-33865-write-feedback-toasts
Nov 19, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-33865-write-feedback-toasts

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #33865

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:新建软件包成功后弹出提示「已创建软件包「名称」」(按显示名称,不用 ID);Studio 访问页「撤销」默认授予的提示原本就有,本 PR 只为它补了一条 Studio 侧的测试。
  • 为什么改:控制台约定每次写操作都要有点名对象的反馈;新建软件包后对话框直接关闭并跳转,用户看不到任何"已成功"的确认。
  • 风险与回滚:极低,只多一次 toast 调用和一条文案(en、zh);失败路径不变。回滚即还原本 PR。
  • 先看:ui/packages/app-shell/src/views/metadata-admin/PackageFormDialog.tsx 的 create 分支(新增 toast 那段),然后是两个测试文件。
  • 两分钟验证:在 Studio 首页点「新建应用」,填名称后创建,右上角应出现「Created package “名称”.」(中文界面为「已创建软件包「名称」。」)。
  • 需要你做的:无,席位落地。

What changes

  • Package create (item 2). PackageFormDialog now answers a successful create with toast.success, naming the new package by its display name (label first): engine.packages.create.created, en "Created package “NAME”." and zh "已创建软件包「NAME」。", added to the studio catalogue, which carries only en and zh. The dialog is the only create path, so Studio's New app card, the Studio package switcher's New package and the Packages page all get the toast. A refused create still shows its banner and no toast. Saving an edit is unchanged: the Packages page already shows its own "Package updated" line there.
  • Revoke on a granted suggestion (item 1): already fixed on main, no code change. SuggestedBindingsPanel act() toasts strings.revokedToast(s) on revoke, and the Studio Access mount passes engine.studio.access.suggestRevokedToast. That code was already on the QA run's commit a557fa38 (git merge-base --is-ancestor 8c9260f79c a557fa38 → exit 0; git show a557fa38:…/SuggestedBindingsPanel.tsx line 149 holds the call). A harness reading of the REAL Studio AccessPillar (Grant, then Revoke) shows the toast firing and naming the set by its label. No Studio test covered Revoke, so this PR adds that pin to the existing Studio harness file as a top-level describe.

Tests

  • StudioDesignSurface.accessSuggestionsReadOnly-33158.test.tsx: new describe for this card. Grant → Revoke: the second toast.success is the revoked sentence naming "CRM user", and the row then reads dismissed with Reconsider. CONTROL: a Revoke the server refuses (409) toasts the server's message and never the revoked sentence.
  • PackageFormDialog.test.tsx (the shared harness): new describe. A create toasts the created sentence once, naming "New App" and not the id. zh: the zh sentence. CONTROL: a refused create (409) toasts nothing and keeps its banner. CONTROL: an edit save does not fire the created toast. The file also gains module-top import '@objectstack/formula' / import '@objectstack/lint', which check:test-source-alias asks for in an edited test that reaches the CEL fields' dynamic loads.
Targeted run at the merged head ce0f6ea
pnpm --filter @object-ui/app-shell exec vitest run --root ../.. --maxWorkers=2 packages/app-shell/src/views/metadata-admin/PackageFormDialog packages/app-shell/src/views/studio-design/StudioDesignSurface.accessSuggestionsReadOnly-33158.test.tsx packages/app-shell/src/components/SuggestedBindingsPanel.test.tsx packages/app-shell/src/console/marketplace/__tests__/MarketplacePackagePage.installedSuggestions-33158.test.tsx
 Test Files  17 passed (17)
      Tests  180 passed (180)
os-verify-lock: VERDICT command-exit 0
Ablations (one-off, through scripts/ablation-replace.mjs, restored and checked against the HEAD blob)
  • Create toast: toast.success( → void Array.of( in PackageFormDialog.tsx. Mutation landed (blob fd0aefbaa840 → ebd89e3b4a6f), 2 failed | 9 passed: both toast pins red, both CONTROLs green. Restored: blob == HEAD, git diff HEAD empty. A first try (void () was a syntax error and the file failed to transform with "no tests". That run measured nothing and is void.
  • Revoke pin: action === 'revoke' ? strings.revokedToast(s) : strings.dismissedToast(s) → strings.dismissedToast(s) /* ablated */ in SuggestedBindingsPanel.tsx. Mutation landed (85a24a3bc2ff → 5bdf68afec12), 1 failed | 9 passed: the Grant → Revoke pin red, its CONTROL green. Restored. A first try with a replacement that is a substring of the anchor was refused by the tool before any test ran, so it was a no-op.
  • @object-ui/* resolves to src through the ui vitest alias table, so these ablations need no rebuild.

Acceptance notes

  • The QA run reported no Revoke toast at a557fa38, but that tree already had the toast call, and the Studio harness shows it firing. This PR does not reproduce or explain the live observation; it adds the pin that holds the behaviour.
  • Same rule (ux-conventions.write-feedback), not filed: the inspector's declare dependency edit (ObjectPicker → PackageFormDialog mode="edit") closes the dialog and shows no feedback. That reading comes from the source only and was not exercised live.

Verification

  • Type-check: pnpm --filter @object-ui/i18n run type-check && pnpm --filter @object-ui/app-shell run type-check → exit 0. tsc -p tsconfig.test.json --listFiles lists both edited test files.
  • Derived gate families (dispatch-gates.mjs --commands): 38 derived, 38 run, all exit 0. check:test-source-alias was red once and passed after the module-top imports. --ran reconciliation: "38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero)". The gates that read the edited test file were run again at the final head, all exit 0.
  • The full app-shell suite and the rest of the CI checks are left to CI. Local runs were limited to the files above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY

…he new package; pin Revoke's toast on the Studio Access strip

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
…he PackageFormDialog harness

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 19, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Final head for L1: ce0f6ea227697a348ffb3550e66284cea46b297a · 2026-11-19T05:11Z

  • CI on this head: 45 success, 13 skipped, 0 failed or pending. Mergeable state: clean.
  • Diff 174 lines (6 files): above the 50-line self-landing bar, so the L1-a thread reads it. Clause-②: no · Metadata-protocol: none.
  • Item 1 (Revoke): already fixed before the QA commit (8c9260f79c is an ancestor of a557fa38); harness reading of the Studio mount shows the revoked toast naming the set by its label. No code change; one Studio pin added (ablation red). Why the QA run saw none stays unexplained (Acceptance notes).
  • Item 2 (package create): PackageFormDialog toasts the new package by its display name via new studio key engine.packages.create.created (en, zh: the catalogue's only locales).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 改了什么:新建软件包成功后弹出成功提示,点名新包的显示名(中英文各一句);Studio 访问页「撤销」的提示早已存在,这里补一条测试钉住。
  • 为什么改:卡 Two console writes give no feedback: Revoke on a granted binding suggestion (Studio Access) and creating a package in Studio #33865,ux-conventions.write-feedback:每次写操作都要有点名对象的反馈。
  • 风险与回滚:只在创建成功分支多一次 toast.success;创建被拒、编辑保存都不弹;调用方都没有自己的创建提示,不会弹两次。回滚即 revert 本 PR。
  • 先看:PackageFormDialog.tsx 创建分支新增的 6 行。
  • 两分钟验证:跑 PackageFormDialog.test.tsx 和 StudioDesignSurface.accessSuggestionsReadOnly-33158.test.tsx。
  • 需要你做的:无,区内落地(非受管面、174 行)。L1 意见:可落。

席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head ce0f6ea227697a348ffb3550e66284cea46b297a · 2026-11-19T05:14Z

  • 形态: draft → main, 6 files, +172/−2. Fixes #33865. check-governed-merges --pr 35326: 0 of 6 paths governed, 174 lines ≤ 3000 → ordinary queue landing. Clause-②: no holds: one additive key in the studio namespace of @object-ui/i18n (en, zh, the namespace's only two catalogues), and no props or exports change. @object-ui/app-shell is private. Metadata-protocol: none.
  • Fixes vs the card: item 2 (package create gives no feedback) is fixed at the one shared dialog, PackageFormDialog, in its mode === 'create' branch after await of the create. Every create entry the changeset names reaches that dialog: Studio BuilderLanding New app, PackageSwitcher, the Packages page through CreatePackageDialog, and also ResourceListPage and ObjectPicker. Item 1 (Revoke) already toasts on main, so it gets a pin only. That pin goes through the real Studio mount: Grant, then Revoke, with a refused-Revoke CONTROL. Both items are now answered, so Fixes is right.
  • No double toast: I grepped the callers. None toasts on a dialog create. BuilderLanding's dupCreated toast belongs to the separate Duplicate flow (duplicatePackage), not to this dialog.
  • Changeset: .changeset/33865-package-create-toast.md, patch on @object-ui/app-shell and @object-ui/i18n. I read each sentence against the diff:
    • The three named entry points match the callers above.
    • "naming the new package by its display name" matches created.manifest.name ?? manifestBody.name, and the pin asserts the id is absent.
    • The en and zh sentences match the catalogue lines.
    • "A refused create shows no toast and keeps its message in the dialog" holds: the toast sits after the awaited create, and the 409 CONTROL pins it.
    • "saving an edit is unchanged" matches the PATCH CONTROL.
    • The Revoke sentence matches the new pin.
  • 接受的偏差: the test file imports @objectstack/formula and @objectstack/lint at collection time, so the dialog's dynamic imports are not paid inside a clocked case. This is test-only and keeps the new cases out of timeout.
  • Pins:
    • en toast once, with the display name and not the id.
    • zh sentence.
    • CONTROL 409: no toast, and the banner is kept.
    • CONTROL edit: PATCH, no toast.
    • Studio Grant then Revoke: the revoked sentence names the set, and the row reads dismissed with Reconsider.
    • CONTROL refused Revoke: the server message, never the revoked sentence.
  • 门禁: check-runs on head ce0f6ea2: 45 success, 13 skipped, 0 failure. The successes include Test UI and all 16 shards, Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Lint & Repo Gates, and Check Changeset.
  • 范围外去向: the card's third case, import Undo, was explicitly not filed by QA (the row change may be its feedback). Nothing is owed here.
  • 落地条款: K = 4 first-parent commits on main since merge base de8d5497 (< 15). The locale change is two catalogue lines in the studio namespace. Non-governed ⇒ ux-1 lands per landing-operations.md (pr_ready + auto-merge) after this ACCEPT. On MERGED, close-out on Two console writes give no feedback: Revoke on a granted binding suggestion (Studio Access) and creating a package in Studio #33865.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Landing · area ux-1 · 2026-11-19T05:15Z

Reading Value
check-governed-merges --pr 35326 0 of 6 paths governed, 174 lines → ordinary queue landing
K (merge base..origin/main, first-parent) 4 (< 15)

ACCEPT 7000437291 (L1-a) at head ce0f6ea227697a348ffb3550e66284cea46b297a. Ready + auto-merge now. #33865 closes on merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 19, 2026 05:15
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit a0b4ecf Nov 19, 2026
59 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-33865-write-feedback-toasts branch November 19, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two console writes give no feedback: Revoke on a granted binding suggestion (Studio Access) and creating a package in Studio

2 participants