Skip to content

Commit 07df898

Browse files
claudesinelaw
authored andcommitted
docs: catch up 0.2.26 with master — devcontainer, remote indicator, explorer ops
Rebased onto master's 100+ post-CHANGELOG commits; the significant user-visible additions that needed docs were: - Devcontainer expansion: Create Config, Show Ports, Show Logs, live build-log split, failed-attach recovery popup, initializeCommand ordering, LSP-in-container routing. Rewrote features/devcontainer.md with the full palette-command list and the lifecycle story. - {remote} status-bar indicator with context-aware menu, Connecting / Connected / FailedAttach states. Added to the Status Bar section in configuration/index.md. - File explorer: Ctrl+C/X/V + Shift+Up/Down multi-select, cut-dim UX, cross-dir conflict prompt, and keyboard Up/Down preview (#1570). - Session persistence: editor.restore_previous_session + --restore / --no-restore flags, decoupled from hot-exit content. - Terminal: terminal.shell override (#1637) + Suspend Process. - Quick Open / Go-to Line live cursor preview. - LSP: remote-aware spawn, command_exists and ProcessLimits threaded through Authority; container-aware "not installed" copy. - Editing: highlight_current_column; post-EOF background shading (#779). - Search & replace: \n / \t / \r / \\ escapes in regex replacement. - Plugin API: spawnHostProcess().kill(), BufferInfo.splits, setRemoteIndicatorState / clearRemoteIndicatorState, Dashboard registerSection remover + clearAllSections. CHANGELOG: added the above as bullets under 0.2.26 Improvements / Bug Fixes; kept each entry to one or two lines. https://claude.ai/code/session_01BryXehUaPx1534gN9jF8YH
1 parent 453eaca commit 07df898

12 files changed

Lines changed: 99 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,27 @@
88

99
* **Dashboard plugin**: Built-in TUI dashboard that replaces the usual "[No Name]" with weather info, git status + repo URL, a "vs master" row (commits ahead/behind), open GitHub PRs for the current repo, and disk usage for common mounts. Enable via `plugins.dashboard.enabled` in `config.json` or the Settings UI. Third-party plugins and `init.ts` can contribute their own rows via the `registerSection()` API.
1010

