perf(ui): reuse hint result as move preview, skip redundant evaluate #85
Reference in New Issue
Block a user
Delete Branch "feature/hint-preview-reuse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Taking a hint auto-placed the tiles then re-validated them via a debounced
evaluate— duplicate engine work and a visible disabled→enabled flicker on the submit button over slow links. The hint is the engine's own top-ranked, fully scored legal move, so itsmovealready carries thescore/words/diranevaluatereturns.Seed
previewdirectly from the hint move (previewFromHint) and cancel any pending evaluate timer; a later manual edit re-armsrecompute()so rearranged tiles are re-evaluated as before. Client-only — no backend, wire or schema change.Local:
pnpm check0 err,test:unit286 pass (incl. newpreviewFromHint),buildok,test:e2e150 pass.