Compare commits

...
Author SHA1 Message Date
Mohamed Boudra 6e1f985ba5 fix(gpui): drop the unreachable split layout from the GPUI diff surface
Callers enable split only when isWeb holds, so GPUI always passes unified.
The split rows could never render; remove them and keep a test that a split
preference still renders unified rows.
2026-12-06 16:12:54 +01:00
Mohamed Boudra 200066ffe3 feat(gpui): render the Changes panel diff without Skia
The Changes tab crashed on GPUI with "Cannot read properties of undefined
(reading 'listFontFamilies')". The diff surface resolved to the Skia canvas
implementation, whose native module does not exist on GPUI.

Add surface.gpui.tsx, which Metro selects ahead of .native on GPUI only. It
lays out hunk headers, line numbers, add/remove/context rows, syntax colors,
collapse, split layout, and unwrapped horizontal scrolling with plain React
Native views, so Skia never enters the GPUI bundle. Inline review, drag
selection, and scroll-to-file stay canvas-only.

DocumentFileHeader now asks only for the section fields it reads.
2026-12-06 16:07:39 +01:00
neihyud c5caa9a009 Show provider CLI versions as plain text when the CLI styles its output (#10616)
Some provider CLIs color their `--version` output even when piped, and the
escape codes showed up in the provider settings version row. Strip them in
readCommandVersionOutput, which the version label, Codex version checks and
diagnostics all read from.

Fixes #10316
2026-12-06 14:12:41 +00:00
SunicemanandShane Su d69527bbe5 Show platform-specific crash log hints for local speech workers (#11219)
Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
2026-12-06 13:43:04 +00:00
Mohamed Boudra 99045250d0 fix(gpui): switch experimental desktop release to manual timestamped tags and fix Linux/macOS CI builds (#12233)
* fix(gpui): update nightly release in place with experimental title and notes

Previously the GPUI nightly workflow staged and published a brand-new release every night, which sent daily release notification emails to repository watchers. Updating the existing gpui-nightly prerelease in place preserves the same release ID, refreshes the tag and assets, deletes stale assets, and avoids repeat watcher emails while keeping initial draft staging when the release does not exist yet.

* fix(gpui): install fontconfig and freetype dev packages on Linux

yeslogic-fontconfig-sys requires fontconfig via pkg-config on ubuntu-24.04 (failed in run 47633672297); install libfontconfig-dev and libfreetype-dev alongside the existing X11/Wayland/Vulkan build dependencies.

* fix(gpui): back up existing nightly assets and defer tag update until upload succeeds

Addresses review feedback on in-place nightly updates: download existing release assets into a temporary backup before replacing them, move refs/tags/gpui-nightly only after all uploads are verified, and restore the backed-up assets and prior tag SHA if any step fails before the release metadata PATCH completes.

* fix(gpui): cache native deps with target and keep untouched assets on rollback

Restoring .artifacts/gpui/macos/target without RN_GPUI_NATIVE_DEPS_CACHE caused CMake regeneration to fail with missing OpenSSL::SSL and OpenSSL::Crypto targets on macOS. Set RN_GPUI_NATIVE_DEPS_CACHE inside .artifacts/gpui/{macos,linux}/native-deps, cache it alongside target under v2 keys, and clear restored CMakeCache.txt before configure. Also skip re-uploading assets whose IDs are unchanged during in-place rollback and report any rollback errors.

* fix(gpui): retry selective asset uploads during in-place rollback

Keep skipping untouched asset IDs when rolling back a failed in-place nightly release update, while routing only replaced or deleted backup files through scripts/upload-release-assets.mjs so transient upload failures retain retries.

* feat(gpui): switch experimental desktop release to manual timestamped tags

Implements Decision D622: remove the daily cron schedule from .github/workflows/gpui-nightly.yml so builds are manual-only (workflow_dispatch), rename the workflow and artifacts to GPUI Experimental, and stage-then-promote each run to a unique timestamped tag (gpui-experimental-DD-MM-YYYY-HHMM) with title Paseo GPUI Experimental DD-MM-YYYY HH:MM UTC and the approved Simple English release notes.

* fix(gpui): clean up newly created tag when promotion fails

Addresses review feedback on experimental release staging: track whether the current run created the timestamped tag and delete that ref alongside the staging draft if the promotion PATCH fails.
2026-12-06 20:37:13 +07:00
Mohamed Boudra 7f07d3e028 Unify desktop window chrome and bring GPUI to frameless parity (#12234)
* refactor(app): unify desktop window chrome behind platform seam

Extract renderer-agnostic window-chrome primitives so shared headers, sidebars, tabs, and window controls no longer gate on isNative or Electron globals directly:

- Add @/desktop/window-chrome-host (.ts no-op default and .web.ts Electron adapter) and migrate WindowChromeProvider, DesktopWindowControlsSync, and DesktopWindowControls onto it.
- Add @/components/desktop/caption-button and migrate DesktopWindowControls off raw Pressable and Electron window calls.
- Add @/components/desktop/titlebar-drag-surface (.tsx plain View and .web.tsx wrapping TitlebarDragRegion) and migrate header, sidebar, split pane, settings, drawer, and splash mount sites while keeping Electron drag/no-drag DOM/CSS behavior intact.
- Place explorerControls.titlebarAction after sharedExplorer so paint and hit-test order does not rely on zIndex, and tighten non-overflowing tab scroll width.

* test(app): assert drag overlay and 4px resizer styles in chrome seam test

* test(app): inject Electron deps in window-chrome-host and test default noop host

* refactor(app): remove unused Electron window command wrappers

* fix(app): initialize Electron window-chrome host lazily without platform gate import

* fix(app): preserve Explorer titlebar toggle header Tab order

* feat(gpui): implement desktop window chrome parity

Implements the .gpui.* platform adapters for Paseo's renderer-agnostic window chrome seam, bumps @react-native-gpui/* dependencies to paseo-6, and updates desktop*.json + main.rs so desktop.json is the single source of truth (1200x800, titleBar: hidden, menuBar: false, macOS trafficLightPosition {x: 16, y: 10}).

Uses DesktopWindowControlNativeComponent (codegenNativeComponent) so Bridgeless Fabric receives a static view config without touching UIManager, normalizes SafeArea top inset to 0 in window-layout/index.gpui.tsx for integrated 36px headers, and re-syncs menuSetMenuBarVisible(false, 1) on Linux/Windows so the initial surface reclaims the 26px menu strip.

* fix(app): pass system chrome appearance and action-only caption contract

Resolves two review findings:
- Pass "system" from DesktopWindowControlsSync when theme is "auto" (or missing-plugin fallback) so macOS GPUI clears NSWindow.setAppearance instead of locking dark/light across Light -> Dark -> System.
- Make DesktopCaptionButton action-only across web and GPUI adapters so GPUI does not accept and ignore a shared onPress prop.
2026-12-06 20:23:10 +07:00
Mohamed Boudra 9e8bce0789 feat(gpui): give GPUI desktop app icon parity with Electron (#12238)
* feat(gpui): ship Paseo app icons across macOS and Linux packages

Reuse the canonical Paseo desktop assets in packages/desktop/assets/ instead of duplicating icon blobs or falling back to @react-native-gpui/cli's default-icon.png:

- Point packages/app/gpui/desktop/desktop.json at icon.png and desktop.macos.json at icon.icns so cargo-packager bundles the full macOS iconset and dev runs receive the Dock icon via RN_GPUI_APP_ICON.
- Compile packages/desktop/assets/icon.icon into Assets.car (when Xcode 26+ actool is available) and stamp packages/desktop/assets/icon.icns onto the nightly macOS DMG volume.
- Fail verify-macos-package.mjs if CFBundleIconFile is missing, falls back to default-icon.png, diverges from packages/desktop/assets/icon.icns, or mismatches Assets.car/CFBundleIconName.
- Set window app_id and embed the Linux window icon in main.rs, and ship sh.paseo.gpui.desktop plus hicolor icons in scripts/gpui.mjs package-linux.

* fix(gpui): address icon verification and Linux launcher review findings

- Verify CFBundleIconName against assetutil catalog entries in verify-macos-package.mjs and drop the duplicate XML plist parser in favor of passing parsed Info.plist metadata in tests.
- Reuse @react-native-gpui/cli's loadDesktopConfig in scripts/gpui.mjs resolveConfiguredAppIcon so dev runs validate desktop.json identically to packaging.
- Place the Linux launcher at bin/paseo-gpui with readlink -f symlink resolution and symlink paseo-gpui -> bin/paseo-gpui so PATH symlinks and menu launches resolve libv8.so and resources.
- Require @react-native-gpui/cli assets unconditionally in verify-macos-package.test.mjs and add wrong-catalog-name and symlinked-launcher tests.

* fix(gpui): verify mounted macOS DMG icons and drop standalone CLI fallback requirement

* fix(gpui): run nightly macOS icon compilation on macos-latest
2026-12-06 19:47:40 +07:00
Mohamed Boudra 4d2a997d57 Make relay pairing and encrypted relay sessions work in the GPUI desktop app (#12242)
* fix(gpui): pair and connect over a relay on the V8 runtime

Pasting a pairing link failed with "globalThis.atob is not a function".
That was the first of several web globals the shared pairing and relay
code reads and V8 does not provide: atob/btoa, TextEncoder, TextDecoder
and DOMException were missing, and React Native's URL is a stub with an
empty hostname, so relay endpoints were rejected as invalid.

Install them from the GPUI-owned bootstrap, using the same Expo winter URL
and strict UTF-8 TextDecoder the mobile app gets. The encoding globals
load first because the URL implementation reads TextEncoder while it
evaluates. Shared packages are unchanged.

relay.native.test.ts runs the real HostRuntimeStore in the V8 binary
against a fake relay and daemon: pair, protected and legacy E2EE
handshakes, an encrypted ping/pong, and reconnect from the saved
registry. native-fixture.ts holds the bundle-and-run harness shared with
the WebSocket native test.

* test(gpui): share the fake relay and daemon between relay checks

Move the relay fixture out of relay.native.test.ts so a UI-driven pairing
run can start the same daemon the headless regression uses.

* test(gpui): keep the relay regression off the developer's localhost daemon

boot() also probes localhost:6767 (or EXPO_PUBLIC_LOCAL_DAEMON) unless the app's E2E
flag is stored. The fixture sets that flag so it reaches only its fake relay daemons.

* test(gpui): require Noise in the protected relay check and isolate saved hosts per run

The protected fake daemon accepted legacy handshakes, so a client that dropped Noise
would still pass. Each native run also now owns its app data directory, which macOS
and Windows read instead of XDG_DATA_HOME.
2026-12-06 19:47:03 +07:00
paseo-bot[bot] a6ac88ebe0 test(app): consolidate onboarding provider coverage (#12244)
Reuse the first-run setup host and Providers visit for the provider removal and re-add checks.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-06 12:38:28 +00:00
igayowaiandpaseo-bot[bot] baacb7aaac fix(acp): prevent Windows cancel deadlock when child pipes stay open (#12216)
* fix(acp): prevent Windows cancel deadlock when child pipes stay open

* Acknowledge ACP interrupt retries before closing the session

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-06 19:33:17 +07:00
Mohamed Boudra de1b414c25 feat(usage): add dedicated Oh My Pi usage source via omp usage --json (#12231)
* feat(usage): add dedicated Oh My Pi usage source via omp usage --json

When Oh My Pi authenticates through an auth broker, local agent.db has no auth_credentials rows, so the old SQLite-reading OMP routes in claude-usage-source and codex-usage-source discovered zero accounts. For local accounts, those routes also polled /api/oauth/usage independently on top of OMP's own polling and cache.

This adds a dedicated built-in omp-usage-source plugin that owns OMP usage through `omp usage --json` using the configured OMP command and environment, with bounded process execution, coalesced discovery/fetch snapshots, model-scoped session and list_profiles matching, and graceful skipping on older or missing OMP installs. The old local-only OMP SQLite routes are removed from claude-usage-source and codex-usage-source so both broker-backed and local OMP accounts report once without duplicates or duplicate polling.

* fix(usage): terminate wrapped OMP process groups and avoid stale refresh snapshots

Addresses review feedback on PR #12231:
- Remove the 30-second plugin-side unconsumed discovery snapshot cache so per-account refreshes always invoke `omp usage --json` fresh instead of replaying an earlier unconsumed discovery result, while keeping in-flight coalescing across concurrent requests and letting the daemon and OMP own caching.
- Spawn POSIX usage commands in their own process group (`detached: true`) and signal `-child.pid` on timeout/abort/overflow without skipping the SIGKILL grace escalation when a wrapper launcher exits before its grandchild.

* fix(usage): pass OMP provider launch to host discovery, consume discovery reports per request, and fix Windows fixture tests

* fix(usage): deduplicate OMP store credential IDs, preserve configured plugin registration, and remove wrapped test startup race

* fix(usage): gate global launch forwarding, keep wrapper OMP stores distinct, and stream fast sources during host discovery

* fix(usage): bound list discovery deadline, skip redundant fetch after failed discovery, and scope byAgent entries by session

* fix(usage): keep single list completion contract without detached cutoff and isolate previous agent reports by session identity
2026-12-06 19:23:28 +07:00
Mohamed Boudra 99b55930c5 fix(server): load local speech models from non-ASCII Windows profile paths (#12241)
* fix(server): resolve local speech model paths relative to modelsDir in worker

On Windows, sherpa-onnx-node@1.12.28 and espeak-ng check and open model files via narrow ANSI APIs (std::ifstream, GetFullPathNameA), which fail when $PASEO_HOME or modelsDir contains non-ASCII characters outside the system ANSI code page.

Inside the isolated Paseo Voice child process, create modelsDir if missing, chdir into it, validate that resolved paths stay within modelsDir, and pass pure-ASCII relative paths with POSIX separators to sherpa-onnx-node for STT, VAD, and TTS without mutating the daemon's cwd or upgrading sherpa-onnx-node (which breaks espeak-ng TTS in 2.0.x).

* fix(server): anchor worker modelsDir to initial cwd and preserve VAD fallback

Addresses review feedback on #12241:
- Anchor WorkerModelsDirScope relative path resolution to the worker's initial cwd so repeated relative modelsDir calls do not drift after process.chdir().
- Keep VAD directory preparation inside the recoverable try block so read-only or missing modelsDir falls back to the bundled Silero VAD model.
- Move optional loadNative and fileExists test dependencies onto config objects instead of adding positional constructor arguments.

* test(server): wait for worker process exit before cleaning up modelsDir

On Windows, the worker process holds a handle on its modelsDir cwd until OS process termination completes, causing immediate rmSync() in afterEach to hit EBUSY. Wait for the spawned worker PID to exit and retry rmSync during cleanup.

* test(server): use async rm with backoff for Windows worker dir cleanup

fs.rmSync retries EBUSY synchronously with zero delay; async fs/promises rm honors retryDelay backoff while Windows releases the exited worker's cwd handle.
2026-12-06 19:21:44 +07:00
880c040287 Keep Import Session quiet when default provider CLIs are absent (#12226)
* fix(server): skip missing CLIs when listing importable sessions

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* Keep Import Session warnings for configured launchers

Treat a missing default executable as an empty provider listing. Keep errors for missing configured launchers visible, with the command that failed.

Co-authored-by: jamescordrey-ops <335786770+jamescordrey-ops@users.noreply.github.com>

* Keep Import Session warnings for installed CLIs that fail to start

* Keep Import Session warnings for non-executable launchers

---------

Co-authored-by: Dhruv Singal <dhruvsingalabc@gmail.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: jamescordrey-ops <335786770+jamescordrey-ops@users.noreply.github.com>
2026-12-06 11:43:23 +00:00
lukeandRoundRedDot 7f94f5662c fix(acp): keep web search queries and results (#10835)
ACP agents that run a web search (Grok) report it as kind `search` with
the OpenAI Responses `web_search_call.action` in `rawOutput.action`:
`{type: "search", query, sources: [{url}]}` or `{type: "open_page", url}`.
Both ACP mappers (the daemon's and the plugin SDK's) read only
`rawInput.query|pattern` and text content, so the row showed the tool
title ("Web search:") as its query and no results.

For kind `search`, read the query from the action (its query, else the
opened URL), collect `webResults` from the action's sources,
`rawOutput.sources` / `rawOutput.results`, `resource_link` content and an
opened page, deduplicated by URL and limited to http(s), and mark such a
search `web_search`. File searches are unchanged.

Co-authored-by: RoundRedDot <roundreddot@gmail.com>
2026-12-06 11:42:46 +00:00
Mohamed Boudra 1704ba4fbb polish(app): align Command Center chevrons, row icons, and filter pills (#12235)
* polish(app): align Command Center chevrons, row icons, and filter pills

Move drill-down chevrons beside the row title so shortcuts and trailing values align on one right rail. Center single-line icons with 20px text and multi-line icons with 18px first-line titles. Add a trackless pills variant to SegmentedControl backed by segmentedSegmentSm geometry so Command Center filter tabs stay compact and aligned with the left rail.

* test(app): verify long-title ellipsis and chevron width in Command Center rows
2026-12-06 18:16:41 +07:00
NikandMohamed Boudra a5c32c5944 fix(app): normalize Windows checkout status paths (#3891)
* fix(app): normalize workspace paths at cache boundary

* fix(app): unify Windows checkout path identity across git caches

Normalizing only daemon checkout payloads was insufficient when Windows paths differed in drive-letter casing, trailing slashes, or drive-root spelling, or when query keys, invalidation predicates, and git-action stores keyed on raw caller cwd values.

Normalize Windows drive-letter casing, preserve drive roots and UNC prefixes, and route checkout query keys, invalidation predicates, git actions, working-diff comparison keys, and diff fallback matching through normalizeWorkspacePath.

* fix(app): preserve literal backslashes in POSIX workspace paths

Applying Windows separator conversion to POSIX paths merged distinct Linux directories such as /work/team\repo and /work/team/repo under one cache key. Restrict Windows separator, drive-letter, extended-prefix, and UNC normalization to Windows-shaped paths, and exercise an observer without route metadata in the fallback diff-routing test.

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-06 17:59:17 +07:00
Ryan大然 922c682a30 Stop OpenCode resumes from piling duplicate permission rules onto the session (#12232)
OpenCode appends PATCH /session/{id} permission rules to the session's list, so every resume added another copy of the agent's rules. Resume now reads the session first and skips the update when its rules already end with the agent's rules; any other state still gets the full list, so the agent's rules stay last and win.

Closes #12211
2026-12-06 10:43:52 +00:00
paseo-bot[bot] 6da4247646 fix(plugins): restore the previous plugin when an update cannot save (#12197)
The candidate was already running when saving its source failed. Include that save in update recovery so the configured source and the running plugin agree after the error.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-06 10:43:23 +00:00
Mohamed Boudra 60b3f42cd5 fix(app): scope web focus rings to interactive controls and fix picker outlines (#12214)
* fix(app): show web focus rings only on Tab navigation and fix switcher outline

Chromium treats any keyboard shortcut chord (such as Cmd+K or Ctrl+Tab) as keyboard modality for :focus-visible, which lit up containers and virtual-selection rows when overlay registration called .focus(). Track explicit Tab/Shift+Tab navigation in web-focus-modality so pointer input, shortcuts, and programmatic focus/restore suppress outlines while keeping Tab accessibility rings on interactive controls.

Update the MRU workspace switcher and sibling composite overlays (combobox option bodies, HostChooser, Command Center panel, attachment lightbox, and agent profile drawer) to focus a tabIndex=-1 container paired with aria-activedescendant instead of focusing row 0.

* fix(app): wire combobox listbox ARIA ownership and share Tab guard

Share isTabNavigationKey between web-focus-modality and the overlay focus trap so modified chords such as Ctrl+Tab cannot wrap focus or activate keyboard-nav outlines. Move HostChooserModal and Combobox ARIA ownership onto the active owner (SearchField/SearchInput as role=combobox with aria-controls linking to role=listbox, or role=listbox on non-searchable desktop containers) and expose the option row contract to custom renderers such as HostPicker.

* fix(app): use an if branch for host chooser listbox wrapper

* fix(app): wire header.search combobox ARIA and update E2E option locators

* test(app): query SearchInput by combobox role in plugin Combobox test

* fix(app): wire GitHub attachment picker selection through Combobox onSelect

* fix(app): keep active picker rows scrolled in view and guard pending search

Drop placeholder forge search results while a new query is in flight and enable remoteSearch/remoteSearchPending on ComposerGithubPicker so Enter cannot toggle stale rows from the previous query. Also scroll the active option row into view inside desktop Combobox and HostChooser scroll containers when ArrowUp/ArrowDown moves past the visible fold.

* fix(app): scope web :focus-visible rings to interactive controls

* test(app): update Combobox E2E option selectors to role=option

* test(app): cover New tab pencil focus ring in E2E (#9758)
2026-12-06 17:28:53 +07:00
Mohamed Boudra 530ccef5b5 fix(nix): validate npm-deps.hash on PRs and remove post-merge hash bot (#12204)
* fix(nix): validate npm-deps.hash on PRs and remove post-merge hash bot

Keep stock buildNpmPackage and nix/npm-deps.hash, delete nix-update-hash.yml and the Linux-only update-nix.sh self-heal step in nix.yml, and enforce nix/npm-deps.hash in ci.yml's required quality job when Nix or lockfile inputs change.

* docs(release): note pre-tag nix/npm-deps.hash check in CI
2026-12-06 17:11:12 +07:00
MatchyandMohamed Boudra 5d53876495 Keep colored OpenCode agents within their mode tier (#12182)
* Keep colored OpenCode agents within their mode tier

An OpenCode agent color is sent in colorTier, so merging runtime modes over the
built-in definitions replaced the permission tier with the hex value. The MCP
mode ceiling then treated build and plan as unclassified and refused valid
create_agent calls. A permission tier now wins that merge; the app still
receives the color, and custom agents without a built-in tier stay unclassified.

* refactor(modes): separate mode permissionTier from display colorTier and expose wire isUnattended

Deriving MCP mode-ceiling rank from display colorTier coupled security policy
to UI colors, causing colored OpenCode agents to lose their tier and forcing
non-unattended dangerous modes to wear warning styling in the mobile picker.

Add an explicit closed ordered permissionTier enum across protocol manifests,
@getpaseo/plugin ProviderMode, catalog cache, provider registry decoration,
and create-agent-mode classification, keeping a dated COMPAT fallback to
ranked colorTier for unmigrated external plugins. Expose optional isUnattended
on wire AgentModeSchema and check it first in mobile mode rows with a dated
COMPAT fallback to colorTier for older daemons.

* docs(plugins): document mode colorTier compatibility fallbacks and add compact picker test

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-06 17:06:31 +07:00
paseo-bot[bot] 757b1b89a0 test(server): reuse the workspace archive Git fixture (#12228)
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-06 09:33:02 +00:00
Mohamed Boudra 72c873564a feat(gpui): add native GPUI desktop foundation on V8 and nightly workflow (#12201)
* feat(gpui): land native GPUI desktop foundation

Add the opt-in native GPUI desktop client target (packages/app/gpui/), the desktop Rust/C++ backend for react-native-enriched-markdown, and .gpui.ts(x) Metro resolution overrides without altering shipping web, Electron, iOS, or Android targets.

Shared packages/app/src/ changes stay minimal and capability-based with zero gpui runtime branching: KeyboardRoot and hardware keyboard source wiring, immediate PressHighlight seam, pointer-capability hover/tooltip/meter handling, sidebar service status capability, and non-web Enter submit behavior.

Phase 2A of the GPUI foundation PR; V8 runtime tarballs and nightly release workflow follow in the next commit.

* fix(gpui): handle POSIX/localtime TZ fallback and guard send test

Resolve TZ=:/etc/localtime paths in desktop services and fall back to UTC at the Intl startup boundary when FormatJS rejects POSIX TZ rules.

Gate the message-sending Enter-to-send native regression behind PASEO_GPUI_TEST_ALLOW_SEND=1, restore drafts in the workspace-retention test, update the GPUI README, and unit-test resolveComposerSubmitBehavior in composer input state.

* fix(gpui): resolve hover bridge, file-system mkdir, markdown image, and driver helper findings

Ensure GPUI File/async file-system writes create missing cache/document parent directories, lift standalone Image nodes out of Paragraph in enriched-markdown desktop layout with child alt text extraction, render the hover-card bridge strip on non-web pointer runtimes, inline the ExpandableBadge pointer check in message.tsx, and extract the shared GPUI test driver client.

* fix(gpui): protect workspace retention draft edit inside try/finally

* fix(gpui): adapt gpui-shortcuts test to #12122 keybinding registry

* fix(gpui): lay out display math equations and document runtime Tab claim limit

* fix(gpui): reserve download target path and isolate .part staging files

* fix(gpui): isolate download staging inside private directory

* feat(gpui): wire V8 runtime and nightly release workflow

Install @react-native-gpui/* packages from the published paseo-5 release with V8 14.6 selected as the active JS engine, and add the separate gpui-nightly GitHub Actions workflow for signed/notarized macOS arm64 and packaged Linux x64 prereleases.

@react-native-gpui/hermes remains in packages/app/gpui/package.json alongside @react-native-gpui/v8 because @react-native-gpui/worklets still includes <hermes/hermes.h> at C++ compile time; DesktopAppConfig::js_engine("v8") and RN_GPUI_JS_ENGINE=v8 select V8 at bundle and runtime while skipping Hermes bytecode compilation.

* fix(gpui): address V8 review feedback and MaskedView adapter

* fix(gpui): release table scroll state and stage nightly publishes

* fix(gpui): preserve nightly release on swap failure and lazy guard init

* fix(gpui): treat promotion PATCH response as authoritative
2026-12-06 16:32:03 +07:00
Mohamed Boudra cc44ecaa09 feat(plugins): support localized plugin store screenshots (#12210)
* feat(plugins): support localized plugin store screenshots

Share plugin listing media and text resolution in @getpaseo/protocol so the website and in-app gallery resolve translations identically (exact tag, then base tag, then default English media while keeping English visitors on default media) and allowlist localized thumbnail URLs without loosening host checks.

* fix(plugins): address localized media edge cases and add e2e coverage

Keep explicit empty localized media arrays falling back to default media instead of base-tag overrides, fall back to default screenshots in the app detail strip when localized media is video-only, convert multi-arg protocol helpers to options objects, remove the test router type cast, and verify localized card/detail/og:image behavior in website and app Playwright suites.

* docs(plugins): clarify omitted vs empty localized media fallback
2026-12-06 16:23:22 +07:00
5da532efc1 Stop CLI log followers when the daemon disconnects (#11479)
* Stop CLI log followers when the daemon disconnects

* fix(cli): share daemon disconnect stop handling across logs and attach

Move terminal disconnect watching into wait-for-stop so both logs --follow and attach exit 1 with a plain DAEMON_CONNECTION_LOST CommandError without leaking DaemonConnectionError.name or history-fetch stack traces during the transport-close microtask race.

---------

Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-06 16:18:08 +07:00
Mohamed Boudra 08edc6edec fix(plugins): give composer pill popovers their workspace and agent IDs and keep tab setters stable (#12212)
* fix(plugins): pass the pill's workspace and agent IDs to its popover and keep tab setters stable

openPopover on a composer pill item typed its content as ComponentType<PluginPopoverProps>, so a popover could not read the workspaceId and agentId the pill already had. Authors had to build a curried, memoized component to forward them. The popover now receives PluginComposerPillPopoverProps (PluginPopoverProps plus both IDs). Components typed PluginPopoverProps still fit. Sidebar items have no enclosing IDs, so their popover props are unchanged.

usePanelTab now routes setState through a stable event, so setTitle, setModified, and setState keep one identity for the life of the panel whatever write function the host passes. tab itself still changes when state changes, which components that read tab.state rely on.

* test(plugins): cover pill popover IDs end to end and tighten the tab and version docs

The composer pill Playwright journey now checks that an installed plugin's popover shows the pill's workspace and agent IDs. The usePanelTab test runs in the browser project. The docs say a write that does not change the state value does not render again, and tell authors to set requirements.app before reading the new popover IDs.

* docs(plugins): tell authors to raise requirements.paseo before reading pill popover IDs

requirements.paseo applies to the daemon and the app, and covers apps that predate requirements.app.

* docs(plugins): name the effective app minimum for the pill popover IDs

An existing requirements.app range overrides requirements.paseo for the app, so authors must raise whichever one is in force.

* test(plugins): cover stable tab setters through a real plugin panel

The setter-identity test mounted a test-only probe. A plugin panel now destructures setTitle and setState into an effect dependency list, and the test checks the effect runs once while tab.state writes reach the panel, with a host that hands over a new write function on every state change.
2026-12-06 16:05:07 +07:00
Mohamed Boudra b181573dae test(server): wait for the delegate's subscription to end before finishing the mixed-batch turn (#12225)
The mixed-batch test completed Middle's second turn without waiting for
Middle's watch on Sub to end. When the watch was still stored at that moment,
Middle counted as waiting on a delegate, so the parent got an interim "still
waiting" notice. The final notice then queued behind the parent's running turn,
which the test never completes, and the parent's subscription stayed in the
store. Waiting until Middle has no delegations makes the final notice the
only one, matching the test's intent.
2026-12-06 16:04:30 +07:00
paseo-bot[bot]andhellozhangran 1437dedd95 fix(app): let the tab context menu grow to fit its labels (#12221)
The desktop tab context menu used a fixed 220px width, so at a larger
interface font size (or zoom) "Copy resume command" was ellipsized to
"Copy resume comm...". Use the width as a minimum instead; the menu
engine already caps the surface to the display width.

Closes #10434

Co-authored-by: hellozhangran <hellozhangran@gmail.com>
2026-12-06 08:42:52 +00:00
paseo-bot[bot] fa8c29f9c8 Verify that Pi prompts can be rewound after resume (#12205)
* test(pi): verify rewind after a session resumes

The old assertion equated Paseo message IDs with Pi session entry IDs. Exercise conversation rewind through the daemon client to verify that both prompts still resolve to their Pi entries after resume.

* Verify persisted Pi history after rewind

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-06 08:13:56 +00:00
Mohamed Boudra 10c0f9ce0e feat(app): add Command Center theme switcher sub-list (#12215)
* feat(app): add Command Center theme switcher sub-list

Reuse the Command Center sub-list primitive and shared theme catalog so users can browse, filter, and switch built-in and plugin themes directly from Command Center without duplicating theme selection state or polluting top-level search.

* fix(app): persist explicit System theme choice and tighten sublist tests

* refactor(app): isolate pure theme catalog from React appearance hooks
2026-12-06 15:07:36 +07:00
paseo-bot[bot] 3572c40232 fix(app): reveal the active workspace tab when tabs overflow (#12203)
Tab selection updates the pane even when its chip is clipped by the strip. Scroll the strip when the rendered selection changes so the user can see which tab is active.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-06 06:43:25 +00:00
SunicemanandShane Su 8514a14d8f fix(usage): recognize rejected Z.ai logins in HTTP 200 responses (#11208)
Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
2026-12-06 06:42:41 +00:00
paseo-bot[bot] 94164a28e2 test(server): restore the upstream clone in fork checkout tests (#12208)
The fork fixture reads a directory that the lazy clone helper no longer returns. Create the clone before advancing upstream so the tests reach their branch comparison assertions.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-06 06:25:14 +00:00
Mohamed Boudra 7e93dde3af feat: run every shortcut through shared action and keybinding registries, and let plugins add shortcuts (#12122)
* feat(app): add Phase 0 action and keybinding registries

* fix(app): address Phase 0 registry review feedback

* fix(app): address bot review findings on Phase 0 registries

* fix(app): isolate iOS plain Enter chord claiming from Android

* fix(keyboard): pass holdRelease when building browser registry prefixes after rebase

* fix(keyboard): address global fallback, key/code conflict, and printable E2E reviews

* test(e2e): use shared command-center helpers in keyboard shortcut spec

* refactor(app): reshape Phase 0 action and keybinding registries

@/actions now owns only action definitions, mounted handlers, the scope
stack and opaque owners, and imports nothing from @/keyboard. `when`, the
printable guard, conflicts and the display lookup live in @/keyboard.

- Scopes are an ordered stack: the innermost active scope wins, ties go to
  the earliest registration. Specificity weights, overlay depth, surface
  ids and priorities are gone.
- Keyboard context reaches dispatch with the key event; no store keeps a
  copy and there is no setContext.
- A registration carries an opaque owner. Two owners of one id are one
  action or binding; removing either leaves the other; the same owner
  twice throws. Which owner's `run` fires is an injected rule, wired at
  app start in Phase 1A.
- Handlers decline with `{ handled: false }`; a promise counts as handled
  and its rejection goes to onError. Payloads pass through untouched; a
  Digit binding supplies `index`.
- Removed the legacy-table adapter, the unwired registry builders in the
  native and Electron browser key sources, and module-load singletons.

* fix(app): claim intermediate iOS chord steps for pass-through actions

The resolver suppresses every key that only advances a chord, but the
native claim builder skipped any binding whose action passes its key
through (`preventDefault: false`), at every step. With Interrupt agent
rebound to `Cmd+J Enter K`, the intermediate Return stayed with the iOS
composer and could send the draft. The pass-through policy now applies
only to the step that completes the chord.

* fix(app): bind action handlers to one scope activation, not a scope name

Two panes showing the same panel both activate `inbox/list`. With handlers
matched by name, the earliest pane's handler ran even while only the other
pane was active. `activate()` now returns a `ScopeActivation`, and a
handler binds to the activation of the surface it is mounted in, so it
runs only while that activation is active. Keybinding `when` still
matches scopes by name.

* refactor(app): run core shortcuts on the action and keybinding registries

Every core action and default binding is now registered as `paseo/*` at app
start by CoreActionsProvider. The key pipeline, Command Center, Settings ->
Shortcuts, the shortcuts dialog and every badge read the registries, and an
action id is the only key for dispatch, badges and rows. The legacy binding
table, the keyboard action dispatcher, route-shortcut, workspace-shortcuts and
useKeyboardActionHandler are deleted.

Handler priorities are replaced by action scopes (composer, settings, new-tab,
workspace-pane, new-workspace, sidebar-selection): the innermost active scope
wins. Binding ids are unchanged so stored overrides keep applying.

The legacy table suites are ported to the registries with the same cases.

* docs(app): record chord timing and Android dev-menu keys for device QA

* fix(app): keep literal digit overrides and free chord prefixes no surface can run

Settings saved a captured digit literally (Ctrl+3) before it captured number
groups as Digit. Dispatch took `index` from the effective combo, so those
overrides matched but jumped nowhere. The binding's declared combo now decides
whether it supplies the pressed digit.

Every core action got a declining `run`, so the registry counted actions only a
mounted surface implements as available, and their chords reserved a prefix
other shortcuts use (New terminal on Ctrl+K J blocked Command Center in
Settings). Only the app shell's actions get a `run` now.

* fix(app): send composer keys to the focused composer and Escape to desktop Settings

Scope order follows activation order, so it could not tell which surface the
user was in. With the main pane's composer focused and an Explorer dock agent
tab activated later, Escape and the other composer keys went to the dock. On
desktop Settings, a composer that activated after Settings took Escape and
interrupted the hidden agent instead of closing Settings.

Composer handlers now register through useComposerKeyboardActions, which
enables only the composer whose input has focus and falls back to the
innermost composer when no input has focus. Composers go inactive while
desktop Settings covers the workspace, so Settings' unscoped Escape handler
is the only one left. Compact Settings still lets Escape interrupt the agent.

@/keyboard no longer imports @/core-actions or @/workspace-switcher:
useKeyboardShortcuts takes the badge modifier and the key-down, key-up, blur
and handled hooks, and core-actions supplies them in useCoreKeyboardShortcuts.

* fix(app): keep composer keys with the last-focused composer after a blur

The focus record cleared on blur, so clicking the main agent's timeline
handed Escape, Ctrl/Cmd+L and the other composer keys to an Explorer dock
composer that had activated later. The record now holds the last-focused
active composer and clears only when that composer deactivates or unmounts.

Adds a Playwright spec for the live paths: Escape after the main composer
blurs interrupts only the main agent with a running dock agent beside it,
focusing the dock moves Escape there, and Escape on desktop Settings closes
Settings and leaves the agent running.

* test(app): read the composer Escape spec as user steps

* feat(app): tell the user in Settings when a captured shortcut cannot fire or collides

Capturing a printable key for a binding that only applies while typing
(mode cycle on Shift+M) used to save and never fire. Settings now asks the
keybinding registry (`checkCapture`) and refuses such a combo with a reason.

A combo that shares a key press with another binding is saved and shown on
both rows as "Also used by ...". A user-set binding now wins over a default
at the same rank instead of losing to whichever registered first; this is the
only change to dispatch order. Shipped defaults share no key press, which a
test pins so a fresh install shows no warning.

* fix(app): warn on both rows when a shortcut collides through an alternate binding, and keep user-set first in the switcher

Settings checked only the binding each row displays, so a row whose action
also answers to an alternate key (Explorer sidebar on Ctrl+`) showed no
warning when another action took that key. Notices now come from the
registry's conflict pairs, so both actions hear about the collision.

The chord matcher used by surfaces that read keys themselves picked the
earliest-registered binding and ignored the user-set-first order the
registry applies, so a rebind could resolve differently in the workspace
switcher than in the app.

* feat(plugins): let plugins add actions and keyboard shortcuts

Plugins register actions and keybindings on the app's action and keybinding
registries through addAction, addKeybinding, useActionScope, useActionHandler,
Shortcut, and `action` on Command Center items. Ids are namespaced per plugin,
so user overrides survive reloads and reinstalls.

A plugin installed on several hosts is one action with one owner per host.
The owner order runs a global action on the active host, else the plugin's
preferred host, else the first online host; workspace and agent actions run
on the active host only.

Dialogs, menus and the Command Center now cover the scopes beneath them, so a
screen's shortcut does not fire through an overlay and returns when it closes.

plugin-examples/shortcuts and its browser E2E drive every scenario.

* fix(app): cover the app from every focus-holding overlay and run Command Center rows for the screen beneath

Overlay registration now owns the action cover: an overlay that takes focus
covers the app and hands its content the cover as `actionScope`. Comboboxes,
the model pickers, the host chooser, the lightbox, the modal profile drawer
and the workspace switcher HUD had no cover, so the screen beneath kept its
keys. A cover also hides handlers mounted in no scope; before, workspace
shortcuts such as Ctrl+Shift+T ran behind dialogs, and select mode's archive
under a menu fell through to the global archive of the open workspace.

Command Center rows asked the registry while their own cover was still up, so
a row backed only by a mounted handler (a plugin screen's action, New
workspace, New tab) did nothing. Rows now ask with `beneath` the Command
Center cover. Scopes and handlers register in layout effects so a scope shown
as active takes keys before paint.

A chord now reserves its first key only when it ranks ahead of every runnable
binding the same key completes, so a plugin's default `Mod+K J` no longer
takes Ctrl+K from the Command Center. A chord the user sets still does.

* fix(app): let a saved chord continue past a shorter default chord on the same keys

The precedence check ran only on a chord's first key. On a later key, a default chord that the key completed ran before a higher-ranked chord that the key continued, so a saved Ctrl+G J K never got past a plugin's Ctrl+G J. Every press now walks completing and advancing bindings in one precedence order.

* fix(app): order the workspace switcher's own key matches as the registry does

createChordMatcher still let a chord start beat a single key on the same press, while the registry now orders both by precedence. With Next saved as Ctrl+J and Previous as Ctrl+J K, Ctrl+J opened the switcher as Next but started Previous's chord inside it. The matcher now sorts its matches with the registry's byPrecedence.

* fix(app): close the compact model selector sheet with the shortcut that opened it

The sheet covers the app while open, which hides the trigger's toggle handler, so its shortcut needs a handler inside the cover, as the desktop picker and composer sheets have.

* fix(app): claim the next key of a scoped chord on iPad

The native source checked each pending chord candidate's `when` again
with an empty scope stack, so a chord that needs a named scope never
claimed its next key, and a focused text field typed it. The registry
already checked `when` with the scope stack when it accepted the first
key, so continuations now claim from the candidate list.

* fix(app): claim native shortcut keys only while their scope is visible

The previous fix claimed a pending chord's next key without checking
`when` again, so opening Command Center mid-chord kept the claim and
UIKit swallowed the first letter typed into its search field. Key sources
now read the visible action scopes and recompute claims when they change,
the same way they follow focus and Command Center. A scoped binding
claims its key only while no overlay hides its scope.

* fix(app): keep a scoped binding's first key with the iPad text field

Reading the scope stack for every claim made a scoped Shift or Option
binding claim its first key, even when its handler was disabled, so a
focused text field lost the key and nothing ran. First keys are checked
without the scope stack again, as before this branch. Only a pending
chord's next key follows the visible scopes.

* fix(app): show every shortcut and real names in Settings, Command Center and badges

- Settings → Shortcuts lists a row per binding an action has on this
  platform. It showed only the first, so a collision notice could name a key
  the user could not see or rebind (Explorer sidebar's second key, a plugin
  action bound to two keys). Notices are keyed by binding.
- A collision names the other action by its Settings label, else its
  registered title. It used to fall back to the raw action id for any
  action without a Settings row, such as dictation confirm.
- A plugin's Command Center group is titled with its display name, as
  Settings does, instead of its install id.
- A shortcut badge inside a filled (accent or destructive) button reads in
  the button's foreground color. Button tells its badges; no new props.

* fix(app): keep shortcut rows unique and tell an action's rows apart for screen readers

A further row of an action is identified by the action id and its binding
id, so a plugin that names a binding after another action cannot produce
two rows with the same React key or test id. The menu button of an action
with several rows is named by that row's keys.

* fix(app): number an action's shortcut rows so their menu names never coincide

A row's menu name used its current keys, or its default keys while unassigned,
so moving a key between an action's rows (or clearing both) gave two buttons
the same name. Rows are now numbered (1/2, 2/2) next to their current keys.

* fix(app): keep pending chord policy when bindings change mid-chord
2026-12-06 12:24:12 +07:00
Matchy 0cc69e9e55 fix(app): keep the selection toast's exit button in its trailing corner (#11274)
The sidebar selection toast let its row wrap. When the sidebar is
narrower than the toast's natural width (it can go down to 200px),
Archive and the exit X wrapped onto a second line under the count, so
the X sat next to Archive instead of in the toast's trailing corner.

Drop the wrap. The count is already limited to one line and can shrink,
so on a narrow sidebar it truncates and Archive and X stay on its line.
The count keeps flexShrink rather than flex: 1, because a zero flex
basis inside the content-sized toast can collapse the text on native.

The browser test mounts the sidebar at its minimum and default widths
and checks that the count, Archive and X share a line with X on the
toast's inner right edge. It fails on the old layout at 200px.
2026-12-06 05:12:38 +00:00
Mohamed BoudraandOrcun Simsek 459b1123f4 Start and compare new worktrees against the repository default branch (#12128)
* fix(server): create worktrees from fresh default bases

Resolve base inputs consistently before creation and persist the selected ref so comparisons follow the same branch. This is the server phase of the workspace base selection change.

Co-authored-by: Orcun Simsek <orcun@joyolabs.com>

* fix(server): preserve worktree base tracking mappings

Use tracked custom defaults and remote fetch mappings, and fetch change request bases before recording them.

* fix(server): keep tag bases and mapped pull request bases working

Branch-only base resolution dropped the existing `--base <tag|sha>`
support. Tags and commits now resolve after every branch candidate
misses; they skip the remote refresh, compare by commit, and merge into
base refuses them.

Pull request checkout built `refs/remotes/<remote>/<base>` and refreshed
it as a tracking destination, so a custom fetch mapping such as
`release -> origin/main` force-fetched the wrong branch into the
comparison ref. Checkout now resolves the base from the serving remote's
fetch mapping. When the candidate tracking ref belongs to another remote
branch, checkout keeps only the base name and leaves that ref untouched.

* fix(server): resolve pull request branch-off bases like checkout

Branch off from a pull request built `refs/remotes/<remote>/<base>` and
force-fetched the target into it. With a renamed fetch mapping, that
pinned a ref Git never updates, or overwrote a tracking ref that the
fetch config assigns to another branch. Branch-off now uses the same
serving-remote resolution as checkout, so both pull request paths agree
on which ref tracks the base.

* fix(server): merge into the branch a tracking base actually fetches

Merge into base took the local target from the tracking ref's suffix.
Now that worktrees pin the tracking ref named by the fetch mapping, a
base such as `refs/remotes/origin/mirror/main` that fetches `main` merged
into a local `mirror/main` instead. The target now comes from the same
fetch-mapping lookup that refreshes the base, and merges still refuse
refs outside origin or refs several branches map to.

Test fixtures that wrote origin tracking refs without an origin remote
now configure one, since Git removes a remote's tracking refs with it.

* fix(server): keep a local base whose upstream has another name

A bare base name resolved to its local branch's upstream whatever that
upstream was called. Git sets the upstream from the start point
(`git switch -c feature origin/main`), so `--base feature` started the
workspace at `origin/main` without the branch's commits, and merge into
base then targeted `main`. The upstream now stands in only when the
remote branch has the same name, which still covers fork clones whose
`main` tracks `upstream/main` and custom defaults like `dev` tracking
`origin/dev`.

* fix(server): find bare base branches through the fetch mapping

A bare base name found its remote copy by spelling the tracking ref
`refs/remotes/<remote>/<name>`, while refresh and merge read the fetch
mapping. With `release` fetched into `origin/integration`, creating from
bare `integration` started at `release` and merged into local `release`.
Lookup now asks the same fetch-mapping rule that pull request bases and
refresh use, so a tracking ref that holds another branch never stands in
for the branch the caller named.

* fix(server): target the fetched branch when creating a pull request

Create PR sent the tracking ref's own suffix as the forge target, so a base
stored as refs/remotes/origin/mirror/main (fetched from main) asked the forge
for mirror/main. Merge and Create PR now share one lookup of the branch a base
ref stands for, through the remote's fetch mapping; tag and commit bases are
refused before pushing.

* test(server): retry temp dir cleanup after killing hung ACP children

On Windows a killed process can keep its working directory open for a moment
after it exits, so deleting the test directory right after the hung child is
killed failed with EBUSY. Cleanup now retries like the other process-owning
test suites.

* refactor(server): resolve worktree bases through one conventional owner

Drop the custom fetch-refspec mapping. A base resolves through the
conventional refs/remotes/<remote>/<branch> layout, split on the longest
configured remote name, for creation, merge, and Create PR alike.

The read side now asks the same owner for the repository default branch,
by name, so a local checkout on that branch still reads as on base.

Base input is validated once at the edge:
- An empty base is rejected; callers that name none ask for the
  repository default and fail with "Unable to resolve repository default
  branch" when there is none.
- Ref expressions (@, a bare remote name, heads/..., remotes/...,
  revision suffixes) are rejected instead of freezing to a commit.
- The baseBranch alias applies only to a branch-off without a change
  request, so it can no longer replace a checkout target.

The MCP and CLI help now say a bare branch resolves remote-first and
that refs/heads/<name> branches from local commits.

* fix(server): compare against the only remote's default branch

A checkout whose only remote is not origin, on a feature branch with no
local default branch, reported its base as "main" but had no ahead or
behind count, and a base diff failed. The read side now names the
default from the same owner as creation, and a bare name that matches no
local or origin branch fell through to `git rev-parse main`, which Git
cannot resolve. Such a name now resolves the way a new worktree base
does, through the remote that has the branch.

* fix(server): keep default base reads in the caller's Git lane

The read side resolves the repository default through the shared base
owner, which ran its Git reads with the global runner. An
observation-driven status refresh therefore submitted normal-priority
commands from the background lane. The owner now takes the caller's
runner, and checkout reads pass the one from their context.

* fix(server): reject a blank base instead of branching from the default

A whitespace-only base was trimmed to empty and replaced with the
repository default before validation, so the request created a worktree
from a branch the caller did not choose. Only an omitted base defaults
now; a supplied one goes through the base validator, which rejects it
with "Base branch is required".

* fix(app): read the default base and base branch from the daemon

New Workspace guessed its starting ref from the checkout's upstream, so a
checkout on a feature branch preselected that feature branch, and the Git
actions regex-parsed the base ref, so a worktree checked out on main with
base refs/remotes/origin/main was treated as off its base and offered merge
and PR actions.

checkout_status now carries two optional fields from the base-ref owner:
defaultBaseRef (the ref a fresh worktree starts from) and baseRefBranch
(the branch the base stands for, its remote, and whether the checkout is
on it). A fork whose main tracks upstream/main resolves the same base for
status, diff and creation. Older apps ignore the fields; older daemons
leave them undefined and the app keeps its previous logic behind
COMPAT(checkoutDefaultBaseRef) and COMPAT(checkoutBaseRefBranch).

An agent fork still starts from the source agent's local branch. The
Changes base picker shows "main (local)" when the base is pinned to the
local branch of a checkout that has origin, since the label otherwise
drops "origin/" and both would read "main".

* test(app): give the no-comparison-base journey a checkout with no default

A sole local branch such as dev is now the repository default, so a
checkout on it compares against itself instead of reporting no base. Only
a detached HEAD among several custom branches with no remote leaves the
base unresolved.

* fix(server): update a fork from the base it compares against

A fork's feature checkout compared against upstream/main, which its local
main tracks, but Update from base still chose between local main and
origin/main, so it reported success without the upstream commits Changes
showed as missing. And a diff that named origin/main explicitly was
rerouted to upstream/main because the short ref was stripped to a bare
name before the tracking lookup.

Only a bare branch name now follows the remote branch its local branch
tracks, and both the comparison and Update from base use that rule.

* fix(server): compare an implicit base against the ref it selected

A checkout with no stored base reported its default as a ref, for
example refs/remotes/upstream/main, but turned it into the name "main"
and resolved that name again for the comparison and for Update from
base. When local main tracked a different remote than the one that
advertises the default, Changes compared against origin/main, counted
nothing behind, and Update from base left the upstream commits out.

With no stored base, the comparison and the base diff use the selected
ref. Update from base merges it when it is on a remote other than
origin, and keeps choosing the further-ahead of local and origin main
otherwise. Merging into the base and opening a PR still target the
branch name.

* fix(server): compare the base branch and detached HEAD against the selected default

The checkout snapshot skipped comparison resolution when the checkout sat on
its base branch or had no current branch. Status then re-resolved the display
name, so a fork whose default is upstream/main compared against origin/main
while reporting upstream/main as its default. Resolve the comparison ref once
whenever a base exists; ahead/behind and shortstat keep their own rule for
skipping counts on the base branch.

* fix(server): keep upstream counts when the checked-out default branch moves

Since the snapshot resolves a comparison ref on the base branch, a checkout on
main has a comparison ref equal to its upstream. The ref refresh took that match
as license to reuse the base counts, but ahead/behind is deliberately null on
the base branch, so a fetch turned the upstream state into unknown and Changes
disabled Pull. Reuse the base counts only when the refresh produced them.

* fix(server): count a default-branch checkout against the ref Changes compares with

On the base branch the composer count always compared against origin/<branch>,
while the Changes diff now compares against the selected default. On a fork
whose default is upstream/main, the count included upstream commits the panel
excluded. Use the snapshot's remote comparison ref for the count, falling back
to origin/<branch> when there is none.

---------

Co-authored-by: Orcun Simsek <orcun@joyolabs.com>
2026-12-06 11:54:19 +07:00
Mohamed Boudra 4b40bb0667 fix(nix): apply patches/ before the Nix build (#12199)
The Nix build installs with --ignore-scripts, so the root postinstall that
applies patches/ never ran. The web bundle imports lucide-react-native/context,
which only exists after patches/lucide-react-native+1.50.0.patch, so Web
Bundling failed with "Unable to resolve module lucide-react-native/context".

Run scripts/postinstall-patches.mjs at the start of both buildPhases. It spawns
patch-package by name, so node_modules/.bin goes on PATH (npm run does that
for postinstall, a bare node call does not).

Also run the Nix workflow when patches/ or the patch script change.
2026-12-06 11:46:26 +07:00
889f8b796a fix(app): only show grab cursor when image preview can pan (#11778)
* fix(app): only show grab cursor when image preview can pan

The web zoomable viewport showed grab/grabbing whenever scale > 1, even
when the scaled image still fit inside the viewport and could not move.
Derive the cursor from the same pan bounds clampTransform uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(app): track drag state with the same pan predicate as the cursor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(app): cover image preview cursor in a real browser

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep fitted image dimensions within the viewport

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-06 04:42:59 +00:00
Ryan大然 18897a99fa Keep a tilde with whitespace on both sides out of strikethrough (#11824)
md4c let a tilde open strikethrough when whitespace followed it and close
it when whitespace preceded it, so ranges such as `10:00` ~ `12:00` paired
up and struck out everything between them, inline code included. A
strikethrough opener now needs text after it and a closer text before it,
as GFM's flanking rules require. `~~text~~` and `~text~` still strike
through.

Web runs the parser as WASM, so src/web/wasm/md4c.js is rebuilt with
emsdk 4.0.10 per docs/markdown-renderer.md and lib/module is its Babel
output. A rebuild of the unchanged sources parses every Markdown file in
the repository the same as the previous artifact, and so does the fixed
build.

Fixes #11629
2026-12-06 03:43:08 +00:00
Mohamed Boudra 2c9567d48f test(desktop): give tunnel-transport daemon tests a 30s timeout (#12159)
The tests in tunnel-transport.test.ts start real daemons (two for routed
pairs) and ran under Vitest's default 5s timeout, which packages/desktop
does not override. On Windows CI runners they take 4-8s, so the routed
tests regularly failed with "Test timed out in 5000ms". Nothing leaks;
the work is just slower than the default budget. 30s matches the server
package's testTimeout.
2026-12-06 10:34:05 +07:00
3a07070736 fix(app): translate plugin attachment source menu label and picker states (#11744)
The composer attachment menu labeled plugin sources with a hard-coded
English "Attach ${title}", and the source picker showed hard-coded
"Searching..." / "No results". Both now follow the app language.

Co-authored-by: iicdii <4951716+iicdii@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-06 03:12:50 +00:00
Mohamed Boudra 4dfb5904ae Load Lucide icons one at a time to cut the web entry chunk by 1.9 MiB (#12155)
* perf(app): load Lucide icons one at a time

Every `lucide-react-native` import pulled the barrel, which evaluates all 1,858
icons into the web entry chunk (2.1 MiB). The app uses about 210.

- Import each icon from its file and `LucideProvider` from
  `lucide-react-native/context`. The package builds that entry but does not
  export it, so a patch adds the export.
- Plugins name icons as strings. `plugins/lucide-catalog` answers "is this a
  Lucide name" from a generated name list, so registration and fallbacks stay
  synchronous, and loads the barrel with `import()` when a plugin icon is first
  drawn. It becomes its own chunk on web.
- Lint bans the bare specifier (type imports stay allowed) outside the catalog.
- Tests stub icons per file instead of mocking the barrel.

* fix(app): retry a failed Lucide catalog load and lint the text-input files

A failed catalog download left mounted plugin icons blank until a reload, so
the loader now retries while an icon still waits for it. The text-input
override turned off every import rule for its files, which also lifted the
Lucide ban; it now keeps that rule.

* test(app): fail a per-icon Lucide import whose file does not exist

The test stub resolved any icons/<name> path, so a misspelled icon file
passed in Vitest and failed only in Metro.
2026-12-06 10:04:49 +07:00
paseo-bot[bot] eaea214fa3 Keep compact plugin popover footers in view (#12186)
* fix(app): keep compact plugin popover footers in view

Sheet resize events can report the content end before the body height. Keep the sizing mode selected by the measurement pass so that those events cannot unbound a flex scroller.

* fix(app): remeasure plugin popovers when list height changes

A fixed-height scroller can start at the sheet cap and then request a smaller viewport. Remeasure when its requested height changes so the sheet can hug the shorter content.

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-06 03:01:05 +00:00
JrDw0andjrd 4ad684861d fix(app): hide a terminal tab's close button after renaming (#12003)
Renaming a terminal tab from its context menu left the tab's close button visible after the rename dialog closed. The chip's hover state drove the close control, but the dialog closes without a pointer-leave on the chip. Clear the hover state when the rename action runs; other menu actions and a later pointer-enter keep their behavior.

Co-authored-by: jrd <jrd.dwj@gmail.com>
2026-12-06 02:42:51 +00:00
Mohamed Boudra 6c99a3926b Load locales, terminal and file panels on demand in web to cut the entry bundle by 3.1 MiB (#12154)
* perf(app): lazy-load locales, terminal and file panels, and the thinking cue in web

Metro only splits chunks at dynamic import() boundaries, so these optional
modules all sat in the single web entry bundle. The entry chunk drops from
26,752,414 to 23,506,469 bytes, back under Cloudflare Pages' 25 MiB file limit.

- Non-English locales load through literal dynamic imports; English stays the
  bundled fallback. Language changes are now async, so the provider holds the
  first render until the starting locale is loaded and later switches swap in
  place. Native keeps every locale in its offline bundle.
- TerminalPane (xterm) and FilePane (CodeMirror) load via React.lazy on first
  use. FilePanelView leaves the @/file-panels barrel because the barrel is
  imported by the entry bundle and the view pulls in the editor.
- The thinking-tone PCM clip loads on first cue or playback test instead of at
  startup. Web voice plays the cue, so it becomes an async chunk there rather
  than being dropped.

* fix(app): make lazy locale and panel loading recoverable

Review of the lazy-loading change found three ways a load could leave the
app in the wrong state.

- The provider gated its first render on the default setting, not the saved
  one, so a saved non-English locale could still paint English first. It now
  waits for settings storage before applying the locale.
- Selecting English while a locale was still loading was skipped as a no-op,
  and the pending locale then won. Every selection is now sent to i18next.
- i18next resolves changeLanguage even when a locale chunk failed to load.
  A missing bundle is now reported and the app returns to English, so the
  selection can be retried.
- React caches a rejected lazy component, so the workspace Retry button could
  never recover a terminal or file panel after a failed download. The panels
  now use createLazyPanel, which starts a fresh import on the next render.

* test(app): satisfy lint in the lazy panel test

* fix(app): keep the newest language choice and allow retry after a failed locale download

The previous recovery path switched to English whenever a locale chunk failed,
even if the user had already chosen another language, and i18next remembers a
failed backend read until reload, so selecting the locale again did nothing.

The app now downloads the locale itself (loadLocale) and only then selects it.
A newer request supersedes an older one, including its failure, and a failed
download leaves the current language in place so it can be retried.

* test(app): run the lazy panel retry test in the real browser with the production error boundary

* fix(app): retry the language download when the saved language is selected again

Selecting the already saved language writes an identical setting, so the provider's effect did not run again and a failed locale download could only be retried by choosing another language first. Settings now asks the provider to switch again in that case.
2026-12-06 09:31:44 +07:00
paseo-bot[bot] f347759cbe fix(omp): report startup failures without waiting for readiness (#11738)
OMP waited for a child exit event that a failed spawn never emits. Use the transport close reason to settle readiness while preserving process exit for session consumers.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-06 01:42:47 +00:00
James Hu 705d0e13fb Keep workspace status when the root agent's parent is on another host (#12166) 2026-12-06 00:12:55 +00:00
paseo-bot[bot]and3ae3ae 6291549834 Keep Codex thread settings when importing a session (#12167)
* fix(codex): keep thread settings on import

Use the native resume settings for the first imported turn and save
them with the agent so import preserves the thread's choices.

Co-authored-by: 3ae3ae <83870598+3ae3ae@users.noreply.github.com>

* fix(codex): resolve imported Speed for the resumed model

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: 3ae3ae <83870598+3ae3ae@users.noreply.github.com>
2026-12-05 22:42:46 +00:00
paseo-bot[bot] 51f22b3d42 Share worktree setup for the first-terminal browser checks (#12171)
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 21:32:06 +00:00
paseo-bot[bot] d4b380f4e0 Keep Settings clickable after leaving a composer dialog (#12156)
* fix(app): keep Settings clickable after leaving a composer dialog

A retained web chat freezes before a modal exit can finish. Remove the modal presentation when its owning panel becomes inactive so the old backdrop cannot block the destination.

* fix(app): complete sheet dismissal when leaving a retained panel

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 20:42:49 +00:00
paseo-bot[bot] bf8a357717 Show Oh My Pi browser screenshots in conversations (#12058)
* fix(omp): show browser screenshots in conversations

Render image blocks from completed tool results through the existing
provider image path. Resolve saved OMP image references during replay
so reopening a conversation shows the same screenshot.

* fix(omp): drain queued output when closing a session

* fix(omp): restore screenshots from the command-selected profile

* Restore Oh My Pi screenshots from profile dotenv paths

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 20:12:56 +00:00
paseo-bot[bot] bce9375580 Preserve the prompt cache through OpenCode compaction (#12048)
* fix(opencode): preserve the prompt cache through compaction

OpenCode runs compaction through a separate request hook. Apply the same session tool filters there so unused and unrelated tool definitions do not change the cached prefix.

* fix(opencode): compact shared sessions after the bridge stops

* fix(opencode): compact sessions when the bridge proxy returns 502

* fix(opencode): compact sessions when the bridge catalog is unavailable

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 18:42:58 +00:00
paseo-bot[bot] f64d11ac60 test(app): share the replay for Expand thinking checks (#12162)
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 18:39:28 +00:00
Mohamed Boudra c323914ca2 Harden lazy Mermaid load failure and enforce the 24 MiB web export ceiling (#12152)
* perf(app): load the Mermaid web runtime lazily and cap web export file size

The 3.4 MiB embedded Mermaid runtime was statically imported into the web entry chunk,
pushing index-*.js to 25.51 MiB, over Cloudflare Pages' 25 MiB per-file limit, so Deploy App
failed on v0.19.0 through v0.19.2. Loading it through import() moves it to its own async
chunk and drops index-*.js to 22.09 MiB. Native keeps the static import in host.native.tsx.

The web export now fails when any file reaches 24 MiB, and app-tests runs that export so a
regression fails in PR CI instead of at release-tag deploy time.

* fix(app): keep the web size ceiling out of daemon web UI packaging

build:web also feeds the daemon web UI and Nix builds, which have no Cloudflare limit.
The ceiling now runs only in app CI and before the Cloudflare Pages deploy.

* fix(app): merge the lazy Mermaid runtime load with the hardened loader

* test(app): cover Mermaid runtime load failure and recovery in the browser
2026-12-06 00:50:23 +07:00
Marcel Wysocki a923b4c4c5 Load the web Mermaid runtime when a diagram mounts (#10494) 2026-12-06 00:17:08 +07:00
paseo-bot[bot] 05e273826b Show selected answers in completed Claude questions (#12068)
* fix(claude): show selected answers in question history

Use the structured tool result for completed questions so the answer stays readable in live and replayed timelines.

* test(claude): cover live completed question answers

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 17:15:17 +00:00
paseo-bot[bot] fd22f024c4 Keep Codex chats working after clearing the model preference (#12067)
* fix(codex): continue chats after clearing the model preference

Clearing the preference on a loaded thread left collaboration settings without the model Codex requires. Resolve the default when building the next turn so the reset can stay in effect.

* test(codex): verify the model stays cleared after a turn

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 17:14:58 +00:00
paseo-bot[bot]andOuyang Xingyuan ff69af881d Scroll overflowing workspace tabs with the mouse wheel (#12061)
* fix(app): pan overflowing workspace tabs with the mouse wheel

The tab strip keeps every chip at its minimum width and switches to a hidden
horizontal scroller once they stop fitting. A trackpad can pan it, but a plain
vertical mouse wheel cannot, and the hidden scrollbar gives no affordance, so
any tab past the viewport is unreachable.

Translate a vertical wheel over the strip into horizontal scrolling on web.
React registers `wheel` as a passive listener, so an `onWheel` prop cannot stop
the browser default; a native listener on the ScrollView's scrollable node keeps
the gesture ours, while horizontal trackpad swipes and shift+wheel stay native.

The regression spec fails on the previous behavior (the strip does not move) and
passes with the listener in place.

* fix(app): harden tab wheel panning after review

- Leave ctrl+wheel to the browser: macOS trackpad pinch and Windows/Linux zoom
  emit a ctrlKey wheel event, which must not be turned into a horizontal pan.
- Ignore ref shapes that are not scrollable elements instead of throwing.
- Pin the regression spec to the leading edge before wheeling so it still
  describes the intended starting state if the strip ever auto-scrolls.

* fix(app): 修复工作区标签滚轮的平台实现与测试覆盖

原因:
- 平台相关 DOM 监听和纯滚动解析共用一个模块,测试也把真实 hook 挂载到了 JSDOM,违反项目测试边界。

改动:
- 将滚动解析、Web 监听和 Native no-op 实现拆成 core、web、native 模块,并保留类型入口。
- 把 E2E 交互断言移到可复用 helper,单测覆盖纯解析和 ScrollView 节点解析分支。

* test(app): exercise tab wheel hook through public interface

* test(e2e): keep wheel scenario intent focused

* test(e2e): use managed workspace fixture for wheel flow

* fix(app): own the tab strip scroll ref from the wheel hook

origin/main's #7589 introduced `tabsScrollRef = useRef<ScrollView>(null)` in the
tabs row while this branch's wheel hook returns the same ref, so the rebase left
two block-scoped declarations and the web bundle failed to parse.

Drop main's `useRef` and declare the hook ref above the scroll-offset reset
effect, so one ref serves the Animated.ScrollView and the reset.

* test(app): exercise wheel scrolling in the desktop tab layout

Co-authored-by: Ouyang Xingyuan <galaxyroaming@qq.com>

* fix(app): keep workspace wheel scroll helpers private

---------

Co-authored-by: Ouyang Xingyuan <galaxyroaming@qq.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 17:14:03 +00:00
Mohamed Boudra d78032e899 perf(highlight): build each grammar on first use (#12153)
* perf(highlight): build each grammar on first use

The language table built every Lezer parser and legacy mode at module
scope, so the first highlight call evaluated all 32 grammars (about 66.9 ms
on Hermes) even for a single TypeScript block. The table now holds memoized
thunks, and getParserForFile resolves only the grammar of the requested
file. The public API is unchanged and stays synchronous.

With Metro inline requires the grammar packages are required inside the
thunks, so they load on first use. Node still evaluates them at import.

* fix(highlight): ignore inherited names in the language lookup

The extension table was a plain object, so a file named notes.constructor
or notes.__proto__ found an inherited property and highlighting threw.
Lookup moves to a registry backed by Maps that takes its language thunks
as arguments, so tests count grammar construction with their own thunks
instead of reading state exported for tests.
2026-12-05 23:46:09 +07:00
Mohamed Boudra 1a5bd739a6 Evaluate only what the first screen uses at cold start (#12151)
* perf(app): evaluate only what the first screen uses at cold start

Enable Metro inline requires. Before, the entry evaluated 4,666 modules on
web and 4,836 on Android before anything rendered; a named, default or
namespace import now evaluates when the code that uses it first runs.

The remembered-workspace store started its hydration as an import side
effect. Nothing imports it before the first render anymore, so index.ts
starts that read explicitly.

startup-loading.spec.ts budgets the modules evaluated when Welcome and a
restored chat are visible, and asserts the Mermaid runtime and KaTeX stay
out of startup. Both budget tests fail with inline requires turned off.

* test(e2e): tighten startup module checks and allow a cold Metro bundle

The KaTeX skip pattern only matched the Markdown renderer's loader; on web
`import("katex")` resolves to katex.mjs, so the runtime itself slipped
through. Match both.

Module recording now rejects an empty recording or modules without paths,
so a broken recorder fails instead of satisfying every budget.

A cold CI bundle takes 70–120 s; with inline requires one shard reached the
120 s warm-up fetch limit. The limit only needs to catch a stalled Metro.
2026-12-05 23:46:01 +07:00
Ryan大然 5bee8eacc8 fix(client): attach host transport handlers before a failed connect reports (#12120)
When a connected host goes down, macOS fails connect() synchronously
(EHOSTDOWN, EHOSTUNREACH) and Node emits the socket error from the
nextTick queue. A reconnect timer opened the WebSocket synchronously,
so that error ran before the promise callback that attaches the
transport's error listener, and the daemon crashed with an unhandled
'error' event. Open the inner transport inside a microtask so the
handlers are attached first; the registration then goes offline and
retries like any other unreachable host.

Closes #12081
2026-12-05 16:16:39 +00:00
paseo-bot[bot] 80e1089fb6 Release idle OpenCode runtimes after worktree removal (#12043)
* fix(server): release idle OpenCode runtimes after worktree removal

Keep checking the remaining locations when OpenCode reports that one location no longer exists. Other shell inventory failures still prevent cleanup.

* refactor(server): name OpenCode HTTP error arguments

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 16:12:56 +00:00
paseo-bot[bot] 087b789035 test(server): skip unused upstream clones in checkout tests (#12149)
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 15:32:09 +00:00
Mohamed Boudra 238172244b Show hover-revealed controls on touch-first browsers (#12145)
* fix(app): gate hover-revealed UI on the pointer, not on isNative

Hover-revealed controls checked isNative, so a wide touch-first browser
such as iPad Safari (web, no hover) never showed them, and hover cards
and tooltips opened for a pointer that cannot hover.
useRevealsWithoutHover() asks whether a mouse-like pointer drives the UI
or the layout is compact; controls, HoverCard and the Tooltip press/hover
split follow that answer. Desktop web, Electron, iOS and Android behave
as before.

* fix(app): keep service status, open-file and details sheet on touch-first browsers

Review of the pointer gating found three places where the new rule took
more than hover controls with it. Sidebar service status is row metadata
that follows the layout, so it keeps its platform and compact rule. The
expandable badge's open-file button keeps its web-only hover reveal, as
touch-first browsers reveal it on tap. Context and turn details open in
a sheet in a touch-first browser, since a press tooltip there has no
dismiss path. A browser test taps a sidebar row under touch emulation.

* test(app): run browser tests with a desktop pointer

A CI runner has no pointing device, so Chromium reports no pointer and
hover cards, now gated on a fine pointer, never open in browser tests.

* fix(app): close tap-opened web tooltips when the page scrolls

A tooltip opened by a tap has no pointer leaving to close it, and the web
measures its anchor once, so scrolling left it over unrelated content.

* fix(app): keep a tap-opened web tooltip open and close it on an outside tap

A touch fires compatibility mouse events around its tap, and the
tooltip's hover handlers closed the tooltip the tap had just opened. In a
touch-first browser the hover handlers now do nothing, and a tooltip
opened by a tap closes on a tap elsewhere or on scroll. The JSDOM scroll
test is replaced by a touch-emulated browser test.

* debug: log pointer media in turn footer browser test

* test(app): run browser tests with a desktop pointer

A CI runner has no pointing device and its Chromium reports a coarse
pointer whatever the launch flags say, so hover cards, now gated on a
fine pointer, never opened in browser tests. A browser setup file
answers the pointer media queries as a desktop with a mouse.
2026-12-05 22:06:47 +07:00
paseo-ai[bot] b6fdf099b6 fix: update lockfile signatures and Nix hash [skip ci] 2026-12-05 14:57:24 +00:00
Mohamed Boudra f8691c480f chore(release): reconcile 0.19.2 into main (#12147) 2026-12-05 21:49:07 +07:00
paseo-bot[bot] 765aec33e5 fix(desktop): keep Paseo window identity out of child processes (#12040)
Linux child processes inherited Paseo’s desktop file name and could appear under Paseo in the window manager. Strip launcher metadata when preparing the child environment so the desktop keeps its own identity.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 14:43:15 +00:00
Mohamed Boudra 073743647a fix(app): keep a panel's render error inside that panel (#11338)
* fix(app): keep a panel's render error inside that panel

A render exception in any workspace panel, in the explorer or a split
pane, had no boundary between it and the root error boundary, so it
replaced the whole app with the root error screen. A workspace saved
with that panel selected took the app down again on every open.

The plugin surface boundary already contained errors for plugin
surfaces. Its error-catching core is now a shared RenderErrorBoundary,
and the panel host wraps every mounted panel in it. A failed panel
shows the error with a Retry button; the other panels, the chat, the
sidebar and workspace switching keep working. Plugin surfaces keep
their own "Plugin failed" state because their boundary sits inside the
panel and catches first.

* fix(app): contain panel render errors in every panel host

The boundary now lives in WorkspacePaneContent, so the compact center
pane and sheet tabs get it along with the explorer and split panes.

* test(app): cover panel render errors in a real browser

Replace the JSDOM tests with a browser test on WorkspacePaneContent, the
component every panel host mounts through.
2026-12-05 21:31:59 +07:00
Mohamed Boudra 6b3b349c8b refactor(app): name platform capabilities instead of branching on isNative/isWeb (#12144)
* refactor(app): name platform capabilities instead of branching on isNative/isWeb

Shared app code answers "does this target have a software keyboard / use
bottom sheets / hold-to-drag / haptics / desktop resource budgets / masked
effects" through named capabilities rather than raw platform checks. Each
capability evaluates to the same answer as the check it replaces on web,
Electron, iOS, and Android; no behavior changes on shipping targets.

- keyboard: hasSoftwareKeyboard, next to usesDesktopBindings and
  supportsConfigurableComposerSendKeys
- constants/presentation, resource-budget, touch-timing: resolvers with
  unit tests per target
- ResizeHandle selects its interaction from finePointer and isWeb
- LabelShimmer gates on supportsMaskedEffects

* fix(app): keep the workspace deck limit free of runtime platform imports

Playwright imports WORKSPACE_DECK_MAX_MOUNTED_WORKSPACES in plain Node, so its
module must not reach react-native. The resource budget now imports the
constant instead of the other way round.

* refactor(app): keep resource budget tables free of platform imports

The budget tables and resolver move to a platform-free module. The runtime
values stay in resource-budget.ts, and the workspace deck limit reads the
tables, so file viewing no longer depends on workspace screen code.
2026-12-05 21:31:09 +07:00
paseo-bot[bot]andOmer Cohen b1bb161133 fix(omp): preserve workspace prompts when appending Paseo instructions (#12037)
OMP's append flag overrides its automatic prompt file discovery. Add
Paseo's prompt through the existing extension after OMP resolves its
system prompt.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Omer Cohen <639682+omercnet@users.noreply.github.com>
2026-12-05 13:43:09 +00:00
Mohamed Boudra 2f1fc53cdb Load Codex composer skills inline, with attachments, and on busy turns (#12143)
* fix(codex): resolve composer skill mentions across turns, attachments, and steering

Composer autocomplete inserts enabled Codex skills as /name anywhere in a prompt, but Codex only loads a skill from structured skill input items and $name mentions at turn start. Previously, only a single leading /skill on a plain string prompt was translated; inline mentions, multiple skills, prompts carrying attachments, and steered sends reached Codex as literal /name text and never loaded the skill.

Add a dedicated Codex skill-mention resolver that scans only user text blocks with strict token boundaries (leaving file paths like /docs/api.md, images, chat_history, and text/file attachments untouched), skips skills/list when no candidate token exists, and unifies leading and inline skill resolution while keeping buildCommandPromptInput solely for /prompts:* custom prompts. In steerActiveTurn, return unavailable whenever a prompt mentions an enabled skill because codex-cli ignores skills on turn/steer, allowing AgentManager to replace the turn so the skill loads.

Fixes #5008

* fix(codex): preserve async question steering and resolve skills in custom prompts

Steer async question answers directly through submitTurnSteer so answers mentioning a /skill token still reach the running turn instead of failing with a turn-changed error, and run skill-mention resolution after expanding /prompts:* custom prompts so skills passed in custom-prompt arguments also load.

* fix(codex): keep saved prompt templates and late permission follow-ups literal

Resolve skill mentions only in user-supplied /prompts:* arguments instead of re-scanning the saved template body, and preserve synthetic permission follow-up prompts (late async question answers and plan approvals) verbatim on startTurn so they match active-turn steering behavior.
2026-12-05 20:31:13 +07:00
Mohamed Boudra 617ebbdb1a Deliver OpenCode v2 skills picked inline or while steering (#12142)
* fix(opencode): deliver OpenCode v2 skills inline and while steering

OpenCode v2 turns only matched a single leading /skill on idle dispatch and skipped slash resolution on steerActiveTurn, so inline /skill mentions, multiple skills, prompts with preceding attachments, and any skill sent while a turn was running reached OpenCode as literal text without a skills attachment.

Unify prompt preparation for dispatch and steerActiveTurn in OpenCode v2: scan user text blocks for /<skill-id> mentions with strict path-safe boundaries, attach structured skills with exact mention ranges (or fallback prose when no other user text remains), steer skills natively via delivery: 'steer', and return unavailable on steer for /compact, /summarize, and non-skill commands.

* fix(opencode): resolve skills in command args and ignore literal code

Address review findings on OpenCode v2 prompt preparation:
- Scan leading command arguments through the same skill-mention resolver and forward skills on session.command requests.
- Skip fenced code blocks and inline code spans when scanning user text for /skill mentions so shell paths inside code examples stay verbatim.

* fix(opencode): preserve subdirectory commands and attached chat history on compact

Let the OpenCode catalog match leading slash-separated command names (such as nested/docs) while keeping unmatched paths literal, and keep /compact or /summarize on the regular prompt path when attachments or chat history are present so they are never dropped.

* fix(opencode): keep leading command detection on original message boundary

Only match leading /compact, /summarize, or provider slash commands when the message starts with user text (segments[0].isUserText). Messages preceded by chat_history stay on the regular prompt path while still scanning user text blocks for /skill mentions.
2026-12-05 20:15:37 +07:00
paseo-bot[bot] c174f475c8 test(e2e): share one visit for Settings Appearance checks (#12141)
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 12:36:07 +00:00
Mohamed Boudra 6e5f0bd889 Keep compressed requests on disconnect and skip compression on localhost (#12134)
* Harden frame compression: drain on disconnect, skip loopback, stable CI

- The daemon now applies compressed requests the peer sent just before
  dropping the connection: it awaits flushInbound() before closing the
  frame transport. deliver() failures reject the frame's receive()
  completion instead of being swallowed.
- The Node codec's sync decode path runs again (bounded at 256 KiB of
  output, falling back to async past it); it was unreachable because
  callers pass the 100 MiB cap.
- Clients do not advertise frame_codecs on transports that report
  local (loopback TCP, Unix socket, named pipe, desktop socket/pipe)
  unless capabilities lists them explicitly. Routed hosts still use the
  installed codecs, and a routed frame whose enclosed frame is already
  compressed is not compressed again.
- The relay wire benchmark uses deterministic fixtures and measures
  compressed bytes against raw payload bytes, not the uncompressed wire.
- The protected relay negotiation test runs in test:integration.
- server_info staying plain text is now covered by a focused test, and
  SECURITY.md and the protocol/terminal docs describe current behavior.

* ci: pin the protected relay negotiation test in the integration contract

* Drain frames on socket error, bound sync inflate input, tighten codec tests
2026-12-05 18:01:18 +07:00
paseo-bot[bot] 350a4937d9 test(e2e): share setup for retained chat checks (#12126)
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-05 09:35:58 +00:00
paseo-ai[bot] 0fcaa91f38 fix: update lockfile signatures and Nix hash [skip ci] 2026-12-05 09:27:30 +00:00
Mohamed Boudra 1925dba3ce Reduce bandwidth for protected relay connections (#12114)
* perf(relay): send ProtectedChannel text records as binary frames

* test(relay): cover repeated protected handshake replies

Repeat the real client hello over the relay and identify the repeated ready by its exact text. This keeps the binary framing assertion focused on application records.
2026-12-05 16:19:56 +07:00
Mohamed Boudra 7f0d9e7e80 Compress large WebSocket frames with negotiated deflate-raw (#12117)
* feat(protocol): compress large transport frames with negotiated deflate-raw

Evolve ChunkedTransport into FrameTransport so connection-scoped framing and
stateless per-frame compression share one primitive above encryption across
direct WebSocket, E2EE relay, and routed host channels.

- Negotiate codec IDs via hello.capabilities.frame_codecs and
  server_info.features.frameCodecs using deterministic server-preference order;
  older peers stay uncompressed.
- Compress text and binary frames >= 1024 B statelessly before chunking using
  the 0x31 envelope ENCODED flag bit (0x04), leaving handshakes, small frames,
  and incompressible payloads uncompressed.
- Enforce the 100 MiB logical message limit as a hard decompression cap on
  every runtime to block decompression bombs.
- Supply host codecs without leaking platform specifics into client core:
  Node zlib (sync fast path < 256 KiB, async libuv >= 256 KiB), Web
  CompressionStream('deflate-raw'), and native iOS/Android Expo module
  paseo-compression (Apple libcompression / Android libz).

* fix(protocol): bound sync inflate by maxOutputBytes and align client codec overrides

* test(transport): verify routed browser compression and align host-link tests

* fix(protocol): bound Web decompression pulls and propagate async receive backpressure

* fix(client): forward frameCodecs to routed SDK hosts and inject web codec streams

* test(app): decode 0x31 framed WebSocket messages in Playwright E2E helpers
2026-12-05 16:19:51 +07:00
Mohamed Boudra d771cb9c8e fix(release): tolerate npm publication delays (#12123)
* fix(release): tolerate npm publication delays

Registry packument caches can remain stale after a successful publish, aborting the release before the remaining packages are uploaded. Verify versions after the publish wave using the direct version endpoint.

* fix(release): bound visibility verification time

Count registry request time toward the verification window so persistent timeouts cannot hold the release workflow for hours.

* fix(release): bound dist-tag retry time

Count npm command time toward the propagation window so registry outages do not block later releases for hours.
2026-12-05 16:19:03 +07:00
Mohamed Boudra ecbc360045 feat(app): add fast MRU workspace switcher (#12116)
* feat(app): add fast MRU workspace switcher

Adds a per-device visit-order MRU workspace switcher with hold-and-release keyboard navigation across desktop, web, terminal tabs, and embedded Electron browser tabs.

- Tracks committed workspace visits separately from daemon activity timestamps so background agent runs never shuffle switch order, with cold-start backfill up to 5 non-background workspaces.
- Uses a 110ms hold delay so quick Ctrl+Tab (desktop) or Alt+` (web) tap-release flips straight to the previous workspace with zero overlay flash, while holding opens a compact 5-row HUD that commits on modifier release and cancels on Esc or blur.
- Forwards guest keyUp events from Electron browser webviews after forwarded shortcuts so hold-and-release commits reliably when focus starts inside a browser tab.

* fix(app): harden workspace switcher edge cases and add desktop E2E

- Forward Escape keyDown from Electron browser guests while awaiting a hold-shortcut release so pending switches cancel cleanly.
- Validate frozen switcher targets against live eligible workspaces before committing navigation so rows archived while open do not navigate to removed workspaces.
- Preserve pre-hydration startup visits when delayed hydration reads corrupt MRU storage instead of clearing them.
- Add desktop renderer E2E verifying physical Ctrl+Tab from terminal focus and forwarded guest browser keyDown/keyUp/Escape events.

* fix(workspace-switcher): derive footer cycle keycap and add real Electron QA

* fix(desktop): scope guest Escape and keyUp capture to holdRelease prefixes

* fix(workspace-switcher): resolve custom cycle shortcut before built-in HUD keys

* fix(desktop): preserve active awaitingKeyUp when unrelated shortcut fires

* fix(workspace-switcher): preserve multi-step cycle chords while HUD is open
2026-12-05 15:47:24 +07:00
Mohamed Boudra 42b5079a02 Add manual npm canary publishing (#12118)
* feat(release): add manual npm canary publishing

Exercise npm trusted publishing without triggering the release builds or moving stable and beta tags.

* fix(release): preserve app version during canary builds

Keep native build versions valid and reject reused canary versions so a run cannot report an old publish as a successful test.

* fix(release): reject incomplete canary requests

A package selector must never fall through to a full stable publish.
2026-12-05 15:19:11 +07:00
Mohamed Boudra 40074234ab Pin CLI and server runtime dependencies (#12113)
* chore(deps): pin CLI and server runtime dependencies

* fix(ci): check pinned versions without dependencies
2026-12-05 15:10:46 +07:00
paseo-ai[bot] 9bd3e9c852 fix: update lockfile signatures and Nix hash [skip ci] 2026-12-05 08:01:49 +00:00
Mohamed Boudra 3bc7175559 feat(app): add Command Center sub-lists for models and files and stabilize Enter (#12115)
* feat(app): add Command Center sub-lists for models and files and stabilize Enter

* fix(app): cancel queued Enter on arrow keys while loading and unify file sublist lookup

* fix(app): keep Search files available while workspace loads and allow Tab in sublists

* fix(app): limit sublist Enter bypass to Back button and gate file search spinner on host connectivity

* fix(app): keep Command Center result rows out of Tab order and exclude tabindex=-1 in overlay focus trap

* fix(app): scope Command Center result row tabIndex=-1 to web only
2026-12-05 14:52:42 +07:00
Mohamed Boudra 44e60b1731 feat: unify link opening, in-app paseo:// routing, and external protocol consent (#12083)
* fix(desktop): add external protocol consent policy for custom app links

Desktop 0.19.0 added fail-closed session permission handlers that denied
openExternal on session.defaultSession, silently breaking plugins that open
remote editors via custom URI schemes (vscode://, cursor://, zed://, and
user-configured templates).

Re-enabling openExternal unconditionally on the main frame would allow silent
OS protocol execution from middle-clicked Markdown links and unsafe schemes.
Instead, introduce a single Desktop-owned external protocol policy that:
- Always allows http: and https: without prompting
- Hard-blocks dangerous and internal schemes without prompting
- Prompts once per custom scheme via native dialog.showMessageBox showing the
  full destination URL with an opt-in 'Always allow <scheme>: links' checkbox,
  persisted in userData and resettable in Settings -> General

Wire both trusted main-frame openExternal permission requests and
handleWindowOpen (denying child window creation for custom and blocked schemes
while keeping about:blank and HTTP(S) POST submissions in Electron) through
this policy, leaving browser webviews and sandboxed subframes fully denied.

* test(app): exercise real NavigationContext focus refresh in ExternalAppLinksRow test

* feat(protocol): add shared internal-link, link-classification, and external-protocol-policy primitives

* refactor(desktop): unify opener, navigation guards, and internal link delivery on shared protocol primitives

* feat(app): unify link opening, in-app paseo:// routing, and mobile external-protocol consent

* test(e2e): add desktop and web unified link E2E and fix live QA regressions

* fix(app): stabilize mobile approvals handle, preserve openExternalUrl rejection, clean web E2E

* fix: block mhtml:, share settings section slugs, toast chat open failures, clean browser test

* fix: preserve raw href in web markdown links and use ARIA status role in desktop E2E

* fix(app): classify opaque external schemes (tel:/sms:) before file:line and remove private test import

* test(desktop): pop global routes with goBack in plugin-links E2E to avoid stacking duplicate host layouts
2026-12-05 14:51:53 +07:00
Mohamed Boudra 094975ab0c Show account usage when listing profiles (#12112)
* feat(usage): expose quota reports with agent profiles

* feat(usage): match OpenRouter profiles across harnesses

* fix(usage): resolve independent profile account readings

* fix(usage): resolve sources and manual accounts independently
2026-12-05 14:51:48 +07:00
Mohamed Boudra 436d8c9de4 refactor(app): unify text inputs onto FormTextInput and guard raw imports (#12098)
* refactor(app): consolidate text inputs onto FormTextInput and guard raw imports

Nested withUnistyles wrappers around AdaptiveTextInput emitted nested display:contents divs on web and silently dropped box styles (breaking Add custom model's Model ID input into a raw square :focus-visible outline). Meanwhile, missing FormTextInput capabilities (inline reveal toggle, clear button, monospace, flush card-embedded textarea, multiline defaults) led 31 call sites to bypass form chrome and leak raw browser focus outlines.

Consolidate EditingTextInput as the single low-level editing surface with one internal withUnistyles wrapper (folding in placeholder color, default foreground color, placeholderTone, and resetKey) and delete AdaptiveTextInput and SettingsTextArea. Upgrade FormTextInput with frame-click focus, trailing/clearable/revealable/monospace/flush/multiline support, rebase SearchField on FormTextInput, migrate form/modal/settings inputs across the app, fix MenuTextField and file-explorer inline focus outline leaks, reconcile docs/design.md with docs/forms.md, and enforce paseo/no-raw-text-input in oxlint outside components/ui and the explicit bespoke-editor allowlist.

* fix(app): address review findings on FormTextInput and no-raw-text-input

- Remove the outer FormTextInput Pressable from sequential keyboard tab order (tabIndex=-1) while preserving click-to-focus, covered in form-field.browser.test.tsx.
- Size inline field actions (clear/reveal) from shared control-geometry touch targets (44pt md / 32pt sm on touch, 24pt md / 20pt sm on pointer) with negative vertical overhang so field height stays unchanged.
- Allow Field error messages to wrap so connection/pairing details are not clipped on narrow viewports.
- Report namespace imports from components/ui/text-input in paseo/no-raw-text-input with unit test coverage.

* fix(app): preserve Unistyles tracking on FormTextInput overrides and inline action feedback

- Add optional frameStyle and inputStyle props on FormTextInput so callers can pass Unistyles-tracked styles directly to the frame and inner editor without flattening/stripping metadata, and update review/surface, pair-device-section, appearance-section, and search-field to use them.
- Add hover and press interactionHighlight feedback to FormTextInput inline action buttons (clear and password reveal).

* fix(app): preserve extraMuted placeholder on file explorer draft input
2026-12-05 14:26:33 +07:00
Mohamed Boudra 906e0f61ea Strengthen release publishing and asset provenance (#12092)
* chore(release): publish trusted packages and attest assets

* fix(release): preserve provenance and serialize publishing

* fix(release): protect retry channels and manifests

* fix(release): preserve assets during provenance retries
2026-12-05 14:21:48 +07:00
Mohamed Boudra 22c84c59f6 polish(app): smart-fill Direct connection form on paste (#12099)
* feat(app): smart-fill Direct connection form when pasting host:port or URI

Pasting a host:port, bracketed IPv6 address, or direct connection URI into the Direct connection form now splits and populates Host, Port, Use SSL, and Password instead of leaving the raw string in Host or kicking tcp:// URIs out of Form mode.

Unifies address parsing in direct-connection-host.ts so form normalization, URI-to-Form conversion, and smart paste share one parser. Handles web paste events directly when replacing the field (avoiding mid-string paste interference) and detects multi-character paste in onChangeText for native platforms without fighting manual typing or bare IPv6 entry.

* fix(app): preserve typed URI settings, clear password on tcp paste, and track native selection

Addresses review feedback on Direct connection smart-paste:
- Clears any previous host password when pasting a tcp:// URI without ?password=, while still preserving user-entered password on plain host:port or http(s)/ws(s) pastes.
- Resolves explicit scheme, port, ssl, and password from a manually typed URI in Host on Connect and Form-to-URI mode switching instead of dropping query settings.
- Requires decimal digits for ports in buildDirectConnectionUri so non-decimal IPv6 ports like [::1]:0x10 are rejected instead of parsed as hex.
- Tracks onSelectionChange on Host and Port so native platforms accurately distinguish full-field replacements from partial pastes.

* fix(app): commit typed Host URI into form fields on blur, edit, and connect

Eliminates conflicting sources of truth when a user manually types a URI into Host: leaving Host, editing Port/SSL/Password, switching modes, or clicking Connect now commits the parsed URI into the visible form fields so password retries and subsequent edits always control the next connection attempt.

* fix(app): sync Direct connection inputs when SSL toggle or Password commits Host

Routes handleToggleUseTls and handlePasswordChange through syncFormInputs so committing a manually typed URI in Host while Host still has focus (such as tapping Use SSL on native) updates the displayed Host, Port, and Password inputs immediately.

* fix(app): defer Host blur commit when clicking Use SSL checkbox

When clicking Use SSL while Host still holds a typed URI on web, Host blurs before the checkbox press fires. Deferring the blur commit when relatedTarget is the Use SSL toggle lets handleToggleUseTls own the single commit and toggle so clicking an unchecked Use SSL after typing an https:// URL leaves SSL enabled.
2026-12-05 13:13:54 +07:00
Mohamed Boudra d6512537f4 polish(app): unify SegmentedControl with recessed pill track and Direct connection icons (#12089)
* polish(app): unify SegmentedControl with recessed pill track and Direct connection icons

Switch SegmentedControl from a transparent ghost layout to a single recessed surface2 pill track with 2px inset padding and an elevated active thumb across all surfaces. Add surfaceSegmentThumb and borderSegmentThumb semantic theme tokens so Light themes use an elevated surface0 thumb with shadow instead of colliding with surface3/border, while Dark themes (including Pure Black) use surface3 with a subtle highlight border. Replace the two wrap call sites with horizontal scroll containers so pill tracks stay single-row, align column-hosted controls so they hug content, and add Form and Link icons to the Direct connection Form/URI switcher.

* test(app): verify horizontal overflow pills selection in agent controls sheet

* test(app): force vertical overflow and use real wheel input in pills scroll test

* Update plugin directory E2E tab container lookup for horizontal scroll wrapper

* Render Command Center filter tabs as ghost tab pills with bottom breathing room

* Use shared Button and horizontal ScrollView for Command Center tab pills

* Reveal keyboard-selected Command Center filter pills on horizontal overflow
2026-12-05 13:04:13 +07:00
Mohamed Boudra 59afa917b2 polish(app): derive borderFocus token for focused inputs (#12094)
* polish(app): derive borderFocus token for focused inputs

Composer focus previously borrowed surface4 (too bright in Default Dark, compressed in Pure Black), while SearchField and MenuTextField focused to borderAccent (fading lighter than border in Light mode). Deriving borderFocus at 1.30x contrast from borderAccent toward foreground keeps focus borders consistent across built-in and plugin themes while leaving surface4 to UsageMeter.

* fix(app): composite translucent plugin borders before deriving borderFocus

* fix(app): preserve translucency when deriving borderFocus from translucent borders

* fix(app): start opaque borderFocus step from closest surface to foreground
2026-12-05 12:58:03 +07:00
Mohamed Boudra 75f8a2597d Harden build inputs and downloaded archives (#12091)
* chore(security): harden build and model downloads

* fix(speech): invalidate partial models after verification fails

* fix(highlight): clean up failed grammar downloads

* test(speech): cover rejected cached models in library
2026-12-05 12:52:53 +07:00
Mohamed Boudra 6e6ef71913 feat(app): render LaTeX math formulas by default (#11966)
* feat(app): add LaTeX math scanner, HTML protection, and streaming safety

Phase 1 of 3 for built-in LaTeX math rendering:

- Add single-pass linear math scanner and source adapter (math.ts) with fast indexOf bail-out, currency/shell/regex guards (R1-R6), canonicalization of \(...\), \[...\], and fenced math blocks, GFM table pipe escaping, multiline TeX comment stripping/blank-line collapse, and CJK hair-space flanking.
- Protect math ranges in HTML normalization (html.ts) and preserve source.ts fast path while skipping entity/spoiler rewrites inside math.
- Keep open display math together in streaming.ts and avoid auto-closing or flashing dangling math markers in streaming-stabilize.ts.
- Keep MD4C_FLAGS.latexMath as false until Phase 2 wires KaTeX web rendering.

* feat(app): enable web KaTeX math rendering, theme styles, copy, and find

Phase 2 of built-in LaTeX math rendering across Web and Electron:
- Lazy-load KaTeX and a .woff2-only stylesheet only when a parsed AST contains math nodes, and read the module cache synchronously on mount to eliminate double-parsing and raw-TeX flashes on virtualized rows.
- Render KaTeX with output: 'htmlAndMathml', security caps (trust: false, maxSize: 20, maxExpand: 1000, strict: 'ignore'), a bounded 256-entry LRU cache, and horizontal scroll on display blocks.
- Flip MD4C_FLAGS.latexMath = true, add light/dark math and inlineMath theme styles, exclude [role="math"] and .katex subtrees from the app-wide UI font rule, restore math copy-as-LaTeX without leaking MathML, and ignore .katex-mathml/annotation in Chat Find.

* feat(app): enable native RaTeX math, F-Droid/x86 fallback, and docs

Enable native RaTeX math in packages/app/package.json while keeping F-Droid source-only builds (PASEO_FDROID_BUILD=1) and 32-bit x86 Android devices without libratex_ffi.so working cleanly via Throwable raw-LaTeX fallback. Fixes MathInlineRenderer.kt to match Paseo's ((String, String) -> Unit)? NodeRenderer signature, adds Robolectric fallback coverage, and documents the built-in math contract.

* fix(app): pre-optimize katex in vitest browser config

packages/app/vitest.config.ts excludes react-native-enriched-markdown from optimizeDeps, so Vite's upfront scan missed the dynamic import("katex") inside it. Pre-including katex avoids mid-suite Vite re-optimization invalidating in-flight browser test imports.

* fix(app): preserve nested-list/indented code blocks and recover KaTeX CSS failures

- Share CommonMark block-line classification in block-scan.ts across math.ts and streaming-stabilize.ts so list-nested code fences, 4-space/tab indented code blocks, and line starts after prose are never skipped or rewritten, while 4-space paragraph continuations still parse inline math.
- Propagate KaTeX stylesheet loader failures in katex.ts (and compiled lib/module/web/katex.js) so failed CSS loads fall back to raw LaTeX and retry instead of caching an unstyled KaTeX instance.
- Replace internal spy/call-count assertions in math.test.ts and math.browser.test.tsx with caller-facing formula accuracy, CSS recovery, and nested/indented code regression tests.
- Document PASEO_FDROID_BUILD=1 during npm ci/install in docs/android.md.

* fix(app): exit unclosed list-nested fences when enclosing list ends

Track listMinIndent on list-nested FenceLine entries and exit findClosingFence when a non-blank line at the same quote depth drops below listMinIndent, matching CommonMark/md4c so trailing math outside the list is adapted.

* fix(app): share list-fence exit check with streaming stabilizer

Extract checkFenceContainerExit into block-scan.ts and use it in both math.ts findClosingFence and streaming-stabilize.ts stepFenceLine so unclosed list-nested fences exit consistently when a non-blank line drops below listMinIndent.

* fix(app): scope streaming list indent by quote depth and move root-font test to browser
2026-12-05 12:51:43 +07:00
Mohamed Boudra 5f8f3c3a44 Give plugin popovers a raw bounded canvas with plugin-owned scroll and spacing (#12088)
* fix(plugins): hand scroll and spacing ownership to plugin popovers

Plugin popovers previously wrapped every body in an outer scroll view with forced 12px padding, which broke fixed-header/footer layouts and prevented plugins from sharing one isomorphic layout across panels, screens, modals, and popovers.

- Remove the host scroll wrapper and forced padding/gap on PluginPopoverSurface and PluginPopoverContent while letting explicit menu pages keep scrollable behavior.
- Enforce bounded maxHeight with overflow hidden on non-scrollable desktop AnchoredSurface popovers so short popovers hug content and tall Header + ScrollView + Footer popovers cap at 440px.
- Skip MenuSheetScrollView for scrollable={false} bottom sheets while keeping BottomSheetScope, BottomSafeAreaInset, MenuSheetHeader, and animated visible-frame sizing so Android/mobile sheets hug short content, cap tall scrolling bodies at 80% height above system nav bars, and dismiss on swipe.
- Update button/E2E popover examples and plugin docs.

* fix(app): keep compact sheet content mounted when revealing a scroller

Keep MenuSheetCanvasBody's outer Animated.View, BottomSafeAreaInset, wrappers, and MenuPage mounted when hasScrollView flips false <-> true so lazily revealing a ScrollView or FlatList preserves plugin state cleanly. Track scroll measuring with a shared value to size newly revealed scrollers at maxHeight before settling.

Also replace the mocked JSDOM sheet test with real Chromium Playwright coverage of compact lazy-reveal state preservation and extract composable popover layout helpers in plugin-composer-pill-items.spec.ts.

* fix(app): hug fixed-height scrollers in compact plugin sheets

* fix(app): remeasure compact plugin sheets when scroller sizing mode changes

* fix(app): track intrinsic scroll canvas growth via wrapper height

* fix(app): retain scroller layout height across remeasurement

* fix(app): keep raw-canvas sheet height ownership on native and Android initial mount
2026-12-05 12:42:03 +07:00
Mohamed Boudra 9859997f9c polish(app): fix hover, selection, and sidebar contrast across Pure Black and Light (#12095)
* polish(app): derive surfaceHover/surfaceSelected and fix Pure Black and Light contrast

Twelve interactive surfaces on surface0 reused surface1 (only 1.06:1 in Pure Black and 1.04:1 in Light), while Pure Black surface3 (#202020) sat below borderAccent and barely stepped off active rows. Meanwhile, Light mode surface2 equals surfaceSidebar (#f4f4f5), making pressed rows, kebab hovers, and sidebar skeletons invisible on the sidebar.

Derive surfaceHover and surfaceSelected from surface0 across built-in and plugin themes (stepping Light 1.11/1.21 so active rows stay below surface3), lift Pure Black surface3/surface4 to #303030/#454545, migrate the twelve page-surface consumers, and switch sidebar pressed/skeleton/kebab states and Settings nav selection to sidebar-aware tokens.

* polish(app): address PR review feedback on session press fill and theme helpers
2026-12-05 12:22:33 +07:00
Mohamed Boudra 7526bf1260 feat(plugins): add optional minWidth to Explorer plugin panels (#12084)
* feat(plugins): add optional minWidth to Explorer plugin panels

Allows addWorkspacePanel, addAgentPanel, and addFilePanel to declare a positive finite minWidth for desktop Explorer without overwriting the user's saved Explorer width when temporarily widened. Clamps at containerWidth - 360 so the main workspace body stays usable on narrow desktop windows, and ignores minWidth on compact/mobile overlays.

* test(app): replace hook-only browser probe with unit test

* test(app): wait for ExplorerFrame layout before dragging in browser test
2026-12-05 10:29:52 +07:00
360c2b0b3c feat(plugin): add sandboxed HtmlFrame to @getpaseo/plugin/client/ui (#11943)
* refactor(app): let the file preview policy take extra origins and host head markup

* feat(plugin): sandboxed HtmlFrame on web and native, exposed next to DocumentFrame

* docs(plugins): document HtmlFrame and how it inherits CSP

* fix(html-frame): harden navigation token, native sizing, auto-height, and event contracts

* fix(html-frame): follow CSS transitions/animations without 100vh growth loops

* fix(html-frame): freeze-probe 100vh loops and observe body child transitions

* fix(html-frame): settle exact height on transitionend and animationend

* fix(html-frame): only settle transitions/animations that change target and document height

---------

Co-authored-by: Brandon Elliott <923787+Brandon168@users.noreply.github.com>
Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-05 09:54:42 +07:00
c7fdc1d3ba fix(app): keep the sidebar project filter inside the window (#11386)
* fix(app): keep the sidebar project filter inside the window

The display preferences popover renders the host, project, and label
pages from data that grows with a host. The wide presentation had no
scroll container, so with more projects than fit the window every row
past the bottom edge was unreachable (#9182). The compact sheet path
already scrolled.

Enable the menu engine's scrolling surface for this menu. It caps the
surface at the window height and gives each page a scroll viewport.

Add a component regression test and an e2e test that seed more projects
than fit the viewport.

* test(app): drop the fixed-path screenshot from the e2e

The assertions already prove the flyout scrolls, and a screenshot at an
absolute /tmp path does not belong in the test. The before/after images
live on the PR instead.

* fix(app): re-anchor scrolling menu surfaces on window resize

The height cap and surface position read Dimensions.get once, so a flyout
opened before a resize kept the old window height and hung past the new
bottom edge. Use useWindowDimensions and include it in the measurement and
placement effects.

The component test now waits for the menu's initial focus before touching
the scroll position, and shrinks the viewport to prove the surface follows.

* test(app): keep browser mechanics in helpers for the project filter e2e

The test body now reads as the user's scenario: the flyout stays in the
window, the last row is below it, the wheel reaches the row. Wheel retries,
layout measurements, and the scroll-container lookup live in helpers.

* test(app): replace mocked menu test and tighten project filter e2e

Remove the mocked display-preferences browser test and move scrollable surface resize coverage into menu-overlay.browser.test.tsx without mocks. Seed the 36 E2E projects in parallel, reuse shared sidebar helpers, and assert resize re-anchoring in the real app.

---------

Co-authored-by: jrd <jrd.dwj@gmail.com>
Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-05 09:53:26 +07:00
Mohamed Boudra 279a152c20 Keep Desktop image attachments alive across windows, tab switches, and queued sends (#12082)
* fix(desktop,app): track attachment ownership across windows and in-flight sends

Desktop previously treated each renderer's garbage-collection report as the complete reference set for the shared desktop-attachments directory. Opening or mutating a draft in a second window therefore deleted another window's unsent drafts, sent-message copies, and cached previews with ENOENT. In addition, clearing a composer draft before queueing or uploading a message allowed microtask GC to remove local image files before they were read or restored on failure.

Move shared-directory reference ownership to the Electron main process (tracking per-window reported IDs, in-flight/recent reads and writes, reloads, and window teardown), converge persisted drafts across windows via storage events, and retain local attachments across composer submission, rollback, upload/encoding, and file preview URL resolution.

* fix(desktop,app): harden queued GC read tracking and cross-window draft sync

Track a per-window monotonic touch sequence in DesktopAttachmentManager so a queued GC sweep only clears reads/writes that occurred before it was queued, skip setState when a peer storage update produces no state change, publish text replacement requests for drafts changed by another window, and emit abandoned tombstones when clearing deleted or orphaned drafts.

* fix(app): flush staged draft typing before merging peer storage updates

Flush pending AfterPaintPublication staged keystrokes for keys present in an incoming storage event before comparing timestamps in applyPersistedDraftStorageUpdate so delayed peer updates cannot overwrite in-progress typing.
2026-12-05 09:46:28 +07:00
Mohamed Boudra 7e4617279b fix(plugins): keep plugin panels, screens, and file panels above the system navigation bar (#12079)
* fix(plugins): apply bottom safe-area inset on plugin host surfaces

Outer workspace, explorer, file, and surface containers omit bottom padding so built-in panels can read useSafeAreaInsets().bottom directly. Plugin panels, screens, and file panels did not apply that inset, causing bottom-pinned controls to sit behind Android's system navigation bar.

Extract BottomSafeAreaInset (shared with SheetBottomInset) to pad insets.bottom at the plugin host boundary and provide SafeAreaInsetsContext with bottom=0 to descendants so SheetPane and embedded AgentChat never double-pad.

* test(plugins): verify plugin bottom safe-area layout in browser tests

Replace JSDOM component tests with real Chromium browser tests (*.browser.test.tsx) that assert getBoundingClientRect() bottom clearance, computed paddingBottom, and zeroed SafeAreaInsetsContext.bottom without mocks.

* test(plugins): remove leftover JSDOM bottom safe-area test files
2026-12-05 09:28:39 +07:00
2c8afcf4bd Check the TIFF signature before attaching pasted text on iOS (#11232)
* Check the TIFF signature before attaching pasted text on iOS

* fix(ios): validate full magic-byte headers in paste mime fallback

Extend the NSData+MimeType patch on @mattermost/react-native-paste-input beyond TIFF so GIF, PNG, and JPEG also verify their full signatures with self.length guards before reading bytes.

- GIF: require GIF87a or GIF89a so text starting with 'G' (such as "Good morning" or "Git status") is not attached as .gif
- PNG: require the 8-byte PNG signature
- JPEG: require FF D8 FF so a UTF-16 LE BOM (FF FE) is not attached as .jpg
- TIFF/BigTIFF: preserve suniceman's II*/MM* and II+/MM+ checks

Add macOS clang test coverage in scripts/postinstall-patches.test.mjs for plain text prefixes, UTF-16 LE BOM, truncated headers, and valid signatures across all four image formats.

---------

Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-05 09:23:02 +07:00
Mohamed Boudra 7924d86621 feat(plugins): add author-defined params and identity to workspace and agent panels (#12026)
* feat(plugins): add author-defined params and identity to workspace and agent panels

Lets plugin panels declare an optional Zod params schema and identity(params) coalescing function while preserving tab.state across in-place params updates and revision bumps.

* fix(plugins): validate restored panel params against current schema

* fix(plugins): isolate launcher panel errors and tighten test selectors

* fix(plugins): evaluate panel param transforms once and preserve surface errors

* fix(plugins): cache parsed panel params per contribution and target

* chore(plugins): remove unused EMPTY_WORKSPACE_PARAMS after rebase

* fix(plugins): store idempotent parsed panel params to keep generated defaults aligned with identity
2026-12-04 21:40:47 +07:00
Mohamed Boudra 3484943a7e feat(plugin): add setTitle to PluginTab (#12020)
* feat(plugin): add setTitle to PluginTab

Allow mounted workspace, agent, and file panels to override their tab title at runtime via tab.setTitle(title) and reset back to the static descriptor title on null, empty/whitespace, unmount, reload, or unavailability.

* fix(app): preserve mount-effect tab title and modified state

* fix(app): reset file panel attributes on reload and render error

* test(app): add composerPillItems to navigation test plugin fixture
2026-12-04 20:57:22 +07:00
Mohamed Boudra 55bba06161 feat(plugins): expose openScreen on panel and screen props (#12021)
* feat(plugins): expose openScreen on panel and screen props

Adds top-level openScreen({ screenId, params? }) to PluginPanelProps (covering workspace, agent, and file panels) and PluginScreenProps, matching sidebar items and popovers. Built-in file panels share BuiltinFilePanelProps without plugin-owned navigation capabilities.

* docs(plugins): document app version guidance for panel/screen openScreen

* refactor(plugins): use object params in screen navigation and ports in unit tests
2026-12-04 20:27:18 +07:00
Mohamed Boudra 4863e7e761 feat(plugins): add declarative addComposerPillItem, ComposerPill, and fix button store updates (#12019)
* feat(plugins): add addComposerPillItem, ComposerPill, and fix button store updates

* fix(plugins): encode submenu page IDs and anchor fallback composer popovers

* docs(plugins): add addComposerPillItem to migration guide and dedupe buttonPageId test
2026-12-04 20:26:12 +07:00
Mohamed Boudra ad9073dc8a test(e2e): hold all running agent updates until release in consecutive turns spec (#12034)
Since PR #12011 moved lastUserMessageAt updates and emitState(agent) to the SQLite user_message commit callback, submitting a follow-up prompt emits a second agent_update(status: running) after the initial running snapshot.

holdNextAgentUpdate() cleared its pending hold after the first match, letting that second running snapshot reach the browser before turn_started or send_agent_message_response were released and causing turn-working-elapsed to mount early.

Add holdAgentUpdates/releaseHeldAgentUpdates to hold every matching agent_update until explicitly released in arrival order, preserving all release-order assertions in agent-consecutive-turns.spec.ts.
2026-12-04 20:26:06 +07:00
paseo-bot[bot]andClaude Opus 5.5 35f0ff6ff1 Stop the relay E2E from losing its port to a parallel test (#12017)
* test(relay): let wrangler pick the relay port in the relay E2E

The relay E2E reserved a free port, closed it, then started wrangler on it.
Test files run three at a time, and another file could bind the port in
between: workerd failed with "Address already in use" and the test failed
with "Local relay did not stop". Wrangler now binds port 0 itself and the
test reads the port from its "Ready on" line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(relay): read the relay port from a complete line, keep startup errors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 12:00:40 +00:00
paseo-bot[bot] b31565fbf7 fix(terminal): paste once on Linux middle-click (#12025)
Mouse tracking sends the click to the terminal application, while Chromium also pastes the primary selection on release. Suppress the native paste when the application owns the press, and leave the terminal paste available for the shell or forced selection.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 10:43:42 +00:00
paseo-bot[bot] 8302319f54 Keep old replies out of finish notifications (#12014)
* fix(server): keep old replies out of finish notifications

A tool-only turn can finish without producing a reply. Scope the preview to the completed turn so the notification uses the existing generic body when that turn has no reply.

* fix(server): keep background finish previews through runtime refresh

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 10:43:19 +00:00
babo-jeongukandClaude Opus 5.5 8b0c22ca31 fix(server): persist the last user message time once a submitted prompt is recorded (#12011)
Since the timeline moved to async SQLite commits, a prompt submitted through
Paseo set lastUserMessageAt in the commit callback without emitting state.
The stored record and the live agent_state kept the previous prompt's time
until the next state change, and a daemon crash in that window left the
record stale after restart.

Set lastUserMessageAt and emit state at the timeline commit point for every
user_message, and drop the two caller-side copies of that rule.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 10:42:59 +00:00
TheCouchCommanderandCodex 26175ed408 Coalesce Gitea and Forgejo PR status polling and honor rate limits (#12004)
* Coalesce Gitea PR status polling and honor rate limits

* Honor Forgejo proxy backoff and share Actions task reads

---------

Co-authored-by: Codex <codex@localhost>
2026-12-04 09:13:03 +00:00
paseo-bot[bot] 41e21d8d5f fix(desktop): keep the workspace aligned when editing chat drafts (#11983)
Anchor the top resize strip to the titlebar edge so titlebar padding cannot create horizontal overflow. Cover Page Down in the packaged desktop smoke test.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 08:42:53 +00:00
paseo-bot[bot] 5700dc3ea1 Keep Android image previews sharp when zooming (#11989)
* fix(app): keep Android image previews sharp when zooming

Android decodes the image to the fitted layout size by default. A pinch scales that bitmap, so details lost during decoding cannot come back. Preserve the source resolution in the zoomable image viewer.

* Keep Android zoom detail within the native bitmap limit

* Remove the obsolete Git object in the plugin update test

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 08:13:02 +00:00
Mohamed Boudra aabb5764d3 ci(website): isolate website tests from typecheck and clean up E2E specs (#11992)
* ci(website): isolate website tests from typecheck and clean up E2E specs

Website Playwright runs were bundled into the required typecheck job, so WebKit downloads and website timing failures blocked unrelated PRs. Moving website unit and E2E runs into a dedicated website-tests job keeps typecheck focused on build and type verification.

Also remove layout/geometry assertions and fake-clock mockup animation tests from packages/website/e2e, keeping interactive user journeys and placement-specific checks, and align Playwright CI workers and retries with the app and desktop suites.

* ci(website): include README sponsor tables in website path filter
2026-12-04 15:12:47 +07:00
Mohamed Boudra 4fe15a6918 fix(plugins): keep Git plugin revision lookup local in blobless clones (#11999)
Switching Git plugin clones to --filter=blob:none registered a promisor remote in the cloned repository, causing rev-parse to lazily fetch unadvertised or amended-away commits from origin (without GIT_ENV or credential rewrites) instead of failing revision verification. Set GIT_NO_LAZY_FETCH=1 on revParse so revision lookups stay strictly against the cloned refs and commit graph while checkout continues fetching blobs on demand. Also route managed-source.ts changes through the browser CI path filter.
2026-12-04 14:35:36 +07:00
Mohamed Boudra 32a5dd8bad test(e2e): approve AgentChat client plugins in browser specs (#11986)
Both AgentChat browser specs (#9602) were merged without calling approveClientPluginsInUi after per-host client plugin execution approval (#11717) landed, causing all 7 tests to time out waiting for the unapproved plugin's sidebar button.
2026-12-04 13:32:30 +07:00
paseo-bot[bot] 70f374f269 fix(desktop): save the stop-on-quit migration (#11984)
Desktop applied the reset in memory on every launch until another setting was saved. Save the reset and its marker together so the settings file reflects the quit policy after the first launch.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 06:13:38 +00:00
e31ee658c2 Avoid downloading old files when installing Git plugins (#11980)
* perf(server): clone Git plugin sources without history blobs

- Use blobless clone filter when fetching Git plugin sources to improve install performance
- Add POSIX test verification for blobless git operations

Co-authored-by: RoundRedDot <roundreddot@gmail.com>

* fix(server): preserve credentials during filtered plugin checkout

Co-authored-by: RoundRedDot <roundreddot@gmail.com>

* Merge remote-tracking branch 'origin/main' into fix/plugin-blobless-auth-review

# Conflicts:
#	packages/server/src/server/plugins/managed-source.posix.test.ts

Co-authored-by: RoundRedDot <roundreddot@gmail.com>

* refactor(server): use named Git checkout arguments

Co-authored-by: RoundRedDot <roundreddot@gmail.com>

* Name the bare Git fixture explicitly

Co-authored-by: luke <luopeihuan@gmail.com>

---------

Co-authored-by: luke <luopeihuan@gmail.com>
Co-authored-by: RoundRedDot <roundreddot@gmail.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 06:12:59 +00:00
paseo-bot[bot] acde63e614 test(terminal): prove an obsolete worker's program gone by its socket, not its pid (#11967)
On Windows the inspector reports no birth times, so the hard-cut test
could only prove the program gone by its pid not answering. Windows
reuses a freed pid at once, so a busy runner could keep the pid alive
under another process for the whole 10 s wait. The program now listens
on a socket of its own, and the test waits for that socket to close.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 06:00:53 +00:00
paseo-bot[bot] 25d9ed2985 fix(app): collapse turns with plugin-rendered work (#11974)
Calculate the summary from the work each card represents so a completed turn folds when a plugin renders its tools and reasoning.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 05:12:58 +00:00
Mohamed Boudra b947c229c6 fix(usage): keep local usage when Claude or Codex carries harmless flags (#11963)
* fix(usage): keep local usage when Claude or Codex carries harmless flags

PR #11154 treated any non-empty launch.args on stock claude or codex as an isolated wrapper launch, hiding local usage cards whenever users configured extra flags such as --chrome (regression reported in #11529).

- Extract a shared isWrapperLaunch helper in @getpaseo/plugin/server/usage and replace the three duplicate copies across provider-env.ts, claude-usage-source, and codex-usage-source.
- Keep renamed wrapper binaries isolated while only isolating stock binaries when args before -- include account/settings/provider-switching flags verified against claude --help (--settings, --setting-sources, --bare) or codex --help / codex app-server --help (-c, --config, -p, --profile, --oss, --local-provider, --remote, --remote-auth-token-env, --startup-sign-out).

Closes #11529

* refactor(usage): accept named input in isWrapperLaunch and test flag parity
2026-12-04 11:36:27 +07:00
Mohamed Boudra 2e3d9b375a feat(devices): fix client identity, expose daemon-observed IP, and polish Devices rows (#11902)
* feat(devices): fix client identity, expose daemon-observed IP, and polish Devices rows

Slice 1 of device identification and IP visibility:

- Extend HelloClientInfoSchema and DaemonSessionSummarySchema with additive optional fields (appKind, osName, osVersion, deviceModel, browserName, deviceKey, remoteIp, ipSource, authMethod).
- Pass clean --paseo-device-name and --paseo-os-version from desktop main into sandboxed preload and emit rich clientInfo across Electron, Web, Android, iOS, CLI, and connected hosts.
- Call resolveAppClientIdentity() in buildClientConfig() and routed probes (with persisted clientId) so probe-adopted Electron and Web sessions no longer report as Mobile.
- Sanitize client-claimed display strings, normalize daemon-observed direct/Tailscale/local remote IPs (stripping ::ffff:, omitting local_ipc/via/relay/hub), record authMethod, and add Electron User-Agent fallback for legacy direct clients.
- Polish Devices rows to show real device names, This device/transport/IP/OS hints, Reconnecting summary, monospace IP address, and plain Full access instead of a 9-pill dump across all 9 locales.

* fix(devices): isolate routed probe scopeId, avoid global window mutation in test, and tag COMPAT shims

* chore(protocol): drop COMPAT tag from permanent HelloClientInfo fields

* fix(devices): align authMethod display labels and test with daemon password auth

* chore(devices): remove duplicate authMethod assignment and dead auth label cases

* chore(devices): include added version in legacyBrowserHostLabel COMPAT tag
2026-12-04 11:34:53 +07:00
Mohamed Boudra 9cb4726c30 fix(finish-subscriptions): exclude finish-notice-only turns and queues from pending work (#11969)
* fix(finish-subscriptions): exclude finish-notice-only turns and queues from pending work

* fix(finish-subscriptions): clean retained turn history and test patterns
2026-12-04 11:34:29 +07:00
Mohamed Boudra 1544282593 Isolate oversized ACP stdout lines to the affected chat (#11894)
* fix(acp): bound ACP stdout lines and plugin IPC payloads at 64 MiB

Share the 64 MiB ProviderLineReader and createBoundedNdJsonStream helper in @getpaseo/protocol so both the direct server ACP reader and the plugin ACP reader fail only the affected request or session on oversized stdout lines instead of buffering unbounded payloads.

Add an iterative 64 MiB byte guard in the plugin worker before process.send/structuredClone so oversized plugin events or RPC payloads cannot crash the daemon worker in v8::ValueDeserializer, and preserve inline session.runtime_failed errors during prompt submission instead of retrying them as stale sessions.

Fixes #11580

* fix(acp): walk containers lazily, count DAG references, and skip non-object stdout

Use cursor/iterator frames in exceedsIpcByteLimit so huge sparse arrays fail before copying entries, count shared DAG references before jsonTransportValue stringifies plugin events, and log/ignore non-object JSON stdout lines in createLoggedNdJsonStream instead of ending the transport.

* fix(acp): race ACP requests only on stream limit and close on read errors

Do not race connection.closed ahead of processError in ACPAgentSession.runACPRequest so early startup exits preserve their stderr diagnostic, and close the readable stream instead of erroring it when closeOnStreamLimit is enabled so @agentclientprotocol/sdk 0.17.1 does not leak unhandled AbortError rejections.

* fix(plugins): send request.failed before closing oversized session open

Deliver request.failed over IPC before calling closeFailedSession on an oversized session.opened reply so inline session.closed events cannot mask the IPC size limit error.

* refactor(acp): drop plugin IPC object walker and keep stdout bounds

Keep only the 64 MiB byte-bounded NDJSON line reader at provider stdout boundaries and revert the plugin IPC payload size walker.
2026-12-04 11:34:22 +07:00
61d2ad1585 feat(plugin): embed an agent's conversation in plugin UI with AgentChat (#9602)
* feat(plugin): render an agent's timeline in plugin surfaces with AgentTimeline

Squash of getpaseo/paseo#9602 (feat/plugin-agent-timeline at fd29216a0) onto main.

Plugins can show an agent's timeline inside their own screens, panels and modals with
`AgentTimeline` from `@getpaseo/plugin/client/ui`. It renders the agent tab's own chain, so
plugin timeline items, history paging, streaming, permissions and the loading, catch-up, error
and archived states match the tab.

Discussion: https://github.com/getpaseo/paseo/discussions/9589

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(plugin): reshape the embed into AgentChat

Rename the embed to AgentChat. Timeline stays free for a future
data-driven display component with no agent.

- API: <AgentChat agentId hostId? composer?: false | { controls?: "all" | "none", placeholder? } testID? />.
  Per-control maps and composer items are left out; both can be added
  later as optional fields.
- The composer reuses the ComposerInputMode table with a new "message"
  mode (no attachments, voice, autocomplete, controls, usage or client
  commands) instead of a parallel controls-scope context.
- Embed focus follows the workspace pane rule: the embed the user last
  pressed owns the composer keys, while its pane or screen is in front.
  This removes the focus-owner, Portal wrapper and oxlint rule.
- Pane and embed share one AgentComposer, so the embed keeps draft
  revisions and submit loading.
- Example, reference (en, zh-CN), docs and the paseo-plugin skill use
  the new name.

Co-authored-by: Tom Gringauz <17593920+tomgrin10@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(app): give each AgentChat its own composer editing session

Inside a workspace plugin panel, every embed resolved the panel's one
editing session. Fullscreen in one embed expanded all of them, and
command hints and focus restore went to whichever composer attached
last. Each embed now edits in a session of its own, keyed by agent the
way a pane's session follows its target.

Co-authored-by: Tom Gringauz <17593920+tomgrin10@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(plugin): say what AgentChat's controls "none" does with draft files

The chat edits the agent's own draft, shared with its tab. "none" removes
every way to add files; files already in the draft show, can be removed,
and are sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(app): keep pasted forge links as text in a composer without attachments

AgentChat's controls "none" composer still turned a pasted pull request
URL of the agent's repository into an attachment. Forge auto-attach now
follows the input mode, so a mode without attachments sends links as
written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(app): stub the lucide icons the agent panel imports

AgentChat's lazy import puts the agent panel in the browser test graph.
Its icons were missing from the lucide stub, so Vite's dependency scan
failed, pre-bundling was skipped, and mid-run reoptimization broke
module imports in seven browser suites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Tom Gringauz <17593920+tomgrin10@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-04 11:16:14 +07:00
Mohamed Boudra 512f21ba64 Allow native plugin addons on macOS via Plugin Helper entitlements (#11958)
* fix(desktop): scope macOS disable-library-validation to Plugin Helper

Packaged macOS builds run with Hardened Runtime enabled and no
disable-library-validation entitlement, so community plugins that load
third-party native .node addons fail under dlopen.

Scope com.apple.security.cs.disable-library-validation and
com.apple.security.cs.allow-unsigned-executable-memory exclusively to
Paseo Helper (Plugin).app via a custom electron-builder mac.sign hook
while keeping Paseo.app (which holds com.apple.security.device.audio-input)
and the generic, GPU, and Renderer helpers strictly library-validated.
Route packaged macOS ELECTRON_RUN_AS_NODE launches (desktop daemon and
bundled CLI shim) through Paseo Helper (Plugin).app so the daemon and its
forked plugin workers inherit the Plugin Helper entitlements without Dock
icon or UI lifecycle side effects.

* refactor(desktop): keep electron-builder entitlements defaults in mac-sign hook

* test(desktop): use POSIX bundle paths in macOS signing test

* test(desktop): verify macOS helper entitlements and ad-hoc dlopen in packaged smoke

* test(desktop): assert Hardened Runtime flag and handle SIP-disabled macOS CI runners

* test(desktop): require exit 0 for SIP-disabled generic Helper smoke branch
2026-12-04 11:16:08 +07:00
paseo-bot[bot] 646b65e617 fix(app): complete finished replies after reconnect (#11970)
A missed turn-end event leaves the last reply in the live transcript. When catch-up accounts for those rows and the held turn is idle, commit them to history so timeline plugins receive the completed reply.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 04:12:48 +00:00
Ryan大然andMohamed Boudra 302afe1104 Scope window no-drag regions to drag surfaces and overlays (#11830)
* Keep scrolled sidebar, Files and Changes rows from cutting the titlebar

Electron computes the window drag area from app-region boxes without
clipping them to scroll viewports. Rows scrolled out of the sidebar
workspace list, the Files tree and filter results, and the Changes diff
still sat under the titlebar as no-drag boxes, so the blank titlebar
above them stopped moving the window.

These viewports are now window content, like the chat timeline and
sidebar nav rows: they emit no app regions, and their controls keep
normal DOM hit testing.

Fixes #11680

* Scope window no-drag regions to drag surfaces and overlays

The global interactive/tabindex no-drag rule in public/index.html caused
any unexempt scrolled viewport (#11680) and any parked resident browser
webview surface (tabindex=-1 inherited into its 1280x800 webview and
shadow iframe, #11844) to emit unclipped no-drag rectangles over the
titlebar, eventually freezing window movement during normal use.

Invert the rule so controls emit -webkit-app-region: no-drag only when
they can overlap a drag surface: inside TitlebarDragRegion containers,
inline drag surfaces, overlays/modals (#overlay-root, [role=dialog],
[aria-modal=true], [data-window-overlay-host]), or explicit window-owned
chrome controls ([data-window-no-drag]). Remove the per-viewport
data-window-content opt-out markers, and move WindowChromeSafeArea and
TitlebarDragRegion into CompactHeader so narrow desktop layouts remain
draggable (#9797).

Closes #11680
Closes #11844
Closes #9797

* Move desktop titlebar drag E2E spec to packages/desktop/e2e

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-04 10:53:53 +07:00
paseo-bot[bot] b14f61ce27 test(claude): keep the event stream check focused on stale turn output (#11959)
Session totals follow the result, and a background child can update its original tool card after the launching turn ends. Keep rejecting new output under the ended turn ID.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 03:42:52 +00:00
6b808bc67b Preserve literal paths in the commit file list (#11480)
* Preserve literal paths in the commit file list

* Build literal rename path fixtures from Git trees

* Keep signed commits in machine-readable Git history

Apply the regression reported at https://github.com/getpaseo/paseo/pull/11480#issuecomment-7338842841.

Co-authored-by: jamescordrey-ops <335786770+jamescordrey-ops@users.noreply.github.com>

---------

Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Shane Su <shane.su@maiscrm.com>
Co-authored-by: jamescordrey-ops <335786770+jamescordrey-ops@users.noreply.github.com>
2026-12-04 10:08:36 +07:00
paseo-bot[bot] 624c26aa91 fix(cli): show permission questions in permit ls (#11954)
Pi sends the question as the request title. Use that title when the request lacks a description so CLI users can read the prompt before responding.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 02:12:50 +00:00
paseo-bot[bot]andBrandon Elliott 476ad7f414 Open desktop plugin links in the system browser (#11951)
* fix(desktop): open plugin links in the system browser

The main renderer relied on Electron’s default popup behavior for links opened with Linking or window.open. Use the same external opener as the plugin SDK for HTTP(S) links.

Co-authored-by: Brandon Elliott <923787+Brandon168@users.noreply.github.com>

* test(desktop): cover Electron popup exceptions

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Brandon Elliott <923787+Brandon168@users.noreply.github.com>
2026-12-04 01:12:56 +00:00
paseo-bot[bot] b1a9fe8950 test(cli): keep host provider CLIs out of the status auth daemon (#11952)
daemon status probes every provider CLI on the daemon's PATH, and the
CLI waits 1.5 s for the reply. On a loaded runner the real claude,
codex and opencode probes ran past that, so the terminal cleanup
regression got a timeout note or exit 1. Give the shared daemon an
empty PATH; the slow-provider daemon keeps testing the timeout.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-04 00:30:20 +00:00
paseo-bot[bot] fe70975e89 fix(server): preserve the non-Git checkout diff error (#11940)
The legacy checkout diff adapter treated a missing Git worktree as an unknown error. Preserve the diff engine’s code so callers can distinguish this case.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 23:43:12 +00:00
SunicemanandShane Su 4df3da2c4e Focus the web window when a notification is clicked (#11445)
Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
2026-12-03 23:42:39 +00:00
e2d6dc9f70 Keep agent background work running through plugin reloads (#11938)
* fix(server): keep background work running when a plugin changes an agent's launch

When a plugin change alters an agent's launch (env, instructions, MCP
servers or tools), the next idle prompt reopens the provider session.
needsPluginSessionReload only checked for a turn in flight, so an agent
whose turn had ended but whose background shells, monitors or provider
subagents were still running had them killed by the reopen.

The reopen now waits while the agent has provider background work or a
running provider subagent. The session stays stale, so the first idle
prompt after that work ends reopens it. Daemon-owned items such as
heartbeats outlive the session and do not hold the reopen back.

Co-authored-by: Zayooo00 <92038816+Zayooo00@users.noreply.github.com>

* fix(server): use live subagent activity when deferring plugin reload

The provider subagent store now reads persisted history asynchronously. Use the same live activity that AgentManager tracks when closing a session.

* Check provider runtime safety before plugin reopens

---------

Co-authored-by: Zayooo <mrcold135@gmail.com>
Co-authored-by: Zayooo00 <92038816+Zayooo00@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 23:12:58 +00:00
paseo-bot[bot] ea96a126af Keep GitHub Enterprise PR features available when a secondary login expires (#11937)
* fix(server): keep Enterprise PR features available with an expired secondary login

GitHub CLI auth status checks inactive logins too. Probe Enterprise hosts with the same active login as repository commands so an expired secondary login does not block the workspace.

* fix(server): check the active GitHub CLI login on github.com

* test(server): pause at the workspace PR status read

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 22:13:13 +00:00
paseo-bot[bot] f3fc583a76 Update the original row when a Codex background command finishes (#11934)
* fix(server): settle Codex background commands on their original row

A shell command can finish after its turn has ended. Keep the command’s original turn ID so its completion updates the running timeline row.

* test(server): drive background command start through Codex fake

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 22:12:50 +00:00
paseo-bot[bot]andClaude Opus 5.5 32cae04627 Wait for the plugin results route after a directory search (#11939)
The URL changes as soon as the directory submits a search, but the
results route renders only after its registry server call returns. On a
loaded CI runner that call took over 5 s, so the WebKit test failed at
the results heading. Give the directory-to-results transition the same
10 s budget the missed-input-event test already used, in one helper.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 21:18:20 +00:00
Ryan大然andpaseo-bot[bot] a73e1c6a5b End prose file links at CJK and fullwidth punctuation (#11421)
* End prose file links at CJK and fullwidth punctuation

Assistant prose treated CJK punctuation (:,。()「」、…) as path characters,
so `说明:A/B/C/D` linked the whole run and real paths next to such
punctuation, like `修改:src/index.ts,`, were not linked at all. Path
characters now exclude the same punctuation ranges that already end bare
URLs; CJK letters stay allowed, so `docs/说明.md` still links.

Refs #10994

* test(app): cover reported bare file links next to CJK punctuation

Check link targets after the Markdown parser and link recognizer run together. Cover two paths separated by an ideographic comma and preserve a line suffix on a CJK filename.

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 20:42:43 +00:00
paseo-ai[bot] 0cdaa292f0 fix: update lockfile signatures and Nix hash [skip ci] 2026-12-03 18:53:53 +00:00
Mohamed Boudra 39d37e1e16 chore(release): reconcile 0.19.1 into main (#11927) 2026-12-04 01:45:26 +07:00
paseo-bot[bot] 7eb6ea9882 Finish daemon shutdown when WebSocket peers stop responding (#11880)
* fix(server): finish daemon shutdown when WebSocket peers stop responding

A silent peer can keep the worker waiting for a WebSocket close event past its shutdown deadline. Bound the handshake for attached and pending sockets so the worker can finish cleanup.

* Run daemon shutdown regression in server integration tests

* Allow slow ACP fixture startup in coalescing test

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 18:13:34 +00:00
SunicemanandShane Su cb9dbce82d fix(acp): select effort levels alongside thinking toggles (#11444)
Co-authored-by: Shane Su <shane.su@maiscrm.com>
2026-12-03 18:12:47 +00:00
Mohamed Boudra ee21a56c7f test(app): keep queued message intact when tapping Send to steer (#11928)
* test(app): keep queued message intact when tapping Send to steer

PR #11915 changed direct steer and interrupt sends to preserve queued messages in the composer queue track instead of sweeping them into the direct prompt. Update the browser E2E step to assert that the queued row remains queued when steering with a tap.

* test(app): wait for steer acknowledgement before asserting queue preservation
2026-12-04 01:06:21 +07:00
15ea9d0f03 Allow slower relay connections in CLI commands and status probes (#11449)
* Allow slower relay connections in CLI commands and status probes

* Test slow relay connections through the CLI

* Use the longer relay budget without a new setting

---------

Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Shane Su <shane.su@maiscrm.com>
2026-12-03 16:43:17 +00:00
99b0b5e1ed Generate workspace names for image-only opening messages (#11233)
* Generate workspace names for image-only opening messages

* Name image-only workspaces created through agent.create

Schedule directory workspace naming when the opening prompt contains attachments. Cover both daemon creation requests with an inline screenshot and empty text.

Co-authored-by: jamescordrey-ops <jamescordrey-ops@users.noreply.github.com>

* Keep inline image counts inside workspace naming

---------

Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: jamescordrey-ops <jamescordrey-ops@users.noreply.github.com>
2026-12-03 16:42:49 +00:00
paseo-bot[bot] 9f3ac9aca5 fix(server): keep Claude MCP credentials out of launch arguments (#11911)
A failed or unrecognized launch version probe selected inline MCP configuration. Send MCP configuration over stdin and show an update error when the probe identifies an older Claude Code.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 23:22:33 +07:00
paseo-bot[bot]andqwertyzhu eca1149db0 fix(server): resolve unique agent ID prefixes in Paseo agent tools (#8556) (#11920)
Co-authored-by: qwertyzhu <126236314+qwertyzhu@users.noreply.github.com>
2026-12-03 15:43:24 +00:00
KiritoXD 078dcfb1ab fix(cli): preserve sibling paths in worktree listings (#11918) 2026-12-03 15:42:57 +00:00
paseo-bot[bot] 8d87e400b0 Build only the old subpath's imports in the published-entry test (#11922)
The protocol test that checks the 0.11.4 import path compiled the whole
package (97 modules) with tsc before running a consumer against it. On CI
that took 17-20 s of a 30 s limit while other test files ran in parallel,
and it timed out at 32.7 s on main. Compile only the two entries and the
41 modules they import, with the package's own tsconfig.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 15:33:00 +00:00
Mohamed Boudra ca2de1d741 fix(server): preserve queued messages on direct sends and default agent messages to steer (#11915)
* fix(server): preserve queued messages on direct sends and default agent messages to steer

* fix(server): let Send now promote with steer replace non-steering active turns

* fix(server): preserve outer providerMessageId on bundled rewind and move allowReplace into options

* fix(agent): preserve providerMessageId in provider history sync and timeline import

* fix(agent): omit empty steerOptions unless allowReplace is disabled

* fix(agent): address Neon review blockers in delivery and envelope ownership

* fix(agent): keep 10s collecting cap active for finish notices under waiting human messages
2026-12-03 22:21:59 +07:00
KiritoXDandpaseo-bot[bot] e60cd200e8 Resolve relative CLI clone destinations from the caller (#11901)
* fix(cli): resolve relative clone destinations from the caller

* Use the clone fixture Git configuration explicitly

Co-authored-by: KiritoXDone <58523182+KiritoXDone@users.noreply.github.com>

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 14:42:55 +00:00
KiritoXD 005c3c4e65 fix(cli): preserve agent paths outside the home directory (#11906) 2026-12-03 14:13:06 +00:00
Mohamed Boudra f2e5d0d982 Make hello.rejected evolvable with unified in-place refusal recovery (#11895)
* feat(protocol,app): make hello.rejected evolvable with unified HostRefusalSheet

* fix(app): parse short host label for relay pairing link refusals in AddHostModal
2026-12-03 20:31:20 +07:00
paseo-bot[bot]andClaude Opus 5.5 8ebe37558d Wait out reconnect backoff in Settings restart e2e tests (#11910)
The app reads the replacement worker only after it reconnects, and
reconnect attempts back off from 1.5 s to a 30 s cap. A worker that becomes
ready just after an attempt is seen up to 30 s later, so the 30 s wait for
the restart result failed on main run 47056309460.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 12:47:45 +00:00
Mohamed Boudra dcd10a6029 feat(auth): manage daemon passwords live from Devices UI, RPC, and CLI (#11892)
* feat(auth): manage daemon passwords live from Devices UI, RPC, and CLI

Let users set, change, and remove a daemon's password without restarting the daemon so passwordless hosts can be hardened in place and evicted remote sessions lose access immediately.

- Add DaemonPasswordStore and PasswordAttemptLimiter as the live hash authority across WebSocket handshakes, HTTP bearer endpoints, agent MCP auth, and daemon.config.reload, bounding bcrypt concurrency and pacing repeated failures.
- Add backward-compatible daemon.auth.password.set.request/.response (gated on server_info.features.daemonPasswordManagement and requiring both daemon.manage and access.manage) plus live eviction of non-local active sockets, 90-second retained external sessions, peer host links, and session-tagged network tunnels.
- Update paseo daemon set-password (with --remove) to apply live via RPC when the daemon is running and fall back to persisted config when stopped.
- Add the Access -> Password row and Set/Change/Remove sheet in Settings -> Host -> Devices, plus an inline Set password step inside the Relay pairing sheet so warning alerts and password protection stay visible without stacking modals.
- Use make-before-break reconnects in HostRuntime when updating a host password and avoid persisting plaintext daemon passwords into local-credential-only host profiles.

* fix(auth): address review findings on password rotation, trust isolation, throttling, and CLI fallback

- Track password store version across async header-auth and hello password verification so a rotation during bcrypt comparison rejects the old-password socket instead of attaching it.
- Include auth trust scope (local_credential / hub / remote) in sessionConnectionKey so remote sockets sharing a clientId can never merge into or inherit local_credential trust.
- Propagate throttled password attempts as WebSocket close 1013 ('Too many password attempts') instead of 4401 'Incorrect password'.
- In paseo daemon set-password, only fall back to offline config edits when no daemon process is running, prefer local credentials for local instances even when PASEO_PASSWORD is set in the shell, pass connected password as currentPassword on remote/password sessions, and reuse DAEMON_PASSWORD_MAX_UTF8_BYTES from @getpaseo/server/auth.

* test(cli): use valid PID lock fixture and assert DAEMON_UNREACHABLE in set-password test

* fix(auth): enforce password store version checks inside verify and setPassword
2026-12-03 19:44:59 +07:00
Mohamed Boudra 5e16d70aaa fix(desktop): scope browser automation tabs, uploads, routing, and profile partitions (#11893)
* Scope desktop browser automation tabs, uploads, routing, and profile partitions

- Key registered browser tabs, active tab tracking, and automation commands by (serverId, workspaceId) across Electron main, preload, app runtime, and server browser tools, failing closed when either is absent.
- Scope browser_upload in Electron main to verified local workspace directories using canonical realpathSync regular-file containment and reject uploads when no local uploadRoot is provided.
- Fail closed in classifyHostBrowserRouting when a host profile has no saved connections and no active connection.
- Release removed profile partitions from BrowserProxyManager in paseo:browser:remove-profile so deleted partitions cannot re-attach or hold stale proxy bindings.

* Capture profile release generation before route setup and make race test deterministic
2026-12-03 19:44:22 +07:00
paseo-bot[bot]andClaude Opus 5.5 b89eae1eff Fix red main cli-tests after #11376 and run them on plugin changes (#11882)
* Crash the sigint-supervisor test provider during a turn

#11376 closes an idle resumable ACP session cleanly when its process
exits, so the test's idle crash no longer raises error attention and
main's cli-tests fail. Exit the provider while its turn is open, the
case that still reports an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Run cli-tests when the plugin runtime changes

The CLI E2E suite drives ACP providers through packages/plugin, but the
cli path filter skipped it for plugin-only changes, so #11376 merged
without the test it broke.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Wait for the crashing provider to log its prompt before killing it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 12:00:56 +00:00
Mohamed Boudra 32496c489e Enforce caller lineage, mode ceilings, and reserved labels on agent MCP tools (#11862)
* Enforce caller lineage, mode ceilings, and reserved labels on agent MCP tools

* Reshape agent caller policy around lineage, ceiling, and label primitives

* Honor inherited same-provider options and require caller policy dependencies
2026-12-03 17:54:37 +07:00
KiritoXD da51ac3d64 fix(cli): resolve local worktree creation paths from the caller (#11870) 2026-12-03 10:42:58 +00:00
KiritoXD 0ec89b5623 fix(cli): resolve script workspaces across all directory matches (#11873) 2026-12-03 10:12:56 +00:00
paseo-bot[bot]andClaude Opus 5.5 12d28ddbc8 Keep the running ring and tool-call shimmer on the same frames (#11863)
* Keep the ring and the shimmer on the same frames at every frame time

The status ring and the tool-call shimmer step on one 30 Hz grid counted
from the document timeline's origin. Each loop computes a step boundary
from its own duration. Every third boundary is a whole millisecond, and
a frame stamped exactly on one can round to before it for the ring and
after it for the shimmer. The two then turn over on consecutive frames,
and the window draws an extra frame. Start the grid 2.5 µs in, so no
boundary falls on a frame stamp.

The idle-chat running-indicators test read the animating elements right
after the chat opened, while the composer's 200 ms border-color
transition could still run. Wait for the page to settle first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Require a turnover from each loop at every boundary in the grid test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 09:00:34 +00:00
Mohamed Boudra f621e31f3e docs(changelog): place Security and Plugins before Fixed in 0.19.0 (#11877) 2026-12-03 15:48:17 +07:00
paseo-bot[bot] c9ba30194c Notify parent agents when a queued Claude steer finishes (#11872)
* fix(server): notify parents after queued Claude steers finish

Claude can run a queued steer as its own turn. Keep the finish subscription active while that steer is pending in the live query.

* test(server): release Claude Stop hook after the steer queues

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 08:43:05 +00:00
Geo Qiao fa185cb063 fix(acp): close idle resumable plugin sessions cleanly (#11376)
Report an unexpected idle exit as a clean session close after a persistent
session is ready and its ACP peer advertises session/load. This lets the
host reopen on the next prompt without adding a failed turn to the timeline.

Keep runtime errors for interrupted work and sessions that cannot reopen.
Track retirement cleanup and retain errors from the existing cancel path.
2026-12-03 08:12:57 +00:00
paseo-ai[bot] 723df269d2 fix: update lockfile signatures and Nix hash [skip ci] 2026-12-03 08:04:59 +00:00
Mohamed Boudra f86c58b42b chore(release): reconcile v0.19.0 (#11868) 2026-12-03 14:55:32 +07:00
paseo-bot[bot] 1cfadda498 fix(server): keep Codex Auto-review after a startup probe timeout (#11865)
A transient version timeout published a ready catalog without Auto-review. Retry once before deciding whether the installed version supports the mode.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 07:43:10 +00:00
paseo-bot[bot]andXu Kang 776210b72b fix(server): publish closed agent renames to subscribers (#11856)
A rename saved after the provider runtime closed left subscribed clients displaying stale metadata. Publish the saved record through the existing stored agent state event.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Xu Kang <80628347+xilinshancun@users.noreply.github.com>
2026-12-03 07:14:22 +00:00
SunicemanandShane Su 80bcbdc931 Toggle the direct host SSL checkbox with Space (#11477)
Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
2026-12-03 07:13:14 +00:00
1652 changed files with 129337 additions and 19102 deletions
+2
View File
@@ -0,0 +1,2 @@
packages/app/gpui/package-lock.json linguist-generated
packages/app/gpui/desktop/Cargo.lock linguist-generated
+20 -2
View File
@@ -62,6 +62,13 @@ sdk:
- "packages/protocol/**"
- "packages/workflows/**"
nix_hash:
- "package-lock.json"
- "nix/**"
- "flake.lock"
- "scripts/fix-lockfile.mjs"
- "scripts/update-nix.sh"
browser:
- "packages/server/src/server/agent/provider-snapshot-manager.ts"
- "packages/server/src/server/session/provider/provider-catalog-session.ts"
@@ -72,7 +79,7 @@ browser:
- "packages/server/src/server/agent/providers/codex-app-server-agent.ts"
- "packages/server/src/server/agent/providers/claude/agent.ts"
- "packages/server/src/server/agent/plugin-provider.ts"
- "packages/server/src/server/plugins/{index,plugin-process,plugin-process-protocol,runtime}.ts"
- "packages/server/src/server/plugins/{index,managed-source,plugin-process,plugin-process-protocol,runtime}.ts"
- "packages/server/src/executable-resolution/**"
- "packages/plugin/src/server/provider.ts"
- "packages/app/src/!(desktop)/**"
@@ -88,9 +95,20 @@ browser:
relay:
- "packages/relay/**"
website:
- "packages/website/**"
- "packages/protocol/**"
- "public-docs/**"
- "CHANGELOG.md"
- "CHANGELOG.zh-CN.md"
- "README*.md"
- "assets/brand/**"
- "packages/app/assets/images/editor-apps/finder.png"
# cli-tests is also a daemon end-to-end suite: it drives a real daemon, built-in
# plugins included, so daemon changes run it too.
# plugins and the plugin runtime included, so their changes run it too.
cli:
- "packages/cli/**"
- "packages/server/**"
- "packages/plugin/**"
- "plugins/**"
+14
View File
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
cooldown:
default-days: 7
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
cooldown:
default-days: 7
+24 -5
View File
@@ -25,7 +25,7 @@ jobs:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
sparse-checkout: scripts
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref }}
@@ -67,10 +67,12 @@ jobs:
permissions:
contents: write
packages: read
id-token: write
attestations: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref }}
@@ -79,8 +81,16 @@ jobs:
shell: bash
run: node scripts/emit-release-env.mjs --source-tag "$SOURCE_TAG" >> "$GITHUB_ENV"
- name: Verify attestation source
shell: bash
run: |
if [[ "$(git rev-parse HEAD)" != "$GITHUB_SHA" ]]; then
echo "::error::Run this workflow from the release tag so provenance names the checked-out commit."
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -93,7 +103,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Expo and EAS
uses: expo/expo-github-action@v8
uses: expo/expo-github-action@c7b66a9c327a43a8fa7c0158e7f30d6040d2481e # v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
@@ -142,9 +152,18 @@ jobs:
echo "asset_name=$asset_name" >> "$GITHUB_OUTPUT"
echo "asset_path=$asset_path" >> "$GITHUB_OUTPUT"
- name: Attest Android APK
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3
with:
subject-path: ${{ steps.artifact.outputs.asset_path }}
- name: Generate Android checksum
working-directory: ${{ runner.temp }}
run: sha256sum "${{ steps.artifact.outputs.asset_name }}" > SHA256SUMS-android.txt
- name: Upload APK to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
release_lookup="$(node scripts/github-release.mjs --repo "${{ github.repository }}" --tag "$RELEASE_TAG")"
gh release upload "$release_lookup" "${{ steps.artifact.outputs.asset_path }}" --clobber --repo "${{ github.repository }}"
gh release upload "$release_lookup" "${{ steps.artifact.outputs.asset_path }}" "${{ runner.temp }}/SHA256SUMS-android.txt" --clobber --repo "${{ github.repository }}"
+80 -37
View File
@@ -24,6 +24,9 @@ env:
NPM_CONFIG_AUDIT: "false"
NPM_CONFIG_FUND: "false"
permissions:
contents: read
jobs:
changes:
name: changes
@@ -43,12 +46,14 @@ jobs:
browser: ${{ steps.filter.outputs.browser }}
relay: ${{ steps.filter.outputs.relay }}
cli: ${{ steps.filter.outputs.cli }}
website: ${{ steps.filter.outputs.website }}
nix_hash: ${{ steps.filter.outputs.nix_hash }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 0
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
@@ -59,17 +64,17 @@ jobs:
filters: .github/ci-paths.yml
- name: Validate CI contracts
run: node --test scripts/ci-workflow.test.mjs scripts/daemon-launch-contract.test.mjs scripts/changelog-utils.test.mjs scripts/release-version-utils.test.mjs scripts/publish-release-packages.test.mjs scripts/push-current-release-tag.test.mjs scripts/reconcile-release.test.mjs scripts/sync-fdroid-changelogs.test.mjs scripts/sync-release-notes-from-changelog.test.mjs scripts/upload-release-assets.test.mjs scripts/precompress-assets.test.mjs
run: node --test packages/react-native-enriched-markdown/vendor-grammars.test.mjs scripts/ci-workflow.test.mjs scripts/daemon-launch-contract.test.mjs scripts/changelog-utils.test.mjs scripts/release-version-utils.test.mjs scripts/publish-release-packages.test.mjs scripts/push-current-release-tag.test.mjs scripts/reconcile-release.test.mjs scripts/sync-fdroid-changelogs.test.mjs scripts/sync-release-notes-from-changelog.test.mjs scripts/upload-release-assets.test.mjs scripts/release-checksums.test.mjs scripts/precompress-assets.test.mjs scripts/check-web-export-size.test.mjs
quality:
name: quality
needs: changes
if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.format != 'false' || needs.changes.outputs.quality != 'false' || needs.changes.outputs.relay != 'false' || needs.changes.outputs.sdk != 'false') }}
if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.format != 'false' || needs.changes.outputs.quality != 'false' || needs.changes.outputs.relay != 'false' || needs.changes.outputs.sdk != 'false' || needs.changes.outputs.nix_hash != 'false') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -86,7 +91,7 @@ jobs:
- name: Lint lockfile
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.quality != 'false') }}
run: npx --yes lockfile-lint --path package-lock.json --type npm --allowed-hosts npm --validate-https --validate-integrity
run: npm exec --no -- lockfile-lint --path package-lock.json --type npm --allowed-hosts npm --validate-https --validate-integrity
- name: Lint
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.quality != 'false') }}
@@ -140,6 +145,16 @@ jobs:
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.sdk != 'false') }}
run: npm run typecheck:examples --workspace=@getpaseo/client
- name: Install Nix
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.nix_hash != 'false') }}
uses: cachix/install-nix-action@3dc140bfc76c49fbd4dd958429132e3746bcb086 # v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Verify Nix npm-deps hash
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.nix_hash != 'false') }}
run: ./scripts/update-nix.sh --check
# Plugin process launches and launch wraps quote for cmd.exe, which only real Windows checks.
sdk-tests-windows:
name: sdk-tests (windows-latest)
@@ -147,9 +162,9 @@ jobs:
if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.sdk != 'false') }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -163,16 +178,15 @@ jobs:
- name: Run plugin SDK tests
run: npm run test --workspace=@getpaseo/plugin
# The locked Playwright installers do not support ubuntu-latest's Ubuntu 26.04.
typecheck:
name: typecheck
needs: changes
if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.quality != 'false') }}
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -195,6 +209,32 @@ jobs:
- name: Typecheck all packages
run: npm run typecheck
- name: Verify public package contents
run: |
npm pack --dry-run --ignore-scripts --workspace=@getpaseo/protocol
npm pack --dry-run --ignore-scripts --workspace=@getpaseo/client
npm pack --dry-run --ignore-scripts --workspace=@getpaseo/server
# The locked Playwright installers do not support ubuntu-latest's Ubuntu 26.04.
website-tests:
name: website-tests
needs: changes
if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.website != 'false') }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
- name: Install dependencies
run: node scripts/npm-retry.mjs ci
- name: Build protocol
run: npm run build:protocol
- name: Run website tests
run: npx vitest run packages/website/src --bail=1
@@ -202,7 +242,7 @@ jobs:
# sometimes serves them at under 100 kB/s, which turns a 1-minute step into 25 minutes.
# Keep the downloaded .deb files in the Actions cache so apt installs them without the mirror.
- name: Restore website browser system packages
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/website-browser-debs
key: website-browser-debs-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
@@ -222,24 +262,20 @@ jobs:
cp "${archive_debs[@]}" ~/website-browser-debs/
fi
- name: Verify website mockups
- name: Run website E2E tests
run: npm run test:e2e --workspace=@getpaseo/website
- name: Upload website test artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: failure()
with:
name: website-playwright-results
path: packages/website/test-results/
path: |
packages/website/test-results/
packages/website/playwright-report/
if-no-files-found: ignore
retention-days: 7
- name: Verify public package contents
run: |
npm pack --dry-run --ignore-scripts --workspace=@getpaseo/protocol
npm pack --dry-run --ignore-scripts --workspace=@getpaseo/client
npm pack --dry-run --ignore-scripts --workspace=@getpaseo/server
server-tests-ubuntu:
name: server-tests (ubuntu-latest)
needs: changes
@@ -252,12 +288,12 @@ jobs:
node -e "const os = require('node:os'); console.log(JSON.stringify({cpus: os.cpus().length, model: os.cpus()[0].model, ramGiB: os.totalmem() / 2 ** 30}))"
- &server_checkout
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- &server_node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -346,9 +382,9 @@ jobs:
if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.server != 'false') }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -396,9 +432,9 @@ jobs:
permissions:
contents: read
steps: &desktop_test_steps
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -431,7 +467,7 @@ jobs:
PASEO_DESKTOP_LIFECYCLE_ARTIFACT_DIR: ${{ runner.temp }}/desktop-lifecycle
- name: Upload desktop lifecycle screenshots
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: ${{ !cancelled() && runner.os == 'Linux' }}
with:
name: desktop-lifecycle
@@ -454,7 +490,7 @@ jobs:
PASEO_DESKTOP_BROWSER_E2E_ARTIFACT_DIR: ${{ runner.temp }}/desktop-browser-e2e
- name: Upload desktop browser diagnostics
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: ${{ failure() && runner.os == 'Linux' }}
with:
name: desktop-browser-e2e
@@ -478,9 +514,9 @@ jobs:
if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.app != 'false') }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -498,6 +534,13 @@ jobs:
- name: Run app unit tests
run: npm run test --workspace=@getpaseo/app
# Cloudflare Pages rejects files over 25 MiB; fail here, not at release-tag deploy.
- name: Export web app and check file sizes
working-directory: packages/app
run: |
npx expo export --platform web
npm run check:web-size
playwright-1:
name: playwright (shard 1/8)
needs: changes
@@ -511,9 +554,9 @@ jobs:
run: |
node -e "const os = require('node:os'); console.log(JSON.stringify({cpus: os.cpus().length, model: os.cpus()[0].model, ramGiB: os.totalmem() / 2 ** 30}))"
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -545,7 +588,7 @@ jobs:
PWTEST_SHARD_WEIGHTS: "90:114:100:104:108:112:112:90"
- name: Upload test artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: failure()
with:
name: playwright-results-${{ env.PLAYWRIGHT_ARTIFACT }}
@@ -636,9 +679,9 @@ jobs:
PASEO_CLI_TEST_SHARD: "1"
PASEO_CLI_TEST_SHARD_TOTAL: "3"
steps: &cli_test_steps
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
+2 -2
View File
@@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
+2 -2
View File
@@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
+2 -2
View File
@@ -22,9 +22,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
+115 -21
View File
@@ -61,7 +61,7 @@ jobs:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
sparse-checkout: scripts
ref: ${{ env.CHECKOUT_REF }}
@@ -110,10 +110,12 @@ jobs:
permissions:
contents: write
packages: read
id-token: write
attestations: write
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
ref: ${{ env.CHECKOUT_REF }}
@@ -122,8 +124,17 @@ jobs:
shell: bash
run: node scripts/emit-release-env.mjs --source-tag "$SOURCE_TAG" >> "$GITHUB_ENV"
- name: Verify attestation source
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
shell: bash
run: |
if [[ "$(git rev-parse HEAD)" != "$GITHUB_SHA" || "$(git rev-parse "refs/tags/${SOURCE_TAG#refs/tags/}^{commit}")" != "$GITHUB_SHA" ]]; then
echo "::error::Run this workflow from the checked-out release ref so provenance names the built commit."
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -183,13 +194,17 @@ jobs:
- name: Upload packaged smoke diagnostics
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: desktop-smoke-macos-${{ matrix.electron_arch }}
path: ${{ runner.temp }}/desktop-smoke
if-no-files-found: ignore
retention-days: 7
- name: Generate desktop checksums
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
run: node scripts/release-checksums.mjs "${{ env.DESKTOP_PACKAGE_PATH }}/release" "SHA256SUMS-desktop-macos-${{ matrix.electron_arch }}.txt"
- name: Upload desktop artifacts to release
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
env:
@@ -201,9 +216,22 @@ jobs:
release_lookup="$(node scripts/github-release.mjs --repo "${{ github.repository }}" --tag "$RELEASE_TAG")"
node scripts/upload-release-assets.mjs "$release_lookup" "$release_dir" "${{ github.repository }}"
- name: Attest desktop binaries
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3
with:
subject-path: |
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.dmg
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.zip
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.exe
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.AppImage
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.deb
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.rpm
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.tar.gz
- name: Upload desktop artifacts to workflow
if: env.SHOULD_PUBLISH != 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: desktop-macos-${{ matrix.electron_arch }}
path: ${{ env.DESKTOP_PACKAGE_PATH }}/release/*.dmg
@@ -211,7 +239,7 @@ jobs:
- name: Upload manifest artifact
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: mac-manifest-${{ matrix.electron_arch }}
path: ${{ env.DESKTOP_PACKAGE_PATH }}/release/${{ env.RELEASE_CHANNEL }}-mac.yml
@@ -223,10 +251,12 @@ jobs:
permissions:
contents: write
packages: read
id-token: write
attestations: write
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
ref: ${{ env.CHECKOUT_REF }}
@@ -235,8 +265,17 @@ jobs:
shell: bash
run: node scripts/emit-release-env.mjs --source-tag "$SOURCE_TAG" >> "$GITHUB_ENV"
- name: Verify attestation source
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
shell: bash
run: |
if [[ "$(git rev-parse HEAD)" != "$GITHUB_SHA" || "$(git rev-parse "refs/tags/${SOURCE_TAG#refs/tags/}^{commit}")" != "$GITHUB_SHA" ]]; then
echo "::error::Run this workflow from the checked-out release ref so provenance names the built commit."
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -284,13 +323,17 @@ jobs:
- name: Upload packaged smoke diagnostics
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: desktop-smoke-linux-x64
path: ${{ runner.temp }}/desktop-smoke
if-no-files-found: ignore
retention-days: 7
- name: Generate desktop checksums
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
run: node scripts/release-checksums.mjs "${{ env.DESKTOP_PACKAGE_PATH }}/release" "SHA256SUMS-desktop-linux.txt"
- name: Upload desktop artifacts to release
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
env:
@@ -302,9 +345,22 @@ jobs:
release_lookup="$(node scripts/github-release.mjs --repo "${{ github.repository }}" --tag "$RELEASE_TAG")"
node scripts/upload-release-assets.mjs "$release_lookup" "$release_dir" "${{ github.repository }}"
- name: Attest desktop binaries
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3
with:
subject-path: |
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.dmg
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.zip
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.exe
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.AppImage
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.deb
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.rpm
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.tar.gz
- name: Upload desktop artifacts to workflow
if: env.SHOULD_PUBLISH != 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: desktop-linux
path: ${{ env.DESKTOP_PACKAGE_PATH }}/release/*
@@ -312,7 +368,7 @@ jobs:
- name: Upload manifest artifact
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: linux-manifest
path: ${{ env.DESKTOP_PACKAGE_PATH }}/release/${{ env.RELEASE_CHANNEL }}-linux.yml
@@ -324,10 +380,12 @@ jobs:
permissions:
contents: write
packages: read
id-token: write
attestations: write
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
ref: ${{ env.CHECKOUT_REF }}
@@ -336,8 +394,17 @@ jobs:
shell: bash
run: node scripts/emit-release-env.mjs --source-tag "$SOURCE_TAG" >> "$GITHUB_ENV"
- name: Verify attestation source
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
shell: bash
run: |
if [[ "$(git rev-parse HEAD)" != "$GITHUB_SHA" || "$(git rev-parse "refs/tags/${SOURCE_TAG#refs/tags/}^{commit}")" != "$GITHUB_SHA" ]]; then
echo "::error::Run this workflow from the checked-out release ref so provenance names the built commit."
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -382,13 +449,17 @@ jobs:
- name: Upload packaged smoke diagnostics
if: failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: desktop-smoke-windows-x64
path: ${{ runner.temp }}/desktop-smoke
if-no-files-found: ignore
retention-days: 7
- name: Generate desktop checksums
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
run: node scripts/release-checksums.mjs "${{ env.DESKTOP_PACKAGE_PATH }}/release" "SHA256SUMS-desktop-windows.txt"
- name: Upload desktop artifacts to release
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
env:
@@ -400,9 +471,22 @@ jobs:
release_lookup="$(node scripts/github-release.mjs --repo "${{ github.repository }}" --tag "$RELEASE_TAG")"
node scripts/upload-release-assets.mjs "$release_lookup" "$release_dir" "${{ github.repository }}"
- name: Attest desktop binaries
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3
with:
subject-path: |
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.dmg
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.zip
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.exe
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.AppImage
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.deb
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.rpm
${{ env.DESKTOP_PACKAGE_PATH }}/release/*.tar.gz
- name: Upload desktop artifacts to workflow
if: env.SHOULD_PUBLISH != 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: desktop-windows
path: ${{ env.DESKTOP_PACKAGE_PATH }}/release/*
@@ -410,7 +494,7 @@ jobs:
- name: Upload manifest artifact
if: env.SHOULD_PUBLISH == 'true' && env.IS_SMOKE_TAG != 'true'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: windows-manifest
path: ${{ env.DESKTOP_PACKAGE_PATH }}/release/${{ env.RELEASE_CHANNEL }}.yml
@@ -427,20 +511,30 @@ jobs:
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
sparse-checkout: |
package.json
package-lock.json
scripts
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Resolve release tag
shell: bash
run: node scripts/emit-release-env.mjs --source-tag "$SOURCE_TAG" >> "$GITHUB_ENV"
- name: Verify release source
if: env.IS_SMOKE_TAG != 'true'
shell: bash
run: |
if [[ "$(git rev-parse HEAD)" != "$GITHUB_SHA" || "$(git rev-parse "refs/tags/${SOURCE_TAG#refs/tags/}^{commit}")" != "$GITHUB_SHA" ]]; then
echo "::error::Run this workflow from the release tag so provenance names the built commit."
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
@@ -455,21 +549,21 @@ jobs:
- name: Download mac manifest artifacts
if: env.IS_SMOKE_TAG != 'true' && needs.publish-macos.result == 'success'
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
pattern: mac-manifest-*
path: release-manifests
- name: Download Linux manifest artifact
if: env.IS_SMOKE_TAG != 'true' && needs.publish-linux.result == 'success'
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: linux-manifest
path: release-manifests/linux-manifest
- name: Download Windows manifest artifact
if: env.IS_SMOKE_TAG != 'true' && needs.publish-windows.result == 'success'
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: windows-manifest
path: release-manifests/windows-manifest
+2 -2
View File
@@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
sparse-checkout: |
package.json
@@ -38,7 +38,7 @@ jobs:
run: node scripts/emit-release-env.mjs --source-tag "$SOURCE_TAG" >> "$GITHUB_ENV"
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
+13 -12
View File
@@ -48,7 +48,7 @@ jobs:
check_tag: ${{ steps.values.outputs.check_tag }}
publish_tags: ${{ steps.values.outputs.publish_tags }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- id: values
env:
@@ -119,12 +119,12 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- uses: docker/setup-qemu-action@v4
- uses: docker/setup-buildx-action@v4
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
- uses: docker/build-push-action@v7
- uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7
with:
context: .
file: docker/base/Dockerfile
@@ -133,7 +133,8 @@ jobs:
PASEO_VERSION=${{ needs.setup.outputs.install_version }}
tags: ${{ needs.setup.outputs.check_tag }}
push: false
provenance: false
# The check build does not export an image to attach attestations to.
provenance: mode=max
cache-from: type=gha,scope=paseo
cache-to: type=gha,scope=paseo,mode=max
@@ -145,19 +146,19 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- uses: docker/setup-qemu-action@v4
- uses: docker/setup-buildx-action@v4
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
- name: Log in to GHCR
uses: docker/login-action@v4
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v7
- uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7
with:
context: .
file: docker/base/Dockerfile
@@ -166,6 +167,6 @@ jobs:
PASEO_VERSION=${{ needs.setup.outputs.install_version }}
tags: ${{ needs.setup.outputs.publish_tags }}
push: true
provenance: false
provenance: mode=max
cache-from: type=gha,scope=paseo
cache-to: type=gha,scope=paseo,mode=max
+469
View File
@@ -0,0 +1,469 @@
name: GPUI Experimental
on:
workflow_dispatch:
inputs:
platform:
description: "Platform(s) to build."
required: false
default: "all"
type: choice
options:
- all
- macos
- linux
publish:
description: "Publish built artifacts as a timestamped gpui-experimental prerelease."
required: false
default: "true"
type: choice
options:
- "true"
- "false"
concurrency:
group: gpui-experimental-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
env:
ONNXRUNTIME_NODE_INSTALL: skip
NPM_CONFIG_AUDIT: "false"
NPM_CONFIG_FUND: "false"
RN_GPUI_JS_ENGINE: v8
jobs:
build-macos:
name: gpui-experimental (macos-latest, arm64)
if: ${{ inputs.platform == 'all' || inputs.platform == 'macos' }}
runs-on: macos-latest
timeout-minutes: 60
permissions:
contents: read
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
- name: Setup Rust toolchain
run: |
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
- name: Cache Cargo and GPUI target
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
~/.cargo/registry
~/.cargo/git
.artifacts/gpui/macos/target
.artifacts/gpui/macos/native-deps
key: gpui-nightly-cargo-v2-macos26-arm64-${{ hashFiles('packages/app/gpui/desktop/Cargo.lock', 'packages/app/gpui/package-lock.json') }}
restore-keys: |
gpui-nightly-cargo-v2-macos26-arm64-
- name: Clear restored CMake cache before configure
run: find .artifacts/gpui/macos/target -name CMakeCache.txt -delete 2>/dev/null || true
- name: Install macOS build tools
run: command -v ninja >/dev/null || brew install ninja
- name: Install JS dependencies and build app dependencies
run: |
node scripts/npm-retry.mjs ci
npm run build:app-deps
- name: Install GPUI dependencies and verify V8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run gpui:install
node packages/app/gpui/node_modules/@react-native-gpui/v8/scripts/fetch-binaries.mjs --verify
- name: Build macOS GPUI app bundle
env:
MACOSX_DEPLOYMENT_TARGET: "15.0"
NODE_OPTIONS: --max-old-space-size=6144
CARGO_BUILD_JOBS: "4"
PASEO_RENDERER: gpui
RN_GPUI_NATIVE_DEPS_CACHE: ${{ github.workspace }}/.artifacts/gpui/macos/native-deps
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
repo_root="$PWD"
cd packages/app/gpui
CARGO_TARGET_DIR="$repo_root/.artifacts/gpui/macos/target" \
node node_modules/react-native/cli.js package-desktop \
--target app --out "$repo_root/.artifacts/gpui/macos/dist"
- name: Check Apple signing secrets
id: signing_secrets
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
if [[ -n "$APPLE_CERTIFICATE" && -n "$APPLE_CERTIFICATE_PASSWORD" && -n "$APPLE_ID" && -n "$APPLE_PASSWORD" && -n "$APPLE_TEAM_ID" ]]; then
echo "enabled=true" >> "$GITHUB_OUTPUT"
else
echo "enabled=false" >> "$GITHUB_OUTPUT"
echo "::notice::Apple signing secrets are not configured; packaging ad-hoc signed macOS build without notarization."
fi
- name: Sign, verify, notarize, and package macOS DMG
if: steps.signing_secrets.outputs.enabled == 'true'
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
set -euo pipefail
repo_root="$PWD"
app_path="$repo_root/.artifacts/gpui/macos/dist/Paseo GPUI.app"
test -d "$app_path"
node scripts/gpui.mjs apply-macos-icon "$app_path"
keychain_path="$RUNNER_TEMP/gpui-signing.keychain-db"
keychain_password="$(openssl rand -hex 24)"
cert_path="$RUNNER_TEMP/apple-cert.p12"
node -e '
const fs = require("node:fs");
const raw = (process.env.APPLE_CERTIFICATE || "").trim().replace(/^data:[^,]*,/, "");
fs.writeFileSync(process.argv[1], Buffer.from(raw, "base64"));
' "$cert_path"
security create-keychain -p "$keychain_password" "$keychain_path"
security set-keychain-settings -lut 21600 "$keychain_path"
security unlock-keychain -p "$keychain_password" "$keychain_path"
security import "$cert_path" -P "$APPLE_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k "$keychain_path"
rm -f "$cert_path"
security list-keychains -d user -s "$keychain_path" login.keychain-db
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$keychain_password" "$keychain_path"
sign_identity="$(security find-identity -v -p codesigning "$keychain_path" | sed -n 's/.*"\(Developer ID Application:[^"]*\)".*/\1/p' | head -n 1)"
if [[ -z "$sign_identity" ]]; then
echo "::error::No Developer ID Application certificate found in imported keychain."
exit 1
fi
while IFS= read -r -d '' bin; do
codesign --force --sign "$sign_identity" --timestamp --options runtime "$bin"
done < <(find "$app_path/Contents" -type f \( -name '*.dylib' -o -name '*.so' -o -name '*.node' \) -print0)
codesign --force --sign "$sign_identity" --timestamp --options runtime \
--entitlements packages/app/gpui/desktop/entitlements.mac.plist \
"$app_path"
node --test packages/app/gpui/verify-macos-package.test.mjs
node packages/app/gpui/verify-macos-package.mjs "$app_path" --require-asset-catalog
codesign -d --entitlements :- "$app_path" 2>&1 | grep -q "com.apple.security.cs.allow-jit"
export PASEO_REAL_XCRUN="$(command -v xcrun)"
xcrun_bin="$(mktemp -d)"
trap 'rm -rf "$xcrun_bin"' EXIT
cp scripts/macos-xcrun-retry.sh "$xcrun_bin/xcrun"
chmod +x "$xcrun_bin/xcrun"
export PATH="$xcrun_bin:$PATH"
app_notarize_zip="$RUNNER_TEMP/paseo-gpui-app-notarize.zip"
ditto -c -k --keepParent "$app_path" "$app_notarize_zip"
xcrun notarytool submit "$app_notarize_zip" \
--apple-id "$APPLE_ID" \
--password "$APPLE_PASSWORD" \
--team-id "$APPLE_TEAM_ID" \
--wait
rm -f "$app_notarize_zip"
xcrun stapler staple "$app_path"
spctl --assess --type execute -v "$app_path"
out_dir="$RUNNER_TEMP/gpui-experimental-macos-arm64"
rm -rf "$out_dir"
node scripts/gpui.mjs package-macos-dmg "$app_path" "$out_dir"
dmg_path="$out_dir/Paseo-GPUI-experimental-macos-arm64.dmg"
codesign --force --sign "$sign_identity" --timestamp "$dmg_path"
xcrun notarytool submit "$dmg_path" \
--apple-id "$APPLE_ID" \
--password "$APPLE_PASSWORD" \
--team-id "$APPLE_TEAM_ID" \
--wait
xcrun stapler staple "$dmg_path"
xcrun stapler validate "$dmg_path"
- name: Verify and package unsigned macOS DMG (fork fallback)
if: steps.signing_secrets.outputs.enabled != 'true'
run: |
set -euo pipefail
repo_root="$PWD"
app_path="$repo_root/.artifacts/gpui/macos/dist/Paseo GPUI.app"
test -d "$app_path"
node scripts/gpui.mjs apply-macos-icon "$app_path" --adhoc-resign
node --test packages/app/gpui/verify-macos-package.test.mjs
node packages/app/gpui/verify-macos-package.mjs "$app_path" --require-asset-catalog
codesign -d --entitlements :- "$app_path" 2>&1 | grep -q "com.apple.security.cs.allow-jit"
out_dir="$RUNNER_TEMP/gpui-experimental-macos-arm64"
rm -rf "$out_dir"
node scripts/gpui.mjs package-macos-dmg "$app_path" "$out_dir"
- name: Clean up temporary Apple signing keychain
if: always()
run: |
rm -f "$RUNNER_TEMP/apple-cert.p12" "$RUNNER_TEMP/paseo-gpui-app-notarize.zip"
if [[ -f "$RUNNER_TEMP/gpui-signing.keychain-db" ]]; then
security delete-keychain "$RUNNER_TEMP/gpui-signing.keychain-db" || true
fi
- name: Generate macOS checksums
run: node scripts/release-checksums.mjs "${{ runner.temp }}/gpui-experimental-macos-arm64" "SHA256SUMS-gpui-experimental-macos-arm64.txt"
- name: Upload macOS experimental artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: gpui-experimental-macos-arm64
path: ${{ runner.temp }}/gpui-experimental-macos-arm64
retention-days: 7
build-linux:
name: gpui-experimental (ubuntu-24.04, x64)
if: ${{ inputs.platform == 'all' || inputs.platform == 'linux' }}
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
contents: read
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
- name: Setup Rust toolchain
run: |
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
- name: Cache Cargo and GPUI target
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
~/.cargo/registry
~/.cargo/git
.artifacts/gpui/linux/target
.artifacts/gpui/linux/native-deps
key: gpui-nightly-cargo-v2-linux-x64-${{ hashFiles('packages/app/gpui/desktop/Cargo.lock', 'packages/app/gpui/package-lock.json') }}
restore-keys: |
gpui-nightly-cargo-v2-linux-x64-
- name: Clear restored CMake cache before configure
run: find .artifacts/gpui/linux/target -name CMakeCache.txt -delete 2>/dev/null || true
- name: Install Linux GPUI build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
clang \
cmake \
ninja-build \
pkg-config \
libssl-dev \
libfontconfig-dev \
libfreetype-dev \
libvulkan-dev \
libwayland-dev \
libx11-xcb-dev \
libxcb1-dev \
libxcb-render0-dev \
libxcb-shape0-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev
- name: Install JS dependencies and build app dependencies
run: |
node scripts/npm-retry.mjs ci
npm run build:app-deps
- name: Install GPUI dependencies and verify V8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run gpui:install
node packages/app/gpui/node_modules/@react-native-gpui/v8/scripts/fetch-binaries.mjs --verify
- name: Verify icon packaging helpers
run: node --test packages/app/gpui/verify-macos-package.test.mjs
- name: Build, package, and smoke-check Linux x64 GPUI archive
env:
CARGO_BUILD_JOBS: "4"
CARGO_TARGET_DIR: ${{ github.workspace }}/.artifacts/gpui/linux/target
PASEO_RENDERER: gpui
RN_GPUI_NATIVE_DEPS_CACHE: ${{ github.workspace }}/.artifacts/gpui/linux/native-deps
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node scripts/gpui.mjs package-linux --out "${{ runner.temp }}/gpui-experimental-linux-x64"
- name: Generate Linux checksums
run: node scripts/release-checksums.mjs "${{ runner.temp }}/gpui-experimental-linux-x64" "SHA256SUMS-gpui-experimental-linux-x64.txt"
- name: Upload Linux experimental artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: gpui-experimental-linux-x64
path: ${{ runner.temp }}/gpui-experimental-linux-x64
retention-days: 7
publish:
name: Publish gpui-experimental prerelease
needs: [build-macos, build-linux]
if: ${{ !cancelled() && inputs.publish != 'false' && needs.build-macos.result == 'success' && needs.build-linux.result == 'success' }}
concurrency:
group: gpui-experimental-release
cancel-in-progress: false
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
sparse-checkout: scripts
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
- name: Download built experimental artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
pattern: gpui-experimental-*
path: ${{ runner.temp }}/experimental-assets
merge-multiple: true
- name: Publish gpui-experimental prerelease
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
assets_dir="${RUNNER_TEMP}/experimental-assets"
notes_file="${RUNNER_TEMP}/gpui-experimental-notes.md"
now_utc="$(date -u +'%d-%m-%Y-%H%M|%d-%m-%Y %H:%M|%Y-%m-%d %H:%M UTC')"
IFS='|' read -r tag_timestamp title_timestamp build_date <<< "$now_utc"
short_sha="$(printf '%s' "${GITHUB_SHA}" | cut -c1-9)"
tag="gpui-experimental-${tag_timestamp}"
release_title="Paseo GPUI Experimental ${title_timestamp} UTC"
rm -f "${assets_dir}/SHA256SUMS-gpui-experimental.txt"
if compgen -G "${assets_dir}/SHA256SUMS-gpui-experimental-*.txt" > /dev/null; then
cat "${assets_dir}"/SHA256SUMS-gpui-experimental-*.txt > "${assets_dir}/SHA256SUMS-gpui-experimental.txt"
rm -f "${assets_dir}"/SHA256SUMS-gpui-experimental-*.txt
fi
expected_assets=()
for file in "${assets_dir}"/*; do
[[ -f "$file" && "$file" != *.yml ]] || continue
expected_assets+=("$(basename "$file")")
done
if [[ ${#expected_assets[@]} -eq 0 ]]; then
echo "::error::No release artifacts found in ${assets_dir}" >&2
exit 1
fi
{
echo "This build is the native desktop app for Paseo. It runs on GPUI instead of Electron."
echo ""
echo "It is under heavy development and is not ready for daily use. It is not a Paseo beta."
echo ""
echo "If you want to use Paseo normally, download the [latest release](https://github.com/getpaseo/paseo/releases/latest)."
echo ""
echo "This app connects to a running Paseo daemon. It does not bundle the daemon."
echo ""
echo "- Commit: \`${GITHUB_SHA}\` (\`${short_sha}\`)"
echo "- Built: \`${build_date}\`"
echo ""
echo "### SHA-256 Checksums"
echo ""
echo '```'
if [[ -f "${assets_dir}/SHA256SUMS-gpui-experimental.txt" ]]; then
cat "${assets_dir}/SHA256SUMS-gpui-experimental.txt"
else
echo "(no checksums generated)"
fi
echo '```'
} > "${notes_file}"
repo="${{ github.repository }}"
staging_tag="gpui-experimental-stage-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
staging_id=""
created_tag=""
cleanup_staging() {
local ec=$?
set +e
if [[ -n "$staging_id" ]]; then
gh api "repos/${repo}/releases/${staging_id}" -X DELETE > /dev/null 2>&1 || true
fi
if [[ -n "$created_tag" ]]; then
gh api "repos/${repo}/git/refs/tags/${created_tag}" -X DELETE > /dev/null 2>&1 || true
fi
return "$ec"
}
trap cleanup_staging EXIT
# Stage and verify the full asset set on a draft first so upload failures never
# publish a half-empty release.
gh release create "$staging_tag" \
--repo "$repo" \
--title "$release_title" \
--notes-file "${notes_file}" \
--draft \
--prerelease \
--latest=false \
--target "${GITHUB_SHA}"
staging_id="$(gh release view "$staging_tag" --repo "$repo" --json databaseId --jq '.databaseId')"
node scripts/upload-release-assets.mjs "$staging_tag" "${assets_dir}" "$repo"
assets_list="$(gh api "repos/${repo}/releases/${staging_id}/assets?per_page=100" --paginate --jq '.[].name')"
for name in "${expected_assets[@]}"; do
if ! grep -Fxq "$name" <<< "$assets_list"; then
echo "::error::Missing release asset: ${name}" >&2
exit 1
fi
done
gh api "repos/${repo}/git/refs" \
-X POST \
-f ref="refs/tags/${tag}" \
-f sha="${GITHUB_SHA}"
created_tag="$tag"
promoted_draft="$(gh api "repos/${repo}/releases/${staging_id}" \
-X PATCH \
-f tag_name="$tag" \
-f target_commitish="${GITHUB_SHA}" \
-f name="$release_title" \
-F body=@"${notes_file}" \
-F draft=false \
-F prerelease=true \
-f make_latest="false" \
--jq '.draft')"
if [[ "$promoted_draft" != "false" ]]; then
echo "::error::Promoted release is still a draft" >&2
exit 1
fi
staging_id=""
created_tag=""
-61
View File
@@ -1,61 +0,0 @@
name: Nix Update Hash
on:
push:
branches: [main]
paths:
- "nix/**"
- "flake.nix"
- "flake.lock"
- "package.json"
- "package-lock.json"
- "packages/highlight/**"
- "packages/plugin/**"
- "packages/server/**"
- "packages/relay/**"
- "packages/cli/**"
- "scripts/update-nix.sh"
- "scripts/fix-lockfile.mjs"
- ".github/workflows/nix-update-hash.yml"
permissions:
contents: read
jobs:
update-hash:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.PASEO_BOT_APP_ID }}
private-key: ${{ secrets.PASEO_BOT_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
token: ${{ steps.app-token.outputs.token }}
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Update lockfile + Nix hash if stale
run: ./scripts/update-nix.sh
- name: Build Nix package
run: nix build .#default -o result
- name: Commit hash/lockfile updates
run: |
git diff --quiet package-lock.json nix/npm-deps.hash && exit 0
git config user.name "paseo-ai[bot]"
git config user.email "266920839+paseo-ai[bot]@users.noreply.github.com"
git add package-lock.json nix/npm-deps.hash
git commit -m "fix: update lockfile signatures and Nix hash [skip ci]"
git push
+6 -14
View File
@@ -22,11 +22,11 @@ on:
- "packages/desktop/**"
- "plugins/**"
- "skills/**"
- "patches/**"
- "scripts/postinstall-patches.mjs"
- "scripts/trace-daemon.mjs"
- "scripts/is-main-module.mjs"
- "scripts/build-daemon-web-ui.mjs"
- "scripts/update-nix.sh"
- "scripts/fix-lockfile.mjs"
- ".github/workflows/nix.yml"
workflow_dispatch:
@@ -41,20 +41,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
- uses: cachix/install-nix-action@v31
- uses: cachix/install-nix-action@3dc140bfc76c49fbd4dd958429132e3746bcb086 # v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Update lockfile + Nix hash if stale
run: ./scripts/update-nix.sh
- name: Build Nix package
run: nix build .#default -o result
@@ -134,9 +126,9 @@ jobs:
if: ${{ github.event_name != 'pull_request' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: cachix/install-nix-action@v31
- uses: cachix/install-nix-action@3dc140bfc76c49fbd4dd958429132e3746bcb086 # v31
with:
nix_path: nixpkgs=channel:nixos-unstable
+71
View File
@@ -0,0 +1,71 @@
name: NPM Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
package:
description: Package to publish
type: choice
default: "@getpaseo/highlight"
options:
- "@getpaseo/highlight"
- all
canary_suffix:
description: "Canary suffix (default: canary.<run_id>.<run_attempt>)"
type: string
required: false
dry_run:
description: Preview publication without publishing
type: boolean
default: false
concurrency:
group: npm-release
queue: max
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Require main for manual runs
if: github.event_name == 'workflow_dispatch'
env:
REF: ${{ github.ref }}
run: test "$REF" = refs/heads/main
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "22.20.0"
package-manager-cache: false
- name: Install npm with trusted publishing support
run: npm install --global npm@11.21.0
- name: Install dependencies
run: npm ci
- name: Stamp canary versions
if: github.event_name == 'workflow_dispatch'
env:
CANARY_SUFFIX: ${{ inputs.canary_suffix }}
PACKAGE: ${{ inputs.package }}
run: node scripts/publish-release-packages.mjs --prepare-canary --canary-suffix "${CANARY_SUFFIX:-canary.$GITHUB_RUN_ID.$GITHUB_RUN_ATTEMPT}" --package "$PACKAGE"
- name: Build packages
run: npm run build:server
- name: Publish canary packages
if: github.event_name == 'workflow_dispatch'
env:
CANARY_SUFFIX: ${{ inputs.canary_suffix }}
PACKAGE: ${{ inputs.package }}
DRY_RUN: ${{ inputs.dry_run }}
run: |
args=(--canary-suffix "${CANARY_SUFFIX:-canary.$GITHUB_RUN_ID.$GITHUB_RUN_ATTEMPT}" --package "$PACKAGE" --tag canary)
if [ "$DRY_RUN" = true ]; then args+=(--dry-run); fi
node scripts/publish-release-packages.mjs "${args[@]}"
- name: Publish packages
if: github.event_name == 'push'
run: node scripts/publish-release-packages.mjs --tag "$GITHUB_REF_NAME"
+1 -1
View File
@@ -30,7 +30,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
+2
View File
@@ -99,3 +99,5 @@ app.json
# Project-local Serena configuration and memories.
.serena/
!packages/app/gpui/app.json
+99 -13
View File
@@ -184,15 +184,13 @@
"server/session/daemon/install-origin.ts": ["existsSync", "readFileSync"],
// TODO: npm self-update inspection probes the reported install path; move the probe into bounded async installation inspection.
"server/session/daemon/npm-global-cli.ts": ["lstatSync"],
// Speech child process: model-file validation runs in the worker-backed local speech provider.
"server/speech/providers/local/sherpa/sherpa-offline-recognizer.ts": ["existsSync"],
// Speech child process: native addon discovery and patchelf run outside the daemon.
"server/speech/providers/local/sherpa/sherpa-onnx-node-loader.ts": [
"existsSync",
"spawnSync"
],
// Speech child process: model-file validation runs in the worker-backed local speech provider.
"server/speech/providers/local/sherpa/sherpa-tts.ts": ["existsSync"],
// Speech child process: modelsDir directory creation and model-file validation run outside the daemon.
"server/speech/providers/local/worker-paths.ts": ["existsSync", "mkdirSync"],
// TODO: static request selection and index injection need bounded async serving with response/error ownership; keep this as a separate request-path conversion.
"server/web-ui.ts": ["readFileSync", "statSync"],
// Startup registry hydration: check persisted workspace directories before the runtime reconciliation service starts.
@@ -304,10 +302,19 @@
"error",
{
"paths": [
{
"name": "lucide-react-native",
"allowTypeImports": true,
"message": "Import one icon from lucide-react-native/icons/<file> and LucideProvider from lucide-react-native/context. The barrel evaluates all 1,858 icons at startup. Plugin-named icons load through @/plugins/lucide-catalog."
},
{
"name": "lucide-react-native/icons",
"message": "Import one icon from lucide-react-native/icons/<file>. The icons index evaluates all 1,858 icons."
},
{
"name": "react-native",
"importNames": ["TextInput"],
"message": "Use EditingTextInput from @/components/ui/text-input. Raw TextInput bypasses editing-surface authority and IME safety."
"message": "Use FormTextInput from @/components/ui/form-field (or SearchField from @/components/ui/search-field). Raw TextInput bypasses form chrome, editing-surface authority, and IME safety."
},
{
"name": "@tanstack/react-query",
@@ -335,10 +342,19 @@
"error",
{
"paths": [
{
"name": "lucide-react-native",
"allowTypeImports": true,
"message": "Import one icon from lucide-react-native/icons/<file> and LucideProvider from lucide-react-native/context. The barrel evaluates all 1,858 icons at startup. Plugin-named icons load through @/plugins/lucide-catalog."
},
{
"name": "lucide-react-native/icons",
"message": "Import one icon from lucide-react-native/icons/<file>. The icons index evaluates all 1,858 icons."
},
{
"name": "react-native",
"importNames": ["TextInput"],
"message": "Use EditingTextInput from @/components/ui/text-input. Raw TextInput bypasses editing-surface authority and IME safety."
"message": "Use FormTextInput from @/components/ui/form-field (or SearchField from @/components/ui/search-field). Raw TextInput bypasses form chrome, editing-surface authority, and IME safety."
},
{
"name": "react-native-unistyles",
@@ -387,10 +403,19 @@
"error",
{
"paths": [
{
"name": "lucide-react-native",
"allowTypeImports": true,
"message": "Import one icon from lucide-react-native/icons/<file> and LucideProvider from lucide-react-native/context. The barrel evaluates all 1,858 icons at startup. Plugin-named icons load through @/plugins/lucide-catalog."
},
{
"name": "lucide-react-native/icons",
"message": "Import one icon from lucide-react-native/icons/<file>. The icons index evaluates all 1,858 icons."
},
{
"name": "react-native",
"importNames": ["TextInput"],
"message": "Use EditingTextInput from @/components/ui/text-input. Raw TextInput bypasses editing-surface authority and IME safety."
"message": "Use FormTextInput from @/components/ui/form-field (or SearchField from @/components/ui/search-field). Raw TextInput bypasses form chrome, editing-surface authority, and IME safety."
},
{
"name": "react-native-unistyles",
@@ -431,7 +456,6 @@
"packages/app/src/components/realtime-voice-overlay.tsx",
"packages/app/src/components/resize-handle.tsx",
"packages/app/src/components/rewind/rewind-menu.tsx",
"packages/app/src/components/settings-textarea.tsx",
"packages/app/src/components/sidebar-callout.tsx",
"packages/app/src/components/split-container.tsx",
"packages/app/src/components/split-drop-zone.tsx",
@@ -457,7 +481,6 @@
"packages/app/src/desktop/updates/update-callout-source.tsx",
"packages/app/src/git/actions-split-button.tsx",
"packages/app/src/hooks/use-web-scrollbar-style.web.ts",
"packages/app/src/hosts/host-chooser.tsx",
"packages/app/src/screens/open-project-screen.tsx",
"packages/app/src/screens/projects-screen.tsx",
"packages/app/src/screens/sessions-screen.tsx",
@@ -473,10 +496,19 @@
"error",
{
"paths": [
{
"name": "lucide-react-native",
"allowTypeImports": true,
"message": "Import one icon from lucide-react-native/icons/<file> and LucideProvider from lucide-react-native/context. The barrel evaluates all 1,858 icons at startup. Plugin-named icons load through @/plugins/lucide-catalog."
},
{
"name": "lucide-react-native/icons",
"message": "Import one icon from lucide-react-native/icons/<file>. The icons index evaluates all 1,858 icons."
},
{
"name": "react-native",
"importNames": ["TextInput"],
"message": "Use EditingTextInput from @/components/ui/text-input. Raw TextInput bypasses editing-surface authority and IME safety."
"message": "Use FormTextInput from @/components/ui/form-field (or SearchField from @/components/ui/search-field). Raw TextInput bypasses form chrome, editing-surface authority, and IME safety."
},
{
"name": "@tanstack/react-query",
@@ -503,10 +535,19 @@
"error",
{
"paths": [
{
"name": "lucide-react-native",
"allowTypeImports": true,
"message": "Import one icon from lucide-react-native/icons/<file> and LucideProvider from lucide-react-native/context. The barrel evaluates all 1,858 icons at startup. Plugin-named icons load through @/plugins/lucide-catalog."
},
{
"name": "lucide-react-native/icons",
"message": "Import one icon from lucide-react-native/icons/<file>. The icons index evaluates all 1,858 icons."
},
{
"name": "react-native",
"importNames": ["TextInput"],
"message": "Use EditingTextInput from @/components/ui/text-input. Raw TextInput bypasses editing-surface authority and IME safety."
"message": "Use FormTextInput from @/components/ui/form-field (or SearchField from @/components/ui/search-field). Raw TextInput bypasses form chrome, editing-surface authority, and IME safety."
}
]
}
@@ -518,6 +559,29 @@
"packages/app/src/components/ui/text-input/**/*.{ts,tsx}",
"packages/app/src/agent-stream/scroll-keyboard-dismiss/use-scroll-keyboard-dismiss.ts"
],
"rules": {
// These files may import raw TextInput; the Lucide rule still applies.
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "lucide-react-native",
"allowTypeImports": true,
"message": "Import one icon from lucide-react-native/icons/<file> and LucideProvider from lucide-react-native/context. The barrel evaluates all 1,858 icons at startup. Plugin-named icons load through @/plugins/lucide-catalog."
},
{
"name": "lucide-react-native/icons",
"message": "Import one icon from lucide-react-native/icons/<file>. The icons index evaluates all 1,858 icons."
}
]
}
]
}
},
// The one module that loads the whole Lucide barrel, on demand, for plugin-named icons.
{
"files": ["packages/app/src/plugins/lucide-catalog/catalog.ts"],
"rules": {
"no-restricted-imports": "off"
}
@@ -525,7 +589,29 @@
{
"files": ["packages/app/src/**/*.{ts,tsx}"],
"rules": {
"paseo/no-raw-pressable": "error"
"paseo/no-raw-pressable": "error",
"paseo/no-raw-text-input": "error"
}
},
// Styled input chrome and focus rings are owned by FormTextInput / SearchField in
// components/ui. Only UI primitives, tests, and the small bespoke editor allowlist below may
// import raw EditingTextInput directly.
{
"files": [
"packages/app/src/components/ui/**/*.{ts,tsx}",
"packages/app/src/**/*.{test,spec}.{ts,tsx}",
"packages/app/src/command-center/command-center.tsx",
"packages/app/src/components/adaptive-modal-sheet.tsx",
"packages/app/src/components/file-explorer-pane.tsx",
"packages/app/src/composer/input/input.tsx",
"packages/app/src/desktop/browser/pane/index.electron.tsx",
"packages/app/src/pane-find/index.tsx",
"packages/app/src/plugins/react-native/text-input.tsx",
"packages/app/src/terminal/native-renderer/terminal-input.native.tsx",
"packages/app/src/workspace-rename/internal/inline-title-field.tsx"
],
"rules": {
"paseo/no-raw-text-input": "off"
}
},
// Press feedback is owned by the primitives in components/ui. Raw pressable burn-down:
@@ -546,7 +632,7 @@
"packages/app/src/components/combined-model-selector.tsx",
"packages/app/src/components/compact-explorer-sidebar.tsx",
"packages/app/src/components/context-window-meter.tsx",
"packages/app/src/components/desktop/window-controls.tsx",
"packages/app/src/components/desktop/caption-button.tsx",
"packages/app/src/components/dictation-controls.tsx",
"packages/app/src/components/download-toast.tsx",
"packages/app/src/components/file-explorer-pane.tsx",
+67 -19
View File
@@ -1,22 +1,53 @@
# Changelog
## 0.19.0-beta.1 - 2026-12-02
## 0.19.2 - 2026-12-05
### Fixed
- Fixed OpenCode v2 skills picked inline, with attachments, or while a turn is running being sent as literal `/skill` text instead of loading the skill ([#12142](https://github.com/getpaseo/paseo/pull/12142))
- Fixed Codex skills picked inline, with attachments, or while a turn is running not loading ([#12143](https://github.com/getpaseo/paseo/pull/12143))
- Fixed Desktop image attachments disappearing across multiple windows, tab switches, and queued follow-up sends ([#12082](https://github.com/getpaseo/paseo/pull/12082))
## 0.19.1 - 2026-12-03
### Changed
- Changed agent messages and subagent finish notifications to default to `steer`, falling back to `queue` on providers that cannot steer mid-turn instead of interrupting the active turn ([#11915](https://github.com/getpaseo/paseo/pull/11915))
### Fixed
- Fixed direct `steer` and `interrupt` prompts clearing queued messages and finish notifications from the queue ([#11915](https://github.com/getpaseo/paseo/pull/11915))
- Fixed queued message batches being dropped instead of held after transient dispatch errors or run-start timeouts ([#11915](https://github.com/getpaseo/paseo/pull/11915))
- Fixed parent agents missing the follow-up completion notice when Claude runs a queued steer as a separate turn ([#11872](https://github.com/getpaseo/paseo/pull/11872))
## 0.19.0 - 2026-12-03
- **Switch providers mid-chat:** Switch a chat to another provider and keep the conversation, with chat history now stored on the host. ([#11410](https://github.com/getpaseo/paseo/pull/11410))
- **Queue survives restarts:** Queued messages now live on the host, so they survive app reloads, device switches and daemon restarts. ([#11424](https://github.com/getpaseo/paseo/pull/11424), [#11566](https://github.com/getpaseo/paseo/pull/11566), [#11740](https://github.com/getpaseo/paseo/pull/11740))
- **One switch for agent tools:** Agent tools now sit behind one Enable tools setting with orchestration, schedules, PR watching and browser groups, and are on by default. ([#11189](https://github.com/getpaseo/paseo/pull/11189))
- **Connected devices list:** Settings → Devices now shows which clients and hosts are connected and what each one can access. ([#11209](https://github.com/getpaseo/paseo/pull/11209))
- **Plugin scorecards:** Plugin pages in the app and on paseo.sh show a scorecard, update history, related plugins and sponsor links. ([#11563](https://github.com/getpaseo/paseo/pull/11563), [#11674](https://github.com/getpaseo/paseo/pull/11674), [#11691](https://github.com/getpaseo/paseo/pull/11691))
- **Plugin approval prompt:** The app now asks once per host before it runs a plugin's code, and a General setting turns the prompt off. ([#11717](https://github.com/getpaseo/paseo/pull/11717))
- **Share services through tunnels:** Share a running workspace service at a public URL from the Scripts menu, and dev servers keep their live-reload connections. Services now open at `localhost:<port>`, and `*.localhost` service URLs are removed. ([#11490](https://github.com/getpaseo/paseo/pull/11490))
- **Lower CPU while agents run:** Running agents use far less CPU, GPU and battery, with lighter status rings, loaders and tool-call animations. ([#11456](https://github.com/getpaseo/paseo/pull/11456), [#11474](https://github.com/getpaseo/paseo/pull/11474), [#11564](https://github.com/getpaseo/paseo/pull/11564), [#11586](https://github.com/getpaseo/paseo/pull/11586), [#11591](https://github.com/getpaseo/paseo/pull/11591) by [@djbclark](https://github.com/djbclark), [@luoph](https://github.com/luoph), [@mariotaku](https://github.com/mariotaku))
- **Steadier streaming replies:** Streaming replies show their final formatting as they arrive, and long replies no longer get slower to render as they grow. ([#11572](https://github.com/getpaseo/paseo/pull/11572), [#11582](https://github.com/getpaseo/paseo/pull/11582) by [@luoph](https://github.com/luoph))
- **Faster mobile launch:** The mobile app shows your last workspace sooner after a cold launch, about 0.7 seconds on Android. ([#11390](https://github.com/getpaseo/paseo/pull/11390) by [@luoph](https://github.com/luoph), [@maci0](https://github.com/maci0))
- **Desktop browser profiles:** Desktop browser tabs can use separate colored profiles, so you can stay signed in to two accounts on one site. ([#10357](https://github.com/getpaseo/paseo/pull/10357) by [@clkao](https://github.com/clkao))
- **Desktop browser profiles:** Desktop browser tabs can use separate colored profiles, so you can stay signed in to two accounts on one site. ([#10357](https://github.com/getpaseo/paseo/pull/10357), [#11772](https://github.com/getpaseo/paseo/pull/11772) by [@clkao](https://github.com/clkao))
- **Swipe away the iOS keyboard:** Drag the chat down to hide the iOS keyboard, and chat controls now work on the first tap while it is open. ([#11625](https://github.com/getpaseo/paseo/pull/11625))
### Breaking
- Paseo CLI and daemon now require Node.js 22.16.0 or later ([#11410](https://github.com/getpaseo/paseo/pull/11410))
- Relay connections now require [protected end-to-end encryption](https://paseo.sh/docs/security) by default, so apps older than 0.13.0 cannot connect through the relay ([#11864](https://github.com/getpaseo/paseo/pull/11864))
### Security
- Denied camera, microphone, location, notification and device access to pages in the desktop browser by default ([#11837](https://github.com/getpaseo/paseo/pull/11837))
- Blocked client file access to the daemon's own state in the Paseo home directory, and warned when a saved host's daemon key changes ([#11452](https://github.com/getpaseo/paseo/pull/11452))
- Restricted loopback origin matching to `localhost`, `127.0.0.1` and `::1` for daemon WebSocket and HTTP requests ([#11686](https://github.com/getpaseo/paseo/pull/11686))
- Stopped images in pull request comments and reviews from loading files from the host ([#11699](https://github.com/getpaseo/paseo/pull/11699))
- Stopped `.worktreeinclude` from copying local files into worktrees from fork pull requests ([#11709](https://github.com/getpaseo/paseo/pull/11709))
- Rejected schedule IDs that point outside the schedules directory ([#11727](https://github.com/getpaseo/paseo/pull/11727))
### Added
@@ -37,6 +68,7 @@
- Served the desktop app's web UI with Brotli and gzip compression instead of an uncompressed 25 MB bundle ([#10635](https://github.com/getpaseo/paseo/pull/10635) by [@djbclark](https://github.com/djbclark))
- Changed chat loading to one steady spinner that reveals the chat and composer together, without an Updating messages flash ([#11575](https://github.com/getpaseo/paseo/pull/11575))
- Kept the Restoring screen up until a restored workspace is ready ([#11486](https://github.com/getpaseo/paseo/pull/11486))
- Resized the mobile app icon to match other Home Screen icons, with Android themed icons and iOS Liquid Glass ([#11851](https://github.com/getpaseo/paseo/pull/11851))
- Showed a spinner on a worktree row while archive checks for uncommitted changes ([#11519](https://github.com/getpaseo/paseo/pull/11519), [#11574](https://github.com/getpaseo/paseo/pull/11574) by [@cxroop](https://github.com/cxroop))
- Showed each host's icon with a status dot on host selectors ([#11568](https://github.com/getpaseo/paseo/pull/11568))
- Sent the prompt with hardware-keyboard Return on iPhone, as on iPad ([#11537](https://github.com/getpaseo/paseo/pull/11537))
@@ -45,12 +77,29 @@
### Changed
- Changed archiving to keep a worktree that has uncommitted changes unless you confirm removal ([#11430](https://github.com/getpaseo/paseo/pull/11430))
- Changed Import session on the New workspace screen to create a new workspace ([#11845](https://github.com/getpaseo/paseo/pull/11845))
- Changed closing a New Agent tab with an unsent draft to ask before discarding it ([#11660](https://github.com/getpaseo/paseo/pull/11660))
- Changed Cmd/Ctrl+click on a sidebar workspace to open it instead of entering select mode ([#11472](https://github.com/getpaseo/paseo/pull/11472))
- Changed agents that already reported to their caller with `send_agent_prompt` to skip the extra finished notice ([#11583](https://github.com/getpaseo/paseo/pull/11583))
### Plugins
- Added a workspace layout API so plugins can open, move and close panes and tabs ([#11328](https://github.com/getpaseo/paseo/pull/11328))
- Added `ProviderIcon` so plugins can show Paseo's provider icons ([#4664](https://github.com/getpaseo/paseo/pull/4664) by [@omercnet](https://github.com/omercnet))
- Added `requirements.app` to set a separate minimum app version from the daemon's ([#11494](https://github.com/getpaseo/paseo/pull/11494) by [@mcowger](https://github.com/mcowger))
- Fixed a plugin error in a press handler or timer closing the iOS and Android app ([#11412](https://github.com/getpaseo/paseo/pull/11412))
- Fixed plugin popovers on web and desktop loading their content twice on each open ([#11748](https://github.com/getpaseo/paseo/pull/11748) by [@tomgrin10](https://github.com/tomgrin10))
- Fixed the desktop app keeping every replaced plugin version in memory after plugin reloads ([#11800](https://github.com/getpaseo/paseo/pull/11800))
- Fixed plugin operations deleting plugin entries added to `config.json` by hand ([#11501](https://github.com/getpaseo/paseo/pull/11501) by [@matchy233](https://github.com/matchy233))
- Fixed registry plugin installs failing with Missing npm artifact when npm leaves registry URLs out of lockfiles ([#11656](https://github.com/getpaseo/paseo/pull/11656) by [@Brandon168](https://github.com/Brandon168))
- Fixed local plugin reloads taking 12 to 21 seconds when the daemon runs under a large directory ([#11653](https://github.com/getpaseo/paseo/pull/11653))
### Fixed
- Fixed thinking level, mode and model changes on a running agent snapping back to the old value ([#11850](https://github.com/getpaseo/paseo/pull/11850))
- Fixed finished agents flashing back to running for a moment ([#11764](https://github.com/getpaseo/paseo/pull/11764))
- Fixed Send now on a queued message cancelling the running turn instead of steering it ([#11827](https://github.com/getpaseo/paseo/pull/11827))
- Fixed a failed or finished send replacing a follow-up draft typed while it was sending ([#11448](https://github.com/getpaseo/paseo/pull/11448) by [@suniceman](https://github.com/suniceman))
- Fixed an attached image over 2000 px breaking every later turn in its chat ([#5119](https://github.com/getpaseo/paseo/pull/5119) by [@RUIIIOVO](https://github.com/RUIIIOVO))
- Fixed voice mode agents never speaking back when Paseo tools were off ([#11161](https://github.com/getpaseo/paseo/pull/11161))
- Fixed turning off voice mode without a daemon connection leaving the microphone on ([#11587](https://github.com/getpaseo/paseo/pull/11587) by [@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
@@ -61,18 +110,25 @@
- Fixed terminal output stopping after a reconnect reused its subscription ([#10433](https://github.com/getpaseo/paseo/pull/10433) by [@chirag127](https://github.com/chirag127))
- Fixed Files showing Host is not connected when the app launched before the host connected ([#11679](https://github.com/getpaseo/paseo/pull/11679))
- Fixed Created and Last prompt sorting disappearing while a host is offline ([#11728](https://github.com/getpaseo/paseo/pull/11728))
- Fixed sideways swipes on horizontal scroll areas opening or closing the side panels on iOS and Android ([#11841](https://github.com/getpaseo/paseo/pull/11841))
- Fixed iOS header taps scrolling the chat, Explorer or workspace list to the top ([#11262](https://github.com/getpaseo/paseo/pull/11262) by [@yzim](https://github.com/yzim))
- Fixed a file sheet dismissed while opening leaving an invisible backdrop that blocked taps ([#11317](https://github.com/getpaseo/paseo/pull/11317) by [@LiebeLee](https://github.com/LiebeLee))
- Fixed bottom sheets staying open when dismissed before their open animation started ([#11632](https://github.com/getpaseo/paseo/pull/11632))
- Fixed Android attaching nothing when the app was recreated during image selection ([#7734](https://github.com/getpaseo/paseo/pull/7734))
- Fixed middle-clicking a tab on Linux pasting the selection into the terminal ([#11818](https://github.com/getpaseo/paseo/pull/11818))
- Fixed Find dropping the first keys typed right after Cmd/Ctrl+F ([#11812](https://github.com/getpaseo/paseo/pull/11812))
- Fixed pasting a file into the web composer inserting its path instead of attaching it ([#11718](https://github.com/getpaseo/paseo/pull/11718))
- Fixed Content font size not applying to existing user messages in web chat ([#11469](https://github.com/getpaseo/paseo/pull/11469) by [@bearyjd](https://github.com/bearyjd))
- Fixed `<br>` in a Markdown table cell splitting the table row ([#9587](https://github.com/getpaseo/paseo/pull/9587) by [@apple-ouyang](https://github.com/apple-ouyang))
- Fixed hidden chat rows shifting the reading position on web ([#11538](https://github.com/getpaseo/paseo/pull/11538) by [@kogekiplay](https://github.com/kogekiplay))
- Fixed links to outside folders without a trailing slash opening as a broken file tab ([#11786](https://github.com/getpaseo/paseo/pull/11786))
- Fixed the Scripts menu staying stale after `paseo.json` changes ([#11768](https://github.com/getpaseo/paseo/pull/11768) by [@odoo-mvds](https://github.com/odoo-mvds))
- Fixed the empty tool call details text touching the screen edge ([#9129](https://github.com/getpaseo/paseo/pull/9129) by [@ilteoood](https://github.com/ilteoood))
- Fixed a plugin slash command with an attachment being sent to the agent as a message ([#11483](https://github.com/getpaseo/paseo/pull/11483) by [@suniceman](https://github.com/suniceman))
- Fixed Archive finished subagents skipping closed subagents ([#10865](https://github.com/getpaseo/paseo/pull/10865) by [@sbhas2k](https://github.com/sbhas2k))
- Fixed Import Session missing the newest ACP sessions ([#10675](https://github.com/getpaseo/paseo/pull/10675))
- Fixed Import Session hiding the provider error while Retry runs ([#11654](https://github.com/getpaseo/paseo/pull/11654))
- Fixed Import session failing to open chats from older custom Codex providers ([#11852](https://github.com/getpaseo/paseo/pull/11852))
- Fixed setup dropping project suggestions from providers that answer after 60 seconds ([#11438](https://github.com/getpaseo/paseo/pull/11438) by [@suniceman](https://github.com/suniceman))
- Fixed Open in file manager showing for workspaces on remote hosts ([#11463](https://github.com/getpaseo/paseo/pull/11463) by [@sleroq](https://github.com/sleroq))
- Fixed Reveal in Finder for workspaces rooted at `/` ([#11206](https://github.com/getpaseo/paseo/pull/11206) by [@suniceman](https://github.com/suniceman))
@@ -85,6 +141,7 @@
- Fixed turns Claude starts on its own staying hidden in reopened chats until Reload ([#11405](https://github.com/getpaseo/paseo/pull/11405))
- Fixed Claude Code system notices being dropped from the chat ([#11419](https://github.com/getpaseo/paseo/pull/11419) by [@minamorl](https://github.com/minamorl))
- Fixed Claude Code's Goal set reply missing from imported chats ([#11733](https://github.com/getpaseo/paseo/pull/11733))
- Fixed Claude Code Stop hook warnings telling you to press a shortcut that opens Add project in Paseo ([#11792](https://github.com/getpaseo/paseo/pull/11792))
- Fixed listing commands in an archived Claude chat starting Claude Code ([#11521](https://github.com/getpaseo/paseo/pull/11521) by [@RawSalmon69](https://github.com/RawSalmon69))
- Fixed Stop failing on unresponsive Pi and OMP agents ([#11618](https://github.com/getpaseo/paseo/pull/11618) by [@LouisDeconinck](https://github.com/LouisDeconinck))
- Fixed Pi turns never finishing when an extension handles the prompt ([#10572](https://github.com/getpaseo/paseo/pull/10572) by [@jsilhan](https://github.com/jsilhan))
@@ -92,12 +149,16 @@
- Fixed Pi showing the prompt twice when an extension sends context before the reply ([#11533](https://github.com/getpaseo/paseo/pull/11533) by [@Stelath](https://github.com/Stelath))
- Fixed Pi chats skipping project skills and settings in trusted workspaces ([#11527](https://github.com/getpaseo/paseo/pull/11527) by [@patrick-motard](https://github.com/patrick-motard))
- Fixed new Pi agents failing with an old extension error after the conflict was fixed ([#11642](https://github.com/getpaseo/paseo/pull/11642))
- Fixed Pi receiving a cancellation when an agent approved its prompt with a chosen option ([#11814](https://github.com/getpaseo/paseo/pull/11814) by [@djbclark](https://github.com/djbclark))
- Fixed the OMP Fast toggle missing before the first prompt ([#11553](https://github.com/getpaseo/paseo/pull/11553))
- Fixed finished OMP form questions losing the question and chosen answer ([#11697](https://github.com/getpaseo/paseo/pull/11697), [#11706](https://github.com/getpaseo/paseo/pull/11706) by [@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- Fixed a failed Codex startup crashing the daemon ([#11847](https://github.com/getpaseo/paseo/pull/11847) by [@xilinshancun](https://github.com/xilinshancun))
- Fixed idle Codex agents never releasing their resources after Codex exits ([#11839](https://github.com/getpaseo/paseo/pull/11839) by [@michaelmwu](https://github.com/michaelmwu))
- Fixed Codex sends reporting failure after 60 seconds while Codex was still starting ([#11547](https://github.com/getpaseo/paseo/pull/11547) by [@nonononull](https://github.com/nonononull))
- Fixed Codex features staying hidden behind a wrapper command such as `env codex` ([#11221](https://github.com/getpaseo/paseo/pull/11221) by [@suniceman](https://github.com/suniceman))
- Fixed answers to Codex async questions being rejected ([#11225](https://github.com/getpaseo/paseo/pull/11225) by [@suniceman](https://github.com/suniceman))
- Fixed reopening a Codex chat resetting its last-activity time ([#10760](https://github.com/getpaseo/paseo/pull/10760) by [@Juns-g](https://github.com/Juns-g))
- Fixed OpenCode reply paragraphs running together ([#11745](https://github.com/getpaseo/paseo/pull/11745))
- Fixed Antigravity subagent tool calls splitting streamed replies mid-word ([#11535](https://github.com/getpaseo/paseo/pull/11535) by [@Suhail](https://github.com/Suhail))
- Fixed Antigravity turns ending as completed after an internal executor error ([#10885](https://github.com/getpaseo/paseo/pull/10885) by [@vecyang1](https://github.com/vecyang1), [@luoph](https://github.com/luoph))
- Fixed ACP chats failing to reopen when the provider rejects the saved thinking level ([#10333](https://github.com/getpaseo/paseo/pull/10333))
@@ -123,27 +184,14 @@
- Fixed a queued message running in the mode of a prompt sent after it ([#11722](https://github.com/getpaseo/paseo/pull/11722))
- Fixed `paseo ls --json` dropping timestamps and background work ([#11423](https://github.com/getpaseo/paseo/pull/11423) by [@KiritoXDone](https://github.com/KiritoXDone))
- Fixed `paseo inspect` and `paseo ls` hiding the model for Cursor Auto ([#11693](https://github.com/getpaseo/paseo/pull/11693))
- Fixed `paseo ls --label` with a malformed label listing every agent ([#11707](https://github.com/getpaseo/paseo/pull/11707) by [@KiritoXDone](https://github.com/KiritoXDone))
- Fixed `paseo terminal capture` and `paseo terminal send-keys` ignoring `--json` ([#11710](https://github.com/getpaseo/paseo/pull/11710) by [@KiritoXDone](https://github.com/KiritoXDone))
- Fixed `paseo terminal create --workspace` failing for workspaces past the first ten ([#11799](https://github.com/getpaseo/paseo/pull/11799) by [@KiritoXDone](https://github.com/KiritoXDone))
- Fixed `paseo schedule update --model` failing unless the provider was repeated ([#11796](https://github.com/getpaseo/paseo/pull/11796) by [@KiritoXDone](https://github.com/KiritoXDone))
- Fixed `paseo workspace ls` reporting a wrong password as a stopped daemon ([#11676](https://github.com/getpaseo/paseo/pull/11676) by [@chirag127](https://github.com/chirag127))
- Fixed `paseo daemon status` leaving out unconfirmed terminal cleanup ([#11658](https://github.com/getpaseo/paseo/pull/11658) by [@chirag127](https://github.com/chirag127))
- Fixed CLI archive, detach and reload scanning all agent history for a full agent ID ([#11617](https://github.com/getpaseo/paseo/pull/11617) by [@maci0](https://github.com/maci0))
### Security
- Blocked client file access to the daemon's own state in the Paseo home directory, and warned when a saved host's daemon key changes ([#11452](https://github.com/getpaseo/paseo/pull/11452))
- Restricted loopback origin matching to `localhost`, `127.0.0.1` and `::1` for daemon WebSocket and HTTP requests ([#11686](https://github.com/getpaseo/paseo/pull/11686))
- Stopped images in pull request comments and reviews from loading files from the host ([#11699](https://github.com/getpaseo/paseo/pull/11699))
- Stopped `.worktreeinclude` from copying local files into worktrees from fork pull requests ([#11709](https://github.com/getpaseo/paseo/pull/11709))
- Rejected schedule IDs that point outside the schedules directory ([#11727](https://github.com/getpaseo/paseo/pull/11727))
### Plugins
- Added a workspace layout API so plugins can open, move and close panes and tabs ([#11328](https://github.com/getpaseo/paseo/pull/11328))
- Added `requirements.app` to set a separate minimum app version from the daemon's ([#11494](https://github.com/getpaseo/paseo/pull/11494) by [@mcowger](https://github.com/mcowger))
- Fixed a plugin error in a press handler or timer closing the iOS and Android app ([#11412](https://github.com/getpaseo/paseo/pull/11412))
- Fixed plugin operations deleting plugin entries added to `config.json` by hand ([#11501](https://github.com/getpaseo/paseo/pull/11501) by [@matchy233](https://github.com/matchy233))
- Fixed registry plugin installs failing with Missing npm artifact when npm leaves registry URLs out of lockfiles ([#11656](https://github.com/getpaseo/paseo/pull/11656) by [@Brandon168](https://github.com/Brandon168))
- Fixed local plugin reloads taking 12 to 21 seconds when the daemon runs under a large directory ([#11653](https://github.com/getpaseo/paseo/pull/11653))
## 0.18.2 - 2026-11-30
- **Redesigned model picker:** Pick models from a two-pane desktop view with cross-provider search, an in-place phone drawer with a thinking slider, and per-provider model lists in settings. ([#11186](https://github.com/getpaseo/paseo/pull/11186), [#11280](https://github.com/getpaseo/paseo/pull/11280), [#11295](https://github.com/getpaseo/paseo/pull/11295), [#11371](https://github.com/getpaseo/paseo/pull/11371), [#11313](https://github.com/getpaseo/paseo/pull/11313))
+67 -19
View File
@@ -1,22 +1,53 @@
# Changelog
## 0.19.0-beta.1 - 2026-12-02
## 0.19.2 - 2026-12-05
### 修复
- 修复 OpenCode v2 中在消息中间、带附件或运行中选择的 Skill 被当作字面 `/skill` 文本发送而未加载的问题 ([#12142](https://github.com/getpaseo/paseo/pull/12142))
- 修复 Codex 中在消息中间、带附件或运行中选择的 Skill 未加载的问题 ([#12143](https://github.com/getpaseo/paseo/pull/12143))
- 修复桌面端图片附件在多窗口、切换标签页和排队发送追问消息时丢失的问题 ([#12082](https://github.com/getpaseo/paseo/pull/12082))
## 0.19.1 - 2026-12-03
### 变更
- 将 Agent 消息和子 Agent 完成通知的默认行为改为 `steer`,在不支持运行中转向的 Provider 上回退到 `queue` 而不中断当前轮次 ([#11915](https://github.com/getpaseo/paseo/pull/11915))
### 修复
- 修复直接发送 `steer` 或 `interrupt` 消息时清空队列中的消息和完成通知的问题 ([#11915](https://github.com/getpaseo/paseo/pull/11915))
- 修复排队消息批次在临时派发错误或启动超时后被丢弃而不是保留的问题 ([#11915](https://github.com/getpaseo/paseo/pull/11915))
- 修复 Claude 将排队的 steer 作为独立轮次执行后,父 Agent 漏收后续完成通知的问题 ([#11872](https://github.com/getpaseo/paseo/pull/11872))
## 0.19.0 - 2026-12-03
- **对话中切换 Provider**:可将对话切换到其他 Provider 并保留对话内容,对话记录现在存储在主机上。([#11410](https://github.com/getpaseo/paseo/pull/11410))
- **排队消息重启不丢失**:排队消息现在保存在主机上,应用重新加载、切换设备或 daemon 重启后都不会丢失。([#11424](https://github.com/getpaseo/paseo/pull/11424), [#11566](https://github.com/getpaseo/paseo/pull/11566), [#11740](https://github.com/getpaseo/paseo/pull/11740))
- **一键开关 Agent 工具**:Agent 工具现在由一个 **启用工具** 设置统一控制,包含编排、定时任务、PR 监控和浏览器分组,并默认开启。([#11189](https://github.com/getpaseo/paseo/pull/11189))
- **已连接设备列表**:**设置 → 设备** 现在会显示哪些客户端和主机已连接,以及各自可以访问的内容。([#11209](https://github.com/getpaseo/paseo/pull/11209))
- **插件评分卡**:应用和 paseo.sh 上的插件页面现在会显示评分卡、更新历史、相关插件和赞助链接。([#11563](https://github.com/getpaseo/paseo/pull/11563), [#11674](https://github.com/getpaseo/paseo/pull/11674), [#11691](https://github.com/getpaseo/paseo/pull/11691))
- **插件运行确认**:应用现在会在首次运行某个主机上插件的代码前询问一次,也可以在 **通用** 设置中关闭此提示。([#11717](https://github.com/getpaseo/paseo/pull/11717))
- **通过隧道共享服务**:可从 Scripts 菜单将正在运行的工作区服务共享到公网地址,开发服务器也会保留实时重载连接。服务现在通过 `localhost:<port>` 打开,`*.localhost` 服务地址已移除。([#11490](https://github.com/getpaseo/paseo/pull/11490))
- **Agent 运行时更省资源**:运行中的 Agent 占用的 CPU、GPU 和电量大幅减少,状态环、加载指示器和工具调用动画也更轻量。([#11456](https://github.com/getpaseo/paseo/pull/11456), [#11474](https://github.com/getpaseo/paseo/pull/11474), [#11564](https://github.com/getpaseo/paseo/pull/11564), [#11586](https://github.com/getpaseo/paseo/pull/11586), [#11591](https://github.com/getpaseo/paseo/pull/11591),贡献者:[@djbclark](https://github.com/djbclark), [@luoph](https://github.com/luoph), [@mariotaku](https://github.com/mariotaku))
- **更稳定的流式回复**:流式回复在到达时即显示最终格式,长回复的渲染也不再随长度增长而变慢。([#11572](https://github.com/getpaseo/paseo/pull/11572), [#11582](https://github.com/getpaseo/paseo/pull/11582),贡献者:[@luoph](https://github.com/luoph))
- **更快的移动端启动**:移动端冷启动后会更快显示上次的工作区,在 Android 上约快 0.7 秒。([#11390](https://github.com/getpaseo/paseo/pull/11390),贡献者:[@luoph](https://github.com/luoph), [@maci0](https://github.com/maci0))
- **桌面端浏览器配置文件**:桌面端浏览器标签页可以使用不同颜色的独立配置文件,便于在同一网站上同时登录两个账号。([#10357](https://github.com/getpaseo/paseo/pull/10357),贡献者:[@clkao](https://github.com/clkao))
- **桌面端浏览器配置文件**:桌面端浏览器标签页可以使用不同颜色的独立配置文件,便于在同一网站上同时登录两个账号。([#10357](https://github.com/getpaseo/paseo/pull/10357), [#11772](https://github.com/getpaseo/paseo/pull/11772),贡献者:[@clkao](https://github.com/clkao))
- **下滑收起 iOS 键盘**:向下拖动对话即可收起 iOS 键盘,键盘打开时对话控件首次点击即可生效。([#11625](https://github.com/getpaseo/paseo/pull/11625))
### 破坏性变更
- Paseo CLI 和 daemon 现在需要 Node.js 22.16.0 或更高版本 ([#11410](https://github.com/getpaseo/paseo/pull/11410))
- 中继连接现在默认要求[受保护的端到端加密](https://paseo.sh/zh-CN/docs/security),因此 0.13.0 之前的应用无法再通过中继连接 ([#11864](https://github.com/getpaseo/paseo/pull/11864))
### 安全
- 桌面端浏览器中的网页默认禁止访问摄像头、麦克风、位置、通知和设备 ([#11837](https://github.com/getpaseo/paseo/pull/11837))
- 阻止客户端访问 Paseo 主目录中 daemon 自身的状态文件,并在已保存主机的 daemon 密钥变化时发出警告 ([#11452](https://github.com/getpaseo/paseo/pull/11452))
- 将 daemon WebSocket 和 HTTP 请求的回环来源匹配限制为 `localhost`、`127.0.0.1` 和 `::1` ([#11686](https://github.com/getpaseo/paseo/pull/11686))
- 禁止 PR 评论和审查中的图片读取主机上的文件 ([#11699](https://github.com/getpaseo/paseo/pull/11699))
- 禁止 `.worktreeinclude` 将本地文件复制到来自 fork PR 的 worktree 中 ([#11709](https://github.com/getpaseo/paseo/pull/11709))
- 拒绝指向定时任务目录之外的定时任务 ID ([#11727](https://github.com/getpaseo/paseo/pull/11727))
### 新增
@@ -37,6 +68,7 @@
- 桌面应用的网页界面改用 Brotli 和 gzip 压缩传输,不再发送未压缩的 25 MB 包 ([#10635](https://github.com/getpaseo/paseo/pull/10635),贡献者:[@djbclark](https://github.com/djbclark))
- 对话加载改为显示一个稳定的加载指示器,并同时显示对话和 Composer,不再闪现 **正在更新消息** ([#11575](https://github.com/getpaseo/paseo/pull/11575))
- 恢复工作区时保持 Restoring 界面,直到工作区就绪 ([#11486](https://github.com/getpaseo/paseo/pull/11486))
- 调整移动端应用图标大小,使其与主屏幕上的其他图标一致,并支持 Android 主题图标和 iOS Liquid Glass ([#11851](https://github.com/getpaseo/paseo/pull/11851))
- 归档检查未提交的更改时,在 worktree 行上显示加载指示器 ([#11519](https://github.com/getpaseo/paseo/pull/11519), [#11574](https://github.com/getpaseo/paseo/pull/11574),贡献者:[@cxroop](https://github.com/cxroop))
- 在主机选择器上显示各主机的图标和状态圆点 ([#11568](https://github.com/getpaseo/paseo/pull/11568))
- iPhone 上按硬件键盘的 Return 键即可发送提示词,与 iPad 一致 ([#11537](https://github.com/getpaseo/paseo/pull/11537))
@@ -45,12 +77,29 @@
### 变更
- 归档时如果 worktree 有未提交的更改,除非确认删除,否则保留该 worktree ([#11430](https://github.com/getpaseo/paseo/pull/11430))
- **新建工作区** 界面中的 **导入会话** 改为创建新的工作区 ([#11845](https://github.com/getpaseo/paseo/pull/11845))
- 关闭带有未发送草稿的 **新建 Agent** 标签页时,会先询问是否丢弃草稿 ([#11660](https://github.com/getpaseo/paseo/pull/11660))
- 在侧边栏中 Cmd/Ctrl+点击工作区改为打开该工作区,而不再进入选择模式 ([#11472](https://github.com/getpaseo/paseo/pull/11472))
- 已通过 `send_agent_prompt` 向调用方汇报的 Agent 不再额外发送完成通知 ([#11583](https://github.com/getpaseo/paseo/pull/11583))
### 插件
- 新增工作区布局 API,插件可以打开、移动和关闭面板与标签页 ([#11328](https://github.com/getpaseo/paseo/pull/11328))
- 新增 `ProviderIcon`,插件可以显示 Paseo 的 Provider 图标 ([#4664](https://github.com/getpaseo/paseo/pull/4664),贡献者:[@omercnet](https://github.com/omercnet))
- 新增 `requirements.app`,可单独设置与 daemon 不同的最低应用版本 ([#11494](https://github.com/getpaseo/paseo/pull/11494),贡献者:[@mcowger](https://github.com/mcowger))
- 修复插件在按下处理函数或定时器中出错导致 iOS 和 Android 应用关闭的问题 ([#11412](https://github.com/getpaseo/paseo/pull/11412))
- 修复网页端和桌面端插件弹出框每次打开都加载两次内容的问题 ([#11748](https://github.com/getpaseo/paseo/pull/11748),贡献者:[@tomgrin10](https://github.com/tomgrin10))
- 修复桌面应用在插件重新加载后仍在内存中保留每个被替换插件版本的问题 ([#11800](https://github.com/getpaseo/paseo/pull/11800))
- 修复插件操作删除手动添加到 `config.json` 中插件条目的问题 ([#11501](https://github.com/getpaseo/paseo/pull/11501),贡献者:[@matchy233](https://github.com/matchy233))
- 修复 npm 在锁文件中省略 registry 地址时,注册表插件安装报 Missing npm artifact 错误的问题 ([#11656](https://github.com/getpaseo/paseo/pull/11656),贡献者:[@Brandon168](https://github.com/Brandon168))
- 修复 daemon 运行在大型目录下时,本地插件重新加载耗时 12 至 21 秒的问题 ([#11653](https://github.com/getpaseo/paseo/pull/11653))
### 修复
- 修复更改运行中 Agent 的思考强度、模式和模型后又跳回旧值的问题 ([#11850](https://github.com/getpaseo/paseo/pull/11850))
- 修复已完成的 Agent 短暂闪回运行中状态的问题 ([#11764](https://github.com/getpaseo/paseo/pull/11764))
- 修复对排队消息使用 **立即发送** 时取消正在运行的轮次、而不是引导该轮次的问题 ([#11827](https://github.com/getpaseo/paseo/pull/11827))
- 修复发送失败或完成后,覆盖发送期间输入的后续草稿的问题 ([#11448](https://github.com/getpaseo/paseo/pull/11448),贡献者:[@suniceman](https://github.com/suniceman))
- 修复附加超过 2000 px 的图片后,该对话之后的每一轮都失败的问题 ([#5119](https://github.com/getpaseo/paseo/pull/5119),贡献者:[@RUIIIOVO](https://github.com/RUIIIOVO))
- 修复关闭 Paseo 工具时语音模式 Agent 始终不回话的问题 ([#11161](https://github.com/getpaseo/paseo/pull/11161))
- 修复在没有 daemon 连接时关闭语音模式后麦克风仍保持开启的问题 ([#11587](https://github.com/getpaseo/paseo/pull/11587),贡献者:[@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
@@ -61,18 +110,25 @@
- 修复重连复用订阅后终端输出停止的问题 ([#10433](https://github.com/getpaseo/paseo/pull/10433),贡献者:[@chirag127](https://github.com/chirag127))
- 修复应用在主机连接前启动时 **文件** 显示 **Host 未连接** 的问题 ([#11679](https://github.com/getpaseo/paseo/pull/11679))
- 修复主机离线时 **创建时间** 和 **最近提示词** 排序选项消失的问题 ([#11728](https://github.com/getpaseo/paseo/pull/11728))
- 修复在 iOS 和 Android 上横向滑动水平滚动区域时打开或关闭侧边面板的问题 ([#11841](https://github.com/getpaseo/paseo/pull/11841))
- 修复在 iOS 上点击标题栏会将对话、Explorer 或工作区列表滚动到顶部的问题 ([#11262](https://github.com/getpaseo/paseo/pull/11262),贡献者:[@yzim](https://github.com/yzim))
- 修复文件面板在打开过程中被关闭后,留下阻挡点击的不可见遮罩的问题 ([#11317](https://github.com/getpaseo/paseo/pull/11317),贡献者:[@LiebeLee](https://github.com/LiebeLee))
- 修复底部面板在打开动画开始前被关闭后仍保持打开的问题 ([#11632](https://github.com/getpaseo/paseo/pull/11632))
- 修复 Android 在选择图片期间重建应用后未附加任何内容的问题 ([#7734](https://github.com/getpaseo/paseo/pull/7734))
- 修复在 Linux 上中键点击标签页时将选中内容粘贴到终端的问题 ([#11818](https://github.com/getpaseo/paseo/pull/11818))
- 修复按下 Cmd/Ctrl+F 后立即输入时 **查找** 丢失前几个按键的问题 ([#11812](https://github.com/getpaseo/paseo/pull/11812))
- 修复在网页版 Composer 中粘贴文件时插入文件路径而不是添加附件的问题 ([#11718](https://github.com/getpaseo/paseo/pull/11718))
- 修复 **内容字体大小** 未应用到网页端对话中已有用户消息的问题 ([#11469](https://github.com/getpaseo/paseo/pull/11469),贡献者:[@bearyjd](https://github.com/bearyjd))
- 修复 Markdown 表格单元格中的 `<br>` 拆分表格行的问题 ([#9587](https://github.com/getpaseo/paseo/pull/9587),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
- 修复网页端隐藏的对话行导致阅读位置偏移的问题 ([#11538](https://github.com/getpaseo/paseo/pull/11538),贡献者:[@kogekiplay](https://github.com/kogekiplay))
- 修复不带结尾斜杠的工作区外文件夹链接被打开为损坏的文件标签页的问题 ([#11786](https://github.com/getpaseo/paseo/pull/11786))
- 修复 `paseo.json` 变更后 Scripts 菜单未更新的问题 ([#11768](https://github.com/getpaseo/paseo/pull/11768),贡献者:[@odoo-mvds](https://github.com/odoo-mvds))
- 修复工具调用详情的空状态文字紧贴屏幕边缘的问题 ([#9129](https://github.com/getpaseo/paseo/pull/9129),贡献者:[@ilteoood](https://github.com/ilteoood))
- 修复带附件的插件斜杠命令被当作消息发送给 Agent 的问题 ([#11483](https://github.com/getpaseo/paseo/pull/11483),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 **归档已完成的 subagent** 跳过已关闭子 Agent 的问题 ([#10865](https://github.com/getpaseo/paseo/pull/10865),贡献者:[@sbhas2k](https://github.com/sbhas2k))
- 修复 **导入会话** 遗漏最新 ACP 会话的问题 ([#10675](https://github.com/getpaseo/paseo/pull/10675))
- 修复 **导入会话** 在 **重试** 期间隐藏 Provider 错误的问题 ([#11654](https://github.com/getpaseo/paseo/pull/11654))
- 修复 **导入会话** 无法打开旧版自定义 Codex Provider 对话的问题 ([#11852](https://github.com/getpaseo/paseo/pull/11852))
- 修复设置时丢弃 60 秒后才响应的 Provider 所给出的项目建议的问题 ([#11438](https://github.com/getpaseo/paseo/pull/11438),贡献者:[@suniceman](https://github.com/suniceman))
- 修复远程主机上的工作区显示 Open in file manager 的问题 ([#11463](https://github.com/getpaseo/paseo/pull/11463),贡献者:[@sleroq](https://github.com/sleroq))
- 修复根目录为 `/` 的工作区无法使用 Reveal in Finder 的问题 ([#11206](https://github.com/getpaseo/paseo/pull/11206),贡献者:[@suniceman](https://github.com/suniceman))
@@ -85,6 +141,7 @@
- 修复 Claude 自行开始的轮次在重新打开的对话中被隐藏、直到 **重新加载** 才显示的问题 ([#11405](https://github.com/getpaseo/paseo/pull/11405))
- 修复 Claude Code 系统通知从对话中丢失的问题 ([#11419](https://github.com/getpaseo/paseo/pull/11419),贡献者:[@minamorl](https://github.com/minamorl))
- 修复导入的 Claude Code 对话中缺少 Goal set 回复的问题 ([#11733](https://github.com/getpaseo/paseo/pull/11733))
- 修复 Claude Code Stop hook 警告提示按下一个在 Paseo 中会打开 **添加项目** 的快捷键的问题 ([#11792](https://github.com/getpaseo/paseo/pull/11792))
- 修复在已归档的 Claude 对话中列出命令时启动 Claude Code 的问题 ([#11521](https://github.com/getpaseo/paseo/pull/11521),贡献者:[@RawSalmon69](https://github.com/RawSalmon69))
- 修复 **停止** 对无响应的 Pi 和 OMP Agent 无效的问题 ([#11618](https://github.com/getpaseo/paseo/pull/11618),贡献者:[@LouisDeconinck](https://github.com/LouisDeconinck))
- 修复扩展处理提示词时 Pi 轮次永远无法结束的问题 ([#10572](https://github.com/getpaseo/paseo/pull/10572),贡献者:[@jsilhan](https://github.com/jsilhan))
@@ -92,12 +149,16 @@
- 修复扩展在回复前发送上下文时 Pi 重复显示提示词的问题 ([#11533](https://github.com/getpaseo/paseo/pull/11533),贡献者:[@Stelath](https://github.com/Stelath))
- 修复在受信任的工作区中 Pi 对话跳过项目技能和设置的问题 ([#11527](https://github.com/getpaseo/paseo/pull/11527),贡献者:[@patrick-motard](https://github.com/patrick-motard))
- 修复冲突解决后新建 Pi Agent 仍报旧扩展错误的问题 ([#11642](https://github.com/getpaseo/paseo/pull/11642))
- 修复 Agent 以所选选项批准 Pi 提示时 Pi 收到取消的问题 ([#11814](https://github.com/getpaseo/paseo/pull/11814),贡献者:[@djbclark](https://github.com/djbclark))
- 修复首次发送提示词前缺少 OMP **快速** 开关的问题 ([#11553](https://github.com/getpaseo/paseo/pull/11553))
- 修复已完成的 OMP 表单提问不再显示提问内容和所选答案的问题 ([#11697](https://github.com/getpaseo/paseo/pull/11697), [#11706](https://github.com/getpaseo/paseo/pull/11706),贡献者:[@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- 修复 Codex 启动失败导致 daemon 崩溃的问题 ([#11847](https://github.com/getpaseo/paseo/pull/11847),贡献者:[@xilinshancun](https://github.com/xilinshancun))
- 修复 Codex 退出后空闲的 Codex Agent 始终不释放资源的问题 ([#11839](https://github.com/getpaseo/paseo/pull/11839),贡献者:[@michaelmwu](https://github.com/michaelmwu))
- 修复 Codex 仍在启动时发送消息于 60 秒后报告失败的问题 ([#11547](https://github.com/getpaseo/paseo/pull/11547),贡献者:[@nonononull](https://github.com/nonononull))
- 修复通过 `env codex` 等包装命令启动时 Codex 功能被隐藏的问题 ([#11221](https://github.com/getpaseo/paseo/pull/11221),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 Codex 异步提问的回答被拒绝的问题 ([#11225](https://github.com/getpaseo/paseo/pull/11225),贡献者:[@suniceman](https://github.com/suniceman))
- 修复重新打开 Codex 对话时重置其最近活动时间的问题 ([#10760](https://github.com/getpaseo/paseo/pull/10760),贡献者:[@Juns-g](https://github.com/Juns-g))
- 修复 OpenCode 回复的段落连在一起的问题 ([#11745](https://github.com/getpaseo/paseo/pull/11745))
- 修复 Antigravity 子 Agent 工具调用将流式回复从单词中间截断的问题 ([#11535](https://github.com/getpaseo/paseo/pull/11535),贡献者:[@Suhail](https://github.com/Suhail))
- 修复 Antigravity 轮次在内部执行器出错后仍以完成状态结束的问题 ([#10885](https://github.com/getpaseo/paseo/pull/10885),贡献者:[@vecyang1](https://github.com/vecyang1), [@luoph](https://github.com/luoph))
- 修复 Provider 拒绝已保存的思考强度时 ACP 对话无法重新打开的问题 ([#10333](https://github.com/getpaseo/paseo/pull/10333))
@@ -123,27 +184,14 @@
- 修复排队消息以之后发送的提示词的模式运行的问题 ([#11722](https://github.com/getpaseo/paseo/pull/11722))
- 修复 `paseo ls --json` 丢失时间戳和后台任务的问题 ([#11423](https://github.com/getpaseo/paseo/pull/11423),贡献者:[@KiritoXDone](https://github.com/KiritoXDone))
- 修复 `paseo inspect` 和 `paseo ls` 隐藏 Cursor Auto 模型的问题 ([#11693](https://github.com/getpaseo/paseo/pull/11693))
- 修复 `paseo ls --label` 使用格式错误的标签时列出所有 Agent 的问题 ([#11707](https://github.com/getpaseo/paseo/pull/11707),贡献者:[@KiritoXDone](https://github.com/KiritoXDone))
- 修复 `paseo terminal capture` 和 `paseo terminal send-keys` 忽略 `--json` 的问题 ([#11710](https://github.com/getpaseo/paseo/pull/11710),贡献者:[@KiritoXDone](https://github.com/KiritoXDone))
- 修复 `paseo terminal create --workspace` 对排在前十个之后的工作区失败的问题 ([#11799](https://github.com/getpaseo/paseo/pull/11799),贡献者:[@KiritoXDone](https://github.com/KiritoXDone))
- 修复 `paseo schedule update --model` 必须重复指定 Provider 才能成功的问题 ([#11796](https://github.com/getpaseo/paseo/pull/11796),贡献者:[@KiritoXDone](https://github.com/KiritoXDone))
- 修复 `paseo workspace ls` 将密码错误报告为 daemon 已停止的问题 ([#11676](https://github.com/getpaseo/paseo/pull/11676),贡献者:[@chirag127](https://github.com/chirag127))
- 修复 `paseo daemon status` 遗漏未确认的终端清理的问题 ([#11658](https://github.com/getpaseo/paseo/pull/11658),贡献者:[@chirag127](https://github.com/chirag127))
- 修复 CLI 归档、分离和重新加载时为匹配完整 Agent ID 而扫描全部 Agent 历史记录的问题 ([#11617](https://github.com/getpaseo/paseo/pull/11617),贡献者:[@maci0](https://github.com/maci0))
### 安全
- 阻止客户端访问 Paseo 主目录中 daemon 自身的状态文件,并在已保存主机的 daemon 密钥变化时发出警告 ([#11452](https://github.com/getpaseo/paseo/pull/11452))
- 将 daemon WebSocket 和 HTTP 请求的回环来源匹配限制为 `localhost`、`127.0.0.1` 和 `::1` ([#11686](https://github.com/getpaseo/paseo/pull/11686))
- 禁止 PR 评论和审查中的图片读取主机上的文件 ([#11699](https://github.com/getpaseo/paseo/pull/11699))
- 禁止 `.worktreeinclude` 将本地文件复制到来自 fork PR 的 worktree 中 ([#11709](https://github.com/getpaseo/paseo/pull/11709))
- 拒绝指向定时任务目录之外的定时任务 ID ([#11727](https://github.com/getpaseo/paseo/pull/11727))
### 插件
- 新增工作区布局 API,插件可以打开、移动和关闭面板与标签页 ([#11328](https://github.com/getpaseo/paseo/pull/11328))
- 新增 `requirements.app`,可单独设置与 daemon 不同的最低应用版本 ([#11494](https://github.com/getpaseo/paseo/pull/11494),贡献者:[@mcowger](https://github.com/mcowger))
- 修复插件在按下处理函数或定时器中出错导致 iOS 和 Android 应用关闭的问题 ([#11412](https://github.com/getpaseo/paseo/pull/11412))
- 修复插件操作删除手动添加到 `config.json` 中插件条目的问题 ([#11501](https://github.com/getpaseo/paseo/pull/11501),贡献者:[@matchy233](https://github.com/matchy233))
- 修复 npm 在锁文件中省略 registry 地址时,注册表插件安装报 Missing npm artifact 错误的问题 ([#11656](https://github.com/getpaseo/paseo/pull/11656),贡献者:[@Brandon168](https://github.com/Brandon168))
- 修复 daemon 运行在大型目录下时,本地插件重新加载耗时 12 至 21 秒的问题 ([#11653](https://github.com/getpaseo/paseo/pull/11653))
## 0.18.2 - 2026-11-30
- **重新设计的模型选择器**:桌面端采用支持跨 Provider 搜索的双栏视图,手机端合并为带思考强度滑块的单层抽屉,并支持在设置中按 Provider 筛选常用模型。([#11186](https://github.com/getpaseo/paseo/pull/11186), [#11280](https://github.com/getpaseo/paseo/pull/11280), [#11295](https://github.com/getpaseo/paseo/pull/11295), [#11371](https://github.com/getpaseo/paseo/pull/11371), [#11313](https://github.com/getpaseo/paseo/pull/11313))
+56 -56
View File
@@ -21,60 +21,60 @@ This is an npm workspace monorepo:
At the start of non-trivial work, list `docs/` and skim anything relevant to the task.
| Doc | What's in it |
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| [docs/product.md](docs/product.md) | What Paseo is, who it's for, where it's going |
| [docs/architecture.md](docs/architecture.md) | System design, package layering, WebSocket protocol, agent lifecycle, data flow |
| [docs/agent-lifecycle.md](docs/agent-lifecycle.md) | Agent states, parent/child relationships, archive semantics, tabs vs archive, subagents track |
| [docs/data-model.md](docs/data-model.md) | File-based JSON persistence, Zod schemas, atomic writes, no migrations |
| [docs/glossary.md](docs/glossary.md) | Authoritative terminology — UI label wins, no synonyms |
| [docs/coding-standards.md](docs/coding-standards.md) | Type hygiene, error handling, state design, React patterns, file organization |
| [docs/design.md](docs/design.md) | Design system — tokens, buttons, hierarchy, density, alignment rails, states, what's forbidden |
| [docs/forms.md](docs/forms.md) | Form architecture — non-React form model, form kit, load-state gating; the schedule form is the golden example |
| [docs/hover.md](docs/hover.md) | Hover — the canonical pattern (plain View + onPointerEnter/Leave, separate inner Pressable) and the three ways agents break it |
| [docs/unistyles.md](docs/unistyles.md) | Unistyles gotchas — `useUnistyles()` is forbidden, alternatives in order |
| [docs/floating-panels.md](docs/floating-panels.md) | Anchored popovers — Portal/Modal escape for Android, lifecycle gates, keyboard-shared-value, status-bar offset, the flash |
| [docs/keyboard-shortcuts.md](docs/keyboard-shortcuts.md) | The binding table, per-platform key sources, badges vs routing, iOS `UIKeyCommand` limits |
| [docs/menus.md](docs/menus.md) | The menu engine — popover vs sheet, submenu pages, hover intent, when a decision earns a submenu |
| [docs/drag-reorder.md](docs/drag-reorder.md) | Drag to reorder — `DraggableList` and its handle, the scroll view that must host the drag, grip placement, testing on a phone |
| [docs/expo-router.md](docs/expo-router.md) | Expo Router route ownership, startup restore, and native blank-screen gotchas |
| [docs/notifications.md](docs/notifications.md) | Notification tap ownership, native replay and acknowledgement, startup handoff, and payload QA |
| [docs/file-icons.md](docs/file-icons.md) | Material icon theme integration for the file explorer |
| [docs/providers.md](docs/providers.md) | Adding a new agent provider end-to-end |
| [docs/forge-providers.md](docs/forge-providers.md) | Adding a git forge: registry/manifest, drop-in checklist, self-host/GHES, the two facts tiers |
| [docs/custom-providers.md](docs/custom-providers.md) | Custom provider config: Z.AI, Alibaba/Qwen, ACP agents, profiles, custom binaries |
| [docs/plugins.md](docs/plugins.md) | Local plugin manifest, directory source config, RPCs, native surfaces, and attachment sources |
| [docs/website-i18n.md](docs/website-i18n.md) | Website languages: locale URLs, translated Markdown pairs, `{#id}` anchors, Chinese style |
| [docs/relay-endpoint-security.md](docs/relay-endpoint-security.md) | Relay E2EE modes: Noise NK mapping, record framing, negotiation, the `requireProtectedSecurity` flag, close codes |
| [docs/development.md](docs/development.md) | Dev server, build sync gotchas, CLI reference, agent state, Playwright MCP |
| [docs/rpc-namespacing.md](docs/rpc-namespacing.md) | WebSocket RPC naming convention — dotted namespaces and `.request`/`.response` pairs |
| [docs/protocol-compatibility.md](docs/protocol-compatibility.md) | Why app/daemon versions drift, protocol vs feature contract, capability gating, COMPAT tagging |
| [docs/protocol-validation.md](docs/protocol-validation.md) | zod-aot generated inbound WebSocket validation, patched compiler regressions, schema-purity rules |
| [docs/connected-hosts.md](docs/connected-hosts.md) | Daemon-owned host registrations, routed SDK scopes, identity and authority boundaries |
| [docs/permissions.md](docs/permissions.md) | Semantic daemon permissions, principals, credentials, pairing invitations, and Hub authority |
| [docs/terminal-performance.md](docs/terminal-performance.md) | Terminal latency pipeline, coalescing/backpressure invariants, benchmark + perf spec usage |
| [docs/terminal-rendering.md](docs/terminal-rendering.md) | Native terminal view: xterm owns the grid, cluster placement, emoji widths, mixed-direction limits, render regression |
| [docs/timeline-sync.md](docs/timeline-sync.md) | Owned agent history, rewind retirements, live stream vs authoritative fetch, paged catch-up, client replica |
| [docs/agent-stream-performance.md](docs/agent-stream-performance.md) | Assistant text pipeline — coalescing window, paced reveal, why arrival lumps are smoothed at render |
| [docs/agent-stream-disclosure.md](docs/agent-stream-disclosure.md) | Expand/collapse in the chat timeline — hold contract, native anchor sequence, frame spacing, render-window cost |
| [docs/running-indicators.md](docs/running-indicators.md) | Loader, status ring, tool-call shimmer — motion policy, compositor loops on web, native-driver clock, why not CSS keyframes |
| [docs/markdown-renderer.md](docs/markdown-renderer.md) | Shared Markdown engine, the vendored library fork, native selection, links, images and library constraints |
| [docs/native-text-selection.md](docs/native-text-selection.md) | Native diagram grouping, selection boundaries and leading inline image limitations |
| [docs/file-observation.md](docs/file-observation.md) | Recursive watcher ownership, Linux constraints, teardown invariants, and Parcel comparison |
| [docs/testing.md](docs/testing.md) | TDD workflow, determinism, real dependencies over mocks, test organization |
| [docs/qa.md](docs/qa.md) | QA evidence bar for pull requests — platform matrix, version drift, performance, UI proof |
| [docs/mobile-testing.md](docs/mobile-testing.md) | Maestro and mobile test workflows |
| [docs/mobile-panels.md](docs/mobile-panels.md) | Compact left/center/right panel ownership, worklet motion, gesture revisions, and Fabric constraints |
| [docs/explorer-sidebar.md](docs/explorer-sidebar.md) | Explorer sidebar, side-pane, and compact workspace sheet host contracts, lifecycle, placement, routing preferences |
| [docs/ad-hoc-daemon-testing.md](docs/ad-hoc-daemon-testing.md) | Isolated in-process daemon test harness |
| [docs/browser-capture-harness.md](docs/browser-capture-harness.md) | Real-Electron browser screenshot harness and compositor-surface gotcha |
| [docs/android.md](docs/android.md) | App variants, local/cloud builds, EAS workflows, version codes, F-Droid source builds and store metadata |
| [docs/docker.md](docs/docker.md) | Running the daemon and bundled web UI in Docker, volumes, agent images, security |
| [docs/release.md](docs/release.md) | Release playbook, draft releases, completion checklist |
| [docs/terminal-worker.md](docs/terminal-worker.md) | Terminal worker process model, socket/record/secret, protocol-bump rule and draining, the worker's file copy, Windows desktop |
| [docs/terminal-activity.md](docs/terminal-activity.md) | Terminal activity indicators — source-agnostic tracker, agent hook reporting, adding a new hook provider |
| [SECURITY.md](SECURITY.md) | Relay threat model, E2E encryption, DNS rebinding, agent auth |
| [public-docs/hub/security.md](public-docs/hub/security.md) | Public Hub guide — trust boundaries, untrusted triggers, provider controls, and output authority |
| Doc | What's in it |
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [docs/product.md](docs/product.md) | What Paseo is, who it's for, where it's going |
| [docs/architecture.md](docs/architecture.md) | System design, package layering, WebSocket protocol, agent lifecycle, data flow |
| [docs/agent-lifecycle.md](docs/agent-lifecycle.md) | Agent states, parent/child relationships, archive semantics, tabs vs archive, subagents track |
| [docs/data-model.md](docs/data-model.md) | File-based JSON persistence, Zod schemas, atomic writes, no migrations |
| [docs/glossary.md](docs/glossary.md) | Authoritative terminology — UI label wins, no synonyms |
| [docs/coding-standards.md](docs/coding-standards.md) | Type hygiene, error handling, state design, React patterns, file organization |
| [docs/design.md](docs/design.md) | Design system — tokens, buttons, hierarchy, density, alignment rails, states, what's forbidden |
| [docs/forms.md](docs/forms.md) | Form architecture — non-React form model, form kit, load-state gating; the schedule form is the golden example |
| [docs/hover.md](docs/hover.md) | Hover — the canonical pattern (plain View + onPointerEnter/Leave, separate inner Pressable) and the three ways agents break it |
| [docs/unistyles.md](docs/unistyles.md) | Unistyles gotchas — `useUnistyles()` is forbidden, alternatives in order |
| [docs/floating-panels.md](docs/floating-panels.md) | Anchored popovers — Portal/Modal escape for Android, lifecycle gates, keyboard-shared-value, status-bar offset, the flash |
| [docs/keyboard-shortcuts.md](docs/keyboard-shortcuts.md) | Action and keybinding registries, action scopes, overlay covers, plugin actions, key sources, badges, iOS `UIKeyCommand` limits |
| [docs/menus.md](docs/menus.md) | The menu engine — popover vs sheet, submenu pages, hover intent, when a decision earns a submenu |
| [docs/drag-reorder.md](docs/drag-reorder.md) | Drag to reorder — `DraggableList` and its handle, the scroll view that must host the drag, grip placement, testing on a phone |
| [docs/expo-router.md](docs/expo-router.md) | Expo Router route ownership, startup restore, and native blank-screen gotchas |
| [docs/notifications.md](docs/notifications.md) | Notification tap ownership, native replay and acknowledgement, startup handoff, and payload QA |
| [docs/file-icons.md](docs/file-icons.md) | Material icon theme integration for the file explorer |
| [docs/providers.md](docs/providers.md) | Adding a new agent provider end-to-end |
| [docs/forge-providers.md](docs/forge-providers.md) | Adding a git forge: registry/manifest, drop-in checklist, self-host/GHES, the two facts tiers |
| [docs/custom-providers.md](docs/custom-providers.md) | Custom provider config: Z.AI, Alibaba/Qwen, ACP agents, profiles, custom binaries |
| [docs/plugins.md](docs/plugins.md) | Local plugin manifest, directory source config, RPCs, native surfaces, and attachment sources |
| [docs/website-i18n.md](docs/website-i18n.md) | Website languages: locale URLs, translated Markdown pairs, `{#id}` anchors, Chinese style |
| [docs/relay-endpoint-security.md](docs/relay-endpoint-security.md) | Relay E2EE modes: Noise NK mapping, record framing, negotiation, the `requireProtectedSecurity` flag, close codes |
| [docs/development.md](docs/development.md) | Dev server, build sync gotchas, CLI reference, agent state, Playwright MCP |
| [docs/rpc-namespacing.md](docs/rpc-namespacing.md) | WebSocket RPC naming convention — dotted namespaces and `.request`/`.response` pairs |
| [docs/protocol-compatibility.md](docs/protocol-compatibility.md) | Why app/daemon versions drift, protocol vs feature contract, capability gating, COMPAT tagging |
| [docs/protocol-validation.md](docs/protocol-validation.md) | zod-aot generated inbound WebSocket validation, patched compiler regressions, schema-purity rules |
| [docs/connected-hosts.md](docs/connected-hosts.md) | Daemon-owned host registrations, routed SDK scopes, identity and authority boundaries |
| [docs/permissions.md](docs/permissions.md) | Semantic daemon permissions, principals, credentials, pairing invitations, and Hub authority |
| [docs/terminal-performance.md](docs/terminal-performance.md) | Terminal latency pipeline, coalescing/backpressure invariants, benchmark + perf spec usage |
| [docs/terminal-rendering.md](docs/terminal-rendering.md) | Native terminal view: xterm owns the grid, cluster placement, emoji widths, mixed-direction limits, render regression |
| [docs/timeline-sync.md](docs/timeline-sync.md) | Owned agent history, rewind retirements, live stream vs authoritative fetch, paged catch-up, client replica |
| [docs/agent-stream-performance.md](docs/agent-stream-performance.md) | Assistant text pipeline — coalescing window, paced reveal, why arrival lumps are smoothed at render |
| [docs/agent-stream-disclosure.md](docs/agent-stream-disclosure.md) | Expand/collapse in the chat timeline — hold contract, native anchor sequence, frame spacing, render-window cost |
| [docs/running-indicators.md](docs/running-indicators.md) | Loader, status ring, tool-call shimmer — motion policy, compositor loops on web, native-driver clock, why not CSS keyframes |
| [docs/markdown-renderer.md](docs/markdown-renderer.md) | Shared Markdown engine, the vendored library fork, native selection, links, images and library constraints |
| [docs/native-text-selection.md](docs/native-text-selection.md) | Native diagram grouping, selection boundaries and leading inline image limitations |
| [docs/file-observation.md](docs/file-observation.md) | Recursive watcher ownership, Linux constraints, teardown invariants, and Parcel comparison |
| [docs/testing.md](docs/testing.md) | TDD workflow, determinism, real dependencies over mocks, test organization |
| [docs/qa.md](docs/qa.md) | QA evidence bar for pull requests — platform matrix, version drift, performance, UI proof |
| [docs/mobile-testing.md](docs/mobile-testing.md) | Maestro and mobile test workflows |
| [docs/mobile-panels.md](docs/mobile-panels.md) | Compact left/center/right panel ownership, worklet motion, gesture revisions, and Fabric constraints |
| [docs/explorer-sidebar.md](docs/explorer-sidebar.md) | Explorer sidebar, side-pane, and compact workspace sheet host contracts, lifecycle, placement, routing preferences |
| [docs/ad-hoc-daemon-testing.md](docs/ad-hoc-daemon-testing.md) | Isolated in-process daemon test harness |
| [docs/browser-capture-harness.md](docs/browser-capture-harness.md) | Real-Electron browser screenshot harness and compositor-surface gotcha |
| [docs/android.md](docs/android.md) | App variants, local/cloud builds, EAS workflows, version codes, F-Droid source builds and store metadata |
| [docs/docker.md](docs/docker.md) | Running the daemon and bundled web UI in Docker, volumes, agent images, security |
| [docs/release.md](docs/release.md) | Release playbook, draft releases, completion checklist |
| [docs/terminal-worker.md](docs/terminal-worker.md) | Terminal worker process model, socket/record/secret, protocol-bump rule and draining, the worker's file copy, Windows desktop |
| [docs/terminal-activity.md](docs/terminal-activity.md) | Terminal activity indicators — source-agnostic tracker, agent hook reporting, adding a new hook provider |
| [SECURITY.md](SECURITY.md) | Relay threat model, E2E encryption, DNS rebinding, agent auth |
| [public-docs/hub/security.md](public-docs/hub/security.md) | Public Hub guide — trust boundaries, untrusted triggers, provider controls, and output authority |
### Writing docs
@@ -175,7 +175,7 @@ The app runs on iOS, Android, web (browser), and web (Electron desktop). Code is
| Use a native-only API (Haptics, push tokens, camera) | `if (isNative)` |
| Use an Electron bridge (file dialog, titlebar, updates) | `if (getIsElectron())` |
| Switch layout between phone and tablet/desktop | `useIsCompactFormFactor()` |
| Show something on hover, always-visible on native | `isHovered \|\| isNative \|\| isCompact` (hover only works on web) |
| Show something on hover, always-visible on touch screens | `isHovered \|\| revealsWithoutHover` (see [docs/hover.md](docs/hover.md)) |
| Gate to iOS or Android specifically | `Platform.OS === "ios"` / `Platform.OS === "android"` (rare, keep inline) |
### Rules
@@ -198,7 +198,7 @@ The app runs on iOS, Android, web (browser), and web (Electron desktop). Code is
Import as `@/desktop/browser/pane` — Electron desktop gets the `.electron.tsx` file, browser web gets `.web.tsx`, and native gets the native/base implementation.
- **NEVER use raw DOM APIs without `isWeb` guard.** DOM APIs crash native. Casting a RN ref to `HTMLElement` is a red flag — ensure the block is web-only.
- **NEVER use `onPointerEnter`/`onPointerLeave`.** They don't fire on native iOS.
- **Hover only works on web.** React Native's `onHoverIn`/`onHoverOut` on `Pressable` does NOT fire on native iOS/iPad — the underlying W3C pointer events are behind disabled experimental flags. For hover-to-show UI (kebab menus, action buttons), use `isHovered || isNative || isCompact` so the controls are always visible on native and hover-to-show on web.
- **Hover needs a mouse-like pointer.** React Native's `onHoverIn`/`onHoverOut` on `Pressable` does NOT fire on native iOS/iPad — the underlying W3C pointer events are behind disabled experimental flags. For hover-to-show UI (kebab menus, action buttons), call `useRevealsWithoutHover()` unconditionally, then use `isHovered || revealsWithoutHover` so the controls are always visible on touch screens and hover-to-show elsewhere. Don't use `isNative` for this: a native build is not the only touch-first surface, since a touch-first browser such as iPad Safari is `isWeb` but cannot hover.
- **Don't use Platform.OS as a proxy for layout capabilities.** Use breakpoints for layout decisions, not platform checks.
- **Import `isWeb`/`isNative` from `@/constants/platform`.** Never write `const isWeb = Platform.OS === "web"` locally.
+4 -2
View File
@@ -22,9 +22,11 @@ The relay is designed to be untrusted. All traffic between your phone and daemon
1. The daemon generates a persistent Curve25519 keypair on first run and stores it at `$PASEO_HOME/daemon-keypair.json` with mode `0600`
2. The pairing URL (rendered as a QR code or opened directly) carries the daemon's public key in its URL fragment (`https://app.paseo.sh/#offer=...`). Fragments are not sent to the web server, so `app.paseo.sh` never sees the key.
3. When the phone connects via the relay, it generates fresh ephemeral keys and sends an `e2ee_hello` message. The daemon will not process any application messages until this handshake completes.
4. Updated peers run a Noise `NK` handshake (`Noise_NK_25519_ChaChaPoly_SHA256`) keyed to the daemon's static key: the `e2ee_hello` carries the first Noise message and the daemon's `e2ee_ready` carries the second. Every later frame is a counter-nonced ChaCha20-Poly1305 record. When either side predates this, the session falls back to the legacy construction: a Curve25519 ECDH shared key with XSalsa20-Poly1305 (NaCl `box`) and a random `[24-byte nonce][ciphertext]` bundle. Both modes negotiate `binaryCiphertext`: negotiated application text is carried as a base64 WebSocket text frame, while application binary is carried as a raw WebSocket binary frame. A peer that does not negotiate the capability uses base64 text frames for both kinds. [docs/relay-endpoint-security.md](docs/relay-endpoint-security.md) has the exact mapping.
4. Updated peers run a Noise `NK` handshake (`Noise_NK_25519_ChaChaPoly_SHA256`) keyed to the daemon's static key: the `e2ee_hello` carries the first Noise message and the daemon's `e2ee_ready` carries the second. Every later frame is a counter-nonced ChaCha20-Poly1305 record. When either side predates this, the session falls back to the legacy construction: a Curve25519 ECDH shared key with XSalsa20-Poly1305 (NaCl `box`) and a random `[24-byte nonce][ciphertext]` bundle. Both modes negotiate `binaryCiphertext`. In protected mode every record then travels as a WebSocket binary frame, and an authenticated `kind` byte inside the record says whether the plaintext is text or binary. In legacy mode negotiated application text is carried as a base64 WebSocket text frame and application binary as a raw WebSocket binary frame. A peer that does not negotiate the capability uses base64 text frames for both kinds. [docs/relay-endpoint-security.md](docs/relay-endpoint-security.md) has the exact mapping.
The WebSocket opcode is preserved end to end after negotiation; the receiver never guesses whether authenticated plaintext is text or binary from its byte contents. The plaintext handshake remains WebSocket text and contains only public keys and capability declarations.
After negotiation the receiver never guesses whether authenticated plaintext is text or binary from its byte contents: protected mode reads the authenticated `kind` byte and legacy mode reads the WebSocket opcode. The plaintext handshake remains WebSocket text and contains only public keys and capability declarations.
When both peers negotiate a frame codec (`frame_codecs`), frames of 1024 bytes or more are compressed statelessly per frame before encryption. Compression never shares dictionary state across frames and enforces the 100 MiB logical message limit as a hard decompression cap. `hello` and the `server_info` that answers it are never compressed: the client selects its codec from `server_info`, and the relay E2EE downgrade check reads `server_info` as text. Clients do not advertise codecs on loopback connections, where compression costs CPU and saves no bandwidth. As with any compression before encryption, compressed frame lengths remain observable to the relay.
The relay sees only: IP addresses, timing, message sizes, session IDs, and the plaintext `e2ee_hello` / `e2ee_ready` handshake frames (which contain only public keys). It cannot read message contents, forge messages, or derive encryption keys from observing the handshake.
+1 -1
View File
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG NODE_IMAGE=node:22-bookworm-slim
ARG NODE_IMAGE=node:22-bookworm-slim@sha256:be979e5523c76fa4d5ca4ebd3099078f220aa47ec39c48ad5b5df9314debd6eb
FROM --platform=$BUILDPLATFORM ${NODE_IMAGE} AS source-pack
ARG PASEO_VERSION
+23 -20
View File
@@ -154,15 +154,15 @@ Users can also detach an existing subagent from the subagents track. Detach is d
Agent-originated messages and automatic notifications share a recipient-daemon delivery module. The daemon saves a queued message, then acknowledges it with a receipt, before provider dispatch. The module keeps one ordered queue per recipient, and the recipient reads its prompts in the order the daemon admitted them. Nothing overtakes an older queued message. A prompt takes its place when the daemon admits it, even while the provider is still starting an earlier turn, and a message stays in the queue until the turn that carries it starts. The turn has started when the agent manager acknowledges the run start; a turn that fails after that point is not delivered again.
Any sender picks `queue`, `steer`, or `interrupt` with `activeTurnBehavior`. Agent senders default to `queue`; non-agent senders (app, CLI, plugins, Hub, top-level MCP) default to `interrupt`. Each kind of prompt is released this way:
Any sender picks `queue`, `steer`, or `interrupt` with `activeTurnBehavior`. Agent senders and finish notifications default to `steer` (falling back to `queue` on providers without `steerActiveTurn`); non-agent senders (app, CLI, plugins, Hub, top-level MCP) default to `interrupt` (or `steer` in composer settings). Each kind of prompt is released this way:
- **`queue`** waits for any running or starting turn (including compaction) to end on its own or fail, then delivers the queued prompts together. The daemon releases it when it observes the recipient settle; a two-second timer also retries. On an idle recipient, agent messages wait two quiet seconds (steady arrivals cannot hold that window open past ten seconds); a non-agent queued message skips that quiet window and starts a turn at once. A non-agent queued message is sent unwrapped when dispatched alone, and in a `kind="user-message"` envelope when it shares a prompt with other messages. Finish notifications and change-request updates always queue.
- **`steer`** waits for neither the quiet window nor the turn. It is dispatched at admission as one prompt that enters the running turn: the messages queued before it, then the steer. A provider that cannot steer, or that refuses this steer, gets the prompt as a replacing turn instead, the same as a person's steer.
- **`interrupt`** is dispatched at admission the same way, as one prompt that replaces the running turn. An older queued message cannot start a turn after the newer `interrupt` that countermands it.
- **A person's direct prompt** (`steer` or `interrupt` from app, CLI, plugins, Hub, or top-level MCP) is dispatched directly and takes the queue along the same way: the messages admitted before it first, then the person's text, in one provider prompt. Messages admitted after it follow it. The person's text keeps its own transcript row. When the turn does not start, the messages return to the queue in their place. That covers a start the provider rejects and a start that is not acknowledged within 60 seconds; a provider that starts the turn after those 60 seconds receives the messages twice.
- **Stop** (the stop button, Escape, `cancel_agent`, a Hub interrupt) starts nothing. Messages admitted before the Stop are held, not dropped, including an interrupt whose turn had not started yet. They go ahead of the recipient's next prompt, in that prompt's turn: a person's prompt, or an agent message or notification admitted after the Stop. A held steer or interrupt no longer enters the turn; it waits like a queued message. A queue step or dispatch decided before the Stop is void, and the queue is held again when the message that reopened it is withdrawn. A replacing prompt, a reload, and a rewind are not a Stop. Neither is `cancel_agent` on a recipient with no running or starting turn: it stops nothing, reports that it canceled no run, and a queued message keeps its quiet window.
- **`queue`** waits for any running or starting turn (including compaction) to end on its own or fail, then delivers the queued prompts together. The daemon releases it when it observes the recipient settle; a two-second timer also retries. On an idle recipient, agent messages wait two quiet seconds (steady arrivals cannot hold that window open past ten seconds); a non-agent queued message skips that quiet window and starts a turn at once. A non-agent queued message is sent unwrapped when dispatched alone, and in a `kind="user-message"` envelope when it shares a prompt with other messages.
- **`steer`** from an agent sender enters the running turn without cutting it, carrying earlier agent-queued messages ahead of it while leaving human-queued items untouched in the queue. Finish notifications batch across the two-second quiet window before steering so parallel completions arrive together. If the provider cannot steer (`canSteer` is false, e.g., ACP agents) or rejects steering mid-turn without ending the turn, the daemon keeps the message queued until the turn ends rather than interrupting it.
- **`interrupt`** is dispatched at admission the same way, replacing the running turn and carrying earlier non-human-queued messages ahead of it.
- **A person's direct prompt** (`steer` or `interrupt` from app, CLI, plugins, Hub, or top-level MCP) runs immediately by itself and does **not** sweep queued messages. Queued messages stay intact in the queue track and dispatch once the turn settles, unless the queue is behind a staged provider switch (where the switch queues behind items meant for the current provider). When a non-command, non-resume direct human prompt succeeds on a held queue (after Stop or a refused start), it reopens the held queue so remaining queued items resume after the turn ends.
- **Stop** (the stop button, Escape, `cancel_agent`, a Hub interrupt) starts nothing. Messages admitted before the Stop are held, not dropped, including an interrupt whose turn had not started yet. Held items wait until reopened by a direct non-command prompt, a newly admitted message, or explicit Send now (`promote`). A queue step or dispatch decided before the Stop is void, and the queue is held again when the message that reopened it is withdrawn. A replacing prompt, a reload, and a rewind are not a Stop. Neither is `cancel_agent` on a recipient with no running or starting turn: it stops nothing, reports that it canceled no run, and a queued message keeps its quiet window.
The queued receipt carries the applied behavior and guidance text for the sender. The text comes from two facts known at admission: whether the recipient has a running turn, and whether its provider can steer (`AgentManager.canSteer`, which is true when the session offers `steerActiveTurn`). It does not wait for the outcome. Guidance for a message queued behind a running turn tells the sender to send a short `steer` or `interrupt` follow-up instead of resending, because the follow-up carries the queued message ahead of it and a resend would be read twice. The MCP tool, the WebSocket `send_agent_message_response`, the CLI, and the connected-host path all relay this one text.
The queued receipt carries the applied behavior and guidance text for the sender. The text comes from two facts known at admission: whether the recipient has a running turn, and whether its provider can steer (`AgentManager.canSteer`, which is true when the session offers `steerActiveTurn`). It does not wait for the outcome. Guidance for a message queued behind a running turn tells the sender to send a short `steer` or `interrupt` follow-up instead of resending, because an agent follow-up carries earlier agent-queued messages ahead of it. On non-steering providers, queued `steer` reports as `queue` and notes that `steer` waits until the turn ends. The MCP tool, the WebSocket `send_agent_message_response`, the CLI, and the connected-host path all relay this one text.
Older CLIs and connected hosts send an explicit `steer` for every default agent send. The daemon reads an agent sender's `steer` as `queue` unless the client advertises the `agent_active_turn_behaviors` capability. A new client talking to a daemon without `server_info.features.agentActiveTurnBehaviors` sends no behavior for `queue` and refuses a `steer`. A new client talking to a daemon without `server_info.features.nonAgentMessageQueue` refuses a non-agent `queue` before sending.
@@ -173,8 +173,8 @@ One provider prompt has one session mode. A batch released by a steer, an interr
A provider switch can wait in the queue too (`agent.provider.switch.request` with
`activeTurnBehavior: "queue"`). The message carries the target provider and settings, shares a prompt
with nothing, and divides the queue: what is ahead of it goes to the current provider, and it and
what follows go to the target. A direct prompt therefore takes along only the queued rows ahead of
the switch. Promoting the switch cuts the running turn once the target is known to be usable. A chat
what follows go to the target. A direct provider switch queues right behind any items queued for
the current provider so those items dispatch first. Promoting the switch cuts the running turn once the target is known to be usable. A chat
already on the target takes the message and its settings as a plain prompt. A switch that fails keeps
the message and holds the queue; the reason is in the daemon log.
@@ -184,10 +184,10 @@ queue holds references. An empty message is refused, and a recipient holds at mo
messages.
A message is marked `dispatching` before the provider can receive it and removed when the provider
admits it. A dispatch that is not admitted returns the message to its place. A refused turn start
also holds the queue: retrying by itself would be refused again and would add the prompt to the
history each time. A message that cannot be sent is removed so that it does not block the ones
behind it.
admits it. A dispatch that fails transiently (busy/non-steering turn, run-start timeout, mode/RPC
error, or rejected start) returns the batch to the queue rather than deleting it; non-busy failures
also hold the queue until the next prompt reopens it. Only pre-dispatch unresolvable payloads (such
as missing local attachments) or rejected out-of-band commands are discarded so they do not block later messages.
Shutdown does not send the queue. It waits only for dispatches already in flight, and everything
else stays saved, held messages included. Closing an idle runtime keeps the queue. Archiving or
@@ -232,9 +232,11 @@ at-least-once wakeup, without turn attribution or exactly-once delivery.
A turn end is not always a settled child. A child can end its turn with work that will start its next
turn by itself: a running turn, queued messages, a pending provider wake-up
(`AgentSession.hasPendingWakeup`: Claude background tasks, task notifications, and one-shot
wake-ups), or the child's own outstanding finish subscriptions as a caller. Heartbeats, recurring
crons, change-request watches, and other daemon background items never count: they are external
triggers, not work the caller is waiting for.
wake-ups), or the child's own outstanding finish subscriptions as a caller. Queued finish notices
(`agent-notification`) and turns started only by finish notices do not count as pending work
unless a real prompt is batched into or steered into the turn. Heartbeats, recurring crons,
change-request watches, and other daemon background items never count: they are external triggers,
not work the caller is waiting for.
Every turn end reports `finished` at once, unless the child already sent an agent message to its
caller during that turn and started no further tool work afterwards. In that case the child's
@@ -243,8 +245,9 @@ ends silently, and a watch with pending work keeps following silently until a la
the work drains. Starting another non-reporting tool call or a new turn clears that mark (plain text output after the
message does not), and errors, permission requests, cancellations, and closes are never suppressed. When work is still
pending on an unreported turn end, the notice names it and the subscription follows the child: each
later turn end reports `finished` again, and the child settling with nothing pending sends a final
`finished` and removes the subscription, even when the work drains without another turn. Reporting
later turn end reports `finished` again, except that a turn started only by finish notices while
already following keeps following without another interim notice; the child settling with nothing
pending still sends the final `finished` and removes the subscription, even when the work drains without another turn. Reporting
at once keeps a long-lived task, such as a dev server, from leaving the caller without the child's
reply. Following is what lets the caller hear the reply a background task wakes up later
([#6346](https://github.com/getpaseo/paseo/issues/6346)). A work change that leaves work pending
@@ -456,8 +459,8 @@ Rows take these commands:
already started sending the row, the draft stays as it is.
- **Cancel** withdraws the row.
A message you send directly (`steer` or `interrupt`) takes the queued rows with it, ahead of your
text.
A message you send directly (`steer` or `interrupt`) runs right away without sweeping the queue track;
queued rows stay visible in place and dispatch after the turn ends (unless held by Stop).
A message sent mid-turn with a staged provider switch is queued whatever the send behavior, and its
row names the target.
+3 -2
View File
@@ -216,16 +216,17 @@ not change the shipped scroll view. Keep this behavior in the app's compiled nat
## F-Droid / source-only Android builds
F-Droid builds should set `PASEO_FDROID_BUILD=1` when running Expo prebuild:
F-Droid builds should set `PASEO_FDROID_BUILD=1` for `npm ci` (or `npm install`), Expo prebuild, and Gradle:
```bash
PASEO_FDROID_BUILD=1 npm ci
cd packages/app
PASEO_FDROID_BUILD=1 APP_VARIANT=production npx expo prebuild --platform android --clean --non-interactive
cd android
PASEO_FDROID_BUILD=1 ./gradlew assembleRelease --no-daemon --max-workers=1 -Dorg.gradle.parallel=false
```
The flag must be present for both prebuild and Gradle because Gradle starts Metro for the release bundle. Keep the source build serial and daemon-free as shown above: compiling every Expo module can exhaust memory when Gradle workers run in parallel. The profile enables source-built Expo modules, excludes the proprietary camera, Firebase notification, and Expo development-client native modules, disables Gradle dependency metadata, and substitutes JavaScript stubs for camera and notifications. The resulting app supports direct and pasted-link pairing but not QR scanning or push notifications.
Setting `PASEO_FDROID_BUILD=1` during install makes `packages/react-native-enriched-markdown/postinstall.mjs` skip downloading the prebuilt iOS RaTeX XCFramework into the source tree. The flag must also be present for both prebuild and Gradle because Gradle starts Metro for the release bundle. Keep the source build serial and daemon-free as shown above: compiling every Expo module can exhaust memory when Gradle workers run in parallel. The profile enables source-built Expo modules, excludes the proprietary camera, Firebase notification, and Expo development-client native modules, disables Gradle dependency metadata, and substitutes JavaScript stubs for camera and notifications. The resulting app supports direct and pasted-link pairing but not QR scanning or push notifications. Setting `PASEO_FDROID_BUILD=1` also disables native RaTeX math in `react-native-enriched-markdown` and falls back to raw LaTeX text without requiring a Rust toolchain.
For a single-ABI APK, pass React Native's architecture property to Gradle:
+6
View File
@@ -74,6 +74,12 @@ For testing rules, see [testing.md](testing.md).
- New features get a home before implementation. A feature smeared across 5 shared files is the same slop as a flat-peer namespace.
- Don't drop new files at the nearest root just because placement is unclear — say so and ask.
## Lucide icons
Import one icon per statement from its file: `import Check from "lucide-react-native/icons/check"`. Import `LucideProvider` from `lucide-react-native/context`; the package does not export that path, so `patches/lucide-react-native+*.patch` adds it. The bare `lucide-react-native` barrel evaluates all 1,858 icons and puts them in the web entry chunk, so lint bans it (type imports such as `LucideIcon` are fine).
Plugins name icons as strings, so `plugins/lucide-catalog` answers "is this a Lucide name" from a generated name list and loads the barrel with `import()` when a plugin icon is first drawn. After upgrading `lucide-react-native`, run `npm run generate:lucide-icon-names --workspace=@getpaseo/app`; `names.test.ts` fails until you do.
## Refactoring is a bolt-on test
- A change should look like a thoughtful edit to existing code, not a new layer next to it. New coordinator wrapping a coordinator, new flag bypassing the normal path, new helper duplicating an existing selector — stop and reshape instead.
+6 -5
View File
@@ -20,7 +20,7 @@ A semantic element used in three or more places is a primitive. One of a kind is
Primitives live in `packages/app/src/components/ui/` and `packages/app/src/components/headers/`. Card and row layout live in `packages/app/src/styles/settings.ts`. Section structure lives in `packages/app/src/screens/settings/settings-section.tsx`.
A pressable styled to look like a button is wrong; the button is `<Button>` (`packages/app/src/components/ui/button.tsx`). A pressable wrapping an icon is wrong; the icon action is `<ToolbarButton>` (`packages/app/src/components/ui/pane-content-toolbar.tsx`), which owns the hitbox, the rounded `interactionHighlight` fill on hover and press, the compact size, and the tooltip. Rows on a menu surface are `<MenuItem>`, or `<ComposerTrackRow>` in a track panel; other rows are `<PressHighlight>` (`packages/app/src/components/ui/press-highlight.tsx`), which owns the pressed feedback: pass the pressed fill as `highlightStyle` and never paint it in your own style. iOS and web paint that fill; Android draws the platform ripple over the content instead, clipped to the row's corners. On native, feedback waits for a short press delay so a scroll that claims the touch shows none. Content that knocks out of the row's surface, such as a badge ring, follows the fill through `onHighlightChange`. A bare `<Text>` styled to look like a section header is wrong; the section header is `<SettingsSection>` (`packages/app/src/components/settings/headings/settings-section.tsx`). A docs link in its header is its `link` prop, which renders `Label ↗` on the title's rail; a ghost button with an arrow is wrong. A custom `Modal` for a confirmation is wrong; the confirmation is `confirmDialog` (`packages/app/src/utils/confirm-dialog.ts`). A hand-rolled overflow menu is wrong; the menu is `<DropdownMenu>` (`packages/app/src/components/ui/dropdown-menu.tsx`). A hand-rolled status pill is wrong; the pill is `<StatusBadge>` (`packages/app/src/components/ui/status-badge.tsx`). A circle pinned over a scrolling surface is wrong; the floating action is `<FloatingActionButton>` (`packages/app/src/components/ui/floating-action-button.tsx`), one per surface, and the surface reserves `FLOATING_ACTION_BUTTON_CLEARANCE` below its content so the button never traps the last row.
A pressable styled to look like a button is wrong; the button is `<Button>` (`packages/app/src/components/ui/button.tsx`). A hand-styled text input or textarea is wrong; form fields use `<Field>` and `<FormTextInput>` (`packages/app/src/components/ui/form-field.tsx`), and search inputs use `<SearchField>` (`packages/app/src/components/ui/search-field.tsx`). A pressable wrapping an icon is wrong; the icon action is `<ToolbarButton>` (`packages/app/src/components/ui/pane-content-toolbar.tsx`), which owns the hitbox, the rounded `interactionHighlight` fill on hover and press, the compact size, and the tooltip. Rows on a menu surface are `<MenuItem>`, or `<ComposerTrackRow>` in a track panel; other rows are `<PressHighlight>` (`packages/app/src/components/ui/press-highlight.tsx`), which owns the pressed feedback: pass the pressed fill as `highlightStyle` and never paint it in your own style. iOS and web paint that fill; Android draws the platform ripple over the content instead, clipped to the row's corners. On native, feedback waits for a short press delay so a scroll that claims the touch shows none. Content that knocks out of the row's surface, such as a badge ring, follows the fill through `onHighlightChange`. A bare `<Text>` styled to look like a section header is wrong; the section header is `<SettingsSection>` (`packages/app/src/components/settings/headings/settings-section.tsx`). A docs link in its header is its `link` prop, which renders `Label ↗` on the title's rail; a ghost button with an arrow is wrong. A custom `Modal` for a confirmation is wrong; the confirmation is `confirmDialog` (`packages/app/src/utils/confirm-dialog.ts`). A hand-rolled overflow menu is wrong; the menu is `<DropdownMenu>` (`packages/app/src/components/ui/dropdown-menu.tsx`). A hand-rolled status pill is wrong; the pill is `<StatusBadge>` (`packages/app/src/components/ui/status-badge.tsx`). A circle pinned over a scrolling surface is wrong; the floating action is `<FloatingActionButton>` (`packages/app/src/components/ui/floating-action-button.tsx`), one per surface, and the surface reserves `FLOATING_ACTION_BUTTON_CLEARANCE` below its content so the button never traps the last row.
Before adding a new component, read `components/ui/`. The primitive usually exists.
@@ -35,7 +35,7 @@ The authored interface ramp uses a 14px base. New native installs default to 15p
Weight has three tiers, applied by role:
- **Screen titles** — the title in app chrome — use `<ScreenTitle>` (`packages/app/src/components/headers/screen-title.tsx`), which renders `fontSize.base` at weight `400` on compact and `300` on desktop. The New workspace hero is the only larger product title; it uses `fontSize["2xl"]` (`packages/app/src/screens/new-workspace-screen.tsx`).
- **Structural labels** use `fontWeight.medium`. This applies to section labels above a stack of rows (`packages/app/src/components/agent-list.tsx:519-523`, `packages/app/src/components/keyboard-shortcuts-dialog.tsx:63-67`), form field labels above an input inside a modal (`packages/app/src/hosts/add-host/internal/add-host-modal.tsx:19-23`, `packages/app/src/hosts/add-host/internal/pair-link-modal.tsx:24-28`), the title at the top of a modal/sheet/dialog (`packages/app/src/components/adaptive-modal-sheet.tsx:90-94`, `packages/app/src/components/ui/combobox.tsx:1607-1611`, `packages/app/src/components/welcome-screen.tsx:48-53`), action button labels in tight components such as the sidebar callout actions (`packages/app/src/components/sidebar-callout.tsx:218-221`), and inline data emphasis on dense metadata rows (`packages/app/src/components/git-diff-pane.tsx:2322-2327`, `packages/app/src/components/file-explorer-pane.tsx:1115-1122`).
- **Structural labels** use `fontWeight.medium`. This applies to section labels above a stack of rows (`packages/app/src/components/agent-list.tsx:519-523`, `packages/app/src/components/keyboard-shortcuts-dialog.tsx:63-67`), the title at the top of a modal/sheet/dialog (`packages/app/src/components/adaptive-modal-sheet.tsx:90-94`, `packages/app/src/components/ui/combobox.tsx:1607-1611`, `packages/app/src/components/welcome-screen.tsx:48-53`), action button labels in tight components such as the sidebar callout actions (`packages/app/src/components/sidebar-callout.tsx:218-221`), and inline data emphasis on dense metadata rows (`packages/app/src/components/git-diff-pane.tsx:2322-2327`, `packages/app/src/components/file-explorer-pane.tsx:1115-1122`). Form field labels live in `<Field>` (`packages/app/src/components/ui/form-field.tsx`) and use `fontWeight.normal` in `foregroundMuted`.
- **Content** uses `fontWeight.normal`. This applies to settings rows (`packages/app/src/styles/settings.ts`), sidebar primary list-item titles (`packages/app/src/components/sidebar-workspace-list.tsx:2680-2686`, `packages/app/src/components/agent-list.tsx:572-578`), `<StatusBadge>` text (`packages/app/src/components/ui/status-badge.tsx:56-60`), and `<SidebarCallout>` titles (`packages/app/src/components/sidebar-callout.tsx:175-180`).
The rule, condensed: text that _names_ a surface or a group is `medium`. Text that lives _inside_ a surface or a group is `normal`. Top-of-screen titles are `<ScreenTitle>`, which is lighter still.
@@ -78,7 +78,7 @@ In the composer, the first glyph's ink starts on the text column's edge, and the
One gate, `resolveControlSizing`, picks touch or pointer sizing: touch when the layout is compact or touch is the primary input. An iPad with the sidebar docked is wide and touch-sized; a desktop is pointer-sized; a phone is both compact and touch. The primary input comes from `(pointer: coarse)` (`hasTouchPrimaryPointer` in `hooks/pointer-capabilities.ts`), not from whether a touch screen exists: WebKit keeps touch primary on an iPad with a trackpad attached, and Chromium reports a fine primary pointer for a laptop with a touch screen that its trackpad drives. The fact is read once at startup: attaching a pointer to a tablet does not shrink its controls, and a 2-in-1 launched with a pointer keeps pointer sizes after it switches to tablet mode until the app reloads. Stylesheets take sizes from `bySizing({ touch, pointer })`, which resolves to a breakpoint value, so a caller never sees which sizing it got. Rows, icon buttons and icon slots take theirs from `styles/density.ts`, which uses the same gate. An `{ xs, md }` literal for a hit target or glyph is wrong: on an iPad it yields the pointer size.
Buttons are pills (`borderRadius.full`) with medium-weight labels; an icon-only button is a circle. `<Switch>` follows the same two sizes: a 34×20 track by default and in `sm`, 44×26 where controls are touch-sized, and it takes presses over its size's control height without adding that height to its row. Buttons, text fields, dropdown triggers, and `<SegmentedControl>` (`packages/app/src/components/ui/segmented-control.tsx`) share the size contract — the same size name means the same height and label size on every control kind, so controls in one row line up. Segments run tighter than a button, because the gap between segments already reads as padding. The selected segment is a `surface3` fill with `foreground` text, not an inverted one — inverting it inside thin chrome puts a white slab in the toolbar. A settings row sizes the controls in its trailing slot itself, default in a card and `sm` when nested (`packages/app/src/components/ui/control-size.tsx`), so don't pass a size to a button, dropdown or field placed in a row. Code that computes with a control's height outside a stylesheet uses `controlHeightForLayout`. Never shrink a control's font or padding locally to fit a context — if the context needs a smaller control, the size tier is missing or the wrong one is in use.
Buttons are pills (`borderRadius.full`) with medium-weight labels; an icon-only button is a circle. `<Switch>` follows the same two sizes: a 34×20 track by default and in `sm`, 44×26 where controls are touch-sized, and it takes presses over its size's control height without adding that height to its row. Buttons, text fields, dropdown triggers, and `<SegmentedControl>` (`packages/app/src/components/ui/segmented-control.tsx`) share the size contract — the same size name means the same height and label size on every control kind, so controls in one row line up. Segments run tighter than a button, because the gap between segments already reads as padding. `<SegmentedControl>` sits in a recessed `surface2` pill track with an elevated active thumb (`surface3` on dark themes, `surface0` with a subtle shadow on light themes) and `foreground` text, never an inverted fill inside thin chrome. A settings row sizes the controls in its trailing slot itself, default in a card and `sm` when nested (`packages/app/src/components/ui/control-size.tsx`), so don't pass a size to a button, dropdown or field placed in a row. Code that computes with a control's height outside a stylesheet uses `controlHeightForLayout`. Never shrink a control's font or padding locally to fit a context — if the context needs a smaller control, the size tier is missing or the wrong one is in use.
A `<Pressable>` wrapping a `<Text>` is a sixth variant. It is wrong. `<Button>` accepts `style`, `textStyle`, `leftIcon`, `disabled`, `size`, and `variant`.
@@ -96,7 +96,7 @@ A list that is itself the page content — sidebar items in `sidebar-workspace-l
Pane chrome — the workspace pane header, the file-explorer header, the diff pane header — uses a single bottom border to separate the header from the content (`packages/app/src/components/git-diff-pane.tsx:2328-2331`). One border, no shadow.
`borderAccent` is reserved for the outline button. Inputs use `border`. Single-thing borders are wrong; a single bordered element is either a card with one row (use the card) or it does not need a border.
`borderAccent` is reserved for the outline button, hovered control borders, and resting frames like the composer. Cards and containers use `border`. Bordered inputs (like `MenuTextField` and the composer) step to `borderFocus` on focus; filled `surface2` form controls (`FormTextInput`, `SearchField`, `SelectField`) reserve a 1px transparent border at rest and step to `borderAccent` on hover and `borderFocus` with the `accent` focus ring on focus so state changes never shift geometry. Single-thing borders are wrong; a single bordered element is either a card with one row (use the card) or it does not need a border.
---
@@ -266,6 +266,7 @@ New status pills use `<StatusBadge>`. Identity icon badges use `<IdentityIconBad
- `fontWeight.medium` on row titles, body text, badge text, or `<SidebarCallout>` titles. Medium is reserved for the structural-label tier described in §3 — section labels, modal/sheet titles, dense metadata emphasis, and tight action labels. Anything else is `normal`. `<ScreenTitle>` is responsive `400/300` and is never overridden.
- `<Pressable>` wrapping `<Text>` to make a button. `<Button>` exists.
- Importing `Pressable` or a `Touchable*` outside `components/ui/`. A raw pressable has no standard press or hover feedback, so every one drifts. `paseo/no-raw-pressable` reports it; the files on its burn-down list in `.oxlintrc.json` may only leave it.
- Importing `EditingTextInput` outside `components/ui/` (or wrapping any text input in `withUnistyles`). Form inputs use `<FormTextInput>` and search inputs use `<SearchField>`; `paseo/no-raw-text-input` enforces this outside the explicit bespoke-editor allowlist. Nested `withUnistyles` drops box styles on web.
- Bare `<Text>` for a section header inside settings. `<SettingsSection>` exists.
- A muted paragraph between a section header and its card. Section-level explanation is the header's `info` tooltip (§7).
- A "Settings" CTA on a detail page. Detail pages are settings; settings is reached from the sidebar, the host entry, or a row's kebab menu.
@@ -290,7 +291,7 @@ New status pills use `<StatusBadge>`. Identity icon badges use `<IdentityIconBad
| List+detail (compact stack, desktop sidebar+pane) | `packages/app/src/screens/settings-screen.tsx`, `packages/app/src/screens/projects-screen.tsx` |
| Detail card+row | `packages/app/src/screens/settings/host-page.tsx`, `packages/app/src/provider-settings/internal/provider-list.tsx` |
| Section grouping inside a card list | `packages/app/src/screens/settings/settings-section.tsx` |
| Form modal (label + input fields, primary + cancel) | `packages/app/src/hosts/add-host/internal/add-host-modal.tsx`, `packages/app/src/hosts/add-host/internal/pair-link-modal.tsx`, `packages/app/src/components/project-picker-modal.tsx` |
| Form modal (label + input fields, primary + cancel) | `packages/app/src/components/schedules/schedule-form-sheet.tsx`, `packages/app/src/hosts/add-host/internal/add-host-modal.tsx`, `packages/app/src/hosts/add-host/internal/pair-link-modal.tsx` |
| Destructive confirmation | `confirmDialog` invoked from `packages/app/src/screens/settings/host-page.tsx:541-547` |
| Centered hero / first-run | `packages/app/src/components/welcome-screen.tsx` |
| Sidebar list (workspaces, hosts) | `packages/app/src/components/sidebar-workspace-list.tsx`, `packages/app/src/components/left-sidebar.tsx` |
+7
View File
@@ -29,6 +29,13 @@ the titlebar row. Production builds leave the variable unset and show no label.
`npm run dev` is only a shorthand for `npm run dev:server`. Keep `127.0.0.1:6767` for the packaged app and production-style `~/.paseo` state.
## Experimental GPUI client
The opt-in [GPUI target](../packages/app/gpui/README.md) runs the existing React
Native app on macOS and Linux. Its contributor guide covers setup, the renderer comparison,
unsupported features, native checks, and experiments to pick up. It connects to
an already-running daemon and does not replace the Electron dev command.
## Nix desktop package
The flake exposes `packages.<system>.desktop` on Linux and macOS:
+15 -9
View File
@@ -59,19 +59,25 @@ complete`), keyed off the opened snapshot's serverId. Waiting for data is a
## Form kit
- Compose `Field` / `SelectField` / `FormTextInput` / `SegmentedControl` /
- Compose `Field` / `SelectField` / `FormTextInput` / `SearchField` / `SegmentedControl` /
`Switch` from `components/ui/`. Geometry (heights, padding, radii, focus/hover
states) is owned by `components/ui/control-geometry.ts` — controls never
declare their own, and screens never nudge global component styles to align
a row.
- Every text field consumes `EditingTextInput`, directly or through a UI
wrapper. The editing surface owns in-progress text; React observes committed
edits through `onChangeText`, and programmatic mutations use the input's
`replaceText` command. Its props omit `value` and `defaultValue`, web IME
candidates stay unpublished until composition commits, and lint rejects raw
React Native `TextInput` imports outside the primitive.
- The form declares one size for all fields: `sm` on desktop, `md` compact
(`useIsCompactFormFactor`).
- Use `FormTextInput` for every form field and textarea (`leading`, `trailing`,
`clearable`, `revealable` for password visibility, `monospace`,
`appearance="flush"` for card-embedded textareas, and `multiline` with
`numberOfLines`), and `SearchField` for search inputs. Both build on
`EditingTextInput`, which owns in-progress text, web IME composition safety,
`resetKey` resets, bottom-sheet adaptation, and a single internal
`withUnistyles` wrapper. React observes committed edits through
`onChangeText`, and programmatic mutations use `replaceText`. Lint rejects
raw React Native `TextInput` imports and raw `EditingTextInput` imports
outside `components/ui/` and the small bespoke-editor allowlist.
- Omit `size` on ordinary forms and modals so `control-geometry.ts` sizes every
control from the sizing gate (`32px` pointer / `44px` touch). Reserve
`size="sm"` for tight chrome (toolbars, nested settings rows), and never pick
a control size from `useIsCompactFormFactor()` (see `docs/design.md` §4).
- Availability hierarchy: a field whose capability doesn't apply is **hidden**
(isolation on a non-git project — same gating as New Workspace), not rendered
disabled with an explanation. Disabled-with-a-reason `hint` is only for
+1 -1
View File
@@ -58,7 +58,7 @@ Authoritative terminology. UI label wins. Don't invent synonyms; use what's here
- **Agent controls** — Provider, model, mode, thinking, and provider-feature controls for an agent or draft agent. Code: `AgentControls` / `DraftAgentControls` (`packages/app/src/composer/agent-controls/index.tsx`). Forbidden: "Agent status bar".
- **Composer footer** — Optional area rendered below the composer input but still inside the keyboard-shifted composer layout. Code: `Composer.footer` (`packages/app/src/composer/index.tsx`).
- **Composer track** — A contextual lane at the foot of a pane, by the composer input. Specific tracks use the `<thing> track` form: **Queue track**, **Subagents track**, **Tasks track**. The subagents and tasks tracks are pills floating over the transcript, each opening a panel with its rows; the [queue track](agent-lifecycle.md#the-queue-track) is a lane inside the composer itself. Code: `ComposerQueueTrack` (`packages/app/src/composer/queue/track.tsx`), pill and panel frame in `packages/app/src/composer/tracks.tsx`, `SubagentsTrack` (`packages/app/src/subagents/track.tsx`), `AgentTaskList` (`packages/app/src/composer/task-list/index.tsx`).
- **Steer** — A follow-up admitted into an agent's already-running turn instead of interrupting it. Interrupting the turn discards steers the provider has not read yet; there is no take-back short of that, and no provider offers one. The stop button and Escape both interrupt. A steer the provider never read keeps its transcript row, matching Codex. Sending while the agent waits on a permission denies that request first, so the message reaches the same turn instead of stalling behind it. UI: "Send and steer". Code: `steerActiveTurn` (`packages/server/src/server/agent/agent-sdk-types.ts`). Don't confuse with **Queue track**, which lists the messages the host holds until the turn ends. A queued message does not enter the running turn. An agent sender's `activeTurnBehavior: "steer"` (CLI `--behavior steer`) means the same as a person's steer. Agent senders default to `queue` instead: the daemon holds the message until the running turn ends, as it does for a person's queued message. Forbidden: "Delivery", "Queued prompt".
- **Steer** — A follow-up admitted into an agent's already-running turn instead of interrupting it. Interrupting the turn discards steers the provider has not read yet; there is no take-back short of that, and no provider offers one. The stop button and Escape both interrupt. A steer the provider never read keeps its transcript row, matching Codex. Sending while the agent waits on a permission denies that request first, so the message reaches the same turn instead of stalling behind it. UI: "Send and steer". Code: `steerActiveTurn` (`packages/server/src/server/agent/agent-sdk-types.ts`). Don't confuse with **Queue track**, which lists the messages the host holds until the turn ends. A queued message does not enter the running turn, and a person's direct steer leaves queued rows in the queue track. Agent senders and finish notifications default to `steer` (falling back to `queue` when the provider cannot steer) and never sweep human-queued items. Forbidden: "Delivery", "Queued prompt".
- **Subagent** — User-facing term for an agent session related to a parent agent session. Use **subagents** in UI copy and docs. Internal daemon/provider plumbing may say "child agent" or `child_session`, especially for provider-managed imports; do not surface "child agent" as a product term.
- **Attachment tray** — The selected-attachments row inside the composer input, above the text input. Code: `renderAttachmentTray` (`packages/app/src/composer/index.tsx`). Forbidden: "Attachment bar".
- **Fork** — Starting a NEW agent session seeded with a copy of another session's curated chat history. The history rides along as a `chat_history` composer attachment on a draft; the fork does **not** resume or branch the provider-side session, and the source session keeps running untouched. Two targets, one surface, one RPC (`agent.fork_context`, gated on the `agentForkContext` host feature). UI: the fork menu lives in the assistant turn footer and offers "Fork in a new tab" / "Fork in a new workspace". On a **completed** turn it sits beside the copy button and pins a boundary to that turn, so the fork stops where the turn ended. On the **in-flight** turn it sits beside the progress loader and elapsed timer, and omits the boundary entirely — `selectForkContextRows` projects the whole timeline when no boundary is given, so the fork captures everything **up to now**, including the response still streaming. That omission is what makes mid-run forking work; pinning a boundary there would silently drop the live response. Forbidden on provider-subagent (read-only) panes. Code: `useForkAgent` (`packages/app/src/hooks/use-fork-agent.ts`), `selectForkContextRows` (`packages/server/src/server/agent/activity-curator.ts`). Don't confuse with: git fork (unrelated; Paseo has no such concept), **Worktree** (filesystem isolation, not history copying).
+7 -6
View File
@@ -111,17 +111,18 @@ rendered while the menu is up. `useOpenKebabMenuVisibility`
sidebar rows: it owns `open`, hands the menu its controlled props, and ORs `open` into the
row's own `showKebab`.
## Native fallback
## Touch fallback
Hover doesn't exist on touch devices. Anything you hide behind hover must have a non-hover path on native and compact layouts:
Hover doesn't exist on touch screens. Anything you hide behind hover must have a non-hover path on touch screens and compact layouts:
```tsx
const showControls = isHovered || isNative || isCompact;
const revealsWithoutHover = useRevealsWithoutHover();
const showControls = isHovered || revealsWithoutHover;
```
`isNative` and `isCompact` come from `@/constants/platform` and `@/constants/layout`. Don't use `Platform.OS === "ios"` as a proxy.
`useRevealsWithoutHover()` (`@/hooks/hover-reveal`) asks the pointer, not the platform: it is true when no mouse-like pointer drives the UI or the layout is compact. Don't use `isNative` for this. A touch-first browser such as iPad Safari is `isWeb` yet cannot hover, and the GPUI desktop client is native yet driven by a mouse, so `isNative` gets both wrong.
`onPointerEnter` / `onPointerLeave` are DOM events. They do not fire on native. You do not need to gate them — on native, hover is unreachable anyway and visibility is driven by `isNative` / `isCompact` in your show-the-controls expression above. This is why the workspace row's pointer events are not wrapped in `if (isWeb)`.
`onPointerEnter` / `onPointerLeave` fire on the web and in the GPUI desktop client. They do not fire on iOS or Android. You do not need to gate them: on a touch screen, hover is unreachable and visibility comes from `useRevealsWithoutHover()`. This is why the workspace row's pointer events are not wrapped in `if (isWeb)`.
## What about `Pressable.onHoverIn` / `onHoverOut`?
@@ -148,7 +149,7 @@ Before opening a PR that touches hover:
- [ ] The hover trigger's bounding box contains every element the user might mouse into while interacting with the feature.
- [ ] Hovered state does **not** change the trigger's outer geometry (`width`, `height`, `padding`, `borderWidth`, mount/unmount of siblings that shift it). Internal swaps fit inside a fixed `minHeight` / `minWidth`.
- [ ] Revealed content inside the trigger uses `opacity` + `pointerEvents`, not conditional rendering, if mounting it would reflow the trigger.
- [ ] Visibility on native and compact layouts works without hover (`isHovered || isNative || isCompact`).
- [ ] Visibility on touch screens and compact layouts works without hover (`isHovered || revealsWithoutHover`, with `useRevealsWithoutHover()` called unconditionally).
- [ ] A menu opened from the revealed trigger keeps the trigger rendered while it is open, so losing hover can't strand it.
- [ ] If the revealed content sits in a separate layer (portal, floating panel) and the user can point at it, it is a `HoverCard`.
- [ ] You opened the dev server, hovered the trigger, and slowly moved the mouse along **every** revealed element — including any visible gaps — without losing hover state.
+77 -5
View File
@@ -1,6 +1,63 @@
# Keyboard shortcuts
Define shortcuts in [the shared binding table](../packages/app/src/keyboard/keyboard-shortcuts.ts). Platforms contribute key sources, not separate action maps, so matching and user rebinds stay consistent across runtimes. Add a shortcut through a binding; add platform support through a key source.
A shortcut is two registrations. An action in the action registry (`@/actions`) is something the app can run. A binding in the keybinding registry (`@/keyboard`) connects keys to an action. `@/keyboard` imports `@/actions`; `@/actions` knows nothing about keys.
Paseo's own actions and default bindings are in [`core-actions/internal/actions.ts`](../packages/app/src/core-actions/internal/actions.ts) and [`bindings.ts`](../packages/app/src/core-actions/internal/bindings.ts). `CoreActionsProvider` registers them at app start, so Settings, badges and Command Center see every core shortcut before any surface mounts. Add a shortcut by adding a binding; add platform support through a key source.
## Actions and handlers
An action id such as `paseo/workspace.tab.next` is the only key for dispatch, badges (`useShortcutKeys`, `Shortcut`), Command Center rows and Settings rows.
A mounted surface supplies behavior with `useActionHandler(actionId, handler, { enabled, scope })`. Dispatch tries handlers in active action scopes innermost first, then unscoped handlers while no overlay covers the app, with the earliest registration first among equals. When every handler declines, the action's own `run` handles it. The app shell supplies `run` for the core actions no screen owns (`APP_SHELL_ACTION_IDS` in [`app-shell-runs.ts`](../packages/app/src/core-actions/internal/app-shell-runs.ts)). Every other core action has no `run`, so it can run only while a surface handles it. Do not give such an action a declining `run`: an action with a `run` counts as available, and its chords then reserve a first step that another shortcut needs.
A handler declines only by returning `{ handled: false }` synchronously. Any other return, including a promise, counts as handled. Express which handler wins with `enabled` and scopes, not with mount order.
Finite variants are separate actions: `workspace.tab.next` and `workspace.tab.previous`, one action per `message-input.*` operation. Only a binding declared with `Digit` supplies data, as `index`. It keeps supplying the pressed digit when an override narrows it to one digit, because Settings saved captured digits literally before it captured number groups.
## Action scopes
A surface that should shadow a shortcut while it is active creates a scope with `useActionScope(name, { active })`, and passes it to its handlers as `scope` or wraps its children in `<ActionScope activation>`. The innermost active scope wins. There are no priorities.
Example: the composer activates `paseo/composer` while it takes input, and the New Workspace screen activates `paseo/new-workspace` while it is focused. Shift+Tab on the New Workspace screen reaches its composer, and never the mode control of a backgrounded agent composer that is still mounted.
Scopes order by activation, so they cannot tell which of two active surfaces the user is in. Say that with `enabled`:
- Several composers can be active at once, such as the main pane's and an Explorer dock agent tab's. Composer handlers register through `useComposerKeyboardActions` ([`composer/keyboard-scope.tsx`](../packages/app/src/composer/keyboard-scope.tsx)), which enables only the composer whose input had focus last. A blur, such as a click on the timeline, keeps that composer; deactivating or unmounting it releases the keys. Until an active composer's input has had focus, the innermost composer wins.
- Desktop Settings covers the workspace, which stays mounted beneath it. Composers go inactive while `useSettingsCoversWorkspace()` holds, so Escape reaches Settings' handler and closes Settings. Compact Settings covers nothing, and Escape there still interrupts the agent.
An overlay that holds the keyboard, such as a dialog, a menu or the Command Center, covers the app while it is open. `useOverlayRegistration` makes the cover when the overlay takes focus (`manageFocus`, on by default) and returns it as `actionScope`. Pass the overlay's scope `name`, such as `paseo/dialog`, and wrap its content in `<ActionScope activation={actionScope}>`. While the overlay is the latest cover, it hides every activation not inside it, including ones made after it opened, and every handler mounted in no scope. An action's `run` stays available. A shortcut that a screen beneath the dialog handles does nothing while the dialog is open, and works again when it closes.
A registration that only claims keys, such as the hover card or select mode's Escape, passes `manageFocus: false` and covers nothing. `<ActionCover name>` covers without a key registration; only the mobile menu sheet uses it. An overlay opened with a shortcut closes with the same shortcut only through a handler inside its cover, such as `KeyboardToggleClose` in the model picker, because the cover hides the trigger's handler.
A Command Center row runs its action for the screen beneath the Command Center. The row calls `canDispatch` and `dispatch` with `{ beneath: "paseo/command-center" }`, which answer as if the latest Command Center cover were closed. The list is built for each opening, so it shows only rows that a handler on that screen or the action's `run` can take.
A handler is bound to one activation, not to a scope name. Two panes that show the same surface activate the same name separately, and a handler in one pane never runs for the other.
An action scope is different from the focus scope in a binding's `when` clause. Action scopes come from mounted surfaces. The focus scope comes from the focused input; see [Focus scopes](#focus-scopes).
## Bindings
A binding has an id, an action id, a combo and a `when` clause. User overrides are keyed by binding id, so never rename a shipped id, even when its combo changes (`agent-new-cmd-shift-o-mac` is bound to Cmd+O).
Among bindings that match the same key in the same context, a user-set binding wins over a default, then the earliest registered wins. If its action declines, the registry tries the next matching binding. A chord's first step is reserved only while the chord's action can run. On every step, a key continues a chord only when the chord ranks ahead of every runnable binding that the key completes. A plugin's default `Mod+K J` therefore leaves Ctrl+K to the Command Center until the user sets that chord, and a saved `Ctrl+G J K` continues past a default `Ctrl+G J`.
Settings → Shortcuts asks the registry about every captured combo with `checkCapture` (`canFire`, `conflicts`). A combo that can never fire for that binding is refused with a reason and cannot be saved: an unmodified or Shift-only printable key on a binding whose `when` only holds while typing, such as mode cycle on `Shift+M`. A combo that shares a key press with another binding is saved and shown on both rows as "Also used by …", and the user-set binding runs. The shipped defaults share no key press, so a fresh install shows no warning.
Badges show the first assigned binding for the platform (`displayKeysFor`). Settings → Shortcuts builds its rows from the registry with `buildShortcutSections`, so it lists every core binding with only Settings mounted.
A surface that reads keys itself while it holds the keyboard, such as the workspace switcher HUD, matches them with `createChordMatcher` against the bindings it picks. A binding whose action finishes when its modifier is released, such as Ctrl+Tab in the switcher, sets `holdRelease`; key sources outside the app, such as the Electron browser pane, forward that key-up.
Tests that drive real keys through the real table use `createRecordingCoreRegistries` from `@/core-actions/testing`.
## Plugin actions
Plugins register actions and bindings through the same two registries; the author contract is in [Actions and keyboard shortcuts](../public-docs/plugins/reference.md#actions). [`plugins/shortcuts/`](../packages/app/src/plugins/shortcuts/index.ts) connects each installation's contributions.
- Ids are namespaced: the plugin's `open` is the action `plugin-<pluginId>/open`, its binding ids are `plugin-<pluginId>/<id>`, and its scopes are `plugin-<pluginId>/<name>`. Overrides key off these ids, so the user's rebinding survives reinstalls and reloads.
- A plugin installed on several hosts adds the same action once per host. The registry keeps one action whose owners are the host ids; core actions have owner `null`. `pluginActionOwnerOrder`, passed to `CoreActionsProvider`, picks the host that runs it: a global action runs on the host of the screen the user is on, else the host the user last picked for the plugin's screens, else the first online host. A workspace or agent action runs only on the active host. Offline hosts never run.
- Every plugin screen, panel and popover activates `paseo/plugin-surface`. A plugin handler without `scope` belongs to that activation, so two panes of the same panel never run each other's handlers.
- Core actions and bindings register before any plugin, so a core default binding is tried before a plugin binding on the same key.
- Settings → Shortcuts and the shortcuts dialog add one section per plugin, titled with its name, with one row per action across all hosts.
## Badges and routing
@@ -26,8 +83,14 @@ after the focused text control has already handled the press, so the pipeline's
must be claimed up front. `UIKeyCommand` takes only those keys: composer Return, the
top overlay's Enter and arrows, and the Shift or Option shortcuts whose binding is
active in the current focus scope, such as Shift+Tab in the composer.
`sources/native.ts` computes the claims from the published bindings and recomputes
them when the focus scope changes. Cmd and Ctrl combos are never claimed, because
`sources/native.ts` computes the claims from the published bindings, the focus scope,
Command Center and the visible action scopes, and recomputes them when any of these
change. A first key is checked without the action scope stack, so a binding whose
`when` names an action scope never claims its first key. While a chord waits, only the
next key of each pending candidate is claimed, and a scoped candidate keeps its claim
while its scope stays visible. A covering overlay drops the claim, so the key reaches
the overlay's text field. Gate a key
that a text control would type with `focusScope`, as mode cycle does. Cmd and Ctrl combos are never claimed, because
text controls do not type them. Android takes no claims: a focused `EditText`
types nothing for these combos. Keep the stream as the sole shortcut emitter: a command-owned
press is still observed by the window.
@@ -56,6 +119,15 @@ Verify the iOS absence case on a physical iPhone.
Xcode 27.2 has Device Hub in place of Simulator. AppleScript keystrokes reach the
device only while its view has Mac focus. Give it focus with a real mouse click
(a `CGEvent`); keystrokes sent elsewhere drive Device Hub's own controls.
Send both steps of a chord from one AppleScript `tell` block. A chord expires
after 1.5 s, and separate `osascript` calls with settle delays exceed it, so the
second key types into the focused field.
On Android debug builds, the Expo dev menu reads unmodified R, P and I on key-up
outside text fields: R reloads, P opens the performance monitor (and the overlay
permission page), I toggles the inspector. Before hardware-keyboard QA, set
`keyCommandsEnabled` to `false` in the app's `expo.modules.devmenu.sharedpreferences`
SharedPreferences.
Never register Backspace: it would take deletion away from text fields. Changes
to the native module require a native rebuild; an over-the-air JavaScript update
@@ -110,6 +182,6 @@ leaving active IME composition spans untouched for candidate navigation.
## Keys shared with text editing
A binding on a key the platform already uses for editing, such as Cmd/Ctrl+Z for
workspace archive undo, declares `editable: false` and registers its handler with
`isActive` true only while it has work. An inactive handler leaves the key
workspace archive undo, declares `when: { editable: false }`, and its handler is
`enabled` only while it has work. A disabled or declining handler leaves the key
unhandled, so the pipeline skips `preventDefault` and the platform's own undo runs.
+12 -2
View File
@@ -32,7 +32,7 @@ The package keeps the npm tarball's layout, including its build output:
- `android/generated` and `ios/generated` are checked-in codegen output (`includesGeneratedCode`). A change to a native component spec regenerates both; `scripts/postinstall-patches.test.mjs` compares them against the specs.
- `src/web/wasm/md4c.js` and `lib/module/web/wasm/md4c.js` are an Emscripten build of `cpp/md4c`, `cpp/parser` and `cpp/wasm`. A parser change rebuilds both, or web keeps the old behavior while iOS and Android change. Run `cpp/wasm/build.sh` with `OUT_DIR` set to `src/web/wasm`, in `emscripten/emsdk:4.0.10` with the `-s GROWABLE_ARRAYBUFFERS=0` line removed. That version reproduces the committed JavaScript glue and has no such setting. The `lib/module` copy is the Babel output of the new file.
- Upstream's Gradle, CMake and CocoaPods scripts detect upstream's own monorepo by the paths `packages/core` and a root `vendor/`. Do not add either path to this repository.
- `postinstall.mjs` downloads the tree-sitter grammars into the ignored `cpp/highlight/vendor/grammars` and `vendor/tree-sitter`. The `enriched-markdown` block in `packages/app/package.json` chooses the languages.
- `postinstall.mjs` downloads the tree-sitter grammars into the ignored `cpp/highlight/vendor/grammars` and `vendor/tree-sitter`, and downloads RaTeX into `ios/vendor` when `enableMath` is true (unless `PASEO_FDROID_BUILD=1`). The `enriched-markdown` block in `packages/app/package.json` chooses the languages and enables native math.
CI does not build native code or run the fork's Robolectric suites. Run `npm run test:android --workspace=@getpaseo/app` for Android changes. Native changes require a client rebuild; JavaScript refresh cannot enable compiled grammars.
@@ -46,7 +46,17 @@ Some fork changes are backports. A sync past the upstream version drops them in
## Engine constraints
Math and video are disabled. Task lists and admonitions are enabled; task checkboxes are read-only. Source adaptation spaces adjacent empty GFM table delimiters before escaping prose spoiler delimiters and decodes entity text before the engine can discard it. Code spans and fences keep their literal source. Comment HTML is normalized to Markdown before parsing; details show their summary and body expanded. `<br>` becomes a Markdown hard break, except inside a table, where a newline would end the row. There it becomes U+2028, and `cpp/parser/MD4CParser.cpp` turns U+2028 back into a line break in table cell text, never in code.
Built-in LaTeX math is enabled by default, and video is disabled. Task lists and admonitions are enabled, and task checkboxes stay read-only. Source adaptation spaces adjacent empty GFM table delimiters before escaping prose spoiler delimiters and decodes entity text before the engine can discard it. Code spans and fences keep their literal source. Comment HTML is normalized to Markdown before parsing, and details show their summary and body expanded. `<br>` becomes a Markdown hard break, except inside a table, where a newline would end the row. There it becomes U+2028, and `cpp/parser/MD4CParser.cpp` turns U+2028 back into a line break in table cell text, never in code.
### LaTeX math
`components/markdown/math.ts` accepts `$...$`, `$$...$$`, `\(...\)`, `\[...\]`, and closed `math` fences (` ```math ` or `~~~math`). Inline `$...$` requires non-alphanumeric outer boundaries, no inner edge spaces, and no leading currency number or shell prose. Escaped `\[1, 2\]` citations, `$PATH`, regexes, and `latex` or `tex` code fences stay literal. Non-math messages skip scanning with a fast character check and do not trigger an `mdast` parse. Adapted expressions canonicalize to `$...$` or `$$...$$` for `md4c`, escape table pipes inside table rows, and flank adjacent CJK characters with hair spaces.
On web and Electron, `react-native-enriched-markdown` loads KaTeX (`htmlAndMathml` output with `.woff2` fonts) lazily when a document contains a math node. It caches rendered HTML in a 256-entry LRU and skips root-font overrides on `.katex` elements. Selection copy restores `[data-math-source]` to `$...$` or `$$\n...\n$$` without hidden `.katex-mathml` or `annotation` nodes. Chat Find ignores `.katex-mathml`, `annotation`, and `annotation-xml` nodes as well.
On iOS and Android, native views render with RaTeX (`enableMath: true` in `packages/app/package.json`). F-Droid builds (`PASEO_FDROID_BUILD=1`) disable native RaTeX in Gradle and `postinstall.mjs`, falling back to raw LaTeX. On 32-bit `x86` Android devices without `libratex_ffi.so`, the math views catch `Throwable` and render raw LaTeX text.
While streaming, `streaming.ts` keeps open `$$`, `\[`, and `math` fences in the unsealed tail so equations never split across blocks. Incomplete inline and display math stays withheld or literal until its closing delimiter arrives.
Mermaid fences use the existing isolated diagram runtime and fullscreen viewer. Web dispatches them through the library’s code-block override. Native has no block-renderer hook, so the renderer extracts only Mermaid fences and places the existing WebView host between library-rendered segments. This is the only block exception; see [native selection limitations](native-text-selection.md) for diagram grouping and leading inline images. Streaming keeps the last valid diagram visible while the next revision renders.
+41 -9
View File
@@ -1,7 +1,7 @@
# Plugins
Local plugins contribute daemon RPCs, native app surfaces, workspace panels, Command Center items,
client slash commands, timeline items, notifications, header buttons, composer pills, app themes, composer attachment sources, and settings screens.
keyboard shortcuts, client slash commands, timeline items, notifications, header buttons, composer pills, app themes, composer attachment sources, and settings screens.
Paseo executes `index.server.ts` in a subprocess and `index.client.tsx` in every connected app.
> **Trust every plugin you add.** `paseo plugin add` and `paseo plugin install` mean “I trust this codebase.” Plugins are unsandboxed: server code and preparation commands run with the daemon user's access on the daemon host, and client contributions run inside Paseo. The repository's dependencies and future updates are part of that trust decision. With `--host`, preparation runs on that remote daemon host.
@@ -431,9 +431,11 @@ When the same plugin contribution exists on multiple hosts, Paseo shows it once
adds a host picker to the screen header. The selected host supplies the bundle, RPC transport, and
query cache. Explicit SDK targets follow the [host API contract](../public-docs/plugins/reference.md#discover-hosts-and-target-another-host).
Workspace panels, Command Center items, and client slash commands are client contributions. The
Workspace panels, Command Center items, actions, keybindings, and client slash commands are client contributions. The
daemon transports their compiled bundle without interpreting placement or callbacks. Panel props
contain workspace and agent IDs. Required-selector hooks read normalized client state synchronously
carry `workspaceId`, validated read-only `params` (with host-enforced `agentId` on agent panels),
`revision`, and `tab`; optional `identity(params)` sets the coalescing key on the persisted
`plugin` target. Required-selector hooks read normalized client state synchronously
and use shallow equality, so a panel does not subscribe to fields it does not render. Command
callbacks materialize their snapshots only when invoked. Contribution discovery and panel opening
never fetch active context through plugin RPC. Snapshot DTOs are deeply readonly and frozen at
@@ -442,8 +444,18 @@ runtime so plugin code cannot mutate normalized app state or a memoized selectio
current installed-plugin catalog. A missing contribution renders unavailable inside the tab.
Panels declare `locations: ["workspace", "explorer"]` to opt into Explorer hosting; omission means
workspace only. Location controls hosting, not context. An agent panel target keeps its `agentId`
when moved between hosts. Explorer configuration can create workspace-context panels and remove
existing agent-context instances, but it cannot create an agent panel without an agent-aware command.
and `params` when moved between hosts. UI launchers only offer workspace-context panels whose
`params` schema accepts `{}`.
`AgentChat` renders the agent tab's own chain (`AgentPanelContent` in
`packages/app/src/panels/agent-panel.tsx`) through `packages/app/src/agent-embed`. The chain takes
a `ConversationSurface` instead of reading the pane: a pane has a tab to retarget and a pill track,
an embed has neither, so its composer handles `/clear` by opening the agent's workspace and the
track is never mounted. The embed publishes itself as a viewer with `useViewedAgent`, the hook the
workspace sheet uses, so the tab and every embed of one agent share the sync's single observation.
`controls: "none"` is the composer's `message` input mode (`composer/input-mode.ts`). Key focus
follows the pane rule: the embed the user last pressed owns Escape and send, while its pane or
screen is in front.
Command Center callbacks use the selected host's existing `PaseoApi` for normal Paseo operations.
They use typed plugin RPC only for plugin-specific backend work. Surface and panel navigation
@@ -452,6 +464,10 @@ See the public [navigation fields](../public-docs/plugins/reference.md#screens-a
and [external links and workspace browsers](../public-docs/plugins/reference.md#external-links-and-workspace-browsers)
for the author-facing contract.
Plugin actions and keybindings join the app's action and keybinding registries. Namespacing, which
host runs an action, and the Settings sections are in
[Plugin actions](keyboard-shortcuts.md#plugin-actions).
### Plugin icons
The [public reference](../public-docs/plugins/reference.md#icons) owns the author API: a contribution
@@ -482,7 +498,9 @@ configuration; `agent.open.before` contributes launch-only `env`, `tools`, `mcpS
`packages/server/src/server/plugins/session-attachments.ts` records what each plugin contributed to
each live session. A plugin start, stop, or reload reruns only that plugin's callback per session,
swaps its tools in place, and reopens a session only when its launch would differ. A reopen closes
the provider process, so a reload must not reopen agents the plugin does not change.
the provider process, so a reload must not reopen agents the plugin does not change, and a changed
launch waits until the agent's provider subagents and background work end. If the provider cannot
confirm that its runtime is safe to stop, the session stays open for the prompt.
### Launch wrap
@@ -790,6 +808,20 @@ read. See the [public file panel reference](../public-docs/plugins/reference.md#
the author API, selection, `DocumentFrame`, and the version requirement. The examples live in
`plugin-examples/pdf-panel` and `plugin-examples/markdown-panel`.
## HtmlFrame
`HtmlFrame` (`packages/app/src/html-frame`) runs HTML in a sandboxed frame for plugins; the
[public reference](../public-docs/plugins/reference.md#htmlframe) owns the author API. It reuses the
file preview hardening: `file-panels/html-preview-csp.ts` builds the policy,
`html-preview-navigation.ts` guards the native WebView. Web uses a `sandbox="allow-scripts"`
`srcdoc` iframe verified with a per-mount bootstrap token before flushing queued host messages,
native wraps the WebView in a sized `View` so inline auto-height frames work inside scrolling lists,
and one bootstrap script (`bootstrap.ts`) gives the page the same `window.parent.postMessage`
contract on both. A `srcdoc` iframe inherits its embedder's CSP. Neither the daemon's web UI
(`web-ui.ts`), nor the desktop `paseo://` protocol handler, nor `index.html` sets one, so allowed
CDN scripts load; a reverse proxy that adds a `Content-Security-Policy` header to the app page would
also bind the frame and block them.
## Contribute buttons
Header buttons and composer pills share the client-only descriptor and registration lifecycle in
@@ -887,9 +919,9 @@ implementations and `toPluginComposer`; never branch on `context` in the host.
`useComposers` and `composers()` reach an agent's model by reference (`plugins/composer-items/source.ts`):
`PluginInstallationProvider` provides the plugin's source to every surface, and
`createPluginCapabilities` puts `composers` on every command context. `{ focused: true }` is the
agent Command Center registration hands to agent items, published through `plugins/focused-agent.ts`
(null outside a workspace route). The source reads that module, not the navigation or layout
stores, so the plugin runtime does not import them. The remembered workspace selection is
agent Command Center registration hands to agent items, published with the active host and
workspace through `plugins/location.ts` (null when no host is active). The source and plugin actions
read that module, not the navigation or layout stores, so the plugin runtime does not import them. The remembered workspace selection is
navigation restore state and is not the focused agent. The query-cache subscriptions react to
`updated` events only: a `useQuery` in another component's render announces `added`, and a
subscriber that updates then triggers React's "update a component while rendering a different one"
+43 -11
View File
@@ -10,7 +10,7 @@ Two contracts follow from it.
A schema change must not break parsing in either direction. An old app still parses messages from a new daemon. A new daemon still parses messages from an old app.
`hello` carries an optional credential. The daemon accepts a client protocol version from its minimum through newer client versions, selects the lower of client and daemon maximum, and reports it as optional `server_info.protocolVersion`. A `hello.rejected` frame precedes an auth close only when the client sent `hello.auth` or advertised `hello_rejection`; older clients receive the existing WebSocket close code and reason. This avoids sending them a new top-level message their validator does not recognize.
`hello` carries an optional credential. The daemon accepts a client protocol version from its minimum through newer client versions, selects the lower of client and daemon maximum, and reports it as optional `server_info.protocolVersion`. A `hello.rejected` frame precedes a refusal close only when the client sent `hello.auth` or advertised `hello_rejection` or `evolvable_hello_rejection`; older clients receive only the WebSocket close code and reason so their validator does not reject an unknown top-level envelope. Clients advertising `evolvable_hello_rejection` accept open `reason`, optional `accepts`, and optional `message` fields and halt reconnects on any refusal. Reserve `hello.rejected` for refusals that require user or client-version action; transient restarts and temporary unavailability close the socket without `hello.rejected` so clients reconnect automatically. For `hello_rejection`-only clients, the daemon downgrades unknown reasons to `password_required` (when `accepts` includes `"password"`) or `incompatible_protocol`, restricts `accepts` to `["password"]` or `[]`, and omits `message`.
- New fields are `.optional()` with a sensible default.
- Never flip optional to required, remove a field, or narrow a type. `string` to `enum` and nullable to non-null are both narrowing.
@@ -69,20 +69,51 @@ Explicit caller restore modes and history counts pass through unchanged. JSON sn
wire declarations remain accepted, but JSON snapshot frames have no rendering runtime.
Terminals require `terminal-restore-modes`; older hosts show an update message without attaching.
## Binary chunking
## Frame transport (chunking and compression)
`binary_chunking_v1` in hello and optional `server_info.features.binaryChunkingV1`
negotiate connection-scoped framing. Application serializers and routed envelopes use
the same boundary. Small messages and handshakes keep their existing representation.
Older peers retain existing frame limits.
`binary_chunking_v1` in `hello` and optional `server_info.features.binaryChunkingV1`
negotiate connection-scoped framing. Optional `frame_codecs` in `hello` and optional
`server_info.features.frameCodecs` negotiate a stateless per-frame codec (such as
`"deflate-raw"`). Both peers pick the first server-advertised codec ID present in the
client's local codec list, so selection is deterministic regardless of client list order.
Application serializers and routed envelopes use the same boundary. Handshakes (`hello`
and `server_info`), frames below 1024 bytes, and incompressible frames keep their
existing uncompressed representation. The daemon sends `server_info` before it applies the
negotiated codec, because the client selects its codec from it. A routed envelope whose
enclosed frame is already compressed is forwarded as it is.
A client omits `frame_codecs` when its transport reports `local` (loopback TCP, Unix
socket, named pipe), unless the caller lists codecs explicitly in `capabilities`. Hosts
routed through that client still use its installed codecs, so a routed host behind a
loopback origin compresses end to end while the origin socket carries the frames as they are. Older peers that omit `frame_codecs` or
`features.frameCodecs` exchange uncompressed frames and retain existing frame limits.
The reserved binary opcode `0x31` is followed by version `1`, original kind
(`0` text, `1` binary), and START/END flag bits `0`/`1`. Remaining bytes are an
unchanged slice. There is no total length or chunk count; a future receiver can
consume slices incrementally. Today the receiver buffers up to the existing
100 MiB logical limit and decodes UTF-8 only after END. Transfers cannot interleave.
(`0` text, `1` binary), and flag bits: START (`0x01`), END (`0x02`), and ENCODED (`0x04`).
When ENCODED is set, compression happens once per logical frame before chunking; the
payload is encoded bytes (stateless per frame, with no cross-frame dictionary state).
Single-frame encoded messages (`START | END | ENCODED`, `0x07`) work even when outbound
chunking is unavailable or `binary_chunking_v1` is absent. Unencoded chunking and
multi-chunk sequences require `binary_chunking_v1`. ENCODED frames received without a
negotiated codec, or chunks whose ENCODED flag changes mid-sequence, fail closed.
There is no total length or chunk count; a future receiver can consume slices
incrementally. Today the receiver buffers up to the existing 100 MiB logical limit,
enforces the same limit as a hard decompression cap to block decompression bombs, and
decodes UTF-8 only after END and decode complete. Transfers cannot interleave.
Disconnect clears partial state and negotiation.
Codecs are host-supplied (`DaemonClientConfig.frameCodecs`), not sniffed in client core:
Node entry points supply `node:zlib` (sync up to 256 KiB: encode when the raw frame is at
most that, decode when its input and output stay within it; libuv async past it, so high-ratio inbound
frames never stall the event loop),
web/Electron supplies `CompressionStream("deflate-raw")`, and native iOS/Android
supplies the `paseo-compression` Expo module. Async codecs preserve strict FIFO order on
both send and receive; a protocol error during async decode closes the socket via
`onProtocolError` without delivering queued frames. `close()` drops frames still decoding,
so a client that disposes a connection never sees its stale frames. When a peer disconnects,
the daemon awaits `flushInbound()` before `close()`, so a request the peer sent just before
dropping applies as it would uncompressed.
The lower transport supplies its plaintext frame budget, including encryption
overhead. The sender waits for drain between chunks while ordinary messages keep
the existing delivery path. Slow-client protections count messages queued behind
@@ -94,7 +125,8 @@ WebSocket does not report its queued bytes, so the client cannot wait for native
drain. Android's installed OkHttp transport closes when a send would put more
than 16 MiB in its queue. The native transport disables outbound chunking, including
on routed channels, and retains its existing single-frame admission errors.
Inbound chunking remains enabled; daemon-to-native responses use the daemon's paced writes.
Inbound chunking and single-frame compression remain enabled; daemon-to-native responses
use the daemon's paced writes.
## Owned observations
+6 -2
View File
@@ -442,6 +442,7 @@ const MY_PROVIDER_MODES: AgentProviderModeDefinition[] = [
description: "Standard agent mode",
icon: "ShieldCheck",
colorTier: "safe",
permissionTier: "safe",
},
{
id: "autonomous",
@@ -449,11 +450,14 @@ const MY_PROVIDER_MODES: AgentProviderModeDefinition[] = [
description: "Runs without prompting",
icon: "ShieldOff",
colorTier: "dangerous",
permissionTier: "dangerous",
isUnattended: true,
},
];
```
Available `colorTier` values: `"safe"`, `"moderate"`, `"dangerous"`, `"planning"`.
Available `permissionTier` values (lowest to highest security rank for MCP mode-ceiling checks): `"planning"`, `"safe"`, `"moderate"`, `"dangerous"`.
Available `colorTier` values (display styling, independent of `permissionTier`): `"safe"`, `"moderate"`, `"dangerous"`, `"planning"`, or a `#rrggbb` hex color.
Available `icon` values: `"ShieldCheck"`, `"ShieldAlert"`, `"ShieldOff"`.
Then add to the `AGENT_PROVIDER_DEFINITIONS` array:
@@ -711,7 +715,7 @@ Tests use `isProviderAvailable(provider)` to skip when the binary or credentials
**Auth patterns vary.** Some providers need API keys in env vars (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`), some use OAuth tokens (`CLAUDE_CODE_OAUTH_TOKEN`), some use auth files (`~/.codex/auth.json`), and some handle auth entirely in their CLI binary (Copilot). Your `isAvailable()` method should check whatever is needed.
**The manifest mode list and the agent class mode list are separate.** The manifest in `provider-manifest.ts` includes UI metadata (`icon`, `colorTier`). The agent class defines modes without UI metadata (just `id`, `label`, `description`). Keep them in sync.
**The manifest mode list and the agent class mode list are separate.** The manifest in `provider-manifest.ts` includes UI and policy metadata (`icon`, `colorTier`, `permissionTier`, `isUnattended`). The agent class defines modes without that static metadata (just `id`, `label`, `description`). Keep them in sync.
**`defaultCommand` is a tuple.** The first element is the binary name, the rest are default arguments. The base class uses this to find the executable and spawn the process.
+1 -1
View File
@@ -40,7 +40,7 @@ wire record = (u16 BE ciphertextLength || ciphertext)+
The receiver rejects a record whose metadata disagrees between chunks, whose non-final chunks are not full, whose byte total differs from `totalLength`, or that has zero chunks, trailing bytes, reserved flags, or an invalid kind. Partial plaintext never reaches the application. Transport AD is empty, as the Noise spec writes it; framing authenticity comes from the metadata being inside the ciphertext. `packages/relay/src/protected-records.ts` owns this.
Frame kind is preserved on the wire the same way as legacy: text records are base64 WebSocket text, binary records are WebSocket binary when `binaryCiphertext` was negotiated.
When `binaryCiphertext` is negotiated, both text and binary records travel as WebSocket binary frames, because the authenticated `kind` byte inside the record carries the frame kind. Base64 WebSocket text records remain accepted on receive for older peers and when `binaryCiphertext` is not negotiated.
## Retries and failures
+52 -36
View File
@@ -18,14 +18,14 @@ Preparation is reversible and runs on the release branch before the user authori
6. Run `npm run release:prep:<mode>` to create the `chore(release): cut <version>` commit without a tag.
7. Push `release/vX.Y.Z` or `release/vX.Y.Z-beta.N`.
8. Right after the push, open the unmerged [reconcile `main`](#reconcile-main) PR from `reconcile/vX.Y.Z` or `reconcile/vX.Y.Z-beta.N`, so its CI runs in parallel with the release branch's `CI` and `Desktop Packages`. Do not merge it during Preparation.
9. Wait for `CI` and `Desktop Packages` on the release branch to pass (never wait on `main` CI), and run the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit.
9. Wait for `CI` and `Desktop Packages` on the release branch to pass (never wait on `main` CI), and run the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit. Because `release:prep:<mode>` updates `package-lock.json`, `CI`'s `quality` job verifies `nix/npm-deps.hash` on `release/**` branches and prints the exact `printf '%s\n' '<hash>' > nix/npm-deps.hash` command if stale.
### Ship
Ship starts after the user says "go ahead". All tag-triggered GitHub Actions workflows and EAS workflows build from the checked-out tag commit with local workspace packages, so none of them install `@getpaseo/*` from the public npm registry.
1. Run `npm run release:push` first to verify the clean release branch and push `vX.Y.Z` or `vX.Y.Z-beta.N`. Pushing the tag takes a few seconds and starts `Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and (for stable tags) `Deploy App` on GitHub Actions, plus `Release Mobile` (stable) or `Release iOS Beta` (beta) on EAS. (`Deploy Website` runs later on the `release: published` event when `Desktop Release` publishes the stable GitHub Release.)
2. Run `npm run release:publish` (stable) or `npm run release:publish:beta` (beta) in parallel with the remote builds. `scripts/publish-release-packages.mjs` publishes the seven `@getpaseo/*` packages in dependency waves and polls npm visibility between packages to avoid `E409` or `E404` propagation races.
1. Run `npm run release:push` first to verify the clean release branch and push `vX.Y.Z` or `vX.Y.Z-beta.N`. Pushing the tag takes a few seconds and starts `NPM Release`, `Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and (for stable tags) `Deploy App` on GitHub Actions, plus `Release Mobile` (stable) or `Release iOS Beta` (beta) on EAS. (`Deploy Website` runs later on the `release: published` event when `Desktop Release` publishes the stable GitHub Release.)
2. Watch `NPM Release`. It publishes the seven `@getpaseo/*` packages through Trusted Publishing and checks npm visibility after publishing all packages.
3. Check the green [reconcile `main`](#reconcile-main) PR against the pushed tag, then merge it right after `npm run release:push` finishes, in parallel with npm publication and the release builds. Wait for its checks only if the tag check produced changes.
4. Create the release heartbeat immediately with `create_heartbeat` to track every ship step to completion.
@@ -34,7 +34,7 @@ Ship starts after the user says "go ahead". All tag-triggered GitHub Actions wor
Wait until every gate below passes before deleting the remote release branch or reporting the release as shipped:
- All seven `@getpaseo/*` npm packages are visible on `latest` (stable) or `beta` (beta), and on stable the `beta` dist-tag points to the shipped version unless an active newer beta exists.
- All tag-triggered GitHub Actions workflows are green (`Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and `Deploy App` for stable), and `Deploy Website` ran after stable publication.
- All tag-triggered GitHub Actions workflows are green (`NPM Release`, `Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and `Deploy App` for stable), and `Deploy Website` ran after stable publication.
- The GitHub Release is published and non-draft (marked prerelease for beta) with the synced changelog body, all macOS, Linux, and Windows assets, the Android APK asset, and all three channel manifests (`latest-mac.yml`, `latest-linux.yml`, `latest.yml` for stable; `beta-mac.yml`, `beta-linux.yml`, `beta.yml` for beta).
- The matching EAS workflow is green (`Release Mobile` with all six build, distribution, screenshot, and review-submission jobs for stable; `Release iOS Beta` for beta).
- The reconcile PR is merged into `main`.
@@ -50,6 +50,29 @@ Rules that apply to both steps:
- An approval the user already gave covers what it names, such as an explicit PR selection or authorization to release autonomously. Do not ask for it again.
- If the user asks for a release preview, show the prospective changelog/release contents and answer questions, but do not commit, tag, publish, or run release commands until they explicitly authorize the release.
## npm Trusted Publishing setup
Before the first release using this workflow, configure each of `@getpaseo/highlight`, `@getpaseo/relay`, `@getpaseo/protocol`, `@getpaseo/client`, `@getpaseo/plugin`, `@getpaseo/server`, and `@getpaseo/cli` on npmjs.com:
1. Add a GitHub Actions trusted publisher with organization `getpaseo`, repository `paseo`, and workflow filename `npm-release.yml`.
2. Enable **Allow npm dist-tag** for the publisher.
3. Set publishing access to **Require two-factor authentication and disallow tokens**.
4. Publish within two days of adding the publisher, or recreate it before the first publish.
The tag push starts `NPM Release`. Rerun the failed workflow from GitHub Actions if publication fails. npm generates provenance for successful trusted publishes.
For manual Desktop or Android release runs, select the release tag as the workflow ref. The checked-out commit must match the workflow commit for the GitHub attestation. The Android attestation records the workflow that requested and downloaded the EAS build; it does not independently attest the EAS builder.
### Test Trusted Publishing with a canary
In GitHub Actions, open **NPM Release** and select **Run workflow** on `main`.
Choose `@getpaseo/highlight` or `all`, then run the workflow. The default suffix uses the run ID and attempt.
Set `dry_run` to preview publication without publishing. For a live run, verify provenance on npmjs.com.
To clean up, run `npm dist-tag rm <pkg> canary` for each published package.
Check [npm's unpublish policy](https://docs.npmjs.com/policies/unpublish/) before running `npm unpublish <pkg>@<version>`.
If npm does not permit removal, run `npm deprecate <pkg>@<version> "Canary test"` instead.
## Main stays open
Merge normal PRs into `main` at any time, including while a beta soaks or a release is being
@@ -128,16 +151,15 @@ An explicit user instruction can select another base.
6. After go-ahead, push the tag first with `npm run release:push` so remote builds start right away.
Because the release branch is already pushed at `HEAD`, no second branch CI run starts, and only
the tag release workflows run.
7. Immediately in parallel after `npm run release:push` finishes: publish npm packages with
`npm run release:publish` (stable) or `npm run release:publish:beta` (beta), merge the
already-green [reconcile `main`](#reconcile-main) PR, and create the release heartbeat. (`npm run release:ship` and `npm run release:ship:beta` also run
`release:push` before `release:publish`, so tag builds never wait behind npm.)
7. After `npm run release:push` finishes, merge the green [reconcile `main`](#reconcile-main) PR and create the release heartbeat. Watch `NPM Release` alongside the other release workflows.
When promoting or branching from a tag created before `release:prep:*`, `release:ship`, and the
`release/**` workflow triggers existed (for example `v0.17.0-beta.1`), either cherry-pick the
release-tooling commit onto the release branch (leaving product code unchanged) or follow the
older tag's scripts (`version:all:*`, manual `gh workflow run ci.yml --ref <branch>`,
`release:push`, and `release:publish`) until the next tag carries the new tooling.
When a release starts from an older tag, check for the npm workflow before pushing the release tag:
```bash
git cat-file -e HEAD:.github/workflows/npm-release.yml
```
If the check fails, cherry-pick the release publishing tooling from `main` onto the release branch before preparation and CI. The release tag must include the workflow and package repository metadata.
A stable hotfix can take the version a patch beta line would promote to, such as `0.13.3`
shipping while `0.13.3-beta.2` soaks. Never republish or reuse a shipped version. Continue the line
@@ -146,7 +168,7 @@ computes that from a prerelease, so run `npm run release:check`, bump with
`npm version 0.13.4-beta.1 --include-workspace-root --no-git-tag-version && git commit -m "chore(release): cut 0.13.4-beta.1"`,
push the release branch for `CI` and `Desktop Packages`, and complete the
[pre-release dependency checks](#pre-release-dependency-checks) before shipping with
`npm run release:push` and `npm run release:publish:beta` (or `npm run release:ship:beta`).
`npm run release:push`.
Record the tested beta tag as its source so its soak still counts for the unchanged content.
## Release inventory
@@ -201,7 +223,7 @@ Commit and open the PR into `main`, but do not merge it during Preparation:
- If the release is cancelled, close the PR. `main` is untouched.
- If the release branch changes during Preparation, re-run `npm run release:reconcile -- --ref origin/release/vX.Y.Z` on the same branch and push to the same PR.
- At Ship, right after `npm run release:push` pushes the tag, run `npm run release:reconcile -- --tag vX.Y.Z` on the reconcile branch. A clean `git status` means the PR already matches the tag, so merge it in parallel with `npm run release:publish` and the tag builds. If it shows changes, push them and wait for the PR checks before merging.
- At Ship, right after `npm run release:push` pushes the tag, run `npm run release:reconcile -- --tag vX.Y.Z` on the reconcile branch. A clean `git status` means the PR already matches the tag, so merge it in parallel with `NPM Release` and the tag builds. If it shows changes, push them and wait for the PR checks before merging.
Delete the remote release branch
(`git push origin --delete release/vX.Y.Z` or `release/vX.Y.Z-beta.N`) only after the reconcile PR
@@ -266,10 +288,8 @@ git push -u origin HEAD
# 3. After go-ahead and green release-branch checks: push the tag first to start builds.
npm run release:push
# 4. Run these in parallel immediately after step 3:
npm run release:publish
# Also merge the green reconcile/vX.Y.Z PR and create the release heartbeat.
# (`npm run release:ship` runs `release:push` before `release:publish` if used standalone.)
# 4. Merge the green reconcile/vX.Y.Z PR and create the release heartbeat.
# Watch NPM Release and the other tag workflows.
```
`scripts/push-current-release-tag.mjs` refuses non-`release/*` branches, checks that `HEAD` matches `origin/release/*`, tags `HEAD` with `vX.Y.Z`, and pushes the tag. Because `HEAD` is already on the pushed release branch, no second branch CI run starts.
@@ -282,9 +302,9 @@ npm run release:publish
4. Wave 4: `@getpaseo/server` (depends on `@getpaseo/client`, `@getpaseo/highlight`, `@getpaseo/plugin`, `@getpaseo/protocol`, and `@getpaseo/relay`).
5. Wave 5: `@getpaseo/cli` (depends on `@getpaseo/client`, `@getpaseo/protocol`, and `@getpaseo/server`).
After each `npm publish`, the script polls `npm view` (up to 12 checks, 5 seconds apart) until the published version is visible on npm before moving to the next package. Waiting for registry visibility prevents dependent publishes and manual retries from hitting `E409` conflicts or `E404` propagation lag. On stable releases, the script also checks `npm view @getpaseo/cli dist-tags` and moves npm's `beta` dist-tag to the new stable version across all seven packages whenever the stable version is newer than `beta` (leaving `beta` untouched during a stable hotfix on an older line).
After publishing all packages, the script checks their direct version endpoints in parallel for up to 10 minutes. This avoids stale packument caches delaying the publish wave. On stable releases, the script also checks `npm view @getpaseo/cli dist-tags` and moves npm's `beta` dist-tag to the new stable version across all seven packages whenever the stable version is newer than `beta` (leaving `beta` untouched during a stable hotfix on an older line).
The tag push triggers `Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and `Deploy App` (`app.paseo.sh`, stable tags only) on GitHub Actions. `Desktop Release` and `Release Notes Sync` create the GitHub Release as a draft while builds and release-note sync run. `Deploy Website` triggers later on `release: published` when `Desktop Release` publishes the non-draft stable GitHub Release. EAS picks up the same tag through the EAS GitHub app and starts `Release Mobile` (iOS and Android store builds) in parallel, with no mobile-release workflow under `.github/workflows`. None of these workflows install `@getpaseo/*` from the public npm registry because all of them build from the checked-out tag commit and workspace packages.
The tag push triggers `NPM Release`, `Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and `Deploy App` (`app.paseo.sh`, stable tags only) on GitHub Actions. `Desktop Release` and `Release Notes Sync` create the GitHub Release as a draft while builds and release-note sync run. `Deploy Website` triggers later on `release: published` when `Desktop Release` publishes the non-draft stable GitHub Release. EAS picks up the same tag through the EAS GitHub app and starts `Release Mobile` (iOS and Android store builds) in parallel, with no mobile-release workflow under `.github/workflows`. None of these workflows install `@getpaseo/*` from the public npm registry because all of them build from the checked-out tag commit and workspace packages.
Confirm that `npm view @getpaseo/cli dist-tags` shows `latest` at the shipped version, and `beta` at the shipped version or an active newer beta, before considering the stable release complete.
@@ -308,7 +328,6 @@ git push -u origin HEAD # Trigger CI + Desktop Packages on release/vX.Y.Z
# After go-ahead:
npm run release:push # Create tag vX.Y.Z on HEAD and push (starts release builds)
# In parallel right after release:push:
npm run release:publish # Publish to npm (idempotent, with propagation + beta dist-tag sync)
# Merge the green reconcile/vX.Y.Z PR and create the release heartbeat.
```
@@ -326,10 +345,8 @@ npm run release:prep:beta:next # Cut X.Y.Z-beta.2, beta.3, ...
git push -u origin HEAD
# Wait for CI + Desktop Packages to pass and complete the pre-release dependency checks.
# 3. After go-ahead: push the tag first, then run npm publish, merge the reconcile PR, and heartbeat in parallel:
# 3. After go-ahead, push the tag, merge the reconcile PR, and create the heartbeat:
npm run release:push
npm run release:publish:beta
# (Or run `npm run release:ship:beta` in one shell while merging reconcile/vX.Y.Z-beta.N.)
# Later, after soak, promote on release/vX.Y.Z:
npm run release:prep:promote
@@ -338,7 +355,6 @@ git push -u origin HEAD
# Wait for CI + Desktop Packages and complete the pre-release dependency checks.
# After go-ahead:
npm run release:push
npm run release:publish
# Merge the green reconcile/vX.Y.Z PR and create the release heartbeat in parallel.
```
@@ -484,10 +500,11 @@ Do not leave the fix as a paced release. The installs that took the bad release
### Custom ramp on a manually-dispatched build
`desktop-release.yml` accepts `rollout_hours` only on `workflow_dispatch`, which is the path used to rebuild an existing tag (retry a failed release, force a rebuild on a different ref). On that path, you can stamp a different ramp directly:
`desktop-release.yml` accepts `rollout_hours` only on `workflow_dispatch`, which is the path used to rebuild an existing tag. On that path, you can stamp a different ramp directly:
```bash
gh workflow run desktop-release.yml \
--ref v0.1.43 \
-f tag=v0.1.43 \
-f rollout_hours=6
```
@@ -670,9 +687,9 @@ The GitHub Release body is populated automatically by the `Release Notes Sync` w
**NEVER bump the version to fix a build problem.** New versions are reserved for meaningful product changes (features, fixes, improvements). Build/CI failures are fixed on the current version.
If `npm run release:publish` or `npm run release:publish:beta` fails after `npm run release:push` pushed the tag, fix the npm authentication, OTP, or local build issue and rerun the publish command on the same commit. Do not move or force-push the `v*` tag, because `scripts/publish-release-packages.mjs` skips packages already visible on npm and resumes from the remaining packages.
If `NPM Release` fails after `npm run release:push` pushed the tag, fix the cause and rerun the failed workflow on the same tag. Do not move or force-push the `v*` tag, because `scripts/publish-release-packages.mjs` skips packages already visible on npm and resumes from the remaining packages. If a newer beta is already published, the script refuses an older beta retry to protect the `beta` dist-tag.
**Do not rely on `workflow_dispatch` for tagged code fixes.** The `workflow_dispatch` trigger runs the workflow file from the default branch but checks out the code at the tag ref (`ref: ${{ inputs.tag }}`). That means fixes committed to `main` won't change the tagged source tree being built. `workflow_dispatch` only helps when the fix lives in the workflow file itself.
For a manual Desktop or Android rebuild, dispatch the workflow from the release tag. The workflow and checked-out commit must match the tag. A code fix on `main` does not change the tagged source.
For Docker-only retries, **do not push or force-push a `v*` release tag**.
`v*` tag pushes rebuild desktop assets, the Android APK, Docker, release notes,
@@ -719,14 +736,11 @@ git tag -f desktop-windows-v0.1.28 HEAD && git push origin desktop-windows-v0.1.
# Android APK
git tag -f android-v0.1.28 HEAD && git push origin android-v0.1.28 --force
# Beta
git tag -f v0.1.29-beta.2 HEAD && git push origin v0.1.29-beta.2 --force
```
This ensures the checkout ref matches the code you want built, with the fix included.
- `vX.Y.Z` or `vX.Y.Z-beta.N` rebuilds the full tagged release
- Never move a `vX.Y.Z` or `vX.Y.Z-beta.N` tag. Use a new version for code changes that affect npm packages.
- `desktop-vX.Y.Z` rebuilds desktop for all desktop platforms only
- `desktop-macos-vX.Y.Z`, `desktop-linux-vX.Y.Z`, and `desktop-windows-vX.Y.Z` rebuild only that desktop platform
- `android-vX.Y.Z` rebuilds the Android APK release only
@@ -756,7 +770,7 @@ intentionally unavailable to desktop updater clients.
- The npm `version` lifecycle regenerates F-Droid changelog files from `CHANGELOG.md` for stable releases only (`npm run fdroid:changelogs`) and stages them, so the release commit and tag carry them. Betas are a no-op. A stable run **aborts the release** if `CHANGELOG.md` has no entry for the version being cut — commit the changelog entry first. See [docs/android.md](android.md) for why these files are generated per ABI.
- `release:prepare` refreshes workspace `node_modules` links to prevent stale types.
- `npm run dev:desktop` and `npm run build:desktop` target the Electron desktop package in `packages/desktop`.
- `release:publish` and `release:publish:beta` run `scripts/publish-release-packages.mjs`. They publish the seven `@getpaseo/*` packages in dependency waves, skip versions already visible on npm, retry transient registry errors, and poll `npm view` between packages so dependents do not hit `E409` or `E404` propagation lag. `release:ship` and `release:ship:beta` run `release:push` before `release:publish` or `release:publish:beta`.
- `NPM Release` runs `scripts/publish-release-packages.mjs` for the pushed tag. It skips versions already visible on npm, retries transient registry errors, and waits for registry propagation. `release:ship` and `release:ship:beta` run `release:push`.
- The website uses GitHub's latest published release API for download links, so published beta prereleases do not replace the stable download target.
## Changelog format
@@ -971,6 +985,8 @@ question.
you got wrong, rank every highlight again, and then edit the file. Moving only the named item
leaves the same mistake in the others.
Order sections as `Breaking`, `Security`, `Added`, `Improved`, `Changed`, `Plugins`, `Fixed` (omitting empty sections) so `Security` and `Plugins` stay visible above a long `Fixed` list.
Bullets within each section (Added, Changed, Fixed) follow this order:
1. **User-facing features and changes first** — things users will notice, want to try, or that change their workflow.
@@ -1017,7 +1033,7 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] The diff from the previous stable to the resolved release source is classified as patch or minor, with the target version and rationale approved
- [ ] `npm run release:prep:beta:patch`, `release:prep:beta:minor`, or `release:prep:beta:next` created the version commit on `release/vX.Y.Z-beta.N` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI), with the unmerged reconcile PR opened right after the branch push
- [ ] Complete the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z-beta.N` tag without triggering a second CI run, while `npm run release:publish:beta`, the merge of the green `reconcile/vX.Y.Z-beta.N` PR, and the release heartbeat started in parallel
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z-beta.N` tag without triggering a second CI run, while `NPM Release`, the merge of the green `reconcile/vX.Y.Z-beta.N` PR, and the release heartbeat started in parallel
- [ ] All seven `@getpaseo/*` npm packages show the version under the `beta` dist-tag, not `latest`
- [ ] The GitHub prerelease was published only after the three beta manifests were uploaded, and it has the changelog body and every expected macOS, Linux, Windows, and Android APK asset
- [ ] GitHub `Desktop Release` workflow for the `v*-beta.N` tag is green
@@ -1041,7 +1057,7 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] Ensure local format, lint, and typecheck pass and the working tree is clean before running `release:prep:*`
- [ ] `npm run release:prep:patch`, `release:prep:minor`, or `release:prep:promote` created the version commit on `release/vX.Y.Z` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI), with the unmerged reconcile PR opened right after the branch push
- [ ] Complete the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z` tag without triggering a second CI run, while `npm run release:publish`, the merge of the green `reconcile/vX.Y.Z` PR, and the release heartbeat started in parallel
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z` tag without triggering a second CI run, while `NPM Release`, the merge of the green `reconcile/vX.Y.Z` PR, and the release heartbeat started in parallel
- [ ] All seven `@getpaseo/*` npm packages show `latest` at the new stable, and `beta` at the new stable too unless an active newer beta holds `beta`
- [ ] The GitHub Release was published only after the three stable manifests were uploaded, and it has the changelog body and every expected macOS, Linux, Windows, and Android APK asset
- [ ] GitHub `Desktop Release` workflow for the `v*` tag is green
+8 -2
View File
@@ -97,13 +97,19 @@ Two more reasons the stylesheet route does not work here:
- Unistyles owns style conversion on web, so React Native Web's `animationKeyframes` is ignored.
- React Native Web's `StyleSheet.create` validation deletes `animationName` in development.
Indicators that must move together use `phase: "shared"`, which starts the loop at the document
timeline's origin instead of at mount. Every ring and every loader is then at the same point of its
Indicators that must move together use `phase: "shared"`, which starts the loop at the step
grid's origin instead of at mount. Every ring and every loader is then at the same point of its
cycle wherever and whenever it mounted. `phase: "own"` starts the loop at the beginning of the
current grid step, so its steps still turn over with the shared loops. A stepped animation sets its easing on the keyframes:
`step-end` to hold each keyframe until the next, `steps(n)` to cross between two keyframes in `n`
even steps. The compositor then draws a frame when a step changes and none in between.
The grid's origin is 2.5 µs after the document timeline's, not at it. Browsers stamp frames on
whole microseconds, and each loop computes a step boundary from its own duration. A boundary that
falls exactly on a frame's stamp can then round to before that frame for the ring and after it for
the shimmer, so they turn over on consecutive frames. With the origin at 0, every third boundary is
a whole millisecond and lands on a stamp. Off by 2.5 µs, no boundary does.
## Native
Reanimated commits a cloned shadow tree on the UI thread for every frame a shared value changes.
+1 -1
View File
@@ -49,5 +49,5 @@ Terminal frames share the daemon main event loop with all agent traffic. The `ev
## Known remaining contention (follow-up candidates)
- A single large `agent_stream` message (e.g. a 250KB diff payload) measurably delays terminal echo (~100ms-class dips) — cost is split between daemon serialization and app-side parse/render on the shared browser main thread. See [agent-stream-performance.md](agent-stream-performance.md) for that pipeline's own budgets.
- Relay-attached clients pay pure-JS tweetnacl encryption on the daemon main loop (`packages/relay/src/encrypted-channel.ts`). Negotiated binary application frames stay binary ciphertext and avoid base64 encode/decode; text and mixed-version traffic remain base64 WebSocket text frames.
- Relay-attached clients pay pure-JS encryption on the daemon main loop: `@noble/ciphers` ChaCha20-Poly1305 records in protected mode (`packages/relay/src/protected-records.ts`), tweetnacl in legacy mode (`packages/relay/src/encrypted-channel.ts`). Protected peers that negotiate `binaryCiphertext` send every record as a binary frame with no base64 step. Legacy text and peers that predate `binaryCiphertext` still pay base64 encode/decode.
- `sendToClient` re-stringifies session messages per socket; only matters for multi-socket connections.
+1 -1
View File
@@ -278,7 +278,7 @@ Do not import `theme` from `@/styles/theme` for live UI colors. That export is a
Wrap the icon (or other leaf component) with `withUnistyles` instead, so only that node re-renders when the theme changes:
```tsx
import { ChevronDown } from "lucide-react-native";
import ChevronDown from "lucide-react-native/icons/chevron-down";
import { StyleSheet, withUnistyles } from "react-native-unistyles";
const ThemedChevronDown = withUnistyles(ChevronDown);
@@ -0,0 +1,5 @@
- Switch providers mid-chat: Switch a chat to another provider and keep the conversation, with chat history now stored on the host.
- Queue survives restarts: Queued messages now live on the host, so they survive app reloads, device switches and daemon restarts.
- One switch for agent tools: Agent tools now sit behind one Enable tools setting with orchestration, schedules, PR watching and browser groups, and are on by default.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,5 @@
- Switch providers mid-chat: Switch a chat to another provider and keep the conversation, with chat history now stored on the host.
- Queue survives restarts: Queued messages now live on the host, so they survive app reloads, device switches and daemon restarts.
- One switch for agent tools: Agent tools now sit behind one Enable tools setting with orchestration, schedules, PR watching and browser groups, and are on by default.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,5 @@
- Switch providers mid-chat: Switch a chat to another provider and keep the conversation, with chat history now stored on the host.
- Queue survives restarts: Queued messages now live on the host, so they survive app reloads, device switches and daemon restarts.
- One switch for agent tools: Agent tools now sit behind one Enable tools setting with orchestration, schedules, PR watching and browser groups, and are on by default.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,5 @@
- Switch providers mid-chat: Switch a chat to another provider and keep the conversation, with chat history now stored on the host.
- Queue survives restarts: Queued messages now live on the host, so they survive app reloads, device switches and daemon restarts.
- One switch for agent tools: Agent tools now sit behind one Enable tools setting with orchestration, schedules, PR watching and browser groups, and are on by default.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,8 @@
Changed
- Changed agent messages and subagent finish notifications to default to steer, falling back to queue on providers that cannot steer mid-turn instead of interrupting the active turn
Fixed
- Fixed direct steer and interrupt prompts clearing queued messages and finish notifications from the queue
- Fixed queued message batches being dropped instead of held after transient dispatch errors or run-start timeouts
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,8 @@
Changed
- Changed agent messages and subagent finish notifications to default to steer, falling back to queue on providers that cannot steer mid-turn instead of interrupting the active turn
Fixed
- Fixed direct steer and interrupt prompts clearing queued messages and finish notifications from the queue
- Fixed queued message batches being dropped instead of held after transient dispatch errors or run-start timeouts
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,8 @@
Changed
- Changed agent messages and subagent finish notifications to default to steer, falling back to queue on providers that cannot steer mid-turn instead of interrupting the active turn
Fixed
- Fixed direct steer and interrupt prompts clearing queued messages and finish notifications from the queue
- Fixed queued message batches being dropped instead of held after transient dispatch errors or run-start timeouts
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,8 @@
Changed
- Changed agent messages and subagent finish notifications to default to steer, falling back to queue on providers that cannot steer mid-turn instead of interrupting the active turn
Fixed
- Fixed direct steer and interrupt prompts clearing queued messages and finish notifications from the queue
- Fixed queued message batches being dropped instead of held after transient dispatch errors or run-start timeouts
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,6 @@
Fixed
- Fixed OpenCode v2 skills picked inline, with attachments, or while a turn is running being sent as literal /skill text instead of loading the skill
- Fixed Codex skills picked inline, with attachments, or while a turn is running not loading
- Fixed Desktop image attachments disappearing across multiple windows, tab switches, and queued follow-up sends
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,6 @@
Fixed
- Fixed OpenCode v2 skills picked inline, with attachments, or while a turn is running being sent as literal /skill text instead of loading the skill
- Fixed Codex skills picked inline, with attachments, or while a turn is running not loading
- Fixed Desktop image attachments disappearing across multiple windows, tab switches, and queued follow-up sends
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,6 @@
Fixed
- Fixed OpenCode v2 skills picked inline, with attachments, or while a turn is running being sent as literal /skill text instead of loading the skill
- Fixed Codex skills picked inline, with attachments, or while a turn is running not loading
- Fixed Desktop image attachments disappearing across multiple windows, tab switches, and queued follow-up sends
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,6 @@
Fixed
- Fixed OpenCode v2 skills picked inline, with attachments, or while a turn is running being sent as literal /skill text instead of loading the skill
- Fixed Codex skills picked inline, with attachments, or while a turn is running not loading
- Fixed Desktop image attachments disappearing across multiple windows, tab switches, and queued follow-up sends
Full notes: https://paseo.sh/changelog
+6
View File
@@ -99,6 +99,12 @@ buildNpmPackage {
buildPhase = ''
runHook preBuild
# npm ci runs with --ignore-scripts, so the root postinstall that applies
# patches/ never runs. The web bundle imports modules those patches add
# (lucide-react-native/context). The script spawns patch-package by name,
# which only resolves with node_modules/.bin on PATH (npm run sets it).
PATH="$PWD/node_modules/.bin:$PATH" node scripts/postinstall-patches.mjs
# Native deps (terminal emulation; libuv-linked on Linux)
npm rebuild node-pty
+1 -1
View File
@@ -1 +1 @@
sha256-oBd6CQ8+BhzMHhrpRIwzojuFPUwqXpgc3ZAPqKPs5QQ=
sha256-nWaU16CvKjT2bhQ/Q0gxZOv2NGxODBwn7lZ/EQgE+u0=
+6
View File
@@ -90,6 +90,12 @@ buildNpmPackage rec {
buildPhase = ''
runHook preBuild
# npm ci runs with --ignore-scripts, so the root postinstall that applies
# patches/ never runs. The web bundle imports modules those patches add
# (lucide-react-native/context). The script spawns patch-package by name,
# which only resolves with node_modules/.bin on PATH (npm run sets it).
PATH="$PWD/node_modules/.bin:$PATH" node scripts/postinstall-patches.mjs
# Rebuild only node-pty (native addon for terminal emulation). The sherpa
# speech runtime ships prebuilt platform packages and is copied into the
# daemon closure by scripts/trace-daemon.mjs.
+180 -72
View File
@@ -1,12 +1,12 @@
{
"name": "paseo",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "paseo",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"hasInstallScript": true,
"license": "Apache-2.0",
"workspaces": [
@@ -38,6 +38,7 @@
"js-yaml": "^4.1.1",
"knip": "^5.82.1",
"lefthook": "^2.1.6",
"lockfile-lint": "5.1.1",
"oxfmt": "0.46.0",
"oxlint": "1.61.0",
"oxlint-tsgolint": "^0.22.1",
@@ -14792,6 +14793,20 @@
"dev": true,
"license": "BSD-2-Clause"
},
"node_modules/@yarnpkg/parsers": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.1.0.tgz",
"integrity": "sha512-WoxUM/Be4hfsX06FxsvpGgfYqwgivMV7/Ol7aFuSfSmY6rRaiju4QxOEe9RUS0iYcSHWl5i9AhB1cMoE0p+XiA==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"js-yaml": "^4.3.0",
"tslib": "^2.4.0"
},
"engines": {
"node": ">=18.12.0"
}
},
"node_modules/abab": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
@@ -17348,6 +17363,43 @@
"layout-base": "^1.0.0"
}
},
"node_modules/cosmiconfig": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.2.tgz",
"integrity": "sha512-gtTZxTDau1wL7Y7zifc2dd8jHSK/k6BTx/2Xp/BpdlAdnlYWFVt7qhJqgwi7637yRwRQ3qL4ZidbB4I8tA5VOg==",
"dev": true,
"license": "MIT",
"dependencies": {
"env-paths": "^2.2.1",
"import-fresh": "^3.3.0",
"js-yaml": "^4.1.0",
"parse-json": "^5.2.0"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/d-fischer"
},
"peerDependencies": {
"typescript": ">=4.9.5"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/cosmiconfig/node_modules/env-paths": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
"integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/create-jest": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz",
@@ -25817,9 +25869,19 @@
"license": "MIT"
},
"node_modules/js-yaml": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz",
"integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/puzrin"
},
{
"type": "github",
"url": "https://github.com/sponsors/nodeca"
}
],
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
@@ -26810,6 +26872,41 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/lockfile-lint": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lockfile-lint/-/lockfile-lint-5.1.1.tgz",
"integrity": "sha512-GqzPAe/DvCR23Rg6vu0be+ZvpDgeri4TkTFWAQJ0MTACvWwQXah5f9kSuKyPY9Y1JRdKpQI6QOLwfdRoQezTpg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"cosmiconfig": "^9.0.0",
"debug": "^4.3.4",
"lockfile-lint-api": "^5.10.2",
"tinyglobby": "^0.2.15",
"yargs": "^17.7.2"
},
"bin": {
"lockfile-lint": "bin/lockfile-lint.js"
},
"engines": {
"node": ">=16.0.0"
}
},
"node_modules/lockfile-lint-api": {
"version": "5.10.2",
"resolved": "https://registry.npmjs.org/lockfile-lint-api/-/lockfile-lint-api-5.10.2.tgz",
"integrity": "sha512-m3bo4ScHsfyRzysYjhtGcyaoutbg9Xe8ttR6vtGrgOSJ6qj4ryi8vWPCYy8SeG4FxvHuFM5Mfcubz/REMzaUOw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@yarnpkg/parsers": "^3.0.0-rc.48.1",
"debug": "^4.3.4",
"object-hash": "^3.0.0"
},
"engines": {
"node": ">=16.0.0"
}
},
"node_modules/lodash": {
"version": "4.17.23",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
@@ -29965,6 +30062,16 @@
"node": ">=0.10.0"
}
},
"node_modules/object-hash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
"integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 6"
}
},
"node_modules/object-inspect": {
"version": "1.13.4",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
@@ -37552,7 +37659,7 @@
},
"packages/app": {
"name": "@getpaseo/app",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"dependencies": {
"@codemirror/commands": "6.10.4",
"@codemirror/language": "6.12.4",
@@ -37620,6 +37727,7 @@
"fast-deep-equal": "^3.1.3",
"htmlparser2": "^12.0.0",
"i18next": "^26.3.0",
"katex": "^0.16.47",
"lucide-react-native": "^1.50.0",
"markdown-it": "^10.0.0",
"mdast-util-from-markdown": "2.0.3",
@@ -39705,20 +39813,20 @@
},
"packages/cli": {
"name": "@getpaseo/cli",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"license": "Apache-2.0",
"dependencies": {
"@clack/prompts": "^1.0.0",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/server": "0.19.0-beta.1",
"chalk": "^5.3.0",
"commander": "^12.0.0",
"mime-types": "^2.1.35",
"tree-kill": "^1.2.2",
"ws": "^8.14.2",
"yaml": "^2.8.4",
"zod": "^4.4.3"
"@clack/prompts": "1.1.0",
"@getpaseo/client": "0.19.2",
"@getpaseo/protocol": "0.19.2",
"@getpaseo/server": "0.19.2",
"chalk": "5.6.2",
"commander": "12.1.0",
"mime-types": "2.1.35",
"tree-kill": "1.2.2",
"ws": "8.20.0",
"yaml": "2.8.4",
"zod": "4.4.3"
},
"bin": {
"paseo": "bin/paseo"
@@ -39961,11 +40069,11 @@
},
"packages/client": {
"name": "@getpaseo/client",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/relay": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.2",
"@getpaseo/relay": "0.19.2",
"ws": "^8.20.0",
"zod": "^4.4.3"
},
@@ -39977,7 +40085,7 @@
},
"packages/desktop": {
"name": "@getpaseo/desktop",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/cli": "*",
@@ -40221,7 +40329,7 @@
},
"packages/expo-two-way-audio": {
"name": "@getpaseo/expo-two-way-audio",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.5.14",
@@ -40267,7 +40375,7 @@
},
"packages/highlight": {
"name": "@getpaseo/highlight",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"license": "Apache-2.0",
"dependencies": {
"@codemirror/language": "6.12.4",
@@ -40297,7 +40405,7 @@
},
"packages/plugin": {
"name": "@getpaseo/plugin",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^1.4.0",
@@ -40305,8 +40413,8 @@
"use-sync-external-store": "^1.6.0"
},
"devDependencies": {
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/client": "0.19.2",
"@getpaseo/protocol": "0.19.2",
"@types/node": "^20.9.0",
"@types/react": "~19.2.0",
"react": "19.2.3",
@@ -40316,8 +40424,8 @@
"zod": "^4.4.3"
},
"peerDependencies": {
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/client": "0.19.2",
"@getpaseo/protocol": "0.19.2",
"react": ">=19.1.0 <20",
"react-native": ">=0.81.5",
"zod": "^4.4.3"
@@ -40339,7 +40447,7 @@
},
"packages/protocol": {
"name": "@getpaseo/protocol",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"license": "Apache-2.0",
"dependencies": {
"semver": "^7.8.5",
@@ -40366,7 +40474,7 @@
}
},
"packages/react-native-enriched-markdown": {
"version": "0.19.0-beta.1",
"version": "0.19.2",
"hasInstallScript": true,
"license": "MIT",
"peerDependencies": {
@@ -40382,7 +40490,7 @@
},
"packages/relay": {
"name": "@getpaseo/relay",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"license": "Apache-2.0",
"dependencies": {
"@noble/ciphers": "^2.4.0",
@@ -40604,59 +40712,59 @@
},
"packages/server": {
"name": "@getpaseo/server",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^0.17.1",
"@agentclientprotocol/sdk": "0.17.1",
"@anthropic-ai/claude-agent-sdk": "0.3.326",
"@anthropic-ai/sdk": "^0.104.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/highlight": "0.19.0-beta.1",
"@getpaseo/plugin": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/relay": "0.19.0-beta.1",
"@isaacs/ttlcache": "^2.1.4",
"@anthropic-ai/sdk": "0.104.2",
"@getpaseo/client": "0.19.2",
"@getpaseo/highlight": "0.19.2",
"@getpaseo/plugin": "0.19.2",
"@getpaseo/protocol": "0.19.2",
"@getpaseo/relay": "0.19.2",
"@isaacs/ttlcache": "2.1.4",
"@modelcontextprotocol/node": "2.1.2",
"@modelcontextprotocol/sdk": "1.29.0",
"@modelcontextprotocol/server": "2.4.0",
"@opencode-ai/sdk": "1.14.46",
"@opencode/client": "2.0.10",
"@silvia-odwyer/photon-node": "^0.3.4",
"@silvia-odwyer/photon-node": "0.3.4",
"@xterm/addon-serialize": "0.14.0",
"@xterm/addon-unicode-graphemes": "0.5.0-beta.330",
"@xterm/headless": "6.1.0-beta.334",
"ai": "5.0.78",
"ajv": "^8.20.0",
"bcryptjs": "^3.0.3",
"dotenv": "^17.2.3",
"esbuild": "^0.25.12",
"express": "^4.18.2",
"fast-deep-equal": "^3.1.3",
"https-proxy-agent": "^7.0.6",
"lru-cache": "^11.5.1",
"markdown-it": "^10.0.0",
"mnemonic-id": "^3.2.7",
"ajv": "8.20.0",
"bcryptjs": "3.0.3",
"dotenv": "17.3.1",
"esbuild": "0.25.12",
"express": "4.22.1",
"fast-deep-equal": "3.1.3",
"https-proxy-agent": "7.0.6",
"lru-cache": "11.5.1",
"markdown-it": "10.0.0",
"mnemonic-id": "3.2.7",
"node-pty": "1.2.0-beta.15",
"openai": "^6.44.0",
"p-limit": "^7.3.0",
"p-memoize": "^8.0.0",
"p-throttle": "^8.1.0",
"parse5": "^7.3.0",
"pino": "^10.2.0",
"pino-pretty": "^13.1.3",
"qrcode": "^1.5.4",
"rotating-file-stream": "^3.2.9",
"semver": "^7.8.5",
"openai": "6.44.0",
"p-limit": "7.3.0",
"p-memoize": "8.0.0",
"p-throttle": "8.1.0",
"parse5": "7.3.0",
"pino": "10.3.1",
"pino-pretty": "13.1.3",
"qrcode": "1.5.4",
"rotating-file-stream": "3.2.9",
"semver": "7.8.5",
"sherpa-onnx-node": "1.12.28",
"strip-ansi": "^7.1.2",
"tree-kill": "^1.2.2",
"typescript": "^5.9.3",
"undici": "^7.24.8",
"uuid": "^9.0.1",
"which": "^5.0.0",
"ws": "^8.14.2",
"strip-ansi": "7.1.2",
"tree-kill": "1.2.2",
"typescript": "5.9.3",
"undici": "7.24.8",
"uuid": "9.0.1",
"which": "5.0.0",
"ws": "8.20.0",
"yaml": "2.9.1",
"zod": "^4.4.3"
"zod": "4.4.3"
},
"devDependencies": {
"@modelcontextprotocol/client": "2.4.0",
@@ -41579,7 +41687,7 @@
},
"packages/website": {
"name": "@getpaseo/website",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"dependencies": {
"@cloudflare/vite-plugin": "^1.29.1",
"@cloudflare/workers-types": "^4.20260317.1",
@@ -43205,7 +43313,7 @@
},
"plugins": {
"name": "@getpaseo/builtin-plugins",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"dependencies": {
"@getpaseo/plugin": "*",
"zod": "^4.4.3"
+9 -4
View File
@@ -1,6 +1,6 @@
{
"name": "paseo",
"version": "0.19.0-beta.1",
"version": "0.19.2",
"private": true,
"description": "Paseo: voice-controlled development environment for local AI coding agents",
"keywords": [
@@ -127,9 +127,13 @@
"release:publish": "node scripts/publish-release-packages.mjs",
"release:publish:beta": "node scripts/publish-release-packages.mjs --beta",
"release:push": "node scripts/push-current-release-tag.mjs",
"release:ship": "npm run release:push && npm run release:publish",
"release:ship:beta": "npm run release:push && npm run release:publish:beta",
"release:reconcile": "node scripts/reconcile-release.mjs"
"release:ship": "npm run release:push",
"release:ship:beta": "npm run release:push",
"release:reconcile": "node scripts/reconcile-release.mjs",
"gpui:install": "node scripts/gpui.mjs install",
"gpui:bundle": "node scripts/gpui.mjs bundle",
"build:gpui": "node scripts/gpui.mjs build",
"dev:gpui": "node scripts/gpui.mjs run"
},
"devDependencies": {
"@types/ws": "^8.5.14",
@@ -144,6 +148,7 @@
"js-yaml": "^4.1.1",
"knip": "^5.82.1",
"lefthook": "^2.1.6",
"lockfile-lint": "5.1.1",
"oxfmt": "0.46.0",
"oxlint": "1.61.0",
"oxlint-tsgolint": "^0.22.1",
@@ -745,7 +745,8 @@ async function recordDelayedRunningTransition(
const prompt = "Second prompt keeps streaming.";
gate.holdNextAgentStreamEvent("turn_started");
gate.holdNextAgentUpdate(agent.agentId, "running");
// Hold every running snapshot until release so the prompt-commit emitState does not leak early.
gate.holdAgentUpdates(agent.agentId, "running");
gate.holdNextServerMessage("send_agent_message_response");
gate.setAgentStreamSuppressed(true);
await recordTurnFrames(page, prompt);
@@ -773,7 +774,7 @@ async function recordDelayedRunningTransition(
await expect(page.getByTestId("turn-working-elapsed")).toBeVisible();
gate.releaseHeldServerMessage("send_agent_message_response");
responseReleased = true;
gate.releaseHeldAgentUpdate(agent.agentId, "running");
gate.releaseHeldAgentUpdates(agent.agentId, "running");
snapshotReleased = true;
} else if (releaseOrder === "response-before-turn") {
gate.releaseHeldServerMessage("send_agent_message_response");
@@ -782,13 +783,13 @@ async function recordDelayedRunningTransition(
gate.releaseHeldAgentStreamEvent("turn_started");
turnReleased = true;
await expect(page.getByTestId("turn-working-elapsed")).toBeVisible();
gate.releaseHeldAgentUpdate(agent.agentId, "running");
gate.releaseHeldAgentUpdates(agent.agentId, "running");
snapshotReleased = true;
} else {
gate.releaseHeldServerMessage("send_agent_message_response");
responseReleased = true;
await recordPaintsFor(page, 80);
gate.releaseHeldAgentUpdate(agent.agentId, "running");
gate.releaseHeldAgentUpdates(agent.agentId, "running");
snapshotReleased = true;
await expect(page.getByTestId("turn-working-elapsed")).toBeVisible();
gate.releaseHeldAgentStreamEvent("turn_started");
@@ -804,7 +805,7 @@ async function recordDelayedRunningTransition(
return { frames, checkpoints };
} finally {
if (!turnReleased) gate.releaseHeldAgentStreamEvent("turn_started");
if (!snapshotReleased) gate.releaseHeldAgentUpdate(agent.agentId, "running");
if (!snapshotReleased) gate.releaseHeldAgentUpdates(agent.agentId, "running");
if (!responseReleased) gate.releaseHeldServerMessage("send_agent_message_response");
gate.setAgentStreamSuppressed(false);
}
@@ -1370,7 +1370,7 @@ test.describe("Agent message submission", () => {
).toHaveCount(0);
});
await test.step("tapping Send still steers and takes the queued row along", async () => {
await test.step("tapping Send still steers without sweeping the queued row", async () => {
const steeredPrompt = "Steer this turn with a tap.";
await fillComposerDraft(page, steeredPrompt);
await page.getByRole("button", { name: "Send and steer", exact: true }).click();
@@ -1379,13 +1379,13 @@ test.describe("Agent message submission", () => {
expect(request.text).toBe(steeredPrompt);
expect(request.activeTurnBehavior).toBe("steer");
gate.accept(1);
await expect(
page.getByTestId("user-message").filter({ hasText: steeredPrompt }),
).toHaveCount(1);
await expect(page.getByRole("button", { name: "Send queued message now" })).toHaveCount(0);
const steeredMessage = page.getByTestId("user-message").filter({ hasText: steeredPrompt });
await expect(steeredMessage).toHaveCount(1);
await expect(steeredMessage).toHaveAttribute("aria-busy", "false");
await expect(page.getByRole("button", { name: "Send queued message now" })).toHaveCount(1);
await expect(
page.getByTestId("user-message").filter({ hasText: queuedPrompt }),
).toHaveCount(1);
).toHaveCount(0);
});
} finally {
await agent.cleanup();
@@ -29,6 +29,8 @@ import {
expectWorkspaceAgentConfiguration,
openCommandCenterForAgent,
} from "../support/helpers/command-center-agent-controls";
import { openSettingsWithShortcut } from "../support/helpers/app";
import { clickSettingsBackToWorkspace } from "../support/helpers/settings";
import { expectComposerVisible } from "../support/helpers/composer";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
@@ -250,8 +252,9 @@ test.describe("Agent profiles in the model picker", () => {
await openCommandCenterForAgent(page, workspace);
await chooseCommandCenterAgentControl({
page,
sublist: "Apply profile",
query: "ui work",
choice: `Profile › ${PROFILE.name}`,
choice: PROFILE.name,
});
await expectComposerModel(page, "One minute stream");
await expectComposerMode(page, "Approval test");
@@ -296,6 +299,34 @@ test.describe("Agent profiles in the model picker", () => {
}
});
test("the composer profile editor reopens after visiting Settings", async ({ page }) => {
const seed = await seedAgentProfiles([PROFILE]);
const workspace = await seedMockAgentWorkspace({
repoPrefix: "agent-profiles-settings-return-",
title: "Agent profiles Settings return",
model: "ten-second-stream",
modeId: "load-test",
});
const model = { provider: PROFILE.provider, modelId: PROFILE.model };
try {
await openAgentRoute(page, workspace);
await expectComposerVisible(page);
await openModelPicker(page);
await openEditProfileFromModelRow(page, model);
await openSettingsWithShortcut(page);
await clickSettingsBackToWorkspace(page);
await expectComposerVisible(page);
await openModelPicker(page);
await openEditProfileFromModelRow(page, model);
await expectAgentProfileNameDraft(page, PROFILE.name);
} finally {
await workspace.cleanup();
await seed.restore();
}
});
test("canceling Remove in the composer profile editor keeps the editor and draft open", async ({
page,
}) => {
@@ -9,6 +9,7 @@ import {
resetReactRenders,
} from "../support/helpers/react-renders";
import { seedWorkspace, type SeededWorkspace } from "../support/helpers/seed-client";
import { decodeWsTextFrame } from "../support/helpers/ws-frames";
/*
* What the app costs per agent update while agents the user is not looking at work.
@@ -196,8 +197,9 @@ function countAgentUpdates(page: Page): AgentUpdateTraffic {
const previous = new Map<string, Record<string, unknown>>();
page.on("websocket", (socket) => {
socket.on("framereceived", ({ payload }) => {
if (typeof payload !== "string" || !payload.includes('"type":"agent_update"')) return;
const frame = JSON.parse(payload) as {
const text = decodeWsTextFrame(payload);
if (text === null || !text.includes('"type":"agent_update"')) return;
const frame = JSON.parse(text) as {
message?: { type?: string; payload?: { kind?: string; agent?: Record<string, unknown> } };
};
if (frame.message?.type !== "agent_update") return;
@@ -137,3 +137,36 @@ test("applies the content font size to an already-open chat", async ({ page }) =
await agent.cleanup();
}
});
test("keeps agent tab menu labels whole at the largest interface font size", async ({
page,
}, testInfo) => {
test.setTimeout(120_000);
await page.addInitScript(() => {
localStorage.setItem("@paseo:app-settings", JSON.stringify({ uiBaseFontSize: 21 }));
});
const agent = await seedMockAgentWorkspace({
repoPrefix: "tab-menu-font-size-",
title: "Tab menu",
});
try {
await openAgentRoute(page, agent);
const tab = page.getByTestId(`workspace-tab-agent_${agent.agentId}`).first();
await expect(tab).toBeVisible({ timeout: 30_000 });
await tab.click({ button: "right" });
const menu = page.getByTestId(`workspace-tab-context-agent_${agent.agentId}`);
const item = page.getByTestId(
`workspace-tab-context-agent_${agent.agentId}-copy-resume-command`,
);
const label = item.getByText("Copy resume command", { exact: true });
await expect(label).toHaveCSS("font-size", "21px");
await menu.screenshot({ path: testInfo.outputPath("agent-tab-menu-21px.png") });
// A single-line label that ellipsizes has a scrollWidth wider than its clientWidth.
const overflow = await label.evaluate((element) => element.scrollWidth - element.clientWidth);
expect(overflow).toBeLessThanOrEqual(0);
} finally {
await agent.cleanup();
}
});
@@ -19,7 +19,12 @@ import {
} from "../support/helpers/mock-agent";
import { getServerId } from "../support/helpers/server-id";
import { seedSavedSettingsHosts } from "../support/helpers/settings";
import { submitNewWorkspaceEmpty } from "../support/helpers/new-workspace";
import {
expectPickerSelected,
selectWorkspaceIsolation,
submitNewWorkspaceEmpty,
} from "../support/helpers/new-workspace";
import { checkoutBranch } from "../support/helpers/workspace";
const test = base.extend<{
seedForkWorkspace: (options: MockAgentOptions) => Promise<MockAgentWorkspace>;
@@ -176,7 +181,9 @@ test.describe("Assistant fork menu", () => {
title: "Assistant fork workspace",
initialPrompt: "emit 1 coalesced agent stream updates for assistant fork new workspace.",
model: "ten-second-stream",
repo: { withRemote: true, branches: ["main", "feature/fork-source"] },
});
checkoutBranch(session.cwd, "feature/fork-source");
await openAgentRoute(page, session);
await expectComposerVisible(page);
@@ -188,6 +195,11 @@ test.describe("Assistant fork menu", () => {
await expect(page).toHaveURL(/\/new\?.*draftId=/, { timeout: 30_000 });
await expectChatHistoryAttachment(page);
// A fork continues the source agent's work, so it starts from the branch that agent is
// on rather than the repository default a fresh workspace starts from.
await selectWorkspaceIsolation(page, "worktree");
await expectPickerSelected(page, "feature/fork-source");
await page.getByTestId("host-picker-trigger").click();
await page
.getByTestId("new-workspace-host-picker-option-secondary-assistant-fork-host")
@@ -2,6 +2,7 @@ import { writeFile, unlink } from "node:fs/promises";
import path from "node:path";
import { expect, test, type Page } from "../support/fixtures";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
import { parseWsJsonFrame } from "../support/helpers/ws-frames";
import { gotoAppShell } from "../support/helpers/app";
import {
expectNoBranchSwitcherInWorkspaceHeader,
@@ -27,22 +28,18 @@ async function holdBranchSuggestions(page: Page) {
await page.routeWebSocket(daemonWsRoutePattern(), (browser) => {
const server = browser.connectToServer();
browser.onMessage((message) => {
if (typeof message === "string") {
const envelope = JSON.parse(message);
if (envelope.type === "session" && envelope.message?.type === "branch_suggestions_request")
requestCount++;
}
const envelope = parseWsJsonFrame<{ type?: unknown; message?: { type?: unknown } }>(message);
if (envelope?.type === "session" && envelope.message?.type === "branch_suggestions_request")
requestCount++;
server.send(message);
});
server.onMessage(async (message) => {
if (typeof message === "string") {
const envelope = JSON.parse(message);
if (
envelope.type === "session" &&
envelope.message?.type === "branch_suggestions_response"
) {
await gate;
}
const envelope = parseWsJsonFrame<{ type?: unknown; message?: { type?: unknown } }>(message);
if (
envelope?.type === "session" &&
envelope.message?.type === "branch_suggestions_response"
) {
await gate;
}
browser.send(message);
});
+137 -55
View File
@@ -6,6 +6,11 @@ import { type Locator, type Page } from "@playwright/test";
import { buildHostWorkspaceRoute, buildSettingsSectionRoute } from "../../src/utils/host-routes";
import { test, expect } from "../support/fixtures";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
import {
createWsFrameAssembler,
parseWsJsonFrame,
sendWsFrames,
} from "../support/helpers/ws-frames";
import { getServerId } from "../support/helpers/server-id";
import { connectSeedClient } from "../support/helpers/seed-client";
import { createTempGitRepo } from "../support/helpers/workspace";
@@ -61,27 +66,25 @@ async function failNextDiscardRequest(page: Page): Promise<void> {
await page.routeWebSocket(daemonWsRoutePattern(), (browserSocket) => {
const serverSocket = browserSocket.connectToServer();
browserSocket.onMessage((message) => {
if (typeof message === "string") {
const envelope = JSON.parse(message) as {
message?: { type?: string; cwd?: string; requestId?: string };
};
if (envelope.message?.type === "checkout.discard_changes.request") {
browserSocket.send(
JSON.stringify({
type: "session",
message: {
type: "checkout.discard_changes.response",
payload: {
cwd: envelope.message.cwd,
success: false,
error: { code: "UNKNOWN", message: "Injected revert failure" },
requestId: envelope.message.requestId,
},
const envelope = parseWsJsonFrame<{
message?: { type?: string; cwd?: string; requestId?: string };
}>(message);
if (envelope?.message?.type === "checkout.discard_changes.request") {
browserSocket.send(
JSON.stringify({
type: "session",
message: {
type: "checkout.discard_changes.response",
payload: {
cwd: envelope.message.cwd,
success: false,
error: { code: "UNKNOWN", message: "Injected revert failure" },
requestId: envelope.message.requestId,
},
}),
);
return;
}
},
}),
);
return;
}
serverSocket.send(message);
});
@@ -269,6 +272,10 @@ test.afterEach(async () => {
test("Changes without a comparison base explains how to view pending changes", async ({ page }) => {
const workspace = await createWorkspaceWithManyTinyDiffs(2, "dev");
// A sole branch such as dev is the repository default. With several custom branches, no
// remote and a detached HEAD, nothing says which branch to compare against.
execFileSync("git", ["branch", "release"], { cwd: workspace.repoPath });
execFileSync("git", ["checkout", "--detach"], { cwd: workspace.repoPath, stdio: "ignore" });
await openWorkspaceChangesTree(page, workspace);
await expect(
page.getByText("Comparison base is unavailable. Select Uncommitted to view pending changes."),
@@ -359,14 +366,14 @@ async function holdDiffCompletion(page: Page) {
await page.routeWebSocket(daemonWsRoutePattern(), (browserSocket) => {
connections++;
const serverSocket = browserSocket.connectToServer();
const assembleServer = createWsFrameAssembler();
browserSocket.onMessage((message) => serverSocket.send(message));
serverSocket.onMessage((message) => {
if (
typeof message !== "string" &&
message[0] >= DiffOpcode.Begin &&
message[0] <= DiffOpcode.End
) {
const frame = decodeDiffFrame(message);
serverSocket.onMessage((raw) => {
const assembled = assembleServer(raw);
if (!assembled) return;
const binary = assembled.binary;
if (binary && binary[0] >= DiffOpcode.Begin && binary[0] <= DiffOpcode.End) {
const frame = decodeDiffFrame(binary);
if (frame.opcode === DiffOpcode.Begin) bodyCounts.set(frame.slot, 0);
else if (frame.opcode === DiffOpcode.Bodies)
bodyCounts.set(frame.slot, (bodyCounts.get(frame.slot) ?? 0) + frame.files.length);
@@ -375,11 +382,11 @@ async function holdDiffCompletion(page: Page) {
changedBodies.push(bodyCounts.get(frame.slot) ?? 0);
}
}
if (holding && typeof message !== "string" && message[0] === DiffOpcode.End) {
completions.push(() => browserSocket.send(message));
if (holding && binary && binary[0] === DiffOpcode.End) {
completions.push(() => sendWsFrames(browserSocket, assembled.frames));
return;
}
browserSocket.send(message);
sendWsFrames(browserSocket, assembled.frames);
});
});
return {
@@ -563,13 +570,13 @@ test("Changes selects exact local and remote bases and retains the selection aft
const picker = tree.getByTestId("workspace-base-branch-trigger");
await expect(picker).toBeVisible();
await picker.click();
await expect(page.getByRole("button", { name: "release", exact: true })).toBeVisible();
await expect(page.getByRole("option", { name: "release", exact: true })).toBeVisible();
await page.screenshot({ path: testInfo.outputPath("base-picker.png") });
await page.getByRole("button", { name: "release", exact: true }).click();
await page.getByRole("option", { name: "release", exact: true }).click();
await expect(picker).toContainText("release");
await expect(tree.getByText("No changes to display", { exact: true })).toBeVisible();
await picker.click();
await page.getByRole("button", { name: "upstream/release", exact: true }).click();
await page.getByRole("option", { name: "upstream/release", exact: true }).click();
await expect(picker).toContainText("upstream/release");
await expect(tree.getByText("committed-only.ts", { exact: true })).toBeVisible();
await page.screenshot({ path: testInfo.outputPath("base-selected.png") });
@@ -581,6 +588,33 @@ test("Changes selects exact local and remote bases and retains the selection aft
);
});
test("Changes treats a worktree on the default branch as on its base and labels a local pin", async ({
page,
}, testInfo) => {
const workspace = await createWorktreeCheckedOutOnMain();
await openWorkspaceChangesTree(page, workspace);
const tree = page.getByTestId("changes-tree-panel").filter({ visible: true });
const picker = tree.getByTestId("workspace-base-branch-trigger");
await test.step("a worktree on main compares against origin and offers no feature actions", async () => {
await expect(picker).toHaveText("main");
await expectNoFeatureActions(page);
await page.screenshot({ path: testInfo.outputPath("on-base-worktree.png") });
});
await test.step("pinning local main reads as local next to origin", async () => {
await chooseBase(page, picker, "main");
await expect(picker).toHaveText("main (local)");
await expectNoFeatureActions(page);
await page.screenshot({ path: testInfo.outputPath("local-base-pinned.png") });
});
await test.step("pinning origin main drops the qualifier again", async () => {
await chooseBase(page, picker, "origin/main");
await expect(picker).toHaveText("main");
});
});
test("Changes lets a compact workspace change its base in a sheet", async ({ page }, testInfo) => {
const workspace = await createWorktreeWithCommittedDiff();
execFileSync("git", ["branch", "release"], { cwd: workspace.repoPath });
@@ -605,7 +639,7 @@ test("Changes shows a failed base selection and lets the user retry", async ({ p
.filter({ visible: true })
.first();
await picker.click();
const option = page.getByRole("button", { name: "release", exact: true });
const option = page.getByRole("option", { name: "release", exact: true });
await expect(option).toBeVisible();
execFileSync("git", ["branch", "-D", "release"], { cwd: workspace.repoPath });
await option.click();
@@ -626,23 +660,19 @@ test("Changes shows the base as text on a host without the base-branch capabilit
await page.routeWebSocket(daemonWsRoutePattern(), (browser) => {
const server = browser.connectToServer();
browser.onMessage((frame) => {
if (typeof frame === "string") {
const envelope = JSON.parse(frame) as { message?: { type?: string } };
if (envelope.message?.type === "workspace.base_branch.set.request") baseRequests += 1;
}
const envelope = parseWsJsonFrame<{ message?: { type?: string } }>(frame);
if (envelope?.message?.type === "workspace.base_branch.set.request") baseRequests += 1;
server.send(frame);
});
server.onMessage((frame) => {
if (typeof frame === "string") {
const envelope = JSON.parse(frame) as {
message?: { payload?: { status?: string; features?: Record<string, unknown> } };
};
const payload = envelope.message?.payload;
if (payload?.status === "server_info" && payload.features) {
delete payload.features.workspaceBaseBranch;
browser.send(JSON.stringify(envelope));
return;
}
const envelope = parseWsJsonFrame<{
message?: { payload?: { status?: string; features?: Record<string, unknown> } };
}>(frame);
const payload = envelope?.message?.payload;
if (payload?.status === "server_info" && payload.features) {
delete payload.features.workspaceBaseBranch;
browser.send(JSON.stringify(envelope));
return;
}
browser.send(frame);
});
@@ -741,13 +771,16 @@ async function useLegacyDiffHost(page: Page): Promise<void> {
const serverSocket = browserSocket.connectToServer();
browserSocket.onMessage((message) => serverSocket.send(message));
serverSocket.onMessage((message) => {
if (typeof message === "string") {
const envelope = JSON.parse(message);
if (envelope.message?.payload?.status === "server_info") {
delete envelope.message.payload.features.diffSubscription;
browserSocket.send(JSON.stringify(envelope));
return;
}
const envelope = parseWsJsonFrame<{
message?: { payload?: { status?: string; features?: Record<string, unknown> } };
}>(message);
if (
envelope?.message?.payload?.status === "server_info" &&
envelope.message.payload.features
) {
delete envelope.message.payload.features.diffSubscription;
browserSocket.send(JSON.stringify(envelope));
return;
}
browserSocket.send(message);
});
@@ -2270,6 +2303,27 @@ async function expectInSyncWithRemote(workspace: RemoteWorkspace): Promise<void>
}
// A clean main that is in sync with its remote has no git action, so the button is gone.
async function chooseBase(page: Page, picker: Locator, label: string): Promise<void> {
await picker.click();
await page
.getByTestId("combobox-desktop-container")
.getByRole("option", { name: label, exact: true })
.click();
}
// Merging, merging the base in and opening a PR only make sense on a branch off the base.
async function expectNoFeatureActions(page: Page): Promise<void> {
await expect(page.getByTestId("changes-primary-cta")).toHaveAccessibleName("Archive workspace", {
timeout: 30_000,
});
await page.getByTestId("changes-primary-cta-caret").click();
await expect(page.getByTestId("changes-primary-cta-menu")).toBeVisible();
for (const action of ["merge-branch", "merge-from-base", "pr"]) {
await expect(page.getByTestId(`changes-menu-${action}`)).toHaveCount(0);
}
await page.keyboard.press("Escape");
}
async function expectNoGitActionLeft(page: Page): Promise<void> {
await expect(page.getByTestId("changes-primary-cta")).toBeHidden({ timeout: 30_000 });
}
@@ -2415,6 +2469,34 @@ async function createWorktreeWithCommittedDiff(): Promise<DirtyWorkspace> {
return { id: created.workspace.id, repoPath: cwd };
}
// The user checks out the default branch itself in a worktree while the main checkout sits on
// other work, so the worktree is on its own base.
async function createWorktreeCheckedOutOnMain(): Promise<DirtyWorkspace> {
const repo = await createTempGitRepo("changes-on-base-", {
withRemote: true,
files: [{ path: "tracked.ts", content: "export const tracked = 1;\n" }],
});
const client = await connectSeedClient();
cleanupTasks.push({
run: async () => {
await client.close();
await repo.cleanup();
},
});
execFileSync("git", ["checkout", "-b", "unrelated"], { cwd: repo.path });
const created = await client.createWorkspace({
source: {
kind: "worktree",
cwd: repo.path,
action: "checkout",
refName: "main",
worktreeSlug: "on-main",
},
});
if (!created.workspace) throw new Error(created.error ?? "Failed to create worktree");
return { id: created.workspace.id, repoPath: created.workspace.workspaceDirectory };
}
async function createWorkspaceWithCommittedDiff(): Promise<DirtyWorkspace> {
const repo = await createTempGitRepo("changes-committed-", {
files: [{ path: "tracked.ts", content: "export const tracked = 1;\n" }],
+1 -1
View File
@@ -66,7 +66,7 @@ async function selectSpeed(page: Page, label: string): Promise<void> {
await expect(pill).toHaveAttribute("aria-selected", "true");
return;
}
await page.getByRole("button", { name: label, exact: true }).last().click();
await page.getByRole("option", { name: label, exact: true }).last().click();
const toolbarTrigger = page.getByRole("button", { name: `Speed: ${label}`, exact: true });
const sheetTrigger = page.getByRole("button", { name: "Select speed", exact: true });
await expect(toolbarTrigger.or(sheetTrigger)).toBeVisible();
@@ -16,7 +16,7 @@ import {
applyCommandCenterAgentControls,
chooseCommandCenterAgentControl,
openCommandCenterForAgent,
searchAgentControls,
searchAgentModeControls,
expectCommandCenterAgentControlSelected,
expectFocusedAgentControls,
expectWorkspaceAgentConfiguration,
@@ -122,10 +122,9 @@ test.describe("Command Center agent controls", () => {
}
});
test("activates the best-matching row, not the highest-ranked group", async ({ page }) => {
// "Mode › Load Test" matches "load" at offset 0; every "Model › Mock Load Test › …" row
// matches at offset 5. Models used to outrank modes by fixed group rank, so Enter picked a
// model. Asserting both model and mode catches either row winning.
test("activates the best-matching mode without models competing in top-level search", async ({
page,
}) => {
const workspace = await seedMockAgentWorkspace({
repoPrefix: "command-center-relevance-",
title: "Command Center relevance",
@@ -134,7 +133,7 @@ test.describe("Command Center agent controls", () => {
try {
await workspace.client.setAgentMode(workspace.agentId, "approval-test");
await openCommandCenterForAgent(page, workspace);
await searchAgentControls(page, "load");
await searchAgentModeControls(page, "load");
await page.keyboard.press("Enter");
await expectWorkspaceAgentConfiguration(workspace, {
@@ -206,8 +205,8 @@ test.describe("Command Center agent controls", () => {
try {
await workspace.client.setAgentMode(workspace.agentId, "approval-test");
const input = await openCommandCenterForAgent(page, workspace);
await searchAgentControls(page, "loa");
// Moves the highlight onto a model row, which still matches after the next keystroke.
await searchAgentModeControls(page, "loa");
// Moves the highlight onto the next row, which still matches after the next keystroke.
await page.keyboard.press("ArrowDown");
await input.fill("load");
await page.keyboard.press("Enter");
@@ -333,7 +332,11 @@ test.describe("Command Center agent controls", () => {
});
const DRAFT_AGENT_CONTROL_CHOICES = [
{ query: "ten second stream", choice: "Model › Mock Load Test › Ten second stream" },
{
sublist: "Switch model" as const,
query: "ten second stream",
choice: "Mock Load Test › Ten second stream",
},
{ query: "load test", choice: "Mode › Load test" },
] as const;
@@ -2,6 +2,8 @@ import { expect, test } from "../support/fixtures";
import { openSettings } from "../support/helpers/app";
import {
closeCommandCenter,
enterCommandCenterSublist,
expectCommandCenterSublist,
expectCommandCenterTab,
expectCommandCenterTabs,
openCommandCenter,
@@ -75,7 +77,7 @@ test("workspace file search stays geometrically stable through delayed loading a
const panel = page.getByTestId("command-center-panel");
await expect(panel).toBeVisible({ timeout: 30_000 });
await expectCommandCenterTab(panel, "Files");
await expectCommandCenterSublist(panel, "Search files", "Search files...");
await startCommandCenterLayoutObservation(page);
await panel.getByTestId("command-center-input").fill(FILE_NAME);
@@ -117,10 +119,10 @@ test("command center tabs rotate with Tab and never move the header", async ({ p
const header = panel.getByTestId("command-center-header");
const input = panel.getByTestId("command-center-input");
await test.step("⌘P opens on Files and Backspace on an empty field returns to All", async () => {
await test.step("⌘P opens on Search files sub-list and Backspace on an empty field returns to All", async () => {
await page.keyboard.press("Meta+P");
await expect(panel).toBeVisible({ timeout: 30_000 });
await expectCommandCenterTab(panel, "Files");
await expectCommandCenterSublist(panel, "Search files", "Search files...");
await page.keyboard.press("Backspace");
await expectCommandCenterTab(panel, "All");
});
@@ -133,8 +135,6 @@ test("command center tabs rotate with Tab and never move the header", async ({ p
await page.keyboard.press("Tab");
await expectCommandCenterTab(panel, "Workspaces");
await page.keyboard.press("Tab");
await expectCommandCenterTab(panel, "Files");
await page.keyboard.press("Tab");
await expectCommandCenterTab(panel, "Actions");
expect(await header.boundingBox()).toEqual(headerOnAll);
expect((await results.boundingBox())?.y).toBe(resultsTopOnAll);
@@ -143,7 +143,7 @@ test("command center tabs rotate with Tab and never move the header", async ({ p
await page.keyboard.press("Shift+Tab");
await expectCommandCenterTab(panel, "Actions");
await page.keyboard.press("Shift+Tab");
await expectCommandCenterTab(panel, "Files");
await expectCommandCenterTab(panel, "Workspaces");
});
await test.step("rotating keeps the query", async () => {
@@ -162,39 +162,57 @@ test("command center tabs rotate with Tab and never move the header", async ({ p
).toBeVisible();
});
await test.step("⌘K opens on All", async () => {
await test.step("⌘K opens on All with All, Workspaces, Actions tabs", async () => {
await page.keyboard.press("Escape");
await expect(panel).not.toBeVisible();
await page.keyboard.press("Meta+K");
await expectCommandCenterTab(panel, "All");
await expectCommandCenterTabs(panel, ["All", "Workspaces", "Actions"]);
});
await test.step("in a workspace every tab is offered", async () => {
await expectCommandCenterTabs(panel, ["All", "Workspaces", "Files", "Actions"]);
await test.step("overflowing filter tabs scroll into view on narrow viewports", async () => {
const originalViewport = page.viewportSize() ?? { width: 1280, height: 720 };
await page.setViewportSize({ width: 220, height: 640 });
try {
const tabsBar = panel.getByTestId("command-center-tabs");
const metrics = await tabsBar.evaluate((el) => ({
scrollWidth: el.scrollWidth,
clientWidth: el.clientWidth,
}));
expect(metrics.scrollWidth).toBeGreaterThan(metrics.clientWidth);
await page.keyboard.press("Shift+Tab");
await expectCommandCenterTab(panel, "Actions");
const actionsTab = panel.getByTestId("command-center-tab-actions");
await expect(actionsTab).toBeInViewport({ ratio: 1 });
await page.keyboard.press("Tab");
await expectCommandCenterTab(panel, "All");
const scrollLeft = await tabsBar.evaluate((el) => el.scrollLeft);
expect(scrollLeft).toBe(0);
} finally {
await page.setViewportSize(originalViewport);
}
});
await test.step("outside a workspace there is no Files tab, and Tab skips it", async () => {
const outside = { workspaceOpen: false };
await test.step("outside a workspace the same root tabs stay available without Search files", async () => {
await closeCommandCenter(page);
await openSettings(page);
await page.keyboard.press("Meta+K");
await expectCommandCenterTab(panel, "All", outside);
await expectCommandCenterTab(panel, "All");
await expectCommandCenterTabs(panel, ["All", "Workspaces", "Actions"]);
await expect(panel.getByTestId("command-center-search-files")).toHaveCount(0);
await page.keyboard.press("Tab");
await expectCommandCenterTab(panel, "Workspaces", outside);
await expectCommandCenterTab(panel, "Workspaces");
await page.keyboard.press("Tab");
await expectCommandCenterTab(panel, "Actions", outside);
await expectCommandCenterTab(panel, "Actions");
await page.keyboard.press("Tab");
await expectCommandCenterTab(panel, "All", outside);
await page.keyboard.press("Shift+Tab");
await expectCommandCenterTab(panel, "Actions", outside);
await expectCommandCenterTab(panel, "All");
});
} finally {
await seeded.cleanup();
}
});
test("unscoped command search keeps commands visible and reports file-search failures", async ({
test("root All stays free of file-search failures while Search files reports them", async ({
page,
}) => {
test.setTimeout(120_000);
@@ -208,6 +226,9 @@ test("unscoped command search keeps commands visible and reports file-search fai
await expect(panel.getByRole("button", { name: "Home", exact: true })).toBeVisible();
await expect(panel.getByRole("button", { name: /Home failure 08/ })).toBeVisible();
await expect(panel.getByTestId("command-center-file-search-error")).toHaveCount(0);
await enterCommandCenterSublist(panel, "Search files", "Search files...");
await expect(panel.getByTestId("command-center-file-search-error")).toHaveText(
"Error: Test file search transport failure.",
);
@@ -291,6 +312,7 @@ test.describe("Compact file search context", () => {
await page.goto(`/h/${process.env.E2E_SERVER_ID}/workspace/${seeded.workspaceId}`);
await page.getByRole("button", { name: "Open menu", exact: true }).click();
const search = await openCommandCenter(page);
await enterCommandCenterSublist(search, "Search files", "Search files...");
await search.getByTestId("command-center-input").fill("lookup.ts");
await search.getByRole("button", { name: "lookup.ts", exact: true }).click();
await expect(page.getByTestId("sheet-tab-body")).toBeVisible();
@@ -0,0 +1,278 @@
import { expect, test } from "../support/fixtures";
import {
closeCommandCenter,
enterChangeThemeSublist,
enterCommandCenterSublist,
expectCommandCenterSublist,
expectCommandCenterTab,
expectCommandCenterTabs,
expectCommandCenterThemeSelected,
openCommandCenter,
switchThemeViaCommandCenter,
} from "../support/helpers/command-center";
import { expectWorkspaceAgentConfiguration } from "../support/helpers/command-center-agent-controls";
import { holdDirectorySuggestionResponses } from "../support/helpers/command-center-file-search";
import { expectFileTabOpen } from "../support/helpers/file-explorer";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import { getServerId } from "../support/helpers/server-id";
import { seedWorkspace } from "../support/helpers/seed-client";
const SAMPLE_FILES = [
{ path: "README.md", content: "# Command Center Sub-lists\n" },
{ path: "package.json", content: '{"name":"paseo-demo"}\n' },
{
path: "packages/app/src/command-center/sublist.ts",
content: "export const COMMAND_CENTER_FILES_SUBLIST_ID = 'files';\n",
},
{
path: "src/specs/auth-spec.ts",
content: "export const authSpec = true;\n",
},
];
test.use({
userAgent:
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 Chrome/145.0 Safari/537.36",
});
test("Switch model and Search files sub-lists keep top-level search clean and queue fast Cmd+P Enter", async ({
page,
}) => {
test.setTimeout(180_000);
const leanSpec = await seedWorkspace({
repoPrefix: "lean-spec-",
title: "lean-spec",
});
const activeWorkspace = await seedMockAgentWorkspace({
repoPrefix: "cc-sublists-",
title: "Command center sublists",
model: "five-minute-stream",
repo: { files: SAMPLE_FILES },
});
try {
const fileResponses = await holdDirectorySuggestionResponses(page);
await openAgentRoute(page, {
workspaceId: activeWorkspace.workspaceId,
agentId: activeWorkspace.agentId,
});
await expect(
page.getByRole("button", { name: /^Select agent mode \(/ }).filter({ visible: true }),
).toBeVisible({ timeout: 30_000 });
const panel = await openCommandCenter(page);
const searchInput = panel.getByRole("textbox");
await test.step("top-level Cmd+K lists All, Workspaces, Actions and never mixes models or files", async () => {
await expectCommandCenterTab(panel, "All");
await expectCommandCenterTabs(panel, ["All", "Workspaces", "Actions"]);
await expect(panel.getByRole("button", { name: /^Search files/ })).toBeVisible();
await expect(panel.getByRole("button", { name: /^Switch model/ })).toBeVisible();
await searchInput.fill("spec");
await expect(panel.getByRole("button", { name: /lean-spec/ })).toBeVisible({
timeout: 15_000,
});
await expect(panel.locator('[data-testid^="command-center-model-"]')).toHaveCount(0);
await expect(panel.locator('[data-testid^="command-center-file-row-"]')).toHaveCount(0);
});
await test.step("Switch model sub-list shows active model and switches directly on Enter", async () => {
await enterCommandCenterSublist(panel, "Switch model", "Search models...");
await expect(searchInput).toHaveValue("");
await expect(searchInput).toBeFocused();
await expect(
panel.getByRole("button", { name: "Mock Load Test › Five minute stream", exact: true }),
).toHaveAttribute("aria-pressed", "true");
await searchInput.fill("ten second stream");
await expect(
panel.getByRole("button", { name: "Mock Load Test › Ten second stream", exact: true }),
).toBeVisible();
await page.keyboard.press("Enter");
await expect(panel).not.toBeVisible();
await expectWorkspaceAgentConfiguration(activeWorkspace, {
id: activeWorkspace.agentId,
provider: "mock",
model: "ten-second-stream",
modeId: "load-test",
});
});
await test.step("Escape pops a drilled-in sub-list back to root, while Backspace on empty and Tab-to-Back also return", async () => {
await openCommandCenter(page);
await enterCommandCenterSublist(panel, "Switch model", "Search models...");
await page.keyboard.press("Escape");
await expectCommandCenterTab(panel, "All");
await enterCommandCenterSublist(panel, "Switch model", "Search models...");
const backButton = panel.getByTestId("command-center-sublist-back");
await page.keyboard.press("Tab");
await expect(backButton).toBeFocused();
// Result rows stay out of the Tab order, so Tab wraps straight back to the search input.
await page.keyboard.press("Tab");
await expect(searchInput).toBeFocused();
await page.keyboard.press("Tab");
await expect(backButton).toBeFocused();
await page.keyboard.press("Enter");
await expectCommandCenterTab(panel, "All");
await enterCommandCenterSublist(panel, "Search files", "Search files...");
await page.keyboard.press("Backspace");
await expectCommandCenterTab(panel, "All");
await closeCommandCenter(page);
});
await test.step("Cmd+P opens Search files and queues fast Enter until the query settles", async () => {
await page.keyboard.press("Meta+P");
await expect(panel).toBeVisible({ timeout: 15_000 });
await expectCommandCenterSublist(panel, "Search files", "Search files...");
await expect(panel.getByTestId("command-center-file-search-loading")).toBeHidden({
timeout: 15_000,
});
// Hold the next file search response, type a query, and hit Enter before it arrives.
fileResponses.hold();
await searchInput.fill("sublist.ts");
await expect(panel.getByTestId("command-center-file-search-loading")).toBeVisible();
await page.keyboard.press("Enter");
// Panel stays open while waiting for the in-flight query to settle.
await expect(panel).toBeVisible();
await fileResponses.release();
await expect(panel).not.toBeVisible({ timeout: 15_000 });
await expectFileTabOpen(page, "packages/app/src/command-center/sublist.ts");
});
await test.step("Escape closes directly when opened via Cmd+P", async () => {
await page.keyboard.press("Meta+P");
await expect(panel).toBeVisible({ timeout: 15_000 });
await expectCommandCenterSublist(panel, "Search files", "Search files...");
await page.keyboard.press("Escape");
await expect(panel).not.toBeVisible();
});
} finally {
await activeWorkspace.cleanup();
await leanSpec.cleanup();
}
});
test("Change theme sub-list filters, switches themes across Dark, Light, and Pure black, and backs out cleanly", async ({
page,
}) => {
test.setTimeout(180_000);
const workspace = await seedWorkspace({
repoPrefix: "cc-theme-switcher-",
title: "Theme switcher workspace",
});
try {
await page.goto(`/h/${encodeURIComponent(getServerId())}/workspace/${workspace.workspaceId}`);
const sidebarRow = page.getByTestId(
`sidebar-workspace-row-${getServerId()}:${workspace.workspaceId}`,
);
await expect(sidebarRow).toBeVisible({ timeout: 30_000 });
const panel = await openCommandCenter(page);
const searchInput = panel.getByTestId("command-center-input");
await test.step("top-level Change theme shows active theme and keeps theme options out of root search", async () => {
const trigger = panel.getByTestId("command-center-change-theme");
await expect(trigger).toBeVisible();
await expect(trigger).toContainText("Change theme");
await expect(trigger).toContainText("System");
await searchInput.fill("pure black");
await expect(panel.locator('[data-testid^="command-center-theme-"]')).toHaveCount(0);
await expect(panel.getByTestId("command-center-change-theme")).toHaveCount(0);
});
await test.step("entering Change theme lists all supported themes with active indicator and backs out without changing theme", async () => {
await enterChangeThemeSublist(panel);
await expect(searchInput).toHaveValue("");
await expect(searchInput).toBeFocused();
for (const themeName of [
"System",
"Light",
"Dark",
"Zinc",
"Midnight",
"Claude",
"Ghostty",
"Pure black",
]) {
await expect(panel.getByRole("button", { name: themeName, exact: true })).toBeVisible();
}
await expectCommandCenterThemeSelected(panel, "System");
await searchInput.fill("pure");
await expect(panel.getByRole("button", { name: "Pure black", exact: true })).toBeVisible();
await expect(panel.getByRole("button", { name: "Light", exact: true })).toHaveCount(0);
// Backing out via Escape returns to root without applying the filtered/highlighted theme.
await page.keyboard.press("Escape");
await expectCommandCenterTab(panel, "All");
await expect(panel.getByTestId("command-center-change-theme")).toContainText("System");
// Re-entering and backing out via Backspace on empty query also keeps System active.
await enterChangeThemeSublist(panel);
await page.keyboard.press("ArrowDown");
await page.keyboard.press("Backspace");
await expectCommandCenterTab(panel, "All");
await expect(panel.getByTestId("command-center-change-theme")).toContainText("System");
await closeCommandCenter(page);
});
await test.step("switching to Default Dark updates the app theme and active indicator", async () => {
await switchThemeViaCommandCenter(page, "dark", "Dark");
await expect(sidebarRow).toHaveCSS("background-color", "rgb(40, 42, 41)");
await openCommandCenter(page);
await expect(panel.getByTestId("command-center-change-theme")).toContainText("Dark");
await expect(panel).toHaveCSS("background-color", "rgb(24, 27, 26)");
await enterChangeThemeSublist(panel);
await expectCommandCenterThemeSelected(panel, "Dark");
await page.keyboard.press("Escape");
await expectCommandCenterTab(panel, "All");
await closeCommandCenter(page);
});
await test.step("switching to Light updates the app theme and active indicator", async () => {
await switchThemeViaCommandCenter(page, "light", "Light");
await expect(sidebarRow).toHaveCSS("background-color", "rgb(212, 212, 213)");
await openCommandCenter(page);
await expect(panel.getByTestId("command-center-change-theme")).toContainText("Light");
await expect(panel).toHaveCSS("background-color", "rgb(255, 255, 255)");
await enterChangeThemeSublist(panel);
await expectCommandCenterThemeSelected(panel, "Light");
await page.keyboard.press("Escape");
await expectCommandCenterTab(panel, "All");
await closeCommandCenter(page);
});
await test.step("switching to Pure black updates the app theme and persists across reload", async () => {
await switchThemeViaCommandCenter(page, "pure black", "Pure black");
await expect(sidebarRow).toHaveCSS("background-color", "rgb(29, 29, 29)");
await page.reload();
await expect(sidebarRow).toBeVisible({ timeout: 30_000 });
await expect(sidebarRow).toHaveCSS("background-color", "rgb(29, 29, 29)");
await openCommandCenter(page);
await expect(panel.getByTestId("command-center-change-theme")).toContainText("Pure black");
await expect(panel).toHaveCSS("background-color", "rgb(0, 0, 0)");
await enterChangeThemeSublist(panel);
await expectCommandCenterThemeSelected(panel, "Pure black");
await page.keyboard.press("Escape");
await expectCommandCenterTab(panel, "All");
await closeCommandCenter(page);
});
} finally {
await workspace.cleanup();
}
});
@@ -2,6 +2,7 @@ import type { Locator } from "@playwright/test";
import { test, expect, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
import { parseWsJsonFrame } from "../support/helpers/ws-frames";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import { seedWorkspace, type SeededWorkspace } from "../support/helpers/seed-client";
import { getServerId } from "../support/helpers/server-id";
@@ -68,15 +69,12 @@ async function rejectNextLabelAssignment(page: Page): Promise<void> {
await page.routeWebSocket(daemonWsRoutePattern(), (browser) => {
const server = browser.connectToServer();
browser.onMessage((message) => {
const raw = typeof message === "string" ? message : message.toString("utf8");
let request: { type?: string; requestId?: string } | null = null;
try {
const envelope = JSON.parse(raw) as {
type?: string;
message?: { type?: string; requestId?: string };
};
request = envelope.type === "session" ? (envelope.message ?? null) : null;
} catch {
const envelope = parseWsJsonFrame<{
type?: string;
message?: { type?: string; requestId?: string };
}>(message);
const request = envelope?.type === "session" ? (envelope.message ?? null) : null;
if (!request) {
server.send(message);
return;
}
@@ -218,7 +218,7 @@ test.describe("Command center workspaces", () => {
await test.step("an agent title finds the archived workspace on All", async () => {
// Opened from the app shell, outside any workspace.
await selectCommandCenterTab(panel, "All", { workspaceOpen: false });
await selectCommandCenterTab(panel, "All");
await input.fill("invoice totals");
await expect(archivedRow.getByTestId("command-center-workspace-agent")).toHaveText(
"Audit invoice totals",
@@ -11,6 +11,7 @@ import {
} from "../support/helpers/mock-agent";
import { expectWorkspaceTabVisible, openSessions } from "../support/helpers/archive-tab";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
import { decodeWsTextFrame, parseWsJsonFrame } from "../support/helpers/ws-frames";
import { getServerId } from "../support/helpers/server-id";
import {
switchWorkspaceViaSidebar,
@@ -146,40 +147,31 @@ async function installListCommandsStub(
});
server.onMessage((message) => {
if (typeof message !== "string") {
ws.send(message);
return;
}
try {
const parsed = JSON.parse(message) as {
const parsed = parseWsJsonFrame<{
type?: string;
message?: {
type?: string;
message?: {
type?: string;
payload?: {
commands?: unknown;
error?: string | null;
};
payload?: {
commands?: unknown;
error?: string | null;
};
};
const payload = parsed.message?.payload;
if (
parsed.type === "session" &&
parsed.message?.type === "list_commands_response" &&
payload
) {
const send = (result: ListCommandsReply) => {
payload.commands = result.commands;
payload.error = result.error;
ws.send(JSON.stringify(parsed));
};
const result = reply();
if (result instanceof Promise) void result.then(send);
else send(result);
return;
}
} catch {
// Forward non-JSON frames unchanged.
}>(message);
const payload = parsed?.message?.payload;
if (
parsed?.type === "session" &&
parsed.message?.type === "list_commands_response" &&
payload
) {
const send = (result: ListCommandsReply) => {
payload.commands = result.commands;
payload.error = result.error;
ws.send(JSON.stringify(parsed));
};
const result = reply();
if (result instanceof Promise) void result.then(send);
else send(result);
return;
}
ws.send(message);
@@ -191,7 +183,8 @@ async function holdWorkspaceCreateWithCommandsStub(page: Page): Promise<{ releas
let release: (() => void) | null = null;
await installListCommandsStub(page, undefined, {
onClientMessage(message, forward) {
if (typeof message === "string" && message.includes('"workspace.create.request"')) {
const text = decodeWsTextFrame(message);
if (text !== null && text.includes('"workspace.create.request"')) {
release = forward;
return;
}
@@ -408,8 +401,9 @@ function expectPopoverFramesStable(frames: PopoverFrame[]): void {
function recordCommandRequestsByAgentId(page: Page): string[] {
const requests: string[] = [];
const record = ({ payload }: { payload: string | Buffer }) => {
if (typeof payload !== "string" || !payload.includes("list_commands_request")) return;
if (!payload.includes("draftConfig")) requests.push(payload);
const text = decodeWsTextFrame(payload);
if (text === null || !text.includes("list_commands_request")) return;
if (!text.includes("draftConfig")) requests.push(text);
};
page.on("websocket", (socket) => socket.on("framesent", record));
return requests;
@@ -0,0 +1,135 @@
import { expect, test, type Page } from "../support/fixtures";
import { gotoWorkspace } from "../support/helpers/launcher";
import { seedWorkspace } from "../support/helpers/seed-client";
import { dragTabIntoExplorer, ensureExplorerSidebar } from "../support/helpers/workspace-tabs";
type SeededWorkspace = Awaited<ReturnType<typeof seedWorkspace>>;
type Pane = "main" | "dock";
const PANE_TEST_IDS: Record<Pane, string> = {
main: "workspace-pane-main",
dock: "workspace-explorer-sidebar",
};
test.use({ viewport: { width: 1600, height: 900 } });
function pane(page: Page, which: Pane) {
return page.getByTestId(PANE_TEST_IDS[which]).filter({ visible: true });
}
function composerInput(page: Page, which: Pane) {
return pane(page, which).getByRole("textbox", { name: "Message agent..." });
}
function agentTab(page: Page, which: Pane, agentId: string) {
return pane(page, which).getByTestId(`workspace-tab-agent_${agentId}`);
}
/** Starts a long-streaming mock agent and waits until its tab shows in the main pane. */
async function startRunningAgent(
page: Page,
workspace: SeededWorkspace,
title: string,
): Promise<string> {
const agent = await workspace.client.createAgent({
provider: "mock",
cwd: workspace.repoPath,
workspaceId: workspace.workspaceId,
title,
modeId: "load-test",
model: "one-minute-stream",
initialPrompt: `Keep running ${title}.`,
});
await workspace.client.waitForAgentUpsert(
agent.id,
(snapshot) => snapshot.status === "running",
15_000,
);
await expect(agentTab(page, "main", agent.id)).toBeVisible();
return agent.id;
}
/** Moves an agent's tab into the Explorer dock, then shows the other agent in the main pane. */
async function dockAgentBesideMain(page: Page, dockAgentId: string, mainAgentId: string) {
await ensureExplorerSidebar(page);
await dragTabIntoExplorer(page, `agent_${dockAgentId}`);
await expect(agentTab(page, "dock", dockAgentId)).toBeVisible();
// Click the tab's leading edge; its close button overlays the trailing edge on hover.
await agentTab(page, "main", mainAgentId).click({ position: { x: 12, y: 13 } });
await expect(composerInput(page, "dock")).toBeVisible();
}
async function focusComposer(page: Page, which: Pane) {
await composerInput(page, which).click();
}
/** Leaves the composer the way a click on the agent's timeline does. */
async function blurComposer(page: Page, which: Pane) {
await composerInput(page, which).blur();
}
async function openSettings(page: Page) {
await page.getByTestId("sidebar-settings").filter({ visible: true }).first().click();
await expect(page).toHaveURL(/\/settings/);
}
async function agentStatus(workspace: SeededWorkspace, agentId: string): Promise<string | null> {
const fetched = await workspace.client.fetchAgent({ agentId });
return fetched?.agent.status ?? null;
}
async function expectAgentInterrupted(workspace: SeededWorkspace, agentId: string) {
await expect.poll(() => agentStatus(workspace, agentId), { timeout: 15_000 }).toBe("idle");
}
async function expectAgentRunning(workspace: SeededWorkspace, agentId: string) {
expect(await agentStatus(workspace, agentId)).toBe("running");
}
test("Escape interrupts the agent whose composer had focus last, not the Explorer dock's", async ({
page,
}) => {
test.setTimeout(180_000);
const workspace = await seedWorkspace({ repoPrefix: "composer-escape-dock-" });
try {
await gotoWorkspace(page, workspace.workspaceId);
const mainAgentId = await startRunningAgent(page, workspace, "main agent");
// The dock's composer mounts after the main pane's.
const dockAgentId = await startRunningAgent(page, workspace, "dock agent");
await dockAgentBesideMain(page, dockAgentId, mainAgentId);
await test.step("Escape after the main composer blurs interrupts only the main agent", async () => {
await focusComposer(page, "main");
await blurComposer(page, "main");
await page.keyboard.press("Escape");
await expectAgentInterrupted(workspace, mainAgentId);
await expectAgentRunning(workspace, dockAgentId);
});
await test.step("Escape in the dock's composer interrupts the dock agent", async () => {
await focusComposer(page, "dock");
await page.keyboard.press("Escape");
await expectAgentInterrupted(workspace, dockAgentId);
});
} finally {
await workspace.cleanup();
}
});
test("Escape on desktop Settings closes it and leaves the agent running", async ({ page }) => {
test.setTimeout(180_000);
const workspace = await seedWorkspace({ repoPrefix: "composer-escape-settings-" });
try {
await gotoWorkspace(page, workspace.workspaceId);
const agentId = await startRunningAgent(page, workspace, "running agent");
await focusComposer(page, "main");
await openSettings(page);
await page.keyboard.press("Escape");
await expect(page).toHaveURL(new RegExp(`/workspace/${workspace.workspaceId}`));
await expectAgentRunning(workspace, agentId);
} finally {
await workspace.cleanup();
}
});
@@ -248,10 +248,10 @@ async function readSettledFrameBorder(page: Page): Promise<string> {
});
}
// `borderAccent` at rest, `surface4` while focused: greys in both themes, never the accent.
// `borderAccent` at rest, `borderFocus` while focused: greys in both themes, never the accent.
const FRAME_BORDERS = {
dark: { rest: "rgb(47, 53, 52)", focus: "rgb(89, 91, 91)" },
light: { rest: "rgb(236, 236, 241)", focus: "rgb(212, 212, 216)" },
dark: { rest: "rgb(47, 53, 52)", focus: "rgb(66, 70, 69)" },
light: { rest: "rgb(236, 236, 241)", focus: "rgb(208, 208, 213)" },
} as const;
for (const colorScheme of ["dark", "light"] as const) {
@@ -20,6 +20,9 @@ import {
readTerminalProcessIds,
} from "../support/helpers/daemon-lifecycle";
// Page setup takes up to 30 s, then a restart can take DAEMON_RESTART_TIMEOUT_MS to confirm.
test.describe.configure({ timeout: 120_000 });
test("settings restart waits for a replacement worker while retaining the supervisor", async ({
page,
}, testInfo) => {
@@ -12,6 +12,7 @@ import {
expectTabTitleFits,
} from "../support/helpers/launcher";
import { seedWorkspace } from "../support/helpers/seed-client";
import { parseWsJsonFrame } from "../support/helpers/ws-frames";
import {
ensureExplorerSidebar,
openFilesPanel,
@@ -436,13 +437,12 @@ test("retains populated Explorer chat and terminal attachments through appearanc
const attaches: string[] = [];
page.on("websocket", (socket) =>
socket.on("framesent", (frame) => {
if (typeof frame.payload !== "string") return;
try {
const message = JSON.parse(frame.payload).message;
if (message?.type === "subscribe_terminal_request") attaches.push(message.terminalId);
} catch {
/* Binary terminal traffic is not a JSON request. */
}
const parsed = parseWsJsonFrame<{
message?: { type?: unknown; terminalId?: string };
}>(frame.payload);
const message = parsed?.message;
if (message?.type === "subscribe_terminal_request" && typeof message.terminalId === "string")
attaches.push(message.terminalId);
}),
);
try {
@@ -11,6 +11,7 @@ import {
import { openChangesPanel } from "../support/helpers/workspace-tabs";
import { gotoWorkspace } from "../support/helpers/launcher";
import { daemonWsRoutePattern, getE2EDaemonPort } from "../support/helpers/daemon-port";
import { parseWsJsonFrame } from "../support/helpers/ws-frames";
import { seedWorkspace, type SeededWorkspace } from "../support/helpers/seed-client";
let workspace: SeededWorkspace;
@@ -19,28 +20,26 @@ async function failNextDeleteRequest(page: Page): Promise<void> {
await page.routeWebSocket(daemonWsRoutePattern(), (browserSocket) => {
const serverSocket = browserSocket.connectToServer();
browserSocket.onMessage((message) => {
if (typeof message === "string") {
const envelope = JSON.parse(message) as {
message?: { type?: string; cwd?: string; path?: string; requestId?: string };
};
if (envelope.message?.type === "fs.entry.delete.request") {
browserSocket.send(
JSON.stringify({
type: "session",
message: {
type: "fs.entry.delete.response",
payload: {
cwd: envelope.message.cwd,
path: envelope.message.path,
success: false,
error: "Injected delete failure",
requestId: envelope.message.requestId,
},
const envelope = parseWsJsonFrame<{
message?: { type?: string; cwd?: string; path?: string; requestId?: string };
}>(message);
if (envelope?.message?.type === "fs.entry.delete.request") {
browserSocket.send(
JSON.stringify({
type: "session",
message: {
type: "fs.entry.delete.response",
payload: {
cwd: envelope.message.cwd,
path: envelope.message.path,
success: false,
error: "Injected delete failure",
requestId: envelope.message.requestId,
},
}),
);
return;
}
},
}),
);
return;
}
serverSocket.send(message);
});
@@ -53,18 +52,14 @@ async function hideContextActionCapabilities(page: Page): Promise<void> {
const serverSocket = browserSocket.connectToServer();
browserSocket.onMessage((message) => serverSocket.send(message));
serverSocket.onMessage((message) => {
if (typeof message !== "string") {
browserSocket.send(message);
return;
}
const envelope = JSON.parse(message) as {
const envelope = parseWsJsonFrame<{
message?: {
type?: string;
payload?: { status?: string; features?: Record<string, unknown> };
};
};
}>(message);
if (
envelope.message?.type === "status" &&
envelope?.message?.type === "status" &&
envelope.message.payload?.status === "server_info"
) {
envelope.message.payload.features = {
@@ -73,8 +68,10 @@ async function hideContextActionCapabilities(page: Page): Promise<void> {
fsEntryDuplicate: false,
checkoutDiscardChanges: false,
};
browserSocket.send(JSON.stringify(envelope));
return;
}
browserSocket.send(JSON.stringify(envelope));
browserSocket.send(message);
});
});
}
@@ -88,17 +85,15 @@ async function disconnectNextContextAction(page: Page): Promise<{ wait: () => Pr
await page.routeWebSocket(daemonWsRoutePattern(), (browserSocket) => {
const serverSocket = browserSocket.connectToServer();
browserSocket.onMessage((message) => {
if (typeof message === "string") {
const envelope = JSON.parse(message) as { message?: { type?: string } };
const type = envelope.message?.type;
if (type?.startsWith("fs.entry.") || type === "checkout.discard_changes.request") {
resolveRequest?.();
void browserSocket.close({
code: 1008,
reason: "Context action connection failed",
});
return;
}
const envelope = parseWsJsonFrame<{ message?: { type?: string } }>(message);
const type = envelope?.message?.type;
if (type?.startsWith("fs.entry.") || type === "checkout.discard_changes.request") {
resolveRequest?.();
void browserSocket.close({
code: 1008,
reason: "Context action connection failed",
});
return;
}
serverSocket.send(message);
});
@@ -130,7 +125,7 @@ test("creates, renames, copies, and deletes entries through the file explorer",
await page.getByTestId("files-new-folder").click();
await expect(nameInput).toBeVisible();
const draftRow = nameInput.locator("xpath=..");
const draftRow = page.getByTestId("file-explorer-draft-row");
const placeholderColor = await nameInput.evaluate(
(input) => getComputedStyle(input, "::placeholder").color,
);
@@ -11,6 +11,7 @@ import {
} from "../support/helpers/file-explorer";
import { gotoWorkspace } from "../support/helpers/launcher";
import { seedWorkspace, type SeededWorkspace } from "../support/helpers/seed-client";
import { parseWsJsonFrame } from "../support/helpers/ws-frames";
let workspace: SeededWorkspace;
@@ -97,9 +98,15 @@ function recordDirectoryListings(page: Page): string[] {
const listed: string[] = [];
page.on("websocket", (socket) => {
socket.on("framesent", ({ payload }) => {
if (typeof payload !== "string") return;
const { message } = JSON.parse(payload);
if (message?.type === "file_explorer_request" && message.mode === "list") {
const parsed = parseWsJsonFrame<{
message?: { type?: unknown; mode?: unknown; path?: string };
}>(payload);
const message = parsed?.message;
if (
message?.type === "file_explorer_request" &&
message.mode === "list" &&
typeof message.path === "string"
) {
listed.push(message.path);
}
});
@@ -133,3 +133,67 @@ test("links in chat and file tabs offer file actions and reveal the file in File
await agent.cleanup();
}
});
const UNIFIED_LINKS_REPLY = [
"Open [general settings](paseo://settings/general),",
"[editor link](vscode://file/tmp/example.ts),",
"[blocked pairing](paseo://pair#offer=secret),",
"or [blocked script](javascript:alert(1)).",
].join(" ");
test("chat links classify internal, custom-scheme, and blocked URLs on web", async ({
context,
page,
}, testInfo) => {
testInfo.setTimeout(180_000);
const agent = await seedMockAgentWorkspace({
repoPrefix: "unified-links-web-",
title: "Unified chat links",
initialPrompt: "Show mixed protocol links",
featureValues: { mockAssistantResponse: UNIFIED_LINKS_REPLY },
});
try {
await openAgentRoute(page, agent);
const internalLink = replyLink(page, "general settings");
await expect(internalLink).toBeVisible();
await expect(internalLink).toHaveAttribute("href", "/settings/general");
// Right-click menu labels match the unified link classification.
await internalLink.click({ button: "right" });
await expectMenuItems(page, ["Open in Paseo", "Copy link"]);
await dismissMenu(page);
const editorLink = replyLink(page, "editor link");
await expect(editorLink).toBeVisible();
await expect(editorLink).toHaveAttribute("href", "vscode://file/tmp/example.ts");
await editorLink.click({ button: "right" });
await expectMenuItems(page, ["Open in external app", "Copy link"]);
await dismissMenu(page);
// Blocked and unroutable links render as inert text, not anchors.
const assistantMessage = page.getByTestId("assistant-message");
await expect(assistantMessage).toContainText("blocked pairing");
await expect(assistantMessage).toContainText("blocked script");
await expect(replyLink(page, "blocked pairing")).toHaveCount(0);
await expect(replyLink(page, "blocked script")).toHaveCount(0);
// Middle-clicking an internal paseo:// link opens its SPA route in a new browser tab.
const popupPromise = context.waitForEvent("page");
await internalLink.click({ button: "middle" });
const popup = await popupPromise;
try {
await expect(popup).toHaveURL(/\/settings\/general$/);
} finally {
await popup.close();
}
// Left-clicking an internal paseo:// link navigates inside Paseo without opening a new tab.
const pagesBeforeClick = context.pages().length;
await internalLink.click();
await expect(page).toHaveURL(/\/settings\/general$/);
expect(context.pages().length).toBe(pagesBeforeClick);
} finally {
await agent.cleanup();
}
});
@@ -173,28 +173,33 @@ test("customizes a host badge and preserves its appearance after reload", async
});
base(
"activates Add host from the sidebar host picker via focus+Enter and Arrow+Enter",
"activates Add host from the sidebar host picker via Arrow+Enter and click",
async ({ page }) => {
await gotoAppShell(page);
const trigger = page.getByTestId("sidebar-hosts-trigger");
await expect(trigger).toBeVisible();
// Focus + Enter on Add host must open the Add connection dialog rather than selecting the active host.
// ArrowDown + Enter on Add host must open the Add connection dialog rather than selecting the active host.
const addConnectionDialog = page.getByRole("dialog").filter({ hasText: "Add connection" });
await trigger.click();
const addHostButton = page.getByRole("button", { name: "Add host", exact: true });
await expect(addHostButton).toBeVisible();
await addHostButton.focus();
const listbox = page.getByTestId("combobox-desktop-container");
const addHostOption = page.getByRole("option", { name: "Add host", exact: true });
await expect(addHostOption).toBeVisible();
await expect(addHostOption).toHaveAttribute("tabindex", "-1");
await page.keyboard.press("ArrowDown");
await expect(listbox).toHaveAttribute(
"aria-activedescendant",
(await addHostOption.getAttribute("id"))!,
);
await page.keyboard.press("Enter");
await expect(addConnectionDialog).toBeVisible();
await page.keyboard.press("Escape");
await expect(addConnectionDialog).toBeHidden();
// ArrowDown + Enter must also reach Add host from the host list.
// Clicking the Add host option also opens Add connection.
await trigger.click();
await expect(addHostButton).toBeVisible();
await page.keyboard.press("ArrowDown");
await page.keyboard.press("Enter");
await expect(addHostOption).toBeVisible();
await addHostOption.click();
await expect(addConnectionDialog).toBeVisible();
},
);
@@ -1,7 +1,9 @@
import { expect, type Locator, type Page } from "@playwright/test";
import { test } from "../support/fixtures";
import { openSettings } from "../support/helpers/app";
import { gotoWorkspace } from "../support/helpers/launcher";
import { seedWorkspace } from "../support/helpers/seed-client";
import { openSettingsSection } from "../support/helpers/settings";
import { waitForWorkspaceTabsVisible } from "../support/helpers/workspace-tabs";
const HEADER_ICON_BUTTONS = ["workspace-header-menu-trigger", "workspace-explorer-toggle"];
@@ -14,12 +16,18 @@ function matchesFocusVisible(target: Locator): Promise<boolean> {
return target.evaluate((el) => el.matches(":focus-visible"));
}
async function expectKeyboardFocusRing(page: Page, testId: string): Promise<void> {
async function tabUntilFocused(page: Page, target: Locator): Promise<void> {
// Start from the preceding tabbable sibling so Tab naturally lands on target,
// or step back and Tab forward onto target.
await target.focus();
await page.keyboard.press("Shift+Tab");
await page.keyboard.press("Tab");
await expect(target).toBeFocused();
}
async function expectTabFocusRing(page: Page, testId: string): Promise<void> {
const button = visible(page, testId);
// Chromium matches :focus-visible on a programmatic focus that follows keyboard input.
await page.keyboard.press("Shift");
await button.focus();
await expect(button).toBeFocused();
await tabUntilFocused(page, button);
expect(await matchesFocusVisible(button)).toBe(true);
await expect(button).toHaveCSS("outline-style", "solid");
await expect(button).toHaveCSS("outline-width", "2px");
@@ -30,6 +38,16 @@ async function expectKeyboardFocusRing(page: Page, testId: string): Promise<void
async function expectNoPointerFocusRing(page: Page, testId: string): Promise<void> {
const button = visible(page, testId);
await button.blur();
if (testId === "workspace-header-menu-trigger") {
await button.click();
const backdrop = page.getByTestId("workspace-header-menu-backdrop");
await expect(backdrop).toBeVisible();
await backdrop.click();
await expect(backdrop).toHaveCount(0);
expect(await matchesFocusVisible(button)).toBe(false);
await expect(button).toHaveCSS("outline-style", "none");
return;
}
// Toggle twice so the layout ends where it started.
await button.click();
await button.click();
@@ -39,16 +57,44 @@ async function expectNoPointerFocusRing(page: Page, testId: string): Promise<voi
}
test.describe("Icon button focus ring", () => {
test("header icon buttons show the focus ring for keyboard focus only", async ({ page }) => {
test("header icon buttons show the focus ring for keyboard :focus-visible only", async ({
page,
}) => {
await page.setViewportSize({ width: 1440, height: 900 });
const workspace = await seedWorkspace({ repoPrefix: "icon-button-focus-" });
try {
await gotoWorkspace(page, workspace.workspaceId);
await waitForWorkspaceTabsVisible(page);
for (const testId of HEADER_ICON_BUTTONS) {
await expectKeyboardFocusRing(page, testId);
await expectTabFocusRing(page, testId);
await expectNoPointerFocusRing(page, testId);
}
await expectNoPointerFocusRing(page, "workspace-explorer-toggle");
// Verify the New tab panel edit-terminal-profiles pencil button (#9758) draws a :focus-visible ring.
const editProfilesButton = visible(page, "workspace-new-tab-edit-terminal-profiles");
await expect(editProfilesButton).toBeVisible();
await tabUntilFocused(page, editProfilesButton);
expect(await matchesFocusVisible(editProfilesButton)).toBe(true);
await expect(editProfilesButton).toHaveCSS("outline-style", "solid");
await expect(editProfilesButton).toHaveCSS("outline-width", "2px");
await editProfilesButton.blur();
await expect(editProfilesButton).toHaveCSS("outline-style", "none");
await openSettings(page);
await openSettingsSection(page, "chat");
const outlineSwitch = page.getByRole("switch", { name: "Chat outline" });
await expect(outlineSwitch).toBeVisible();
await tabUntilFocused(page, outlineSwitch);
expect(await matchesFocusVisible(outlineSwitch)).toBe(true);
await expect(outlineSwitch).toHaveCSS("outline-style", "none");
const switchTrack = outlineSwitch.locator('[data-switch-track="true"]');
await expect(switchTrack).toHaveCSS("outline-style", "solid");
await expect(switchTrack).toHaveCSS("outline-width", "2px");
await outlineSwitch.blur();
await outlineSwitch.click();
await outlineSwitch.click();
expect(await matchesFocusVisible(outlineSwitch)).toBe(false);
await expect(switchTrack).toHaveCSS("outline-style", "none");
} finally {
await workspace.cleanup();
}
@@ -1,17 +1,22 @@
import type { Page } from "@playwright/test";
import type { Locator, Page } from "@playwright/test";
import { expect, test } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { closeCommandCenter, openCommandCenter } from "../support/helpers/command-center";
// Where Settings → Keyboard shortcuts persists a rebound shortcut.
const OVERRIDE_STORAGE_KEY = "@paseo:keyboard-shortcut-overrides";
const COMMAND_CENTER_BINDING = "command-center-toggle-ctrl-k-non-mac";
const COMMAND_CENTER_BINDINGS = [
"command-center-toggle-cmd-k-mac",
"command-center-toggle-ctrl-k-non-mac",
] as const;
async function rebindCommandCenter(page: Page, combo: string): Promise<void> {
await page.addInitScript(
([key, bindingId, value]) => {
window.localStorage.setItem(key, JSON.stringify({ [bindingId]: value }));
([key, bindingIds, value]) => {
const overrides = Object.fromEntries(bindingIds.map((id) => [id, value]));
window.localStorage.setItem(key, JSON.stringify(overrides));
},
[OVERRIDE_STORAGE_KEY, COMMAND_CENTER_BINDING, combo] as const,
[OVERRIDE_STORAGE_KEY, COMMAND_CENTER_BINDINGS, combo] as const,
);
await gotoAppShell(page);
await expect(page.getByTestId("sidebar-search")).toBeVisible({ timeout: 30_000 });
@@ -21,6 +26,18 @@ async function expectCommandCenterOpen(page: Page): Promise<void> {
await expect(page.getByTestId("command-center-panel")).toBeVisible({ timeout: 10_000 });
}
async function expectCommandCenterSearchAcceptsKey(
page: Page,
panel: Locator,
key: string,
): Promise<void> {
const searchInput = panel.getByTestId("command-center-input");
await expect(searchInput).toBeFocused({ timeout: 10_000 });
await page.keyboard.press(key);
await expect(searchInput).toHaveValue(key);
await expectCommandCenterOpen(page);
}
test.describe("Multi-step shortcut", () => {
test("completes a chord whose second step is a bare key", async ({ page }) => {
await rebindCommandCenter(page, "Ctrl+K J");
@@ -41,4 +58,17 @@ test.describe("Multi-step shortcut", () => {
await expectCommandCenterOpen(page);
});
test("typing a rebound printable shortcut inside Command Center enters text instead of toggling it closed", async ({
page,
}) => {
await rebindCommandCenter(page, "J");
const commandCenter = await openCommandCenter(page);
await expectCommandCenterSearchAcceptsKey(page, commandCenter, "j");
await closeCommandCenter(page);
await page.keyboard.press("j");
await expectCommandCenterOpen(page);
});
});
@@ -25,6 +25,7 @@ import {
type TerminalProfile,
} from "../support/helpers/new-workspace-launch";
import { gotoAppShell } from "../support/helpers/app";
import { runCommandCenterItem } from "../support/helpers/command-center";
import { waitForSidebarHydration } from "../support/helpers/workspace-ui";
import { getServerId } from "../support/helpers/server-id";
@@ -192,6 +193,20 @@ test.describe("Tab creation", () => {
await expect(agent).toBeFocused();
});
test("the Command Center's New terminal row replaces a focused New tab", async ({ page }) => {
await gotoWorkspace(page, workspace.workspaceId);
await openNewTabMenuWithShortcut(page);
const tabs = (await getTabTestIds(page)).length;
await runCommandCenterItem(page, "New terminal");
await expect(
page.getByTestId("workspace-new-tab-panel").filter({ visible: true }),
).toBeHidden();
await expectTerminalSurfaceVisible(page);
await expect.poll(async () => (await getTabTestIds(page)).length).toBe(tabs);
});
test("the Agent menu creates a draft and shows its composer within the visual budget", async ({
page,
}) => {
@@ -0,0 +1,60 @@
import { expect } from "@playwright/test";
import { test } from "../support/fixtures";
import {
expectCompletedDiagram,
requestDiagram,
waitForDiagramTurnToComplete,
} from "../support/helpers/diagram";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
const MERMAID_DIAGRAM = [
"```mermaid",
"flowchart LR",
" Start --> Middle",
" Middle --> Ship",
"```",
].join("\n");
test("keeps the diagram source when the Mermaid runtime fails to load, then renders after it recovers", async ({
page,
}) => {
test.setTimeout(120_000);
let runtimeChunkReachable = false;
let blockedRequests = 0;
await page.route(/html\.gen/, async (route) => {
if (runtimeChunkReachable) {
await route.continue();
return;
}
blockedRequests += 1;
await route.abort("connectionrefused");
});
const agent = await seedMockAgentWorkspace({
repoPrefix: "mermaid-runtime-load-",
title: "Mermaid runtime load",
featureValues: {
mockStreamingAssistantResponse: MERMAID_DIAGRAM,
mockStreamingAssistantIntervalMs: 10,
},
});
try {
await test.step("A failed runtime load leaves the diagram source on screen", async () => {
await openAgentRoute(page, agent);
await requestDiagram(agent);
await waitForDiagramTurnToComplete(agent);
await expect(page.getByText("Middle --> Ship")).toBeVisible({ timeout: 30_000 });
expect(blockedRequests).toBeGreaterThan(0);
await expect(page.getByRole("img", { name: "Diagram" }).locator("iframe")).toHaveCount(0);
});
await test.step("Once the chunk is reachable, the next diagram loads it and renders", async () => {
runtimeChunkReachable = true;
await requestDiagram(agent);
await waitForDiagramTurnToComplete(agent);
await expectCompletedDiagram(page, ["Start", "Ship"]);
});
} finally {
await agent.cleanup();
}
});
@@ -86,7 +86,7 @@ async function selectMode(page: Page, label: string): Promise<void> {
await expect(popup).toBeVisible({ timeout: 10_000 });
await expectNoTruncation(popup);
const searchInput = page.getByRole("textbox", { name: /search mode/i });
const searchInput = page.getByRole("combobox", { name: /search mode/i });
await expect(searchInput).toBeVisible({ timeout: 10_000 });
await searchInput.fill(label);
@@ -1,6 +1,7 @@
import { expect, test, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
import { parseWsJsonFrame } from "../support/helpers/ws-frames";
import {
openNewWorkspaceComposer,
selectWorkspaceIsolation,
@@ -33,12 +34,7 @@ function parseEnvelope(message: WebSocketMessage): {
type?: unknown;
message?: Record<string, unknown>;
} | null {
const raw = typeof message === "string" ? message : message.toString("utf8");
try {
return JSON.parse(raw) as { type?: unknown; message?: Record<string, unknown> };
} catch {
return null;
}
return parseWsJsonFrame<{ type?: unknown; message?: Record<string, unknown> }>(message);
}
function sessionMessage(message: WebSocketMessage): Record<string, unknown> | null {
@@ -1,5 +1,6 @@
import { expect, test } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { runCommandCenterItem } from "../support/helpers/command-center";
import {
chooseProjectWithKeyboard,
connectNewWorkspaceDaemonClient,
@@ -161,6 +162,23 @@ test.describe("New workspace entry points", () => {
}
});
test("the Command Center's New workspace row opens the project picker on the New Workspace screen", async ({
page,
}) => {
const seeded: SeededWorkspace = await seedWorkspace({ repoPrefix: "entry-command-center-" });
try {
await gotoAppShell(page);
await waitForSidebarHydration(page);
await openGlobalNewWorkspaceComposer(page);
await runCommandCenterItem(page, "New workspace");
await expect(page.getByPlaceholder("Search projects")).toBeVisible();
} finally {
await seeded.cleanup();
}
});
test("Ctrl+N opens the project picker with search focused", async ({ page }) => {
const seeded: SeededWorkspace = await seedWorkspace({ repoPrefix: "entry-shortcut-" });
@@ -1,6 +1,7 @@
import { expect, test, type Page } from "../support/fixtures";
import type { FormPreferences } from "@/create-agent-preferences/preferences";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
import { parseWsJsonFrame } from "../support/helpers/ws-frames";
import { openAgentRoute } from "../support/helpers/mock-agent";
import {
openGlobalNewWorkspaceComposer,
@@ -13,12 +14,7 @@ const CREATE_AGENT_PREFERENCES_KEY = "@paseo:create-agent-preferences";
type WebSocketMessage = string | Buffer;
function parseWebSocketJson(message: WebSocketMessage): unknown {
const rawMessage = typeof message === "string" ? message : message.toString("utf8");
try {
return JSON.parse(rawMessage);
} catch {
return null;
}
return parseWsJsonFrame(message);
}
function getSessionMessage(message: WebSocketMessage): Record<string, unknown> | null {
@@ -101,7 +97,8 @@ test.describe("New Workspace mode cycle safety", () => {
// Regression guard for the P1 safety bug: cycling the execution mode with Shift+Tab in
// the New Workspace composer must never reach a backgrounded, still-mounted agent's mode
// control and silently change that (possibly running) agent's mode — e.g. into a
// permissive/bypass mode. See use-keyboard-action-handler.ts.
// permissive/bypass mode. The New Workspace screen's `paseo/new-workspace` action scope
// must shadow a backgrounded composer's handler.
test("Shift+Tab in New Workspace never changes a backgrounded agent's mode", async ({ page }) => {
const seeded = await seedWorkspace({ repoPrefix: "mode-cycle-safety-" });
await seedCodexDefaultPreferences(page);
+30 -1
View File
@@ -38,6 +38,7 @@ import {
submitNewWorkspacePrompt,
} from "../support/helpers/new-workspace";
import {
checkoutBranch,
commitLocalOnly,
createTempGitRepo,
readRepoRef,
@@ -816,6 +817,34 @@ test.describe("New workspace flow", () => {
}
});
test("branches off the repository default when the checkout is on a feature branch", async ({
page,
}) => {
const tempRepo = await createTempGitRepo("ref-default-feature-", {
withRemote: true,
branches: ["main", "feature/unrelated"],
});
try {
const originHead = readRepoRef(tempRepo.path, "refs/remotes/origin/main");
checkoutBranch(tempRepo.path, "feature/unrelated");
const featureHead = commitLocalOnly(tempRepo.path, "feature work");
const openedProject = await openWorktreeComposerForRepo(page, tempRepo.path);
await expectPickerSelected(page, "main");
const created = await createWorktreeAndRead(page, openedProject);
expect(created.branchInfo.hasAncestor(originHead)).toBe(true);
expect(created.branchInfo.hasAncestor(featureHead)).toBe(false);
expect(await readWorktreeBaseMetadata(created.workspaceDirectory)).toEqual({
baseRefName: "main",
baseRef: "refs/remotes/origin/main",
});
} finally {
await tempRepo.cleanup();
}
});
test("branches off the local ref when the local row is chosen explicitly", async ({
page,
}, testInfo) => {
@@ -864,7 +893,7 @@ test.describe("New workspace flow", () => {
// tracks gets its own row rather than silently sharing origin's. Two rows reading
// "main" is the ambiguity this whole change exists to remove.
await expectStartingRefRows(page, [
"main (upstream), upstream branch",
"main (upstream), default branch",
"main, origin branch",
]);
await expectPickerSelected(page, "main (upstream)");
+19 -27
View File
@@ -50,6 +50,7 @@ import { createTempDirectory, createTempGitRepo } from "../support/helpers/works
const MIDNIGHT_MUTED_FOREGROUND = "rgb(154, 157, 176)";
test("a new user is walked through setup once", async ({ page }, testInfo) => {
test.setTimeout(180_000);
const host = await startSetupHost("fresh");
const repo = await createTempGitRepo("onboarding-folder-");
@@ -89,6 +90,24 @@ test("a new user is walked through setup once", async ({ page }, testInfo) => {
await expectSetupStep(page, "Your providers");
});
await test.step("a removed provider can be added back with Remove enabled", async () => {
const detail = setupSheet(page, "provider-settings-sheet");
const remove = detail.getByRole("button", { name: "Remove", exact: true });
await openAddProvider(page);
await installAcpCatalogProvider(page, "Junie");
page.once("dialog", (dialog) => void dialog.accept());
await remove.click();
await expect(detail).toHaveCount(0);
await openAddProvider(page);
await installAcpCatalogProvider(page, "Junie");
await expect(remove).toHaveText("Remove");
await expect(remove).toBeEnabled();
await detail.getByRole("button", { name: "Back to providers", exact: true }).click();
await expect(detail).toHaveCount(0);
});
await test.step("with no agent history, Add project opens the regular flow and the folder shows as added", async () => {
await continueSetup(page);
await expectSetupStep(page, "Add your projects");
@@ -128,33 +147,6 @@ test("a new user is walked through setup once", async ({ page }, testInfo) => {
}
});
test("a provider removed in setup can be added back and removed again", async ({ page }) => {
test.setTimeout(180_000);
const host = await startSetupHost("re-add");
const detail = setupSheet(page, "provider-settings-sheet");
const remove = detail.getByTestId("provider-remove");
page.on("dialog", (dialog) => void dialog.accept());
try {
await openAppAsNewUser(page, host);
await continueSetup(page);
await expectSetupStep(page, "Your providers");
await openAddProvider(page);
await installAcpCatalogProvider(page, "Junie");
await remove.click();
await expect(detail).toHaveCount(0);
// Adding it back opens the same provider's sheet, which must not still be removing it.
await openAddProvider(page);
await installAcpCatalogProvider(page, "Junie");
await expect(remove).toHaveText("Remove");
await expect(remove).toBeEnabled();
} finally {
await host.close();
}
});
test("a new user goes from the loading screen straight into setup", async ({ page }) => {
const host = await startSetupHost("first-launch");
@@ -10,6 +10,7 @@ import { buildCreateAgentPreferences, buildSeededHost } from "../support/helpers
import { startIsolatedHostDaemon } from "../support/helpers/isolated-host-daemon";
import type { MockAgentWorkspace } from "../support/helpers/mock-agent";
import { seedWorkspace } from "../support/helpers/seed-client";
import { parseWsJsonFrame } from "../support/helpers/ws-frames";
import {
expectFoldedTurnAtReadingPosition,
expectOldestLoadedTurnPartial,
@@ -88,11 +89,13 @@ test("loads history across browser reconnection while retaining old-daemon conne
const observationSockets = new Set<unknown>();
page.on("websocket", (socket) => {
socket.on("framesent", ({ payload }) => {
if (typeof payload !== "string") return;
const frame = JSON.parse(payload);
const frame = parseWsJsonFrame<{
type?: unknown;
message?: { type?: unknown; subscribe?: unknown };
}>(payload);
if (
frame.type === "session" &&
frame.message.type === "fetch_agents_request" &&
frame?.type === "session" &&
frame.message?.type === "fetch_agents_request" &&
frame.message.subscribe
)
observationSockets.add(socket);
@@ -51,16 +51,18 @@ test("lists connected clients with scopes and navigates Pair a device → Relay
});
try {
await openDevicesPage(page, daemon);
await expectConnectedClientRow(page, "This device", "Full access");
await expandConnectedClientRow(page, "This device");
await expect(
page
.getByTestId("devices-connected-clients-card")
.getByText("access.manage", { exact: true }),
).toBeVisible();
await expectConnectedClientRow(page, /^Chrome on /, "Full access");
await expandConnectedClientRow(page, /^Chrome on /);
const card = page.getByTestId("devices-connected-clients-card");
await expect(card.getByText("IP address", { exact: true })).toBeVisible();
await expect(card.getByText("127.0.0.1", { exact: true })).toBeVisible();
await expect(card.getByText("access.manage", { exact: true })).toHaveCount(0);
await viewer.connect();
await expectConnectedClientRow(page, "Test Phone", "Read-only");
await expandConnectedClientRow(page, "Test Phone");
await expect(card.getByText("daemon.read", { exact: true })).toBeVisible();
await expect(card.getByText("workspace.read", { exact: true })).toBeVisible();
await openPairDeviceModal(page);
await expectPairingOffer(page);
@@ -0,0 +1,351 @@
import { mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import { expect, test, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { openCommandCenter } from "../support/helpers/command-center";
import {
openAgentRoute,
seedMockAgentWorkspace,
type MockAgentWorkspace,
} from "../support/helpers/mock-agent";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { pluginRequirements } from "../support/helpers/plugin-fixture";
const PLUGIN_ID = "agent-chat-focus-e2e";
const SCREEN_TITLE = "Embeds";
const PHONE = { width: 390, height: 844 };
interface EmbedComposer {
controls?: "all" | "none";
}
/**
* A screen with one `AgentChat` per agent under a header of its own, plus a client slash command
* that a full composer runs and a `controls: "none"` composer sends as text. A button opens the
* first agent's chat in a plugin modal too, and a workspace panel shows the same chats side by side.
*/
function pluginSource(input: { agentIds: string[]; composer: EmbedComposer }): string {
return `import { useCallback } from "react";
import { Pressable, Text, View } from "react-native";
import { AgentChat, Modal, SidebarRow } from "@getpaseo/plugin/client/ui";
import { useState } from "react";
const AGENT_IDS = ${JSON.stringify(input.agentIds)};
const COMPOSER = ${JSON.stringify(input.composer)};
function Embeds() {
const [modalOpen, setModalOpen] = useState(false);
return (
<View style={{ flex: 1 }}>
<Text testID="plugin-header" style={{ padding: 8 }}>Embedded agents</Text>
<Pressable accessibilityRole="button" onPress={() => setModalOpen(true)}>
<Text>Open in modal</Text>
</Pressable>
<Modal title="Agent in a modal" open={modalOpen} onOpenChange={setModalOpen}>
<Modal.Content scrollable={false}>
<AgentChat agentId={AGENT_IDS[0]} composer={COMPOSER} testID="modal-embed" />
</Modal.Content>
</Modal>
<View style={{ flex: 1, flexDirection: "row" }}>
{AGENT_IDS.map((agentId) => (
<View key={agentId} style={{ flex: 1, minWidth: 0 }}>
<AgentChat agentId={agentId} composer={COMPOSER} testID={"embed-" + agentId} />
</View>
))}
</View>
</View>
);
}
function Board() {
return (
<View style={{ flex: 1, flexDirection: "row" }}>
{AGENT_IDS.map((agentId) => (
<View key={agentId} style={{ flex: 1, minWidth: 0 }}>
<AgentChat agentId={agentId} composer={COMPOSER} testID={"panel-embed-" + agentId} />
</View>
))}
</View>
);
}
function EmbedsItem({ currentScreen, openScreen }) {
const open = useCallback(() => openScreen({ screenId: "main" }), [openScreen]);
return <SidebarRow icon="Bot" active={currentScreen?.screenId === "main"} onPress={open} />;
}
export default function contribute(plugin) {
plugin.addScreen({ id: "main", title: "${SCREEN_TITLE}", Component: Embeds });
plugin.addSidebarHeaderItem({ id: "main", title: "${SCREEN_TITLE}", Component: EmbedsItem });
plugin.addWorkspacePanel({ id: "board", title: "Board", icon: "Bot", context: "workspace", Component: Board });
plugin.addCommandCenterItem({
id: "board",
title: "Open embeds board",
icon: "Bot",
context: "workspace",
onSelect({ openPanel }) {
openPanel("board");
},
});
plugin.addSlashCommand({
name: "stamp",
context: "agent",
description: "Stamp the agent",
argumentHint: "",
onSubmit() {},
});
return () => {};
}`;
}
interface Scenario {
agents: MockAgentWorkspace[];
embed(agentId: string): ReturnType<Page["getByTestId"]>;
}
async function withEmbeds(
page: Page,
input: { agents: { title: string; model: string; prompt: string }[]; composer: EmbedComposer },
run: (scenario: Scenario) => Promise<void>,
): Promise<void> {
const agents: MockAgentWorkspace[] = [];
const client = await connectNewWorkspaceDaemonClient({ ownProjects: false });
const previous = await client.getDaemonConfig();
const directory = await mkdtemp(path.join(tmpdir(), "paseo-agent-chat-focus-"));
try {
for (const agent of input.agents) {
agents.push(
await seedMockAgentWorkspace({
repoPrefix: "agent-chat-focus-",
title: agent.title,
model: agent.model,
initialPrompt: agent.prompt,
}),
);
}
await writeFile(
path.join(directory, "paseo-plugin.json"),
JSON.stringify({ id: PLUGIN_ID, requirements: pluginRequirements }),
);
await writeFile(
path.join(directory, "index.client.tsx"),
pluginSource({ agentIds: agents.map((agent) => agent.agentId), composer: input.composer }),
);
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(directory);
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await page.getByRole("button", { name: SCREEN_TITLE, exact: true }).click();
const embed = (agentId: string) => page.getByTestId(`embed-${agentId}`);
for (const agent of agents) {
await expect(embed(agent.agentId).getByTestId("user-message").first()).toBeVisible({
timeout: 30_000,
});
}
await run({ agents, embed });
} finally {
await client.removePlugin(PLUGIN_ID).catch(() => undefined);
await client
.patchDaemonConfig({ pluginsEnabled: previous.config.pluginsEnabled ?? false })
.catch(() => undefined);
await client.close().catch(() => undefined);
await rm(directory, { recursive: true, force: true });
for (const agent of agents) await agent.cleanup();
}
}
async function agentStatus(agent: MockAgentWorkspace): Promise<string | null> {
const fetched = await agent.client.fetchAgent({ agentId: agent.agentId });
return fetched?.agent.status ?? null;
}
/** Clicks land on text, not on a field, so Escape routes as the interrupt shortcut. */
async function expectEscapeInterruptsOnlyTheFocusedEmbed(
page: Page,
input: { left: MockAgentWorkspace; right: MockAgentWorkspace; embed: Scenario["embed"] },
): Promise<void> {
const { left, right, embed } = input;
await test.step("Escape after a click outside the embeds interrupts neither", async () => {
await page.getByTestId("plugin-header").click();
await page.keyboard.press("Escape");
});
await test.step("Escape after a click in the left embed interrupts only it", async () => {
await embed(left.agentId).getByTestId("user-message").first().click();
await page.keyboard.press("Escape");
await expect.poll(() => agentStatus(left), { timeout: 15_000 }).toBe("idle");
// Interrupts go out in order, so a stray one from the first Escape has landed by now.
expect(await agentStatus(right)).toBe("running");
});
await test.step("Escape after a click in the right embed interrupts it", async () => {
await embed(right.agentId).getByTestId("user-message").first().click();
await page.keyboard.press("Escape");
await expect.poll(() => agentStatus(right), { timeout: 15_000 }).toBe("idle");
});
}
test('controls: "none" sends a plugin slash command to the agent as typed', async ({ page }) => {
test.setTimeout(180_000);
await page.setViewportSize({ width: 1280, height: 800 });
await withEmbeds(
page,
{
agents: [{ title: "Slash agent", model: "e2e-fast-stream", prompt: "Say hello." }],
composer: { controls: "none" },
},
async ({ agents: [agent], embed }) => {
await agent.client.waitForFinish(agent.agentId, 30_000);
const box = embed(agent.agentId).getByRole("textbox", { name: "Message agent..." });
await box.fill("/stamp the invoices");
await box.press("Enter");
await expect(embed(agent.agentId).getByTestId("user-message").last()).toContainText(
"/stamp the invoices",
);
},
);
});
test("Escape interrupts only the embed that has focus", async ({ page }) => {
test.setTimeout(240_000);
await page.setViewportSize({ width: 1440, height: 900 });
await withEmbeds(
page,
{
agents: [
{ title: "Left agent", model: "one-minute-stream", prompt: "Keep running left." },
{ title: "Right agent", model: "one-minute-stream", prompt: "Keep running right." },
],
composer: { controls: "none" },
},
async ({ agents: [left, right], embed }) => {
await expect.poll(() => agentStatus(left), { timeout: 15_000 }).toBe("running");
await expect.poll(() => agentStatus(right), { timeout: 15_000 }).toBe("running");
await expectEscapeInterruptsOnlyTheFocusedEmbed(page, { left, right, embed });
},
);
});
test("a phone-width plugin modal shows an agent's chat", async ({ page }) => {
test.setTimeout(180_000);
await page.setViewportSize({ width: 1280, height: 800 });
await withEmbeds(
page,
{
agents: [{ title: "Modal agent", model: "e2e-fast-stream", prompt: "Say hello." }],
composer: { controls: "none" },
},
async () => {
// At phone width the modal is a bottom sheet whose body renders under the app's root
// portal host, outside the plugin screen's React tree.
await page.setViewportSize(PHONE);
await page.getByRole("button", { name: "Open in modal", exact: true }).click();
await expect(page.getByText("Agent in a modal", { exact: true })).toBeVisible();
const modalEmbed = page.getByTestId("modal-embed");
await expect(modalEmbed.getByTestId("user-message").first()).toContainText("Say hello.", {
timeout: 30_000,
});
await expect(modalEmbed.getByRole("textbox", { name: "Message agent..." })).toBeVisible();
},
);
});
/** Picks the embed's current mode again from its picker, which draws at the overlay root. */
async function pickCurrentMode(page: Page, embed: ReturnType<Page["getByTestId"]>): Promise<void> {
const trigger = embed.getByRole("button", { name: /^Select agent mode \(/ });
const label = /^Select agent mode \((.+)\)$/.exec(
(await trigger.getAttribute("aria-label")) ?? "",
)?.[1];
expect(label).toBeTruthy();
await trigger.click();
const popup = page.getByTestId("combobox-desktop-container").last();
await expect(popup).toBeVisible({ timeout: 10_000 });
await popup.getByRole("option", { name: label, exact: true }).click();
await expect(page.getByTestId("combobox-desktop-container")).toHaveCount(0);
}
test("a full-composer embed applies a slash suggestion picked with the pointer", async ({
page,
}) => {
test.setTimeout(180_000);
await page.setViewportSize({ width: 1280, height: 800 });
await withEmbeds(
page,
{
agents: [{ title: "Suggestion agent", model: "e2e-fast-stream", prompt: "Say hello." }],
composer: {},
},
async ({ agents: [agent], embed }) => {
await agent.client.waitForFinish(agent.agentId, 30_000);
const box = embed(agent.agentId).getByRole("textbox", { name: "Message agent..." });
await box.click();
await box.pressSequentially("/sta");
// The list draws in the floating-panel portal, outside the embed's own nodes.
const suggestion = page
.getByTestId("composer-autocomplete-popover")
.getByText("/stamp", { exact: true });
await expect(suggestion).toBeVisible({ timeout: 30_000 });
await suggestion.click();
await expect(box).toHaveValue(/^\/stamp\s*$/);
},
);
});
test("a portaled mode picker keeps its embed focused for Escape", async ({ page }) => {
test.setTimeout(240_000);
await page.setViewportSize({ width: 1440, height: 900 });
await withEmbeds(
page,
{
agents: [
{ title: "Left agent", model: "one-minute-stream", prompt: "Keep running left." },
{ title: "Right agent", model: "one-minute-stream", prompt: "Keep running right." },
],
composer: {},
},
async ({ agents: [left, right], embed }) => {
await expect.poll(() => agentStatus(left), { timeout: 15_000 }).toBe("running");
await expect.poll(() => agentStatus(right), { timeout: 15_000 }).toBe("running");
await pickCurrentMode(page, embed(left.agentId));
await page.keyboard.press("Escape");
await expect.poll(() => agentStatus(left), { timeout: 15_000 }).toBe("idle");
expect(await agentStatus(right)).toBe("running");
},
);
});
test("embeds in one workspace panel keep their own composers", async ({ page }) => {
test.setTimeout(180_000);
await page.setViewportSize({ width: 1440, height: 900 });
await withEmbeds(
page,
{
agents: [
{ title: "Left agent", model: "e2e-fast-stream", prompt: "Say hello left." },
{ title: "Right agent", model: "e2e-fast-stream", prompt: "Say hello right." },
],
composer: {},
},
async ({ agents: [left, right] }) => {
await openAgentRoute(page, left);
const commands = await openCommandCenter(page);
await commands.getByTestId("command-center-input").fill("Open embeds board");
await commands.getByRole("button", { name: "Open embeds board", exact: true }).click();
const leftEmbed = page.getByTestId(`panel-embed-${left.agentId}`);
const rightEmbed = page.getByTestId(`panel-embed-${right.agentId}`);
await expect(leftEmbed.getByTestId("user-message").first()).toBeVisible({ timeout: 30_000 });
await expect(rightEmbed.getByTestId("user-message").first()).toBeVisible({ timeout: 30_000 });
// The fullscreen control shows on a phone once the draft runs past two lines.
await page.setViewportSize(PHONE);
await leftEmbed
.getByRole("textbox", { name: "Message agent..." })
.fill("First line\nSecond line\nThird line\nFourth line");
await leftEmbed.getByRole("button", { name: "Fullscreen", exact: true }).click();
await expect(leftEmbed.getByTestId("composer-fullscreen")).toBeVisible();
await expect(rightEmbed.getByTestId("composer-fullscreen")).toHaveCount(0);
},
);
});
@@ -0,0 +1,120 @@
import { expect, test, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { copyPluginExample } from "../support/helpers/plugin-fixture";
const PLUGIN_ID = "agent-chat-example";
const AGENT_TITLE = "Billing retries";
const FIRST_PROMPT = "Summarize the billing retry failures.";
function embed(page: Page) {
return page.getByTestId("example-agent-chat");
}
async function openAgentInEmbed(page: Page): Promise<void> {
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await page.getByRole("button", { name: "Agents", exact: true }).click();
await page
.getByTestId("example-agent-list")
.getByRole("button", { name: AGENT_TITLE, exact: true })
.click();
}
async function sendFromEmbed(page: Page, text: string): Promise<void> {
const box = embed(page).getByRole("textbox", { name: "Message agent..." });
await box.fill(text);
await box.press("Enter");
}
test.describe("AgentChat", () => {
test("a plugin screen embeds an agent's chat with the composer it chose", async ({
page,
context,
}) => {
test.setTimeout(180_000);
await page.setViewportSize({ width: 1280, height: 800 });
const agent = await seedMockAgentWorkspace({
repoPrefix: "plugin-agent-chat-",
title: AGENT_TITLE,
initialPrompt: FIRST_PROMPT,
});
const client = await connectNewWorkspaceDaemonClient({ ownProjects: false });
const previous = await client.getDaemonConfig();
const example = await copyPluginExample("agent-chat");
try {
await agent.client.waitForFinish(agent.agentId, 30_000);
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(example.directory);
await openAgentInEmbed(page);
await test.step("controls: none is a message box and Send", async () => {
await expect(embed(page).getByTestId("user-message")).toContainText(FIRST_PROMPT);
await expect(embed(page).getByTestId("assistant-message").first()).toBeVisible();
await expect(
embed(page).getByRole("textbox", { name: "Message agent..." }),
).toHaveAttribute("placeholder", "Message this agent");
await expect(embed(page).getByTestId("agent-controls-toolbar")).toHaveCount(0);
await expect(embed(page).getByTestId("message-input-attach-button")).toHaveCount(0);
await expect(embed(page).getByTestId("context-window-meter")).toHaveCount(0);
const choices = await page.getByTestId("example-composer-choices").boundingBox();
const chat = await embed(page).boundingBox();
expect(chat!.y).toBeGreaterThanOrEqual(choices!.y + choices!.height);
});
await test.step("a message sent from the embed streams into it", async () => {
await sendFromEmbed(page, "Check the invoice PDFs next.");
await expect(embed(page).getByTestId("user-message").last()).toContainText(
"Check the invoice PDFs next.",
);
await agent.client.waitForFinish(agent.agentId, 30_000);
});
await test.step("slash text in the simple box reaches the agent as typed", async () => {
await sendFromEmbed(page, "/exit");
await expect(embed(page).getByTestId("user-message").last()).toContainText("/exit");
await agent.client.waitForFinish(agent.agentId, 30_000);
const fetched = await agent.client.fetchAgent({ agentId: agent.agentId });
expect(fetched?.agent.archivedAt ?? null).toBeNull();
});
await test.step("the full composer is the agent tab's", async () => {
await page.getByRole("button", { name: "Full", exact: true }).click();
await expect(embed(page).getByTestId("agent-controls-toolbar")).toBeVisible();
await expect(embed(page).getByTestId("message-input-attach-button")).toBeVisible();
await expect(embed(page).getByTestId("context-window-meter")).toBeVisible();
});
await test.step("composer={false} shows the conversation without a composer", async () => {
await page.getByRole("button", { name: "No composer", exact: true }).click();
await expect(embed(page).getByTestId("user-message").first()).toContainText(FIRST_PROMPT);
await expect(embed(page).getByRole("textbox", { name: "Message agent..." })).toHaveCount(0);
});
await test.step("the agent's tab and the embed stay live together", async () => {
await page.getByRole("button", { name: "Simple", exact: true }).click();
const tab = await context.newPage();
await openAgentRoute(tab, { workspaceId: agent.workspaceId, agentId: agent.agentId });
const tabBox = tab.getByRole("textbox", { name: "Message agent..." }).first();
await tabBox.fill("Sent from the tab.");
await tabBox.press("Enter");
await expect(embed(page).getByTestId("user-message").last()).toContainText(
"Sent from the tab.",
);
await sendFromEmbed(page, "Sent from the embed.");
await expect(tab.getByTestId("user-message").last()).toContainText("Sent from the embed.");
await tab.close();
});
} finally {
await client.removePlugin(PLUGIN_ID).catch(() => undefined);
await client
.patchDaemonConfig({ pluginsEnabled: previous.config.pluginsEnabled ?? false })
.catch(() => undefined);
await client.close().catch(() => undefined);
await example.cleanup();
await agent.cleanup();
}
});
});
@@ -0,0 +1,788 @@
import { mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import type { Locator, Page } from "@playwright/test";
import { expect, test } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { openCommandCenter } from "../support/helpers/command-center";
import { buildAgentRoute } from "../support/helpers/mock-agent";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { pluginRequirements } from "../support/helpers/plugin-fixture";
import { seedWorkspace } from "../support/helpers/seed-client";
const PLUGIN_ID = "composer-pill-items-e2e";
const WIDE = { width: 1440, height: 900 };
const COMPACT = { width: 390, height: 844 };
function pluginSource(workspaceId: string, agentId: string): string {
return `import React from "react";
import { Pressable, Text, View } from "react-native";
import { useWorkspace } from "@getpaseo/plugin/client";
import { ComposerPill, ScrollView } from "@getpaseo/plugin/client/ui";
function InboxScreen({ theme, params }) {
return (
<View style={{ flex: 1, padding: 24, gap: 8 }}>
<Text style={{ color: theme.colors.foreground }}>Inbox screen for {params.agentId}</Text>
</View>
);
}
function InboxPopover({ theme, layout, close, openScreen, workspaceId, agentId }) {
const workspaceName = useWorkspace(${JSON.stringify(workspaceId)}, (w) => w.name);
return (
<View style={{ padding: 12, gap: 10 }}>
<Text style={{ color: theme.colors.foreground, fontSize: 16 }}>Inbox decisions</Text>
<Text style={{ color: theme.colors.foregroundMuted }}>Workspace: {workspaceName}</Text>
<Text style={{ color: theme.colors.foregroundMuted }}>
Pill IDs: {workspaceId} / {agentId}
</Text>
<Text style={{ color: theme.colors.foregroundMuted }}>
Presentation: {layout.compact ? "compact" : "wide"}
</Text>
<Pressable
accessibilityRole="button"
accessibilityLabel="Open inbox screen"
onPress={() => openScreen({ screenId: "inbox", params: { agentId: ${JSON.stringify(agentId)} } })}
>
<Text style={{ color: theme.colors.foreground }}>Open screen</Text>
</Pressable>
<Pressable
accessibilityRole="button"
accessibilityLabel="Close inbox popover"
onPress={close}
>
<Text style={{ color: theme.colors.foreground }}>Done</Text>
</Pressable>
</View>
);
}
function TallDecisionsPopover({ theme, close }) {
return (
<View style={{ flex: 1, minHeight: 0 }}>
<View
testID="tall-popover-header"
style={{
paddingHorizontal: 14,
paddingVertical: 12,
borderBottomWidth: 1,
borderBottomColor: theme.colors.border,
}}
>
<Text style={{ color: theme.colors.foreground, fontWeight: "600" }}>Open decisions</Text>
</View>
<ScrollView testID="tall-popover-scroll" style={{ flex: 1 }}>
{Array.from({ length: 24 }, (_, index) => (
<View
key={index}
style={{
paddingHorizontal: 14,
paddingVertical: 10,
borderBottomWidth: 1,
borderBottomColor: theme.colors.border,
}}
>
<Text style={{ color: theme.colors.foreground }}>{"Decision item " + index}</Text>
</View>
))}
</ScrollView>
<View
testID="tall-popover-footer"
style={{
paddingHorizontal: 14,
paddingVertical: 12,
borderTopWidth: 1,
borderTopColor: theme.colors.border,
}}
>
<Pressable
accessibilityRole="button"
accessibilityLabel="Submit decisions"
onPress={close}
style={{
paddingVertical: 8,
paddingHorizontal: 12,
borderRadius: 6,
backgroundColor: theme.colors.surface2,
alignItems: "center",
}}
>
<Text style={{ color: theme.colors.foreground }}>Submit</Text>
</Pressable>
</View>
</View>
);
}
function TallDecisionsPill({ openPopover }) {
return (
<ComposerPill
icon="ListChecks"
label="All decisions"
onPress={() => openPopover(TallDecisionsPopover)}
/>
);
}
function RevealResultsPopover({ theme, close }) {
const [clicks, setClicks] = React.useState(0);
const [revealed, setRevealed] = React.useState(false);
return (
<View style={revealed ? { flex: 1, minHeight: 0 } : { padding: 12, gap: 8 }}>
<View
testID="reveal-popover-header"
style={{
paddingHorizontal: revealed ? 14 : 0,
paddingVertical: revealed ? 10 : 0,
gap: 8,
}}
>
<Pressable
accessibilityRole="button"
accessibilityLabel={"Reveal count: " + clicks}
onPress={() => setClicks((count) => count + 1)}
>
<Text style={{ color: theme.colors.foreground }}>{"Reveal count: " + clicks}</Text>
</Pressable>
{revealed ? null : (
<Pressable
accessibilityRole="button"
accessibilityLabel="Show results"
onPress={() => setRevealed(true)}
>
<Text style={{ color: theme.colors.foreground }}>Show results</Text>
</Pressable>
)}
</View>
{revealed ? (
<ScrollView testID="reveal-popover-scroll" style={{ flex: 1 }}>
{Array.from({ length: 24 }, (_, index) => (
<View
key={index}
style={{
paddingHorizontal: 14,
paddingVertical: 10,
borderBottomWidth: 1,
borderBottomColor: theme.colors.border,
}}
>
<Text style={{ color: theme.colors.foreground }}>{"Result item " + index}</Text>
</View>
))}
</ScrollView>
) : null}
<View style={{ paddingHorizontal: revealed ? 14 : 0, paddingVertical: revealed ? 10 : 0 }}>
<Pressable
accessibilityRole="button"
accessibilityLabel="Close reveal popover"
onPress={close}
>
<Text style={{ color: theme.colors.foreground }}>Close results</Text>
</Pressable>
</View>
</View>
);
}
function RevealResultsPill({ openPopover }) {
return (
<ComposerPill
icon="Search"
label="Lazy results"
onPress={() => openPopover(RevealResultsPopover)}
/>
);
}
function FixedScrollPopover({ theme, close }) {
const [expanded, setExpanded] = React.useState(false);
const [height, setHeight] = React.useState(600);
const [extraFooterAction, setExtraFooterAction] = React.useState(false);
const [filtered, setFiltered] = React.useState(false);
return (
<View style={expanded ? { flex: 1, minHeight: 0 } : undefined}>
<View testID="fixed-scroll-header" style={{ paddingHorizontal: 14, paddingVertical: 10 }}>
<Text style={{ color: theme.colors.foreground, fontWeight: "600" }}>Fixed viewport</Text>
<Pressable accessibilityRole="button" onPress={() => setHeight(120)}>
<Text style={{ color: theme.colors.foreground }}>Shrink fixed viewport</Text>
</Pressable>
</View>
<ScrollView testID="fixed-scroll-body" style={expanded ? { flex: 1 } : { height }}>
{Array.from({ length: filtered ? 1 : 16 }, (_, index) => (
<View key={index} style={{ height: 40, justifyContent: "center", paddingHorizontal: 14 }}>
<Text style={{ color: theme.colors.foreground }}>{"Fixed row " + index}</Text>
</View>
))}
</ScrollView>
<View
testID="fixed-scroll-footer"
style={{ gap: 8, paddingHorizontal: 14, paddingVertical: 10 }}
>
<View style={{ flexDirection: "row", flexWrap: "wrap", gap: 12 }}>
<Pressable
accessibilityRole="button"
accessibilityLabel="Filter fixed rows"
onPress={() => setFiltered((value) => !value)}
>
<Text style={{ color: theme.colors.foreground }}>Filter rows</Text>
</Pressable>
<Pressable
accessibilityRole="button"
accessibilityLabel="Add footer action"
onPress={() => setExtraFooterAction((value) => !value)}
>
<Text style={{ color: theme.colors.foreground }}>Add footer action</Text>
</Pressable>
<Pressable
accessibilityRole="button"
accessibilityLabel="Expand fixed viewport"
onPress={() => setExpanded((value) => !value)}
>
<Text style={{ color: theme.colors.foreground }}>
{expanded ? "Collapse fixed" : "Expand fixed"}
</Text>
</Pressable>
<Pressable
accessibilityRole="button"
accessibilityLabel="Close fixed viewport"
onPress={close}
>
<Text style={{ color: theme.colors.foreground }}>Close fixed</Text>
</Pressable>
</View>
{extraFooterAction ? (
<View testID="fixed-scroll-extra-action" style={{ height: 48, justifyContent: "center" }}>
<Text style={{ color: theme.colors.foreground }}>Secondary footer action</Text>
</View>
) : null}
</View>
</View>
);
}
function FixedScrollPill({ openPopover }) {
return (
<ComposerPill
icon="PanelTop"
label="Fixed scroll"
onPress={() => openPopover(FixedScrollPopover)}
/>
);
}
function LivePopover({ theme, close }) {
return (
<View style={{ padding: 12, gap: 8 }}>
<Text style={{ color: theme.colors.foreground }}>Live popover content</Text>
<Pressable
accessibilityRole="button"
accessibilityLabel="Trigger live update"
onPress={() => updateLivePopover?.()}
>
<Text style={{ color: theme.colors.foreground }}>Update</Text>
</Pressable>
<Pressable
accessibilityRole="button"
accessibilityLabel="Close live popover"
onPress={close}
>
<Text style={{ color: theme.colors.foreground }}>Close</Text>
</Pressable>
</View>
);
}
let updateLivePopover = null;
function QuietPill({ workspaceId }) {
const name = useWorkspace(workspaceId, (w) => w.name);
if (name !== "Show quiet pill") return null;
return <ComposerPill icon="Sparkles" label="Quiet" onPress={() => {}} />;
}
let finishAction = () => {};
let actionAttempts = 0;
function ActionPill() {
const [checks, setChecks] = React.useState(0);
return (
<ComposerPill
icon="Play"
label={checks === 0 ? "Run check" : "Checks · " + checks}
title="Run check action"
onPress={async () => {
actionAttempts += 1;
if (actionAttempts === 1) throw new Error("Action check failed");
await new Promise((resolve) => {
finishAction = resolve;
});
setChecks((n) => n + 1);
}}
/>
);
}
function InboxPill({ openPopover }) {
return (
<ComposerPill
icon="Inbox"
label="2 decisions"
onPress={() => openPopover(InboxPopover)}
/>
);
}
export default function contribute(client) {
const workspaceId = ${JSON.stringify(workspaceId)};
const agentId = ${JSON.stringify(agentId)};
client.addScreen({ id: "inbox", title: "Inbox Screen", Component: InboxScreen });
const removeQuiet = client.addComposerPillItem({ id: "quiet", title: "Quiet", Component: QuietPill });
const removeAction = client.addComposerPillItem({ id: "action", title: "Run check", Component: ActionPill });
const removeInbox = client.addComposerPillItem({ id: "inbox", title: "Inbox decisions", Component: InboxPill });
const removeTall = client.addComposerPillItem({ id: "tall", title: "All decisions", Component: TallDecisionsPill });
const removeReveal = client.addComposerPillItem({ id: "reveal", title: "Reveal results", Component: RevealResultsPill });
const removeFixed = client.addComposerPillItem({ id: "fixed", title: "Fixed viewport", Component: FixedScrollPill });
const live = client.addComposerPill({
id: "live-popover",
workspaceId,
agentId,
button: {
title: "Live popover",
icon: "Eye",
label: "Live",
behavior: { kind: "popover", Content: LivePopover },
},
});
const dynamicMenu = client.addComposerPill({
id: "dynamic-menu",
workspaceId,
agentId,
button: {
title: "Dynamic menu",
icon: "List",
label: "Decisions",
behavior: {
kind: "menu",
items: [
{
kind: "item",
id: "D42",
title: "Decision D42",
behavior: {
kind: "action",
onPress() {
dynamicMenu.update({ label: "Picked D42" });
},
},
},
],
},
},
});
client.addCommandCenterItem({
id: "finish-check",
title: "Finish check action",
icon: "Check",
context: "workspace",
onSelect: () => finishAction(),
});
updateLivePopover = () =>
live.update({
label: "Live · 2",
behavior: { kind: "popover", Content: LivePopover },
});
return () => {
finishAction();
removeQuiet();
removeAction();
removeInbox();
removeTall();
removeReveal();
removeFixed();
live.remove();
dynamicMenu.remove();
};
}
`;
}
async function runCommand(page: Page, title: string) {
const panel = await openCommandCenter(page);
await panel.getByTestId("command-center-input").fill(title);
await panel.getByRole("button", { name: title, exact: true }).click();
await expect(panel).not.toBeVisible();
}
async function expectStill(subject: Locator) {
let previous: {
buffer: Buffer;
box: { x: number; y: number; width: number; height: number };
} | null = null;
await expect
.poll(
async () => {
const box = await subject.boundingBox();
if (!box || box.width <= 0 || box.height <= 0) {
previous = null;
return false;
}
const buffer = await subject.screenshot();
const still =
previous !== null &&
Math.abs(box.x - previous.box.x) < 0.5 &&
Math.abs(box.y - previous.box.y) < 0.5 &&
Math.abs(box.width - previous.box.width) < 0.5 &&
Math.abs(box.height - previous.box.height) < 0.5 &&
buffer.equals(previous.buffer);
previous = { buffer, box };
return still;
},
{ intervals: [150] },
)
.toBe(true);
}
async function qaScreenshot(page: Page, name: string) {
const directory = process.env.PASEO_QA_SCREENSHOT_DIR;
if (!directory) return;
await page.waitForTimeout(300);
await page.screenshot({ path: path.join(directory, `${name}.png`) });
}
async function scrollToEndAndExpectPinned(options: {
page: Page;
header: Locator;
footer: Locator;
scroll: Locator;
bottomItemLabel: string;
}) {
const { page, header, footer, scroll, bottomItemLabel } = options;
const initialHeaderY = (await header.boundingBox())!.y;
const initialFooterY = (await footer.boundingBox())!.y;
const canScroll = await scroll.evaluate((node) => node.scrollHeight > node.clientHeight + 1);
expect(canScroll).toBe(true);
await scroll.evaluate((node) => {
node.scrollTop = node.scrollHeight;
});
await expect(page.getByText(bottomItemLabel, { exact: true })).toBeVisible();
expect((await header.boundingBox())!.y).toBe(initialHeaderY);
expect((await footer.boundingBox())!.y).toBe(initialFooterY);
}
async function expectPinnedScrollableDesktopPopover(page: Page, pluginId: string) {
const surface = page.getByTestId(`plugin-composer-pill-${pluginId}-tall-popover`);
const header = page.getByTestId("tall-popover-header");
const footer = page.getByTestId("tall-popover-footer");
const scroll = page.getByTestId("tall-popover-scroll");
await expect(header).toBeVisible();
await expect(footer).toBeVisible();
await expectStill(header);
const surfaceBox = (await surface.boundingBox())!;
const headerBox = (await header.boundingBox())!;
const footerBox = (await footer.boundingBox())!;
expect(surfaceBox.height).toBeLessThanOrEqual(441);
// 0px outer padding (1px surface border only).
expect(Math.abs(headerBox.y - surfaceBox.y - 1)).toBeLessThanOrEqual(1);
expect(
Math.abs(surfaceBox.y + surfaceBox.height - (footerBox.y + footerBox.height) - 1),
).toBeLessThanOrEqual(1);
await scrollToEndAndExpectPinned({
page,
header,
footer,
scroll,
bottomItemLabel: "Decision item 23",
});
}
async function expectPinnedScrollableCompactSheet(page: Page, pluginId: string) {
const sheetContent = page.getByTestId(`plugin-composer-pill-${pluginId}-tall-popover-content`);
const header = page.getByTestId("tall-popover-header");
const footer = page.getByTestId("tall-popover-footer");
const scroll = page.getByTestId("tall-popover-scroll");
await expect(sheetContent).toBeVisible();
await expect(footer).toBeInViewport();
await expectStill(sheetContent);
const sheetBox = (await sheetContent.boundingBox())!;
const footerBox = (await footer.boundingBox())!;
expect(sheetBox.height).toBeLessThanOrEqual(COMPACT.height * 0.8 + 1);
expect(footerBox.y + footerBox.height).toBeLessThanOrEqual(COMPACT.height + 1);
await scrollToEndAndExpectPinned({
page,
header,
footer,
scroll,
bottomItemLabel: "Decision item 23",
});
}
async function expectRevealedScrollerPreservesCompactState(page: Page, pluginId: string) {
const revealPill = page.getByRole("button", { name: "Lazy results", exact: true });
await expect(revealPill).toBeVisible();
await revealPill.click();
const sheetContent = page.getByTestId(`plugin-composer-pill-${pluginId}-reveal-popover-content`);
await expect(sheetContent).toBeVisible();
await expect(page.getByRole("button", { name: "Reveal count: 0", exact: true })).toBeInViewport();
await expectStill(sheetContent);
await page.getByRole("button", { name: "Reveal count: 0", exact: true }).click();
await expect(page.getByRole("button", { name: "Reveal count: 1", exact: true })).toBeVisible();
await page.getByRole("button", { name: "Show results", exact: true }).click();
const scroll = page.getByTestId("reveal-popover-scroll");
await expect(scroll).toBeVisible();
await expectStill(sheetContent);
// Revealing a ScrollView in an open sheet must keep plugin state mounted and cap sheet height.
await expect(page.getByRole("button", { name: "Reveal count: 1", exact: true })).toBeVisible();
expect((await sheetContent.boundingBox())!.height).toBeLessThanOrEqual(COMPACT.height * 0.8 + 1);
await scroll.evaluate((node) => {
node.scrollTop = node.scrollHeight;
});
await expect(page.getByText("Result item 23", { exact: true })).toBeVisible();
await page.getByRole("button", { name: "Close reveal popover", exact: true }).click();
await expect(scroll).toHaveCount(0);
}
async function expectCompactSheetHugsFixedScrollPopover(page: Page, pluginId: string) {
const fixedPill = page.getByRole("button", { name: "Fixed scroll", exact: true });
await expect(fixedPill).toBeVisible();
await fixedPill.click();
const sheetContent = page.getByTestId(`plugin-composer-pill-${pluginId}-fixed-popover-content`);
const scroll = page.getByTestId("fixed-scroll-body");
await expect(sheetContent).toBeVisible();
await expect.poll(async () => (await sheetContent.boundingBox())!.height).toBeGreaterThan(600);
await page.getByRole("button", { name: "Shrink fixed viewport", exact: true }).click();
await expect.poll(async () => (await sheetContent.boundingBox())!.height).toBeLessThan(340);
await expect(page.getByTestId("fixed-scroll-footer")).toBeInViewport();
await expectStill(sheetContent);
const sheetBox = (await sheetContent.boundingBox())!;
const footerBox = (await page.getByTestId("fixed-scroll-footer").boundingBox())!;
// A 120px fixed-height ScrollView with short header/footer must hug its own ~200-260px height
// rather than expanding to the 80% sheet cap (675px).
expect(sheetBox.height).toBeLessThan(340);
expect(
Math.abs(sheetBox.y + sheetBox.height - (footerBox.y + footerBox.height)),
).toBeLessThanOrEqual(2);
await scroll.evaluate((node) => {
node.scrollTop = node.scrollHeight;
});
await expect(page.getByText("Fixed row 15", { exact: true })).toBeVisible();
await page.getByRole("button", { name: "Add footer action", exact: true }).click();
await expectStill(sheetContent);
const grownSheetBox = (await sheetContent.boundingBox())!;
const extraActionBox = (await page.getByTestId("fixed-scroll-extra-action").boundingBox())!;
expect(grownSheetBox.height).toBeGreaterThanOrEqual(sheetBox.height + 40);
expect(extraActionBox.y + extraActionBox.height).toBeLessThanOrEqual(
grownSheetBox.y + grownSheetBox.height + 2,
);
await page.getByRole("button", { name: "Add footer action", exact: true }).click();
await expectStill(sheetContent);
await page.getByRole("button", { name: "Filter fixed rows", exact: true }).click();
await expectStill(sheetContent);
const filteredBox = (await sheetContent.boundingBox())!;
const filteredFooterBox = (await page.getByTestId("fixed-scroll-footer").boundingBox())!;
expect(Math.abs(filteredBox.height - sheetBox.height)).toBeLessThanOrEqual(2);
expect(
Math.abs(filteredBox.y + filteredBox.height - (filteredFooterBox.y + filteredFooterBox.height)),
).toBeLessThanOrEqual(2);
await page.getByRole("button", { name: "Filter fixed rows", exact: true }).click();
await expectStill(sheetContent);
await page.getByRole("button", { name: "Expand fixed viewport", exact: true }).click();
await expectStill(sheetContent);
const expandedBox = (await sheetContent.boundingBox())!;
const expandedScrollBox = (await scroll.boundingBox())!;
expect(expandedBox.height).toBeGreaterThan(450);
expect(expandedBox.height).toBeLessThanOrEqual(COMPACT.height * 0.8 + 2);
expect(expandedScrollBox.height).toBeGreaterThan(300);
await page.getByRole("button", { name: "Expand fixed viewport", exact: true }).click();
await expectStill(sheetContent);
const collapsedBox = (await sheetContent.boundingBox())!;
expect(collapsedBox.height).toBeLessThan(340);
await page.getByRole("button", { name: "Close fixed viewport", exact: true }).click();
await expect(scroll).toHaveCount(0);
}
test("declarative addComposerPillItem + ComposerPill and imperative pill fixes work end-to-end", async ({
page,
}) => {
test.setTimeout(180_000);
const workspace = await seedWorkspace({ repoPrefix: "composer-pill-items-" });
const agent = await workspace.client.createAgent({
provider: "mock",
cwd: workspace.repoPath,
workspaceId: workspace.workspaceId,
title: "Declarative composer pills",
model: "e2e-fast-stream",
modeId: "load-test",
});
const client = await connectNewWorkspaceDaemonClient({ ownProjects: false });
const config = await client.getDaemonConfig();
const directory = await mkdtemp(path.join(tmpdir(), "paseo-pill-items-"));
try {
await writeFile(
path.join(directory, "paseo-plugin.json"),
JSON.stringify({ id: PLUGIN_ID, requirements: pluginRequirements }),
);
await writeFile(
path.join(directory, "index.client.tsx"),
pluginSource(workspace.workspaceId, agent.id),
);
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(directory);
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await page.goto(buildAgentRoute(workspace.workspaceId, agent.id));
const actionPill = page.getByRole("button", { name: "Run check action", exact: true });
const inboxPill = page.getByRole("button", { name: "2 decisions", exact: true });
await expect(actionPill).toBeVisible();
await expect(inboxPill).toBeVisible();
await test.step("null items leave no empty gap in the composer track", async () => {
await expect(page.getByRole("button", { name: "Quiet", exact: true })).toHaveCount(0);
const actionBox = (await actionPill.boundingBox())!;
const inboxBox = (await inboxPill.boundingBox())!;
expect(Math.abs(actionBox.y - inboxBox.y)).toBeLessThan(2);
expect(actionBox.height).toBeGreaterThanOrEqual(32);
expect(inboxBox.height).toBeGreaterThanOrEqual(32);
// 4px track gap between adjacent pills with no empty wrapper gap in between.
expect(inboxBox.x - (actionBox.x + actionBox.width)).toBeLessThanOrEqual(8);
await qaScreenshot(page, "01-desktop-track");
});
await test.step("ComposerPill shows error toast on rejection, enters pending busy state, and recovers", async () => {
await actionPill.click();
await expect(page.getByText("Action check failed", { exact: true })).toBeVisible();
await expect(actionPill).toBeEnabled();
await actionPill.click();
await expect(actionPill).toBeDisabled();
await expect(actionPill).toHaveAttribute("aria-busy", "true");
await qaScreenshot(page, "02-desktop-pill-pending");
await runCommand(page, "Finish check action");
await expect(actionPill).toBeEnabled();
await expect(actionPill).toContainText("Checks · 1");
});
await test.step("openPopover anchors above the pill on desktop, dismisses cleanly, and openScreen navigates", async () => {
await inboxPill.click();
const popoverTitle = page.getByText("Inbox decisions", { exact: true });
await expect(popoverTitle).toBeInViewport();
await expect(page.getByText("Presentation: wide", { exact: true })).toBeVisible();
await expect(
page.getByText(`Pill IDs: ${workspace.workspaceId} / ${agent.id}`, { exact: true }),
).toBeVisible();
await expectStill(popoverTitle);
const pillBox = (await inboxPill.boundingBox())!;
const popoverBox = (await page
.getByTestId(`plugin-composer-pill-${PLUGIN_ID}-inbox-popover`)
.boundingBox())!;
expect(popoverBox.y + popoverBox.height).toBeLessThanOrEqual(pillBox.y + 1);
expect(Math.abs(popoverBox.x - pillBox.x)).toBeLessThan(80);
await qaScreenshot(page, "03-desktop-popover");
await page.keyboard.press("Escape");
await expect(popoverTitle).toHaveCount(0);
await inboxPill.click();
await expect(popoverTitle).toBeVisible();
await page.getByRole("button", { name: "Open inbox screen", exact: true }).click();
await expect(popoverTitle).toHaveCount(0);
await expect(page.getByText(`Inbox screen for ${agent.id}`, { exact: true })).toBeVisible();
await page.getByTestId("plugin-surface-close").click();
await expect(inboxPill).toBeVisible();
});
await test.step("imperative PluginButtonStore fixes: same-Content popover stays open on update and dynamic menu IDs work", async () => {
const livePill = page.getByRole("button", { name: "Live popover", exact: true });
await livePill.click();
await expect(page.getByText("Live popover content", { exact: true })).toBeVisible();
await page.getByRole("button", { name: "Trigger live update", exact: true }).click();
await expect(livePill).toContainText("Live · 2");
await expect(page.getByText("Live popover content", { exact: true })).toBeVisible();
await page.getByRole("button", { name: "Close live popover", exact: true }).click();
await expect(page.getByText("Live popover content", { exact: true })).toHaveCount(0);
const menuPill = page.getByRole("button", { name: "Dynamic menu", exact: true });
await menuPill.click();
await page.getByRole("menuitem", { name: "Decision D42", exact: true }).click();
await expect(menuPill).toContainText("Picked D42");
});
await test.step("on compact layouts openPopover renders a bottom sheet and dismisses cleanly", async () => {
await page.setViewportSize(COMPACT);
await expect(inboxPill).toBeVisible();
await inboxPill.click();
const compactLabel = page.getByText("Presentation: compact", { exact: true });
await expect(compactLabel).toBeInViewport();
const sheetBox = (await compactLabel.boundingBox())!;
expect(sheetBox.y).toBeGreaterThan(COMPACT.height / 2);
await qaScreenshot(page, "04-compact-sheet");
await page.getByRole("button", { name: "Close inbox popover", exact: true }).click();
await expect(compactLabel).toHaveCount(0);
});
await test.step("tall raw-canvas popover caps at <= 440px on desktop and <= 80% on compact sheet with pinned header/footer and scrolling body", async () => {
const tallPill = page.getByRole("button", { name: "All decisions", exact: true });
await page.setViewportSize(WIDE);
await expect(tallPill).toBeVisible();
await tallPill.click();
await expectPinnedScrollableDesktopPopover(page, PLUGIN_ID);
await qaScreenshot(page, "05-desktop-tall-popover");
await page.getByRole("button", { name: "Submit decisions", exact: true }).click();
await expect(page.getByTestId("tall-popover-header")).toHaveCount(0);
await page.setViewportSize(COMPACT);
await tallPill.click();
await expectPinnedScrollableCompactSheet(page, PLUGIN_ID);
await qaScreenshot(page, "06-compact-tall-sheet");
await page.getByRole("button", { name: "Submit decisions", exact: true }).click();
await expect(page.getByTestId("tall-popover-header")).toHaveCount(0);
});
await test.step("compact raw-canvas sheet preserves plugin state when revealing a ScrollView via user action", async () => {
await page.setViewportSize(COMPACT);
await expectRevealedScrollerPreservesCompactState(page, PLUGIN_ID);
});
await test.step("compact raw-canvas sheet hugs a fixed-height ScrollView without expanding to 80%", async () => {
await page.setViewportSize(COMPACT);
await expectCompactSheetHugsFixedScrollPopover(page, PLUGIN_ID);
});
} finally {
await client.removePlugin(PLUGIN_ID).catch(() => undefined);
await client.patchDaemonConfig({ pluginsEnabled: config.config.pluginsEnabled });
await client.close();
await rm(directory, { recursive: true, force: true });
await workspace.cleanup();
}
});
@@ -7,6 +7,7 @@ import {
withPluginFocusingAnAgentWithContextUsage,
withPluginHoldingNewWorkspaceComposer,
withPluginWritingToAnotherWorkspace,
withPluginSettingsFromComposer,
} from "../support/helpers/plugin-composers-by-reference";
test("a panel in the Explorer inserts at the cursor of the focused agent's composer", async ({
@@ -221,3 +222,26 @@ test("focus reaches an agent kept in the Explorer on a compact screen", async ({
await author.expectParentReadyToType();
});
});
test("Settings accepts clicks after a composer plugin closes its dialog and navigates", async ({
page,
}) => {
test.setTimeout(120_000);
await withPluginSettingsFromComposer(page, { width: 1280, height: 800 }, async (flow) => {
await flow.openPluginDialog();
await flow.openSettingsFromPlugin();
await flow.changeSetting();
await flow.returnToChat();
});
});
test("Settings accepts clicks after navigation from the compact model sheet", async ({ page }) => {
test.setTimeout(120_000);
await withPluginSettingsFromComposer(page, { width: 430, height: 900 }, async (flow) => {
await flow.openModelSheet();
await flow.openPluginDialog();
await flow.openSettingsFromPlugin();
await flow.changeSetting();
await flow.returnToChat();
});
});
@@ -13,6 +13,7 @@ import {
openFromInstalledTab,
openListingPage,
uninstallFromPage,
verifyLocalizedMediaInDirectory,
} from "../support/helpers/plugin-directory";
test("installs a listed plugin from Browse and uninstalls it from either of its pages", async ({
@@ -170,3 +171,11 @@ test("opens plugin pages without empty markdown collapse, stacked back flash, or
await expectStableDesktopBackToListing(page);
await expectStackedFirstFrameOnNarrowDesktop(page);
});
test("shows localized featured card and detail screenshots when the app language changes", async ({
page,
directoryHost,
}) => {
await page.setViewportSize({ width: 1280, height: 960 });
await verifyLocalizedMediaInDirectory(page, directoryHost);
});
@@ -27,7 +27,10 @@ import {
} from "@getpaseo/plugin/client";
import { useQueryClient } from "@tanstack/react-query";
import { DocumentFrame, Loading } from "@getpaseo/plugin/client/ui";
function Pdf({ file, workspaceId }) {
function FileDetailsScreen({ params }) {
return <View><Text>File screen: {params.file}</Text></View>;
}
function Pdf({ file, workspaceId, openScreen }) {
usePaseo();
useQueryClient();
const workspace = useWorkspace(workspaceId, value => ({ id: value.id }));
@@ -44,6 +47,9 @@ function Pdf({ file, workspaceId }) {
<Text>Path {file.path}</Text>
<Text>Bytes {bytes.bytes.length}; URL bytes {urlBytes}</Text>
<Text>Workspace {workspace?.id}</Text>
<Pressable accessibilityRole="button" onPress={() => openScreen({ screenId: "details", params: { file: file.name } })}>
<Text>Open screen from file panel</Text>
</Pressable>
<DocumentFrame url={href} testID="plugin-pdf-frame" />
</View>;
}
@@ -69,6 +75,7 @@ function Markdown({ file, tab }) {
</View>;
}
export default function contribute(client) {
client.addScreen({ id: "details", title: "File details", Component: FileDetailsScreen });
client.addFilePanel({ id: "pdf", title: "PDF", icon: "FileText",
files: { extensions: ["pdf", "txt"] }, Component: Pdf });
client.addFilePanel({ id: "markdown", title: "Plugin Markdown", icon: "FileText",
@@ -92,6 +99,16 @@ async function associateMarkdownWithPlugin(page: Page) {
async function editMarkdownThroughPlugin(page: Page) {
await page.getByRole("button", { name: "Edit Markdown through plugin", exact: true }).click();
}
async function openFileDetailsScreenFromPanel(page: Page, name: string) {
await page.getByRole("button", { name: "Open screen from file panel", exact: true }).click();
await expect(page).toHaveURL(
new RegExp(`/plugin/${PLUGIN_ID}/surface/details\\?param\\.file=${encodeURIComponent(name)}$`),
);
await expect(page.getByText(`File screen: ${name}`, { exact: true })).toBeVisible();
await page.getByTestId("plugin-surface-close").click();
await expect(page.getByText(`PDF plugin: ${name}`, { exact: true })).toBeVisible();
}
/** Opens the tab with Paseo's Markdown panel from "Open with…" and shows its Source view. */
async function openBuiltinMarkdownSource(page: Page, name: string) {
await page.getByTestId(`workspace-tab-file_${name}`).first().click({ button: "right" });
@@ -152,6 +169,7 @@ test("directory plugins render PDF bytes and write Markdown through the file han
const pdfScreenshot = testInfo.outputPath("plugin-pdf-web.png");
await page.screenshot({ path: pdfScreenshot });
await testInfo.attach("plugin-pdf-web", { path: pdfScreenshot, contentType: "image/png" });
await openFileDetailsScreenFromPanel(page, "report.pdf");
// A plugin panel claiming a text file competes with Source, so Paseo asks over the plugin.
await openWorkspaceFile(page, "bytes.txt");
@@ -12,6 +12,7 @@ import { buildOpenProjectRoute } from "@/utils/host-routes";
import { expect, test as base, type Page } from "../support/fixtures";
import { gotoAppShell, openSettings } from "../support/helpers/app";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
import { createWsTextFrameDecoder, parseWsJsonFrame } from "../support/helpers/ws-frames";
import { getServerId } from "../support/helpers/server-id";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
import { waitForSettledPosition } from "../support/helpers/sheet-layout";
@@ -129,18 +130,22 @@ async function advertisePluginCapabilities(
const server = browser.connectToServer();
browser.onMessage((message) => server.send(message));
server.onMessage((message) => {
if (typeof message !== "string") {
browser.send(message);
return;
}
const envelope = JSON.parse(message);
const envelope = parseWsJsonFrame<{
message?: {
type?: unknown;
payload?: { status?: unknown; features?: Record<string, unknown> };
};
}>(message);
if (
envelope.message?.type === "status" &&
envelope.message.payload?.status === "server_info"
envelope?.message?.type === "status" &&
envelope.message.payload?.status === "server_info" &&
envelope.message.payload.features
) {
Object.assign(envelope.message.payload.features, features);
browser.send(JSON.stringify(envelope));
return;
}
browser.send(JSON.stringify(envelope));
browser.send(message);
});
});
}
@@ -148,10 +153,12 @@ async function advertisePluginCapabilities(
function observePluginCatalog(page: Page) {
let responses = 0;
page.on("websocket", (socket) => {
const decode = createWsTextFrameDecoder();
socket.on("framereceived", ({ payload }) => {
if (typeof payload !== "string") return;
const text = decode(payload);
if (text === null) return;
try {
const envelope = JSON.parse(payload) as {
const envelope = JSON.parse(text) as {
type?: unknown;
message?: { type?: unknown };
};
@@ -690,16 +697,20 @@ async function updateGitPlugin(page: Page, repository: string) {
async function failUpdateFromPluginPage(page: Page, repository: string) {
await publishGitPluginChange(repository, "Git plugin v3");
await page.reload();
const update = page.getByTestId("plugin-update").filter({ visible: true });
await expect(update).toHaveText("Update");
// Rewriting the commit the page checked leaves its update pointing at a commit the remote no
// longer serves. The next check offers the rewritten commit.
const update = page.getByRole("button", { name: "Update", exact: true });
await expect(update).toBeVisible();
// Remove the advertised commit from the fixture. A file:// remote can still serve an
// amended-away commit by SHA while its object remains in the repository.
execFileSync("git", ["commit", "--amend", "-m", "Git plugin v3, amended"], {
cwd: repository,
stdio: "ignore",
});
execFileSync("git", ["-c", "gc.reflogExpireUnreachable=now", "gc", "--prune=now"], {
cwd: repository,
stdio: "ignore",
});
await update.click();
await expect(update).toHaveText("Retry");
await expect(page.getByRole("button", { name: "Retry", exact: true })).toBeVisible();
await expect(page.getByText(/Git command failed/)).toBeVisible();
}
@@ -816,15 +827,11 @@ async function installPluginWithUntrustedDescription(
function observePluginReload(page: Page) {
const requests: number[] = [];
const responses: number[] = [];
const isSessionMessage = (payload: unknown, type: string): boolean => {
if (typeof payload !== "string") return false;
try {
const envelope = JSON.parse(payload) as { type?: unknown; message?: { type?: unknown } };
const message = envelope.type === "session" ? envelope.message : envelope;
return message?.type === type;
} catch {
return false;
}
const isSessionMessage = (payload: string | Buffer, type: string): boolean => {
const envelope = parseWsJsonFrame<{ type?: unknown; message?: { type?: unknown } }>(payload);
if (!envelope) return false;
const message = envelope.type === "session" ? envelope.message : envelope;
return message?.type === type;
};
page.on("websocket", (socket) => {
// The reload request travels client -> daemon (outbound); the answer comes back inbound.

Some files were not shown because too many files have changed in this diff Show More