Skip to content

follow-ups from batch review: drawer header contrast, Live heat sync, RX days race, IATA interval overflow #150

Description

@dborup

Summary

Small follow-ups found by the second review round of the issue batch (#109–#126). None blocks anything; each is a few lines plus a test. Line numbers refer to master ddae955a.

1. Nav drawer header is unreadable in the light theme (pre-existing)

.nav-drawer-header uses background: var(--surface-2, var(--surface)) (public/style.css, around line 5088), which is white in the light theme, while the title uses --nav-text, also white. "NAVIGATE" is invisible in light mode; dark mode is fine (rgb(35,35,64) background). Measured on master and on #142's branch.

  • Fix: give the header the nav background (or give the title a text colour that contrasts with --surface-2), via existing CSS variables.
  • Test: computed contrast between header background and title colour in both themes.

2. Live: Heat checkbox can disagree with the heat layer (from #135)

With Matrix and Heat both saved as on, turning Matrix off during page init leaves the Heat checkbox unchecked while the heat layer is shown. syncHeatToggleToMatrix(false) (public/live.js, around line 1206) only re-enables the checkbox; applyLiveControlEffects() follows heatEnabled.

  • Fix: in the else branch set ht.checked = heatEnabled as well.
  • Tests: this case; and a regression test for the double-listener bug fix(live): wire every persisted view toggle before Live init awaits #135 fixed, which only shows when Live is left before init's awaits finish (master: 2 listeners on 8 of 9 toggles, one click writes localStorage twice). The current "three SPA round trips" test also passes on master.

3. RX Coverage: a stale days response can win (pre-existing)

Switching days quickly (setDays, public/rx-coverage.js, around line 211) starts new coverage/leaderboard fetches without invalidating the previous ones, so an older, slower response can render last.

4. Ingestor: huge iataWarnIntervalSec overflows (from #134)

IATAWarnInterval() (cmd/ingestor/iata_drop_warn.go, around line 55) returns time.Duration(c.IATAWarnIntervalSec) * time.Second; a very large value (e.g. 1e10) overflows to a negative duration, so every dropped message is logged, which is the log flood the throttle exists to prevent.

  • Fix: clamp to a sane maximum (e.g. 24 h) and document it.
  • Tests: overflow value, and the untested oldest optimisation with staggered timestamps (two mutants survived the current tests).

Acceptance criteria

  • Each item has a test that fails on master and passes with the fix.
  • No behaviour change beyond the four items; existing suites stay green.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions