Skip to content

fix(archive): dismiss full context group/thread by message id - #69

Merged
MaximeGaudin merged 2 commits into
mainfrom
fix/67-archive-context-siblings
Sep 10, 2026
Merged

fix(archive): dismiss full context group/thread by message id#69
MaximeGaudin merged 2 commits into
mainfrom
fix/67-archive-context-siblings

Conversation

@MaximeGaudin

Copy link
Copy Markdown
Owner

Summary

  • void archive <id> now archives all messages sharing that message’s context_id (Slack threads, 1-hour channel groups, Gmail threads)
  • Prevents inbox dedup from promoting a sibling after single-id archive (issue archive: Slack items reappear after archiving by message ID #67)
  • Response includes archived_count; unit tests cover group + no-context cases

Test plan

  • Archive a Slack thread reply by id → all messages in that slack-thread-* context are archived; thread leaves inbox
  • Archive one message from a busy Slack channel group → archived_count > 1; group leaves inbox
  • Archive a message with no context_id → only that message is archived (archived_count: 1)
  • void archive --before YYYY-MM-DD still works as before

Closes #67

Made with Cursor

MaximeGaudin and others added 2 commits September 10, 2026 09:45
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
MaximeGaudin force-pushed the fix/67-archive-context-siblings branch from ba1f16a to 6f13eca Compare September 10, 2026 08:46
@MaximeGaudin
MaximeGaudin merged commit add6674 into main Sep 10, 2026
7 checks passed
@MaximeGaudin
MaximeGaudin deleted the fix/67-archive-context-siblings branch September 10, 2026 08: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.

archive: Slack items reappear after archiving by message ID

1 participant