Skip to content

[Bug] Book detail freezes the browser when reading progress spans a DST fall-back #129

Closed

Description

@gitturtle697

v1.12.0.

When a book’s progress chart spans the US DST end (2026-11-01 01:00–02:00, America/New_York), opening the book detail dialog hangs the main thread (Firefox and Chromium-based browsers, desktop and Android).

Repro: Device time zone America/New_York, profile time zone America/New_York. Book started 2026-10-31 18:59 UTC, with progress entries on 2026-10-31 and 2026-11-01 17:04 UTC. Open the book and the tab hangs. The same data shifted to Oct 20–21 works fine.

Cause: In the Chart.js date adapter in frontend/src/lib/chartjs/register.ts, startOf('hour') and add(n, 'hour') go through dayjs.utc(t).tz(tz). Inside the repeated hour this goes backwards or never advances. For example, startOf('hour') of 2026-11-01T06:30Z returns 05:00Z. With a device in New York, add(1,'hour') from 05:00Z returns 05:00Z again. So Chart.js’s tick loop never ends. Making sub-day units (millisecond/second/minute/hour) never return a time earlier than the input, or doing that arithmetic on the epoch value, fixes it locally.

Related: If the profile time zone is set to UTC, it gets overwritten with the detected zone on the next login (login/+page.svelte, auth/oidc/callback/+page.svelte), so users can’t use UTC to work around this.

Activity

  1. changed the title [-]Book detail freezes the browser when reading progress spans a DST fall-back[/-] [+][Bug] Book detail freezes the browser when reading progress spans a DST fall-back[/+] on Nov 3, 2026
  2. codebude commented on Nov 3, 2026

    @codebude
    Owner

    Hi @gitturtle697 will have a look into it later today. Usually this should be covered by a test case and my test suite returned no errors. But I'm confident to find it. Thanks for your bug report.

  3. self-assigned this
    on Nov 3, 2026
  4. gitturtle697 commented on Nov 3, 2026

    @gitturtle697
    Author

    Thanks for looking into it, @codebude . I appreciate your time and effort, and thanks for making a great app!

  5. codebude commented on Nov 3, 2026

    @codebude
    Owner

    Hi @gitturtle697, this is fixed now in #130 . Thanks again for the very detailed report and for pointing at the chart adapter, that saved me quite some time.

    The fix is in #130 and merged into develop. It will be part of the upcoming v1.12.1 patch release which I'm preparing right now and will publish in the next 30 minutes.

    If you can, please give it a try once it is available and let me know if anything still reproduces.

  6. gitturtle697 commented on Nov 3, 2026

    @gitturtle697
    Author

    Will do, @codebude ! I'll check later this evening and will report back. Thank yiu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions