Skip to content

Add US Live Flood Gauges (geolibre-flood-gauges) 0.4.1 - #49

Merged
giswqs merged 3 commits into
opengeos:mainfrom
chuofringer:add-geolibre-flood-gauges-0.4.1
Aug 20, 2026
Merged

Add US Live Flood Gauges (geolibre-flood-gauges) 0.4.1#49
giswqs merged 3 commits into
opengeos:mainfrom
chuofringer:add-geolibre-flood-gauges-0.4.1

Conversation

@chuofringer

@chuofringer chuofringer commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Adds US Live Flood Gauges — a live layer of 10,000+ NOAA/NWPS river and coastal flood gauges, by the team behind flood.live. This is the plugin discussed with the maintainer in GeoLibre#2009.

What it does

  • Flood-category circle symbology (NOAA action/minor/moderate/major colors), refreshed every 30 minutes with change-detection so unchanged data never touches the layer store.
  • An H3 flood overview at low zoom: only regions with active flood conditions light up, colored by worst status; hexes ease in on click, raw dots take over from zoom 6.
  • Per-gauge floating panel: category badge, observed stage on a colored stage bar, staleness tiers, uPlot hydrograph (observed/forecast + threshold lines), NOAA source + life-safety disclaimer.
  • ?flood-gauge=<LID> deep links; project-state save/restore; full teardown on deactivate.

Checklist against the contributing rules

  • Built from geolibre-plugin-template; single self-contained ESM entry, default + named plugin export, id/name/version match plugin.json; no activeByDefault; CSS fully .fg--prefixed and theme-token based.
  • plugins/geolibre-flood-gauges/ committed as emitted, then npm run minify run locally (fork PRs can't receive the workflow push); npm run minify:check and node scripts/validate_plugins.mjs both pass locally.
  • Registry entry with relative manifestUrl, minGeoLibreVersion: "2.0.0" — CI-tested in our repo with a Playwright suite against pinned v2.0.0 and v2.6.0 web builds, plus current main.
  • docs/plugins.md regenerated via generate_plugins_page.py.

Source & QA: https://github.com/chuofringer/geolibre-flood-gauges — MIT, 137 unit/host-contract tests, e2e smoke (deep link, refresh-in-place, basemap-switch survival), weekly live-NOAA canary, tagged releases with the packaged zip.

Happy to adjust anything in review. First-time contributor here, so a maintainer /claude-review is needed per the repo's setup.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added the US Live Flood Gauges plugin, providing NOAA/NWPS flood-gauge information with trend and hydrograph visualizations.
    • Added styling for gauge panels, status indicators, charts, dark mode, and error states.
    • Expanded the plugin registry with AORCtoDSS, Flowmaps.gl, Open Climate Service, and US Live Flood Gauges.
    • Added the flood-gauge plugin to the registry with setup details and access links.
  • Documentation

    • Updated the plugin registry documentation to list 10 available plugins.

Live NOAA/NWPS river and coastal gauge layer by flood.live: flood-category
symbology, H3 flood overview at low zoom, per-gauge hydrograph panel, and
?flood-gauge= deep links. Bundle committed as emitted then whitespace-
minified with npm run minify (fork PRs run it themselves per README);
validate_plugins.mjs passes locally; docs/plugins.md regenerated.
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e275b5a8-1815-45ae-b7a7-20733039e95b

📥 Commits

Reviewing files that changed from the base of the PR and between a1eb353 and 87575ee.

📒 Files selected for processing (1)
  • plugin-registry.json

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Important

Approval pending

CodeRabbit has no unresolved comments, but it has not reviewed the latest commit.

Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The registry now lists four additional plugins. The US Live Flood Gauges plugin adds a manifest and stylesheet. The registry metadata includes the new plugin entry.

Changes

Plugin registry expansion

Layer / File(s) Summary
Flood gauges plugin package
plugins/geolibre-flood-gauges/plugin.json, plugins/geolibre-flood-gauges/style.css
Adds the US Live Flood Gauges manifest, entry files, flood-gauge description, panel styling, status states, dark-theme rules, and chart defaults.
Registry metadata and formatting
plugin-registry.json
Adds the geolibre-flood-gauges registry entry and replaces an escaped apostrophe with a literal apostrophe.
Marketplace plugin listings
docs/plugins.md
Updates the registry count and adds cards for AORCtoDSS, Flowmaps.gl, Open Climate Service, and US Live Flood Gauges.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 87575

The PR adds the flood-gauge plugin and registry documentation with no actionable merge-blocking risk identified at the current head.

Suggested reviewers: giswqs, helsharif

Poem

A rabbit checks the plugin rows,
Four new cards appear in shows.
Flood gauges bloom with charts and style,
Registry paths extend a mile.
“Hop approved!” the rabbit sings.

🚥 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 clearly identifies the added US Live Flood Gauges plugin and its version, matching the main change in the pull request.
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

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.

❤️ Share

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

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://opengeos.org/pages-preview/geolibre-plugins/pr-49/

Built to branch gh-pages at 2026-08-20 16:17 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@chuofringer

Copy link
Copy Markdown
Contributor Author

@giswqs ready for review. Fully built by agents (ported some of flood.live functions, so pretty straightforward).

@giswqs

giswqs commented Aug 20, 2026

Copy link
Copy Markdown
Member

/claude-review

@giswqs

giswqs commented Aug 20, 2026

Copy link
Copy Markdown
Member

@chuofringer Amazing work! Thank you for your contribution.

image

Comment thread plugin-registry.json Outdated
Comment thread plugins/geolibre-flood-gauges/style.css Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Code review

I reviewed the diff (docs/plugins.md, plugin-registry.json, and the new plugins/geolibre-flood-gauges/{index.js,plugin.json,style.css}), checked the new plugin's structural contract (id/name/version consistency between plugin.json and the bundled index.js, presence of activate/deactivate, absence of activeByDefault) against docs/develop.md/docs/registry.md and scripts/validate_plugins.mjs, and static-scanned the 322 KB minified index.js bundle for common injection/exfiltration patterns.

Bugs: None found. The plugin's activate/deactivate exports are present, id/name/version match across plugin.json, the registry entry, and the bundle, and docs/plugins.md was regenerated correctly (alphabetical order, plugin count 10 is accurate).

Security: No injection or exfiltration issues found (medium confidence — logic review of a 322 KB single-line minified bundle is inherently limited to pattern-matching). No eval/new Function/innerHTML/document.write, no localStorage/cookie/postMessage misuse, no hardcoded secrets. The only network endpoints referenced are api.water.noaa.gov, mapservices.weather.noaa.gov, and flood.live, matching the PR's stated NOAA/NWPS data sources. activeByDefault is correctly absent, consistent with the "external plugins must not set activeByDefault" rule.

Performance: None found — nothing in the diff itself (registry JSON, docs, manifest, CSS) raises performance concerns; the plugin's internal refresh/change-detection logic described in the PR body isn't independently verifiable from a minified bundle.

Quality:

  • plugin-registry.json reformats the categories array of all 9 pre-existing entries from single-line to one-item-per-line, in addition to adding the new entry — likely from re-serializing the whole file with a script rather than hand-editing. This triples the diff size, obscures the actual change, and doesn't match the single-line style still shown in docs/registry.md's own example. (Medium confidence — see inline comment.)
  • style.css ships the bundled uPlot library's default stylesheet with unscoped selectors (.uplot, .u-legend, .u-select, .u-cursor-x, etc.) that don't carry the .fg- prefix used elsewhere, despite the PR description claiming "CSS fully .fg--prefixed." Since plugin CSS is injected globally, these generic class names risk colliding with other plugins/host elements. (Medium-high confidence — see inline comment.)
  • Minor: several status/trend colors in style.css are hardcoded hex rather than GeoLibre design tokens (other registry plugins use hsl(var(--destructive, ...))-style tokens for similar status colors), so they won't follow a custom theme. Low-medium confidence, may be intentional for standardized NOAA flood-category colors.

CLAUDE.md: No CLAUDE.md file exists in this repository, so there are no project-specific guidelines to check against.

- Scope the bundled uPlot vendor stylesheet under `.fg-hydrograph` so the
  plugin's globally-injected CSS no longer defines unprefixed generic class
  names (`.uplot`, `.u-legend`, `.u-select`, `.u-axis`, `.u-cursor-*`, ...)
  that could collide with the host app or another plugin bundling uPlot.
  All 26 vendor rules are prefixed; the plugin's own `.fg-` rules are
  unchanged. Safe because the uPlot instance is constructed with the
  `div.fg-hydrograph` container as its target, so every element uPlot
  creates lives inside that subtree.
@giswqs
giswqs merged commit 3674d43 into opengeos:main Aug 20, 2026
6 of 7 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.

2 participants