Skip to content

Render the verifier's line-tagged variable names instead of superscript counters #175

Closed

Description

@CatarinaGamboa

Impact: the panel, the step diff and the context view show variables with instance counters (box¹⁵) that match nothing in the code and render as separate digits in many fonts. liquid-java/liquidjava#492 changes the verifier to show plain names and, only when two instances of the same name must be told apart, a source-line tag in ASCII: preview@51 (fallback x@25#2 when two instances come from the same line). The extension has to render and parse that tag.

To do (after the verifier release that includes #492):

  • Render the tag in renderHighlightedContent (client/src/webview/highlighting.ts): x@51 → x with a small l51 subscript (<sub>) and a tooltip "value of x at line 51". No Unicode superscript digits.
  • Tokenize it as one identifier in the step diff (TOKEN_PATTERN, client/src/webview/views/diagnostics/vc-changes.ts) and in the highlighting regexes, which currently match ⁰-⁹.
  • Context view: use the same rule as errors: plain names, line tags only when needed (VariableDTO.refinement formatting in the server, with lines from the variable positions).
  • Translation table: key it by the per-error display name so the tooltip and click-to-source keep working.
  • Bump the verifier dependency; the CLI/Problems panel/"copy diagnostic" keep the ASCII form.

Study: in the study exercises only A3_07 (preview before/after two calls) needs a tag; every other error shows plain names. Design and data: liquid-java/liquidjava#492 (comment with the per-exercise table).

Metadata

Metadata

Assignees

No one assigned

    Labels

    studyNeeded before the error-message user study

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions