Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All notable user-visible changes are recorded here. Versions follow [Semantic Ve
### Added

- A persisted terminal renderer dropdown in public shares and signed-in
session tabs. xterm.js remains the default; Refstream can be selected without
session tabs. xterm.js is the default; Refstream (alpha) can be selected without
changing the process, relay protocol, encryption, or session permissions.
- Refstream mode now mounts its terminal-native find, command inspection,
retained-output download, eight themes, text sizing, and back-to-live tools
Expand Down
2 changes: 1 addition & 1 deletion app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The full relay and app setup is documented in [the self-hosting guide](../docs/s
- `src/` — React client
- `server/` — API, stores, and migrations
- `worker/` — Cloudflare Worker adapter
- `src/terminal/` — relay protocol, E2EE, and selectable xterm.js/Refstream rendering; Refstream mode includes its local find, command, export, theme, sizing, and back-to-live tools
- `src/terminal/` — relay protocol, E2EE, and selectable rendering; xterm.js is the default and Refstream (alpha) includes local find, command, export, theme, sizing, and back-to-live tools
- `scripts/` — build and deployment checks

`npm run check:protocol` verifies that the app's terminal protocol files match
Expand Down
2 changes: 1 addition & 1 deletion app/src/routes/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ export function Workspace() {
}}
>
<option value="xterm">xterm.js</option>
<option value="refstream">Refstream</option>
<option value="refstream">Refstream (alpha)</option>
</select>
</label>
</div>
Expand Down
7 changes: 5 additions & 2 deletions app/src/terminal/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
import { Terminal as RefstreamTerminal } from "../../../web/vendor/refstream/v0.1.0-alpha.2/refstream.js";

export type TerminalRenderer = "xterm" | "refstream";
export const DEFAULT_TERMINAL_RENDERER: TerminalRenderer = "xterm";
type TerminalOptions = ITerminalOptions & ITerminalInitOnlyOptions;

export interface TerminalSurface {
Expand All @@ -30,9 +31,11 @@ const STORAGE_KEY = "shell-online-terminal-renderer";

export function readTerminalRenderer(): TerminalRenderer {
try {
return localStorage.getItem(STORAGE_KEY) === "refstream" ? "refstream" : "xterm";
return localStorage.getItem(STORAGE_KEY) === "refstream"
? "refstream"
: DEFAULT_TERMINAL_RENDERER;
} catch {
return "xterm";
return DEFAULT_TERMINAL_RENDERER;
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/content.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
],
[
"Choose the renderer",
"Terminal controls include a persisted renderer dropdown for xterm.js or Refstream. xterm.js remains the default. Refstream mode adds find, command inspection when the process emits shell markers, retained-output download, built-in themes, text sizing, and a back-to-live shortcut. Switching reopens only the browser view; the process, encryption, permissions, fixed session grid, and relay connection model do not change."
"Terminal controls include a persisted renderer dropdown. xterm.js is the default; Refstream (alpha) is available as an experimental alternative. Refstream mode adds find, command inspection when the process emits shell markers, retained-output download, built-in themes, text sizing, and a back-to-live shortcut. Switching reopens only the browser view; the process, encryption, permissions, fixed session grid, and relay connection model do not change."
],
[
"Large paste, bounded",
Expand Down
2 changes: 1 addition & 1 deletion web/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ function renderTerminal(sessionId: string): void {
<div class="settings-card-heading"><label id="renderer-label" for="terminal-renderer">Renderer</label></div>
<select id="terminal-renderer" aria-describedby="renderer-description">
<option value="xterm">xterm.js</option>
<option value="refstream">Refstream</option>
<option value="refstream">Refstream (alpha)</option>
</select>
<span id="renderer-description">Changing renderer reopens this view.</span>
</section>
Expand Down
5 changes: 3 additions & 2 deletions web/terminal-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
import { Terminal as RefstreamTerminal } from "./vendor/refstream/v0.1.0-alpha.2/refstream.js";

export type TerminalRenderer = "xterm" | "refstream";
export const DEFAULT_TERMINAL_RENDERER: TerminalRenderer = "xterm";
type TerminalOptions = ITerminalOptions & ITerminalInitOnlyOptions;

export interface TerminalSurface {
Expand Down Expand Up @@ -43,9 +44,9 @@ export function readTerminalRenderer(): TerminalRenderer {
try {
return localStorage.getItem(TERMINAL_RENDERER_STORAGE_KEY) === "refstream"
? "refstream"
: "xterm";
: DEFAULT_TERMINAL_RENDERER;
} catch {
return "xterm";
return DEFAULT_TERMINAL_RENDERER;
}
}

Expand Down
Loading