Add filter for attachments - #100
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughAdds an optional has_attachment filter across stack: schema field and validator, Gmail query builder handling, frontend input and payload wiring, UI select for attachment presence, and documentation update. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant UI as Filter UI
participant JS as Frontend JS
participant API as Backend API
participant Service as Gmail Service
participant Gmail as Gmail
User->>UI: choose attachment filter ("Has"/"No"/"Any")
UI->>JS: read `filterAttachment`
JS->>JS: assemble filter object (includes `has_attachment`)
JS->>API: submit filters
API->>Service: pass filters
Service->>Service: build Gmail query (append has:attachment or -has:attachment)
Service->>Gmail: execute query / return built query
API->>JS: return results
JS->>UI: render filtered emails
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/index.html (1)
168-168: Consider improving the wording for clarity.The phrase "has or doesn't have attachment" is slightly awkward. A cleaner alternative might be: "label, and attachment presence."
✏️ Suggested improvement
- <p class="text-[`#6B7A8F`] leading-relaxed">Filter by age (7d, 30d, 90d), size (1MB, 5MB, 10MB), category (Promotions, Social, Updates), label and has or doesn't have attachment.</p> + <p class="text-[`#6B7A8F`] leading-relaxed">Filter by age (7d, 30d, 90d), size (1MB, 5MB, 10MB), category (Promotions, Social, Updates), label, and attachment presence.</p>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/index.html` at line 168, Update the wording in the paragraph element with class "text-[`#6B7A8F`] leading-relaxed" to replace the awkward phrase "has or doesn't have attachment" with a clearer alternative such as "label, and attachment presence" so the sentence reads: "Filter by age (7d, 30d, 90d), size (1MB, 5MB, 10MB), category (Promotions, Social, Updates), label, and attachment presence."
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/index.html`:
- Line 168: Update the wording in the paragraph element with class
"text-[`#6B7A8F`] leading-relaxed" to replace the awkward phrase "has or doesn't
have attachment" with a clearer alternative such as "label, and attachment
presence" so the sentence reads: "Filter by age (7d, 30d, 90d), size (1MB, 5MB,
10MB), category (Promotions, Social, Updates), label, and attachment presence."
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
app/models/schemas.pyapp/services/gmail/helpers.pydocs/index.htmlstatic/js/filters.jstemplates/index.html
Description
This adds a filter for whether emails have or do not have attachments, with the default option of "Any"
Checklist
Related Issues
Fixes #99