Skip to content

Conversation

@julien4215
Copy link
Collaborator

@julien4215 julien4215 commented Feb 20, 2025

It should be only reviewed after #1467 as this a follow-up to this PR (only the second commit is new).

@julien4215 julien4215 marked this pull request as draft February 20, 2025 17:19

typedef EngineGaugeParams =
({
bool isLocalEngineAvailable,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed this field because it didn't seem useful as ref.watch(engineEvaluationProvider).eval will simply have a null value if the local engine is not available and it allows me to use the method currentEval that I created to centralize the logic to choose the current eval.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we can remove this. Because we want to either:

  • always display the gauge and engine lines if the server evals are available
  • and if they are not, display the gauge and line only if local eval is enabled

The reason is to avoid showing/hiding the gauge and lines when jumping to another position to avoid any board shift.

@julien4215 julien4215 marked this pull request as ready for review February 20, 2025 17:27
@julien4215 julien4215 force-pushed the cloud-eval branch 3 times, most recently from a405930 to c8e5f65 Compare February 25, 2025 20:53
}) = _EvaluationOptions;
}

Eval? pickBestEval({
Copy link
Contributor

Choose a reason for hiding this comment

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

A comment to explain the logic behind this would be nice.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added comments to explain why there are these functions and what are their parameters but the logic is a bit annoying to explain and not necessary I think


typedef EngineGaugeParams =
({
bool isLocalEngineAvailable,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we can remove this. Because we want to either:

  • always display the gauge and engine lines if the server evals are available
  • and if they are not, display the gauge and line only if local eval is enabled

The reason is to avoid showing/hiding the gauge and lines when jumping to another position to avoid any board shift.

@veloce veloce merged commit d6504ef into lichess-org:main Feb 27, 2025
1 check passed
@julien4215 julien4215 deleted the cloud-eval branch February 27, 2025 14:21
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.

2 participants