Skip to content

feat: reversible thread inbox state operations#69

Open
gnapse wants to merge 1 commit intomainfrom
ernesto/inbox-state-undo
Open

feat: reversible thread inbox state operations#69
gnapse wants to merge 1 commit intomainfrom
ernesto/inbox-state-undo

Conversation

@gnapse
Copy link
Collaborator

@gnapse gnapse commented Mar 3, 2026

Summary

This PR adds reversible thread inbox-state operations and makes thread done safely undoable.

New Commands

  • tw thread reopen [thread-refs...]
  • tw thread read [thread-refs...]
  • tw thread unread [thread-refs...]
  • tw thread restore [thread-refs...] --unread

tw thread done now uses the same mutation flow as the commands above.

Mutation Behavior

  • Supports single and bulk refs (tw thread read 123 456).
  • Supports --yes, --dry-run, and --json.
  • Idempotent operations (reopen on open threads, unread on unread threads).
  • --json includes before/after fields: id, title, isArchived, inInbox, isUnread, closed, lastUpdated.
  • Non-zero exit only for true errors (invalid ref, permission, API failure), including mixed success/failure batches.

Docs and Skill Content

  • Updates README.md with examples and migration note: thread done is reversible via thread reopen.
  • Updates src/lib/skills/content.ts to reflect new thread commands and options.

Tests

  • Expands thread command tests to cover:
    • single and bulk operations
    • dry-run behavior
    • idempotency
    • mixed success/failure

@doistbot doistbot requested a review from craigcarlyle March 3, 2026 22:27
@doist-bot
Copy link

doist-bot bot commented Mar 3, 2026

⚠️ Doistbot encountered an error while reviewing this PR.

  • Status: FAILED
  • Delivery: 2ab36b20-1750-11f1-8790-ba820cc8e210
  • Logs: Datadog

⚠️ Doistbot hit an error while reviewing this PR:

Unprocessable Entity: "Line could not be resolved and Line could not be resolved" - https://docs.github.com/rest/pulls/reviews#create-a-review-for-a-pull-request

Please, try the command again or contact the team maintaining the bot.

@gnapse gnapse force-pushed the ernesto/inbox-state-undo branch from ce947f1 to 71daa16 Compare March 3, 2026 22:42
@gnapse gnapse force-pushed the ernesto/inbox-state-undo branch from 0c70fc3 to 02b29b4 Compare March 3, 2026 22:50
@gnapse gnapse self-assigned this Mar 3, 2026
@craigcarlyle craigcarlyle removed their request for review March 5, 2026 03:55
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