Skip to content

Add Start/Stop Workout button and timer display - #697

Closed
google-labs-jules[bot] wants to merge 2 commits into
leaderfrom
feature/workout-controls
Closed

Add Start/Stop Workout button and timer display#697
google-labs-jules[bot] wants to merge 2 commits into
leaderfrom
feature/workout-controls

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

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

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.
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


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.
@arii arii closed this Dec 1, 2025
@arii
arii deleted the feature/workout-controls branch December 5, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Develop 'Start/Stop Workout' Button and Timer Display

1 participant