Skip to content

Add ability to purge historical sessions in batch#2802

Open
FosanzDev wants to merge 2 commits intoChainlit:mainfrom
FosanzDev:Chainlit#2603
Open

Add ability to purge historical sessions in batch#2802
FosanzDev wants to merge 2 commits intoChainlit:mainfrom
FosanzDev:Chainlit#2603

Conversation

@FosanzDev
Copy link

@FosanzDev FosanzDev commented Feb 23, 2026

WHAT DOES THIS DO?

(Fixes issue: "Add ability to purge historical sessions in batch​ #2603 ")

Adds new section with a "select" button that when clicked, you can select threads to bulk delete them.

Note: Frontend implementation can be changed based on feedback. Maybe instead of a visible button add it on contextual menu in the three-dot menu to start the "selection" process. Not a professional frontend guy tho

Note: Three dot menu for threads are now permanently visible on mobile view too, which couldn't be seen before

POC: This video proofs its functionality both in desktop and mobile frontends

Screencast.from.2026-02-23.18-27-58.webm

Summary by cubic

Adds bulk deletion of historical sessions from the sidebar with a simple selection mode and confirmation. Implements server/client support and i18n updates to address #2603.

  • New Features
    • Backend: DELETE /project/threads to remove multiple threads by threadIds with auth and author checks.
    • Frontend: Select mode in ThreadList with checkboxes and bulk delete + confirm dialog and toasts; clears current/resumed thread when deleted; three-dot thread menu always visible on mobile.
    • API: Added ChainlitAPI.deleteThreads(threadIds).
    • i18n: Added “select” action and plural delete descriptions across locales.

Written for commit d3ba9fa. Summary will update on new commits.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. backend Pertains to the Python backend. frontend Pertains to the frontend. labels Feb 23, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 24 files

@dokterbob
Copy link
Collaborator

Thanks for the contrib @FosanzDev! It seems there are are a bunch of translations in your PR which are unrelated to the issue. Could you please remove them? (They are welcome in a separate PR.)

@dokterbob dokterbob added unit-tests Has unit tests. and removed unit-tests Has unit tests. labels Feb 23, 2026
@FosanzDev
Copy link
Author

@dokterbob maybe I'm not seeing something! Translations are needed for the "Select" button and for the multiple thread selection dialog.
One commit is for the core functionality using only en-US, the other one is for adding the rest of the languages.
Hearing back from you!

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

Labels

backend Pertains to the Python backend. frontend Pertains to the frontend. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants