From 8a08a69fde25e980f863330c6cdc865d0baac4b3 Mon Sep 17 00:00:00 2001 From: Maris Popens Date: Thu, 24 Sep 2026 13:52:18 +0300 Subject: [PATCH 1/2] fix(widgets): readable HARD in light mode, make tyre stints explicit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - HARD was hard-coded #f0f0f0 (white), invisible on a light theme. It now uses Glance's theme-aware color-highlight, same as the driver codes. - Each entry is a stint (time between pit-lane visits), not a tyre set - a driver can pit for a lap and go back out on the same set, so the same compound repeats. Consecutive same-compound stints are now grouped (HARD×12+4 = two HARD stints), and a legend says the numbers are laps and what a stint is. OpenF1's tyre_age_at_start only proves reuse when non-zero (0 can mean new or unknown), so sets can't be told apart reliably; the wording says "possibly the same set" rather than claiming. --- widgets/tyre-usage/f1_tyre_usage.yml | 36 +++++++--------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/widgets/tyre-usage/f1_tyre_usage.yml b/widgets/tyre-usage/f1_tyre_usage.yml index 8e5ac61..b137c2d 100644 --- a/widgets/tyre-usage/f1_tyre_usage.yml +++ b/widgets/tyre-usage/f1_tyre_usage.yml @@ -27,6 +27,7 @@

No tyre data yet - check back once a session starts.

{{ end }} {{ else }} +

Stints by compound - numbers are laps, and a stint runs between pit-lane visits, so HARD×12+4 is two HARD stints (12 then 4 laps), possibly the same set.

{{ if gt (len $fp1) 0 }}

Free Practice 1

@@ -35,10 +36,7 @@
  • {{ .String "driver" }} - {{ range .Array "stints" }} - {{ $c := .String "compound" }} - {{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}   - {{ end }} + {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }}
  • {{ end }} @@ -54,10 +52,7 @@
  • {{ .String "driver" }} - {{ range .Array "stints" }} - {{ $c := .String "compound" }} - {{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}   - {{ end }} + {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }}
  • {{ end }} @@ -73,10 +68,7 @@
  • {{ .String "driver" }} - {{ range .Array "stints" }} - {{ $c := .String "compound" }} - {{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}   - {{ end }} + {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }}
  • {{ end }} @@ -92,10 +84,7 @@
  • {{ .String "driver" }} - {{ range .Array "stints" }} - {{ $c := .String "compound" }} - {{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}   - {{ end }} + {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }}
  • {{ end }} @@ -111,10 +100,7 @@
  • {{ .String "driver" }} - {{ range .Array "stints" }} - {{ $c := .String "compound" }} - {{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}   - {{ end }} + {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }}
  • {{ end }} @@ -130,10 +116,7 @@
  • {{ .String "driver" }} - {{ range .Array "stints" }} - {{ $c := .String "compound" }} - {{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}   - {{ end }} + {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }}
  • {{ end }} @@ -149,10 +132,7 @@
  • {{ .String "driver" }} - {{ range .Array "stints" }} - {{ $c := .String "compound" }} - {{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}   - {{ end }} + {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }}
  • {{ end }} From eb887ab539771239b7d44abefe296c84499b9bd0 Mon Sep 17 00:00:00 2001 From: Maris Popens Date: Thu, 24 Sep 2026 13:54:33 +0300 Subject: [PATCH 2/2] fix(widgets): keep stint order, add per-stint hover detail Grouping same-compound stints hid the order they were run in, which is the useful part. Back to one chip per stint, in order, with a hover tooltip per stint ("Stint 2: HARD, 4 laps") and a legend saying numbers are laps and that a stint is the time between pit-lane visits (so the same compound can repeat, possibly on the same set - OpenF1 only proves reuse via a non-zero tyre_age_at_start, so sets cannot be told apart reliably). Render-tested on Glance 0.8.6 against a live paddock-api. --- widgets/tyre-usage/f1_tyre_usage.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/widgets/tyre-usage/f1_tyre_usage.yml b/widgets/tyre-usage/f1_tyre_usage.yml index b137c2d..e8a6706 100644 --- a/widgets/tyre-usage/f1_tyre_usage.yml +++ b/widgets/tyre-usage/f1_tyre_usage.yml @@ -27,7 +27,7 @@

    No tyre data yet - check back once a session starts.

    {{ end }} {{ else }} -

    Stints by compound - numbers are laps, and a stint runs between pit-lane visits, so HARD×12+4 is two HARD stints (12 then 4 laps), possibly the same set.

    +

    Stints in the order they were run - numbers are laps (hover a stint for details). A stint is the time between pit-lane visits, so the same compound can repeat.

    {{ if gt (len $fp1) 0 }}

    Free Practice 1

    @@ -36,7 +36,7 @@
  • {{ .String "driver" }} - {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }} + {{ range $i, $st := .Array "stints" }}{{ $c := $st.String "compound" }}{{ $n := $st.Int "laps" }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ $n }}  {{ end }}
  • {{ end }} @@ -52,7 +52,7 @@
  • {{ .String "driver" }} - {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }} + {{ range $i, $st := .Array "stints" }}{{ $c := $st.String "compound" }}{{ $n := $st.Int "laps" }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ $n }}  {{ end }}
  • {{ end }} @@ -68,7 +68,7 @@
  • {{ .String "driver" }} - {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }} + {{ range $i, $st := .Array "stints" }}{{ $c := $st.String "compound" }}{{ $n := $st.Int "laps" }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ $n }}  {{ end }}
  • {{ end }} @@ -84,7 +84,7 @@
  • {{ .String "driver" }} - {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }} + {{ range $i, $st := .Array "stints" }}{{ $c := $st.String "compound" }}{{ $n := $st.Int "laps" }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ $n }}  {{ end }}
  • {{ end }} @@ -100,7 +100,7 @@
  • {{ .String "driver" }} - {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }} + {{ range $i, $st := .Array "stints" }}{{ $c := $st.String "compound" }}{{ $n := $st.Int "laps" }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ $n }}  {{ end }}
  • {{ end }} @@ -116,7 +116,7 @@
  • {{ .String "driver" }} - {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }} + {{ range $i, $st := .Array "stints" }}{{ $c := $st.String "compound" }}{{ $n := $st.Int "laps" }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ $n }}  {{ end }}
  • {{ end }} @@ -132,7 +132,7 @@
  • {{ .String "driver" }} - {{ $prev := "" }}{{ range .Array "stints" }}{{ $c := .String "compound" }}{{ if eq $c $prev }}+{{ .Int "laps" }}{{ else }}{{ if $prev }}  {{ end }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ .Int "laps" }}{{ end }}{{ $prev = $c }}{{ end }} + {{ range $i, $st := .Array "stints" }}{{ $c := $st.String "compound" }}{{ $n := $st.Int "laps" }}{{ if eq $c "SOFT" }}{{ else if eq $c "MEDIUM" }}{{ else if eq $c "HARD" }}{{ else if eq $c "INTERMEDIATE" }}{{ else if eq $c "WET" }}{{ else }}{{ end }}{{ $c }}×{{ $n }}  {{ end }}
  • {{ end }}