Skip to content

feat:Pollencount: hide when low option#588

Merged
tavdog merged 3 commits into
mainfrom
pollencount-hide-when-low
Jul 20, 2026
Merged

feat:Pollencount: hide when low option#588
tavdog merged 3 commits into
mainfrom
pollencount-hide-when-low

Conversation

@tavdog

@tavdog tavdog commented Jul 19, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added a “Minimum Level to Show” setting for pollen counts.
    • Pollen information can now be hidden when all levels are below the selected threshold.
    • Updated setup guidance to require a Google Maps Platform API key with the Pollen API enabled.

tavdog and others added 3 commits July 19, 2026 16:44
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>
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

Pollen threshold configuration

Layer / File(s) Summary
Threshold configuration contract
apps/pollencount/manifest.yaml, apps/pollencount/pollen_count.star
The manifest credential guidance and timestamp are updated, and the app schema adds a “Minimum Level to Show” dropdown with five threshold options and a default of "0".
Threshold-based screen filtering
apps/pollencount/pollen_count.star
main() reads the configured threshold and today’s pollen counts, while shouldHideBelowMinLevel() treats missing categories as zero, preserves error responses, and hides the app when all indexes are below the threshold.

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change by describing the new hide-when-low option for Pollencount.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pollencount-hide-when-low

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/pollencount/pollen_count.star (1)

230-243: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add 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 main returns 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

📥 Commits

Reviewing files that changed from the base of the PR and between 75495a4 and da1637a.

📒 Files selected for processing (2)
  • apps/pollencount/manifest.yaml
  • apps/pollencount/pollen_count.star

@tavdog
tavdog merged commit 96e64e6 into main Jul 20, 2026
5 checks 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.

1 participant