lean-ctx icon indicating copy to clipboard operation
lean-ctx copied to clipboard

Feature request: Open dashboard in VS Code Simple Browser instead of external browser

Open ITFinesse opened this issue 5 months ago • 2 comments

Summary

When running lean-ctx dashboard, it opens in the system's default external browser. It would be better if it could open in VS Code's built-in Simple Browser instead, keeping the workflow inside the editor.

Problem

  • lean-ctx dashboard launches at http://localhost:3333 and opens externally
  • There's no built-in way to make this portable across workspaces/projects without either modifying user-level VS Code settings or adding per-project .vscode/tasks.json entries
  • Neither option travels cleanly with the developer across different projects

Suggested Solution

Add a config option or CLI flag to control how the dashboard opens, e.g.:

[dashboard]
open_in = "vscode"  # options: browser (default), vscode, none

Or a CLI flag:

lean-ctx dashboard --open vscode

When vscode is selected, lean-ctx could use the code --open-url command to open the dashboard URL in VS Code's Simple Browser, keeping everything inside the editor without requiring any workspace-level config.

Environment

  • OS: Windows
  • Editor: VS Code

ITFinesse avatar Jun 15 '26 13:06 ITFinesse

nice one :)

yvgude avatar Jun 15 '26 13:06 yvgude

Implemented on main (4c96fe305), shipping in v3.8.7.

You can now control how the dashboard URL is revealed:

lean-ctx dashboard --open=browser   # default: system browser
lean-ctx dashboard --open=none      # start the server, open nothing (alias: --no-open)
lean-ctx dashboard --open=vscode    # print the steps to open in VS Code's Simple Browser

Or persist it without a flag:

export LEAN_CTX_DASHBOARD_OPEN=vscode

Precedence is --open= > LEAN_CTX_DASHBOARD_OPEN > default (browser).

On vscode, lean-ctx prints the exact URL plus the Command Palette steps (Simple Browser: Show → URL) rather than auto-launching: there is no portable, reliable CLI hook to push a URL into the Simple Browser across platforms/remote setups, and --open=none covers the "don't touch my browser" case cleanly. If a dependable mechanism appears we can wire it behind the same flag without a breaking change. Closing as implemented — feedback welcome once v3.8.7 is out.

yvgude avatar Jun 15 '26 14:06 yvgude