Skip to content

ui: the admin recycle-bin page (list, restore, empty) and the 已删除 · 撤销 toast (#3146 slice 4) #30239

Closed

Description

@objectstack-fleet

triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

Filing gate: ③ a split the parent needs, asked by domain:server#4 (Request: triage · #3146). ⛔ Not a claim.

Blocked-by: #30237
Part of #3146 · Ruling-ref: 6629858351 (the recycle-bin shape, maintainer 「同意,企业版功能在 cloud 中立卡后续开发」)

Wanted

The Console half of the ruled v1:

  • an admin recycle-bin page: list, restore, empty;
  • a 「已删除 · 撤销」 toast after a delete, which restores through the engine slice's door.

Restore refusals read in the Console's language. Member-facing 「我删除的」 is later, as ruled.

Order: after #30237 (engine).


Generated by Claude Code

Activity

  1. added
    enhancement
    priority:p2
    pm:blocked
    domain:ui
    on Nov 5, 2026
  2. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: unblocked · pm:blocked → pm:queue · 2026-11-09T02:16Z

    ⛔ Not a claim.


    Generated by Claude Code

  3. added
    pm:queue
    and removed
    pm:blocked
    on Nov 9, 2026
  4. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · zhuangjianguo · session_01QsR2jVEjiYrK7onirxUGyo

    Claim: PM loop round 1 · 2026-11-09T03:11Z
    Session: session_01QsR2jR7jBcj3r4Rii4HA82 (card thread, dev) · seat session_01QsR2jVEjiYrK7onirxUGyo
    Account: zhuangjianguo
    Branch: claude/project-thread-vd60y0
    Worktree: objectstack-issue-30239
    Domain: domain:ui
    Seat: domain:ui#3
    File surface: ui/packages/core/src/actions/recordDelete.ts and its hosts, a new Setup page in ui/packages/app-shell, ui/packages/i18n/src/locales/*.ts (and the studio namespace if Setup copy lives there), their tests, root .changeset/; ⛔ no server, packages/spec/**, packages/client/** or cloud change
    Container & model: M–L, mode:thread, model: default tier (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: yes (widening) expected, from new locale-pack keys; step 1 confirms, and the seat owes a declaration review
    Metadata-protocol: none
    Responsibility: the Console has no recycle-bin face in objectstack (no page, no undo; recordDelete.ts still says "the platform has no recycle bin") | the platform path is ADR-0148 and its REST doors (PR #31595, packages/rest/src/recycle-bin-routes.ts) with the SDK's recycleBin.* | admins who need to restore or empty deleted records, and anyone who deletes a business record by mistake
    Thread-read: 6730654389
    Premise: holds. On origin/main 9e1f1f90d, the doors and client.recycleBin.list/restore/purge/empty exist and a by-id delete answers recycleBinEntryId. No ui/ page reads them, and recordDelete.ts ~L48 tells the user a delete cannot be undone.
    Serial constraints cleared: the seat's other cards in build are #30514 (the i18n provider and LocaleSwitcher) and #31759 (plugin-form auto-layout). Both are disjoint from this surface, except that the locale packs are shared with any key-adding sibling: the seat lands them serially.

    Scope: the card's "Wanted".

    • Step 1, a report before any code:
      • where the page lives, and how "list all" reads per-object doors;
      • every restore refusal and its sentence;
      • which delete paths get 撤销;
      • the declarations;
      • a slice plan if the work exceeds about 700 lines.
    • Then build per the seat's amendment. The PR says Fixes #30239. Brief: /mnt/project-files/issue-30239/brief.md.
  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 9, 2026
  6. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · zhuangjianguo · session_01QsR2jR7jBcj3r4Rii4HA82
    os-dev-report

    Step 1: #30239 admin recycle-bin page and 「已删除 · 撤销」 toast · 2026-11-09T03:21Z

    Placeholders below are written {name}; in the packs they are i18next {{name}}.

    ⛔ Not a claim (the claim is 6731322665). No code written. Tree: objectstack-ai/objectstack at c2bb879f (origin/main), branch claude/project-thread-vd60y0.

    Verdict in one line: Both halves can be built, and every REST door they need exists (PR #31595). Two pieces sit outside the claim's surface, and I need the seat's amendment before I touch them. (A) The console's DataSource.delete answers Promise<boolean>, so recycleBinEntryId is dropped in the adapter before any host sees it. (B) A Setup page can only be reached through a server-side nav contribution, because the shell declares no entry and no route. Recommended: two PRs. PR 1 is the toast and confirm copy (Part of #30239), PR 2 is the page (Fixes #30239).

    Card vs origin/main (main wins)

    • "Wanted", quoted: 「an admin recycle-bin page: list, restore, empty; a 「已删除 · 撤销」 toast after a delete, which restores through the engine slice's door. Restore refusals read in the Console's language. Member-facing 「我删除的」 is later, as ruled.」
    • There are four refusal codes, not three. RECYCLE_BIN_RESTORE_REFUSAL_CODES (packages/spec/src/data/recycle-bin.zod.ts L258) adds RESTORE_PARENT_IN_RECYCLE_BIN (ADR-0148 D2, ruling 6710220841). All four answer 409.
    • manageRecycleBin is an object permission key, not a system capability (permission.zod.ts L691). Only modifyAllRecords implies it, and organization_admin's '*' row carries that. member_default grants neither bin key, so a plain member's delete writes an entry that the member cannot restore.
    • The console's bulk delete is N by-id deletes (recordDelete.ts L230), so each row of a batch writes its own entry. A batch never gets 撤销, but the batch body "This cannot be undone." is false for a business object too: an admin can restore every row.

    1. The page

    Where it lives. Setup → Configuration → Recycle bin, a type: 'component' entry naming a new ref data:recycle-bin, registered in app-shell builtinComponents.tsx the way security:position-holders is. The URL is component/data/recycle-bin, with the selected object as a page-scoped param (CatalogAssignmentPage's pattern). ⛔ The entry itself is (B): "the shell declares no entry and no route" (builtinComponents.tsx L162, L178) and "⛔ No bespoke <Route>" (peopleAssignments.navContribution.test.tsx). The smallest home for it is one item in packages/platform-objects/src/apps/setup-nav.contributions.ts (group_configuration, which registers sys_recycle_bin), plus its label row in the ten packages/platform-objects/src/apps/translations/*.ts. That is metadata with no server code, but it is packages/**, so it needs the seat's call (item 4). It gets no requiredPermissions, since the gate is per object (below).

    Who sees it. Setup already needs setup.access. The page computes its object list from the effective map the console already holds (usePermissions().effectiveObjects, /auth/me/permissions). It keeps an object only when objectPermissionGrants(perm, 'manageRecycleBin') is true, read through the spec's own fold, and drops platform-prefixed names (hasPlatformObjectPrefix). A caller who manages no object's bin sees a refusal state, "You don't manage the recycle bin of any object", and no bin read is sent. A 403 from the door, for example after a grant changed, shows the PERMISSION_DENIED sentence below.

    How "list all" works on per-object doors. I recommend an object picker, not a fan-out. The left side lists the business objects the caller manages, from metadata already loaded, so that list costs 0 reads. Picking one sends one GET {data}/:object/recycle-bin?limit=50, and "Load more" sends offset=+50 while hasMore holds. That is exactly the door's own paging (limit 1–200, default 50). A fan-out (one read per managed object, merged newest-first) would cost N reads on every open, and merged paging would need N offsets. I ruled it out under the startup axis: nothing pulls for a cross-object view in v1, and empty is per object anyway.

    • Gap (reported, not fixed): the engine lists entries of an object whose package was uninstalled (list.ts L170), but the page enumerates registered objects, so those entries are unreachable from the page until the TTL reap removes them. Closing that needs a cross-object listing door, which is an engine card. ⛔ I am not doing it here. Item for the seat: file it, or leave it.

    What each row shows. Only what the door serves. The door masks each snapshot row to the fields the caller may query (recycle-bin-routes.ts L39–48) and never serves clearedReferences.

    • Name: getRecordDisplayName(objectDef, rows[0].values), the ADR-0079 resolver over the served master row. A masked name field is absent, so the row falls to the resolver's Record #id floor.
    • Related records: recordCount − 1, shown only when it is above 0, as an i18next _one/_other count family (the count-families-11445 rule).
    • Deleted by: deletedBy is a sys_user id. It is resolved with one batched sys_user read per page (id in [...], name only). If that read is refused, the id is shown.
    • Deleted at, and Kept until (purgeAfter), as locale dates.
    • Actions: Restore per row. Empty recycle bin per object, behind a destructive confirm that names the object and says it is permanent; its answer toasts removed as a count family.
    • Not shown: the detail rows' values, retentionDays (purgeAfter already says it), and per-entry purge. The door exists, but purge is not in "Wanted", so under the startup axis it stays out. Item for the seat if wanted.

    2. Restore refusals: every code the restore door answers

    One shared mapper in @object-ui/core, with t injected, is read by both the page and the toast. Each code has its own pack key. Labels come from the object definitions the console holds, falling back to the machine name.

    Answer details the door forwards en zh-Hans
    409 RESTORE_UNIQUE_VALUE_TAKEN object, recordId, field Can't restore: another record now has the same {field} value. Change that record first, then restore. 无法恢复:另一条记录已在使用相同的「{field}」值。请先修改那条记录,再恢复。
    409 RESTORE_PARENT_PURGED parentObject, parentId Can't restore: the {parent} record it belonged to has been permanently deleted. 无法恢复:它所属的{parent}记录已被永久删除。
    409 RESTORE_PACKAGE_UNINSTALLED object Can't restore: the package that provided {object} has been uninstalled. 无法恢复:提供「{object}」的软件包已被卸载。
    409 RESTORE_PARENT_IN_RECYCLE_BIN parentObject, parentId, parentEntryId Can't restore yet: the {parent} record it belongs to is also in the recycle bin. Restore that record first. 暂时无法恢复:它所属的{parent}记录也在回收站中。请先恢复那条记录。
    404 RECORD_NOT_FOUND object, entryId This record is no longer in the recycle bin. It may have been purged. 这条记录已不在回收站中,可能已被清除。
    403 PERMISSION_DENIED none You don't have permission to restore this record. 你没有恢复这条记录的权限。
    501 NOT_IMPLEMENTED none The recycle bin is not available on this deployment. 此部署未启用回收站。
    any other none the generic "Couldn't restore {label}" plus the server message (today's deleteFailed shape) 同左

    Pins: it.each over the seven codes asserts the exact pack sentence for en and zh-Hans, and asserts it is not the generic key's text. The CONTROL is an unknown code, which renders the generic key plus the server message. A pack test checks that all ten packs carry all seven keys with the same placeholders. A "Restore {parent} first" button on the fourth code is left out (startup axis). parentEntryId would make it cheap, so it is an item for the seat if wanted.

    3. The toast

    Which delete paths get 撤销. A path gets it only when both of these hold:

    1. The delete's answer carries recycleBinEntryId. A platform object, a predicate delete or a server with no bin answers without it.
    2. The caller holds allowRestoreOwnDeleted on the object in effectiveObjects (objectPermissionGrants, which manageRecycleBin and modifyAllRecords imply).

    Without the second check, a plain member would be offered an Undo the door refuses with 403. That would declare a capability the runtime does not honour, which goes against the AI-safety axis. The host decides whether to pass restore; core never reads permissions.

    Path Today After
    List row Delete: useObjectActions → recordDelete.run, one record deletedNamed / deleteSuccess toast the same text, plus an actions.undo (撤销, existing key) action when 1 and 2 hold
    Record page Delete: RecordDetailView.tsx L4703, its own dataSource.delete the same toast, then navigates to the list the same, plus 撤销. The undo restores and then navigates back to the record
    plugin-view ObjectView → recordDelete.run, one record the same 撤销 when its data source implements the new optional members (below) and its host passes restore
    Any batch (records.length > 1) summary toast unchanged, no 撤销
    plugin-detail DetailView (detail.deleteConfirmation) own path, not a recordDelete host unchanged. Not in the claim's hosts, noted as an out-of-scope finding

    The undo is a restore, never a re-create. The action calls client.recycleBin.restore(object, entryId), which is POST …/recycle-bin/:entryId/restore. Success refreshes the list and toasts "{label} {name} restored" (restoredNamed, with restoreSuccess for a record that has no nameable value). A refusal toasts the item-2 sentence. A test asserts that dataSource.create is never called and that restore is called once with (object, entryId). The toaster's default duration is kept, with no new knob.

    What the confirm sentence becomes. Before the delete, the console cannot know whether the server composes a bin, so the confirm must not promise recovery. Recommended: for a business object (!hasPlatformObjectPrefix), the one-record body is the question alone (new key objectActions.deleteConfirmQuestion: "Are you sure you want to delete this record?" / 「确定要删除这条记录吗?」). The batch body is console.objectView.bulkDeleteQuestion ("Delete {count} selected records?", a count family). Neither says it is permanent, neither says it is recoverable, and the toast tells the truth afterwards. A platform object keeps today's keys, which end in "This cannot be undone." The #27823 pin (record-delete-permanent-27823.test.ts) is narrowed to the platform keys, and a new pin checks that the business keys do not carry the sentence. CONTROL: a delete without recycleBinEntryId keeps today's toast byte-for-byte, and a platform object keeps today's confirm copy byte-for-byte.

    • Alternative, not recommended: "It moves to the recycle bin…". That is false on a composition with no sys_recycle_bin, which the protocol names (protocol.zod.ts L3220–3223).

    4. Surfaces and declarations

    (A), outside the surface and needing the seat's call: core cannot see the entry id today.

    • ui/packages/types/src/data.ts L569: DataSource.delete(resource, id, opts?). The opts gain onRecycleBinEntry?: (entryId: string) => void, the engine's own callback shape (RecycleBinDeleteObservability, list.ts L47). DataSource also gains an optional restoreRecycleBinEntry?(resource, entryId): Promise<unknown>, so both hosts, plugin-view included, reach the restore door through the data source they already hold.
    • ui/packages/data-objectstack/src/index.ts L4736: delete calls opts.onRecycleBinEntry(result.recycleBinEntryId) when present, and the new restoreRecycleBinEntry wraps client.recycleBin.restore. Both are additive, and the return type stays boolean.
    • The alternative of changing delete to return a receipt is a breaking change to a published interface. Ruled out.

    (B), outside the surface: the Setup nav item and its ten translation rows in packages/platform-objects (item 1).

    Locale keys: about 12 keys for PR 1 (2 confirm, 2 restored, 1 restore-failed, 7 refusals) and about 18 for PR 2 (the page), each in all ten packs (all-locales-key-parity). Clause-②: yes (widening), as the claim expects, so the seat owes a declaration review. The same widening also covers the @object-ui/types optional members (A).

    @object-ui/core's delete action surface: all of it additive.

    Metadata-protocol: none holds. A nav contribution item is app metadata and no protocol shape changes.

    5. Slices (estimate: about 1,750 changed lines over 700)

    • PR 1, toast and confirm (Part of #30239), about 800 lines: core (recordDelete.ts, refusal mapper), (A) types and adapter, the three hosts, about 12 keys × 10 packs, tests (restore round trip, the seven refusal sentences, CONTROL, no-grant, ablation of the undo attach line with ablation-replace.mjs after a commit), and a changeset.
    • PR 2, the page (Fixes #30239), about 950 lines: page, registration, (B) nav item, about 18 keys × 10 packs, tests (list, paging, restore, empty, the member without manageRecycleBin gets the refusal state and sends no read), the live dev:crm run (delete → 撤销 → back, plus page restore, with shots), and a changeset. It merges after PR 1, since it reuses the refusal mapper.
    • Packs are shared with the seat's i18n phase 4 (locale menu): the Console language menu offers the PLATFORM_LOCALES languages, intersected with an app’s supportedLocales #30514, so they land serially.

    Asks for the seat (amendment)

    1. Amend the surface for (A) (ui/packages/types/src/data.ts, ui/packages/data-objectstack/src/index.ts) and (B) (packages/platform-objects/src/apps/setup-nav.contributions.ts plus translations/*.ts), or name another home for either.
    2. Confirm the two-PR split.
    3. Confirm the undo gate on allowRestoreOwnDeleted, the question-only confirm for business objects, and that per-entry purge and the "restore parent first" button stay out.
    4. The uninstalled-package listing gap: file it as an engine card, or leave it.
    {
      "issue": 30239,
      "status": "step1",
      "branch": "claude/project-thread-vd60y0",
      "session": "session_01QsR2jR7jBcj3r4Rii4HA82",
      "head": "c2bb879f",
      "premise_still_valid": true,
      "doors_present": ["GET {data}/:object/recycle-bin", "DELETE {data}/:object/recycle-bin", "POST {data}/:object/recycle-bin/:entryId/restore", "DELETE {data}/:object/recycle-bin/:entryId"],
      "doors_missing": ["cross-object listing (only for entries of uninstalled packages; not needed for v1)"],
      "outside_surface_needed": ["ui/packages/types/src/data.ts", "ui/packages/data-objectstack/src/index.ts", "packages/platform-objects/src/apps/setup-nav.contributions.ts", "packages/platform-objects/src/apps/translations/*.ts"],
      "declarations": "Clause-②: yes (widening) · Metadata-protocol: none (as the claim)",
      "line_budget": "about 1,750 changed lines est. → two PRs (about 800 + 950)",
      "files_changed": [],
      "gates": "n/a at step 1 (no diff)",
      "mcp_calls": 0,
      "api_writes": "1 — this comment via post-stamped",
      "deviations": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "plugin-detail DetailView deletes on its own path with detail.deleteConfirmation ('This cannot be undone.'); it is not a recordDelete host and stays unchanged",
        "entries of an uninstalled package's object are listed by the engine but unreachable from a page that enumerates registered objects"
      ]
    }
  7. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · zhuangjianguo · session_01QsR2jVEjiYrK7onirxUGyo

    Claim amendment · step 1 accepted · 2026-11-09T03:22Z

    This amends claim 6731322665 on #30239, after the dev's step-1 report 6731441670 (premise_still_valid: true; every door is present, from PR #31595).

    • Two PRs.
      • PR 1, toast and confirm (Part-of #30239), about 800 lines.
      • PR 2, the page (Fixes #30239), about 950 lines. It merges after PR 1 and reuses its refusal mapper.
      • Each PR's declaration review is owed on its final head.
    • Surface widened (A), PR 1. These are additive only. delete still returns boolean, and a receipt return type stays ruled out.
      • ui/packages/types/src/data.ts: DataSource.delete options gain onRecycleBinEntry?, and DataSource gains an optional restoreRecycleBinEntry?.
      • ui/packages/data-objectstack/src/index.ts implements both.
    • Surface widened (B), PR 2. One Setup → Configuration nav item, in packages/platform-objects/src/apps/setup-nav.contributions.ts, plus its rows in packages/platform-objects/src/apps/translations/*.ts. It is app metadata only: no server code, no spec change.
    • Surface widened, PR 1, copy only: the plugin-detail DetailView delete confirm (detail.deleteConfirmation). Its "This cannot be undone." is the same false sentence for a business object. It gets the same question-only body, and no undo, since it is not a recordDelete host. Same family, so it is fixed in this card rather than filed.
    • Confirmed:
      • The undo gate. The answer must carry recycleBinEntryId, and the caller must hold allowRestoreOwnDeleted on the object (through objectPermissionGrants). The host decides; core reads no permission.
      • The confirm copy. The one-record confirm for a business object asks the question alone, and the batch confirm likewise. It promises neither permanence nor recovery. Platform objects keep today's copy.
      • Batch. A batch keeps today's toast, with no 撤销.
      • The page. It is an object picker: 0 reads for the list, 1 read per picked object, and door paging of 50 with "Load more". It is not a fan-out.
      • Refusals. There are seven sentences: four 409 codes, plus 404, 403 and 501. Each has its own pack key, an it.each pin, and a CONTROL for an unknown code.
      • Out of v1: per-entry purge and a "restore parent first" button. They are not in "Wanted".
    • Dropped, not filed: the entries of an uninstalled package's object, which the page cannot reach. Their restore is refused anyway (RESTORE_PACKAGE_UNINSTALLED, ADR-0148 D2), and the TTL reap removes them, so reaching them could only show or purge what the reap already handles. A measured need reopens it as an engine card.
    • Declarations: Clause-②: yes (widening), covering the new locale keys and the @object-ui/types / @object-ui/core optional members. Metadata-protocol: none.
    • Serial: the locale packs are shared with i18n phase 4 (locale menu): the Console language menu offers the PLATFORM_LOCALES languages, intersected with an app’s supportedLocales #30514 and Auto-layout form draws a currency field with a stored expression as an editable input, and save silently replaces the typed value #31759, so the seat lands key-adding PRs one at a time. If an earlier one lands first, merge main before the next gate loop.
  8. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · zhuangjianguo · session_01QsR2jR7jBcj3r4Rii4HA82
    os-dev-report

    {
      "issue": 30239,
      "status": "done (PR 1 of 2)",
      "branch": "claude/project-thread-vd60y0",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/31795",
      "session": "session_01QsR2jR7jBcj3r4Rii4HA82",
      "head": "e6d5861b",
      "premise_still_valid": true,
      "summary": "PR 1 (Part of #30239): the Undo on a business-record delete toast and the question-only confirm copy. (A) DataSource.delete opts gain onRecycleBinEntry and DataSource gains an optional restoreRecycleBinEntry (delete still returns boolean); data-objectstack implements both (restore = client.recycleBin.restore, no mutation event, refusals keep code and details). core: recycleBinRestoreRefusalText maps the seven door codes to recycleBin.refusal.* keys; recordDelete.successToast attaches actions.undo only with an entry id AND a host-built restore; undo restores (never create), refreshes, toasts restoredNamed/restoreSuccess, or restoreFailed with the refusal sentence. Hosts (app-shell list and record page, plugin-view list) build restore only when objectPermissionGrants(effectiveObjects row, allowRestoreOwnDeleted) is true. Business-object confirms (one, batch, plugin-detail DetailView) are question-only; platform objects keep today's copy. Batch toast unchanged.",
      "declarations": "Clause-②: yes (widening) · Metadata-protocol: none (copied from the amendment)",
      "files_changed": [
        ".changeset/30239-recycle-bin-undo-toast.md",
        "ui/packages/app-shell/src/hooks/__tests__/useObjectActions.deleteCascade-28472.test.tsx",
        "ui/packages/app-shell/src/hooks/__tests__/useObjectActions.deleteDialog-11695.test.tsx",
        "ui/packages/app-shell/src/hooks/__tests__/useObjectActions.test.tsx",
        "ui/packages/app-shell/src/hooks/useObjectActions.ts",
        "ui/packages/app-shell/src/utils/__tests__/recycleBinRestore-30239.test.ts",
        "ui/packages/app-shell/src/utils/recycleBinRestore.ts",
        "ui/packages/app-shell/src/views/RecordDetailView.deleteCascade-28472.test.tsx",
        "ui/packages/app-shell/src/views/RecordDetailView.deleteConfirmDialog-11001.test.tsx",
        "ui/packages/app-shell/src/views/RecordDetailView.tsx",
        "ui/packages/core/src/actions/__tests__/recordDelete.cascade-28472.test.ts",
        "ui/packages/core/src/actions/__tests__/recordDelete.test.ts",
        "ui/packages/core/src/actions/__tests__/recycleBinRestore.test.ts",
        "ui/packages/core/src/actions/index.ts",
        "ui/packages/core/src/actions/recordDelete.ts",
        "ui/packages/core/src/actions/recycleBinRestore.ts",
        "ui/packages/data-objectstack/src/index.ts",
        "ui/packages/data-objectstack/src/recycleBinEntry-30239.test.ts",
        "ui/packages/i18n/src/__tests__/record-delete-permanent-27823.test.ts",
        "ui/packages/i18n/src/__tests__/recycle-bin-delete-copy-30239.test.ts",
        "ui/packages/i18n/src/locales/ar.ts",
        "ui/packages/i18n/src/locales/de.ts",
        "ui/packages/i18n/src/locales/en.ts",
        "ui/packages/i18n/src/locales/es.ts",
        "ui/packages/i18n/src/locales/fr.ts",
        "ui/packages/i18n/src/locales/ja.ts",
        "ui/packages/i18n/src/locales/ko.ts",
        "ui/packages/i18n/src/locales/pt-BR.ts",
        "ui/packages/i18n/src/locales/ru.ts",
        "ui/packages/i18n/src/locales/zh-Hans.ts",
        "ui/packages/i18n/src/locales/zh-Hant.ts",
        "ui/packages/plugin-detail/src/DetailView.tsx",
        "ui/packages/plugin-detail/src/useDetailTranslation.ts",
        "ui/packages/plugin-view/src/ObjectView.tsx",
        "ui/packages/plugin-view/src/__tests__/ObjectView.gridDelete-10383.test.tsx",
        "ui/packages/types/src/data.ts"
      ],
      "line_budget": "1432 changed lines (+1369 / -63) against the amendment's ~800: implementation ~420, tests ~690, locale packs ~235; overrun accepted by the seat (tests are most of it). Under the 3000 human-merge threshold.",
      "tests": "ui vitest from ui/ under the verify lock: core+i18n 8 files 155 passed; app-shell/plugin-view/plugin-detail delete files 8 files 78 passed (incl. the 8 new en/zh undo cases in useObjectActions.deleteDialog-11695); recycleBinRestore-30239 + recycleBinEntry-30239 + onMutation + bulkDelete 52 passed. turbo type-check on the 7 touched packages: 75/75. eslint on touched sources and new tests: 0 errors. Ablation via scripts/ablation-replace.mjs on recordDelete.ts (anchor 'if (!entryId || !restore) {' -> 'if (true) {', x1 -> x0): Tests 7 failed | 29 passed (36), the 7 being every undo round-trip/refusal pin in core and app-shell en/zh; no-grant and no-entry CONTROLs stay green; restored blob == HEAD 1283125320a4, git diff HEAD empty.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack: 40 derived, all exit 0 at e6d5861b (check:type-check-debt under the verify lock 246 s, check:query-options-erasure alone 248 s). --ran: 40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN. --tier: no path-derived mandate. check-governed-merges --branch: 0 of 36 paths governed. Body gates on the PR body (check-changeset-no-major, check-adr-0087-registration, check-closing-keyword-parity, check-partof-closing-keyword): all exit 0. Examples census: no hit that reads the changed copy. PR check-runs: not read at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — fleet-write relay pr_create (PR #31795) and this os-dev-report via post-stamped; git push is not a REST write",
      "deviations": [
        "Five existing pins outside the named files moved to the question-only copy (useObjectActions.test, useObjectActions.deleteCascade-28472, RecordDetailView.deleteCascade-28472, RecordDetailView.deleteConfirmDialog-11001, ObjectView.gridDelete-10383); asked before pr_create and approved by the seat; each listed in the PR body with old and new assertion. The platform side of #27823 stays pinned unedited in record-delete-permanent-27823.",
        "Line budget ~1432 against ~800 (see line_budget), accepted by the seat.",
        "The live dev:crm run (delete, Undo, back, with shots) moves to PR 2 with the page, as the step-1 plan placed it."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · plugin-chatbot comments (ChatbotEnhanced.tsx, mapMessages.ts) still say 'no recycle bin until objectstack#3146'; they concern chat-driven removals, not this surface, and were left as they are."
      ]
    }
  9. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · zhuangjianguo · session_01QsR2jVEjiYrK7onirxUGyo

    ACCEPT → PR #31795 comment 6732574862 · 2026-11-09T04:56Z · head 006599d5 (PR 1 of 2, Part of #30239).

    What PR 1 changes:

    • A one-record business delete toasts "已删除 · 撤销". The undo is offered only with allowRestoreOwnDeleted, and it restores the recycle-bin entry.
    • Each refused restore reads as its own sentence.
    • The business confirm asks only the question, while platform objects keep "cannot be undone".

    Clause-②: yes (widening); declaration review PASS (6732144296 + delta 6732342801). 1444 lines, not governed. Landing through the merge queue. PR 2 (the admin page, Fixes #30239) starts after this merges.

  10. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · zhuangjianguo · session_01QsR2jVEjiYrK7onirxUGyo

    Landed · PR 1 of 2 · 2026-11-09T05:18Z

    Reading Value
    PR #31795 MERGED 2026-11-09T05:16:26Z, merge commit 56cac5eb3555726f6df4450aba4502fd46d73239 on main (Part of #30239)
    #30239 stays open, pm:dispatched; PR 2 (the admin recycle-bin page, Fixes #30239) starts now on the same branch from main

    Delivered in PR 1:

    • A one-record business delete toasts with an Undo. It is offered only with allowRestoreOwnDeleted, and it restores the recycle-bin entry.
    • Each refused restore reads as its own sentence.
    • The business delete confirm asks only the question, and platform objects keep "cannot be undone".
  11. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · zhuangjianguo · session_01QsR2jR7jBcj3r4Rii4HA82
    os-dev-report

    {
      "issue": 30239,
      "status": "done (PR 2 of 2)",
      "branch": "claude/project-thread-vd60y0",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/31835",
      "session": "session_01QsR2jR7jBcj3r4Rii4HA82",
      "head": "64c1008c",
      "premise_still_valid": true,
      "summary": "PR 2 (Fixes #30239): Setup → Configuration → Recycle Bin. app-shell registers data:recycle-bin (RecycleBinPage): the object catalog narrowed by managesRecycleBin (effective map lowercase/as-given/'*', objectPermissionGrants manageRecycleBin, platform prefixes excluded), so the list sends no bin read; a caller who manages none sees a no-object state. One object: recycleBin.list at limit 50, Load more by offset while hasMore; rows show getRecordDisplayName over the masked snapshot, the related count family, deleted-by via one batched sys_user read, deleted-at and purgeAfter. Restore is recordDelete.undo from #31795 on the labelled refusal path (recycleBinRefusalLabelsOf, review nit N2); Empty asks with a permanence line, calls recycleBin.empty and toasts the emptied count family. CatalogAssignmentPage gains optional select and renderSection(name, entry). platform-objects contributes nav_recycle_bin in group_configuration with labels in all 11 translation bundles and digests in the 10 source-hash files. i18n adds recycleBin.page.* to every pack. The changeset names RecordDeleteToastAction (review nit N1).",
      "declarations": "Clause-②: yes (widening) · Metadata-protocol: none (copied from the amendment)",
      "files_changed": [
        ".changeset/30239-recycle-bin-setup-page.md",
        "packages/platform-objects/src/apps/setup-nav.contributions.ts",
        "packages/platform-objects/src/apps/translations/ar.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/ar.ts",
        "packages/platform-objects/src/apps/translations/de.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/de.ts",
        "packages/platform-objects/src/apps/translations/en.ts",
        "packages/platform-objects/src/apps/translations/es-ES.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/es-ES.ts",
        "packages/platform-objects/src/apps/translations/fr.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/fr.ts",
        "packages/platform-objects/src/apps/translations/ja-JP.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/ja-JP.ts",
        "packages/platform-objects/src/apps/translations/ko.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/ko.ts",
        "packages/platform-objects/src/apps/translations/pt-BR.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/pt-BR.ts",
        "packages/platform-objects/src/apps/translations/ru.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/ru.ts",
        "packages/platform-objects/src/apps/translations/zh-CN.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/zh-CN.ts",
        "packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/zh-Hant.ts",
        "ui/packages/app-shell/src/services/builtinComponents.tsx",
        "ui/packages/app-shell/src/views/setup/CatalogAssignmentPage.tsx",
        "ui/packages/app-shell/src/views/setup/RecycleBinPage.navContribution.test.tsx",
        "ui/packages/app-shell/src/views/setup/RecycleBinPage.test.tsx",
        "ui/packages/app-shell/src/views/setup/RecycleBinPage.tsx",
        "ui/packages/app-shell/src/views/setup/recycleBin.ts",
        "ui/packages/i18n/src/locales/ar.ts",
        "ui/packages/i18n/src/locales/de.ts",
        "ui/packages/i18n/src/locales/en.ts",
        "ui/packages/i18n/src/locales/es.ts",
        "ui/packages/i18n/src/locales/fr.ts",
        "ui/packages/i18n/src/locales/ja.ts",
        "ui/packages/i18n/src/locales/ko.ts",
        "ui/packages/i18n/src/locales/pt-BR.ts",
        "ui/packages/i18n/src/locales/ru.ts",
        "ui/packages/i18n/src/locales/zh-Hans.ts",
        "ui/packages/i18n/src/locales/zh-Hant.ts"
      ],
      "line_budget": "1265 changed lines (+1261 / -4): implementation ~517, tests ~391, locale packs ~326, platform-objects nav and translations 27; accepted by the seat. Under the 3000 human-merge threshold.",
      "tests": "ui vitest from ui/ under the verify lock: app-shell views/setup 13 files 159 passed (20 new page cases, 3 nav cases); i18n plus every builtinComponents importer 120 files 1946 passed | 13 skipped (de-quote-pairing-3876, all-locales-key-parity, count-families-11445 by hand; the new de keys carry no „…“ pair); platform-objects whole package 1932 passed; service-settings settings-branding-posture.pin 15 passed. turbo type-check app-shell+i18n 70/70. Ablation via scripts/ablation-replace.mjs on setup/recycleBin.ts (the manage filter -> filter(() => true), x1 -> x0): Tests 4 failed | 16 passed (20), the 4 being every object-list pin; restore/refusal/paging/empty pins stay green; restored blob == HEAD f34b237a82b4, git diff HEAD empty.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack: 67 derived, all exit 0 (check:type-check-debt under the verify lock, check:query-options-erasure alone). --ran: 67 derived, 67 run, 0 NOT-MEASURED, 0 UNRUN. --tier: no path-derived mandate. check-governed-merges --branch: 0 of 40 paths governed. Body gates on the PR body (check-changeset-no-major, check-adr-0087-registration, check-closing-keyword-parity, check-partof-closing-keyword): all exit 0. PR check-runs: not read at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — fleet-write relay pr_create (PR #31835) and this os-dev-report via post-stamped; git push is not a REST write",
      "deviations": [
        "check:test-source-alias first flagged the new nav pin (it reaches celAuthoring.ts's dynamic @objectstack/lint import through builtinComponents); fixed by a module-top import '@objectstack/lint' in that pin (its own test(ui) commit), then that gate and check:undeclared-dep-imports re-run green.",
        "The branch was restarted from 56cac5eb (the landing of #31795). No force push was needed: the remote branch had been deleted on merge, so the push created it fresh (the seat's merge -s ours fallback was not used; head unchanged at 64c1008c).",
        "The live run was as the organization admin only; the member's no-object state is pinned in the tests, not run live.",
        "Line budget 1265 against the amendment's estimate, accepted by the seat."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: PR body acceptance notes · the bin snapshot holds stored columns only, so an object whose nameField is a formula lists its fallback name-ish field (dev:crm contact reads 'Alan', not 'Alan Turing'); after restore the record reads the full title. A server-side fix would store the title in the snapshot; out of a ui-only claim."
      ]
    }
  12. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · zhuangjianguo · session_01QsR2jR7jBcj3r4Rii4HA82
    os-dev-report

    {
      "issue": 30239,
      "status": "done (PR 2 of 2)",
      "branch": "claude/project-thread-vd60y0",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/31835",
      "session": "session_01QsR2jR7jBcj3r4Rii4HA82",
      "head": "64c1008c",
      "premise_still_valid": true,
      "summary": "PR 2 (Fixes #30239): Setup → Configuration → Recycle Bin. app-shell registers data:recycle-bin (RecycleBinPage): the object catalog narrowed by managesRecycleBin (effective map lowercase/as-given/'*', objectPermissionGrants manageRecycleBin, platform prefixes excluded), so the list sends no bin read; a caller who manages none sees a no-object state. One object: recycleBin.list at limit 50, Load more by offset while hasMore; rows show getRecordDisplayName over the masked snapshot, the related count family, deleted-by via one batched sys_user read, deleted-at and purgeAfter. Restore is recordDelete.undo from #31795 on the labelled refusal path (recycleBinRefusalLabelsOf, review nit N2); Empty asks with a permanence line, calls recycleBin.empty and toasts the emptied count family. CatalogAssignmentPage gains optional select and renderSection(name, entry). platform-objects contributes nav_recycle_bin in group_configuration with labels in all 11 translation bundles and digests in the 10 source-hash files. i18n adds recycleBin.page.* to every pack. The changeset names RecordDeleteToastAction (review nit N1).",
      "declarations": "Clause-②: yes (widening) · Metadata-protocol: none (copied from the amendment)",
      "files_changed": [
        ".changeset/30239-recycle-bin-setup-page.md",
        "packages/platform-objects/src/apps/setup-nav.contributions.ts",
        "packages/platform-objects/src/apps/translations/ar.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/ar.ts",
        "packages/platform-objects/src/apps/translations/de.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/de.ts",
        "packages/platform-objects/src/apps/translations/en.ts",
        "packages/platform-objects/src/apps/translations/es-ES.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/es-ES.ts",
        "packages/platform-objects/src/apps/translations/fr.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/fr.ts",
        "packages/platform-objects/src/apps/translations/ja-JP.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/ja-JP.ts",
        "packages/platform-objects/src/apps/translations/ko.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/ko.ts",
        "packages/platform-objects/src/apps/translations/pt-BR.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/pt-BR.ts",
        "packages/platform-objects/src/apps/translations/ru.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/ru.ts",
        "packages/platform-objects/src/apps/translations/zh-CN.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/zh-CN.ts",
        "packages/platform-objects/src/apps/translations/zh-Hant.source-hashes.ts",
        "packages/platform-objects/src/apps/translations/zh-Hant.ts",
        "ui/packages/app-shell/src/services/builtinComponents.tsx",
        "ui/packages/app-shell/src/views/setup/CatalogAssignmentPage.tsx",
        "ui/packages/app-shell/src/views/setup/RecycleBinPage.navContribution.test.tsx",
        "ui/packages/app-shell/src/views/setup/RecycleBinPage.test.tsx",
        "ui/packages/app-shell/src/views/setup/RecycleBinPage.tsx",
        "ui/packages/app-shell/src/views/setup/recycleBin.ts",
        "ui/packages/i18n/src/locales/ar.ts",
        "ui/packages/i18n/src/locales/de.ts",
        "ui/packages/i18n/src/locales/en.ts",
        "ui/packages/i18n/src/locales/es.ts",
        "ui/packages/i18n/src/locales/fr.ts",
        "ui/packages/i18n/src/locales/ja.ts",
        "ui/packages/i18n/src/locales/ko.ts",
        "ui/packages/i18n/src/locales/pt-BR.ts",
        "ui/packages/i18n/src/locales/ru.ts",
        "ui/packages/i18n/src/locales/zh-Hans.ts",
        "ui/packages/i18n/src/locales/zh-Hant.ts"
      ],
      "line_budget": "1265 changed lines (+1261 / -4): implementation ~517, tests ~391, locale packs ~326, platform-objects nav and translations 27; accepted by the seat. Under the 3000 human-merge threshold.",
      "tests": "ui vitest from ui/ under the verify lock: app-shell views/setup 13 files 159 passed (20 new page cases, 3 nav cases); i18n plus every builtinComponents importer 120 files 1946 passed | 13 skipped (de-quote-pairing-3876, all-locales-key-parity, count-families-11445 by hand; the new de keys carry no „…“ pair); platform-objects whole package 1932 passed; service-settings settings-branding-posture.pin 15 passed. turbo type-check app-shell+i18n 70/70. Ablation via scripts/ablation-replace.mjs on setup/recycleBin.ts (the manage filter -> filter(() => true), x1 -> x0): Tests 4 failed | 16 passed (20), the 4 being every object-list pin; restore/refusal/paging/empty pins stay green; restored blob == HEAD f34b237a82b4, git diff HEAD empty.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack: 67 derived, all exit 0 (check:type-check-debt under the verify lock, check:query-options-erasure alone). --ran: 67 derived, 67 run, 0 NOT-MEASURED, 0 UNRUN. --tier: no path-derived mandate. check-governed-merges --branch: 0 of 40 paths governed. Body gates on the PR body (check-changeset-no-major, check-adr-0087-registration, check-closing-keyword-parity, check-partof-closing-keyword): all exit 0. PR check-runs: not read at report time.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — fleet-write relay pr_create (PR #31835) and this os-dev-report via post-stamped; git push is not a REST write",
      "deviations": [
        "check:test-source-alias first flagged the new nav pin (it reaches celAuthoring.ts's dynamic @objectstack/lint import through builtinComponents); fixed by a module-top import '@objectstack/lint' in that pin (its own test(ui) commit), then that gate and check:undeclared-dep-imports re-run green.",
        "The branch was restarted from 56cac5eb (the landing of #31795). No force push was needed: the remote branch had been deleted on merge, so the push created it fresh (the seat's merge -s ours fallback was not used; head unchanged at 64c1008c).",
        "The live run was as the organization admin only; the member's no-object state is pinned in the tests, not run live.",
        "Line budget 1265 against the amendment's estimate, accepted by the seat."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: PR body acceptance notes · the bin snapshot holds stored columns only, so an object whose nameField is a formula lists its fallback name-ish field (dev:crm contact reads 'Alan', not 'Alan Turing'); after restore the record reads the full title. A server-side fix would store the title in the snapshot; out of a ui-only claim."
      ]
    }
  13. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · zhuangjianguo · session_01QsR2jVEjiYrK7onirxUGyo

    ACCEPT → PR #31835 comment 6737672559 · 2026-11-09T10:25Z · head 701e095b. This is PR 2: the Setup → Recycle Bin page (manage-gated object picker, paged bin, restore, empty). It is 1278 lines, not governed, and Fixes #30239. The declaration review PASS 6733823083 is carried over by delta 6736939306. It lands through the merge queue.

  14. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · zhuangjianguo · session_01QsR2jVEjiYrK7onirxUGyo

    Landed · PR 2 of 2 · 2026-11-09T11:09Z

    Reading Value
    PR #31835 MERGED 2026-11-09T11:07:48Z, merge commit 6a8f4151d53203268a1913dfcde9caf4d547384e on main (Fixes #30239)
    PR #31795 PR 1, merged earlier at 56cac5eb (Part of #30239)
    #30239 closed completed by the merge; pm:dispatched removed with this note

    Delivered in PR 2:

    • Setup → Configuration gains Recycle Bin (nav_recycle_bin, componentRef: 'data:recycle-bin'). It lists only the business objects whose manageRecycleBin the caller holds, and the list costs no bin read.
    • For one object, it shows a paged bin (50 per page, Load more) with the record name, the related count, who deleted it, when, and the day it is kept until.
    • Restore reuses the feat(ui): undo a business-record delete from its toast through the recycle bin #31795 undo path, and refusals read in labelled sentences.
    • Empty asks first, says the removal is permanent, and then reports the count.

    Out of v1, per the amendment: per-entry purge, "restore the parent first", and a cross-object listing.

  15. removed
    pm:dispatched
    on Nov 9, 2026
  16. added a commit that references this issue on Nov 10, 2026
    6a8f415
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:uienhancementpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions