chore(wip): lot #165-169 validé QA + rework foreground #163 (KO - preuve device/toolchain insuffisante)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -5,6 +5,7 @@ enum WatchCommandType {
|
||||
pauseSession,
|
||||
resumeSession,
|
||||
startPreparedTimedStep,
|
||||
completeCurrentStep,
|
||||
skipCurrentStep,
|
||||
skipCurrentPassage,
|
||||
finishCurrentSet,
|
||||
@ -60,6 +61,8 @@ enum WatchTimerRunState { stopped, running, paused }
|
||||
|
||||
enum WatchManualScoreScope { series, step }
|
||||
|
||||
enum WatchStepType { time, reps }
|
||||
|
||||
final class WatchCommandEnvelope {
|
||||
const WatchCommandEnvelope({
|
||||
this.schemaVersion = watchBridgeSchemaVersion,
|
||||
@ -150,6 +153,8 @@ final class WatchSessionProjection {
|
||||
this.stepIndex,
|
||||
this.stepTotal,
|
||||
this.stepName,
|
||||
this.stepType,
|
||||
this.stepTargetValue,
|
||||
this.dominantTimer,
|
||||
this.secondaryTimers = const [],
|
||||
required this.primaryAction,
|
||||
@ -190,6 +195,8 @@ final class WatchSessionProjection {
|
||||
stepIndex: _nullableIntFromJson(json['stepIndex']),
|
||||
stepTotal: _nullableIntFromJson(json['stepTotal']),
|
||||
stepName: _nullableStringFromJson(json['stepName']),
|
||||
stepType: _nullableEnumFromJson(json['stepType'], WatchStepType.values),
|
||||
stepTargetValue: _nullableIntFromJson(json['stepTargetValue']),
|
||||
dominantTimer: _timerFromJson(json['dominantTimer']),
|
||||
secondaryTimers: _timerListFromJson(json['secondaryTimers']),
|
||||
primaryAction: _enumFromJson(
|
||||
@ -238,6 +245,8 @@ final class WatchSessionProjection {
|
||||
final int? stepIndex;
|
||||
final int? stepTotal;
|
||||
final String? stepName;
|
||||
final WatchStepType? stepType;
|
||||
final int? stepTargetValue;
|
||||
final WatchTimerProjection? dominantTimer;
|
||||
final List<WatchTimerProjection> secondaryTimers;
|
||||
final WatchPrimaryAction primaryAction;
|
||||
@ -270,6 +279,8 @@ final class WatchSessionProjection {
|
||||
'stepIndex': stepIndex,
|
||||
'stepTotal': stepTotal,
|
||||
'stepName': stepName,
|
||||
'stepType': stepType?.name,
|
||||
'stepTargetValue': stepTargetValue,
|
||||
'dominantTimer': dominantTimer?.toJson(),
|
||||
'secondaryTimers': secondaryTimers
|
||||
.map((timer) => timer.toJson())
|
||||
@ -310,6 +321,8 @@ final class WatchSessionProjection {
|
||||
stepIndex == other.stepIndex &&
|
||||
stepTotal == other.stepTotal &&
|
||||
stepName == other.stepName &&
|
||||
stepType == other.stepType &&
|
||||
stepTargetValue == other.stepTargetValue &&
|
||||
dominantTimer == other.dominantTimer &&
|
||||
_listEquals(secondaryTimers, other.secondaryTimers) &&
|
||||
primaryAction == other.primaryAction &&
|
||||
@ -344,6 +357,8 @@ final class WatchSessionProjection {
|
||||
stepIndex,
|
||||
stepTotal,
|
||||
stepName,
|
||||
stepType,
|
||||
stepTargetValue,
|
||||
dominantTimer,
|
||||
Object.hashAll(secondaryTimers),
|
||||
primaryAction,
|
||||
|
||||
@ -161,6 +161,8 @@ void main() {
|
||||
stepIndex: 2,
|
||||
stepTotal: 4,
|
||||
stepName: 'Descente',
|
||||
stepType: WatchStepType.reps,
|
||||
stepTargetValue: 12,
|
||||
dominantTimer: _stepTimer(),
|
||||
secondaryTimers: [_scoreStopwatchTimer(), _setTimer()],
|
||||
primaryAction: primaryAction,
|
||||
@ -203,6 +205,8 @@ void main() {
|
||||
expect(projection.phase, WatchSessionPhase.restPaused);
|
||||
expect(projection.passageIndex, isNull);
|
||||
expect(projection.stepIndex, isNull);
|
||||
expect(projection.stepType, isNull);
|
||||
expect(projection.stepTargetValue, isNull);
|
||||
expect(projection.dominantTimer, isNull);
|
||||
expect(projection.secondaryTimers, isEmpty);
|
||||
expect(projection.primaryAction, WatchPrimaryAction.resumeSession);
|
||||
@ -233,6 +237,8 @@ void main() {
|
||||
expect(projection.exerciseName, '');
|
||||
expect(projection.primaryAction, WatchPrimaryAction.none);
|
||||
expect(projection.secondaryActions, isEmpty);
|
||||
expect(projection.stepType, isNull);
|
||||
expect(projection.stepTargetValue, isNull);
|
||||
expect(projection.hasManualScore, isFalse);
|
||||
expect(projection.currentManualScoreValue, isNull);
|
||||
expect(projection.canDecrementScore, isFalse);
|
||||
|
||||
Reference in New Issue
Block a user