11-
* **Devcontainer support**: Detects `.devcontainer/devcontainer.json` and offers Attach / Rebuild via the [devcontainer CLI](https://github.com/devcontainers/cli), which you need to install. Embedded terminal runs inside the devcontainer.
11+
* **Devcontainer support**: Detects `.devcontainer/devcontainer.json` and offers Attach / Rebuild / Detach via the [devcontainer CLI](https://github.com/devcontainers/cli), which you need to install. Embedded terminal, filesystem, and LSP servers all run inside the devcontainer. `Dev Container: Create Config` scaffolds a config for projects that don't have one. `Dev Container: Show Ports` merges configured `forwardPorts` with live `docker port` output; `Dev Container: Show Logs` captures the container's recent stdout/stderr. The build log streams into a workspace split, and failed attaches offer Retry/Show Logs/Detach through a recovery popup. `initializeCommand` runs on attach.
12+
13+
* **`{remote}` status-bar indicator**: Clickable status-bar element that lights up when you're attached to an SSH remote or devcontainer, with a context-aware menu (detach, show logs, retry attach, …). Surfaces `Connecting` / `Connected` / `FailedAttach` states. Fresh's config v1→v2 migration injects `{remote}` into customized `status_bar.left`.
14+
15+
* **Hot-exit restore split from session restore**: `editor.restore_previous_session` config and the `--no-restore` / `--restore` CLI flags now control workspace/tab restoration separately from hot-exit content — unsaved scratch buffers come back even when you opt out of full session restore (#1404).
16+
17+
* **File explorer — cut/copy/paste + multi-selection**: `Ctrl+C` / `Ctrl+X` / `Ctrl+V` in the explorer with same-dir auto-rename, per-file conflict prompt on cross-dir paste, and `Shift+Up/Down` multi-select. Cut-pending items are dimmed until pasted.
18+
19+
* **File explorer — keyboard preview**: Moving the cursor with Up/Down in the explorer previews the highlighted file in a preview tab (#1570), so you can scan files without leaving the keyboard.
20+
21+
* **Quick Open / Go-to Line live preview**: Typing `:<N>` in the file finder (or in the standalone `:` mode) scrolls the cursor to the target line live as you type; Enter commits, Escape reverts, mouse movement or clicks also commit.
22+
23+
* **Terminal shell override (#1637)**: New `terminal.shell` config option lets you pick a different shell for the integrated terminal without reassigning `$SHELL` (which affects `format_on_save` and other features).
24+
25+
* **Suspend process (Unix)**: New `Suspend Process` action sends Fresh to the background like Ctrl+Z in a shell. Routed through the client in session mode so the server stays up.
26+
27+
* **Current-column highlight**: New `highlight_current_column` / `Toggle Current Column Highlight` — highlights the cursor's column for alignment work.
28+
29+
* **Post-EOF shading** (#779): Rows past end-of-file render with a distinct background so the boundary is obvious; works alongside `show_tilde`.
30+
31+
* **Regex replacement escapes**: `\n`, `\t`, `\r`, and `\\` in the replacement string are now interpreted when regex mode is on.
1232

1333
### Improvements
1434

@@ -32,7 +52,7 @@
3252
- "file://${HOME}/themes/x.json" — absolute path; ${HOME}, ${XDG_CONFIG_HOME} are expanded
3353
- "https://github.com/foo/themes#dark" — URL-packaged theme
3454

35-
* **Plugin API additions**: `editor.overrideThemeColors(...)` for in-memory theme mutation, `editor.parseJsonc(...)` for host-side JSONC parsing, and plugin-created terminals now have an ephemeral lifetime (they close cleanly when the action that spawned them finishes). Plugin authors can also augment `FreshPluginRegistry` to make `editor.getPluginApi("name")` return a typed interface — no `as`-cast needed on the consumer side; augmentations are emitted to `~/.config/fresh/types/plugins.d.ts` at load time.
55+
* **Plugin API additions**: `editor.overrideThemeColors(...)` for in-memory theme mutation, `editor.parseJsonc(...)` for host-side JSONC parsing, and plugin-created terminals now have an ephemeral lifetime (they close cleanly when the action that spawned them finishes). Plugin authors can also augment `FreshPluginRegistry` to make `editor.getPluginApi("name")` return a typed interface — no `as`-cast needed on the consumer side; augmentations are emitted to `~/.config/fresh/types/plugins.d.ts` at load time. `spawnHostProcess` now returns a handle with `kill()` (and a matching `KillHostProcess` command). `BufferInfo.splits` surfaces which splits display a buffer, for "focus-if-visible" dedupe. `editor.setRemoteIndicatorState(...)` / `clearRemoteIndicatorState()` let remote plugins drive the status-bar `{remote}` element. Dashboard gains `dash.registerSection()` (with a returned remover) and `dash.clearAllSections()` for plugin extension.
3656

3757
* **JSONC language**: `.jsonc` files and well-known JSONC-with-`.json`-suffix files (`devcontainer.json`, `tsconfig.json`, `.eslintrc.json`, `.babelrc`, VS Code settings files) now get a dedicated `jsonc` language with comment-tolerant highlighting and LSP routing through `vscode-json-language-server` with the correct `languageId`.
3858

@@ -60,6 +80,18 @@
6080

6181
* **Plugin action popups survive buffer switches**: Popups stay visible when the active buffer changes, and concurrent popups queue LIFO so the newest shows first.
6282

83+
* **Encoding detection on CJK files** (#1635): Files whose only non-ASCII bytes sat past the 8 KB sample window were mis-detected; the sample boundary is now treated as truncation so the full file is considered before the encoding is guessed.
84+
85+
* **Review diff — no fold jitter**: Toggling a fold no longer re-centers the viewport.
86+
87+
* **LSP — cleaner disables**: No spurious warning when opening a file for a language whose LSP is explicitly disabled in config. The indicator shows buffer-skip state (e.g. file too large) instead of a generic warning.
88+
89+
* **Windows — preserve UNC paths**: `pathJoin` plugin API now preserves `\\?\` UNC prefixes on Windows.
90+
91+
* **Hardware cursor no longer bleeds through popups**: The terminal hardware cursor is hidden when an overlay popup covers it.
92+
93+
* **Focus — tab clicks reset explorer context** (#1540): Clicking a tab or buffer no longer leaves the FileExplorer key context active.
94+
6395
### Under the Hood
6496

6597
* **Authority abstraction**: Filesystem, process-spawning, and LSP routing are now consolidated behind a single `Authority` slot, with plugin ops (`editor.setAuthority` / `clearAuthority` / `spawnHostProcess`) for plugins that want to target the host even while attached elsewhere. This is what makes the devcontainer and `ssh://` flows work uniformly.

docs/configuration/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ In the Settings UI, each setting shows where its current value comes from:
246246

247247
## Status Bar
248248

249-
The left and right sides of the status bar are configurable through the Settings UI. Each side uses a **DualList** picker: items live in an **Available** column or an **Included** column, and you move them back and forth to show or hide them. Use the arrow buttons next to the Included list to reorder. Elements include the filename, cursor position, encoding, LSP indicator, git branch, warning counts, palette hint, and a `{clock}` element that shows `HH:MM` with a blinking colon.
249+
The left and right sides of the status bar are configurable through the Settings UI. Each side uses a **DualList** picker: items live in an **Available** column or an **Included** column, and you move them back and forth to show or hide them. Use the arrow buttons next to the Included list to reorder. Elements include the filename, cursor position, encoding, LSP indicator, git branch, warning counts, palette hint, a `{clock}` element that shows `HH:MM` with a blinking colon, and a `{remote}` indicator that lights up when you're attached to an SSH remote or a devcontainer.
250+
251+
The `{remote}` indicator is clickable — activate it to open a context-aware menu for the current authority (detach, show container logs, retry attach, etc.). It also reflects connection state: `Connecting`, `Connected`, or `FailedAttach`.
250252

251253
## Save Behavior
252254

docs/features/command-palette.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Press `Ctrl+P` to open the command palette. Use prefix characters to switch mode
1515
- Type `>` to access commands, or `#` followed by a buffer name to switch files
1616
- Space-separated terms match independently (e.g., "feat group" matches "features/groups/view.tsx") — so `etc hosts` finds `/etc/hosts`, `save file` finds `save_file.rs`
1717
- In file finder mode, use `path:line[:col]` syntax to jump to a location after opening (e.g. `src/main.rs:42:10`)
18+
- In go-to-line mode (`:`) and in file-finder mode when you append `:<N>` to a file, the cursor previews the target line live as you type and commits when you press Enter. If you move the mouse or hit Escape, the preview is reverted.
1819

1920
## File Finder on Large and Remote Trees
2021

docs/features/dashboard.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,6 @@ editor.on("plugins_loaded", () => {
4545

4646
The `ctx` parameter exposes `kv`, `text`, `newline`, and `error` primitives. Colors are symbolic (`"muted"`, `"accent"`, `"ok"`, `"warn"`, `"err"`, `"value"`), so sections pick up theme changes automatically. `onClick` is routed through the editor's mouse-click dispatcher and works even in terminals that strip OSC-8 hyperlinks.
4747

48+
`registerSection` returns a function you can call to remove that one section later; `dash.clearAllSections()` drops every section a plugin has registered. Call these when your plugin unloads so hot-reload doesn't leave stale rows.
49+
4850
See it in action: [What's New in 0.2.26 → Dashboard](/blog/fresh-0.2.26/#dashboard).

docs/features/devcontainer.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Devcontainers
22

3-
> **Palette:** `Dev Container: Attach`, `Dev Container: Rebuild`, `Dev Container: Detach`, `Dev Container: Show Info`. A "Dev Container Detected" prompt also appears on startup for any project with a `.devcontainer/devcontainer.json`.
3+
> **Palette:** `Dev Container: Attach`, `Dev Container: Detach`, `Dev Container: Rebuild`, `Dev Container: Create Config`, `Dev Container: Show Info`, `Dev Container: Show Ports`, `Dev Container: Show Logs`, `Dev Container: Show Features`, `Dev Container: Open Config`, `Dev Container: Run Lifecycle Command`. A proactive popup also appears on launch for projects with a `.devcontainer/devcontainer.json`.
44
5-
Fresh detects projects that ship a `.devcontainer/devcontainer.json` and offers to **Attach** or **Rebuild** the container. When attached, the embedded terminal runs *inside* the container, and filesystem and process operations target the container instead of your host.
5+
Fresh detects projects that ship a `.devcontainer/devcontainer.json` and prompts to **Attach** or **Rebuild** the container. When attached, the embedded terminal runs *inside* the container, and filesystem and process operations target the container instead of your host — including LSP servers, which Fresh spawns through the container so you don't need a host toolchain.
66

77
## Requirements
88

@@ -14,15 +14,21 @@ npm install -g @devcontainers/cli
1414

1515
Fresh shells out to `devcontainer` for build/up/exec — if it's not on `PATH`, the Attach and Rebuild commands show an install hint instead.
1616

17+
If a project doesn't have a `.devcontainer/devcontainer.json` yet, run **Dev Container: Create Config** to scaffold one.
18+
1719
## Using it
1820

19-
Open a project that contains `.devcontainer/devcontainer.json`. Run **Dev Container: Attach** from the command palette (`Ctrl+P`). The first attach builds and starts the container; subsequent attaches reuse it. **Dev Container: Rebuild** forces a full rebuild — reach for it after changing the Dockerfile or `devcontainer.json`.
21+
Open a project that contains `.devcontainer/devcontainer.json`. Run **Dev Container: Attach** from the command palette (`Ctrl+P`). The first attach runs the devcontainer `initializeCommand` (if any) on the host, then builds and starts the container; subsequent attaches reuse it. **Dev Container: Rebuild** forces a full rebuild — reach for it after changing the Dockerfile or `devcontainer.json`.
22+
23+
During build or attach, the **build log** streams into a workspace split. If an attach fails, a recovery popup offers **Retry**, **Show Logs**, or **Detach**; subsequent launches don't re-prompt. The status-bar **{remote}** indicator tracks the lifecycle — `Connecting`, `Connected`, or `FailedAttach` — and clicking it opens a context-aware menu.
2024

2125
While attached:
2226

2327
- The embedded terminal drops you into a shell inside the container.
2428
- Opening files through the file explorer or `Ctrl+P` pulls them from the container's filesystem.
25-
- LSP servers that Fresh spawns run in the container (install them there, not on your host).
29+
- LSP servers that Fresh spawns run in the container (install them there, not on your host). The LSP indicator marks servers whose binary isn't on the *container's* `PATH`.
30+
- **Dev Container: Show Ports** opens a picker that merges configured `forwardPorts` with live `docker port` output.
31+
- **Dev Container: Show Logs** shows a one-shot `docker logs` snapshot of the container's recent output.
2632

2733
Use **Dev Container: Detach** to return to host filesystem and process authority without quitting Fresh.
2834

docs/features/editing.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ Add column rulers at any position via "Add Ruler" from the command palette. Usef
2020

2121
## Current-Line Highlight
2222

23-
The row the cursor is on is highlighted for quick visual tracking. Enabled by default; toggle via the command palette ("Toggle Current Line Highlight") or in the Settings UI.
23+
The row the cursor is on is highlighted for quick visual tracking. Enabled by default; toggle via the command palette ("Toggle Current Line Highlight") or in the Settings UI. A matching **Toggle Current Column Highlight** / `highlight_current_column` setting highlights the cursor's column too — useful for visually aligning code with rulers.
24+
25+
## Post-EOF Background
26+
27+
Rows past the end of the buffer render with a distinct background color (`post_eof_bg` theme key) so the "end of file" boundary is obvious even without `~` tildes. Works alongside `show_tilde`.
2428

2529
## Auto-Save
2630

docs/features/file-explorer.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@ Fresh includes a built-in file explorer.
99
## Opening Files
1010

1111
- **Enter** opens the selected file and focuses the editor.
12+
- **Arrow Up/Down** also opens the highlighted file in a preview tab automatically as you move — so you can scan files without leaving the keyboard.
1213
- **Single-click** opens a file in an ephemeral *preview* tab — the next single-click on another file replaces it instead of piling up tabs. Any real commitment — editing the file, pressing Enter, double-clicking, clicking the tab itself, or a layout action like splitting — promotes the preview to a permanent tab.
1314
- **Double-click** opens the file in a permanent tab and focuses the editor.
1415

1516
Preview tabs are enabled by default. Turn them off in the Settings UI if you prefer every click to open a permanent tab.
1617

18+
## Cut / Copy / Paste and Multi-Selection
19+
20+
- **`Ctrl+C` / `Ctrl+X` / `Ctrl+V`** — copy, cut, or paste the selection. Same-directory copy auto-appends ` copy` / ` copy 2` etc. Same-directory cut is a no-op. Paste into a different directory with a name conflict prompts per-file: (o)verwrite, (O) all, (s)kip, (S) all, (c)ancel.
21+
- **Cut-pending** items are visually dimmed until the paste finishes or is cancelled.
22+
- **`Shift+Up` / `Shift+Down`** extend a multi-select range from the current anchor; all clipboard operations (and delete) act on the whole selection.
23+
1724
## Width
1825

1926
The sidebar's width is configurable via `file_explorer.width` in settings. It accepts either form:

docs/features/lsp.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ All LSP operations are available as palette commands (search for "LSP"). Use the
1212

1313
## Status Bar
1414

15-
The status bar shows a single `LSP` indicator — colour-coded, with a spinner during startup and indexing. Activate it (click, or run **LSP: Server Status** from the command palette) to open a popup with per-server status, live progress, and per-server actions (restart, stop, view log). Servers that are configured but whose binary isn't on `PATH` are flagged so Fresh doesn't quietly spawn failing processes. You can also mute a language from the popup.
15+
The status bar shows a single `LSP` indicator — colour-coded, with a spinner during startup and indexing. Activate it (click, or run **LSP: Server Status** from the command palette) to open a popup with per-server status, live progress, and per-server actions (restart, stop, view log). Servers that are configured but whose binary isn't on `PATH` are flagged so Fresh doesn't quietly spawn failing processes. The popup also shows buffer-skip state when a file is too large for LSP, and the "not installed" copy is container-aware when you're attached to a devcontainer (it points at the container's PATH, not the host's). You can also mute a language from the popup.
16+
17+
## Remote-Aware LSP
18+
19+
Language servers spawn through the editor's current [Authority](../plugins/api/), so attaching to an SSH remote or a devcontainer runs the servers over there. `command_exists` probes and `ProcessLimits` (`max_memory_mb`, `max_cpu_percent`) are threaded through the same authority, so quotas apply whether the server is local or in a container.
1620

1721
## Hover and Diagnostics
1822

docs/features/search-replace.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ The search toolbar shows toggle buttons for:
1313

1414
When regex mode is enabled, the replacement string supports capture groups: `$1`, `$2`, or `${name}` for named groups. For example, searching for `(\w+): (\w+)` and replacing with `$2: $1` swaps the two words around the colon.
1515

16+
The replacement also interprets the standard escape sequences `\n` (newline), `\t` (tab), `\r` (carriage return), and `\\` (literal backslash), so you can insert line breaks or indentation. Plain-text (non-regex) replacement treats these as literal characters.
17+
1618
## Project-Wide Search and Replace
1719

1820
Use "Search and Replace in Project" from the command palette to search across all git-tracked files in the project. Press `Alt+Enter` to replace all matches across the project. Works with unsaved buffers and large files, up to 10,000 results.

docs/features/session-persistence.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> **Warning**: This feature is experimental. The API and behavior may change.
44
5-
> **Palette:** `Detach`. **CLI:** `fresh -a`, `fresh --cmd session list|new|kill`. **Config:** `hot_exit`.
5+
> **Palette:** `Detach`. **CLI:** `fresh -a`, `fresh --cmd session list|new|kill`, `fresh --restore`, `fresh --no-restore`. **Config:** `hot_exit`, `editor.restore_previous_session`.
66
77
Detach from Fresh and reattach later, similar to tmux. Your editor state persists even after closing the terminal.
88

@@ -14,7 +14,11 @@ All buffers — including unnamed scratch buffers — persist across sessions au
1414

1515
## Workspace Storage
1616

17-
Session state (open files, split layout, plugin state) is always restored on startup, even when opening specific files from the CLI. Plugin state also persists across sessions.
17+
Session state (open files, split layout, plugin state) is restored on startup by default. Control this with:
18+
19+
- **`editor.restore_previous_session`** (config, default `true`) — when set to `false`, Fresh skips restoring tabs and splits but still brings back unsaved "hot-exit" content (dirty files and unnamed buffers).
20+
- **`--no-restore`** (CLI) — one-shot skip equivalent to the config flag being off.
21+
- **`--restore`** (CLI) — force a full workspace restore even when the config flag is off. Mutually exclusive with `--no-restore`.
1822

1923
## Quick Start
2024

0 commit comments

Comments
 (0)