Fix level-select dropdown loading into game instead of editor #17

Merged
tas merged 1 commits from LeSerjant/major_tom:fix/editor-level-select into main 2026-03-16 10:54:19 +00:00
Collaborator

Summary

  • When the editor is active, selecting a level from the JS shell dropdown was switching to MODE_PLAY instead of loading into the editor
  • Added an early check for MODE_EDITOR in the s_js_load_request handler that calls editor_load() instead of switching modes
  • Play-mode behavior is unchanged

Test plan

  • Open the editor in the browser (?edit query param)
  • Select a level from the dropdown — verify it loads in the editor, not gameplay
  • Select a level from the dropdown while in gameplay — verify it still loads in gameplay as before

🤖 Generated with Claude Code

## Summary - When the editor is active, selecting a level from the JS shell dropdown was switching to `MODE_PLAY` instead of loading into the editor - Added an early check for `MODE_EDITOR` in the `s_js_load_request` handler that calls `editor_load()` instead of switching modes - Play-mode behavior is unchanged ## Test plan - [ ] Open the editor in the browser (`?edit` query param) - [ ] Select a level from the dropdown — verify it loads in the editor, not gameplay - [ ] Select a level from the dropdown while in gameplay — verify it still loads in gameplay as before 🤖 Generated with [Claude Code](https://claude.com/claude-code)
LeSerjant added 1 commit 2026-03-16 10:51:12 +00:00
Fix level-select dropdown loading into game instead of editor
Some checks failed
CI / build (pull_request) Failing after 0s
Deploy / deploy (push) Has been cancelled
58bf89f2f2
When the editor is active, the JS shell level-select dropdown was
unconditionally switching to MODE_PLAY. Now it detects MODE_EDITOR
and calls editor_load() to load the selected level into the editor.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tas merged commit 58bf89f2f2 into main 2026-03-16 10:54:19 +00:00
tas deleted branch fix/editor-level-select 2026-03-16 10:54:19 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tas/major_tom#17