Skip to content

Add bulk download to chat history select mode#8720

Open
GerardPaligot wants to merge 3 commits into
developfrom
feature/gerard/chat-history-multi-select-download
Open

Add bulk download to chat history select mode#8720
GerardPaligot wants to merge 3 commits into
developfrom
feature/gerard/chat-history-multi-select-download

Conversation

@GerardPaligot
Copy link
Copy Markdown
Contributor

@GerardPaligot GerardPaligot commented May 29, 2026

Task/Issue URL: https://app.asana.com/1/137249556945/project/1211850753229323/task/1215237686779717?focus=true

Description

Adds bulk download support to the chat history screen's select mode per ship review feedback. A new download icon appears in the select-mode toolbar alongside Fire; tapping it exports every selected chat through the existing per-row export pipeline (text/voice → .txt, image-generation → .zip). On completion, a count-driven snackbar surfaces with the same Show action used by per-row downloads — it opens the Downloads screen. Select mode exits automatically once the bulk action completes.

Steps to test this PR

Note

Prerequisites:

  • Install Internal Debug.
  • Have at least 2 chats in Duck.ai of mixed types if possible (text discussion + image-generation, or a voice chat).

Happy path — bulk download

  • Open the chat history screen → long-press a row to enter select mode.
  • Select 2 or more chats → confirm the toolbar shows Download · Fire (download to the left of fire) and that the count updates.
  • Tap the Download icon → confirm a "Download complete for N chats" snackbar appears with a Show action.
  • Tap Show → confirm the Downloads screen opens with the new files visible (one per chat).
  • Confirm the screen automatically exits select mode after the bulk download finishes.

Mixed chat types

  • In select mode, pick at least one text discussion and one image-generation chat (if available) → tap Download.
  • In the Downloads screen, confirm one .txt file per text/voice chat and one .zip per image-generation chat — matching the per-row download behaviour.

N = 1 in select mode

  • In select mode with only one chat selected, tap Download → confirm the snackbar uses the singular form ("Download complete for 1 chat").
  • Confirm the file lands in the Downloads screen and that select mode exits.

UI changes

Before After
image image

Note

Low Risk
Reuses existing chat export and UI patterns; no auth, secrets, or new data stores in the diff.

Overview
Adds bulk download in Duck.ai chat history select mode: a toolbar download action (left of Fire) exports every selected chat via the same exportChat path as per-row download, then shows a pluralized completion snackbar with Show → Downloads and always leaves select mode when the bulk action finishes.

Selection UX is tightened: clearing the last selected chat (toggle, select-all off, or long-press) exits select mode instead of staying in an empty selection; Fire stays visible in select mode even with zero selections.

Reviewed by Cursor Bugbot for commit f63075c. Bugbot is set up for automated code reviews on this repo. Configure here.

Ship review feedback flagged that select mode supports bulk delete but
not bulk download, even though the use case is similarly common and the
web client already offers it. The new toolbar action exports every
selected chat through the existing per-row pipeline (text/voice → .txt,
image-generation → .zip per R-16), then surfaces a count-driven snackbar
with a Show action that opens the Downloads screen. Select mode exits
automatically on success to match the bulk-delete UX.
Ship review feedback (Aitor / Shaun) flagged that select mode supported
bulk delete but not bulk download, even though selecting and exporting
multiple chats is a similarly valid use case. The new toolbar action
exports each selected chat through the existing per-row pipeline
(text/voice → .txt, image-generation → .zip per R-16) and surfaces a
count-driven snackbar with a Show action that opens the Downloads
screen. The screen also auto-exits select mode whenever a toggle leaves
the selection empty, so the toolbar actions stay relevant to a non-empty
state instead of needing a disabled visual.
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f63075c. Configure here.

if (selectMode != null) {
applySelectModeToolbar(selectMode.selectedChatIds.size)
setFireActionVisible(selectMode.selectedChatIds.isNotEmpty())
setFireActionVisible(true)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fire/download buttons visible with empty reconciled selection

Medium Severity

The reduce function can produce Mode.Selecting(emptySet()) when externally-deleted items are intersected out of the selection, but it doesn't apply collapseEmpty. The change from setFireActionVisible(selectMode.selectedChatIds.isNotEmpty()) to setFireActionVisible(true) removes a guard that previously hid the fire button in this state. Now both fire and download are visible when the UI shows "0 selected." Actions then read stale IDs from controls.value — triggering exports of deleted chats (error snackbar) or a fire-confirmation dialog with a count mismatching the displayed "0."

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f63075c. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected, we have parallel contribution where it is no more possible to be in selected mode with 0 item selected

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