Skip to content

Feat/multi select #188

Merged
NateEaton merged 7 commits into
mainfrom
feat/multi-select-phase-1
Jun 3, 2026
Merged

Feat/multi select #188
NateEaton merged 7 commits into
mainfrom
feat/multi-select-phase-1

Conversation

@NateEaton

@NateEaton NateEaton commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

Adds full multi-select mode to the bookmark list and reworks the list top app bar into an overflow menu. Covers selection, batch favorite/archive/delete, batch add-labels, and the bar consolidation — the complete multi-select scope.

What's included

Multi-select mode

  • Enter selection mode from the top-bar overflow; tap cards to select. Selection-mode bar shows X / count / Archive / Favorite / Overflow; the overflow holds Delete, Add labels, and Select All / Deselect All.
  • Select All toggles selection across the full filtered list.
  • Single context-aware action icons. Favorite and Archive each show one icon reflecting what the tap will do across the whole selection: if every selected item is already favorited/archived the icon is the "remove" variant (and the tap removes for all); otherwise it's the "add" variant. Writes skip no-op items.
  • Favorite, Archive, and Add labels keep the selection active so several actions can run in a row; selection mode auto-exits when an action leaves nothing selected.
  • In selection mode, each card's favorite/archive icons stay visible but dimmed (~38% alpha) as non-interactive state indicators.

Batch add labels

  • Additive "Add labels" applies one or more labels (union per bookmark) to the whole selection via the existing label picker and UPDATE_LABELS sync path. Bookmarks already carrying all chosen labels are skipped. Snackbar confirms with an Undo that restores prior labels. (Batch removing labels is out of scope.)

Batch delete + Undo

  • Delete stages items optimistically (no DB write), exits selection mode, and surfaces a Snackbar with Undo.
  • A single Snackbar + Undo is the confirmation surface for all multi-select changes — delete, favorite/archive, and add-labels. Undo reverts only the items actually changed (changedIds); delete uses Indefinite duration, the reversible actions use Long.
  • Repository deleteBookmarks(ids) performs one transaction (soft-delete + clear stale pending actions + one DELETE pending action per id) and schedules sync once. Batch-pending delete state is kept separate from single-item delete so confirm/cancel is atomic.

Top app bar overflow refactor

  • Normal mode: Layout / Sort / always-present MoreVert overflow (Filter + Select bookmarks).
  • Label mode: same bar shape; overflow holds Rename label / Delete label / divider / Select bookmarks. Eliminates the previous "multi-select icon to the right of the overflow" gap.

Docs / conventions

  • New specs list-top-app-bar-overflow-spec.md and list-multi-select-phase-4-spec.md; list-multi-select-actions-spec.md updated (Snackbar+Undo confirmation, no settings toggle). User guide (your-bookmarks.md, organizing.md) updated.
  • Snackbar copy uses flat strings across all 10 locales (no <plurals>), per project convention.
  • CLAUDE.md: added "copyable deliverables as raw markdown" instruction (unrelated housekeeping carried on this branch).

Out of scope

  • A settings-level confirmation toggle (dropped — the Snackbar+Undo supersedes it).
  • Batch removing labels.

Test plan

  • ./gradlew :app:assembleDebugAll
  • ./gradlew :app:testDebugUnitTestAll
  • ./gradlew :app:lintDebugAll
  • On-device (Pixel 9): select/deselect, Select All, batch favorite/archive (context-aware icon + keep-selection + auto-exit), dimmed card icons, batch add-labels + Undo, batch delete + Undo, normal- and label-mode overflow contents.

