47a28540

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Show a coloured character diff for similar-attachment hints

When an attachment file does not exist, the CE_MISSING_ATTACHMENT hint
now renders each suggested file name as a character-level diff against
the name that was typed, using fast-myers-diff and safe-coloured-text.

Only characters that are actually part of the candidate path are shown,
so the rendered text is always a real path. Characters the candidate has
in addition to the typed name are coloured red, and unchanged characters
are coloured explicitly so the whole suggestion stays one colour
regardless of where the differences fall.

Add a many-similar-attachments scenario exercising substitution,
insertion, extension change, deletion, and reordering. The check spec now
recurses into subdirectories so the scenario can isolate its candidate
files in their own directory.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 2m44s 2s 2s 2m46s 2m44s
Eval 7m19s 4m36s 4m36s 11m56s 4m33s
Build 1h18m14s 13m59s 22m26s 1h40m40s 1h17m22s
Suite 2m44s 18m37s 1h37m55s 1h40m40s 1h24m40s

Timeline

0s8m9m10m11m1h21m1h30m1h32m1h34m1h35m1h36m1h37m1h38m1h39m1h40m