Repository navigation
Scripting terminal: only bind cards to top-level declarations - #94
Merged
rubensworks merged 1 commit intoOct 19, 2026
Merged
Conversation
Coverage Report for CI Build 39205496783Coverage increased (+1.4%) to 44.465%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions212 previously-covered lines in 4 files lost coverage. Coverage Stats
💛 - Coveralls |
Moving the cursor through a function body rebound the card to whichever word was under the cursor, such as a parameter or a method name, which can not be evaluated. The cursor now only selects names of top-level functions, classes and variables, and keeps the previous one otherwise. Explicit selections are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
rubensworks
force-pushed
the
terminal-ux-clean/8-wrap-and-create
branch
from
October 19, 2026 05:37
9f57696 to
ee16f1a
Compare
rubensworks
force-pushed
the
terminal-ux-clean/9-toplevel-binding
branch
from
October 19, 2026 05:37
856c391 to
62276da
Compare
Base automatically changed from
terminal-ux-clean/8-wrap-and-create
to
master-1.21-lts
October 19, 2026 17:51
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.
Stacked on #93.
Before, moving the cursor through a function body rebound the card to the word under the cursor, for example
itemoritemstackIsStackable. Those can't be evaluated as script members, so the card broke just from navigating.Now, when nothing is selected, the cursor only selects names of top-level
function/class/var/let/constdeclarations. On any other word, the previous selection is kept if it's still declared in the script, and is cleared otherwise. That way, switching scripts never carries over a name from another file. Explicit text selections behave as before.How it works: the top-level names come from a lightweight scanner,
JavaScriptDeclarations. It skips strings, template literals, comments and regexes, and ignores function/class expressions and member accesses. For destructuring declarations it returns null, and the terminal then falls back to the old behavior instead of blocking a valid binding. It's exposed asILanguageHandler.getTopLevelMembers, which returns null by default.Validation:
JavaScriptDeclarationsTest.filterItemand then a word inside its body keeps "Binds to: filterItem". It used to switch toitemstackIsSt….buildandrunGameTestServer(23/23) pass.Generated by Claude Code