Repository navigation
v0.2.0 — tab-based interface design - #3
Merged
Merged
Conversation
- Image viewer: Replay button for GIFs (restart play-once animations) - Video/audio: loop toggle, playsInline, preload=metadata - Open image/PDF/video/audio without reading the whole file as text first (they stream from the file API) — fixes large media/PDF "stuck on opening" - PDF viewer renders pages lazily on scroll instead of mounting all pages, so large PDFs no longer choke - Cancel button while a file is opening, so a misclick can be backed out - Center/truncate the file path cleanly on the opening/error screens Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop files onto the explorer panel to upload them to the current directory, reusing the existing upload flow (conflict prompt, queue, progress). A dragenter/dragleave depth counter prevents overlay flicker over child elements, and a dashed drop overlay shows the target directory. Ignores non-file drags and is disabled while an upload is in progress. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When editing the path, the breadcrumb/up navigation stayed active but the text field was frozen, so the two could desync. Now: - disable the up button while the path is being edited - replace the right toggle with a "Go" button to submit the path (on-screen alternative to Enter, useful on mobile) - when a path can't be opened, cancel navigation (stay on the current path) and show an error toast in the explorer panel instead of failing silently Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a shared toast store and a Toaster mounted at the app root: small popups centered at the top, above all widgets (z-100), click-to-dismiss with a slide-out, 5s auto-dismiss. Works regardless of the underlying widget layout (desktop panels or mobile tabs). Replace the file-explorer's local toast with the shared one, and wire it into previously-silent failures: - file explorer: failed directory navigation (already cancelled, now visible) - terminal: tmux session load failures - terminal: cd directory-picker failures (error + network) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Production dependency tree is now clean (pnpm audit --prod: no known vulnerabilities). - react-router family 7.12.0 -> 7.18.0 (DoS, XSS, CSRF, turbo-stream RCE) - http-proxy-middleware -> 3.0.7 (multipart field injection, router bypass) - vite -> 7.3.6 - version-scoped pnpm overrides for patched transitive deps: dompurify, ws, qs, path-to-regexp, picomatch, follow-redirects, postcss, @babel/core, undici (scoped per-major so other resolved majors are left untouched) Verified: typecheck, 29 tests, build, lint, and a server boot smoke test all pass. Remaining advisories are dev/build-tooling only (lodash via @react-router/dev has no published fix; esbuild dev-server advisory is not reachable through tsx). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a "Select" item to an entry's dropdown that enters select mode: - each row's 3-dot button becomes a checkbox; clicking a row toggles selection and selected rows are highlighted - the Hidden toggle is replaced by a selection count, Select all/None, a group actions menu, and Cancel (Hidden state is frozen for the mode's duration) - group actions: Download (files only, folders skipped) and Delete with a "Delete N items" confirmation that warns when folders are included (the delete endpoint already removes recursively) - selection is per-directory: navigating away exits select mode Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a streaming /api/files/download-zip endpoint (archiver) that bundles one or more files/folders into a single .zip, with folders included recursively. - a folder's menu now offers "Download (zip)" - group download in multi-select bundles the whole selection (files + folders) into one zip; a single selected file still downloads directly - individual file download is unchanged Verified end-to-end: single-folder zip is recursive with the folder as root; mixed file+folder selection zips correctly; missing path -> 400. Production audit stays clean (archiver 8 + @types/archiver 8). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
After an upload finished, the freeze flag dropped as soon as all files hit "done", but the tree only refreshed 1.5s later via a background loadDirectory(cwd). In that window the user could navigate, then get yanked back to the upload directory. Introduce a single `busy` flag = uploadQueue non-empty OR an op-reload in flight. The post-upload effect now refreshes the tree BEFORE clearing the queue and holds the freeze (opBusy) until the new tree is loaded. Audit: the single-item delete/rename/create confirms keep their modal open until after the reload (already safe); only the multi-select group delete closed early, so it's now wrapped in the same freeze. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Upload whole folders, recreating their structure:
- new "Upload folder" toolbar button using a webkitdirectory input
- dragging a folder onto the explorer traverses its filesystem entries
(webkitGetAsEntry) into {file, relativePath} pairs
- upload pipeline carries a relativePath per file; the server creates parent
dirs and writes nested paths, via a safeUploadDest() helper that strips any
traversal so an upload can't escape the target directory
- conflict prompt now checks the top-level name each item lands under
Also document the tmux-state-sync limitation in the README (Known Limitations).
Verified end-to-end: nested upload creates subdirs; "../" traversal is
neutralized and stays within the target dir.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Unmatched URLs (constant /test.cgi, /whois.cgi, etc. scanner probes on the public tunnel) made React Router throw "No route matches URL" and log a full stack trace per hit. RR's default server error handler logs these regardless of NODE_ENV, so: - reveal the RR entry files and add a `handleError` that swallows expected 404s (ErrorResponse status 404) while still logging real errors - add an Express error handler that returns a clean 404 for these instead of a 500 + finalhandler stack trace Verified: probes now return 404 with no console output; real routes unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Video previews failed on files that play fine locally: the download endpoint read the whole file with readFile and advertised no byte ranges, which browsers generally require for video metadata and seeking. Stream from disk instead, with Accept-Ranges, Content-Range, 206/416 and HEAD handling, so large media no longer buffers into server memory. Media viewers now also distinguish network, decode and unsupported- source failures, explaining that .mp4 is only a container whose codec may play in VLC but not in the browser, and keep the download button available when playback fails. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
OTG Code hands whoever reaches it a shell as the launching user, so a leaked tunnel URL is a full compromise. Add an opt-in password (off by default) that puts a login in front of the app. The gate is enforced on the server, not in the UI: an Express middleware ahead of every route, a Socket.IO handshake check, and a re-check on the proxy's WebSocket upgrades, which Express middleware never sees. Gating only the terminal would leave the file APIs open, so the whole app is behind it. Passwords are salted scrypt hashes in ~/.otgcode/config.json (mode 600); sessions are signed HttpOnly cookies. Changing or removing the password rotates the signing secret, invalidating every session. Failed attempts back off exponentially rather than locking out -- behind cloudflared every request looks like 127.0.0.1 and cf-connecting-ip is spoofable, so a lockout would let a stranger deny the owner access to their own machine. Also adds the Settings panel itself (cog beside the info icon) and fixes the info popup's toggle: closing on outside-mousedown included its own trigger, so clicking (i) while open closed and immediately reopened it. Finally, the tunnel now prints a privacy warning beside the Quick Tunnel URL naming the user whose shell it exposes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Turns OTG Code into something that behaves like an app rather than a page you reload. Layout: localhost previews lose their third panel and become a popup under a new globe icon in the header. Every row was one line and "Go" opens a real browser tab, so a whole column was never justified. Desktop is now explorer + terminal at 1/4 : 3/4, draggable (and keyboard-resizable), with pixel and percentage floors so the explorer toolbar stays usable. Mobile drops to two tabs to match. Theming: every colour now resolves to a semantic token -- surface, ink, line, and so on -- defined once in app.css, so dark and light stay consistent by construction instead of by discipline. The terminal and Monaco palettes follow along. The theme is resolved on the server and rendered into <html>, so there is no flash of the wrong theme. Persistence: theme, terminal font size, pane split, and the open explorer/terminal tabs with their paths now live in ~/.otgcode/workspace.json. Deliberately not localStorage -- one source of truth, on the host, so a refresh or a reconnect from another device restores the same workspace. Writes are debounced and flushed on pagehide; everything read back is clamped and length-capped, since the browser is what writes it. Kept separate from config.json so workspace churn can never corrupt the auth config. Also makes the app installable (manifest, standalone display, maskable icons, iOS safe areas), gives the file-row 3-dot menus the same toggle semantics as the header popups (click to close, highlighted while open, only one at a time), and lets the explorer toolbar scroll horizontally instead of squashing when select mode turns on. BREAKING CHANGE: the Browser panel is gone as a panel; localhost previews now live in the header popup. Default terminal font size is now 8. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds a Move item to each entry's menu. Rather than a path dialog, it turns the explorer into a destination picker: the toolbar's controls are replaced by "Move to this directory" and Cancel, the entry in transit stays highlighted, row menus are hidden, and only folders remain clickable so the flow can't be wandered out of. Cancel returns to the folder the move started from. The endpoint is deliberately separate from rename. `fs.rename` silently clobbers an existing destination, which for a move -- where the user picked a directory, not a name -- would be invisible data loss. It refuses a name collision, a folder into itself or a descendant, and a no-op into the current folder, and falls back to copy-then-delete on EXDEV so moves onto a mounted volume still work. The path rules live in lib/paths as a pure planMove(), next to the existing helpers: exporting them from the route would have pulled node:path into the client bundle and broken the build. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The UI was entirely flat fills -- zero gradients, shadows only on popups, and 81 bare `rounded` sitting next to 12 `rounded-lg` with nothing deciding which. That flatness plus inconsistent radii is most of why it read as generic. Adopts the idea behind claymorphism -- light falling on a raised surface -- without its proportions. Full clay wants large radii, deep soft shadows and generous padding; the densest surfaces here are a terminal, a file tree and Monaco with 24px toolbar buttons, where that treatment reads as noise. So controls get a gradient body, a 1px lit top edge, a tight drop shadow, and a pressed state that flips the light inward, and nothing gets puffier. Glass is spent only on surfaces that float above content: menus, popups, dialogs, toasts, the lock screen and the offline gate. List rows and the terminal stay flat -- backdrop-filter over xterm's canvas is a real cost for no gain -- and there is an opaque fallback where backdrop-filter is unsupported. Defined as .relief / .relief-accent / .relief-danger / .glass in app.css rather than long utility strings on 124 buttons, so the look is tuned in one place. Disabled is one shared rule: a relief control's fill is its gradient, so dropping it needs an explicit colour or the button renders transparent. Also replaces the global scale(0.93) press-squash, which shrank every button by 7%, with 0.97 for plain elements and none for relief controls. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Generating a quick-tunnel URL takes several seconds with nothing on screen, which reads as a hang. Add an animated "Generating tunnel URL" for that wait, and give start.sh the same treatment: each step gets a spinner while it runs and a tick with its duration when it finishes. The tunnel wait lives in Node, not bash -- start.sh has already handed off by then -- so it is a small progress helper in server/, used by startTunnel and able to print cloudflared's failures without the spinner overwriting them. Animation is TTY-only in both places. Piped to a file or a CI log a carriage-return animation becomes thousands of junk lines, so there each step prints once. Braille frames fall back to ASCII when the locale doesn't advertise UTF-8, and the hidden cursor is restored on exit, SIGINT and SIGTERM so an interrupted run can't leave the user without one. A failing step still shows its output: the captured log prints under a ✗ and the real exit code is preserved, so a build error is never hidden behind tidy formatting. Also drops cloudflared's "Requesting new quick Tunnel" progress line, now that the spinner says the same thing, and awaits listen() so the "running on" banner reliably precedes the tunnel wait. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The material pass put the top safe-area inset on the header as
`.safe-top { padding-top: env(safe-area-inset-top, 0px) }`. Those
custom classes are unlayered, so they outrank Tailwind's layered
utilities regardless of order -- the rule replaced the header's
py-1.5 rather than adding to it, and on any device without a notch
env() resolves to 0px. The bar lost its 6px of top padding and sat
flush against the edge.
Moves the inset to .app-shell, which owns no padding utility and is
the more correct owner anyway: the safe area belongs to the app
frame, not to one bar inside it. body shares the app background, so
the inset area still blends in when installed to a home screen.
Audited the other custom classes for the same collision: each is the
sole owner of the layout properties it sets.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replaces the split pane, the two per-panel tab rows and the mobile tab bar with one VS Code-style strip. There is a single pane now, so there is a single strip. Tabs come in three kinds. Terminal and explorer tabs are created from the + button, which asks which one. Viewer tabs can't be created that way -- they only come from opening a file in an explorer, which is what keeps an explorer a file browser instead of turning into an editor halfway through. Reopening an already-open file focuses its tab rather than stacking duplicates. Every tab type now puts its controls in the same place: the bottom bar. The explorer's toolbar moved out of its header to sit where the terminal's input box already was, and the viewer follows the same rule. The bar changes with the active tab. A new tabsStore owns tab identity and ordering; per-tab content stays in terminalStore / fileStore keyed by the same id, so a terminal keeps its scrollback and socket while you work in another tab. The workspace schema follows: one `tabs` array with a kind per entry, replacing the separate files/terminals lists and the now-meaningless paneSplit. Viewer tabs are restored on reload along with the rest. Also gives every control in the terminal input area the same raised treatment as the Send button, replacing flat fills with coloured borders. BREAKING CHANGE: the workspace schema changed shape, so an existing ~/.otgcode/workspace.json falls back to defaults once -- you get a fresh terminal tab and set your layout up again. Preferences (theme, font size) are unaffected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Four gaps from the unified-tabs change. The Settings Appearance section -- theme switch and terminal font size -- was written but never rendered: the edit that was meant to add it to the JSX targeted a class name the file no longer had, so the replace silently did nothing and the component sat as dead code. There has been no way to change theme from the UI since. Rendered, and verified present in the built bundle rather than assumed. Tabs only showed a close button when more than one was open. Every tab now has one; closing the last lands on the empty state, which offers + as the way back. The + moved from the far right to sit directly after the last tab. That puts it inside the horizontally scrolling strip, which clipped its menu, so the menu is now positioned against the viewport and clamped inside it, flipping above the button when there is no room below. Terminal text size came back into the input area -- it is adjusted mid-session far more often than it is configured, so Settings alone was the wrong home for it. Also finishes the rule the tab pass set: every viewer (code editor, image, PDF, video/audio) had kept its controls in a header. All five toolbars moved to the bottom bar, so control position no longer depends on which tab you are in, and content precedes controls in the DOM. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Seven changes that together take a lot of weight out of the screen. The terminal's text input was pinned open below every other control. It is now just another tab group -- "text" alongside cmds, cd and the rest -- so with nothing selected the input area collapses to a single strip of tabs and the terminal gets the full pane. Drawers animate open and shut via a grid-template-rows 0fr->1fr transition, which reaches each drawer's own height without hard-coding any of them; the closing drawer stays mounted for the transition, so what is painted lags what is selected. "Ctrl+" became "combos", since the group sends any modifier combination rather than only Ctrl. Font sizes are global settings now. The per-terminal and per-editor steppers are gone and Settings owns both, which also means editor size is remembered instead of resetting to a default on every file open. The header lost its online/offline pill -- dropping the socket already raises the full-screen connecting gate, so the pill only restated it -- and its version number, which moved into System Info where the rest of the environment detail lives. The cmds group is customisable: "add" opens a dialog for a label and a command, "edit" turns every button into a remove target, and removed built-ins can be restored. Custom commands and the hidden- builtin list are persisted and validated like everything else in the workspace file -- deduped by label, capped at 40, junk entries dropped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Five presentation changes. Modal backdrops were a flat dim wash while the panels on top of them were already glass. They now share one frosted scrim, so the connecting gate, the confirm dialogs and the add-command dialog match the popups. The light theme was near-white everywhere, which reads as glare and left cards with nothing to sit on. The ground is now a grey-blue paper with surfaces lighter on top of it, keeping the dark theme's blue cast so the two read as one family. The tab strip had missed the material pass: the + is now a proper raised button and the active tab reads as lifted rather than just differently filled. An active input group tab was bleaching its label to white, which collided with the white button text inside the drawer below. It now lights its own colour instead. The cmds group's add and edit controls sat inside the command grid and read as two more commands. They have their own row beneath it now, sized differently, with edit highlighting while it is armed and a hint explaining what tapping a command will do. Also slows the drawer transition to 280ms on a softer curve, and drops the hand-written -webkit-backdrop-filter declarations: writing the prefix by hand made lightningcss emit only the prefixed property, which would have left Firefox -- the one engine that implements only the standard name -- with no blur at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Light mode had controls at 1.02x the contrast of the bar they sat on, against 1.38x in dark mode -- close enough to the background that buttons read as flat text. The cause was structural rather than a shade being slightly off: light mode was copying the dark stack, with near-white controls on a near-white ground. It now inverts that stack on purpose. Content is the bright paper and the chrome around it -- header, tab strip, toolbars, input drawers -- is grey-blue, which is what lets a near-white control read as raised. Header and tab strip move onto the chrome tone to match the toolbars they sit above. Control-versus-chrome contrast is 1.32x, next to dark's 1.38x, and the ink scale keeps the same relationships in both themes: body text 11.7x, secondary 4.7x, disabled deliberately low at 2.2x against dark's 2.35x. The selected input-group tab was easy to miss -- a tinted fill and a thin ring. It now carries a real glow, a heavier weight and a thicker ring. Group-tab label colours became theme-aware tokens in the process: a blue that reads on a dark control is washed out on a bright one, so the light theme uses a deep blue and leans on weight where a coloured halo cannot show. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The strip mixed blue and green with no rule behind it -- code and git were blue alongside cmds and cd, though they are a different kind of thing. Tabs are now grouped by what they act on: blue for what the terminal does natively (text, cmds, cd, combos), purple for the CLI tools launched from it (code, git), green for the full-screen programs (nano, vim, tmux). Each sector gets its own tint and label tokens per theme, since a purple that reads on a dark control is washed out on a bright one. The three-way branch in tabBtn also collapses into a sector lookup rather than nested ternaries. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Startup now answers "is the tunnel actually working?" itself. It prints the LAN addresses alongside the tunnel URL -- on the same network those skip DNS and Cloudflare entirely -- underlines both so the thing to copy stands out, and probes the tunnel from the host. The probe retries for ~30s and returns the moment it succeeds. Measuring this was worth the trouble: on a fresh hostname curl reached the tunnel in 2s while fetch failed for 12, and on the next tunnel the two swapped places. It is intermittent resolver lag, not a dead tunnel, so a failed probe says "couldn't confirm yet" and points at DNS rather than implying the tunnel is broken. The privacy warning is printed before the probe so the safety text never waits on it. System Info gains round-trip latency, measured against a new 204 endpoint marked no-store -- a cacheable one would make the link look faster than it is -- sampled three times and reported as the median. Terminal tabs take the terminal icon from the + menu instead of a connection dot: the dot restated what the connecting gate already says and left the terminal as the only tab kind without an icon. File tabs now show what they hold, which meant giving the app one file classifier instead of the viewer's private copy -- so a tab icon can never disagree with the pane it opens. That move surfaced two bugs. getExt returned the whole path for an extensionless file, which then printed as the file's "type". And the terminal's dark bands in light mode were two things: the xterm viewport keeps the background it was constructed with, so a theme switch left the old one behind the rows, and the light terminal background did not match its container, so the padding showed a seam. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Highlighting localhost and the LAN addresses put them on equal footing with the tunnel URL, when only one of the four is the thing to copy and share. They are reference detail now -- still there when wanted, no longer competing -- leaving the tunnel URL as the only emphasised line in the output. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A bare number tells you nothing unless you already know what counts as good. The reading is now labelled "connection latency" and coloured: green under 100ms, where typing feels immediate, amber to 300ms, red beyond that, where it starts to drag. The three colours are defined per theme rather than as fixed utilities -- a green that reads on a dark popover washes out on a bright one. Each state clears WCAG AA against its own popover background in both themes, the tightest being 4.8x in light. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
"OTG Code" alone read as a heading for the whole panel rather than the label for the value beside it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The localhost port box looked out of place because it was: the app had seven near-duplicate input styles across 15 fields, drifted apart in surface (bg-app vs bg-raised), border weight and focus treatment (ring vs border-colour). Fixing the one field would have made it eight. They now share a .field class carrying surface, border, placeholder and focus ring, with call sites keeping only their sizing and layout. The focus colour is a token, so it deepens in the light theme rather than using the same blue on both grounds. A .field-invalid modifier puts a rejected value on the field itself -- a blocked port now reads as wrong without having to find the message next to it. The port row's add button also takes the same raised treatment as the tab strip's +, which is what prompted the audit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Everything the composer sent went out through `sendInput`, the same channel
a keypress goes down. To the program on the other end that is someone
typing four hundred characters in one millisecond, and every one of them is
a key it may have a binding for.
opencode binds a bare `!` to its shell mode whenever the cursor is at the
start of a row, and the condition gating that binding does not re-run
inside a burst — so a question containing `!` flipped the prompt to shell
mode partway through, and the finished message went to bash:
opencode: eval: line 5: syntax error near unexpected token `('
(line 5 is the `eval` in opencode's own `bash -l -c` wrapper, which is also
why the error says `opencode:`, and the `\n` bash quoted back was the
newline this end used to glue onto the message.)
A terminal does not have this problem: a paste arrives wrapped in the
bracketed paste markers, which say "text, not keys". xterm.js writes them,
and only when the program has asked for bracketing, so they never reach
something that would print them instead — which is why `pasteInput` goes
through the terminal rather than building the sequence by hand.
Every composed command line goes the same way, through `runInput`: paste,
then Enter on its own. The git drawer's commit message, the directory
drawer's `cd`, the command chips and the user's own saved commands were all
the same bug waiting for a different character — `shellQuote` makes a path
or a message safe for the shell at the far end and says nothing about the
program in between. The separate Enter was needed regardless: an Enter in
the same write as the text does not submit in a coding CLI, which
`slashCmds` already documented.
Quick keys and the slash-command chips still go as keys, because reaching
the program's own bindings is the whole point of them. `handleQuickKey`
loses a branch that tested for a two-byte chord and then did exactly what
the other branch did.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`focusedPane` lived in the workspace file on the host, one slot for every device that opens the tunnel. It does not mean the same thing on each: on a wide screen it is which pane has the cursor, and on a phone, which draws one pane at a time, it is the only pane you can see. So the two fought over it — a click in the desktop's left pane moved the phone off the tab it was reading, and a reload on the phone landed back on the left however it had been left. It goes in the browser now, beside the other per-device view state, with the host's copy still written as the value a device with nothing cached starts from. That fallback earns its keep here rather than being habit: local storage belongs to an origin and a Quick Tunnel's hostname is new every time the tunnel starts, so a restarted tunnel is a device that has never been here before. The pane count stays on the host. Choosing one pane merges the right pane's tabs into the left, and where a tab lives is shared state, so the count that decides it has to be shared too — per device it would mean a phone quietly collapsing the desktop's split every time it loaded. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Saving posts the buffer, and on success the pane hands the bytes it wrote back down as the file's new content. The editor took that for news about the file and copied it into the buffer — so anything typed while the write was in flight was replaced by the older snapshot. Over a tunnel from a phone that window is most of a second, which is long enough to type a word into. It announced itself as the caret jumping to the end of the document. @monaco-editor/react syncs its `value` prop by replacing the full model range with `forceMoveMarkers: true` whenever the prop and the model disagree, which leaves the cursor at the end of the inserted text — and suppresses `onChange` while it does it, so nothing noticed the loss. So the save's own echo is now recognised — `handleSave` remembers the bytes it sent — and the buffer is left alone for it. The unsaved mark moves to the save path with them, which is the only place that knows whether the buffer is still what was written: clean if it is, dirty if typing has moved it on. Found while auditing the same effect: reloading to discard edits handed them straight back. Re-reading the file unmounts the editor — the pane draws a spinner while it reads — and the new one is seeded from the draft in the browser, which nothing had cleared. The two-tap discard re-read the file and restored the edits over it, asterisk and all. It clears the draft now. Both come with a regression test, the first component test in the repo: @testing-library/react was already a dependency, and Monaco stands in as a textarea since it cannot run in jsdom. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Deleting a nested folder or moving something large takes long enough to matter, and the explorer gave no sign of it. The confirmation dialog stayed up with its Delete button pressable for the whole request, so a second tap on a slow connection ran the delete again. `withBusy` now takes a label and every write to the tree goes through it — single and multi delete, rename, new file, new folder, both moves, and the post-upload refresh. Each closes its dialog before the work starts, so the button that asked cannot be pressed twice, and the explorer carries a spinner saying `Deleting big...` until the new listing is in. The freeze itself already existed for multi-select deletes and moves; what was missing was saying so, and single deletes, renames and creates had neither. The badge is `pointer-events-none`: the list and the toolbar are already blocked by `busy`, which stays the one thing deciding that. With a test that the dialog closes and the explorer freezes for the whole request, and that a refusal thaws it again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The README had become the documentation — 322 lines of feature detail, per-distro prerequisites, a WSL2 walkthrough, a DNS fix, the proxy's internals and four troubleshooting sections — so the thing it was actually for, telling someone what this is and how to start it, was buried in it. It is 109 lines now: what it is in six bullets, requirements, quick start, the tunnel warning, and where to read more. Everything else moved verbatim into DOCS.md, with a table of contents and the Features section split into the parts people look for one at a time (tabs and panes, terminal, explorer, viewers, security, proxy, settings). Baggage found on the way through: - The release summary and **One pane, one tab strip** both say the split panes are gone. They were, early in 0.2.0, and then the split came back later in the same cycle — so the release contradicted its own Added section and three of its own Changed bullets. Both now say what shipped: one strip, with a split you can ask for. - Two separate entries for reloading-to-discard, the second of which exists because the first fix was not enough. Merged, so a reader is not told it was fixed twice in two ways. - The explorer-freeze entry is a clause of the one above it now that every write to the tree is covered rather than two of them. - The architecture diagram's REST API never listed `move`, and the auth gate was still described as optional. - CONTRIBUTING's project layout had drifted: `auth-routes`, `cwd`, `cli`, `progress` and `zip` were missing from `server/`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Twenty of the forty-eight bullets were bugs in work this same release introduced — the optional split and the per-device pane, the light theme, tmux tabs, the host-saved workspace, the single strip's own tab naming and `+` menu, slash chips, multi-select, zip folder downloads, the account popup, the access password, reload-in-place, GIF replay, Ctrl/Cmd+S. None of it ever shipped, so none of it is a fix anyone coming from 0.1.1 can recognise, and it buried the twenty-eight that are. Twenty-eight left. Two of the trimmed ones described shipped behaviour that was stated nowhere else, so the zip integrity rules — the tree walked before the archive is written, `UNREADABLE.txt` for what could not be read, symlinked files copied and symlinked directories skipped — moved onto the folder-download entry in Added, where they belong. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Three changes of wording and one of shape. **Three kinds of tab, said as three.** The docs described four — terminal, tmux, explorer and the viewer tabs — which is not what `+` offers and not how the thing is built. There are three you create, and a file tab is something an explorer spawns. Saying it that way makes the reason for it sayable too: it is what keeps an explorer a file browser instead of an editor you have to navigate back out of. **Action keyboards, not "the composer".** The internal name had leaked into the docs, where it told a reader nothing. They are built-in, task-specific action keyboards — `main`, one per coding CLI, git, commands, navigate, and a tmux tab's session controls — and the thing beside them is a dedicated text input box for writing a line out in full. Two different affordances that one word had been covering. **Split panes and light/dark are features, not settings trivia.** Both were a bullet in a list under Settings. Each has its own section now, with the split's per-pane strips and the theme's one-token-set and server-side resolve where someone would look for them. The shape follows: the tab system, panes, light and dark, then the keyboards and the input, each with its own heading rather than four screens of prose under "Features". The README's lead is restructured the same way, as a table of the three tab types and then what you drive them with. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The workflow has run on every PR to main since it was added and nothing in the README said so. Linked to the Actions page, like the license badge is to LICENSE, and scoped to main so a red branch does not read as a red project. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The password has been on by default since 0.2.0, so opening with "keep the tunnel URL private" put the weaker of the two protections first and described the stronger one as the reason for it. It now says the password is what stands in the way, and that keeping the URL private is what you are left with if you turned it off. Shorter either way. Also: the mobile section is "Mobile-native UX for terminal workflows", and split panes is a bullet in it rather than a section of its own — one line about wide screens did not need a heading. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The docs kept explaining features by contrast with an earlier version of themselves — a board that opens empty "rather than a shell you did not ask for", a theme switch that leaves nothing "on a stale palette", keys that are no longer shaved, a tab strip with "no panel layout to arrange", light-theme ANSI colours "re-checked" against their ground, a divider that is a grid track so neither pane puts a scrollbar under it. All of it is a changelog entry wearing a feature's clothes: it only means anything to someone who used the version before, and to everyone else it describes a problem they never had. Swept both files for the pattern and rewrote each in the positive. The contrasts left standing are the ones about something outside OTG Code — the host rather than the browser, a copy rather than a rename across filesystems, Ctrl/Cmd+S rather than the browser's save dialog, a pty binary that no longer loads after an nvm switch — which tell a reader something they could not have guessed. Also: the viewers moved into the Explorer row of the README's table, where the tab they open is being described, and the "What it is" lead went, since the page already says what it is twice above it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
What makes this worth running is that a phone can drive a coding CLI; the three tab types are the surface it does that on. The README said them in the other order. Renamed to "Native tab interfaces" to match. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A dropped connection, two devices sharing a session, a narrow screen drawing one pane: none of these are about phones, but all of them were written as though a phone were the only thing they happened to. A closed laptop drops a connection the same way, and the split restored on one device is restored on any other. So: a dropped connection rather than a dropped phone, any two devices rather than a phone and a laptop, a narrow screen rather than a phone (the rule was always the 900px, which now leads), and one device to another in the unsaved-work limitation. Where behaviour really does follow the input, it says touch rather than phone, since a tablet is not a phone either — a held tab, and the undo buttons for where there is no Ctrl+Z. What stays about phones is what is only true of them: no modifier keys, no arrows and no Esc, which is the whole reason the action keyboards exist, and rows sized for a thumb. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
They were a trailing sentence on the action-keyboards bullet, which undersold them: a prefix chord is one of the things a touch screen cannot type, so buttons for windows, panes and copy mode are the point rather than a footnote. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Phrases like "read from what that CLI actually binds" and "a directory picker that knows where the shell really is" are selling, not documenting: a reader wants to know there is a keyboard per CLI and a directory picker. Went through both files and cut every clause that was there to make a feature sound considered rather than to say what it is — the design essay about content receding and chrome advancing, "one row of keys that never grows", "a paper's worth of algebra", "HEIC off an iPhone", "nothing reachable from the tunnel URL can pull a live terminal away from whoever is using it", and a few dozen more. What is left is shorter and says the same things. DOCS 522 -> 490 lines, README 121 -> 116 with a bullet added. Also: the light/dark bullet is one line, the security bullet moved up out of the trailing list, and that list is "Additional built-in features". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A tab strip with more tabs than fit always opened at scroll offset 0, so a session restored onto a tab past the fold came up with the active tab out of sight — the strip looked like it was showing the first tab. One effect on the active id now aligns that tab's left edge with the strip's, letting the browser clamp the offset so the last tabs settle against the right edge. A tab already fully visible is left alone, so tapping one mid-strip doesn't haul the rest of it sideways. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- The 0.2.0 Security section still described a `pnpm.auditConfig` ignore for
the braces advisory. That entry was removed on 2026-10-31 when the advisory
was withdrawn, and `pnpm audit` is clean with no suppressions, so the bullet
claimed something the tree does not carry. Replaced with the one override
that does cross a major, minimatch 10 -> 11.
- `node-gyp` is declared `^13.1.0`, a range rather than a pin; "pinned
devDependency" in DOCS (twice) and the changelog said otherwise. The point —
a local node-gyp rather than whatever is on PATH — is unchanged.
- CONTRIBUTING's release checklist read as though an auditConfig entry exists;
it is a rule for if one is ever needed. Its server/ layout was missing
dev.ts.
- Fixed a sentence that lost its clause in editing ("under an open tab whoever
is changing it") and trimmed the leftover flourish from the KaTeX entry.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Send went through `runInput`, which pastes the text and then sends `\r` — so every send submitted. A TUI's prompt is somewhere to draft in: send a paragraph, read it back, add another, submit when it reads right, with the draft sitting in the tmux session across a reconnect. Appending Enter took that away, and a message that was meant to be one turn became several. `handleSend` uses `pasteInput` now, and sends nothing after it. `runInput` keeps its meaning for command lines — the git keyboard's commit, the directory picker's `cd`, a command chip — where running it is the point. Enter is a key on the row below, so submitting is one tap. The text also goes as written rather than trimmed: a newline in a paste is a newline, and the only ones in there are the ones that were typed. Also swept "composer" out of the code's comments (17 of them). The UI, the README and DOCS.md have called these the action keyboards and the text input box for a while; the comments were the last place still naming the old one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Scrolling a tmux pane was one button inside a group labelled `copy`, which is where nobody looks to read back through a build log. It is its own group now: in, PgUp, PgDn, a line up, a line down, and out. The keys were picked off `tmux list-keys` rather than from memory, and every one of them is bound identically in `copy-mode` and `copy-mode-vi`, so none of them depends on how `mode-keys` is set: PPage/NPage page, Ctrl+Up and Ctrl+Down scroll a line, `q` cancels. Only the entry carries the prefix. The audit of what was left turned up three things the same way: - `/` and `?` had their directions the wrong way round — tmux binds `/` to search *down* — and both are vi's keys, so under the default `mode-keys emacs` they did nothing at all. Ctrl+R is offered beside them for emacs, and `n`/`N` walk the matches under either. Not Ctrl+S, emacs's forward search: outside copy mode it is XOFF, and a mistap would stop the terminal's output with nothing on screen to say why. - `Esc` in the top line claimed to leave copy mode. It does under emacs mode-keys; under vi it clears the selection. `q exit` does it either way, so Esc now only claims the lists and prompts it really does leave. - `copy` keeps what is actually copy-mode business — finding a line, pasting the buffer — rather than being where scrolling hid. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The view store already kept an image's zoom and pan, a video's position, the editor's mode and how far down its text had been read. Two panes were missing from it, and for the same reason: their content is not there when the page first paints, and a scroll offset is clamped to the content that exists when it is set. So the one assignment at mount landed at the bottom of a document three lines tall, and both were given up on. - A markdown or notebook preview keeps `previewScroll`, its own field. A file has two heights — the source in the text views and the document the preview renders — so one offset cannot serve both, which is why the preview was left out of `scroll` rather than sharing it. - A PDF keeps `scroll`, which is free: a PDF path only ever opens the one viewer. `useRestoredScroll` is where the clamping is dealt with, once: it puts the offset back on every frame until it sticks or three seconds pass, ignores the scroll events its own assignments cause so a clamped one cannot overwrite what it is reaching for, and stands down the moment a pointer, wheel or key says the reader has decided where to be. The image viewer keeps its own restore, which waits on the image's natural size rather than retrying — it has a signal for when there is something to pan within, and these panes do not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The earlier rule sat on `.workbench-hover-container`, but monaco renders that into contextview's `.context-view` — absolutely positioned, shrink- wrapped around it, hit-testing on its own. The box stayed over the close button, so the press still never landed and the pointer still crossed in and out of the button, flickering the tooltip. `pointer-events` inherits, so the wrapper covers both; scoped with `:has` because menus are rendered into `.context-view` too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`version === null` is how the server says there is no tmux on the host, and it was also the initial state — so the absent-tmux branch, tested first, held the screen for the whole listing and the loading branch under it could never be reached. One tagged `Listing` replaces the two nulls that could disagree, which also gives a failed request an answer of its own: it is not news about tmux. Audited the other popups for the same shape. System Info and the explorer already spin on an unanswered fetch; the localhost ports and the tab strip read local state, so there is nothing to wait for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Updated the description to reflect changes in features and capabilities.
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.
Everything that was two fixed panels plus a separate mobile tab bar is now one
tab system: terminal, tmux and explorer tabs, with an optional two panes on a
wide screen. Full detail in CHANGELOG.md.
Highlights
tmux (
tmux new -A, so a dropped connection re-attaches), explorer (filesopen in their own viewer tab: Monaco, markdown + KaTeX, notebooks, PDF,
image, video, audio).
main, one per coding CLI,git, savedcustom commands, and a directory picker — plus a dedicated text input box
that sends a prompt or commit message as a paste, not as keystrokes.
without the prefix chord.
server-side on every request, the localhost proxy and the terminal socket.
One device holds the session at a time.
divider and tabs that can be dragged between panes.
~/.otgcode/workspace.json), so a phone anda laptop open the same session.
download, chunked and resumable uploads with progress, on-disk change
detection that never overwrites unasked.
into a new DOCS.md.
Test plan
pnpm lint,pnpm typecheck,pnpm test(32 files / 298 tests),pnpm build— all green locally and in CI.
open/close/reorder/drag-between-panes, tmux attach and detach, the action
keyboards against claude/codex/opencode, explorer upload, move, multi-select
delete and folder download, each viewer type, light/dark, the password gate
and the single-device handover.