pi-studio 0.11.15 → 0.11.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to `pi-studio` are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.11.16] — 2026-11-16
8
+
9
+ ### Added
10
+ - `/studio --no-browser --copy-url` starts Studio without opening a browser and copies its URL, so you can paste it into a browser you already have open, such as a Muxy browser pane beside Pi. It works with a file too: `/studio notes.md --no-browser --copy-url`. `/studio --copy-url` on its own still copies the running Studio's URL without starting one. Copying needs Pi's terminal interface, as before.
11
+
12
+ ### Fixed
13
+ - **File → Open file…** opens the file you choose when the Files list has been scrolled. Before, with a file already open, clicking a file's row could do nothing, and so could pasting a path after scrolling. The right pane's scroll position changed as the list gave way to the view it came from; Studio took that for newer work in the buffer and cancelled the open without a message. **Open in Document** in the Files view wasn't affected. Esc and Cancel still return the pane to where it was.
14
+
7
15
  ## [0.11.15] — 2026-11-11
8
16
 
9
17
  ### Fixed
package/README.md CHANGED
@@ -68,6 +68,7 @@ Or from GitHub, `pi install https://github.com/omaclaren/pi-studio`, or once wit
68
68
  | `/studio --listen-all` | Listen on all interfaces, for containers ([see below](#network-and-ssh)) |
69
69
  | `/studio --status`, `--stop` | Show the server's status, or stop it |
70
70
  | `/studio --copy-url` | Copy the running Studio's URL, for a terminal too narrow to show it whole. Over SSH, Pi also sends it to your terminal's clipboard (OSC 52), which works if the terminal allows it; set `PI_CLIPBOARD_OSC52=1` where Pi can't tell it's remote, as in some tmux sessions |
71
+ | `/studio --no-browser --copy-url` | Start Studio without a browser and copy its URL, to paste into a browser that's already open, such as a Muxy browser pane |
71
72
  | `/studio-replace` | Replace the open Studio view. In dual editor mode, move it to a new tab here |
72
73
  | `/studio-editor-only [file]` | Open an extra editor tab (single editor mode) |
73
74
  | `/studio-current <file>` | Load a file into the open Studio tab (single editor mode) |
package/ROADMAP.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  This is the current planning source of truth for Studio work. `NEXT-STAGE.md` is historical; `TODO.md` tracks smaller backlog items that are not yet assigned to a release.
4
4
 
5
- ## Current status (11 Nov 2026)
5
+ ## Current status (16 Nov 2026)
6
6
 
7
- `0.11.15` is the current release. Studio is in a feature freeze from `0.11.9`, for use in normal work. Before the freeze, `0.11.9` added the images and PDFs a REPL entry's code saved, shown under the entry, and a PDF header that fits on one line. Each release since has been an approved exception. `0.11.10` works with pi-repl `0.12.1` so that, with both loaded, the agent is told each REPL record entry once. `0.11.11` gets Studio's URL out of a terminal too narrow to show it: `/studio --copy-url` copies it, and `PI_STUDIO_URL_FILE` keeps it in a file for programs ([#7](https://github.com/omaclaren/pi-studio/issues/7)). `0.11.12` makes **Follow** one switch, fixes two WebKit scrolling glitches in Muxy, and lines Working's sections up under their step. `0.11.13` gives Studio's tabs ASCII titles, working around a crash in Muxy 2.3.0's browser on the ellipsis in Studio's title. `0.11.14` lets **Suggest** offer a next prompt when Pi's last reply asks you a question, as pi-next now does. `0.11.15` keeps the line Studio types to run a Python cell out of the cell's record when IPython 9 or Python's own REPL wraps it. During the freeze, changes are limited to fixes for failures in normal use, lost data, effects on other people's processes or files, and security. [TODO.md](TODO.md) lists the known limits and what comes after the freeze.
7
+ `0.11.16` is the current release. Studio is in a feature freeze from `0.11.9`, for use in normal work. Before the freeze, `0.11.9` added the images and PDFs a REPL entry's code saved, shown under the entry, and a PDF header that fits on one line. Each release since has been an approved exception. `0.11.10` works with pi-repl `0.12.1` so that, with both loaded, the agent is told each REPL record entry once. `0.11.11` gets Studio's URL out of a terminal too narrow to show it: `/studio --copy-url` copies it, and `PI_STUDIO_URL_FILE` keeps it in a file for programs ([#7](https://github.com/omaclaren/pi-studio/issues/7)). `0.11.12` makes **Follow** one switch, fixes two WebKit scrolling glitches in Muxy, and lines Working's sections up under their step. `0.11.13` gives Studio's tabs ASCII titles, working around a crash in Muxy 2.3.0's browser on the ellipsis in Studio's title. `0.11.14` lets **Suggest** offer a next prompt when Pi's last reply asks you a question, as pi-next now does. `0.11.15` keeps the line Studio types to run a Python cell out of the cell's record when IPython 9 or Python's own REPL wraps it. `0.11.16` makes **File → Open file…** open the chosen file after the Files list is scrolled, and adds `/studio --no-browser --copy-url`, which starts Studio without a browser and copies its URL. During the freeze, changes are limited to fixes for failures in normal use, lost data, effects on other people's processes or files, and security. [TODO.md](TODO.md) lists the known limits and what comes after the freeze.
8
8
 
9
9
  `0.10.0` (14 Oct) made the buffer-first workspace the default, as **dual editor mode** (Prompt and Document), with **single editor mode** one switch away (footer button, `/studio --single`). It went through real course use as private alpha candidates 49–69. The `PI_STUDIO_*` flags described further down are development overrides only: when any is set it decides, and the mode switch is hidden.
10
10
 
@@ -19455,7 +19455,8 @@
19455
19455
  if (bufferViewRestore) bufferViewRestore.editor = null;
19456
19456
  }, { passive: true, capture: true });
19457
19457
  for (const [element, pane] of [[sourcePreviewEl, "source"], [critiqueViewEl, "right"]]) {
19458
- for (const type of ["wheel", "touchstart", "pointerdown", "keydown"]) element.addEventListener(type, () => { if (bufferViewRestore) bufferViewRestore[pane] = null; }, { passive: true });
19458
+ // A key another handler took, such as Enter or Esc in the file picker, isn't scrolling by hand.
19459
+ for (const type of ["wheel", "touchstart", "pointerdown", "keydown"]) element.addEventListener(type, event => { if (bufferViewRestore && !(type === "keydown" && event.defaultPrevented)) bufferViewRestore[pane] = null; }, { passive: true });
19459
19460
  element.addEventListener("scroll", () => scheduleWorkspacePersistence(), { passive: true });
19460
19461
  }
19461
19462
  syncStudioBufferSwitcher();
@@ -19497,9 +19498,11 @@
19497
19498
  if (rightView !== "files") return;
19498
19499
  if (!pick.returnView || pick.returnView === "files") { renderFilesView(); return; }
19499
19500
  setRightView(pick.returnView);
19500
- window.requestAnimationFrame(() => {
19501
- if (rightView === pick.returnView) { critiqueViewEl.scrollTop = pick.returnTop || 0; critiqueViewEl.scrollLeft = pick.returnLeft || 0; }
19502
- });
19501
+ // The pane's place is the buffer's again, and is held at what it was until the view has
19502
+ // redrawn. Left to the pane, it changed as the Files list gave way, which counted as newer
19503
+ // work in the buffer and silently cancelled the open that follows (Oliver, 16 Nov).
19504
+ restoreDocumentFollowScroll(pick.returnTop || 0);
19505
+ window.requestAnimationFrame(() => { if (rightView === pick.returnView) critiqueViewEl.scrollLeft = pick.returnLeft || 0; });
19503
19506
  }
19504
19507
  function cancelStudioFilePick(options = {}) {
19505
19508
  const pick = studioFilePick;
package/index.ts CHANGED
@@ -13255,6 +13255,8 @@ interface StudioLaunchFlags {
13255
13255
  listenAll: boolean;
13256
13256
  port?: number;
13257
13257
  editorMode?: "single" | "dual";
13258
+ /** With --no-browser: copy the URL this launch prints (Oliver, 12 Nov). */
13259
+ copyUrl?: boolean;
13258
13260
  error?: string;
13259
13261
  }
13260
13262
 
@@ -13264,6 +13266,7 @@ function parseStudioLaunchOpenFlags(rawArgs: string): StudioLaunchFlags {
13264
13266
  const remaining: string[] = [];
13265
13267
  let openRemoteBrowser = false;
13266
13268
  let noBrowser = false;
13269
+ let copyUrl = false;
13267
13270
  let watchPdf = false;
13268
13271
  let listenAll = false;
13269
13272
  let port: number | undefined;
@@ -13283,6 +13286,10 @@ function parseStudioLaunchOpenFlags(rawArgs: string): StudioLaunchFlags {
13283
13286
  noBrowser = true;
13284
13287
  continue;
13285
13288
  }
13289
+ if (token === "--copy-url") {
13290
+ copyUrl = true;
13291
+ continue;
13292
+ }
13286
13293
  if (token === "--watch" || token === "--auto-refresh") {
13287
13294
  watchPdf = true;
13288
13295
  continue;
@@ -13308,7 +13315,12 @@ function parseStudioLaunchOpenFlags(rawArgs: string): StudioLaunchFlags {
13308
13315
  if (openRemoteBrowser && noBrowser) {
13309
13316
  return { args: rawArgs, openRemoteBrowser, noBrowser, watchPdf, listenAll, port, error: "Use either --no-browser or --open-browser, not both." };
13310
13317
  }
13311
- return { args: remaining.join(" "), openRemoteBrowser, noBrowser, watchPdf, listenAll, port, ...(editorMode ? { editorMode } : {}) };
13318
+ // --copy-url never opens a browser: alone it copies the running Studio's URL (handled by
13319
+ // /studio before this parser), and in a launch it goes with --no-browser.
13320
+ if (copyUrl && !noBrowser) {
13321
+ return { args: rawArgs, openRemoteBrowser, noBrowser, watchPdf, listenAll, port, error: "Add --no-browser to --copy-url, or run /studio --copy-url for the running Studio's URL." };
13322
+ }
13323
+ return { args: remaining.join(" "), openRemoteBrowser, noBrowser, watchPdf, listenAll, port, ...(editorMode ? { editorMode } : {}), ...(copyUrl ? { copyUrl } : {}) };
13312
13324
  }
13313
13325
 
13314
13326
  function shouldAutoOpenStudioBrowser(options?: { openRemoteBrowser?: boolean; noBrowser?: boolean }): boolean {
@@ -20563,6 +20575,14 @@ export default function (pi: ExtensionAPI) {
20563
20575
  })));
20564
20576
  return { ok: true, workspaceId: workspaceId ?? null, clean: Boolean(workspaceId && studioBufferStateStore.hasCleanLeave(workspaceId)) };
20565
20577
  });
20578
+ // --no-browser --copy-url: the URL a launch just printed, on the clipboard, to paste into a
20579
+ // browser pane that's already open (Oliver, 12 Nov). The same limits as /studio --copy-url.
20580
+ const copyLaunchedStudioUrl = async (url: string, flags: StudioLaunchFlags, ctx: ExtensionCommandContext) => {
20581
+ if (!flags.copyUrl) return;
20582
+ const result = await copyStudioUrl({ mode: ctx.mode, running: true, url, copy: copyToClipboard });
20583
+ ctx.ui.notify(result.message, result.ok ? "info" : "warning");
20584
+ };
20585
+
20566
20586
  // /studio-replace in dual editor mode: move the open Studio (or the last one) here.
20567
20587
  const moveHostedStudioHere = async (trimmed: string, ctx: ExtensionCommandContext) => {
20568
20588
  const flags = parseStudioLaunchOpenFlags(trimmed);
@@ -20590,6 +20610,7 @@ export default function (pi: ExtensionAPI) {
20590
20610
  ?? (flags.noBrowser ? buildStudioForwardingHint(state.port, url, { prefix: "Browser auto-open was skipped because --no-browser was used." }) : null);
20591
20611
  if (hint) ctx.ui.notify(hint, "info");
20592
20612
  if (state.listenAll) ctx.ui.notify(buildStudioListenAllWarning(state.port, url), "warning");
20613
+ await copyLaunchedStudioUrl(url, flags, ctx);
20593
20614
  }
20594
20615
  };
20595
20616
 
@@ -21575,6 +21596,7 @@ export default function (pi: ExtensionAPI) {
21575
21596
  const kept = currentFullStudioUrl(serverState);
21576
21597
  publishStudioUrlFile(kept, serverState, ctx);
21577
21598
  ctx.ui.notify(`Studio URL: ${kept}`, "info");
21599
+ await copyLaunchedStudioUrl(kept, flags, ctx);
21578
21600
  return;
21579
21601
  }
21580
21602
  // Oliver, 14 Oct: plain /studio reopens the last workspace when its tab is gone, asking to
@@ -21596,6 +21618,7 @@ export default function (pi: ExtensionAPI) {
21596
21618
  ?? (flags.noBrowser ? buildStudioForwardingHint(state.port, url, { prefix: "Browser auto-open was skipped because --no-browser was used." }) : null);
21597
21619
  if (hint) ctx.ui.notify(hint, "info");
21598
21620
  if (state.listenAll) ctx.ui.notify(buildStudioListenAllWarning(state.port, url), "warning");
21621
+ await copyLaunchedStudioUrl(url, flags, ctx);
21599
21622
  }
21600
21623
  return;
21601
21624
  }
@@ -21644,6 +21667,7 @@ export default function (pi: ExtensionAPI) {
21644
21667
  ?? (flags.noBrowser ? buildStudioForwardingHint(state.port, url, { prefix: "Browser auto-open was skipped because --no-browser was used." }) : null);
21645
21668
  if (hint) ctx.ui.notify(hint, "info");
21646
21669
  if (state.listenAll) ctx.ui.notify(buildStudioListenAllWarning(state.port, url), "warning");
21670
+ await copyLaunchedStudioUrl(url, flags, ctx);
21647
21671
  }
21648
21672
  } catch (error) { ctx.ui.notify(`Studio launch failed; existing work was kept: ${error instanceof Error ? error.message : String(error)}`, "error"); }
21649
21673
  };
@@ -21759,6 +21783,7 @@ export default function (pi: ExtensionAPI) {
21759
21783
  ctx.ui.notify(`Read-only PDF preview${automatic ? " requested" : " ready; browser auto-open skipped"}: ${url}`, "info");
21760
21784
  const hint = state.listenAll ? null : buildStudioSshTunnelHint(state.port, url) ?? (launchOpenFlags.noBrowser ? buildStudioForwardingHint(state.port, url) : null);
21761
21785
  if (hint) ctx.ui.notify(hint, "info");
21786
+ await copyLaunchedStudioUrl(url, launchOpenFlags, ctx);
21762
21787
  } catch (error) { ctx.ui.notify(`PDF preview failed: ${error instanceof Error ? error.message : String(error)}`, "error"); }
21763
21788
  return;
21764
21789
  }
@@ -21782,6 +21807,7 @@ export default function (pi: ExtensionAPI) {
21782
21807
  ?? (launchOpenFlags.noBrowser ? buildStudioForwardingHint(serverState.port, url, { prefix: "Browser auto-open was skipped because --no-browser was used." }) : null);
21783
21808
  if (tunnelHint) ctx.ui.notify(tunnelHint, "info");
21784
21809
  if (serverState.listenAll) ctx.ui.notify(buildStudioListenAllWarning(serverState.port, url), "warning");
21810
+ await copyLaunchedStudioUrl(url, launchOpenFlags, ctx);
21785
21811
  }
21786
21812
  return;
21787
21813
  }
@@ -21876,6 +21902,7 @@ export default function (pi: ExtensionAPI) {
21876
21902
  ctx.ui.notify(`Studio URL: ${url}`, "info");
21877
21903
  if (tunnelHint) ctx.ui.notify(tunnelHint, "info");
21878
21904
  if (state.listenAll) ctx.ui.notify(buildStudioListenAllWarning(state.port, url), "warning");
21905
+ await copyLaunchedStudioUrl(url, launchOpenFlags, ctx);
21879
21906
  }
21880
21907
  };
21881
21908
 
@@ -21931,6 +21958,7 @@ export default function (pi: ExtensionAPI) {
21931
21958
  + " /studio --open-remote Over SSH, open the remote browser anyway\n"
21932
21959
  + " /studio --status Show studio status\n"
21933
21960
  + " /studio --copy-url Copy the running Studio's URL to the clipboard\n"
21961
+ + " /studio --no-browser --copy-url Start Studio without a browser and copy its URL\n"
21934
21962
  + " /studio --stop Stop studio server\n"
21935
21963
  + " /studio --single Use single editor mode (one editor), and remember it\n"
21936
21964
  + " /studio --dual Use dual editor mode (Prompt and Document), the default\n"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-studio",
3
- "version": "0.11.15",
3
+ "version": "0.11.16",
4
4
  "description": "Two-pane browser workspace for pi with prompt/response editing, annotations, critiques, active quiz, prompt/response history, live previews, and tmux-backed REPL/literate REPL workflows",
5
5
  "type": "module",
6
6
  "license": "MIT",