-
Host Git probes report
git_requiredonly for an absent executable (ENOENT). Timeouts, killed processes, unsuccessful exits and invalid version output yieldgit_probe_unavailable(503, retryable); the availability advisory propagates uncertainty to its best-effort caller rather than publishing installation guidance. The probe retains its five-second deadline and rechecks on demand. -
Closing a project tab detaches it immediately and requests deletion of that occurrence's logical backend workspace record; failures notify and never retry automatically. Separate occurrences of the same folder are independent. A
workspace.stoppeddeletion closes the same record in other windows and notifies only windows displaying it that did not initiate the close. CodeNomad never evicts native Locations; OpenCode sessions keep running and reopening finds them. Whole-window close, app quit, renderer reload and backend shutdown keep existing restoration behavior. Temporary discard and server stop events use local-only tab detachment, not another DELETE; Keep closes the retained project normally. -
Restorable workspace descriptors carry an optional versioned
viewStateenvelope.stores/tab-view-state.tsowns its runtime copy by instance UUID; capture writes each occurrence's envelope alongside its own descriptor, and hydration seeds it onto the restored UUID before selecting a conversation. Repeated hydration preserves local gestures. Runtime tab bindings keep views attached through reorder and partial restore; explicit removal clears only that occurrence, while backend unavailability preserves recovery state. The envelope carries per-session chat/preview modes, Mission reader/selection/expanded rows/disclosures, right-panel selection and Files mode. Session-owned browser URLs/history/viewport persist inopencode-session-browser-state-v1. Consumers readgetTabViewState, replace individual fields withupdateTabViewStateand reserveseedTabViewStatefor restoration; capture's optional accessor preserves unhydrated fallback state. Seeded Mission reader targets bind their instance references to the restored UUID. See the restore payload for its storage contract. -
Client-state initialization adopts bounded folder/session preview entries into matching saved descriptors. A project-wide URL belongs to the first matching descriptor with a saved conversation, in descriptor order. Imported occurrence browser entries merge by session, preferring the active descriptor; local-storage entries prefer their most recently written occurrence. Each tab keeps its foreground mode. Resource URLs publish before imported envelopes reduce to modes; unmatched folders remain eligible for migration and consumed entries retire after accepted publication. Restoration seeds data only; a preview consumer must explicitly open its saved URL. Session browser persistence shares a 4,000-character window budget, with 32 sessions and 32 credential-free HTTP(S) history entries per session; history trims before preview eviction.
-
Unsent drafts and attachments outlive their project tab in the window's memory (
stores/closed-workspace-drafts.ts).removeInstancehands them over just before clearing them, keyed by project identity (closedWorkspaceDraftKey: backend id, empty for the window's own backend, plus thenormalizeWorkspacePathfolder), for every removal: user close, a close from another window, a backend stop or restart reconciliation. Temporary discards (drafts: "discard") keep nothing and purge the project's whole entry, drafts and attachments, because the folder is deleted. Every window recognizes them: the server deletes a discarded record (workspace.stoppedwith reasondeleted) before unregistering its folder, whereas Keep unregisters first, so a deleted record whose folder the latestworkspace.temporaryChangedstill lists was discarded. That registry state is the only authority: the instance'stemporarymark can be stale (a workspace-list response requested before Keep, a Keep missed while disconnected). Without a broadcast on the current event connection (none yet, or reset on reconnect) no removal is a discard and the drafts are kept, since an entry for a deleted folder is harmless and bounded while dropping a kept project's drafts loses work. Restoration-owned instances discarded byremoveRestoreCreatedInstanceFromUikeep nothing either (drafts: "skip"; restoration still holds what it seeded). Closing several occurrences of a folder merges them, the later close replacing a session's text and attachments together, including a session it emptied by typing, clearing or sending (draft/attachment authority with no content), which removes the older value. Folder fallback supersedes older shared bundles, parked or pending. An exact occurrence updates or clears only its own bundles, even when its latest copy is in the shared entry. Saved snapshots remain scoped to their own occurrence. A restoration claims clear marks only for its exact saved workspace ID and folder. The opening claims vault bundles after its own saved prompts are known. Text, files and clear marks take precedence only for the exact saved workspace ID in the same folder. A successful delivery transfers the bundle to the receiving occurrence; undelivered bundles remain with their original owner. A plain folder opening fills an empty, untouched bundle from shared content or an unambiguous delivered successor. The new-conversation draft applies immediately and session drafts wait for initial hydration and owned native reads. A confirmed deletion transfers the text and attachments through the startup recovery rule; an unresolved draft stays in the vault. Filling empty sessions can copy one occurrence's draft into an empty, untouched session of another occurrence of the folder; nothing is overwritten. A restore that fails, or whose tab closes before it finishes, puts back underneath only the sessions it could not apply and the user did not touch there. The vault keeps up to 16 projects and up to 16 returned exact occurrences per project, evicting the oldest entry first. Desktop and web restoration persist open tabs across reloads. -
Git is a full-functionality prerequisite, with directory-only degraded conversations when the backend cannot find Git. Only the explicitly opened physical folder is session authority in that mode; never infer sibling worktrees from native project IDs. Keep ancestor/descendant mutation identities covered by the deletion fence across Git availability changes. Inform agents through the owned native
codenomad.git-availabilityinstruction before prompts/custom commands, remove stale context after recovery, and keep this advisory separate from fail-closed environment synchronization. Do not add a blocking Git setup UI. Validate withscripts/test-git-degraded-native.mjsusing an isolated CLI/database and provider. -
Temporary instances (
workspaces/temporary-workspaces.ts, UIstores/temporary-instances.ts) are ordinary non-Git workspaces on CodeNomad-created direct children of<config>/temporary-workspaces. Registry membership (temporary-workspaces.json), not location, makes a folder temporary; keeping only unregisters it and adds a named recent project. Discard deletes only registered children of that root, refuses running conversations and other open tabs of the folder, removes conversations deepest-first, closes the workspace before deleting the folder and keeps failed removals registered; such a folder is reachable only by browsing to it. Closing a temporary tab from the UI asks Keep/Discard/Cancel, except that an untouched one (no conversation, file or unsent draft) closes and is discarded silently (onlyIfEmpty: the server refuses withtemporary_has_conversations/temporary_not_empty, and any failure of that quiet discard returns the choice without an error). Before the server stops it, a visible temporary tab yields to its neighbour (or closes if alone) and a refusal restores it in place;workspace.stoppedlikewise closes the tab first and clears the instance in a microtask, because clearing a visible shell's state in the same update as its tab freezes the window. Same-minute names get a(n)suffix. Registry changes broadcastworkspace.temporaryChanged, which clears kept marks in every window. Open temporary tabs are saved and restored with the app state like any project tab (still marked temporary). Only the choice dialog overrides initial focus (to its last, non-destructive choice); confirms keep focus on Cancel. Refusals use stabletemporary_*codes localized by the client. Validate withscripts/test-temporary-workspaces-native.mjsagainst an isolated CLI. -
The tab-bar new-instance button follows the last tab like a browser: the instance
TabScrollframe only spans its tabs and the button sits after it, outside the scroller (so focusing it never scrolls the strip), ending up at the strip's end once tabs overflow. Dragged tabs stay visually within the tab list like a browser's (KeepDraggedTabInStrip), while the drop slot follows the pointer's unbounded position (closestUnboundedCenter). The button keeps its click (full home page, Cmd/Ctrl+N) while a long press, right-click, Alt+Down, Shift+F10 or Menu opens the anchoredNewInstanceLauncher(lib/long-press.ts; only Escape returns focus to the button, never over another surface or the home page): search-first recent projects (an open project switches to its tab) and Browse/Temporary/Clone only. Remote servers, SideCar and management (rename/remove recents, servers, settings) stay on the home page. Browse/clone flows live once incomponents/new-instance-dialogs.tsx(with optional home-only add-server setup) and recent-folder display helpers inlib/recent-folder-display.ts, shared withFolderSelectionView; styles instyles/components/new-instance-launcher.css. -
The clone dialog (
components/new-instance-dialogs.tsx) suggests the repository'sgit clonefolder name (lib/clone-destination.ts) inside a parent: the folder chosen with Browse, else the server-scopeduistatelastCloneParent(the folder above the last successful clone), else the folder above the most recent project. A destination the user types is kept as entered and sent unchanged; the server creates it.