fix(archive): dismiss full context group/thread by message id - #69
Merged
Conversation
Inbox dedup shows one row per context_id. Slack 1-hour channel groups and real threads share that id, so archiving only the visible message let the next sibling reappear. Archive all siblings with the same context_id (issue #67). Co-authored-by: Cursor <cursoragent@cursor.com>
Apply review follow-ups on context-group archiving: - Run the sibling SELECT and UPDATE in one transaction so a concurrent insert into the same context cannot be archived without being reported to the caller (which drives cache cleanup). - Add `Connector::archive_batch` (default: one call per message, errors aggregated) and override it for Gmail with `batchModify`, chunked at 1000 ids. Archiving a thread is now one request instead of N. - Group the remote push by conversation and cache conversation lookups instead of querying once per sibling. - Restore cache cleanup on the already-archived path, which stopped running once cleanup was driven by the newly-archived rows. - Document `archived_count` (rows newly archived, 0 when already archived), update docs/commands.md and the changelog. - Cover the no-op, unknown-id and cross-conversation cases, plus the remote batching, with unit tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
MaximeGaudin
force-pushed
the
fix/67-archive-context-siblings
branch
from
September 10, 2026 08:46
ba1f16a to
6f13eca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
void archive <id>now archives all messages sharing that message’scontext_id(Slack threads, 1-hour channel groups, Gmail threads)archived_count; unit tests cover group + no-context casesTest plan
slack-thread-*context are archived; thread leaves inboxarchived_count> 1; group leaves inboxcontext_id→ only that message is archived (archived_count: 1)void archive --before YYYY-MM-DDstill works as beforeCloses #67
Made with Cursor