Repository navigation
Show syntax errors in the scripting terminal editor - #80
Closed
rubensworks wants to merge 13 commits into
Closed
rubensworks wants to merge 13 commits into
rubensworks wants to merge 13 commits into
Conversation
Syntax errors only showed up when a variable card using the script was evaluated somewhere, for example as an error in a display panel. Check the active script for syntax errors on the server, without executing it, once it hasn't changed for half a second. Mark the line and position of the first error in the editor, and show its message when hovering it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Coverage Report for CI Build 39131969099Coverage decreased (-1.1%) to 43.008%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions542 previously-covered lines in 6 files lost coverage. Coverage Stats
💛 - Coveralls |
…back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
…back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
This was referenced Oct 17, 2026
…back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
…back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
…back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
…back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Only the line number of the error line turned red, which is easy to miss at its small size, and nothing indicated an error that was scrolled out of view. Also give the gutter of that line a red background, and mark the error position on the scrollbar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
The red background started one pixel right of the editor border and covered the gutter separator line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
…back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
…back Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Member
Author
|
Replaced by #87: same changes, rebased as one standalone commit. Generated by Claude Code |
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.
Phase 4 of the scripting terminal UX improvements, stacked on #79 (then #78, then #77).
Problem
A syntax error in a script only became visible once a variable card using it was evaluated, e.g. as an X in a display panel that you then had to hover (see #5). The terminal itself gave no feedback, and the info book said so too.
Changes
Show syntax errors in the script editor
ILanguageHandlergets a defaultcheckSyntax(Path, String)that returnsnull, so other language handlers keep working.Context.parse, which parses the script without executing it.TerminalScriptingSyntaxErrorPacket.Make the syntax error marker easier to see
Validation
In a dev client (clientdevbridge), with a missing
)on line 7 of a 40-line script:;is underlined, and hovering showsSyntaxError: script0.js:7:23 Expected , but found ;. Typing the missing)clears all markers.New unit tests check the result for valid code, a syntax error (line and column), an unclosed block, and that
throw new Error(...)isn't executed.Dropped from the original plan
Member: ..., and there is already a check mark next to the slot.Testing
./gradlew buildpasses, including the new unit tests../gradlew runGameTestServer: all 22 tests pass.🤖 Generated with Claude Code
https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9