feat:Pollencount: hide when low option#588
Conversation
Skip rendering when all pollen types are very low (0) if enabled, and remove the outdated Tomorrow.io reference from the app description. Co-authored-by: Cursor <cursoragent@cursor.com>
Let users choose the lowest pollen level worth showing, hiding the app when all types fall below that threshold. Co-authored-by: Cursor <cursoragent@cursor.com>
📝 WalkthroughWalkthroughThe pollen-count app adds a configurable minimum pollen level that hides the rendered app when all pollen categories are below the threshold. The manifest now documents Google Maps Platform Pollen API key requirements and updates its metadata timestamp. ChangesPollen threshold configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant AppConfig
participant main
participant PollenAPI
participant Screen
AppConfig->>main: provide min_level
main->>PollenAPI: fetch today's pollen counts
PollenAPI-->>main: return pollen indexes
main->>Screen: return [] when all indexes are below min_level
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/pollencount/pollen_count.star (1)
230-243: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd boundary coverage for the hide predicate.
Please cover disabled thresholds, error payloads, missing pollen types, exact-threshold equality, and all values below the threshold; this helper determines whether
mainreturns an empty screen.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/pollencount/pollen_count.star` around lines 230 - 243, Extend coverage for shouldHideBelowMinLevel and its main integration to verify disabled thresholds do not hide, message payloads remain visible, missing pollen types count as zero, any pollen type exactly at min_level remains visible, and all pollen values below a positive threshold produce an empty screen.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/pollencount/pollen_count.star`:
- Around line 230-243: Extend coverage for shouldHideBelowMinLevel and its main
integration to verify disabled thresholds do not hide, message payloads remain
visible, missing pollen types count as zero, any pollen type exactly at
min_level remains visible, and all pollen values below a positive threshold
produce an empty screen.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7c3f4a62-2c19-419b-9365-95e5973d8395
📒 Files selected for processing (2)
apps/pollencount/manifest.yamlapps/pollencount/pollen_count.star
Summary by CodeRabbit