Repository navigation
Prototype: open remote CodeNomad projects as tabs (#1236) - #1298
Closed
pascalandr wants to merge 34 commits into
Closed
pascalandr wants to merge 34 commits into
pascalandr wants to merge 34 commits into
Conversation
…indow Issue #1236 lets one CodeNomad window work on projects that run elsewhere (container, MicroVM, remote host) next to local projects. A remote project is served by a CodeNomad server running where the project lives, so its conversations, files, Git, settings and Missions keep working unchanged. Remotes, on the home page and in the new-instance launcher, lists the saved CodeNomad servers. Its field adds one from a pasted pairing link or address (links carrying credentials are refused) through the existing probe. Choosing a server opens a project tab: a native view placed over the tab's content shows the server's own UI in an embedded single-project mode, where the user picks the folder. The tab shows the server icon and the project name, the project joins the mixed recents (server, folder and name only) and tabs come back with the restored app state. Profiles that skip TLS verification, and Tauri outside Windows, keep their separate remote window. The embedded mode (`/?codenomadEmbed=project[&folder=]`) hides the title bar, tab bar and home page, offers a folder picker until a project opens, records the folder in its address and the project name in its title, and never sets the native badge. A server without this mode simply shows its full interface; the host only accepts a title change from the server's origin with a folder. The view reuses the storage of that server's remote window (Electron partition, Tauri data directory), so an existing session or paired device cookie works without signing in again. It has the remote preload/capability: of native access only notifications reach the host. Navigation stays on the server's origin (the public help site opens in the system browser) and the bare root that ends login or pairing returns to the tab's entry. The view opens when its tab first shows, follows the placeholder's bounds and hides while the tab is hidden or a local dialog, menu or list is open (the browser previews' overlay rule, now shared). Reloading or closing the owning page closes its views. Web clients, Remote Control devices, remote windows and embedded pages never offer remote tabs, so nothing rebounds through a host. Electron uses a WebContentsView per tab (`electron/main/remote-view.ts`); Tauri a child webview labelled `remote-view-*` (`src-tauri/src/remote_view.rs`) that inherits the remote windows' capability. Validation: UI and Electron typechecks; UI unit tests (state codec, partitions, tabs, restore, embedded mode, link classification, recents, host guard); browser tests on the real app (`remote-project-tabs.test.ts`: embedded page without chrome, folder picker and direct folder, full interface without the parameter, no Remotes on web or remote pages, tab opening and relabelling, overlay hiding, unverified-certificate window, pasted pairing link, restore); Electron `remote-view.test.ts` and preload tests; Rust tests for navigation, ownership and the child label's ACL; offline Tauri release build; help tests.
In the first native trial a remote project tab stayed black: its child webview existed, at the right place and on top, but its document was about:blank. Tauri passes every navigation of every webview to the `external-link-guard` plugin after the webview's own handler. For a `remote-view-*` label that guard found no browser preview and no registered remote window origin, fell back to the internal-origin rule and cancelled the view's first load of its server. `intercept_navigation` now asks `RemoteViews::navigation_allowed` first: a registered view is admitted exactly where its own handler allows it (its server's origin, about:blank); other webviews, including a closed view, keep the window rules. The bare root and the help site stay refused there, since the view's handler already sends them to the entry or the browser. The developer-mode source test followed the remote window's data directory through a statement the shared `remote_profile_data_directory` helper replaced; it now checks the helper and that the remote window and the view both keep the default WebView2 options their shared storage requires. Validation: `cargo test --release` 311/311, including a test reproducing the refusal (window-origin fallback denies the view's entry) and the guard's verdicts for entry, login, pairing, other origins, bare root and help; offline `tauri build --no-bundle`.
…arts A remote project tab asked for the server password again each time the host restarted, although the server kept running: the direct-access session cookie had no Max-Age, so the view's WebView2 dropped it with the view, while the server-side session itself never expired. A password login now creates a session lasting PASSWORD_SESSION_TTL_MS (seven days) and its cookie carries the matching Max-Age; HttpOnly, SameSite=Lax, Path=/ and Secure over HTTPS are unchanged. The server refuses and forgets an expired session and prunes expired ones on each new login. Logout now revokes the session on the server as well as clearing the cookie. Desktop bootstrap token sessions keep a browser-session cookie and no expiry, so a long-running desktop app never loses access to its own backend. A backend restart still invalidates every direct session. Validation: session-manager.test.ts (exact expiry, pruning, revocation, no expiry for token sessions) and auth-session-lifetime.test.ts on the real routes (login cookie attributes and Max-Age, logout revocation, token cookie without Max-Age); existing auth, request-path, Remote Control surface and SideCar proxy tests; help security page updated in ten locales.
…estart After the host restarted, a remote project tab came back on its project but showed "Start a conversation" instead of the session that was open: the embedded page runs in a remote window context without client state. The embedded page keeps its active session per folder in its own storage, which persists with the server's remote-window storage (the same that keeps its sign-in). On reopening it selects that session with the hydration a restored local tab uses (restoreEmbeddedSession), unless the user picked one meanwhile; the empty startup selection never overwrites the remembered one. Malformed identifiers are neither written nor trusted. Validation: embed-mode unit tests (per-folder memory, validation, unavailable storage) and browser tests on the real app (the remembered session is read back on opening and kept; a folder without one reads none).
… a session Opening a project could create a session before its agents and models had loaded, so the session started without either and the selectors showed "None / None" (R6 of the remote OpenCode prototype, ported here). createSession now refreshes the project's catalogue when its agents or providers are still empty, then picks the default agent and model as before; a reconnect during that wait still aborts the creation. The pending state covers the wait. Validation: session-create-pending.test.ts gains a test where the catalogue arrives after the creation request: no session starts before it and the session starts with the agent and its model; the test fails without the fix. UI unit tests over sessions, restore and state codecs pass.
A server added by pasting its address is saved under url.host, so before a project was chosen its tab read "127.0.0.1:9911" or a full tunnel host with its port. People expect the server's name there. serverDisplayName (lib/codenomad-link.ts) returns the saved name, or the host name when that name is a raw address (host:port, origin, href or the base URL). The port stays only when another saved server shares the host name, so two servers on one machine remain distinguishable. Saved names are not migrated; only the display derives the host name. The tab label and the recents built from saved servers use it. The probe exposes no machine name, and adding one to the unauthenticated status route would leak it, so the host name is the fallback. Validation: codenomad-link.test.ts covers saved names, raw-address names and the shared-host port rule.
The home page offered saved CodeNomad servers twice: a Servers tab with a Connect CodeNomad Server button, and the Remotes menu that opens them as project tabs. The duplicate tab and button are removed; Remotes keeps every saved profile, so existing users lose nothing. Everything the tab offered stays reachable. Remotes' field adds a server from a pasted address or pairing link; a row's context menu gains Edit server beside Remove. The Settings Servers card keeps adding servers and gains an Edit button per row. Both edit through the existing server dialog, which takes an initial profile and error; editing shows Save only. The dialog that Remotes opens is mounted once in App (RemoteServerEditor), because the launcher unmounts Remotes as it closes. Saving keeps the profile id, so its window storage and sign-in stay. A rename that keeps the URL and TLS setting skips the probe and works while the server is offline. A pasted address whose probe fails with tls_error opens the dialog prefilled with that error: checking Skip TLS verification saves a profile that keeps opening its own window, never a tab. Passwords are never saved; sign-in happens on the server's page in the tab. i18n: folderSelection.remoteProject.edit in all ten locales; the unused folderSelection.servers.count is removed. Validation: browser tests cover the home page without the Servers tab, saved servers listed in Remotes, a context-menu rename without probe that renames the tab, the TLS fallback opening a window, and the Settings card rename. UI unit tests (2076) and tsc pass.
…docs The help sent people to the home page's Connect CodeNomad Server button and Servers tab, which Remotes now replaces. Remote Access: saving a server starts from Remotes' paste field (Settings still adds one with Connect CodeNomad Server, and the server dialog opens when a pasted address's certificate fails the check); saved servers are listed under Remotes with Edit server and Remove saved server in their context menu and in Settings; a tab shows the server's name before a project is chosen, and the server's password is entered in the tab and never saved. Remote Control: a desktop pairs by pasting the link into Remotes. All ten locales use their UI labels. dev-docs: PROJECTS.md documents Remotes as the only home entry, the shared edit dialog and its App-level host, the probe-free rename, the TLS fallback and serverDisplayName; REMOTE_CONTROL.md points pairing at Remotes. Validation: npm run test:help (31 tests) passes.
…ers in Settings Server access was split across a permanent Remotes section (paste field, "+ Project" per row, context menu) and a Servers card inside Settings -> Remote Access. Users asked for one minimal, consistent entry. Home page and new-instance launcher now share one Browse component (components/browse-menu.tsx), placed below their actions and titled like the launcher's Recent heading, with its chevron first. It lists This computer (the former Browse button: native dialog or folder browser), each saved CodeNomad server under its display name (opening its project tab, or its window when the certificate is unverified), and Add server..., which opens the existing server dialog. Its disclosure state is shared per window; arrows, Home/End move through rows, Escape folds it back without closing the launcher. Web clients and Remote Control devices see only This computer. The framed Browse button, Remotes, its paste field, the per-row "+ Project" action and the server context menu are gone; the remaining actions keep their style and gain the freed room. Settings gains a Servers entry (host windows only), the one place to open, edit, remove (confirmed) and add servers, with the shared settings rows. Remote Access keeps only what lets other devices drive this computer. The section id is accepted by the UI, Electron and Tauri allowlists. From the native Preferences window, which has no tabs, a server opens its window. The dialog takes the address or pairing link first; the name is optional (a server without one reads as its host name), an address carrying credentials is refused, an address already saved reuses its profile, and a failed certificate check shows its error next to Skip TLS verification. i18n: Browse, This computer, Add server..., Settings Servers and Open in all ten locales; Remotes, Connect CodeNomad Server and other keys left unused are removed; the URL-required message no longer asks for a name. Validation: browser tests cover the shared Browse section on both surfaces (chevron, folding, keyboard, identical rows), This computer, a server opening as a tab or a window, Add server with pairing, refused credentials and the TLS fallback, Settings -> Servers open/edit/add/remove in the real Preferences window and the absence of the old card in Remote Access. UI unit tests (2076), Electron and Tauri section tests, UI and Electron typechecks pass.
…-docs The help sent people to Remotes, its paste field and a server context menu, which Browse and Settings -> Servers replace. Remote Access: adding a server starts from Browse -> Add server... (or Settings -> Servers); the dialog takes a trusted HTTPS origin or a pairing link, the name is optional and a failed certificate check is reported there; saved servers are listed under Browse and opened, edited and removed in Settings -> Servers; a tab shows the server's name before a project is chosen, and the sign-in made on the server's page is reused on later launches. Remote Control: a desktop pairs through Add server.... Projects: This computer under Browse opens a local folder; the launcher lists Temporary, Clone and Browse, and servers are managed in Settings. All ten locales use their UI labels. dev-docs: PROJECTS.md documents the shared Browse component, the dialog rules and Settings -> Servers; SETTINGS.md the split between Remote Access and Servers and the three section allowlists; REMOTE_CONTROL.md pairing through the server dialog. Validation: npm run test:help (31 tests) passes.
…the left The home page and the launcher now follow one layout, as the user decided after the previous review. Home page: the right card has two tabs, Recent tabs and Browse. Recent tabs lists local projects, remote projects and SideCars, with the launcher's search. Browse is always open and lists This computer, each saved CodeNomad server and each configured SideCar with its state; a stopped SideCar cannot open. These rows replace the Open SideCar window, which is removed. The left column holds only creation buttons, shared with the launcher: Clone Git Repo, New temporary tab, New server (host windows only, the server dialog) and New SideCar (Settings -> SideCars, focused on the form's name field through the existing settings row target). No OpenCode server button. Launcher: titled Open a tab, it shows the search, Recent tabs (with SideCars), the folded Browse section and the same four buttons. This deliberately lifts the projects-only launcher restriction. A SideCar joins the recent tabs when it opens (stores/sidecar-open.ts), stored as ui state sidecarRecents with its id and time only: no address, secret or proxy token. Recent SideCars show only while configured. Web and Remote Control clients keep their restrictions: no remote servers. Keyboard: arrows move between the home tabs, through the search results and the Browse rows; Escape folds the launcher's Browse. i18n (10 locales): Recent tabs, Open a tab, New temporary tab, New server, New SideCar; the French clone label regains its accents; keys of the old picker, launcher buttons and folder counts are removed. The replacement of "instance" elsewhere stays out of scope. Validation: browser tests cover both home tabs, the search, the tab keyboard, SideCars opened from Browse and joining the recent tabs (stored without address), the launcher's identical rows and buttons, the absent SideCar window, New SideCar landing on the form and web clients without servers; unit tests cover SideCar recents and search. UI unit tests (2078), UI typecheck, Tauri build pass.
The help and dev-docs follow the new home page and launcher. Projects: Recent tabs or Browse -> This computer opens a project; Browse also lists servers and SideCars; the Open a tab launcher searches recent tabs, opens Browse or offers the four creation buttons; New temporary tab starts a temporary workspace. Remote Access and Remote Control: servers are added and paired with New server; remote projects join Recent tabs. Browser previews and SideCars: a registered SideCar opens from Browse, then joins Recent tabs, and New SideCar opens its form. All ten locales use their UI labels. dev-docs: PROJECTS.md replaces the projects-only launcher rule with the shared layout, the SideCar recents and their storage, and the home tabs; REMOTE_CONTROL.md points pairing at New server. Validation: npm run test:help passes.
…sible Recent After visual review of the home page and launcher layout: - Browse ends again with Add server... (host windows only), on the home page and in the launcher; it opens the server dialog. - The launcher keeps only Clone Git Repo and New temporary tab; the home page keeps its four creation buttons. - The recents are titled Recent again. In the launcher they are a collapsible section treated like Browse: chevron first, no frame or icon, unfolded by default and kept per window; Escape on its title folds it without closing the launcher, and typing or an arrow in the search unfolds it. The home page's tab is named Recent. i18n (10 locales): Recent returns with its former labels; the Recent tabs key is removed. Validation: browser tests cover Add server... as Browse's last row on both surfaces, the launcher's two creation buttons, and the Recent section's chevron, folding, Escape and unfolding; UI unit tests (2078), UI typecheck and the Tauri build pass.
Projects, Remote Access and Browser previews and SideCars follow the review: recents are titled Recent, the launcher offers Clone Git Repo and New temporary tab, and servers are added with New server on the home page or Add server... at the end of Browse. All ten locales use their UI labels. PROJECTS.md describes the collapsible Recent section, the launcher's two buttons and Add server... in Browse. Validation: npm run test:help passes.
…a dialog The user wants no floating window for adding a server. Browse's last row, on the home page and in the launcher, is again an inline field, Server address or link, submitted with Enter or + (a pasted valid link is added at once). The address or Remote Control pairing link goes through the existing add path and probe; the server is saved under its host name and its tab opens directly (its window where tabs are unavailable), and the launcher closes. An address already saved reuses its profile. An address carrying credentials, or text that is no address, shows a short error under the field. Only a certificate that fails the check adds a Skip TLS verification checkbox under the field, confirmed through the same field; that profile keeps opening in its own window. Settings -> Servers adds through the same field, saving without opening (a pairing link still opens, since that consumes its code); the server dialog now only edits a saved server. The App-level dialog host is removed, and so is the home page's New server button, as the user decided: the home page keeps Clone Git Repo, New temporary tab and New SideCar. i18n (10 locales): the field's label, its add button, Skip TLS verification and two error messages; New server, Add server... and the add dialog's keys are removed; the --connect-server credentials error points at Browse. Validation: browser tests cover a pasted pairing link opening its tab, an address opening its tab under its host name, an already saved address, refused credentials, the TLS failure then success in its own window, no dialog anywhere, Settings adding without opening and pairing reuse. UI unit tests (2078), UI typecheck and the Tauri build pass.
Remote Access: servers are added by pasting an address or pairing link into Server address or link under Browse (also in Settings -> Servers); a failed certificate check offers Skip TLS verification under the field and opens the server in its own window; servers are renamed in Settings -> Servers. Remote Control: a desktop pairs by pasting the link into that field. The --connect-server paragraph no longer names the removed Connect button. All ten locales use their UI labels. PROJECTS.md and REMOTE_CONTROL.md describe the inline field and the edit-only server dialog. Validation: npm run test:help passes.
Give a simple click on + or New instance its own empty tab, with focused search, Recent and Browse choices and the existing clone and temporary actions. Keep the compact launcher gestures, and open Home from the CodeNomad logo on native and web hosts. Home and blank tabs show localized item counts, and Home links to the existing Sponsor page with a heart action. Share recent choices with the launcher and replace only the originating blank slot after local, remote or SideCar opening. Capture the origin before asynchronous server probes and preserve it through folder/clone callbacks. Blank tabs own no backend record and are excluded from restoration; their close action stays local. Validated UI TypeScript, 1,623 UI unit checks, and six related browser files (94 passed, one platform-dependent Electron check skipped), including delayed server connection and the Tauri Sponsor command. The offline Tauri no-bundle release build succeeds without launching it.
Document the ephemeral new-tab lifecycle, in-place choices, responsive Recent/Browse lists and their counts, plus the Home logo and Sponsor action. Update Projects, Desktop and Shortcuts in all ten help languages, and record the shell and asynchronous replacement contracts for contributors. Validated the full multilingual help check (31 tests) and links. Keep the generated local open_external_url permission outside these commits.
Render empty tabs through FolderSelectionView's blank mode so branding, background, large creation buttons, recent rows and the Recent/Browse selector match Home. Keep search beneath the selector and focus it on activation, while hiding Home-only controls and metadata. Unique view IDs and active-state guards preserve accessibility and prevent inactive tabs handling shortcuts or drops; remove the parallel blank view and stylesheet. The inline server field now saves only, focuses the saved Browse row and leaves the launcher open. Explicit row selection opens the server. Preserve TLS confirmation, credential refusal and duplicate reuse. Pairing entries wait only in renderer memory until selection, clear on removal or origin changes and never enter persisted profiles. Update Projects, Remote access and Remote Control help in all ten languages plus the shell/project/control contracts. Validated UI typecheck, 1,623 UI unit tests, 103 browser tests (one environment-dependent Electron check skipped), 31 help checks and an offline Tauri no-bundle release build. Captured and compared Home and blank layouts at desktop and narrow sizes; the built host was not launched.
Browse now enters a saved server in place on Home, empty tabs and the plus launcher. An inline sign-in form authenticates through the local backend; recent projects, parent navigation and Select Current keep the list open until a folder is chosen. Opening that folder targets the remote project directly and replaces the originating empty tab. Native embedded views retain their independent authentication. Reuse the existing CodeNomad client, credential store, folder normalization and fake remote server without relay or event rewriting. Persist successful credentials and sessions privately beside config, retry authentication once after expiry and forget identity before removing the profile. Bind requests to backend-owned profiles, fence redirects/DNS/origins, honor certificate policy and redact connection request bodies. The new routes require loopback non-ingress access plus a trusted self Origin before any secret or network access; upstream requests never carry Origin. Remote Control backend pairing remains explicitly unavailable: its existing gate requires browser Origin while the direct listener rejects pairing. Do not spoof that header or silently weaken the gate. Imported special-address restrictions remain in place. Validated UI/server typechecks, 1623 UI unit tests, 36 targeted real-server/security tests, and 108 browser tests with one environment-dependent Electron check skipped. The full server suite reported 3688 passed, 21 skipped and four load/platform failures; all four files passed isolated reruns (16 tests). Offline Tauri no-bundle release build succeeds without launching the app.
Update Projects, Remote access and Remote Control in all ten languages for in-place browsing, separate native-view sign-in, private persistent credentials, removal and address/TLS safeguards. Document the unavailable server-side Remote Control pairing path without implying that browser pairing grants the backend a session. Keep CLI native-window sign-in distinct from Browse. Record the API admission and credential ownership contracts in Projects, Remote Control and architecture. The complete multilingual help validation passes 31 tests.
A saved server is an explicit destination chosen by this computer's user. Remove special-address range filters that prevented Tailscale/CGNAT, LAN, container, VM and IPv6 link-local connections. Preserve IP syntax checking and DNS pinning, the local caller guard, profile certificate policy, origin-bound private credentials, and refusal to follow redirects. No upstream Origin is synthesized. Test former excluded ranges, MagicDNS answers, ULA and scoped link-local answers, and authenticated fake-server requests through a pinned MagicDNS resolver. Update the address-policy documentation in all ten help languages. Server typecheck and 38 targeted tests pass; the complete serial server suite without forced exit passes 3695 tests with 21 platform skips. Baseline 6364e29 reproduces all four previous failure signatures: three Windows libuv shutdown assertions with forced exit, and the Git observation deadline under concurrent load. No introduced shared state or fixed-port contention found. Help passes 31 tests and the offline Tauri no-bundle build succeeds.
Add POST /api/remote-control/server-pair on the Remote Control ingress. Its explicit JSON/header protocol uses only the short-lived single-use code and shares device issuance, revocation, expiry and eviction with browser pairing. Device labels identify the requesting CodeNomad hostname without attesting it. Browser pairing and its Origin checks retain their existing behavior. Reject browser, ambient-auth and preflight metadata before CORS; emit no CORS or Set-Cookie headers. Limit the dedicated route to ten attempts per minute and bounded bodies. The local backend validates the exact HTTPS saved origin, performs a fresh cookie-free exchange without Origin or Fetch metadata, verifies the resulting device and persists only its private device credential. Fixed endpoints, TLS policy, redirect refusal and request-log confidentiality prevent credential escape. Pairing-link profiles can browse in place immediately. Revoked credentials and unsupported older endpoints recover through the inline sign-in flow; refused link attempts clear the field and show localized expired/rate-limit errors. Native embedded views keep their separate authentication. UI/server typechecks, 44 targeted server tests, 46 browser tests, 1623 UI unit tests and 31 help checks pass. The complete serial server suite reports 3702 passed, 21 skipped and the previously baseline-reproduced Git observation deadline; its file passes 10 tests on isolated rerun. Offline Tauri no-bundle release build succeeds without launching the app.
Document the dedicated tunnel protocol, code-only authorization, browser and ambient-auth rejection, no-CORS responses, shared one-use semantics, global rate-limit tradeoff, device scope and private local storage. Explain supported tunnel exchange, older-server recovery and separate native-view authentication in all ten help languages. The full multilingual help validation passes 31 tests; the documentation records current behavior and the hostname label's trust boundary.
A global attempt quota allowed anonymous guesses to block every valid server pairing link. Check and atomically consume a valid code through the existing manager exchange before applying the failure bucket. Successful exchanges never count toward the quota; invalid bodies, guesses and replays retain the existing bounded failure responses and Retry-After behavior. Browser pairing, Origin checks and the device registry remain unchanged. The code contains 192 cryptographically random bits and lasts five minutes, making online guessing infeasible even when validity is checked before throttling. Document that entropy supplies guessing resistance while the failure quota must not deny legitimate holders, and update the ten help translations. Replayed the reviewer's original three probes, then converted the lockout proof into a regression that fails before the fix with 429 instead of 200. Keep the exact ten-wrong-then-valid case in the server unit tests and preserve the broader replayable review probes separately from that suite's browser-free runtime. Server typecheck, 69 targeted/review tests, the complete serial server suite (21 skips, no failures), 31 help tests and diff checks pass. No UI/native code changed and no running host was stopped.
Use the same Recent/Browse selector on Home and compact blank tabs, with shared secondary creation actions. Keep the alternative plus-button launcher limited to recent projects and an action opening a blank tab. Main project actions create independent local, remote and SideCar occurrences; separate Open actions join existing tabs, including Browse entries. Retain server identity through authentication and folder navigation, label credentials, separate remote recents from folders, localize short connection failures and expose details on demand. Identify pairing failures on their server, keep repair inline, disclose separate-window fallback at selection and fence late autofocus when the user moves elsewhere. Preserve the existing backend/native authentication boundary. Update all ten UI locales and help pages, plus project/shell/remote-control conventions. Validate with UI typecheck, 1,623 CI UI unit tests, 16 focused units, the server's same-path occurrence test, 59 real-component browser tests, 31 help checks and an offline Tauri --no-bundle build. Compare screenshots with concept A; native cross-platform qualification remains separate.
…ion across listeners Capture the saved profile origin, TLS policy and revocable generation before browse/connect queue admission. Recheck authority at dispatch and publication, invalidate queued credentials on profile changes, and bind persisted identities to their TLS policy. Share one backend browse authority and credential cache across HTTP, HTTPS and the private bridge. Forget revokes every listener immediately; standalone listeners release a shared lease. Reuse the reviewed PR7 implementation without its device relay protocol: P2 uses ingress-only pairing and read-only browsing. Add real HTTP regressions for queued password retargeting, TLS-bound persistence, cross-listener cancellation and shared-owner lifecycle. Six regression assertions fail against the original P2 implementation. Node 24 server/UI typechecks, 72 targeted tests and diff whitespace checks pass. The full server suite ran once: 3710 passed, 21 skipped, one existing cookie Max-Age timing assertion failed by one second and passed on targeted rerun. Preserve the running test hosts and packaged output.
Restore the two-column Home composition, original controls, row treatment and text counters. Align the scrolling selector with the full creation column and distinguish selected and hovered header tabs with existing surface tokens. Show Recent tabs and Browse side by side in blank tabs, preserve centered branding, and place the server field above clone and temporary actions in the Browse footer. Reuse the active tab background and the existing uppercase open-project badge across recent surfaces. Replace the quick launcher's trailing project action with a framed temporary-tab icon in its title bar, retaining the existing action and label. Limit recent-row emphasis to pointer hover or keyboard navigation. Translate the requested recent-tab titles and search placeholders in all ten locales, and update the affected help and project/shell contracts without changing remote opening behavior. Validated with Node 24.20.0: UI typecheck, both CI UI unit groups (693 and 278 passing), 45 concerned browser checks, and 31 help checks. Built the UI and offline Tauri release without rebuilding server dist, relaunched the isolated test profile, and compared updated fixture/native captures with the supplied references.
…econd sign-in Opening a project from a saved CodeNomad server asked for the password twice: once in Browse, held by the local backend, and again inside the remote tab, whose native view keeps its own cookies. Browse also mixed the server's recent projects, its current folder and its child folders in one list, with a "Select Current" row that read like another folder. The remote tab now inherits the local backend's connection. A host-only route (POST /api/remote-servers/:id/view-session, same loopback and self-Origin guard and profile authority as browse/connect) performs a fresh login with the stored credential and returns only that dedicated session cookie; a paired tunnel profile reuses its device cookie. The password never leaves the backend and the stored credentials are untouched. The UI passes the cookie to the native view, which validates it against the server origin and installs it before loading the single-project entry: Electron sets it on the view's partition, Tauri creates the child webview blank, sets the cookie, then navigates. A remote recent opened without a stored credential shows the existing sign-in form in place (Recent tabs column or + menu) and opens the tab only after sign-in; a tab restored at startup shows the same form in the tab. Unreachable and TLS failures keep their short messages with retry. Browse explores folders only: an editable path field at the top opens the folder it shows with Enter or its trailing arrow, folder rows below only navigate, and Parent folder goes up within the server's allowed root. The server's recent projects move to the Recent tabs column, view-local, with a pending/empty distinction and no host fallback. The new tab shows compact branding, Temporary and Clone above two equal columns; the + menu keeps its search without focusing it. Validated with server, UI and Electron typechecks, 32 server tests, the focused browser suites (remote-project-tabs, remote-server-ux, new-instance-launcher), 16 Electron tests, Rust cookie validation tests, help checks in ten locales, and a rebuilt Windows Tauri host: a remote recent opened the single project with no second sign-in against a real test server, and a restored remote tab did the same.
Recheck remote-tab visibility and bounds after session preparation, and keep native hide, resize and close available while the page is loading. Replay the latest state once native creation completes so delayed authentication cannot cover another tab or a local overlay. Preserve anonymous direct servers by checking unauthenticated remote status through the origin-bound browse transport before returning a view session without a cookie. Password and paired-device identities remain backend-owned, with their existing authority and TLS fences. Cover delayed native opening and anonymous Browse/recent/restore flows through both desktop adapters, and validate ordinary cookie paths in Electron and Rust. Update internal contracts and all ten help locales. Typechecks, server, targeted Electron, Rust and help tests pass; browser suites pass 95/96 with the unrelated SideCar launcher timeout passing on focused rerun alongside all eight new scenarios.
The remote project tab section of the Remote access help carried implementation notes meant for developers (renderer, native cookie jar, instructions never to log or forward credentials) and a separate paragraph about anonymous servers. It now says what users see: the tab reuses the local backend's saved sign-in, a paired server uses its device access, an anonymous server opens without signing in, and an unsaved sign-in shows the existing form in place. Applied to all ten locales; help checks pass (31 tests, 28 pages x 10 locales).
Keep restored remote projects identifiable before their native views are shown, including multiple folders on the same server. Persist the embedded project's known title through capture, both snapshot codecs and restoration; otherwise reuse the remote recent's name or the shared folder display-name helper. Native creation remains lazy for inactive tabs on Electron and Tauri. The existing tab presentation and credential boundaries are unchanged. Cover saved-title precedence, recent names, POSIX/Windows folder fallback and hidden view counts in the real browser fixture, plus bounded snapshot round trips. Validated with UI typecheck, 72 client-state/tab unit checks, 102 focused browser checks and git diff --check. Reverting the production fix makes all six new Electron/Tauri label regressions fail their assertions.
Step 3 of Save a remote server still announced Recent and Folders sections inside Browse. Choosing a server now lists its folders in Browse and its recent projects in the Recent tabs column, as the remote tab section already describes. Applied to all ten locales with each page's existing labels; help checks pass (31 tests, 28 pages x 10 locales).
Keep the browsed server icon and name beside the Recent tabs title and count on Home and blank tabs. Host recents show only the existing This computer icon and tooltip, leaving the list for projects. Group Temporary and Clone with the blank-tab branding and use the shared window-shell density scope so window-action icons have proper inner padding. Preserve existing labels, surfaces, menu controls and host behavior. Cover source identity, removal of the extra name row, alignment, localized accessibility and button padding in the real browser fixtures. Verify long-name truncation through Electron and Tauri adapters. UI typecheck, 102 browser tests plus two long-name regressions, the final 13 launcher tests and git diff --check pass.
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.
Refs #1236
Draft / prototype for discussion. Do not merge.
Following the feedback on #1296, this keeps the CodeNomad server and answers #1236 from the other side: each container or host runs its own CodeNomad server, and its projects open as normal tabs in one local window instead of separate remote windows.
How it works
WebContentsView, Tauri child webview) in a new single-project embed mode (?codenomadEmbed=project): no title bar, tab bar or Home, just the project workspace, plus a folder picker until a project is chosen.Also included
Max-Age(they were browser-session cookies, so every restart asked for the password again), and logout revokes the server session.Tested
cargo test --release311/311, and help checks.Limitations / open questions