pi-studio 0.9.53 → 0.9.55

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,29 @@ All notable changes to `pi-studio` are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.55] — 2026-09-02
8
+
9
+ ### Changed
10
+ - Let side questions use **X-high** and **Max** thinking when the active model supports them, while retaining **Low** as the default.
11
+
12
+ ### Fixed
13
+ - Open watched previews launched from Files or local Studio links with the preview pane focused, matching `/studio --watch`, and label the exposed raw source clearly as read-only and disk-following.
14
+ - Normalize Studio buttons and dropdown select controls with flat browser-neutral styling and consistent chevrons instead of WebKit's native shaded controls.
15
+
16
+ ## [0.9.54] — 2026-09-02
17
+
18
+ ### Added
19
+ - Add read-only **Preview file (follow changes)** tabs from Files, local text links, and `/studio --watch <file>`. Followed previews use canonical disk paths, bounded and expiring path-bound tab capabilities, debounced polling, SHA-256 content revisions, atomic-save replacement handling, staged last-good rendering, and stable-anchor scroll restoration with ratio fallback through temporary read or render failures.
20
+ - Track canonical SHA-256 disk revisions for file-backed editor documents and retain the revision behind dirty recovery state.
21
+ - Add `Cmd/Ctrl+Shift+S` for Save As and explicit Save As replacement confirmation when the target already exists.
22
+
23
+ ### Changed
24
+ - Make `Cmd/Ctrl+S` save a file-backed editor directly only while its known disk revision still matches, without routine confirmation; empty documents are valid save content.
25
+ - Use same-directory exclusive temporary files and atomic commits for Studio disk writes, while refusing replacement symlinks and hard-linked targets, preserving ordinary mode/ownership metadata where supported, and revalidating the expected revision immediately before commit. Platform-specific ACLs and extended attributes are not guaranteed to survive replacement.
26
+
27
+ ### Fixed
28
+ - Preserve dirty editor text when a file changes externally and offer an explicit **Reload / Save As… / Overwrite / Cancel** conflict decision instead of silently replacing either version.
29
+
7
30
  ## [0.9.53] — 2026-08-31
8
31
 
9
32
  ### Added
package/README.md CHANGED
@@ -37,12 +37,14 @@ _The video shows an earlier version of the Studio interface. The basic workflow
37
37
  - Adds a right-pane **Side questions** thread for contextual questions that stay outside the main Pi conversation unless explicitly promoted. It can start with the editor selection, the Markdown/LaTeX heading block at the cursor, nearby unstructured text, the whole editor, the displayed response, or no starting text; independently, it can use read-only tools to map, search, and read the document folder, repository, or another chosen folder—including extracted PDF, DOCX, ODT, and EPUB text—and can optionally search the web through Brave Search.
38
38
  - Includes a live **Working** view for following current model/tool activity, with `All` / `Thinking` / `Tools` filters, image previews for image-producing tool outputs, plus **Load visible into editor** and **Copy visible** actions; when cycling response history, Working follows saved working details for the selected response when available, and `Cmd/Ctrl+Alt+1–8` switches directly between right-pane views while `Cmd/Ctrl+Alt+P` / `Cmd/Ctrl+Alt+E` / `Cmd/Ctrl+Alt+W` / `Cmd/Ctrl+Alt+F` / `Cmd/Ctrl+Alt+Q` keep quick mnemonic shortcuts for Response Preview, Editor Preview, Working, Files, and Side questions
39
39
  - Includes a right-pane **Changes** view for browsing the current git diff by file, previewing per-file diffs, opening changed files, loading the full diff into the editor, and copying the diff