NateEaton and others added 5 commits June 1, 2026 09:48
Phase 1 of list multi-select: a selection mode entered from the list top
bar that lets users toggle bookmark cards and apply favorite or archive to
the whole selection in a single batched, sync-once transaction. Each item
toggles from its own current state. Batch delete/undo (Phase 2) is not yet
included.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Refines the multi-select Phase 1 favorite/archive UX. Each axis (favorite,
archive) is computed independently from the current selection and the most
useful action is elevated to the top app bar: Add when any selected item is
not in the target state, the inverse (Remove favorite / Unarchive) when all
selected items already are. The selection-mode overflow always holds the
opposite of whatever the bar is showing, greyed-out when it would be a no-op,
so there are no extra taps to reverse a uniform selection and no hidden
no-ops on the bar. Cards in select mode keep their favorite/archive state
visible as dimmed, non-interactive indicators. Adds a Select All / Deselect
All toggle in the selection-mode overflow.

Every batch action skips DB writes for items already in the target state and
emits a confirmation Snackbar with "N set/unset as X" copy sized by the
selected count, reflecting the post-state of the full selection. The
Snackbar+Undo plan (Phase 3) supersedes the previously-planned "Confirm
multi-select actions" Settings switch.

Aligns multi-select action terminology with Reading view ("Add favorite",
"Remove favorite", "Archive", "Unarchive") and updates Reading view to read
"Add favorite" for consistency (was "Add to favorites").

Drafts a Phase 3 spec for the list-view top app bar overflow refactor that
relocates the multi-select entry icon (and Filter) into a normal-mode
overflow menu and addresses the current label-mode bar gap. The Phase 3
batch delete + Undo work and the bar refactor should ship together so users
see a single bar reshuffle, not two.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Revert the four multi-select confirmation Snackbar messages from <plurals>
back to flat %1$d strings, matching the project's lint-enforced
flat-string-in-all-locales convention (the app uses no other plurals
resources). Snackbar wording is unchanged; only the resource mechanism and
the getString call differ.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add a CLAUDE.md instruction that prompts, PR/issue descriptions, discussion
posts, and commit messages be presented as raw markdown in a fenced code
block so they can be copied verbatim.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Completes multi-select Phase 3:

- Batch delete: stage selected bookmarks, exit selection mode, and confirm
  the soft-delete only when the snackbar is dismissed; Undo restores the
  staged cards without enqueuing deletes. Adds an explicit atomic
  deleteBookmarks path kept distinct from the single-item delete helper.
- Undo on batch favorite/archive snackbars, reverting only the bookmarks
  that actually changed (events carry the changed ids and prior state).
- Top app bar overflow refactor: normal and label modes share a single
  always-present overflow (Filter / Select bookmarks; Rename / Delete label
  / Select bookmarks). Removes the standalone Filter icon and trailing
  multi-select button. Bar actions extracted into BookmarkListBarActions.

Adds the flat string multi_select_deleted_count across all locales (no
plurals), ViewModel tests for batch delete/undo, and Compose tests for the
overflow. Updates the user guide (reordered Your Bookmarks, clearer
multi-select copy) and marks both specs Implemented.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@NateEaton NateEaton self-assigned this Jun 2, 2026
@NateEaton NateEaton linked an issue Jun 2, 2026 that may be closed by this pull request
@NateEaton NateEaton modified the milestone: v0.14.0 Jun 2, 2026
NateEaton and others added 2 commits June 2, 2026 11:37
Phase 4 refinement of selection mode: each action shows one
context-aware icon instead of a bar/overflow opposite-action pair.
Favorite and archive now keep the selection active so several actions
can run in a row, and selection mode auto-exits when an action leaves
nothing selected. Bar reordered to Archive, Favorite, Overflow with
Delete moved into the overflow.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds an additive "Add labels" overflow action in selection mode that
applies one or more labels (union per bookmark) to every selected
bookmark, reusing the existing label picker and UPDATE_LABELS sync
path. Bookmarks already carrying all chosen labels are skipped. A
snackbar confirms the count with an Undo that restores prior labels on
the changed bookmarks. Like favorite/archive, the action keeps the
selection active. Batch removing labels remains out of scope.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@NateEaton NateEaton merged commit 95bbd1b into main Jun 3, 2026
3 checks passed
@NateEaton NateEaton deleted the feat/multi-select-phase-1 branch June 3, 2026 19:50
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.

Multi-select Actions in List View

1 participant