Repository navigation
remote: headless server, RedShell Remote and the desktop client - #3
Merged
Merged
Conversation
|
Skipping CodeAnt AI review — this PR changes more than 100 files, which usually means a migration, codemod, or vendored drop. Line-level review on diffs this large produces duplicate findings on the same rewrite pattern and drowns out anything that actually matters. If you still want a review, comment |
ForeverInLaw
force-pushed
the
feat/remote
branch
from
December 4, 2026 14:38
ec7dc24 to
58639bc
Compare
…t that joins late
…tions and who answered
The PWA lives in web/: Vite 8, React 19, strict TypeScript, Tailwind v4 driven by the theme's CSS variables, and an ESLint flat config. `npm run build` writes web/dist for the server to embed. styles/tokens.css adds the PWA tokens of the visual contract on top of crates/redshell-theme/themes/redshell.css: field borders, the solid red, state, attention and diff colours, scrims, elevation and motion, light and dark. JetBrains Mono is self-hosted (Latin, box drawing, blocks and arrows, about 46 KB per weight) with its OFL licence, and an external theme-init.js keeps the dark-first page from flashing light.
src/api/client.ts is the one place that lists what the PWA asks of redshell-server, typed with the protocol generated into src/protocol/. The calls of the next server phase (passkeys, passkey-only sign-in, pairing, Web Push, SSH hosts) are kept apart in src/api/pending/. Connection owns the single /api/ws socket: it subscribes to sessions and events, multiplexes attached sessions over 2-byte binary channels, reconnects with jittered exponential backoff (0.5 s up to 10 s), and after every reconnect subscribes again and re-attaches each session for a fresh snapshot. A close with 4001 stops the retries. The mock backend (`?mock[=scenario]` or VITE_MOCK=1) speaks the same REST and WebSocket protocol in the browser, so the real client runs against it: live agents, approvals, shells that echo, and scenarios for every state the screens have. It is a separate chunk, never precached.
Built from docs/design/remote-pwa-visual.md: - the inbox, grouped into Needs you, Working and Recent, live over the WebSocket, with FLIP reordering, a reconnecting and an offline strip, long-press menus and attention banners from other sessions; - the session view: xterm.js (WebGL, fit, web links, Unicode 11) in its own chunk, the composer and the key bar pinned to the visual viewport, a grid that the on-screen keyboard only clips (following the cursor), pinch to zoom, text selection, and Ended, Failed and gone states; - the approval sheet for commands, diffs and other tools, with the "1 of N" queue, Always allow from Claude's suggestions, the 500 ms guard, answers from other devices, timeouts and send failures; - sign-in (passkey first, autofill, rate limits), first-run setup, /pair, new session, SSH hosts and settings (passkeys, devices, notifications, password, passkey-only, appearance); - the 900 px layout with the session list as a sidebar. Session lists and approvals live in the TanStack Query cache, patched from the WebSocket; UI state is in small Zustand stores. PTY bytes go from the socket straight into xterm.js, never through React.
Two new hand-drawn sources next to the app icon: redshell-maskable.svg, the tile's gradient full-bleed with the chevron and cursor at their exact geometry (inside the maskable safe zone), and redshell-badge.svg, the chevron and cursor alone in white with a 1.5x chevron stroke for 24dp notification badges. `npm run icons` renders them with @vite-pwa/assets-generator into public/: the any-purpose 64/192/512 icons, the maskable 512, the apple-touch icon, the badge, the favicon, and light and dark portrait splash screens for current iPhones, whose <link> tags it writes into index.html.
Merge the duplicated SSH hosts paragraphs and the pre- and post-hardening notes into one guide ordered from install to resource use. Add the .deb, tarball and source installs, the per-user systemd unit, and RedShell Remote on the phone. The proxy samples drop trusted_proxies, which the server assumes for a TLS proxy on loopback, and the guide now says that a restart or package upgrade ends every session.
Turn Unreleased into 0.0.3 with a lead paragraph and an upgrading note (ssh.askpass on by default, hosts named after a ~/.ssh/config alias, the new key order in config.toml). Fixes of features new in this release fold into their Added entries, the server's hardening reads as what ships, and the stray duplicated askpass line is gone.
Split the long SSH paragraph, rewrite the RedShell Remote paragraph as connected prose, list Answer in terminal with the desktop's approval buttons, move the update check back beside the desktop installers, and refresh the project layout. The Russian summary mentions the SSH tools and the server.
The [server] table now says what public_url does (pairing links, passkeys, HSTS) and when loopback proxies are trusted, as REMOTE.md does. Document ssh.ssh_config_path and tidy two merged paragraphs.
The server section predated passkeys, pairing, re-authentication, push, the hosts API and the request guards. Pane ratios are saved with a tab's layout now, and the terminal crate depends on the theme crate.
The askpass default, alias connections and key order move into Changed as well as the upgrading note, which now says aliases need import_ssh_config. The [server] section, the hosts API, trusted loopback proxies and the pairing address check get their entries back.
Adding or removing a passkey, passkey-only on or off, approving a pairing and signing out another browser or device answer reauth_required unless the user re-authenticated in the last five minutes. The HTTP layer now asks for that in one place: it opens "Confirm it's you" (a passkey, or the password unless the account is passkey-only), and sends the change once more when the user confirmed. Closing it counts as a cancel, which the screens don't report as a failure. Adding a passkey asks first when the last re-authentication has lapsed, before the ceremony starts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agents running in a desktop tab die with the desktop and can't be driven from a phone.
redshell-server: a headless server, light enough for a Raspberry Pi, that owns terminal and agent sessions. Claude Code permission requests are held through HTTP hooks and can be answered from any client. Sign-in is by password or passkey, with a passkey-only mode, desktop pairing by a typed code, re-authentication for sensitive changes, Web Push, an SSH hosts API, and the hardening from an independent security review.Design:
docs/design/remote-server.md,docs/design/remote-pwa-visual.md. Usage:docs/REMOTE.md.