40
- - Includes a right-pane **Files** view rooted in folders allowed for the current Studio session, with an **Allow folder…** action and location selector; exact-file grants can still be opened independently without exposing their parent folders. Files supports sorting by name/modified time/size, opening folders or the current root in Finder/the system file manager, loading text/code/CSV/TSV documents into the editor, previewing PDFs/images, opening previews in new Studio tabs, converting DOCX/ODT documents to editable Markdown when Pandoc is available after confirmation, copying paths, setting the current folder as the Studio working directory, and revealing files in the file manager
40
+ - Includes a right-pane **Files** view rooted in folders allowed for the current Studio session, with an **Allow folder…** action and location selector; exact-file grants can still be opened independently without exposing their parent folders. Files supports sorting by name/modified time/size, opening folders or the current root in Finder/the system file manager, loading text/code/CSV/TSV documents into the editor, opening a read-only **Preview (follow)** tab whose disk content is authoritative, previewing PDFs/images, opening previews in new Studio tabs, converting DOCX/ODT documents to editable Markdown when Pandoc is available after confirmation, copying paths, setting the current folder as the Studio working directory, and revealing files in the file manager
41
41
  - Imports detached text-file copies either through the browser's file picker or from a path on the computer running Pi, keeping the path option available in embedded and remote browser views; imported copies remain detached until saved or opened as file-backed documents
42
42
  - Includes an optional tmux-backed **REPL** view for Shell, Python, IPython, Julia, R, GHCi, and Clojure sessions, with Raw/Literate send modes, `Cmd/Ctrl+Shift+Enter` **Send to REPL**, session start/stop/interrupt controls, a compact refresh-persistent **Studio REPL Record** of user and Pi-sent code, a secondary raw tmux mirror, agent-facing `studio_repl_status` / `studio_repl_send` tools, and Markdown/PDF/HTML export
43
43
  - Includes a local persistent scratchpad for quick notes you want to keep out of the main editor until you're ready to copy or insert them, with a **Recent…** picker for recovering scratchpads saved under earlier file/draft identities
44
44
  - Includes a docked **Outline** rail for navigating document structure in the current editor text, with clickable entries that jump in the raw editor and reveal matching preview locations when available
45
45
  - Restores each browser tab’s editor workspace after refresh or cmux hidden-surface reconstruction, and provides an explicit **Reset editor** action when you want to discard the restored draft and return the tab to a fresh blank draft without changing responses or saved files
46
+ - Tracks an SHA-256 disk revision for file-backed editors: `Cmd/Ctrl+S` checks that revision before staging and again immediately before atomic replacement, external changes produce an explicit **Reload / Save As… / Overwrite / Cancel** decision, and even **Overwrite** / Save As **Replace** must still match the revision Studio reported when confirmation opened. `Cmd/Ctrl+Shift+S` performs no-clobber Save As unless you explicitly confirm the current target. Studio preserves ordinary mode and ownership metadata where the platform permits and refuses to split hard-linked files; file-system-specific ACLs and extended attributes may not survive atomic replacement. As with other file system editors, unrelated writers do not participate in a shared atomic compare-and-swap, so version control remains appropriate for highly concurrent files.
47
+ - Opens text/code documents as read-only followed previews through **Preview file (follow changes)**, Files' **Preview (follow)** action, or `/studio --watch <file>`; updates are debounced and content-hashed, atomic-save replacements are followed, reading position is restored by a stable content anchor with ratio fallback, and temporary read/render failures retain the last good preview
46
48
  - Turns local preview links, including links inside sandboxed HTML previews, into Studio actions: PDFs open in the embedded viewer, images open in a zoomable focus viewer, PDF/image links can open in a new Studio preview tab, text/code/CSV/TSV document links can open in a new editor tab, DOCX/ODT links can be converted to editable Markdown, and right-click menus provide **Open here**, **Reveal in file manager**, and **Copy path** for local resources
47
49
  - Includes local comments anchored to selections/lines, shown in a docked **Comments** rail, with transient **Comment** / **Jump** actions from raw-editor selections plus editor-preview selections for Markdown, LaTeX, code/text/diff previews, and an opt-in comment mode for editor HTML previews; source-anchored comments can be toggled into inline `[an: ...]` annotations when you want comments reflected in the document text
48
50
  - Browses response history (`Prev/Next/Last`) and loads either:
@@ -69,7 +71,7 @@ _The video shows an earlier version of the Studio interface. The basic workflow
69
71
  |---|---|
70
72
  | `/studio` | Open in Muxy or cmux when available, otherwise the system browser, with the last assistant response (fallback: blank) |
71
73
  | `/studio <path>` | Open a text file in the editor, or a PDF in a read-only companion preview tab |
72
- | `/studio --watch <pdf>` | Open a local PDF with stable-file auto-refresh enabled |
74
+ | `/studio --watch <file>` | Open a local text/code file in a read-only preview that follows disk changes, or a PDF with stable-file auto-refresh enabled |
73
75
  | `/studio --last` | Force last response |
74
76
  | `/studio --blank` | Force blank editor |
75
77
  | `/studio --no-browser` | Start/print the Studio URL without opening a browser, useful for forwarded or phone/browser sessions |
@@ -78,7 +80,7 @@ _The video shows an earlier version of the Studio interface. The basic workflow
78
80
  | `/studio --stop` | Stop studio server |
79
81
  | `/studio --help` | Show help |
80
82
  | `/studio-replace [path\|--blank\|--last]` | Replace the current full Studio view with a new full Studio view |
81
- | `/studio-editor-only [path\|--blank\|--last]` | Open an editor-only view, or a read-only PDF preview; multiple companion views may be open at once |
83
+ | `/studio-editor-only [path\|--blank\|--last]` | Open an editor-only view, or a read-only PDF preview; add `--watch <file>` for a followed text/PDF companion view |
82
84
  | `/studio-current <path>` | Load a file into currently open Studio tab(s) without opening a new browser window |
83
85
  | `/studio-pdf [path] [options]` | Export a local file, or the last model response when no path is given, via the Studio PDF pipeline |
84
86
  | `/studio-html [path]` | Export a local file, or the last model response when no path is given, to standalone HTML via the Studio preview pipeline |
@@ -116,6 +118,7 @@ Open **Review → Side question**, select **Side questions** in the right pane,
116
118
  - **Also use files from** controls the read-only boundary available to the side agent: no other files, the document folder, the current repository, or another chosen folder. Related-file access requires an allowed folder for the current Studio session; if the selected root is not already allowed, Studio names the canonical folder and asks before starting the thread. An exact-file grant never exposes its parent folder.
117
119
  - With **Repository** selected, **Include Git context** can capture status, staged and unstaged tracked-file changes, and up to 20 recent commit summaries. The bounded snapshot is frozen when the thread starts and exposed through fixed read-only tools; untracked contents remain available only through the existing root-confined file reader.
118
120
  - **Include the current main conversation snapshot** is opt-in. Side questions and answers otherwise never enter the main Pi history; **Bring to main conversation** is the explicit handoff.
121
+ - **Thinking** defaults to **Low** for quick asides. **X-high** and **Max** appear when the active model advertises support, for complex side questions where the extra latency is worthwhile.
119
122
  - Local context tools can map filenames, search readable text, and read selected ranges. Studio revalidates the allowed context root before prompts and built-in local tool calls; symlinks, root replacement, and traversal outside that root are rejected. PDF extraction uses `pdftotext`; DOCX, ODT, and EPUB extraction uses Pandoc.
120
123
  - **Allow web search** is opt-in and appears when `BRAVE_API_KEY` is available to the Pi process. Model-chosen search queries are sent to Brave Search; the side agent is instructed not to copy private local passages into queries. Web answers cite result URLs and identify when they rely on search-result snippets rather than full page content.
121
124
  - **Additional Pi tools** lists eligible tools already registered by the user's installed Pi extensions. Selection is explicit, remembered locally, and frozen when the thread starts. Studio reloads only the extensions owning the selected tools into the isolated side runtime and activates only those tool names; it does not import or depend on any particular third-party extension. Gateway tools are labelled and require an additional confirmation because selecting one may expose further services configured behind it.
@@ -149,6 +152,8 @@ caption: Optional caption
149
152
 
150
153
  To view an existing PDF directly, run `/studio report.pdf` (or `/studio "path with spaces/report.pdf"`). The PDF opens read-only in a focused companion preview, even when the full Studio workspace is already open. A `#page=N` suffix selects the initial page. Auto-refresh is off by default; use `/studio --watch report.pdf` to start with it on, or toggle **Auto-refresh** in the PDF card or focused viewer. Studio checks only while the tab is visible and waits for two matching file-version observations before reloading, which avoids reading a PDF while LaTeX is still writing it. **Cmd/Ctrl+Alt+R** manually refreshes the focused or visible PDF. This is distinct from `/studio-pdf`, which exports Markdown, LaTeX, code, or the last response to a new PDF.
