You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: correct dashboard, init.ts, devcontainer docs against shipped impl
Audit pass against the actual 0.3.0 implementations turned up several
drift points where the docs over- or under-described the feature:
- dashboard: weather and github are opt-in (only git/disk register by
default); document the `Show Dashboard` palette command, the
`auto-open` config flag, and `builtinHandlers` for opting in. Round
out the symbolic-color list with `number` and `branch`.
- init.ts: command names include the `init.ts` suffix; `init: Edit
init.ts` also writes `types/plugins.d.ts`; `init: Check init.ts` is
a syntax check (oxc), not a TypeScript type-check; document the
3-failure crash fuse.
- devcontainer: add the missing palette commands (`Cancel Startup`,
`Show Build Logs`, `Show Forwarded Ports`) and correct the failed-
attach popup actions to `Retry`, `Show Build Logs`, `Reopen
Locally`.
https://claude.ai/code/session_019puRSPYLWiAQXbSCzYttR9
Copy file name to clipboardExpand all lines: docs/blog/fresh-0.3.0/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ See the [Startup Script guide](/configuration/init) for the full picture.
21
21
22
22
## Dashboard
23
23
24
-
A built-in TUI dashboard replaces the default `[No Name]` buffer with weather info, git status + repo URL, a "vs master" commits-ahead/behind row, open GitHub PRs for the current repo, and disk usage for common mounts. Enable it via `plugins.dashboard.enabled` in `config.json` or the Settings UI. Third-party plugins and your `init.ts` can contribute custom sections through the `registerSection()` API — see the [Dashboard feature page](/features/dashboard).
24
+
A built-in TUI dashboard replaces the default `[No Name]` buffer with git status + repo URL, a "vs master" commits-ahead/behind row, and disk usage for common mounts. Optional weather and GitHub-PR widgets ship in the box and can be wired up from `init.ts` since they hit the network. Enable the plugin via `plugins.dashboard.enabled` in `config.json` or the Settings UI. Third-party plugins and your `init.ts` can contribute custom sections through the `registerSection()` API — see the [Dashboard feature page](/features/dashboard).
Copy file name to clipboardExpand all lines: docs/configuration/init.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,10 +72,11 @@ if (editor.getEnv("FRESH_PROFILE") === "writing") {
72
72
73
73
## Editing and reloading
74
74
75
-
-**`init: Edit`** from the command palette opens (or creates) `~/.config/fresh/init.ts` with a starter template. The same command also writes`types/fresh.d.ts` and a `tsconfig.json`so LSP gives you completions against the real plugin API.
76
-
-**`init: Reload`** re-runs the file without restarting Fresh.
77
-
-**`init: Check`**type-checks without running.
75
+
-**`init: Edit init.ts`** from the command palette opens (or creates) `~/.config/fresh/init.ts` with a starter template. The same command also refreshes`types/fresh.d.ts`, writes `types/plugins.d.ts` (so `editor.getPluginApi("dashboard")` and friends are typed), and creates a `tsconfig.json` on first run.
76
+
-**`init: Reload init.ts`** re-runs the file without restarting Fresh.
77
+
-**`init: Check init.ts`**runs a syntax check (oxc parser) and reports parse errors. It does not run a full TypeScript type-check.
78
78
-**`fresh --no-init`** (alias `--safe`) skips loading for a single launch — useful if the file errors out.
79
+
-**Crash fuse:** if `init.ts` fails to evaluate three times in a row within five minutes, the next launch auto-skips it until you fix or remove the file. A successful evaluation clears the counter.
79
80
80
81
The full API surface is the same as plugins — see the [Plugin API reference](/plugins/api/).
Copy file name to clipboardExpand all lines: docs/features/dashboard.md
+22-5Lines changed: 22 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
# Dashboard
2
2
3
-
> **Activation:**`plugins.dashboard.enabled` in `config.json`, or in the Settings UI under **Plugins → dashboard**. No palette command.
3
+
> **Activation:**`plugins.dashboard.enabled` in `config.json`, or in the Settings UI under **Plugins → dashboard**.
4
+
>
5
+
> **Palette:**`Show Dashboard` (available once the plugin is enabled).
4
6
5
-
Fresh includes a built-in TUI dashboard plugin that replaces the default `[No Name]` buffer you see after `fresh` with no arguments. It shows weather info, git status and repo URL, a "vs master" row (commits ahead/behind), recent GitHub PRs for the current repo, and disk usage for common mounts.
7
+
Fresh includes a built-in TUI dashboard plugin that replaces the default `[No Name]` buffer you see after `fresh` with no arguments. By default it shows git status and repo URL, a "vs master" row (commits ahead/behind), and disk usage for common mounts. Weather and recent GitHub PRs are bundled but opt-in — see [Built-in opt-in widgets](#built-in-opt-in-widgets) below.
6
8
7
9
## Enabling
8
10
@@ -16,14 +18,29 @@ The dashboard is off by default. Turn it on from the Settings UI (**Open Setting
16
18
}
17
19
```
18
20
21
+
Once enabled, the dashboard auto-opens at startup and after the last buffer is closed. To keep the plugin loaded but skip those ambient open paths — leaving `Show Dashboard` as the only entry point — set `plugins.dashboard.auto-open` to `false`. The default is `true`.
22
+
19
23
## Tips
20
24
21
25
- The dashboard only renders in buffers that have no file attached, so opening any file replaces it — you don't need to close it manually.
22
-
- Weather and GitHub widgets need network access; if either is unreachable, the section is quietly hidden rather than blocking the rest of the dashboard.
23
26
-`git` must be on `PATH` for the git and "vs master" rows to populate.
24
-
- The GitHub section shows open PRs for the *current repo* (detected from the `origin` remote). Outside a GitHub clone, it renders a short explanatory message instead.
25
27
-**Keyboard navigation** — `Tab` / `Down` / `j` step to the next clickable row, `Shift+Tab` / `Up` / `k` step back, `Enter` activates. Mouse clicks still work.
26
28
29
+
## Built-in opt-in widgets
30
+
31
+
`weather` and `github` ship with the plugin but aren't registered by default — both hit the network on every refresh, so opting in is explicit. Their refresh handlers live on the plugin API as `builtinHandlers`; pass either to `registerSection` from your [`init.ts`](../configuration/init.md):
The GitHub section shows open PRs for the *current repo* (detected from the `origin` remote). Outside a GitHub clone, it renders a short explanatory message instead. If either widget can't reach its endpoint, the section surfaces a one-line error rather than blocking the rest of the dashboard.
43
+
27
44
## Adding Your Own Sections
28
45
29
46
Third-party plugins and your [`init.ts`](../configuration/init.md) can contribute their own rows through the dashboard's plugin API:
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.
64
+
The `ctx` parameter exposes `kv`, `text`, `newline`, and `error` primitives. Colors are symbolic (`"muted"`, `"accent"`, `"value"`, `"number"`, `"ok"`, `"warn"`, `"err"`, `"branch"`), 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.
48
65
49
66
`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.
Copy file name to clipboardExpand all lines: docs/features/devcontainer.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Devcontainers
2
2
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`.
3
+
> **Palette:**`Dev Container: Attach`, `Dev Container: Detach`, `Dev Container: Rebuild`, `Dev Container: Cancel Startup`, `Dev Container: Create Config`, `Dev Container: Show Info`, `Dev Container: Show Ports`, `Dev Container: Show Forwarded Ports`, `Dev Container: Show Logs`, `Dev Container: Show Build 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`.
4
4
5
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.
6
6
@@ -20,7 +20,7 @@ If a project doesn't have a `.devcontainer/devcontainer.json` yet, run **Dev Con
20
20
21
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
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.
23
+
During build or attach, the **build log** streams into a workspace split. If an attach fails, a recovery popup offers **Retry**, **Show Build Logs**, or **Reopen Locally** (Esc dismisses without changing authority). The launch-time attach prompt itself is one-shot per workspace: once you choose Attach or Dismiss, reopening the same project doesn't re-prompt. The status-bar **{remote}** indicator tracks the lifecycle — `Connecting`, `Connected`, or `FailedAttach` — and clicking it opens a context-aware menu.
0 commit comments