fix(repl): set_evaluator() alone should open the Repl tab - #876
Merged
Conversation
set_evaluator() was the one repl function that gave a program a reason to use the tab but never actually triggered the lazy tab loader - every other producing/customizing function (set_program_text, repl_display, set_background_image, ...) already calls __loadReplTab(), but set_evaluator() was missed when the lazy-load pattern was introduced in the Conductor migration (#865). As a result, a program whose only interaction with the module is set_evaluator() - exactly the module's own documented minimal usage example - never opened the Repl tab at all. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B3LRoXRMQ5ADeYMdVTChCZ
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
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.
Summary
Reported repro:
No Repl tab appears. This is not rune-related (
show/heartare imported but never called, so rune's tab correctly staying hidden is expected) - it reproduces withreplalone.Root cause
ReplModulePlugin.set_evaluator(src/bundles/repl/src/index.ts) never called the private lazy tab-loader__loadReplTab(). Every other function that gives a student a reason to look at the tab already does (set_program_text,repl_display/rich_repl_displayvia__displayOutput,set_background_image/set_font_sizevia__displayEditorProps) -set_evaluatorwas the one exception, missed when this lazy-load pattern was introduced during the Conductor migration (#865).Since the tab is only ever constructed via that loader, a program whose only interaction with the module is
set_evaluator()- exactly the module's own documented minimal usage example in the file's module doc comment - never opened the tab at all.Fix
set_evaluatornow callsthis.__loadReplTab()after registering the evaluator, matching the existing pattern used by every other tab-opening method.Test plan
yarn tscandyarn lintpass forsrc/bundles/replandsrc/tabs/Replset_evaluatornow calls__loadReplTab()(4 call sites total, up from 3)tabLoader.loadTabcalled afterset_evaluator()) - vitest's transform currently fails to import the plugin class (index.ts) for any bundle using the newer "standard decorators" syntax (binary_tree,matrix,midi,pix_n_flix,repeat,repl,sound). This is a pre-existing tooling gap, not something new from this change - none of those bundles currently have a test importing their ownindex.ts. Flagging in case it's worth a separate look.🤖 Generated with Claude Code
https://claude.ai/code/session_01B3LRoXRMQ5ADeYMdVTChCZ