Skip to content

fix(drive,gmail): pass-through filter queries and encode non-ASCII headers#260

Closed
salmonumbrella wants to merge 1 commit intoopenclaw:mainfrom
salmonumbrella:fix/issues-254-255
Closed

fix(drive,gmail): pass-through filter queries and encode non-ASCII headers#260
salmonumbrella wants to merge 1 commit intoopenclaw:mainfrom
salmonumbrella:fix/issues-254-255

Conversation

@salmonumbrella
Copy link
Copy Markdown
Contributor

Summary

  • Drive search now detects raw API filter syntax (field comparisons, contains, in membership, has property, sharedWithMe) and passes it through verbatim instead of wrapping in fullText contains. Plain-text searches always append trashed = false to prevent false positives when the search term contains the word "trashed".
  • Gmail MIME now RFC 2047-encodes display names with non-ASCII characters in From/To/Cc/Bcc/Reply-To headers using net/mail, fixing garbled headers.

Fixes #254, fixes #255

Test plan

  • Unit tests for buildDriveSearchQuery (plain text, filter pass-through, trashed already present, plain text containing "trashed")
  • Table-driven tests for looksLikeDriveFilterQuery (28 cases: filter syntax + natural language)
  • Integration test with httptest server for filter query pass-through
  • Tests for formatAddressHeader (UTF-8 display name, plain address, unparseable fallback)
  • Tests for formatAddressHeaders (mixed addresses, empty value filtering)
  • Full test suite passes (go test ./...)

🤖 Generated with Claude Code

…aders

Drive search now detects raw API filter syntax (field comparisons,
contains, membership, has) and passes it through instead of wrapping
in fullText contains. Plain-text searches always append trashed=false
to prevent false positives.

Gmail MIME now RFC 2047-encodes display names with non-ASCII characters
in From/To/Cc/Bcc/Reply-To headers using net/mail.

Fixes openclaw#254, fixes openclaw#255

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@steipete
Copy link
Copy Markdown
Collaborator

Landed via #266 (had to resolve cross-repo conflicts). Thanks @salmonumbrella.

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.

gog drive search returns folders but not files — gog drive ls works correctly UTF-8 double-encoding in From header display name

2 participants