Skip to content

cleanup(ui): let cycle mode confirmation reach the model's planning weight ceiling - #1331

Merged
9thLevelSoftware merged 2 commits into
mainfrom
cursor/cycle-stepper-planning-ceiling-1021
Oct 23, 2026
Merged

9thLevelSoftware merged 2 commits into
mainfrom
cursor/cycle-stepper-planning-ceiling-1021

Conversation

@9thLevelSoftware

Copy link
Copy Markdown
Owner

Cycle mode confirmation now passes CommandLimits.planningMaxWeightPerCableKg(userPreferences.lastConnectedModel) into WeightStepper, matching the routine and exercise editors. Trainer+ plans, and plans made before any machine is connected, can reach 110 kg/cable. A previously connected V-Form stays at 100. Display units and the ceiling values themselves are unchanged.

CommandLimitsWiringTest.cycleModeConfirmationStepperUsesThePlanningCeiling checks that the ceiling is forwarded through the exercise card into every stepper in ExerciseConfigModal.

Open in Web Open in Cursor 

…eight ceiling

Pass CommandLimits.planningMaxWeightPerCableKg(userPreferences.lastConnectedModel) into the cycle mode-confirmation WeightStepper, matching the routine and exercise editors.

Co-authored-by: Devil <9thLevelSoftware@users.noreply.github.com>
@9thLevelSoftware
9thLevelSoftware marked this pull request as ready for review October 23, 2026 14:31
Copilot AI balanced review requested due to automatic review settings October 23, 2026 14:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kilo-code-bot

kilo-code-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Optional — non-blocking

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
shared/src/commonTest/kotlin/com/devil/phoenixproject/presentation/CommandLimitsWiringTest.kt 87 assertEquals(2, ...) pins the number of forwarding sites, so a third legitimate hop breaks the test even though the ceiling is still wired; the regex above proves the expression exists somewhere in TrainingCyclesScreen.kt, not that it is the argument of the ModeConfirmationScreen(...) call. Optional: the parameter is now required, so the compiler already rejects a hop that drops the ceiling, and the author declined this in the thread. If kept, prefer asserting the hops are present over counting them.

Ponytail Review

File Line Tag Finding
shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/screen/ModeConfirmationScreen.kt 57 shrink Three-line comment block on one parameter; the first two lines restate the call site and duplicate the ExerciseConfigModal KDoc. Keep only the "no default" rationale line.

Ponytail net: -2 lines.

Files Reviewed (4 files)
  • shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/components/ExerciseConfigModal.kt - 0 issues
  • shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/screen/ModeConfirmationScreen.kt - 0 issues
  • shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/screen/TrainingCyclesScreen.kt - 0 issues
  • shared/src/commonTest/kotlin/com/devil/phoenixproject/presentation/CommandLimitsWiringTest.kt - 1 issue

Fix these issues in Kilo Cloud

Previous Review Summary (commit 38269da)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 38269da)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/components/ExerciseConfigModal.kt 55 planningMaxWeightPerCableKg default (Constants.MAX_WEIGHT_PER_CABLE_KG, 110 kg) is dead and fails OPEN: the only caller passes the value explicitly, and any future caller that forgets it silently gives a V-Form owner a 110 kg stepper. Make the parameter required and drop the Constants import.
shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/screen/ModeConfirmationScreen.kt 60 Same dead, fail-open default at the screen entry point (and on the private card's line 284). Only caller (TrainingCyclesScreen.kt:794) always passes the value; the Constants import is then unused.

SUGGESTION

File Line Issue
shared/src/commonTest/kotlin/com/devil/phoenixproject/presentation/CommandLimitsWiringTest.kt 87 assertEquals(2, ...) over-specifies the number of forwarding sites, so a third legitimate hop breaks the test; and the regex only proves the expression exists somewhere in TrainingCyclesScreen.kt, not that it is the argument of the ModeConfirmationScreen(...) call.

Ponytail Review

File Line Tag Finding
shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/components/ExerciseConfigModal.kt 55 yagni Dead default on a single-use parameter. Make planningMaxWeightPerCableKg required and delete the Constants import.
shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/screen/ModeConfirmationScreen.kt 60 yagni Two dead defaults (screen + private card). Make both required; the Constants import goes away with them.
shared/src/commonTest/kotlin/com/devil/phoenixproject/presentation/CommandLimitsWiringTest.kt 87 test-shrink Exact-count assertion and unscoped regex. Assert the two hops are present instead of counting them.

Ponytail net: -3 lines.

Files Reviewed (4 files)
  • shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/components/ExerciseConfigModal.kt - 1 issue
  • shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/screen/ModeConfirmationScreen.kt - 1 issue
  • shared/src/commonMain/kotlin/com/devil/phoenixproject/presentation/screen/TrainingCyclesScreen.kt - 0 issues
  • shared/src/commonTest/kotlin/com/devil/phoenixproject/presentation/CommandLimitsWiringTest.kt - 1 issue

Fix these issues in Kilo Cloud


Reviewed by minimax-m3 · Input: 55.9K · Output: 11.8K · Cached: 416.8K

Review guidance: REVIEW.md from base branch main

ModeConfirmationScreen, ConfigurableExerciseCard and ExerciseConfigModal each
have one caller, and every caller passes planningMaxWeightPerCableKg
explicitly, so the Constants.MAX_WEIGHT_PER_CABLE_KG defaults never ran. A
future caller that forgot the argument would silently get the widest
(Trainer+) stepper ceiling. Make the parameter required and drop the now
unused Constants imports. No behaviour change for the existing call sites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015tsDJ6LzV6FwGD3VQwfNEn
@9thLevelSoftware
9thLevelSoftware merged commit 7f7aff5 into main Oct 23, 2026
11 checks passed
@9thLevelSoftware
9thLevelSoftware deleted the cursor/cycle-stepper-planning-ceiling-1021 branch October 23, 2026 17:40
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.

4 participants