Fix un-runnable snippet on the "Meet the robot" lesson - #24
Open
tytremblay wants to merge 1 commit into
Open
Conversation
The site makes only the first ```java fence per page the runnable snippet. On page 1 of algorithms-robot-api that was an illustrative two-liner referencing an out-of-scope `grid` and no imports, so pressing Run produced "cannot find symbol" errors for Maze/GridMaze/ Robot/grid instead of the intended full MeetTheRobot example. Mark the illustrative fragment as ```text so the complete, importing MeetTheRobot class becomes the page's runnable snippet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
Running the code on the "Meet the robot" lesson (
algorithms-robot-api, page 1) failed withcannot find symbolerrors forMaze,GridMaze,Robot, andgrid.The site makes only the first
```javafence per page the runnable snippet (firstJavaSnippetinsite/src/lib/lessons.ts). On page 1 that was an illustrative two-liner:— no
import, andgridis out of scope. Auto-wrapped in aMainshell and compiled, it can't resolve any of those symbols. The complete, importingMeetTheRobotexample lower on the page never got to be the runnable one.Fix
Mark the illustrative fragment as
```textso it renders as a plain sample, promoting the fullMeetTheRobotclass to the page's runnable snippet.Scope check
Audited the other three Algorithms lessons —
algorithms(no java fences),algorithms-maze-data(self-contained bare-statement snippets), andalgorithms-maze-solver(first fence is the fullWallFollowerclass). This was the only lesson affected.🤖 Generated with Claude Code