mirror of
https://github.com/IAmTomShaw/f1-race-replay.git
synced 2026-05-09 08:25:56 +02:00
[PR #285] feat: add Lap Time Evolution chart with full race strategy analysis #273
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/f1-race-replay#273
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/IAmTomShaw/f1-race-replay/pull/285
Author: @4f4d
Created: 4/28/2026
Status: 🔄 Open
Base:
main← Head:feat/lap-time-evolution-chart📝 Commits (4)
3dbec95feat: add Lap Time Evolution chart with tyre stint analysis, delta mode, and SC/VSC overlayscb6c4b7Polish lap time and gap chart UX8919ec6Improve chart interaction responsivenessf201caeTighten chart hover and branch audit fixes📊 Changes
3 files changed (+3016 additions, -3 deletions)
View changed files
📝
src/gui/insights_menu.py(+16 -2)➕
src/insights/lap_time_chart_window.py(+2385 -0)📝
src/interfaces/race_replay.py(+615 -1)📄 Description
Closes #284
Summary
Introduces a new Lap Time Evolution insight window under Race Analysis. The feature is designed for race-pace analysis rather than raw telemetry inspection, combining lap times, tyre context, pit-stop events, neutralization overlays, and race-gap context in a single interactive chart.
This PR also includes follow-up fixes made after the initial branch push so that the chart semantics, controls, and default views are accurate and usable in real race sessions.
Features
Core Visualisation
●■▲◆★Race Context Overlays
View Modes
Interactive Controls
?ButtonBest-Lap Indicators
Important Follow-up Fixes Included
These changes are part of the branch state that should be reviewed, even though they were made after the original commit was first pushed:
Gap mode semantics fixed
Gap to Leaderreflects the race-timing concept users expect.SC/VSC/RED overlay colouring fixed
Mode-switch blank-chart issue fixed
Lap TimeandGap to Leaderno longer leaves stale y-limits that can hide the plot.Gap-mode scaling improved
Gap to Leadernow isolates the trace without re-scaling the chart around extreme outliers.Tooltip clarity improved
Gap to Leadertooltips now use race-gap wording instead of ambiguous lap-time wording.Lap Timepersonal-best tooltips now showGap to SB.View controls improved
Files
New Files
src/insights/lap_time_chart_window.pyModified Files
src/gui/insights_menu.pysrc/interfaces/race_replay.pyVisual Demo
https://github.com/user-attachments/assets/8de1e619-9034-46cf-ac85-f5022a1a4e9d
Key Design Decisions
Offline computation
Gap mode uses timing-line completion data
Gap to Leaderis based on race timing context, not “fastest visible lap” heuristics.Focused-driver gap view keeps stable default scaling
Interactive state is part of the UX
Known Limitations / Future Work
Tests performed
Update
Since the initial push, this PR has been amended to address several correctness and UX issues in the Lap Time Evolution window:
H,I)Note: changes/fixes have been force pushed into a single commit to mitigate from the ongoing incorrect squash merge issue of GitHub.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.