Add Start/Stop Workout button and timer display - #697
Add Start/Stop Workout button and timer display#697google-labs-jules[bot] wants to merge 2 commits into
Conversation
This commit introduces a new `WorkoutControls` component to the main dashboard, allowing users to start and stop a workout session. The new component includes: - 'Start Workout' and 'Stop Workout' buttons that send commands to the server via WebSocket. - A running timer that displays the elapsed workout time in MM:SS format, managed within the component's state and synchronized with the server's state. The `WorkoutControls` component is integrated into the main dashboard page (`app/page.tsx`), making it the primary control for workout sessions.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
This commit addresses issues found during testing: 1. Refactors the `WorkoutControls` component to resolve a `react-hooks/set-state-in-effect` linting error. The component now derives the elapsed time directly from the `useWebSocket` context instead of using local state and an effect. This simplifies the component and improves performance. 2. Updates the Playwright visual regression snapshots to accept the new UI of the dashboard with the `WorkoutControls` component as the new baseline.
This change adds a new UI component,
WorkoutControls, to the main dashboard. This component provides 'Start Workout' and 'Stop Workout' buttons and displays a running timer in MM:SS format. The component's state is managed locally and synchronized with the WebSocket server.Fixes #660
PR created automatically by Jules for task 11291284855433181111 started by @arii