Skip to content

Add multi-selection and bulk actions for links#370

Draft
Copilot wants to merge 6 commits intomasterfrom
copilot/add-multiple-selection-bulk-actions
Draft

Add multi-selection and bulk actions for links#370
Copilot wants to merge 6 commits intomasterfrom
copilot/add-multiple-selection-bulk-actions

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

The app required editing links individually to change profiles, attach tags, or perform other operations on multiple items. This adds selection mode with bulk operations.

Architecture Changes

State Management

  • AccountViewModel tracks selection with selectedLinkIds: StateFlow<Set<Long>> and isSelectionMode: StateFlow<Boolean>
  • Selection cleared on mode exit; auto-enters when items selected

Repository Layer

// Added to LinkRepository
suspend fun updateFavourite(id: Long, isFavourite: Long)
suspend fun updateLinkProfile(id: Long, profileId: Long)

Bulk Operations

// AccountViewModel methods
fun bulkDeleteLinks(linkIds: Set<Long>)  // Includes tag cleanup
fun bulkMoveLinksToProfile(linkIds: Set<Long>, targetProfileId: Long)
fun bulkAttachTags(linkIds: Set<Long>, tags: List<Tags>)
fun bulkToggleFavourite(linkIds: Set<Long>, setFavorite: Boolean)

UI Changes

Selection Mode Entry

  • CheckSquare icon button in top bar toggles mode
  • BackHandler intercepts to exit selection before other navigation

Item Components (DeeprItem, DeeprItemCompact, DeeprItemGrid)

  • Added isSelectionMode and isSelected parameters
  • Show checkbox instead of action buttons in selection mode
  • Highlight selected items with primaryContainer color
  • Disabled swipe-to-dismiss and long-press when selecting

Bulk Action Bar

  • Bottom bar with selected count and actions: Select All, Attach Tags, Move to Profile, Favorite, Unfavorite, Delete
  • Uses proper plurals resources for i18n (links_deleted, links_favorited)

Example Usage Flow

// User enters selection mode
viewModel.enterSelectionMode()

// Toggles individual item
onItemClick(MenuItem.ToggleSelection(account))
viewModel.toggleLinkSelection(account.id)

// Bulk favorite
viewModel.bulkToggleFavourite(selectedLinkIds, setFavorite = true)
// Auto-clears selection and syncs to markdown

Notes

Move to Profile and Attach Tags show TODO toasts; dialogs deferred to future work.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13/lib/gradle-daemon-main-8.13.jar (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Multiple selection and bulk actions for links</issue_title>
<issue_description>Description
The app does not support multiple selection or bulk actions for links. This makes common tasks unnecessarily difficult when managing many links.

Expected behavior

  • Provide a way to select multiple links (e.g. selection mode)

  • Allow bulk actions on selected links, such as:

    • Move links to another profile
    • Attach tags to multiple links

Actual behavior

  • Only single-link actions are supported
  • Links must be edited one by one to change profiles or attach tags

Proposed solution

  • Add an explicit entry point for multi-select, such as a button in the title bar to enter selection mode

  • Alternatively, enhance the existing swipe interaction:

    • Since links are already swipeable left/right (edit/delete), introduce a threshold or indicator
    • If the swipe passes a certain point, enter selection mode instead of immediately dismissing the item
    • Selected items remain visible and can be acted on in bulk

Rationale
Current swipe actions immediately remove the item from view, which prevents using swipe gestures for selection. A dedicated selection mode or a clear swipe indicator would enable multi-select without conflicting with existing copy/edit/delete behavior.

Notes
Long-press is currently used for copying links, so multi-select would need a dedicated selection mode or alternative interaction.
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 7, 2026 19:59
Co-authored-by: yogeshpaliyal <9381846+yogeshpaliyal@users.noreply.github.com>
Co-authored-by: yogeshpaliyal <9381846+yogeshpaliyal@users.noreply.github.com>
Co-authored-by: yogeshpaliyal <9381846+yogeshpaliyal@users.noreply.github.com>
Copilot AI changed the title [WIP] Add multiple selection and bulk actions for links Add multi-selection and bulk actions for links Feb 7, 2026
Copilot AI requested a review from yogeshpaliyal February 7, 2026 20:10
@github-actions
Copy link

github-actions bot commented Feb 8, 2026

🧪 Integrated Test Results

The integrated UI tests have completed.

View full test results: Test Run #21786119270

Test reports are available in the artifacts section of the workflow run.

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

🧪 Integrated Test Results

The integrated UI tests have completed.

View full test results: Test Run #21793801012

Test reports are available in the artifacts section of the workflow run.

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

🧪 Integrated Test Results

The integrated UI tests have completed.

View full test results: Test Run #21793868182

Test reports are available in the artifacts section of the workflow run.

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.

Multiple selection and bulk actions for links

2 participants