151
154
 
155
+ For a disk-authoritative text or code preview, run `/studio --watch notes.md` or choose **Preview file (follow changes)** from a local-link menu / **Preview (follow)** in Files. This opens a transient read-only companion tab with the preview pane focused; leaving pane focus reveals the same disk-following text as **Source** with a visible **Read-only · follows disk** badge rather than as an editable buffer. Studio polls the canonical file, debounces change bursts, compares SHA-256 content revisions, accepts ordinary and atomic-replacement saves, and never writes back. Each watcher socket is bound to the exact path in a bounded, expiring server-created tab capability; if that identity expires before a reload or reconnect, the tab stays read-only and asks you to open a fresh watched preview. A missing, unreadable, oversized, binary, or path-replaced source leaves the last good preview visible and automatically recovers when the same canonical file becomes readable again. Render failures likewise retain the last successfully staged document rather than replacing it with partial output. On successful updates, Studio restores a nearby stable content anchor where possible and falls back to the previous scroll ratio.
156
+
152
157
  ### Mermaid icons
153
158
 
154
159
  Studio's live previews and standalone HTML exports support Mermaid's `lucide:*` and `logos:*` icon nodes. The corresponding Iconify packs load lazily, so Studio does not fetch either pack unless a diagram uses it. Mermaid and the browser icon-pack URLs are pinned to tested versions.
package/ROADMAP.md CHANGED
@@ -34,9 +34,9 @@ A focused portability and affordance pass:
34
34
 
35
35
  This release must not add Muxy-specific branches or attempt to instrument opaque Quarto/authored-HTML iframe contents.
36
36
 
37
- ## 0.9.53 — Resource locations
37
+ ## 0.9.53 — Resource locations (shipped 2026-08-31)
38
38
 
39
- Status: implementation and release-candidate validation complete; push, tag, and npm publication await explicit approval. The bounded canonical workspace registry now governs explicit local links, the Files view, passive images/PDFs, and Side questions' related-file roots.
39
+ The bounded canonical workspace registry governs explicit local links, the Files view, passive images/PDFs, and Side questions' related-file roots.
40
40
 
41
41
  Replace the single-root assumption with explicit resource grants:
42
42
 
@@ -51,9 +51,9 @@ Replace the single-root assumption with explicit resource grants:
51
51
 
52
52
  The resource-location registry should be workspace-level rather than tied to the current editor document so it remains compatible with multiple buffers. Remembering grants per project can follow after the session-only model is proven.
53
53
 
54
- ## 0.9.54 — Disk-backed preview and safe save
54
+ ## 0.9.54 — Disk-backed preview and safe save (shipped 2026-09-02)
55
55
 
56
- Planned after resource locations stabilize:
56
+ Builds on the resource-location foundation:
57
57
 
58
58
  - distinguish editable buffers, whose in-memory text drives Editor Preview, from read-only watched previews, whose file on disk is authoritative;
59
59
  - add a read-only **Preview file (follow changes)** workflow using the proven debounce, content-hash, atomic-save, preserved-scroll, and last-good-render behaviour from `pandoc-glance` / `pi-markdown-preview` without making Studio depend on another extension;
@@ -61,6 +61,14 @@ Planned after resource locations stabilize:
61
61
  - add **Cmd/Ctrl+Shift+S** for Save As and keep autosave opt-in rather than default;
62
62
  - carry the resulting disk identity and revision model forward into `StudioBufferStore`.
63
63
 
64
+ ## 0.9.55 — Watched-preview and control polish (shipped 2026-09-02)
65
+
66
+ A browser-neutral UX pass before buffer-first work:
67
+
68
+ - focus followed previews on their rendered pane and label the exposed source as read-only and disk-following;
69
+ - normalize Studio buttons and dropdown controls across Chromium and WebKit without changing native select interaction;
70
+ - expose X-high and Max side-question thinking only when supported by the active model, while retaining Low as the default.
71
+
64
72
  ## 0.10.0 — Buffer-first editing
65
73
 
66
74
  The first architectural `0.10` release should add: