Add a last-24-hours filter to the map #154

Merged
aluminum-ice merged 1 commit from map-last-24h into main 2026-11-02 02:57:22 +00:00
Owner

What this PR does

Adds a Last 24 hours filter to the map plugin, beside Last 7 days. Both time filters go by when a location was recorded or estimated.

With five options, the filter row has no room left for Reset view on a phone. Reset view moves onto the map, as a control in its top-left corner; the north arrow already holds the top-right. It shows only when the map is zoomed or moved, keeps the current filter, and stays put while you drag. It is a 44 px-tall touch target: white over the map tiles, and the page's own card colours without them.

Each filter option now keeps its words together, so a narrow phone wraps the row between options, never inside one.

Checklist

  • Lint passes — make lint (ansible --syntax-check, yamllint, shellcheck --severity=error, and the real-data check). The Lint workflow runs this on the PR.
  • Tests pass — make test (the kestrel_pi pytest suite and the real-data check's tests). The Test workflow runs this on the PR.
  • Nothing real: no secrets, no personal information, no real data. Tests use the existing placeholder MACs and generic coordinates.
  • Consent gates intact. map stays local-only, with no ack; nothing about capture or network plugins changes.
  • Docs updated in the same PR: GUIDE_MD and docs/user-guide/map.md (the new filter, and where Reset view now is).
  • Commit messages are short and imperative.

Release impact

  • App-layer-safe — changes only plugins/map.py and the kestrel_pi package (userguide.py); tests and docs aside.
  • Reflash-class

Notes for review

  • Tests: the test store's estimate is now 3 days old. That lets one store show each filter's cut: Last 7 days keeps 2 of 3 networks, Last 24 hours keeps 1. Another test checks that Reset view is on the map (once per rendering), not in the filter row, and keeps the filter.
  • Screenshots: I rendered the page from the guide fixture at 430 pt and 375 pt.
    • At 430 pt, the five options fit on one line, with Reset view on the map.
    • At 375 pt, the row wraps between options.
    • The guide's existing phone-map figure will show the new filter row once this ships in a stable release.
    • No new figure is added.
  • One trade-off: like the north arrow, the control can cover a marker in its corner; a drag moves the marker out from under it.

🤖 Generated with Claude Code

## What this PR does Adds a **Last 24 hours** filter to the map plugin, beside Last 7 days. Both time filters go by when a location was recorded or estimated. With five options, the filter row has no room left for **Reset view** on a phone. Reset view moves onto the map, as a control in its top-left corner; the north arrow already holds the top-right. It shows only when the map is zoomed or moved, keeps the current filter, and stays put while you drag. It is a 44 px-tall touch target: white over the map tiles, and the page's own card colours without them. Each filter option now keeps its words together, so a narrow phone wraps the row between options, never inside one. ## Checklist - [x] **Lint passes** — `make lint` (ansible `--syntax-check`, `yamllint`, `shellcheck --severity=error`, and the real-data check). The **Lint** workflow runs this on the PR. - [x] **Tests pass** — `make test` (the `kestrel_pi` pytest suite and the real-data check's tests). The **Test** workflow runs this on the PR. - [x] **Nothing real: no secrets, no personal information, no real data.** Tests use the existing placeholder MACs and generic coordinates. - [x] **Consent gates intact.** `map` stays local-only, with no ack; nothing about capture or network plugins changes. - [x] **Docs updated in the same PR**: `GUIDE_MD` and `docs/user-guide/map.md` (the new filter, and where Reset view now is). - [x] Commit messages are short and imperative. ## Release impact - [x] **App-layer-safe** — changes only `plugins/map.py` and the `kestrel_pi` package (`userguide.py`); tests and docs aside. - [ ] **Reflash-class** ## Notes for review - **Tests:** the test store's estimate is now 3 days old. That lets one store show each filter's cut: Last 7 days keeps 2 of 3 networks, Last 24 hours keeps 1. Another test checks that Reset view is on the map (once per rendering), not in the filter row, and keeps the filter. - **Screenshots:** I rendered the page from the guide fixture at 430 pt and 375 pt. - At 430 pt, the five options fit on one line, with Reset view on the map. - At 375 pt, the row wraps between options. - The guide's existing `phone-map` figure will show the new filter row once this ships in a stable release. - No new figure is added. - **One trade-off:** like the north arrow, the control can cover a marker in its corner; a drag moves the marker out from under it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add a last-24-hours filter to the map and put Reset view on the map
All checks were successful
Test / test (push) Successful in 32s
Lint / lint (push) Successful in 33s
Test / test (pull_request) Successful in 32s
Lint / lint (pull_request) Successful in 33s
538f3b0186
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Rendered from this branch with the guide's demo fixture (invented data) on an iPhone 14 Pro Max: a 430 × 932 pt screen at 2x, dark mode, framed like the guide's shots.

Whole map: no Reset view Zoomed in: Reset view on the map Last 24 hours, zoomed in
The map page showing every located network, with the five filter options on one line and no Reset view The map zoomed in, with a Reset view button in its top-left corner The map with the Last 24 hours filter selected and Reset view on the map

The demo's locations are all an hour old, so Last 24 hours shows the same markers as All here; the tests cover the cut itself.

Rendered from this branch with the guide's demo fixture (invented data) on an iPhone 14 Pro Max: a 430 × 932 pt screen at 2x, dark mode, framed like the guide's shots. | Whole map: no Reset view | Zoomed in: Reset view on the map | Last 24 hours, zoomed in | | --- | --- | --- | | ![The map page showing every located network, with the five filter options on one line and no Reset view](https://git.3ntropy.io/attachments/36d62808-e337-4b6c-9e20-ac1fe8906a75) | ![The map zoomed in, with a Reset view button in its top-left corner](https://git.3ntropy.io/attachments/de425cac-1dcb-4ab5-9ddf-6c5f1847d3c6) | ![The map with the Last 24 hours filter selected and Reset view on the map](https://git.3ntropy.io/attachments/e1fa6f69-c78a-44f8-bc7c-fbe335debe94) | The demo's locations are all an hour old, so Last 24 hours shows the same markers as All here; the tests cover the cut itself.
aluminum-ice deleted branch map-last-24h 2026-11-02 02:57:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aluminum-ice/kestrel!154
No description provided.