Skip to content

Testing#2

Merged
DorkSoul merged 8 commits into
mainfrom
testing
Jun 19, 2026
Merged

Testing#2
DorkSoul merged 8 commits into
mainfrom
testing

Conversation

@DorkSoul

Copy link
Copy Markdown
Owner

No description provided.

DorkSoul and others added 8 commits May 9, 2026 11:03
- Check download_queue after poll loop exits (not just during it), so a
  download that started just before the browser was closed by
  _ensure_chrome_closed is still recorded as download_started instead of
  reverting to active and eventually spawning duplicate downloads
- Use get_download_status (lock-protected) in _is_download_active instead
  of direct dict access to avoid a TOCTOU race with stop_download
- Clear next_check when a download stops so the scheduler re-checks on
  the very next tick; previously next_check was left at its original value
  (capped at end_dt), causing the scheduler to miss the resume window
  entirely when a stream crashed near the end of the time window

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Scheduler now stores IANA timezone per schedule and uses zoneinfo for
  DST-correct window comparisons; timezone sent from browser via Intl API
- Replace native time inputs with custom TimePicker: 4 digit inputs (HH:MM)
  with auto-advance and backspace navigation
- SVG analog clock face (24h, two-ring) for hour/minute selection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… narrow displays

- Starting a browser or direct download now auto-pauses all active
  schedules; they auto-resume when the browser is closed or download stops
- TimePicker popover repositions itself after render if it clips the right
  or left viewport edge; CSS max-width prevents overflow on portrait screens

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Store next_check as UTC ISO with Z suffix (e.g. 2026-06-18T10:28:00Z)
so JavaScript's Date() automatically converts to the browser's local
timezone. Previously, naive datetime strings were stored which JS
treated as local time — schedules without a timezone field (created
before the DST fix) produced UTC wall-clock strings that displayed
1 hour behind in BST.

Also update _parse_dt to handle aware/naive mixed comparisons, and fix
move_to_next_slot to use timezone-correct datetime construction.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Stop click propagation on the popover div itself so any click that
reaches the document listener is guaranteed to be outside the picker.
Previously the contains() check could fail for detached SVG elements
after clock redraws, leaving the popover stuck open.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removing stopPropagation from the display button lets the click bubble
to the document, triggering any other open picker's outside-click
listener. The setTimeout(0) delay on registering the listener already
prevents the opening click from immediately re-closing the new picker.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… restart

Two bugs fixed:

1. Race condition (black screen): pause_all_for_manual was called after
   browser_service.start_browser, so queued scheduled checks could still
   fire _ensure_chrome_closed and kill the user's just-started browser.
   Now the pause runs BEFORE the browser starts, and the browser service
   queue processor drops in-flight scheduled launches immediately via the
   new _manual_active flag.

2. Schedules stuck paused after abnormal close: the old code wrote
   paused:True to disk, so if the tab was closed without hitting the close
   button the schedules stayed paused across restarts. Replaced with an
   auto_paused flag that is never persisted; load_schedules strips it on
   startup, guaranteeing a clean state after any restart.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DorkSoul
DorkSoul merged commit 31d5b07 into main Jun 19, 2026
1 check 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