Repository navigation
Show every declared-here position and its gloss in the IDE panel - #191
Open
CatarinaGamboa wants to merge 2 commits into
Open
CatarinaGamboa wants to merge 2 commits into
CatarinaGamboa wants to merge 2 commits into
Conversation
The server sends the verifier's declaration positions and declaration notes (the "where ... means ..." lines) of refinement and state errors, and the Locations section shows a link to every position, with the notes under them. Needs liquidjava-verifier 0.0.38: getDeclarationNotes() comes from liquid-java/liquidjava#517 and getDeclarationPositions() from liquid-java/liquidjava#525. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CatarinaGamboa
added a commit
that referenced
this pull request
Nov 10, 2026
Collaborator
Author
Clean-code reviewI audited this diff with the clean-code-principles checklist. Fixed
Declined
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
Codex review, round 1
Fixed
Declined
Tests: 125 unit, typecheck, lint, and 39 server tests (against 0.0.38 from #525) pass. |
Collaborator
Author
Codex review, round 2
Declined (both)
Codex found nothing else, so the loop ends here. |
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.
Closes #181
What changes
Server.
RefinementErrorDTOandStateRefinementErrorDTOnow send:declarationPositions, fromLJDiagnostic.getDeclarationPositions();declarationNotes, thewhere … means …lines, fromgetDeclarationNotes().Both are read through the verifier's generic
LJDiagnosticAPI. So when the verifier adds notes or positions, they appear with no extension change.declarationPosition, the first position, stays as it is for the State Machine view.Client. The Locations section links to every declaration position, then shows the notes under the links, muted and with a hanging indent. A declaration in value form (
doorState(this) == closed), or one with unnamed sets, has no notes, so nothing changes for it.Fallback to one position. The verifier's default
getDeclarationPositions()returns the singlegetDeclarationPosition(). Refinement errors and any other error with one declaration therefore show one link, as before.Verifier version: needs 0.0.38 (not yet released)
declarationNotes(the gloss)declarationPositions(everyfrom, e.g. A1_01 lines 110 and 111)The pom is bumped to
0.0.38, so CI's server build fails until 0.0.38 is on Maven Central. Please merge this PR only after a verifier release that has both #517 and #525. If #525 is not merged, drop thedeclarationPositionslines from the two DTOs (one line each) and usedeclarationPositioninrenderLocationagain. The gloss part only needs #517.I tested it locally against #525's head (
9d1bb1e, which contains main), installed as 0.0.38 in an isolated Maven repository.Before → after (Locations section, at the study width)
Before is main, with its server built on verifier main. After is this PR on #525's head. Headless VS Code, 1600×900, Dark Modern, default side bar.
A1_01: both
froms, each with its glossA1_38
E_OSS_A1_38_FormatReaderManager.java:157 BufferedInputStreamRefinements.java:81 + where marked(this) means markState(this) == marked, open(this) means stream(this) == openA1_56:
+ where redoable(this) means redoState(this) == redoableA1_09:
+ where notDisplayable(this) means display(this) == notDisplayableA2_04: unchanged.
@Refinement("_ >= 0")has no gloss. The missing Hint in the after shot comes from #525, not from this PR.A2_04
The A1_01 and A1_09 shots are scrolled to Locations. The yellow outline is the focus left on Hints by the screenshot script.
Overlap with open PRs
client/src/webview/views/sections.ts. It changesrenderVariableHighlightButtonand the imports, right afterrenderLocation, which this PR edits.client/src/types/diagnostics.ts. Both PRs add fields toRefinementErrorandStateRefinementError, in nearby hunks. No conflict in logic.<pre>, which keepsbreak-word, so a longcompressionExplicit(this)can still wrap inside the name at 240 px (see A1_01). They do not share files apart fromstyles.ts, in separate rules.Checks
npm run test:unit(125 passed; the new test fails on main and also checks the copied text),npm run test:typecheck,npm run lint, servermvn -B test(39 passed, against #525 as 0.0.38; the converter test now also checks the notes and the positions).🤖 Generated with Claude Code