Commit graph

260 commits

Author SHA1 Message Date
Pascal André
c6bf72ed85
feat(push): add browser worker and per-device controls
Add explicit browser-device background consent with the existing System event choices, generic localized worker notifications, authenticated opaque navigation and static-only PWA caching. Preserve desktop native delivery and keep permission requests inside the activation gesture.

Retain generateSW and its root registration, import the versioned handler, purge the broad runtime cache and preserve opaque references through login. Principal-bound endpoint/view focus leases suppress delivery while an opted-in device is viewing; confirmed scope avoids renderer OS duplicates. Navigation waits for authentication/restoration and retains its intent while initial inventory arrives.

This draft covers primary-server projects and one window's scope snapshot. Remote generation/scope integration belongs with P3; multi-window scope aggregation and trusted OS click/subscription-update qualification remain open.

Validated root and server typechecks, the three exact CI UI commands (834/426/1116), 52 browser/push checks, 64 push-family tests, 7 inventory checks, the isolated concurrency-4 server glob (4933 passed, 25 skipped), and the 280-page help build. Baseline worker/focus tests failed before implementation. No real push service was contacted.
2026-11-16 20:03:05 +01:00
Pascal André
bbe2ac40f8
fix(ui): retain missing primary browser project tabs
A web reload must preserve a saved primary-backend occurrence and its draft even when its workspace record is gone. Keep the occurrence as a placeholder independently of the multi-backend flag, with read-only Retry and explicit Open through the existing commit and uncertain-creation guards. Native local restore retains its creation policy.

Primary recovery consumes its confirmed inventory read instead of rechecking a failed startup prerequisite. Reuse existing labels, omit remote sign-in controls for the primary backend, and update the reviewed operation inventory and mobile help in all ten locales.

Red-first browser regressions cover both flag states, explicit opening, inventory-only recovery and recovery after an initial 503. Validation: UI typecheck; CI-exact suites 834/834, 426/426 and 1116/1116; 143/143 tests across the twelve browser files; 31/31 help checks covering 28 pages in ten languages. Independent review found no remaining blocker.
2026-11-16 18:06:23 +01:00
Pascal André
144c02d0c9
fix(ui): complete remote browser recovery and actions
Browser and PWA recovery keeps remote occurrences, drafts and views without opening missing projects implicitly. Expose explicit Open through the existing admitted inventory and commit guards, preserve uncertain 499 requests, and allow explicit recovery after definitive 429 refusals.

Embedded Mission settings follow the selected qualified Location. Browser system notifications reuse guarded project/session actions and close on attachment revocation. Creation and saved-profile IDs use the shared cryptographic UUID fallback on insecure HTTP.

Red-first real-component regressions cover the missing Open action, selected worktree routing, system-notification clicks, HTTP UUIDs and 429/499 ownership. Validation includes 138 browser checks, 834 runnable UI checks, 426 Missions UI checks, all four package typechecks and 31 help checks across 28 pages in ten languages. The reviewed backend-operation inventory includes explicit recovery continuations.
2026-11-16 16:55:47 +01:00
Pascal André
53929be994
merge: sync remote-client admission with multi-backend base
Integrate the development sync, proxy-destination guard, occurrence-scoped views and trimmed UI copy. Resolve the Home conflict by retaining the trimmed copy and capability-based server controls.
2026-11-16 09:50:39 +01:00
Pascal André
60172b6117
feat(servers): admit authenticated remote multi-backend clients
Allow paired Remote Control and declared direct UI clients to use and administer host-owned server profiles behind the strict multiBackend flag. Preserve local callers and the closed server-device protocol, nested-relay exclusions, and host-only preview and memory boundaries.

Centralize channel admission and publish use, management and secret-entry capabilities. Enforce the profile-state mutation boundary before persistence, including owner deletion and reverse-proxy provenance. Refuse new credentials over LAN HTTP and reject credential-bearing probe URLs without exposing their input.

Add red-first production-application admission, relay, persistence and browser regressions using controlled A/B servers with colliding IDs. Validate the three CI UI unit groups (2260 passed), complete server glob at concurrency 4 (4743 passed, 25 skipped), 140 selected browser tests, typechecks, reviewed asynchronous inventory and all ten help locales.
2026-11-16 08:09:32 +01:00
Pascal André
66c80c32a3
chore: compose dev proxy security with multi-backend ownership
Include dev through d045d0357, retaining precise Mission action states with captured backend preferences and exact reconciliation. Guard isolated preview listeners and SSH reservation and forward addresses while trusted capabilities retain their pinned dial, TLS and abort ownership. Forward protection survives failed termination until observed child exit.

Keep tab presentation keyed by qualified occurrence and project completion acknowledgements separately scoped. Automatic local recovery yields to remote restoration without dismissing explicit maintenance. Update authority inventory, current-state guidance and consumer fixtures; preserve cancellation, confirmation focus, deletion identity and security assertions.

Validated serially with Node 24.22.3: four typechecks; exact UI commands 833/426/1116 passed; selected browser coverage 843 passed after integration fixes; full server glob at concurrency 4 gave 4731 passed and 25 existing platform or opt-in skips. Help 31 passed and ten-language build completed; built Electron preloads 1 passed. Inventory regeneration, fixture wiring, unique CI hook and diff checks passed.
2026-11-16 07:49:42 +01:00
Pascal André
829e1ad04d
chore: sync multi-backend security policy with dev
Integrate administrator Remote Control disable and listening-address lock,
verified direct-HTTPS SideCar opt-in and assistant reasoning metadata while
leaving multi-backend disabled by default.

Preserve strict loopback-origin relay authority, origin-bound device pairing
and private preview ownership. Administrator disable covers direct pairing,
exchanges and authentication without permitting password fallback. Keep the
ordinary listener's address lock separate from outbound profile transports,
SSH forwards and the isolated loopback preview listener.

Compose the SideCar opt-in with direct browser-device admission only for
SideCar content. Retain host-only relay, memory and remote-preview management
scope. Reject ordinary preview/SideCar proxy rebounds into this backend's
control APIs or preview capability origins before HTTP, fallback or WebSocket
dispatch, including with skipped local auth and a valid relay proof.

