fix(Descriptions): show truncation marker and populate closest-matches hint - #556
Merged
Merged
Conversation
…s hint Address the two display bugs surfaced in #553: - The candidate list in AmbiguousDescription was silently head-truncated at max_show with no marker, so readers took it as exhaustive. Append a '… and N more' line when the catalog exceeds max_show. - The 'Try one of the closest matches:' hint was computed but discarded: candidates was always the full (truncated) list, leaving the hint empty. Now pass the similar descriptions when present. - Raise the shown-candidate ceiling from 10 to 20. Resolution logic of complete is unchanged; only error display is affected. Add non-regression tests and bump version to 0.30.3-beta.
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #553
Descriptions.complete— truncation marker and closest-matches hint.Two display bugs surfaced in #553 while rendering OptimalControl's GPU docs:
Candidate list silently head-truncated at 10, no marker. When a catalog
has more descriptions than
max_show, theAvailablelist was a bareprefix with no ellipsis /
N moreline, so a reader took it as exhaustive._format_description_candidatesnow appends a… and N moreline when thecatalog exceeds
max_show."Closest matches" hint was empty.
completecomputed the similardescriptions but only used them to pick the wording —
candidatesalwaysreceived the full (truncated) list, so the hint fired with nothing after it.
Now the closest matches are passed as the candidates when present.
Also raised the shown-candidate ceiling from 10 to 20.
Resolution logic of
completeis unchanged; only error display is affected.Changes
src/Descriptions/similarity.jl— marker in_format_description_candidates(+docstring)src/Descriptions/complete.jl—max_show=20, passsimilar_descsas candidatestest/suite/descriptions/test_similarity.jl— updated format teststest/suite/descriptions/test_complete.jl— non-regression tests for AmbiguousDescription: candidate list silently truncated at 10, and the "closest matches" hint is empty #553Project.toml—0.30.2-beta→0.30.3-betaCHANGELOG.md—0.30.3-betabug-fix entryTest plan
Full suite passes (
Pkg.test()); the new non-regression testset would have failedbefore these fixes.