Skip to content

feat(code-server): offer a jump to the terminals dock while starting - #356

Merged
antfu merged 1 commit into
mainfrom
feat/code-server-view-in-terminal
Sep 4, 2026
Merged

feat(code-server): offer a jump to the terminals dock while starting#356
antfu merged 1 commit into
mainfrom
feat/code-server-view-in-terminal

Conversation

@antfubot

@antfubot antfubot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

What

While the code-server launcher sits in its starting state ("Starting the editor…" / "Opening the tunnel…"), it now surfaces a View in terminal action that focuses the editor's session in the terminals dock, letting the user watch the process boot instead of staring at a spinner.

The action appears only when it can actually land somewhere: a hub with the terminals plugin dock is hosting the panel and the editor is running as a hub terminal session. Standalone runtimes (CLI, Vite, embedded) have no hub session, so the action stays hidden and the plugin keeps no dependency on `@devframes/hub`.

How

  • The supervisor tags its projected server state with the live hub terminal session id whenever the editor runs through `ctx.terminals`, clearing it on stop/exit.
  • The launcher SPA watches the hub's `devframe:docks` slot to detect the terminals dock and calls `hub:docks:activate` with the session id to jump the user there.

This PR was created with the help of an agent.

While the launcher waits in its starting state, surface a "View in
terminal" action that focuses the editor's session in the terminals
dock, so the user can watch the process boot. The action appears only
when a hub with the terminals dock is hosting the panel and the editor
runs as a hub terminal session.
@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 4, 2026

Copy link
Copy Markdown

◈ PR Lens

🟢 +0 new · 🟠 ~3 changed · 🔴 -0 removed · 1 flow · 12 files · commit f94d78a


Architecture

Architecture diagram for devframes/devframe at f94d78a

3 components touched across 2 lanes.

Open full size


Inside the changed components — 1 view

Component view — Code Server Devframe

Internal launcher UI and supervisor modules coordinating terminal dock jumps.

Architecture view of Component view — Code Server Devframe in devframes/devframe

Data flow

Data flow diagram for devframes/devframe at f94d78a

Jumping to live process in terminals dock

Open full size


Drill down
Built-in Devframes — 3 components
🟡 CHANGED Code Server Devframe

Manages code-server lifecycle and provides launcher UI with hub terminal dock integration.

🟡 CHANGED Launcher UI

Tracks dock availability via shared state and triggers terminal dock activation on user click.

🟡 CHANGED Code Server Supervisor

Supervises the code-server process and publishes the terminal session ID to server status and shared state.


View

  • Architecture lens
  • Data flow lens
  • Expand every detail
  • Show unchanged neighbours

Tip

The boxes under View are live. Tick Architecture lens or Data flow lens to choose which diagrams appear, or Expand every detail to open every drill-down at once. The comment redraws in place a few seconds later.

🪧 More tips
  • Run PR Lens on your own machine: npx skills add coldteadotai/pr-lens installs the agent skill. Then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Draw a diff before it is even a pull request: npx @coldtea/pr-lens-cli analyze --base origin/main reads the diff with your own model key, and npx @coldtea/pr-lens-cli render .pr-lens/graph.json draws the same lenses on your machine.
  • Show unchanged neighbours lists the components this change did not touch alongside the ones it did, so the drill-down shows what the changed code sits next to.
  • GitHub will not let you zoom an image in a comment. The link under each diagram opens it full size on a page of its own, where you can.
  • The CLI's render picks up .github/pr-lens.yml automatically and applies your corrections (renames, exclusions, lane pins) at draw time.
  • Would you rather run it from CI on a key of your own? Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and a model key in your repository secrets, say GEMINI_API_KEY. The Action asks Gemini by default, or OpenAI and any endpoint speaking /chat/completions through its provider input.
  • PR Lens is free for open source. A star on the repository is what keeps it going.
  • Push a new commit and the whole comment re-renders for the new head. An older run never overwrites a newer one, so a slow render cannot put a stale diagram back.
  • The diagrams follow your GitHub theme, so dark mode gets the dark render and light mode the light one, and the moving dots show this pull request's data in motion.

◈ Rendered by PR Lens · crafted with ❤️ by the Coldtea team · Come say hi on Discord

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
devframe Skipped Skipped Sep 4, 2026 4:52am UTC

@antfu
antfu merged commit 1f58245 into main Sep 4, 2026
8 of 14 checks passed
@antfu
antfu deleted the feat/code-server-view-in-terminal branch September 4, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants