Draft
Conversation
Add iPhone stopwatch-style lap timer with start/pause/stop/lap controls, real-time timer display, and scrollable lap history. Stub backend API endpoints for future integration.
…os into 547-lap-timer-ui-controls
…ontrols # Conflicts: # angular-client/src/api/urls.ts # angular-client/src/app/app-nav-bar/app-nav-bar.component.ts # angular-client/src/app/app-routing.module.ts
| error: new BehaviorSubject<Error | null>(null) | ||
| }; | ||
| return response as QueryResponse<T>; | ||
| return response as unknown as QueryResponse<T>; |
| <p-confirmDialog /> | ||
|
|
||
| <mat-grid-list cols="6" gutterSize="15px" rowHeight="1.5rem"> | ||
| <mat-grid-tile [colspan]="6" [rowspan]="8"> |
| export type LapState = 'idle' | 'running' | 'paused'; | ||
|
|
||
| /** Test override. */ | ||
| export const TIME_PROVIDER = new InjectionToken<() => number>('LAP_TIMER_TIME_PROVIDER', { |
| return parsed; | ||
| } catch { | ||
| try { | ||
| localStorage.removeItem(LAP_STORE_STORAGE_KEY); |
|
|
||
| function generateId(): string { | ||
| // Fallback for runners pre-dating crypto.randomUUID. | ||
| const c: Crypto | undefined = typeof crypto !== 'undefined' ? crypto : undefined; |
There was a problem hiding this comment.
convert to the uuid function we use for alerts user... maybe just use that to identify user if that is what this is for.
| ); | ||
| /** Lazy: avoids `bms.utils` ↔ `topic.utils` cycle in karma. */ | ||
| let _segmentInfoMap: Record<Segment, SegmentInfo> | null = null; | ||
| const buildSegmentInfoMap = (): Record<Segment, SegmentInfo> => |
There was a problem hiding this comment.
merge with dev or something idk why this is changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Adds a Lap Timer page to the Angular client — a stopwatch-style interface for managing laps during field deployments. The page has start/pause/stop/lap/reset controls, live telemetry gauges (speed, battery SOC, motor temp), and a scrollable lap list with per-lap stats and delta-from-best highlighting. A root-provided service manages timer state using requestAnimationFrame for smooth sub-second updates, records telemetry snapshots per lap (avg speed, energy used, max motor temp), and persists across navigation. API calls are stubbed and fire-and-forget since the backend endpoints don't exist yet.
New files include the page component (lap-timer-page), a lap timer service, a lap timer API stub, and URL constants. Modified app-routing and the nav bar to register the route and add a nav entry.
Notes
Test Cases
To Do
Checklist
package-lock.jsonchanges (unless dependencies have changed)Closes #547