mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-11-20 23:37:15 +00:00
7 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bb207cfcc6
|
chore(ui): trim interface copy and multilingual help (#1536)
Trim internal implementation commentary and routine-failure explanations from the interface and public help in all ten languages. Areas: Settings, Missions, providers and plugins, projects and remote access, transcript controls and the 28 help pages. Keep security and irreversible-action warnings, accessible names, scope boundaries and facts needed to act. Preserve current dev behavior and labels; the legacy OpenCode replacement confirmation now identifies its exact target. Validated with UI typecheck, ten-locale key and placeholder checks, help tests, unit contracts and affected browser tests. |
||
|
|
0fafd8ea3a
|
fix(sidecars): opt in to SideCars over verified direct HTTPS origins (#1525)
fix(sidecars): let the host open SideCars to verified direct HTTPS origins (#1516) Since the direct-listener access alignment, SideCar content (/sidecars/) and SideCar WebSocket upgrades are host-only: the direct listener answers 404 to every non-loopback request, /api/meta reports localRequest false, and the UI hides Open SideCar and the picker. Deployments that reach CodeNomad through a self-hosted TLS reverse proxy (real domain, password sign-in, CODENOMAD_ALLOWED_ORIGINS) whose upstream hop is not loopback lost SideCars entirely, with no way to opt back in. User-visible behavior: Settings > SideCars ends with a host-only switch, "Open SideCars over HTTPS" (off by default, "i" tip linking to the SideCar help), stored as server.sidecarsOverDirectHttps in config.yaml. When it is on, a browser signed in through a verified direct HTTPS origin sees Open SideCar and the picker and can load SideCar pages and their WebSockets. Nothing else changes: password changes, token bootstrap, Remote Control management, remote windows/proxy, saved servers and the plugin bridge stay loopback-only; plain HTTP LAN pages, loopback-alias pages and Remote Control (tunnel) clients never gain SideCars through this setting; previews are unchanged. The switch is shown to local clients only. Approach: - remote-control/direct-https.ts is copied byte-for-byte from feat/multi-backend (same blob), so both branches share one trust model and merge cleanly. verifiedHttpsOrigins() keeps the https entries the direct listener already trusts for mutations (advertised local/remote URLs, reachable addresses, CODENOMAD_ALLOWED_ORIGINS) minus loopback and unspecified hosts; verifiedDirectHttpsOrigin() requires a mutation's own Origin, and for GET/HEAD/OPTIONS takes Origin, else the Referer origin, else https + Host. Ingress sockets never qualify. Its doc comment still describes the device pairing it serves on feat/multi-backend; the code is unchanged. - server/sidecar-direct-https.ts combines that rule with the setting (read per request; an unreadable configuration keeps SideCars host-only). http-server.ts applies it in exactly two places: the direct-listener host-only hook exempts /sidecars/ content paths only, and the SideCar upgrade handler admits the same request class before its unchanged Origin/Referer source policy and session check. Authentication, the direct source policy, SideCar cookie stripping and WebSocket checks are untouched. - /api/meta reports sidecarsAllowed: true for local requests and for opted-in verified direct HTTPS requests (the route is already authenticated). The UI gates Open SideCar and the picker on it; other host-only UI stays on localRequest. - settings/host-only-settings.ts lists server-owner keys that widen host-only access. Both config PATCH routes refuse with 403, inside the config lock, a non-local patch that would change one, including deleting the server owner or writing a non-true value over true; other server keys stay writable. Edge cases: Host fallback only applies to reads; a non-browser client that forges Host still needs a valid session, and Origin-less upgrades are still refused by the source policy (403). An https LAN listener's advertised address qualifies like a configured public origin. Encoded paths are judged as routed. With --dangerously-skip-auth the direct listener is already unauthenticated, so the opt-in adds no credential bypass. Validation: - New remote-control/direct-https.test.ts: the copied predicate unit test; every other host-only path (including an encoded one and bare /sidecars) stays 404 for a verified origin with the setting on; the /api/meta sidecarsAllowed matrix (local, verified via Host/Referer/Origin, http LAN, loopback alias, foreign, setting off) and 401 without a session; a paired Remote Control device gets 404 for SideCars and sidecarsAllowed false even with the tunnel origin listed in CODENOMAD_ALLOWED_ORIGINS. - sidecar-proxy.test.ts: setting off keeps 404 for every verified form; on, content loads through Host, Host:443, Referer and Origin and a POST with its own Origin, while http LAN, loopback alias, unlisted/suffix-spoofed origins, userinfo Host, forwarding headers, Origin null, Origin-less mutations and unauthenticated requests are refused; WebSocket upgrades: 101 for the verified Origin, 404 for http/loopback/foreign/null origins or setting off, 403 without Origin, 401 without a session. - settings.test.ts: non-local enable/disable/delete/non-boolean writes are refused on both routes with the stored value unchanged; local changes and non-local unrelated keys succeed. - Browser host-only-controls.test.ts adds a sidecarsAllowed non-local mode: Open SideCar and the picker appear, Connect server and Change password stay hidden, and the new switch renders for local clients only. - Negative controls (each mutation applied alone, tests rerun, file restored): reverting the HTTP gate exception, reverting the WebSocket exception, dropping origin verification, ignoring the setting, exempting every host-only path, dropping sidecarsAllowed from /api/meta, removing either settings-route guard, and reverting both UI gates to localRequest each make the corresponding tests fail. - Server suites (remote-control/*, direct-origin, direct-listener, sidecar-proxy, meta, settings, auth, sidecars, proxy-websocket, http-shutdown): 126/126. Server and UI typechecks, host-only-controls and remote-access-settings browser tests (17/17), npm run test:help (31/31) and git diff --check pass. help-url and preferences unit tests have two failures that also fail on the base commit without these changes. Docs: dev-docs/REMOTE_CONTROL.md (admission and validation), architecture.md (SideCar agent convention), SETTINGS.md (host-only server settings), and the browser-sidecars, remote-access and security help pages in all ten locales. Closes #1516 |
||
|
|
afaacd998c
|
fix(server): admit the local UI under its loopback names on direct listeners (#1489)
Since the direct listener origin policy, a browser mutation from this machine was rejected with "Cross-origin request rejected" when the page used a loopback name the server did not publish. With the server listening on all interfaces (direct/LAN access) the listening address is 0.0.0.0, so a UI opened as `http://localhost:<port>` loaded but could not open a workspace (#1488 and a Discord report); `[::1]` was refused on a 127.0.0.1 listener. A same-origin local request (Origin equal to its own scheme and Host) now also reaches the receiving socket under the loopback names its bind address covers, with that socket's protocol and port: `localhost` for 127.0.0.1 and ::1, plus `127.0.0.1` for 0.0.0.0, plus `[::1]` for `::`. Both sides compare as normalized origins, so default ports match, and a Host that is not a bare authority fails closed. Published, configured (CODENOMAD_ALLOWED_ORIGINS) and development origins stay exact; an alias page targeting another loopback authority stays cross-origin, since the name can resolve to a sibling listener; LAN and tunnel requests are unchanged. A UI reached from another machine by an unpublished hostname still needs CODENOMAD_ALLOWED_ORIGINS. Four independent review passes closed configured-port aliasing, 127.0.0.2, sibling-[::1] and default-port findings and ended with zero findings. direct-origin.test.ts covers each bind, same-origin aliases, cross-authority refusals, exact configured/dev origins, default ports, malformed Hosts and a LAN request; the SideCar WebSocket test follows the same rule. Server typecheck, 61 origin, CORS, SideCar proxy, preview and Remote Control tests and the help test pass. REMOTE_CONTROL.md and the security help page in all ten languages describe the rule. CI on the exact head: 18 jobs passed; tests-runtime-contracts (latest) fails on dev for every PR since OpenCode 2.3.0 (fixtures assuming a foreground subagent), addressed by #1491. |
||
|
|
220424d398
|
fix(server): align direct listener access checks (#1412)
Align direct listener origin checks, host-only controls and password-session lifecycle. Keep preview capabilities and Remote Control admission consistent, with regression coverage and help updates in all ten languages.
Preserve WebSocket origin validation and asynchronous authentication responsiveness. Include the reviewed shell environment lifetime fix, isolate AppImage test executable preparation from concurrent descriptor inheritance, and collect bounded, typed cold-admission failure diagnostics without exporting private text or replacing the original failure.
Independent reviews resolved all findings. Exact-head CI run 42711032215 attempt 1 passed at
|
||
|
|
89bc69cf3b
|
feat: add a Support CodeNomad page and entry points for sponsorship (#1194)
## Summary
- New **Support CodeNomad** help page (10 languages): what sponsorship
pays for, the funding policy (a contribution, not a purchase; never
required to download, use or update) and one button per funding channel
naming who receives the money.
- **Download page** ends with a short *Support development* section with
the same buttons; the help **header** gains a *Sponsor* link; the former
support page is retitled **Bug reports and source builds** (ids
unchanged) so the two are not confused.
- **App**: *Support CodeNomad* in Settings → Info (secondary button
between Updates and Diagnostics), in the Help menu after *CodeNomad
Help* (Electron and Tauri, English help-page fallback) and as a palette
command without a default shortcut. All open the localized help page.
- **Repository**: `.github/FUNDING.yml` lists the maintainer's GitHub
Sponsors profile and the Support page (the Sponsor button needs
*Settings → General → Features → Sponsorships*).
Channels live in `docs/help/funding.json` and render through a
`{{funding}}` directive allowed only on the download and sponsor pages,
so adding a channel needs no retranslation. Entries are validated (exact
keys, unique ids, `https://github.com/sponsors/<login>` only) and
escaped; a page using `{{funding}}` with no channel fails the build. CSP
unchanged.
Agreed with the co-maintainer before publishing.
## Validation
- `npm run test:help`: 31/31 (27 pages × 10 locales, funding validation
and placement).
- `node scripts/test-help-browser.mjs`: 47/47 (header overflow at 390 px
in en/he/ne/ja/zh-Hans, button geometry).
- `npm run typecheck`; unit tests help-url, hotkey-bindings,
menu-labels; browser tests help-command, server-info, view-menu-electron
(22/22); `cargo test` for the Tauri crate (291/291, including the
English sponsor fallback).
- Independent review: zero findings.
|
||
|
|
1dabb5110f
|
docs(help): bring the user guide back in line with the current app (#1079)
docs(help): bring the user guide back in line with the current app The help was written on 2026-10-14 and about forty user-visible changes merged since without touching it, so several pages described controls that no longer exist: Missions still listed four playbooks and a Save step for preferences that now save on each change, the depth editor kept its old names, notifications still had their former switches, and voice input pointed to a microphone button that is not in the composer. Every English page was re-checked claim by claim against the current labels (English UI messages) and behaviour, then the nine translations were updated to match, using each locale's own UI labels. Notable corrections: Missions (Compare two models, autosaving defaults with Apply to / Global / Reset, Subsession nesting depth, prepared hand-offs, retired-task interrupts, the named causes of "Mission Control is unavailable", standalone server support); conversations and history (reasoning/tool durations, token lines adding up the cleanup selection, presets including Nothing, timeline markers following Message content, in-place reveal of long text, Open in session, focus after send, Queue message / Steer now, Retrying); settings (notification routing table and defaults, Stats, Mode, info tips, Server setting badge, localized native menus); shortcuts (72 actions, Clear shortcut, Ctrl/Cmd+K); voice (More actions entries, Save status); files (live Workspace refresh, Show 200 more); OpenCode, install, server and updates (2.1.1 recommended, OpenCode 2 beside an older installation, version card first, private loopback listener for Missions, preview releases offered once all builds are published); providers, integrations, browser, SideCars, desktop and remote pages. Translations also repaired older drift, mainly the project-tab closing passages. The Chat settings table header (Default state, its title, item column, the thinking row and its accessible label) was still English in eight locales; it is now translated so the help can cite what users see. AGENTS.md now asks every PR changing user-visible behavior to update the affected help pages in the same PR, since CI validates structure and links but not whether the text still matches the UI; it also corrects the needs-input notification default. USER_HELP.md no longer claims native menus stay English. Validation: npm run test:help (all ten locales, 25 pages, heading ids unchanged), a full help build, and the i18n and transcript-visibility unit tests. |
||
|
|
c0d53f13d4
|
docs(help): multilingual help site with in-app Help menu and palette entry (#859)
## Summary A complete public CodeNomad help site in the app's ten languages, published on GitHub Pages (https://neuralnomadsai.github.io/CodeNomad/) and opened from the app. - **Content:** 25 pages in 8 sections (Start, Workflows, OpenCode setup, Remote access, Customize, Extensions, Desktop, Help), written for OpenCode power users and covering the current version only. It includes everything user-relevant from `README.md`, `packages/server/README.md` (server, network, auth, TLS, Remote Control) and the user-facing dev-docs, with flags, defaults, labels and safety boundaries checked against source. - **Languages:** en, fr, de, es, he (RTL), ja, ne, ru, tr, zh-Hans. Interface labels reuse each locale's own app strings; native desktop menu names, code, commands, flags, paths and anchors stay unchanged. - **Site:** `scripts/build-help.mjs` renders `docs/help/<locale>/<slug>.md` with translated chrome (`docs/help/i18n/`), stable `{#id}` anchors identical across locales, same-article language links with hreflang, a root language chooser, and a first-party offline per-locale search (Ctrl/⌘+K, substring matching for CJK, Devanagari and Hebrew, hidden without JS). No analytics or remote resources. - **Validation:** `npm run test:help` fails on any missing page or string, heading drift, broken link/anchor/asset or invalid search target. `.github/workflows/help-pages.yml` validates PRs and deploys only from `dev`. - **App entry points:** one `open-help` command for the palette and a new **CodeNomad Help** item at the top of the Electron and Tauri Help menus. It opens the help in the invoking window's UI language through the existing external opener, falls back to the root URL for windows without the handler, and reports failures without replay. - Documents the strict boolean environment-variable rule from #959 and the updater entry points from #960. ## Review Delivered as a CodeNomad mission with independent review loops, each to zero findings: - English content audit (5 passes, 14 fixes) and technical gatekeeper (2 passes) before translation. - After translation: QA, UX review, and a final multilingual gatekeeper (35 translation/label findings fixed, then verified), plus a visual fix for the search focus ring and a verified sync with #960. ## Validation - `npm run test:help`: 9/9 (25 pages × 10 locales, strict, including negative tests); `npm run build:help`: 250 pages. - `node scripts/test-help-browser.mjs`: 44/44; Playwright: 500 page visits at 390 and 1280 px, all locales, no overflow, no external requests. - UI help-command and desktop-updates browser tests 19/19; help URL unit tests; Electron menu tests; UI and Electron typechecks; Tauri `cargo test` 272/272. |