Skip to content

feat(compose): add empty drafts action#1964

Open
keilogic wants to merge 1 commit into
runbox:masterfrom
keilogic:fix/empty-drafts-534
Open

feat(compose): add empty drafts action#1964
keilogic wants to merge 1 commit into
runbox:masterfrom
keilogic:fix/empty-drafts-534

Conversation

@keilogic

Copy link
Copy Markdown
Contributor

Fixes #534.

Summary

  • Add an Empty Drafts icon button to the Draft Desk header.
  • Confirm before deleting saved drafts, and disable the action while deletion is in progress.
  • Batch-delete saved Drafts message IDs through the existing deleteMessages API path, then remove the deleted draft models locally.
  • Keep unsaved local compose panes out of the backend delete request.
  • Add Draft Desk service specs for the batch-delete behavior and the unsaved-only guard.

Validation

  • npm ci
  • npx tsc -p src/tsconfig.app.json --noEmit
  • npx tsc -p src/tsconfig.spec.json --noEmit
  • npx eslint src/app/compose/draftdesk.component.ts src/app/compose/draftdesk.service.ts src/app/compose/draftdesk.service.spec.ts src/app/compose/compose.module.ts
  • npx ng test --watch=false --browsers=FirefoxHeadless --include=src/app/compose/draftdesk.service.spec.ts
  • npm run lint -- --quiet
  • npx ng test --watch=false --browsers=FirefoxHeadless
  • node src/build/pre-build.js; npx ng build --configuration production --base-href=/app/ runbox7; node src/build/post-build.js
  • npm run policy
  • git diff --check
  • git show --stat --oneline --check HEAD

Notes: the production build passed after fetching full git history for the changelog prebuild step. The build/test output included existing Angular Material/test-console/optimization warnings.

AI disclosure

This pull request was prepared with assistance from OpenAI Codex in the local working copy. Codex assisted with code changes, test updates, duplicate checks, and validation command execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "Empty Drafts" button

1 participant