Skip to content

[BUG] [alpha] View > Toggle REPL toggles REPL state but AppCore only mounts REPLPanel after separate repl:open gate #74

@Felly-crypto

Description

@Felly-crypto

Summary

The normal menu/shortcut path for REPL toggles REPLContext.state.showPanel, but AppCore only mounts REPLPanel after a separate repl:open lazy-load gate is satisfied.

I could not find an in-repo dispatcher for repl:open tied to the menu path, so View > Toggle REPL / Ctrl+Shift+R can appear to do nothing even though REPL state is toggled.

Steps To Reproduce

  1. Launch the app normally.
  2. Open View > Toggle REPL, or press Ctrl+Shift+R.
  3. Observe whether the REPL panel appears.

Expected

The REPL panel should mount and become visible from the normal menu/shortcut path.

Actual

The menu path only flips REPLContext.state.showPanel, but AppCore mounts REPLPanel only after replUsed() is unlocked by a separate repl:open event.

As a result, the visible REPL panel can remain absent from a normal UI path.

Code Evidence

  • Menu action uses repl.togglePanel():
    • src/components/MenuBar.tsx:455
    • src/components/MenuBar.tsx:758
  • togglePanel() only flips showPanel:
    • src/context/REPLContext.tsx:595
  • AppCore only unlocks REPL lazy mounting on repl:open:
    • src/AppCore.tsx:359
    • src/AppCore.tsx:387
  • Mounted panel is still gated behind replUsed():
    • src/AppCore.tsx:535
  • REPLPanel itself also requires state.showPanel:
    • src/components/repl/REPLPanel.tsx:45

Impact

A standard menu/shortcut entry point for REPL appears broken because the visible panel may never mount.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions