fix: the four reliability findings Sonar reports on dev

- The warmed fonts' key sorts by code units, so the same faces give the same
  key in every locale.
- The nearest weight of a snapshot face starts from the first face it has.
- The round hike search names its candidates with their place in the list
  explicitly instead of handing map a function of two arguments.
This commit is contained in:
Maurice
2026-10-23 22:28:41 +00:00
parent a2951f2c99
commit a202f2dc95
3 changed files with 10 additions and 5 deletions
@@ -64,14 +64,15 @@ export async function findRoundHikes(
): Promise<void> {
const state = await searchRoundLoops(request.start, request.targetM, (spots) => askLoop(request, spots, signal), {
signal,
onStep: ({ found, asked }) => report({ phase: 'searching', candidates: found.map(candidateOf), asked }),
onStep: ({ found, asked }) =>
report({ phase: 'searching', candidates: found.map((loop, i) => candidateOf(loop, i)), asked }),
});
if (signal.aborted) return;
if (state.answered === 0) {
report({ phase: 'failed', candidates: [], asked: state.asked });
return;
}
const found = state.found.map(candidateOf);
const found = state.found.map((loop, i) => candidateOf(loop, i));
let candidates = [...found];
report({ phase: 'done', candidates, asked: state.asked });
for (const round of found) {