Skip to content

Conversation

@omriariav
Copy link
Owner

Summary

  • Fix gmail list: Returns explicit thread_id, message_id (latest message), and message_count instead of ambiguous id field that was a thread ID but expected as message ID by downstream commands
  • Add gmail thread command: Read full conversation using threads.get with all messages, headers, and bodies
  • Bump version to 1.0.1

Fixes #12gmail list returned thread IDs, but read/label/archive/trash expected message IDs, causing 404s on multi-message threads.

Test plan

  • Unit tests pass (go test ./...)
  • TestGmailThreadCommand_Help — command definition
  • TestGmailThread_MockServer — mock 2-message thread
  • TestGmailList_OutputFormat — validates new output shape
  • TestGmailCommands/thread — structure test
  • QA'd live: gmail list returns different thread_id/message_id for multi-message threads
  • QA'd live: gmail read with message_id from list succeeds
  • QA'd live: gmail thread shows full 7-message conversation

🤖 Generated with Claude Code

Fixes #12. gmail list now returns explicit thread_id and message_id
(latest message) so downstream commands (read, label, archive, trash)
receive the correct ID. Adds gmail thread command to read full
conversations. Bumps version to 1.0.1.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Owner Author

@omriariav omriariav left a comment

Choose a reason for hiding this comment

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

Claude Code Code Reviewer:

Overall the fix is clean and well-tested. Three items to address:

1. Missing skill documentation (required)

skills/gmail/SKILL.md and skills/gmail/references/commands.md don't document the new thread command. cmd/skills_test.go line 347 also needs "thread" added to the gmail subcommands list.

The skills test currently passes by accident — strings.Contains(content, "thread") matches the substring in existing "threads" text, but gws gmail thread isn't actually documented in the Quick Command Reference, Detailed Usage, or references.

Also update the list command documentation in SKILL.md to reflect the new output fields (thread_id, message_id, message_count instead of id).

2. Version should be 1.1.0, not 1.0.1

Renaming the id field → thread_id in gmail list JSON output is a breaking change for consumers. Combined with the new thread command, this is new functionality + breaking schema change → semver minor bump at minimum. Recommend 1.1.0 (not 2.0.0 since the old id field was effectively a bug).

3. CLAUDE.md Available Commands table (minor)

The gmail row in CLAUDE.md still shows list, read, send. Missing labels, label, archive, trash (v0.8.0) and now thread. Pre-existing but worth fixing alongside.

Fixes #12. gmail list now returns explicit thread_id and message_id
(latest message) so downstream commands (read, label, archive, trash)
receive the correct ID. Adds gmail thread command to read full
conversations.

- Update skill docs (SKILL.md, commands.md) with thread command and
  new list output fields
- Add thread to skills_test.go gmail subcommands
- Bump version to 1.1.0 (breaking output schema change + new command)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Owner Author

@omriariav omriariav left a comment

Choose a reason for hiding this comment

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

Claude Code Code Reviewer:

All three review items addressed:

  • ✅ Skill documentation updated (SKILL.md, references/commands.md, skills_test.go)
  • ✅ Version bumped to 1.1.0
  • ⏭️ CLAUDE.md commands table — pre-existing, fine to skip

Tests pass. LGTM.

Remove CLAUDE.md from .gitignore so project instructions are versioned.
Update gmail row (add thread, labels, label, archive, trash) and
calendar row (add update, delete, rsvp). Bump version to 1.1.0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Owner Author

@omriariav omriariav left a comment

Choose a reason for hiding this comment

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

Claude Code Code Reviewer:

CLAUDE.md now checked in with updated gmail commands (list, read, thread, send, labels, label, archive, trash) and version v1.1.0. All review items resolved. LGTM.

@omriariav omriariav merged commit f802037 into main Jan 27, 2026
1 check passed
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.

Gmail: thread/message ID mismatch causes 404 on multi-message threads

2 participants