fix(drive,gmail): pass through Drive filters + encode non-ASCII headers#266
fix(drive,gmail): pass through Drive filters + encode non-ASCII headers#266
Conversation
…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 #254, fixes #255 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25b1fe338e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| driveSearchHasPattern = regexp.MustCompile(`(?i)\b(?:properties|appProperties)\b\s+has\s+\{`) | ||
| // Only treat as "already constrained" when the query contains a real trashed predicate, | ||
| // not just the word inside a quoted literal (e.g. "name contains 'trashed'"). | ||
| driveTrashedPredicatePattern = regexp.MustCompile(`(?i)\btrashed\b\s*(?:=|!=)\s*(?:true|false)\b`) |
There was a problem hiding this comment.
Exclude quoted text when matching trashed predicates
driveTrashedPredicatePattern also matches trashed = true|false inside quoted literals, so a filter like name contains 'trashed = true' is treated as already constrained and buildDriveSearchQuery skips appending and trashed = false. In that scenario, trashed files are returned even though the user never set a trashed predicate, which regresses the default behavior this change is trying to preserve.
Useful? React with 👍 / 👎.
…rs (openclaw#266) * fix(drive,gmail): pass-through filter queries and encode non-ASCII headers 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> * fix(drive,gmail): tighten trashed predicate detection * chore(lint): silence goconst for auth services * fix(auth): avoid goconst on services=all --------- Co-authored-by: salmonumbrella <182032677+salmonumbrella@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Supersedes #260 (cross-repo fork; conflict).
trashed = falseunless explicitly constrained (predicate-only detection).From/To/Cc/Bcc/Reply-To.Fixes #254, fixes #255.
Test:
make ci