release: promote development → master (v1.25.1) #292
Reference in New Issue
Block a user
Delete Branch "development"
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?
Patch release. Carries a single change over
master: PR #291.fix(ui): highlight the word the engine played, not the run it abuts
In a one-word-per-turn game, staging a single tile that plays a valid word down a column while merely abutting a longer horizontal word greened that horizontal run instead — a word the play does not form — and anchored the score badge on it. The score, the caption and the committed move were all correct; only the highlight was wrong.
Cause: two independent derivations of the play's orientation.
lib/formed.tsre-guessed the axis as "the longer run wins", while the engine (lib/dict/direction.tsplayDirection, a port ofengine.(*Game).playDirection) settles a lone tile under the single-word rule through the validator, because its two orientations can differ in legality.Fix:
formedGeometrynow takes the orientation from the preview (EvalResult.dir, already carried by the on-device evaluator, the networkevaluateand a reused hint alike) and no longer infers it — no second implementation is left to drift. Reported offline, but the trigger is the rule rather than the transport, so online one-word games are fixed too.Scope
docs/FUNCTIONAL.mdalready described the intended behaviour; no doc change.Verification
uiCI job locally:check,test:unit(674),build, bundle-size (app entry 130.3 / 131 KB),test:e2e(256, chromium + webkit).formed.engine.test.tspins the highlight against the engine port over random positions; reverting the old inference fails it on exactly the one-word-rule cases.The board's green highlight re-derived the play's orientation itself ("the longer run wins"), while the engine settles a lone staged tile under the single-word rule through the validator, because its two orientations can differ in legality. A vertical play that merely abuts a longer horizontal word therefore greened that horizontal run — a word the play does not form — and anchored the score badge on it, while the caption, the score and the committed move all stayed correct. formedGeometry now takes the orientation from the preview, which every preview source already carries (EvalResult.dir: the on-device evaluator, the network evaluate and a reused hint), and no longer infers it. The rule, not the transport, is the trigger, so this fixes online one-word games as well as offline ones. A differential test now walks random positions, asks the engine port for every legal play it can find, and asserts the highlighted cells are exactly the cells of the words the engine says that play forms.