Skip to content

feat(kanban): add "Archive all" action to auto-complete columns#517

Open
reniko wants to merge 2 commits into
fccview:developfrom
reniko:feature/kanban-archive-all
Open

feat(kanban): add "Archive all" action to auto-complete columns#517
reniko wants to merge 2 commits into
fccview:developfrom
reniko:feature/kanban-archive-all

Conversation

@reniko
Copy link
Copy Markdown
Contributor

@reniko reniko commented May 22, 2026

What

Adds an "Archive all" button to the header of Kanban columns whose status
has autoComplete: true. Clicking the button opens a confirmation dialog;
on confirm, all cards in that column are archived via the existing
archiveItem server action.

Why

Cards in auto-complete columns are effectively "done" and tend to
accumulate over time. Until now, users had to archive each card
individually — there was no bulk action.

How

  • KanbanColumn renders an archive icon-button in the column header,
    conditional on the column's status having autoComplete: true and an
    onArchiveAll handler being provided (i.e. the user has edit permission).
  • The button is disabled when the column is empty or while an archive
    pass is in flight.
  • Clicking opens a ConfirmModal (destructive variant) with the affected
    column name and item count.
  • Kanban.handleArchiveAll iterates the column's items sequentially,
    calling the existing archiveItem server action for each. The latest
    returned checklist state is propagated via onUpdate, and a final
    refreshChecklist() ensures consistency.
  • On partial failure, the toast reports how many items were archived
    before the error; on full failure (zero archived), a plain failure
    toast is shown instead.

No new archive mechanism, no header refactor, no changes to the archive
data model.

Why sequential, not Promise.all

archiveItem writes to the file-based storage; parallel writes against
the same list file could race. Sequential is the safer default until
the storage layer is shown to handle concurrent writes for a single list.

Testing

  • Button hidden in non-auto-complete columns
  • Button visible in auto-complete columns (when user has edit permission)
  • Button disabled when column is empty
  • Button disabled during archive pass
  • Single card: confirm → archived, appears in ArchivedItemsModal
  • Many cards: confirm → all archived, no UI hang
  • Cancel confirm → no-op
  • de locale renders correctly

Translations

  • en and de written by hand.
  • Other languages: machine-translated, please review.
  • klingon and pirate: in the spirit of the existing strings.

Out of scope

  • Refactoring the column header layout
  • Changes to the archive storage model
  • Optimistic UI / progress indicator for very large columns

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.

1 participant