Keep per-backend metadata fences and all ten locales. Add real transport
composition regressions with ordinary preview/SideCar positives and
zero-DNS/zero-upstream refusals; update current security contracts and the
typed backend inventory. Full validation counts and known platform failures
are recorded in the integration PR.
2026-11-16 01:49:15 +01:00
Pascal André
fee7b61449
chore: sync multi-backend restore and drafts with dev
Integrate dev's browser-tab reload restoration, closed-project draft retention,
integration state lines, plugin rules, Console usage and transcript fixes with
the multi-backend branch. Keep the feature disabled by default and retain the
shared cancellation flights and exact creation-settlement table.

Reconcile saved workspace IDs only inside their backend/folder identity while
preserving occurrence snapshots, unavailable-owner placeholders and explicit
Retry. Browser restoration never creates missing records. Keep closed drafts
and attachments in a backend-scoped vault; normal placeholder Close retains
its snapshot, while successful Retry and obsolete Close callbacks cannot
reintroduce it. Existing occurrence state and user edits take precedence.

Preserve captured backend authority for integration reinstall, passive offers,
named-document attach, detach and quota reads. Render the Console's reported
counts without local midnight/reset policy. Recompute the typed backend
inventory and document the combined current ownership rules.

Add regressions for remote close/reopen, homonymous folders on other backends,
placeholder ownership, same-ID replacement, web reload and shifted occurrences.
Qualify with Node 24.22.3 typechecks, exact CI UI/server commands, affected
browser suites, Electron preloads/native tests, help checks and an isolated
OpenCode 2.3 native trajectory; full counts and skips are recorded in the PR.
2026-11-15 23:53:34 +01:00
Pascal André
44f95484f5
Merge remote-tracking branch 'origin/feat/multi-backend' into sync/multi-backend-dev-3 2026-11-15 23:28:19 +01:00
Pascal André
08a1b21cdf
test(ui): record the direct HTTPS pairing access in the backend inventory (#1526)
test(ui): record the direct HTTPS pairing access in the backend
inventory

The restore ownership integration test failed on feat/multi-backend
after
the direct HTTPS pairing landed: the Remote Control settings section
gained a
second `createRemoteControlPairing` call (the Direct HTTPS pairing row)
and
one more delegated backend access, which the reviewed inventory did not
list.

The new call is a host-only durable mutation following the existing
pairing
pattern (same loading flag, same pairing card), already covered by the
section's "pairing/create" ownership row in dev-docs/architecture.md.
The
inventory entry now records `createRemoteControlPairing x2` and
`delegated:backend x11`.

Validation: packages/ui/src/lib/backend-async-inventory.test.ts passes;
it
failed with the same assertion as CI before the update.
2026-11-15 23:24:12 +01:00
Pascal André
c98a7989f2
chore: sync feat/multi-backend with dev
Bring the current dev fixes and OpenCode 2.3 compatibility into the
multi-backend integration branch without enabling the opt-in feature.
Include project-file links, deferred transcript rendering and measurements,
Plugins-row integration management, prepared recurring activation, composer
history focus, Linux Tauri layout and sandboxed preload qualification.

Resolve shared UI paths by retaining backend-qualified routing, captured
attachment authority, revocation fences and durable mutation identities
alongside dev's new actions and timing limits. Keep a single self-contained
preload fixture with the remote-preview security assertions and one CI hook.
Consolidate area documentation and recompute the reviewed backend inventory.

Adapt extracted consumer tests to the new progress/activation helpers and
bound receipt signals. Synchronize transcript cache tests with mocked timers
and the asynchronous accounting drain while preserving eviction/revocation
assertions and production behavior.

Validate with Node 24.22.3, workspace typechecks, CI UI/server commands,
affected browser suites, built preloads on Windows and Linux/Xvfb, Electron
native tests, locked Cargo tests, public help and the isolated OpenCode 2.3
Missions native trajectory. Detailed counts and platform-only skips are
recorded in the integration PR.
2026-11-14 14:51:58 +01:00
Pascal André
4050b4f14d
fix: share cancellation flights for stale remote creations
A lost workspace creation response can leave direct cancellation and later inventory or SSE cleanup settling the same captured request concurrently. Share one bounded cancellation flight through the cleanup owner, retaining the original API and attachment key, and fence retry dispatch after confirmed settlement.

Keep failed claims retryable on a later discard or exact observation, preserve replacement occurrences, and retire the separate cancellation retry adapter. Add red-first overlap, double-ACK, exhaustion/recovery and backoff-settlement regressions; wire the storm cases into the existing UI CI command and update the settlement contract and backend operation inventory.
2026-11-14 14:44:41 +01:00
Pascal André
ec25100d59
merge: retain restore refusal classification and preview base
Integrate remote restoration at 28d8ee7e9e, including the signed-off
791c87c41 classification fix and the c14cae83b multi-backend base with
remote preview capability display and lifecycle.

Positively observed server use retains its typed actionable refusal.
Unavailable admission, context and inventory checks remain blocking generic
failures. Preserve the reviewed server-opening and placeholder behavior.

Resolve only the async inventory conflict: recompute declaration identities,
retain both branches' reviewed families and reconcile the combined API
client count with remote browsing and preview capability methods.
The delta contains only the upstream classification fix, #1499 base files
and the inventory.

Validate with Node 24.22.3 using the exact three PR UI CI commands,
Servers/opening/Preferences browser suites, fixture wiring, the inventory
scanner/regressions and UI typecheck. Leave double cancellation unchanged
for its separately approved follow-up.
2026-11-14 13:31:47 +01:00
Pascal André
28d8ee7e9e
merge: sync remote restoration with remote preview display
Merge integration base c14cae83b2. Preserve placeholder authentication alongside both remote preview capability API methods, and retain both architecture contracts. Resolve the sole inventory conflict from the complete typed operation scan.

The non-base delta retains exactly the same 49 files as the prior reviewed head. All 46 files outside the three overlapping architecture/API/inventory files remain unchanged. Verify that tab detachment used by restore placeholders also fences and releases remote preview authority while preserving logical history; no product-logic conflict required another change.

Node 24.22.3: exact CI UI batches pass 753/753, 363/363 and 1058/1058; restore/wiring browser 75/75; Servers 22/22; Preferences 36/36, 3/3, 18/18, 3/3 and 4/4; preview routing 3/3; remote preview capabilities 9/9; inventory 7/7; help 31/31; typechecks pass. Zero failed or skipped tests.
2026-11-14 13:25:47 +01:00
Pascal André
6d36cd1074
merge: compose explicit server opening with startup restore
Integrate startup restore at 687abc02fe after the multi-backend base at
8ba5a112b. Preserve qualified Preferences context, metadata-only admission,
remote placeholder recovery, profile usage checks and explicit Servers Open.

Keep the guarded boolean tab-transfer contract while selecting placeholders
without sidecar access. Before admission and after inventory recovery,
explicit opening selects a matching backend/folder placeholder rather than
creating a duplicate or bypassing its drafts and explicit Retry ownership.

Preferences context and server selection retain separate native channels:
the qualified request and serverId remain in the Preferences state, while
the selection intent targets its exact local opener. Retain both sets of
documentation and recompute the reviewed asynchronous operation inventory.

Cover placeholder selection without POST or implicit retry and preservation
of qualified Preferences requests during server selection. Validate with
Node 24.22.3, the exact PR UI CI commands, opening/registry/Servers and
Preferences browser suites, restore suites, Electron non-desktop tests,
fixture wiring, help and all three typechecks.

Leave the direct-cancel/observation double-flight finding unchanged for
the separately approved follow-up.
2026-11-14 12:35:35 +01:00
Pascal André
2541a9195a
fix(missions): prepare recurring activation and distinguish scheduled waiting (#1507)
Some checks are pending
Publish help / build (push) Waiting to run
Publish help / deploy (push) Blocked by required conditions
## Summary

I make recurring Missions start without a technical activation dialog
and distinguish confirmed waiting from completion (backlog item 18).

I found that Start asked for both global and project
`experimental.schedules` changes, could overwrite an explicit global
OFF, and could reject the first Play when scheduling was already ON but
lacked an activation receipt. Between passages, recurring entries could
look completed or remain green indefinitely.

## User-visible changes

- I prepare scheduling automatically on Start/Resume in the mission's
project only, without writing global configuration.
- I preserve every explicit `schedules: false` (global, project or
inherited, including masked values) and environment OFF. Refusals
identify the responsible layer, offer **Open scheduling settings** for
an authorized editable file, and keep technical details behind the
information button. `all_flags: false` is not treated as explicit
scheduling OFF.
- I release a refused activation request only when the server's
`notApplied` proof exactly matches its `requestID` and
`expectedRevision`, confirming no document mutation and no existing
intent; after correcting the setting, a fresh explicit Start works. I
retain genuinely uncertain requests, and recovery never starts Play
automatically.
- I keep the clicked action loading until the HTTP response arrives,
with `aria-busy` and an accessible announcement.
- I show confirmed waiting with the palette accent and a static neutral
underline. Prepared entries have no underline; pause and interruption
have distinct shapes; unconfirmed state is neutral.
- I keep a new successful passage green until an attentive explicit
selection or **Mark as read** acknowledges that exact passage, then
restore waiting when scheduling remains active. Restored selection and a
new result on an already selected row leave it unread. I apply the same
rules to daily entries and unified scheduled documents.

## Approach and edge cases

I resolve the native flag through `Flag.resolve` in the mission's
Location, qualify the consumed private contract against OpenCode 2.3.0,
and fail safely when it is unavailable. Already-ON scheduling produces a
ready proof without configuration writes. I retain the original identity
and digests of persisted two-target intentions, observe attempted
effects, and never replay their global writes.

I share a pure status projection and key read acknowledgements by
`passageID` / `history[].id`, rather than a schedule-wide completion
flag. Lost acknowledgements preserve the original request; explicit
reconciliation does not silently restart Play. I retain revision,
connection and ownership fences around activation and control feedback.

## Validation

I rebased the six commits onto `dev` at `c8dae86ea` without conflicts;
`git range-diff` confirmed all six patches unchanged.

- I reran both server/UI typechecks successfully.
- Before the review fixes, I reran the focused server
activation/capability/flag/calendar/route/contract tests successfully.
- Before the review fixes, I reran the ten Mission browser files after
the rebase successfully.
- I reran the help checks: **31/31 passed**, validating **28 pages × 10
languages**.
- I verified [PR Build Validation run
43573451762](https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/43573451762):
**success** at `2e22de117d`, including all
four browser shards. I retain the preceding final-QA evidence that the
start-intent file passed **9/9 five consecutive times**.
- I verified the isolated native OpenCode 2.3.0 activation/settings
qualification logs and the already-ON → Play → admitted-passage receipt.
They cover project-only writes, unchanged global settings, explicit
OFF/environment provenance, native flag precedence and lost
acknowledgements.

I include the corrections from the technical and UI/UX reviews. The
shared low-contrast focus outline on Parchment remains outside this
change.

## Documentation

I update `docs/help/<locale>/missions.md` in all ten languages (`en`,
`de`, `es`, `fr`, `he`, `ja`, `ne`, `ru`, `tr`, `zh-Hans`), along with
`MISSIONS.md`, `MISSIONS_RECURRING.md`, `MISSIONS_NATIVE_CONTRACTS.md`,
`OPENCODE_RUNTIME_SETUP.md`, `PLUGIN_CONTROLS.md` and `SETTINGS.md`
under `dev-docs/`.

## Long files touched

I flag these existing files for their size rather than expanding this
change into unrelated refactoring (approximate lines):

- `packages/server/src/api-types.ts`: 1,005
- `packages/server/src/opencode/missions-plugin.ts`: 1,058
- `packages/ui/src/lib/api-client.ts`: 1,010
-
`packages/ui/src/components/instance/shell/right-panel/tabs/MissionControl.tsx`:
889
- `packages/ui/tests/browser/mission-control.test.ts`: 1,707
- `packages/ui/tests/browser/mission-schedule-list.test.ts`: 1,000
2026-11-14 12:24:43 +01:00
Pascal André
d8ee664613
merge: preserve server opening with qualified Preferences context
Integrate the multi-backend base through 8ba5a112b. Retain the Servers Open intent and error handling together with qualified memory context, server identity and unavailable-project fallback. Preserve backend memory and settings revocation contracts and both native Preferences transports. Final combined validation follows the startup-restore merge.
2026-11-14 12:19:38 +01:00
Pascal André
687abc02fe
merge: sync remote restoration with Preferences context
Merge integration base 8ba5a112b9, retaining the remote preview transport and qualified Electron/Tauri Preferences context, metadata-only admission and memory ownership. Preserve all settings contracts and recompute the async boundary inventory.

Count the Preferences renderer's current native remote context as server usage even when startup cannot resolve a workspace. Check it before remote IO and after inventory, and fail closed on native context read errors. Reopening Settings from another project releases the reservation. Keep the existing tab, draft, inventory and queued mutation guards; update the actionable error and help in all ten locales.

Two adapter regressions first reproduced the missing reservation. Six added browser scenarios qualify unavailable/missing startup contexts without local fallback and reservation/release with an empty inventory. Node 24.22.3: exact CI UI batches pass 751/751, 363/363 and 1058/1058; restore/wiring 75/75; Servers 22/22; Preferences suites 12/12, 3/3, 18/18, 3/3 and 4/4; inventory 7/7; help 31/31; typechecks pass. No skipped tests. The separately tracked Missions scheduling test remains unchanged.
2026-11-14 12:17:27 +01:00
Pascal André
7d3653b63e
merge(backends): retain remote Preferences and preview ownership
Resynchronize #1499 after #1501 for #1236 by merging origin/feat/multi-backend at 8ba5a112b without rewriting history. Preserve the remote Preferences server identity, memory request ownership and relay boundaries alongside logical preview addresses, capability cleanup and the self-contained Electron preloads.

Resolve only the backend operation registry conflict from a fresh typed whole-UI scan. The merged registry exactly matches the candidate: 230 boundary-bearing files and 793 identities. Retain the new agent-memory API delegated count of 9 and the combined API client count of 139; no inventory test or ownership classification is weakened. Verify both sides' Remote Control and architecture documentation and both native bridge payload fields.

Four Rust files arrive unchanged from the base: client_state.rs, client_state/tests.rs, preferences_window.rs and preferences_window/memory_cleanup.rs. No vendored source or patch changes. The assigned macOS locked compilation check is repeated for this inherited native change.
2026-11-14 12:10:54 +01:00
Pascal André
344e0ebcc4
chore(backends): reconcile preview inventory after base sync
Complete mb-resync-1499 for #1236 after merging origin/feat/multi-backend at b14065fe1. Recompute the typed UI boundary inventory and retain the combined delegated API calls from the base and the two reviewed remote-preview capability methods. The API client count is 139; the existing ownership table already covers these accesses.

The reviewed registry exactly matches the regenerated candidate: 1047 UI sources, 230 boundary-bearing files and 793 identities. All seven inventory checks pass on Node 24.22.3. Self-contained preload configuration and the built-preload regression remain byte-for-byte unchanged from a6fd382d9. The PR retains its original 61-file scope against the updated base.
2026-11-14 01:23:52 +01:00
Pascal André
6566276a38
merge: synchronize remote project opening with multi-backend base
Merge origin/feat/multi-backend at b14065fe1 so the reviewed remote-project
opening work composes with the base's preview-origin isolation and
backend-owned settings, images and notification behavior.

Resolve the SETTINGS documentation conflict by retaining both the native
server-selection acknowledgement paragraph and the base's backend
settings/notification paragraph. Verify the automatic architecture, API,
fixture-exemption and async-inventory merges preserve both sides.

Recompute the merged async inventory and run the exact PR CI UI commands,
the shipped opening/registry/server-settings browser tests, fixture wiring
and UI typecheck with Node 24.22.3. The direct-cancel/observation overlap
remains unchanged for the separately approved follow-up.
2026-11-14 01:23:16 +01:00
Pascal André
9eb86de172
Merge remote-tracking branch 'origin/feat/multi-backend' into feat/multi-backend-remote-previews-ui 2026-11-14 01:19:27 +01:00
Pascal André
0b021d9808
merge: integrate backend-owned settings and notice navigation
Merge integration base 83ed321c59, preserving the complete current settings contracts, backend-owned Images/Web search routing and qualified notification lifetime. Review and update the async operation identity for the combined notice navigation path.

Real Electron and Tauri adapter regressions first reproduced an old notice reopening a retained instance during a transient outage and duplicating its waiting tab. Notice actions now select that occurrence's existing restore placeholder before considering runtime instance/session navigation, preserving drafts and explicit Retry ownership. Document this behavior in all ten help locales.

Node 24.22.3: exact CI UI batches pass 751/751, 362/362 and 1058/1058; restore/wiring browser 75/75; Servers browser 22/22; owner parity 3/3; compaction presentation 2/2; inventory 7/7; help 31/31; typechecks pass. One exact server glob run reports 4622 pass, 1 failure and 25 skips out of 4648. The unchanged readiness-ownership file passes all 18 checks in isolation; packages/server has no delta from the integration base.
2026-11-14 00:33:32 +01:00
Pascal André
5a6d894edc
fix: settle every obsolete remote project opening
An opening can become obsolete after workspace creation resolves and its
abort listener has been removed. Capture an opaque creation owner before
POST and discard every untransferred result in the caller's finally.
Synchronous guarded tab selection transfers the exact occurrence and
releases its captured backend, attachment and request key.

Coalesce abort, creation continuation and caller cleanup into one logical
cancellation flight. Preserve replacement occurrences during delayed
cancel/release failures, retire superseded claims, and fence their later
observations and commits. Refuse ownership without a cancellation scope or
without an exact echoed request ID before publishing the response.

Cover the natural commit microtask and synthetic post-create and
pre-publication boundaries in Chromium/Solid, plus admission, inventory,
tab transfer, rapid A-B-A, and late Electron/Tauri selection replies.
Lifecycle units cover lost/refused/miscorrelated responses and replacement
preservation. Document each ownership phase and review the async inventory.

Validate with Node 24.22.3 using the three exact PR CI UI commands,
opening/registry browser suites, fixture wiring, async inventory, help,
UI/server/Electron typechecks and selected non-desktop Electron tests.
2026-11-14 00:33:16 +01:00
Pascal André
06d04b9eb5
merge: sync remote restoration with server settings
Merge the assigned multi-backend integration base d7e3a46c84. Preserve all settings and architecture contracts, both remote authentication APIs and SSH cancellation; recompute the async boundary inventory after reviewing the combined ownership paths.

Apply the reviewed restoration usage guards to the new serialized profile-edit entry points. Check occupancy and confirmation before Forget, retain captured view/policy authority and the Forget-before-removal ordering, and detach only the same registered client after successful Forget. A cancelled policy edit cannot connect a different intended target. The reviewed restoration core remains byte-for-byte unchanged.

Keep the complete legacy-body golden test pinned to the already-reviewed restoration head, and extend real browser fixtures for queued occupancy refusal and explicit authenticated inventory checks. Preserve strict unexpected-network checks while observing cancellation of the explicitly revoked backend's stream/auth reads.

Node 24.22.3: exact CI UI batches pass 750/750, 362/362 and 1058/1058; restore/wiring browser 75/75; Servers browser 22/22; inventory 7/7; help 31/31; typechecks pass. The final exact server glob reports 4620 pass, 3 fail and 25 skips in 4648 checks; all server sources are identical to the assigned base and the three failing files pass all 66 isolated checks. Earlier full runs each had a different readiness failure. These inherited full-suite failures remain visible for review.
2026-11-14 00:14:57 +01:00
Pascal André
3bbaad4e1e
merge: sync remote Preferences with multi-backend integration
Merge origin/feat/multi-backend at 83ed321c59 for #1236. Keep the integration branch's single Images/Web search implementation, including revoked-state clearing and API-boundary ID normalization.

Retain Preferences' qualified native context, durable server identity, backend-owned memory, relay guards, metadata-only admission and restart rebind. Preserve both settings contracts and the lifecycle registry's current ownership documentation.
2026-11-13 23:59:25 +01:00
Pascal André
83ed321c59
fix(backends): route Images/search and qualify session notices (#1236) (#1496)
## Summary

Refs #1236. Slice C1 of the multi-backend UI, targeting the integration
branch only.

- Route Images conversation creation and Images/Web search settings
through their owning CodeNomad backend. Strip the UI backend prefix at
the HTTP boundary; never retry against local.
- Qualify remote session notices with the saved server name and
structured backend/instance/session actions. Detach revokes navigation
and removes owned bubbles/history. Deferred system delivery checks
cancellation. Compaction claims/bubbles and retry replacement are
backend-qualified.
- Add real Solid A/B/local consumers with a rejecting local-API
sentinel, homonymous session IDs, failed writes and held detach/reattach
completions. Update i18n/help in all ten locales and reviewed async
ownership.

## Setting ownership

- Images generation and media storage are execution-server settings:
`packages/server/src/opencode/image-settings.ts` writes the owning
OpenCode Global document and preserves the existing deciding project
`media_blob` override.
- Web search is execution-server Global/project configuration:
`packages/server/src/opencode/websearch-settings.ts` edits the selected
native configuration document.
- Neither is host-device configuration. Host presentation/notification
routing preferences remain local.

## Validation

415 tests passed, 0 failed, 0 skipped:

- 341 UI/backend units (browser conditions), including existing backend
routing/lifetime/preferences/session-event suites, compaction claims,
notification routing and `fixture-wiring.test.ts`.
- 7 `backend-async-inventory.test.ts` checks; recomputed registry
reviewed (only session-events delegated navigation count changes).
- 21 browser tests: `backend-parity`, `images-conversation`,
`websearch-settings`, `compaction-notification`, `notification-routing`,
`system-notification-focus`, `notification-icon-badge`.
- 15 server Images/Web search tests.
- 31 public-help checks (28 pages × 10 locales).
- UI and server `npm run typecheck` passed; `git diff --check` passed.

Shared renderer behavior covers both hosts; no native host changes,
daemon restart or VM qualification in this slice. Native system
notifications already handed to the OS retain the existing
title/body-only delivery contract; in-app screen/history actions carry
navigation targets. Preferences window context is reserved for C2 and
untouched.

Existing large source files touched: `api-client.ts` (1043 lines),
`notifications.tsx` (514), `session-events.ts` (796).

## Review gate

Draft only. Independent review and coordinator integration merge remain
required. No merge to `dev` is requested.
2026-11-13 23:50:17 +01:00
Pascal André
8dbbf8e477
fix: replace the whole remote picker dialog for #1236
Key the complete Dialog/Portal lifetime by the validated server profile, rather than replacing only its browser child inside one dialog context. Dispose the previous modal scope, browser and pending work before mounting the next server, keeping its stale busy DOM and ARIA title out of the replacement. Same-policy reselection retains its existing lifetime.

Reproduce A-to-B replacement before the fix with a held real HTTP creation. Cover cancellation followed by reselection, stale native selection after flag revocation, detached old dialog/browser nodes, unique title IDs, exact cancel/release mutations, and absence of orphan project records alongside the existing same-server regression.

Update the current project convention and reviewed async inventory. Validate the exact CI UI commands and server glob, browser/fixture wiring, help, typechecks and non-desktop Electron native tests. Rust is unchanged.
2026-11-13 23:13:19 +01:00
Pascal André
b477b7849c
fix: retain server opening intent and acknowledge Tauri selection for #1236
Keep same-policy server reselection idempotent so the mounted picker retains its in-flight creation authority. The real-browser regression holds POST, reselects the server, then requires the ordinary tab selection and exactly one claim release; it reproduces the lost-result failure before the fix.

Await the main renderer's Tauri acceptance instead of treating eval dispatch as success. Native UUID correlation, exact opener checks, a five-second wait and bounded pending requests keep refusals visible in Preferences and prevent late or foreign results from settling another selection. Grant the narrow result command only to local main windows and cover refusal, acceptance, timeout, duplicates and foreign replies in Rust.

Update current project/settings conventions and the reviewed async inventory. Validate with the exact three UI unit commands and server glob from the PR tests job, browser/fixture wiring, help, non-desktop Electron native tests, typechecks and the Tauri crate.
2026-11-13 22:44:23 +01:00
Pascal André
9fb9572140
merge: sync backend parity with reviewed server settings and auth
Integrate the current multi-backend base while retaining Images and Web search owner routing and remote-only notification qualification. Preserve both the server settings and notification paragraphs in the settings contract; product code and the backend operation inventory merge without manual changes.

The three exact CI UI commands, 38 browser regressions including Servers settings, the backend inventory and fixture wiring checks, desktop typechecks and all 31 help checks pass on Node 24.22.3. The resulting delta against the integration base retains exactly the 36 reviewed parity files.
2026-11-13 22:38:58 +01:00
Pascal André
830b1c79ed
feat: open saved server projects in ordinary tabs for #1236
Connect the saved-server browser to the admitted CodeNomad backend and ordinary workspace lifecycle. Folder navigation, remote recents and typed paths share cancellable opening; an explicit opening can recover one unavailable initial inventory. Incompatible contracts and HTTP 426 refuse admission without local provisioning.

Forward the immutable Servers selection from Preferences to its exact main-window opener on Electron and Tauri. Revalidate saved origin, TLS, SSH and the strict host flag before opening. Remote tabs display the server icon and name, with duplicate-label disambiguation; the default-off local path stays intact.

Keep remote clone and temporary creation outside this existing-folder picker. Cover two real HTTP backends, same-path/id isolation, keyboard navigation, cancellation, authentication and both native adapters; update ten-locale copy/help and the reviewed async-ownership inventory.
2026-11-13 22:05:54 +01:00
Pascal André
ef5fd67b37
feat(preferences): retain remote project ownership (#1236)
Carry qualified project keys and durable backend identity through Electron and Tauri Preferences requests and restoration. Admit the requested backend without instance reconciliation, then resolve only its metadata inventory; unavailable or replaced owners keep project controls inactive.

Route project Web search, Images and agent memory through their owner. Preserve backend-scoped memory drafts and badge frontiers, fence cleanup intents with the server identity in both hosts and the opener, and retain local device administration and SideCars. Memory relay calls require current relay authority; Remote Control ingress keeps memory host-only.

Cover homonym folders on local/A/B, restart rebind, replacement refusal, native adapter parity, memory mutations and cleanup preflight with real browser consumers. Validate 56 targeted and 202 existing browser checks, 46 server checks, 17 Rust checks, native/unit suites, all three typechecks, asynchronous inventory, fixture wiring and ten-language help. Native desktop and VM launches remain integration qualification.
2026-11-13 21:47:16 +01:00
Pascal André
3ddb49b9a2
merge: synchronize lifecycle recovery with server settings and relay auth for #1236
# Conflicts:
#	dev-docs/architecture.md
#	packages/server/src/codenomad-servers/ssh-manager.test.ts
#	scripts/backend-async-operations.json
2026-11-13 21:26:38 +01:00
Pascal André
83fcb692d3
feat(previews): wire remote capability views and lifecycle
Prepare the renderer integration for #1236 on top of D1 (#1497). Keep remote loaded capability URLs separate from displayed and persisted application addresses, translate native history, reuse a capability for same-application navigation, and create a replacement for another application origin. Keep internal loading URLs inside the embedded view rather than adding an external-open action.

Release remote capabilities on preview dismissal, project detachment, backend attachment revocation and renderer pagehide. Retain logical history for explicit reopening and fence pending creation/restoration by attachment, navigation, tab and page generations. Keep the local preview path unchanged. Document the renderer ownership and update browser help in all ten languages.

Add real two-app browser fixtures using real CodeNomad preview proxies and the saved-profile relay, with identical remote tokens. Validation: 30 UI unit/inventory tests, 41 browser regression tests, six new real HTTP/WS lifecycle tests, 31 help tests and both typechecks passed. The browser regression batch also executed its existing hidden Electron guests; no full CodeNomad build, VM or shared OpenCode service was launched.

Security gate remains blocked on D1: the hostile real-browser test can read B's response from A when given B's capability URL because opaque documents share Origin: null and the current transport allows that CORS origin. The renderer is prepared for isolated same-origin documents and origin-bound admission. Correct D1's CSP/Origin/CORS policy, merge that correction here, then run the complete new navigation/isolation suite before review or merge.
2026-11-13 20:41:43 +01:00
Pascal André
48e78d4ff8
fix: preserve remote restore occurrence bindings
Retry must not reuse a sibling tab's workspace after a partial creation refusal compacts the remote inventory. Preserve live and suspended per-occurrence bindings at both restore reconciliation points, and reserve workspaces already owned by other tabs before creating the missing occurrence.

Allow explicit recovery of still-open remote placeholders independently of automatic startup restoration. Keep primary-window, feature, occurrence-close and uncertain-create fences. Complete backend async ownership documentation and operation identities, and document recovery in all ten help locales.

Browser regressions failed first on the original implementation for both Electron and Tauri adapters. Validate all drafts and stable bindings after retry and reload: 25 restore/wiring, 50 project restore and 20 backend browser checks; 129 store checks; 7 inventory checks; 31 help checks, with no skips. Typechecks cover UI, Electron, server and remote tunnel.
2026-11-13 20:38:48 +01:00
Pascal André
d6cf57e89b
fix(backends): route image settings and session notices to their owner
For #1236, keep Images conversation creation and Images/Web search reads and mutations on the selected CodeNomad backend. Strip scoped instance keys only at the HTTP boundary and retain attachment cancellation through dispatch and publication. Global image and search defaults belong to that backend's OpenCode configuration; existing project overrides keep their scope.

Qualify remote session notices with the saved server name and structured backend/project/session actions. Revoke bubbles, history and navigation on detach, fence deferred system delivery, and separate compaction/retry identities across backends. Keep navigation lazily imported to preserve store initialization order.

Add real A/B/local settings and notification consumers with a rejecting local API sentinel, colliding native identities and detach/reattach coverage. Update ten locales, public help and reviewed async ownership. Validation: 341 UI/backend units including fixture wiring, 7 inventory checks, 21 browser tests, 15 server image/search tests and 31 help tests passed; none skipped. UI and server typechecks passed. No native host changes or VM qualification in this slice.
2026-11-13 20:08:33 +01:00
Pascal André
c0ea1dd6e9
feat(integrations): manage integrations from their Plugins rows (#1492)
Some checks failed
Publish help / build (push) Waiting to run
Publish help / deploy (push) Blocked by required conditions
Download Caches / seed (macos-15-intel) (push) Has been cancelled
Download Caches / seed (macos-26) (push) Has been cancelled
Download Caches / seed (ubuntu-24.04) (push) Has been cancelled
Download Caches / seed (windows-2025) (push) Has been cancelled
Manage each recognized OpenCode integration from its Status → Plugins row.
Remove the separate per-integration sections and manual attachment picker;
integrations attach conversations through their native first-use contract.

Show catalogue names, package versions, integration-accent switches,
conversation binding and application warnings. The chain button attaches to a
compatible open document or detaches the captured conversation. Revoke pending
enumeration and choices on navigation, invalidation, reconnect and disposal.
Keep guarded application installation and one-shot native actions alongside
existing package controls.
Reads remain demand-driven and refresh on native events and reconnects.

Explicit refresh also retries demanded bindings for the exact displayed
conversation and Location. Preserve integration display and native actions
for inherited, virtual and runtime-only plugins through an unambiguous
runtime identity, separately from writable-source mutation authority.
Keep revision checks, consent revocation and uncertain-outcome handling;
never replay a mutation automatically.

Update help and UI strings in ten locales, documentation and captures.
Cover binding recovery, read-only origins, activation/removal scope and
native-action guards through unit and real-panel browser regressions. Qualify
the projected runtime identities with the isolated official daemon.
2026-11-13 18:32:28 +01:00
Pascal André
a4b3ccb020
merge: integrate reviewed SSH server support for #1236
Combine the admitted backend-authority and SSH transport heads with the experimental Settings Servers editor. Preserve direct-window behavior behind the disabled flag and keep Open disabled until project selection is available.

Keep SSH host scope in credentials, relay proof generations, profile equality, guarded persistence and edit intents. Preserve host suggestions in both dialogs, avoid direct probing for SSH profiles and keep same-address direct profiles separate.

Validate server/UI typechecks, relay and inventory contracts, ten-locale messages/help and real Preferences, pairing and Servers browser scenarios. Pin unchanged legacy bodies to the admitted SSH head and cover SSH proof revocation and offline editing.
2026-11-13 18:24:14 +01:00
Pascal André
a564ba9b88
merge: bind SSH relay profiles to destination authority
Integrate the relay generation proof with SSH-owned forwards. Bind proofs and credentials to the declared server origin, SSH host and TLS policy while allowing an owned forward to renew under the same authority. Revocation clears both observed server identity and the owned tunnel.

Align the conflict resolution with the auth-status branch without importing its auth-observation behavior. Add three focused checks for SSH proof renewal, retarget refusal before dispatch, and remote identity replacement; document the combined lifetime.

Validated with Node 24.22.3: server and UI typechecks, 91 server and device-relay tests, 5 UI authority tests with browser conditions, 7 inventory tests, and 14 browser tests. No skips; regenerated inventory candidate matches checked-in entries.
2026-11-13 18:16:14 +01:00
Pascal André
17cf4350aa
merge: integrate reviewed backend routing for #1236
# Conflicts:
#	packages/ui/src/components/settings-screen.tsx
#	packages/ui/src/styles/controls.css
#	scripts/backend-async-operations.json
2026-11-13 18:05:48 +01:00
Pascal André
b8bc7bb95d
merge: integrate backend media ownership for #1236
# Conflicts:
#	packages/server/src/codenomad-servers/browse-manager.ts
2026-11-13 18:04:37 +01:00
Pascal André
c19c00539f
merge: integrate backend identity foundation for #1236
# Conflicts:
#	dev-docs/PROJECTS.md
#	packages/ui/tests/browser/backend-registry.test.ts
2026-11-13 18:03:34 +01:00
Pascal André
3881c90525
merge: synchronize multi-backend base into SSH transport
Bring the synchronized dev baseline into the SSH transport branch while preserving the reviewed SSH profile and relay behavior.

Resolve the async inventory conflict against the merged typed source scan. Keep the base entries, add the SSH host-list boundary, retain the profile delegation count, and count the merged adapter at 135 delegated backend calls. The generated candidate matches every reviewed entry.

Validated with Node 24.22.3 after npm ci: UI and server typechecks, async inventory 7/7, CodeNomad server tests 56/56, and pairing plus fixture wiring browser tests 6/6, with no skips.
2026-11-13 17:59:40 +01:00
Pascal André
7f0dec7722
feat(opencode): require OpenCode 2.3.0 and adapt subagent, Code Mode and shell results (#1491)
OpenCode 2.3 runs every subagent in the background: the call returns at once
(`metadata.status: "running"`) and the child reports to its parent through
synthetic `<subagent sessionID state …>` messages, one per idle period,
tagged `running` while background work remains. Runtime contracts on
`latest` failed for every PR since 2.3.0 because two native fixtures assumed
a foreground subagent, and the subagent card showed the model-facing "working
in the background" instruction instead of the child's result.

OpenCode 2.3.0 becomes the minimum and recommended runtime, so CodeNomad
maintains a single subagent delivery model. Daemons below it are refused with
`native_contract`. The client, schema and plugin pins move to 2.3.0 with the
`effect` 4.1.0 they require; the lockfile is regenerated with the CI's npm so
root overrides hold. Docs, the architecture skill, README, CONTRIBUTING and
the install, OpenCode, server and troubleshooting help in ten languages state
the new minimum.

- Native fixtures (missions-trajectory, subagent-nesting) require the launch
  acknowledgement, an intermediate running report (metadata still
  `completed`), the final report and lasting quiescence without late wakes.
  Wayfinder and compare read briefs, run outputs and the judge artifact from
  the final report.
- The subagent card shows the latest report delivered to that call (after its
  execution start, before the next continuation of the same child; a call
  continued before any report joins the next reporting period) with a
  running/completed/error indicator. One reference-only index per session
  revision serves every card; report bodies stay in the message store.
- Code Mode's compact JSON object/array results are displayed indented within
  size and depth bounds, keeping Warnings/Logs; copy keeps the native text.
- An interrupted shell call shows its output so far as output and only the
  notice under the error label, through an optional `getErrorText` hook.

Five independent review passes closed listing-order, continuation, JSON depth,
fixture timing, cache staleness, execution-start boundary, joined-period,
retention and lockfile-override findings and ended with zero findings. CI on
the exact head: 26 jobs passed, including runtime contracts at minimum and
latest (2.3.0), OpenCode compatibility and native pruning on Windows, Ubuntu
and macOS, four browser shards and all desktop builds. Locally: 30/30 native
fixtures against an isolated 2.3.0 CLI, the full server suite under Node 24,
and the pruning fixtures on the rebuilt bundle bytes; new unit and browser
tests each fail without their change.
2026-11-13 17:38:29 +01:00
Pascal André
a17c2f931a
merge: update relay authority onto the synchronized multi-backend base 2026-11-13 17:15:18 +01:00
Pascal André
475d1c5609
fix: classify SSH server administration boundaries
Register the SSH host dialog and its retained local administration client in the backend authority inventory. Document SSH profile persistence and update the reviewed operation identities for the new host-list read and profile write.

No runtime behavior changes. Validated inventory (7 tests), server access tests (56), pairing and fixture wiring (6), and UI/server typechecks. The isolated Design runtime check is blocked by its outside-checkout path assertion in this bounded checkout.
2026-11-13 16:29:56 +01:00
Pascal André
02a496455f
merge: preserve dev behavior across multi-backend synchronization
Merge current dev without enabling multi-backend by default. Preserve Mermaid previews, HTTP-safe UUID creation, Mission receipt barriers, direct listener policy and cold Location product RPC preparation alongside the existing backend-scoped consumers.

Reconcile private media ownership with strict physical and Git checks and the shared restart limit. Route new repository discovery through the selected backend and update its authority inventory and regression checks without dropping assertions from either side.

Validation: server and UI typechecks; 409 media/workspace checks passed with one explicit WSL skip; 54 server relay checks and 748 focused UI unit checks passed. The isolated pruning fixture passed against official OpenCode 2.2.7, including plugin registration, pruning and restart. Focused Chromium checks also cover media, registry, Mermaid and Mission editing.
2026-11-13 16:25:18 +01:00
Pascal André
b937256378
fix(memory): hide the native memory tool while agent memory is disabled (#1479)
Closes #1477

## Why
With agent memory off, `codenomad_memory` was still registered for every
session (subagents included), so every request carried a tool that could
only fail with "Memory is disabled".

## What changes
- The backend writes `server.memoryEnabled` into its memory presence
leases (`{"version":1,"memory":true}` or empty) at startup and on each
server config change (`opencode/memory/preference.ts`), the same
lease-request mechanism as the Design agent.
- The plugin registers its tool transform only while a live lease
requests memory, rereads the request at each presence interval and calls
`ctx.tool.reload()` only on a change. Running sessions gain or lose the
tool within seconds, with no restart.
- The prompt hook stays registered, so disabling memory still clears
stale `codenomad.memory` instructions; execution still rejects disabled
use. Runtimes without `ctx.tool.reload` keep the tool registered.
- The lease request format is shared with Design
(`opencode/lease-request.ts`) and produces identical output.

## Validation
- Server typecheck, `test:help`, and unit tests for the memory plugin,
the preference sync, Design activation and the memory service (37 pass).
- `scripts/test-memory-tool-native.mjs` against a private OpenCode 2.2.7
daemon: the tool is absent while memory is disabled, appears when
enabled, disappears on disable and comes back on re-enable.
- Help updated in all ten locales.
2026-11-12 23:10:25 +01:00
Pascal André
36a2f17cf2
chore(sync): merge dev diagnostics with backend-owned readers
Compose the approved dev snapshot while retaining both histories and the backend API factory, attachment guards, retained view leases and cache identity fix. Host Settings owns OpenCode logs; the paired remote protocol keeps its closed route allowlist.

Accept removal of project Info, retain environment reconciliation in its store tests, and use the shared non-modal output frame without changing Shell ownership. Update the counted async inventory and preserve the 109 restore paths, runtime pins, workflows and cache blobs.

Validated in an ordinary private export with pinned Node 24.22.2: focused authority units, UI and server types, real log route tests, ten-language help and the six complete Chromium files. Deferred responses, executable changes, Shell ANSI/focus/drag/top-layer Escape and host administration stay covered. Native packaging and global qualification remain separate.
2026-11-11 17:26:14 +01:00
Pascal André
2e029ad497
merge(missions): compose GitHub triggers and existing coordinators with backend ownership
Append the approved dev Missions delivery to the published multi-backend sync checkpoint, preserving both parents and the previous runtime recommendation and packaging history. Retain the upstream GitHub source contracts, explicit coordinator adoption, bounded family settlement, translations and help.

Resolve the sole source conflict by checking cancellation before routing both conversation-message and coordinator-session discovery. Preserve the owning backend, attachment lifetime, native root client and publication fences in the three overlapping files.

Adapt only the existing consumer test seam: inject the real GitHub classifier and coordinator readiness body, retain all 43 previous cases and 97 assertion calls, and cover same-ID A/B coordinator ownership, filtering, revocation and schedule payloads. The targeted consumer/routing/upstream suites pass 45/17/112 cases; server and UI typechecks, 31 help checks and 74 real Solid browser cases pass in the isolated installed-dependency subset. Fresh-lock CI, packaging and native cross-platform qualification remain separate gates.
2026-11-11 10:34:42 +01:00