Skip to content

fix(Descriptions): show truncation marker and populate closest-matches hint - #556

Merged
ocots merged 1 commit into
mainfrom
feat/issue-553-description-hint
Sep 2, 2026
Merged

ocots merged 1 commit into
mainfrom
feat/issue-553-description-hint

Conversation

@ocots

@ocots ocots commented Sep 2, 2026

Copy link
Copy Markdown
Member

Fixes #553

Descriptions.complete — truncation marker and closest-matches hint.

Two display bugs surfaced in #553 while rendering OptimalControl's GPU docs:

  1. Candidate list silently head-truncated at 10, no marker. When a catalog
    has more descriptions than max_show, the Available list was a bare
    prefix with no ellipsis / N more line, so a reader took it as exhaustive.
    _format_description_candidates now appends a … and N more line when the
    catalog exceeds max_show.

  2. "Closest matches" hint was empty. complete computed the similar
    descriptions but only used them to pick the wording — candidates always
    received 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 complete is unchanged; only error display is affected.

Changes

Test plan

Full suite passes (Pkg.test()); the new non-regression testset would have failed
before these fixes.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AmbiguousDescription: candidate list silently truncated at 10, and the "closest matches" hint is empty

1 participant