-
Notifications
You must be signed in to change notification settings - Fork 1
STOP reliability + Freeze Live Graph after Set (PR1+PR2) #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
619bdda
feat(stop): harden STOP reliability
Allmight97 47ebaba
feat(stop,graph): PR1 STOP reliability + PR2 freeze/resume graph\n\n-…
Allmight97 9b04b9d
docs(changelog): add 2025-10-26 entry for PR #1 (PR1+PR2)
Allmight97 6fbf4d3
fix(stop): address P1-P5 review feedback from bot reviewers
Allmight97 61bc9c6
fix(stop): enhance STOP button behavior and UI synchronization
Allmight97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Bug Reports | ||
|
|
||
| # Feature Requests | ||
| [ ]: Brainstorm with Ai appropriate tests for this repo and consider adjusting to a Test/Behavior Driven Development approach. | ||
| # Ractoring Suggestions | ||
|
|
||
| # Feedback From Reddit Users (r/vitruvian_form) | ||
| - User: sudden_Hunter-9342 | ||
| Feedback: `trialled it. Connects easily. functions are pretty cool, with echo easy to use. | ||
| 1. [x] BUG: Mid-exercise STOP button does not work possible fixes: | ||
| a. disconnect and reconnect | ||
| b. Choose and start an exercise mode a few times until the error goes away(warm up reps and working reps reset) | ||
| Notes: Fixed via PR #1 (STOP retries + UI debouncing). STOP now retries 3× with BLE cleanup; UI reflects fallback disconnect so users no longer need to reconnect manually. | ||
| 2. [ ] BUG: Seems the final rep is not executed. (i.e. 8th rep out of 8 deloads). Not a big deal, i just add an extra rep. | ||
| 3. [x] FEATURE: Stop the chart graphing at the end of reps. otherwise main data in the chart disappears to the side. | ||
| Notes: Addressed in PR #1 by freezing the graph when STOP/auto-complete fires and exposing a Resume button so the last 30s stays visible. | ||
| 4. [ ] FEATURE: Adding rest periods/timer | ||
| Dev Notes: Addressing in vitruvian-change-plan.md |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Changelog | ||
|
|
||
| ## 2025-10-26 | ||
| - PR: https://github.com/Allmight97/workoutmachineappfree.github.io/pull/1 | ||
| - Title: STOP reliability + Freeze Live Graph after Set (PR1+PR2) | ||
| - Summary: | ||
| - Hardened STOP behavior with guarded retries and polling pause to ensure immediate, reliable halts. | ||
| - Added graph freeze on STOP or set completion with a visible "Resume Live Graph" control; keeps numeric stats live. | ||
| - User impact: | ||
| - Safer workouts: STOP succeeds promptly or disconnects cleanly; clear log feedback. | ||
| - Better review UX: final set data remains visible; simple resume returns to live view. | ||
| - Developer impact: | ||
| - Structured logs around STOP attempts and acknowledgements aid diagnostics. | ||
| - Clear, minimal state flags for graph (`isGraphFrozen`, `frozenHistory`) and explicit resume entry point. | ||
| - Files changed: | ||
| - app.js – STOP UI debounce/timing; graph freeze/resume helpers; guards in live stats and draw routines. | ||
| - device.js – STOP retries (3x/100ms), pause polling during STOP, disconnect fallback, idempotent guard. | ||
| - index.html – Added hidden "Resume Live Graph" button next to Load History header. | ||
|
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The STOP handler disables the button and only re-enables it when
this.device.isConnectedis still true. WhensendStopCommand()fails and performs its disconnect fallback, the DOM element remains disabled and there is no subsequent code that flips it back on when the user reconnects. After recovering from such an error the user cannot issue another STOP without refreshing the page, which undermines the primary safety control. Consider clearing the disabled state on reconnect or in the failure path regardless ofisConnected.Useful? React with 👍 / 👎.