Skip to content

fix(ux): bulk Delete on expenses, accounts and opportunities says the records go to the recycle bin (#2796) - #2799

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-2796-bulk-delete-wording
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-2796-bulk-delete-wording

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #2796

Clause-②: no
Metadata-protocol: none
Metadata-impact: reviewer

维护者速读

  • 在费用、客户、商机列表里勾选多条记录点删除时,确认框原来说“永久删除、无法撤销”,现在改说“记录会进入回收站,管理员可以在那里恢复”,四种界面语言都改了。
  • 为什么做:平台早已把删除的记录放进回收站保留 30 天,旧提示吓唬用户又不真实;与常见问题里“删除的记录去哪了”的回答保持一致。
  • 出错会怎样:只改提示文字,删除本身的行为不变;如果措辞不妥,直接撤回这次改动即可。
  • 要你做什么:无。

What changes

The bulk Delete confirmation on three list views (My Expenses, All Accounts, every opportunity grid list) said "Permanently delete {{count}} ... This cannot be undone." It now says the records go to the recycle bin and an administrator can restore them:

  • en: Delete {{count}} account(s)? They go to the recycle bin, where an administrator can restore them. (expense(s), opportunity(ies) alike)
  • zh-CN: 确定要删除 {{count}} 个客户吗?删除的记录会进入回收站,管理员可以在那里恢复。
  • ja-JP: {{count}} 件の取引先を削除しますか?削除したレコードはごみ箱に移り、管理者がそこから復元できます。
  • es-ES: ¿Eliminar {{count}} cuenta(s)? Irán a la papelera, donde un administrador puede restaurarlas.

The recycle-bin noun in each language is the platform's own Setup navigation label (Recycle Bin / 回收站 / ごみ箱 / Papelera). 13 strings in 13 files: the card's grep found 12; the 13th is the es-ES expense row, which said definitivamente and so escaped the grep pattern. No locale row was missing. The English for accounts and opportunities lives in the view source (the sales packs carry no en bulkActions entry), as before.

Who can restore: the sentence names the administrator only, because that is true on all three objects. Per the FAQ on #2793, a Sales Manager can also restore accounts and opportunities, but nobody but an administrator can restore an expense; the sentence does not claim exclusivity, and listing roles per object would not fit a confirmation dialog. The retention (30 days) is left out of the dialog because it is a host setting (retentionDays per bin entry, configurable by an environment variable on the platform); the FAQ states it as the default.

Agrees with the FAQ answer Where do deleted records go? on #2793 head 46fd23cb (records go to the recycle bin; an administrator restores them from Setup, Recycle Bin).

Tests

No hotcrm test pins these confirmation strings (grep -rn "Permanently\|confirmText" test/ finds only generic translation-parity and bulk-dispatch shape pins), so none is added: the wording is free prose, and a prose pin is not a business fact.

Acceptance notes

Measured on the booted app (pinned @objectstack 18.6.0, objectstack dev, admin session, Chromium through Playwright), before the wording change, on probe records:

Bulk delete lands in the recycle bin on all three views
  • My Expenses, 1 row: DELETE /api/v1/data/crm_expense/ID answered 200 with recycleBinEntryId; the object's bin listing went from 0 entries to 1 (retentionDays: 30).
  • My Expenses, 2 rows: POST .../crm_expense/deleteMany answered 405 OBJECT_API_METHOD_NOT_ALLOWED (bulk is not in the object's API methods); the console then sent one DELETE per id, each 200 with recycleBinEntryId.
  • All Opportunities, 1 row: per-id DELETE, 200 with recycleBinEntryId, one bin entry.
  • All Opportunities, 2 rows: POST .../crm_opportunity/deleteMany 200 succeeded: 2; the bin listing then held one entry per row.
  • All Accounts, 1 row: per-id DELETE, 200 with recycleBinEntryId. 2 rows: deleteMany 405, then per-id DELETE, both binned.
  • Restore as administrator: POST /api/v1/data/crm_account/recycle-bin/ENTRY/restore answered success and the account read back 200.

Walked in English on desktop. The 405 on deleteMany for expenses and accounts is the console's fallback working as built; it is noted, not filed.

Verification

Two-minute check: open Sales, Accounts, All Accounts; tick one row; click Delete on the selection bar. Expected: the dialog reads "Delete 1 account(s)? They go to the recycle bin, where an administrator can restore them."

Local runs at head 27fe5bbad: pnpm validate 0, pnpm typecheck 0, pnpm lint 0, pnpm hygiene 0, pnpm build 0; targeted vitest (10 files: i18n-references, bulk-action-dispatch, i18n-package-ownership, i18n-shared-widget-parity, action-references, metadata-references, expense-module, org-locale-stored-text, package-ownership, view-predicate-dialect) Test Files 10 passed (10), Tests 188 passed (188). The full pnpm test did not finish inside the container's 30-minute background limit and is left to CI (declared narrowing). After the change, on the restarted app, the All Accounts dialog reads Delete 1 account(s)? They go to the recycle bin, where an administrator can restore them. in English and 确定要删除 1 个客户吗?删除的记录会进入回收站,管理员可以在那里恢复。 with a zh-CN browser.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_017xRBcV3h25dAMNWki8e1ns

… records go to the recycle bin (#2796)

The confirmText said "Permanently delete ... This cannot be undone." On the
pinned 18.6.0, measured on the booted app, the console's bulk Delete on
My Expenses, All Accounts and All Opportunities lands every selected
record in the recycle bin (per-id DELETE answers recycleBinEntryId; a
two-row deleteMany on crm_opportunity leaves one bin entry per row; on
crm_expense and crm_account deleteMany answers 405 and the console falls
back to per-id DELETE), and an administrator restores from there.

All four UI languages, including the es-ES expense row the card's grep
missed ("definitivamente").

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xRBcV3h25dAMNWki8e1ns
@github-actions github-actions Bot added the metadata Declarative metadata — schema, security posture, UI surfaces label Nov 25, 2026
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
hotcrm Ignored Ignored Nov 25, 2026 4:03pm UTC

Request Review

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:hotcrm#2 · sunhaolin · session_017xRBcV3h25dAMNWki8e1ns

席位核对 — ACCEPT · repo:hotcrm#2 · head ea7e16b3

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:hotcrm#2 · sunhaolin · session_017xRBcV3h25dAMNWki8e1ns

Landing. This is a reviewer-class PR. The seat record 7168023312 accepted head ea7e16b3, and the head is unchanged.

reading value
head ea7e16b3d307de0fcfd9409bd50be86e662b1d86
check-runs on head all completed, none failed; Analyze Code (javascript) is success at 2026-11-26T01:14:55Z after the re-run
governed / size not governed; 34 changed lines

The seat flips it ready and arms auto-merge, and the merge queue squashes it. Fixes #2796 closes the card on merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 01:18
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit 5d09d8f Nov 26, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

metadata Declarative metadata — schema, security posture, UI surfaces

Projects

None yet

2 participants