Studio Notebook

Claude Code Atlas

Launch Repl And App Wrapper

Follow the wrapper that loads the app shell and hands control to the live REPL.

Why this matters

launchRepl() is the clean handoff point between startup work and the live interactive shell. It loads the shell wrapper lazily, then renders the app frame and the REPL together so the session can start without pulling those components into startup too early.

The wrapper is small on purpose: App owns the shell layout, REPL owns the live screen, and launchRepl() connects the two.

The wrapper code

The snapshot below is the exact wrapper shape from replLauncher.tsx.

export async function launchRepl(root: Root, appProps: AppWrapperProps, replProps: REPLProps, renderAndRun: (root: Root, element: React.ReactNode) => Promise<void>): Promise<void> {
  const {
    App
  } = await import('./components/App.js');
  const {
    REPL
  } = await import('./screens/REPL.js');
  await renderAndRun(root, <App {...appProps}>
      <REPL {...replProps} />
    </App>);
}

What to notice

The App import and the REPL import both happen inside the function, so the shell pieces are loaded only when the interactive session actually starts.

That means launchRepl() is not the app itself. It is the bridge that wraps the app frame around REPL and gives control to the live screen.