Skip to content

feat(app): give the time window the map's presets - #574

Merged
efiten merged 2 commits into
efiten:masterfrom
khagele:feat/557-time-windows
Sep 8, 2026
Merged

feat(app): give the time window the map's presets#574
efiten merged 2 commits into
efiten:masterfrom
khagele:feat/557-time-windows

Conversation

@khagele

@khagele khagele commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Closes #557

The problem

The filter sheet offered four windows: 10 min, 30 min, 1 h and All time. A hunt that ran the whole afternoon had no window that fit: 1 h cut it off, All time buried it under a week of history. The map already had twelve quick ranges.

My changes in this PR

  • One list for both surfaces. timewindows.js holds the ten rolling windows, 5 minutes to 7 days, as { token, label }. It is copied byte-for-byte into app/src/ and web/, the same shape as the other shared modules, and web/parity.test.js pins the two copies.
  • App. The select is built from that list plus All time. 10 min drops in favour of 5 and 15 minutes. The default stays 30 minutes.
  • Map. QUICK_RANGES is built from the same list as "Last …", with Today and Last 30 days added where they were. Nothing changes on screen; the label pin now runs through the shared file.
  • Changelog entry in both copies.

What stays map-only, as the issue decided: Today (anchored to midnight, the app's window rolls) and Last 30 days (past the app's 7-day retention). Absolute from/to stays map-only too.

Verification

Suite Result
app vitest 900 passed, build clean
web vitest 511 passed
web e2e, --fail-on-flaky-tests 199 passed, exit 0
eslint app + web clean

Six mutation checks, each red on exactly one test: a hand-typed label in timerange.js, a comment edited in one copy, 30 minutes dropped (the default), 30 days added (past retention), two entries swapped, and windowMs returning 0 for junk.

Browser, 375x812: the sheet lists the eleven options, opens on 30 minutes, and picking 3 hours marks the row active.

Overlap with open PRs

#573 moves this select into app/src/filtersheet.js. Whichever merges second moves one block; the list and the tests are untouched by that.

🤖 Generated with Claude Code

khagele and others added 2 commits September 4, 2026 14:28
The filter sheet offered 10 min, 30 min, 1 h and All time, so a hunt
that ran the whole afternoon had no window that fit (efiten#557). The map
already had twelve quick ranges.

Both surfaces now build their lists from one file, timewindows.js,
copied byte-for-byte into app/src/ and web/ and pinned in
web/parity.test.js. The app's select lists 5 minutes to 7 days in ten
steps plus All time. The map's quick ranges are the same ten as
"Last ...", plus Today and Last 30 days, which stay map-only: one is
anchored to midnight, the other reaches past the app's 7-day
retention. 10 min drops in favour of 5 and 15 minutes. The default
stays 30 minutes.

Verified: app 900 unit tests and build, web 511 unit tests, 199 e2e
with --fail-on-flaky-tests, eslint clean on both. Every new test
mutation-checked.

Closes efiten#557

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The conflict was the changelog arrays only: master gained efiten#569's entry at
the top while this branch added its own. Both kept, newest first.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEhmD6grc51qBBDgTq89sQ
@efiten
efiten merged commit bfef541 into efiten:master Sep 8, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 8, 2026
efiten added a commit to khagele/core-hunter that referenced this pull request Sep 8, 2026
Conflicts were the changelog arrays and the tail of web/parity.test.js,
where master (efiten#574) and this branch each appended a describe block. Both
kept in both files; 61 parity tests pass locally.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEhmD6grc51qBBDgTq89sQ
efiten added a commit to khagele/core-hunter that referenced this pull request Sep 8, 2026
The conflict was the changelog arrays only: master gained efiten#574's and
efiten#580's entries while this branch added its own. Both kept, newest first.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEhmD6grc51qBBDgTq89sQ
efiten added a commit to khagele/core-hunter that referenced this pull request Sep 8, 2026
Conflicts were the changelog arrays and the tail of web/parity.test.js,
where master (efiten#574, efiten#580) and this branch each appended a describe block.
Both kept in all three files; 64 parity tests pass locally.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEhmD6grc51qBBDgTq89sQ
This was referenced Sep 8, 2026
efiten pushed a commit that referenced this pull request Sep 9, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>app: 1.25.0</summary>

##
[1.25.0](app-v1.24.0...app-v1.25.0)
(2026-09-08)


### Features

* **app,web:** mark the About and What's new links that leave the app
([#589](#589))
([f14d205](f14d205))
* **app:** give auto-discover a duty floor from the airtime the last
cycle spent ([#581](#581))
([6450c3c](6450c3c))
* **app:** give the time window the map's presets
([#574](#574))
([bfef541](bfef541))
* **landing,app,web:** link the FAQ from both About tabs, and give every
question an anchor
([#580](#580))
([ae1410c](ae1410c))


### Bug Fixes

* **app:** stop the parked tone that stood in for the bed while
backgrounded ([#569](#569))
([0d595f8](0d595f8))
</details>

<details><summary>web: 1.21.0</summary>

##
[1.21.0](web-v1.20.0...web-v1.21.0)
(2026-09-08)


### Features

* **app,web:** mark the About and What's new links that leave the app
([#589](#589))
([f14d205](f14d205))
* **app:** give auto-discover a duty floor from the airtime the last
cycle spent ([#581](#581))
([6450c3c](6450c3c))
* **app:** give the time window the map's presets
([#574](#574))
([bfef541](bfef541))
* **landing,app,web:** link the FAQ from both About tabs, and give every
question an anchor
([#580](#580))
([ae1410c](ae1410c))


### Bug Fixes

* **app:** stop the parked tone that stood in for the bed while
backgrounded ([#569](#569))
([0d595f8](0d595f8))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

app: the time window offers nothing between 1 hour and all time

2 participants