Compare commits

...
Author SHA1 Message Date
paseo-bot[bot]andClaude Opus 5.5 e6390a85d1 Let idle cleanup unload an OpenCode chat while another session runs
The v2 runtime safety check vetoed collection whenever any session on
the server was active. The shared server stays up after its last lease
goes, so that veto kept every idle chat resident while one unrelated
session worked. Another session's execution now vetoes only when
releasing the lease would stop the server; the chat's own session and
its descendants still veto as before.

Fixes #10305

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 10:14:41 +00:00
paseo-ai[bot] d4fd6dcafd fix: update lockfile signatures and Nix hash [skip ci] 2026-11-27 10:13:16 +00:00
Mohamed Boudra 518e58cd63 chore(release): reconcile v0.18.0 (#11030) 2026-11-27 17:04:04 +07:00
paseo-bot[bot]andbenthecarman 82dcf7821e fix(usage): load Kimi usage for global logins (#8505)
* Find Kimi usage for logins to kimi.ai

The Kimi CLI keeps one credential slot per deployment. A login to the
global (kimi.ai) deployment writes its token to
credentials/kimi-code-env-<hash>.json and talks to api.kimi.ai, but the
usage source only read credentials/kimi-code.json and only called
api.kimi.com. Users signed in through kimi.ai saw no Kimi usage, or a
"Login expired. Sign in again." message when an old kimi-code.json from
an earlier login was still on disk.

Discovery now checks the slots of both official deployments and picks
the one with the latest expiry, which is the slot the CLI keeps
refreshing. The usage request goes to the API of that deployment.

Kimi access tokens last 15 minutes, so a CLI token is often expired
while the user is still signed in. Report those with refreshedBy so the
Usage page says to run kimi instead of asking for a new sign-in.

* fix(usage): preserve the selected Kimi credential home

Compare deployment credentials within each home so a newer legacy-home
login cannot override KIMI_CODE_HOME. Cover the expired-default plus live
global workflow through discovery and usage fetching.

Co-authored-by: benthecarman <benthecarman@live.com>

---------

Co-authored-by: benthecarman <benthecarman@live.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-27 09:50:43 +00:00
Mohamed Boudra 5d003d9613 test(cli): report version from fake ACP provider helper (#11032)
antigravity-provider status() now runs --version and requires >= 1.5.1 (#10992). Without a --version handler, supervisor-acp.cjs exited with empty stdout on the version probe and broke 23-daemon-sigint-supervisor.test.ts at createAgent().
2026-11-27 16:36:42 +07:00
paseo-bot[bot]andpeanut_hzm 9868ebc11c fix(usage): discover the GLM Agent login for its Usage card (#8376)
* fix(usage): follow the CLIs' current auth locations for MiniMax and Z.ai

The usage sources look for credentials where the CLIs used to keep them, so
their plan quota never appears in Settings → Usage.

MiniMax Code (`mcode`) moved its OAuth login to
`~/.minimax/auth/<buildEnv>/<region>/<clientId>/auth.json`, with the token
inside a `records` map and the region in a sibling `auth-state.json`. The
source still looked in `~/.mmx/` for the older `access_token` shape. It also
called `/v1/token_plan/remains`, which the agent backend answers with
`status_code 1004` ("Please carry the API secret key in the 'Authorization'
field"); the coding-plan endpoint the CLI itself uses is
`/v1/api/openplatform/coding_plan/remains`.

Z.ai's `glm-acp-agent` reads `Z_AI_API_KEY` and persists it to
`~/.config/glm-acp-agent/credentials.json` as `z_ai_api_key`. The source
looked for `ZAI_API_KEY` and `GLM_API_KEY` only, and never read the
credentials file.

Both keep their existing lookups working, so a configured environment
variable or the older `~/.mmx/` layout still resolves.

* fix(usage): narrow credential discovery repair to the verified GLM path

Keep the independently reproduced GLM discovery fix and isolate its file test from inherited XDG_CONFIG_HOME. Leave MiniMax quota routing for separate verification before changing existing API-key requests.

Co-authored-by: peanut_hzm <peanut_hzm@163.com>

* test(usage): isolate the legacy login locator from inherited credentials

---------

Co-authored-by: peanut_hzm <peanut_hzm@163.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-27 09:21:16 +00:00
965e28e3d6 feat(highlight): add diff/patch and zero-dependency legacy-mode syntax highlighting (#11026)
* feat(highlight): highlight diff and patch fences and files

Register CodeMirror's legacy diff mode for .diff and .patch files and diff/patch code fences, mapping inserted/deleted tokens to diffAddition/diffDeletion roles and stripping legacy trailing-whitespace error prefixes so CodeMirror emits no unknown-tag warnings.

Co-authored-by: Hyacinthe Malaspina <malaspina.hyacinthe@gmail.com>

* feat(highlight): add Ruby syntax highlighting

Register @codemirror/legacy-modes ruby via StreamLanguage for rb, rbw, rake,
gemspec, ru, jbuilder, podspec and thor, plus extensionless Ruby files
(Gemfile, Rakefile, Guardfile, Capfile, Podfile, Vagrantfile, ...).

* feat(highlight): add Kotlin syntax highlighting for .kt/.kts files

Kotlin files previously rendered as plain text in diffs, the read-only
source panel, and the editor because the extension map in
@getpaseo/highlight had no entry for kt/kts. Register the kotlin stream
parser from @codemirror/legacy-modes/mode/clike, the same package already
used for Swift and Dart.

* test(highlight): assert Kotlin token styles in highlightCode

Follow-up to review feedback: the parsers tests only checked that
kt/kts are registered. Add a Kotlin case to the highlightCode suite,
mirroring the Swift and Dart cases, asserting keyword ('class', 'val'),
type ('String'), and string token styles. Fails on main without the
parser registration, passes with it.

* feat(highlight): add TOML syntax highlighting

* feat(highlight): add remaining legacy-mode languages and fence aliases

Register SQL, Lua, Protobuf, PowerShell, Groovy/Gradle, Scala, CMake (including CMakeLists.txt), Properties/INI, R, Perl, and LaTeX/TeX from @codemirror/legacy-modes, and add fence alias parity (including shell, ruby, kotlin, powershell/pwsh, protobuf, perl, and latex) in HighlightedCodeBlock.

Co-authored-by: Maxime Conan <maximeconan@MacBook-Pro-de-Maxime.local>

* fix(highlight): unify diff token colors and support binary diff frames

Append diffAddition and diffDeletion to DIFF_HIGHLIGHT_STYLES so Changes panel binary diff frames preserve diff colors for .diff/.patch files while older clients safely decode unknown indices as null. Unify syntaxTokenStyles onto theme.colors.syntax and tune light syntax theme diff colors to >=4.0:1 contrast on code surfaces.

---------

Co-authored-by: Hyacinthe Malaspina <malaspina.hyacinthe@gmail.com>
Co-authored-by: Karol Bąk <kukicola@gmail.com>
Co-authored-by: Anton Prokhorov <anton.prokhorov@jetbrains.com>
Co-authored-by: chandlerok <chandleroking@gmail.com>
Co-authored-by: Maxime Conan <maximeconan@MacBook-Pro-de-Maxime.local>
2026-11-27 15:31:57 +07:00
Mohamed Boudra 690f6970c3 fix(app): focus composer when dropping attachments (#11022)
Workspace file drops already called focusInput(), but raster image drops went directly to addImages() and generic file drops only uploaded without focusing. Focus the composer when dropped images attach and as soon as dropped files are accepted for upload, so users can type right away without waiting for uploads to finish.
2026-11-27 14:33:30 +07:00
paseo-bot[bot] bcb0097344 test(terminal): accept socket-overflow output that arrives after the replay (#11016)
The PTY child finishing its write does not mean the worker has parsed those
bytes. On Windows, ConPTY renders before the worker reads, so the reconnect
snapshot can be cut before the last marker; that marker then reaches the
viewer as live output. Wait for it across the replay and the live output
that follows the replay end.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-27 06:59:00 +00:00
Mohamed Boudra 9eab3b278f Stop client plugins from crashing iOS when importing react-native (#11011)
* fix(plugins): prevent iOS PushNotificationIOS crash when plugins import react-native

Filter unsupported throwing getters (PushNotificationIOS, AsyncStorage, ImagePickerIOS, ProgressViewIOS, DatePickerIOS, Slider) and raw default from the react-native runtime exposed to client plugins, while preserving lazy property descriptors on safe exports.

Also replace eager Hermes CommonJS interop evaluation (value: from[key]) with per-key lazy getter closures (get: ((k) => () => from[k])(key)) in the server plugin compiler so namespace imports no longer evaluate unrelated host module getters.

Closes #10978

* fix(plugins): allowlist safe react-native exports for client plugins

Replace the react-native denylist in evaluate.ts with an explicit allowlist of cross-platform UI, layout, and animation exports (PLUGIN_REACT_NATIVE_EXPORTS) while preserving lazy property descriptors.

Add a wiring test verifying require('react-native') returns the allowlisted runtime object rather than the raw ReactNative namespace, plus a contract test verifying every allowlisted key exists as a non-deprecated, non-throwing getter in react-native/index.js.

* fix(plugins): retain SafeAreaView and InteractionManager in react-native allowlist

Keep SafeAreaView and InteractionManager in PLUGIN_REACT_NATIVE_EXPORTS so existing published plugins that import them from react-native (e.g. SafeAreaView insets and InteractionManager.runAfterInteractions) keep working on iOS, Android, and web. Both exports are safe cross-platform getters on iOS and react-native-web and remain lazy under the compiler's per-key getter interop.

Also harden the react-native/index.js getter contract test to assert the parser matched getters and that PushNotificationIOS stays excluded.

* fix(plugins): omit only PushNotificationIOS and default from plugin react-native runtime

Replace the 46-key react-native allowlist with copying all own enumerable descriptors from Object.keys(source) lazily while skipping only PushNotificationIOS and default. An audit of published plugins showed 14 plugins rely on react-native exports outside the allowlist (TurboModuleRegistry, NativeModules, UIManager, DeviceEventEmitter, AppRegistry, Clipboard, Settings, and RN-web render).

Keep the lazy per-key Hermes interop fix in compiler-build.ts, the require('react-native') wiring test, and the react-native/index.js enumerable getter contract test.
2026-11-27 13:49:51 +07:00
Mohamed Boudra fcfcdf156a Make ACP catalog probing respectful and clean up Antigravity ACP hygiene (#10992)
* feat(acp): make ACP catalog probing respectful and clean up Antigravity ACP hygiene

* fix(acp): address Windows CI failures and paseo-bot review findings

* refactor(acp): remove manual catalog mode and use on_demand for Antigravity

* fix(server): share Windows WinGet candidate resolution when findExecutable skips probing

* test(server): compare Windows PATHEXT casing case-insensitively in executable-resolution test
2026-11-27 13:29:55 +07:00
Mohamed Boudra 15390b7168 Stop OpenCode v2 turns reliably across missed events and large histories (#10955)
* fix(opencode): settle v2 turns from persisted session state and decouple stop from full history

OpenCode v2 disables durable event log persistence by default, so GET /api/experimental/session/:id/log returns only log.synced on live servers. Any missed terminal SSE event left SessionTurns unable to settle while the OpenCode server reported the session idle, causing Stop, send, reload, and rewind to fail with active run cancellation was not acknowledged.

In addition, SessionTurns.interrupt() awaited a full-history order=asc reconcileSnapshot() before releasing turn completion, exceeding AgentManager's cancel timeout on large sessions even when OpenCode stopped within milliseconds, and OpenCodeV2Session.consume() awaited HTTP reconciliations inside the SSE loop.

Reconcile missed terminal outcomes from OpenCode's persisted SessionInfo (outcome, time.idle, time.busy) and tail failure messages while keeping shutdown-resumable turns alive, settle interrupted and failed turns without blocking on history reload, switch live parent and child syncs to bounded descending tail reads, move reconnect and child reconciliations off the SSE reader loop, and add a 45s silent-stream reconnect watchdog.

* fix(opencode): settle unfinalized turns on Stop, bound poll, and clean up child queue

* fix(opencode): flush tail snapshot before turn_canceled and preserve tool turnId
2026-11-27 12:49:12 +07:00
Mohamed Boudra 539f4af006 Allow agent profiles to set a system prompt (#10996)
* feat(agent-profiles): allow profiles to set a system prompt

Agent profiles can now store an optional creation-only systemPrompt field, surfaced in the profile editor with micro copy clarifying that it applies to new agents only.

Applying a profile in a draft composer passes systemPrompt into the created agent config without persisting it to FormPreferences, and clears it if the user later picks a raw model or another profile without one. Applying a profile to a running agent continues to omit systemPrompt.

Also exposes settings.systemPrompt on the create_agent MCP tool so orchestrating agents can forward a profile's systemPrompt from list_profiles, and adds a one-sentence description under the Agent profiles settings heading.

* fix(agent-profiles): preserve stored systemPrompt on older client edits

Match the existing options compatibility rule with a dated COMPAT(agentProfileSystemPrompt) shim: the daemon preserves a profile's stored systemPrompt when a client write omits the key, while newer clients always send systemPrompt (empty string clears it and omits the key on disk).
2026-11-27 12:34:05 +07:00
Mohamed Boudra fbda126f42 Show Encore as a Paseo sponsor on the website and READMEs (#10764)
* feat(website): add Encore as a company sponsor

Encore's wordmark is bolder than Hoplite's lockup, so its SVGs pad the
official paths into a box that puts the "E" mark at the Hoplite mascot's
height on a shared baseline. Captions now wrap at 18rem and the row aligns
to the top, so a sponsor's sentence-length tagline wraps under its logo
instead of pushing other logos and the invitation onto new rows.

* docs(readme): top-align the sponsors row

Table cells center vertically by default, so a sponsor with a two-line caption sat higher than its neighbours. Top alignment keeps the logos level.
2026-11-27 11:29:25 +07:00
Mohamed BoudraandAiron 6d2db423d8 Route remote workspace browser tabs through the workspace daemon (#10944)
Reverts 4fd21252a to re-apply 63eb8c0de with co-author attribution for #6534.

Co-authored-by: Airon <airon.teixeira@assustadus.tech>
2026-11-27 04:55:15 +01:00
Mohamed Boudra 4fd21252af Revert "Route remote workspace browser tabs through the workspace daemon (#10944)"
This reverts commit 63eb8c0dec.
2026-11-27 04:55:15 +01:00
Mohamed Boudra 63eb8c0dec Route remote workspace browser tabs through the workspace daemon (#10944)
* feat(network-tunnel): add daemon binary TCP stream tunnel protocol and server

Adds the reusable multiplexed TCP stream tunnel primitive so desktop and future clients can proxy traffic through a remote daemon over a dedicated secondary binary WebSocket (direct TCP, SSH, or E2EE relay) without stalling control or terminal frames on the primary session.

- Dedicated secondary sockets authenticate with a single-use, 30s-TTL ticket minted on an authorized control session (workspace.write) and detach from WebSocketServer before entering binary mode so they never create a Session or receive control broadcasts.
- Destination policy resolves DNS once, fails closed if any record points to cloud metadata or link-local ranges (including IPv4-mapped IPv6), and dials the validated IP directly to prevent DNS rebinding while permitting loopback services.
- Stream and connection credit windows drive real TCP pause/resume and drain backpressure, refunding connection credit on abrupt stream close.

* feat(browser-proxy): route remote workspace browser tabs through host tunnel

Electron main keeps one fixed-port loopback SOCKS5 server per remote host behind an OS socket-owner check so Chromium's per-host partition (persist:paseo-browser-host-<hash>) never has to retarget proxy rules across tunnel reconnects, while the pooled binary WebSocket reconnects underneath.

Remote browser tabs fail closed and stay unmounted until Electron verifies session.resolveProxy(...) or the user explicitly switches to Local, preventing localhost requests on remote workspaces from silently hitting the local machine. Popups inherit the opener's session and proxied guests disable non-proxied WebRTC UDP so OAuth callbacks and media traffic stay isolated to the host partition.

* fix(browser-proxy): preserve tabs on reconnect, add tunnel liveness, warm win32 worker, reuse ssh proxy

Addresses review findings on PR #10944:
- Keep already-prepared host-routed webviews mounted with reconnecting status during transient host disconnects/reconnects instead of destroying the guest, and force-reconnect the pooled tunnel when the control connection comes back online.
- Add periodic client binary ping/pong heartbeats (15s ping / 30s silence timeout + dead-wire close on silent openStream timeout) and a 45s daemon TunnelSession liveness timeout so half-open tunnels recover and tear down upstream TCP sockets.
- Replace per-connection powershell.exe spawns on Windows with one persistent warm PowerShell worker caching PID owner checks for 10s, disposed cleanly on shutdown.
- Extract createSshProxy into packages/desktop/src/daemon/ssh-proxy.ts and share it between local-transport and browser-proxy.

* fix(browser-proxy): keep prepared host partition mounted across cached reconnect errors

* fix(browser-proxy): derive prepared routing pill status solely from live snapshot

* feat(browser-proxy): use compact host icon button with status dot in browser toolbar

* chore(i18n): remove unused workspace.browser.routing.local key
2026-11-27 10:50:04 +07:00
paseo-bot[bot]andClaude Opus 5.5 294093e8b9 fix(server): fetch a pull request from the remote of the repository it belongs to (#10987)
In a fork clone, origin is the fork and upstream is the base repository.
The GitHub service looked the pull request up in the base repository but
fetched refs/pull/N/head from origin first. When the fork had its own
pull request with the same number, that fetch succeeded, so the workspace
got the base pull request's branch name and the fork's commits.

The checkout refs now name only the remotes whose URL points at the
repository the pull request was looked up in. Without such a remote,
origin and then upstream are tried, as before.

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-11-27 03:49:35 +00:00
paseo-ai[bot] bb0588ecb0 fix: update lockfile signatures and Nix hash [skip ci] 2026-11-27 03:10:48 +00:00
Mohamed Boudra c7ad1dae52 chore(release): reconcile v0.17.6 (#10983) 2026-11-27 10:00:34 +07:00
lukeandRoundRedDot 39410ae7d0 fix(antigravity): remove the account usage source (#10953)
The usage source ran `agy -p /usage` in the background on behalf of the
user. Google's Antigravity FAQ says headless mode is intended for direct
scripting and CI, and that wrapping agy inside third-party applications is
not supported on consumer plans and can lead to account suspension. A
maintainer reply in google-antigravity/antigravity-cli#1493 confirms that
driving `agy -p` from a third-party harness breaches the terms, with no
exception for personal use.

Remove the Antigravity usage source so Paseo no longer runs agy in headless
mode. The provider and the generic usage-source launch plumbing, used by
other plugins, are unchanged.

Co-authored-by: RoundRedDot <roundreddot@gmail.com>
2026-11-27 09:12:14 +07:00
paseo-bot[bot]andClaude Opus 5.5 e6f0ad272d Fix two model picker bugs that lost a click or an Enter (#10962)
* fix(app): keep a pressed model row under the pointer

Pressing a model row focuses it. The row's focus handler marked it as the
keyboard-active row, and the list then scrolled that row into view. When
the list had not yet reported which rows it shows, as on a slow machine
right after a provider opens, it centered the row. The row moved before
the button came up, and the click selected nothing.

Only keyboard focus (:focus-visible on web) now marks a row active, so a
press never scrolls the list.

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

* fix(app): keep model search focused when the model list scrolls on web

React Native Web blurs the focused input on every scroll when
keyboardDismissMode is on-drag. The reveal scroll after ArrowDown, or a
wheel scroll, moved focus out of the search field, and the sheet focus
trap put it on the Back button, so Enter went back instead of selecting.

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-11-27 08:55:14 +07:00
paseo-bot[bot]andviiqswim 02e4b8e3e9 fix(pi): steer a run Pi started by itself instead of aborting it (#10977)
A run that Pi starts without a Paseo prompt (an extension message, a
process exit notice, an answered ask) had no turn id in the Pi session.
The agent manager gave it a synthetic id and steered with that id. The
Pi session compared the id with its own null id, refused the steer, and
the manager fell back to clear_queue + abort + prompt. So a message sent
with activeTurnBehavior "steer" aborted the running work.

The Pi session now names a self-started run with its own autonomous id,
reports it on turn_started, and accepts a steer for that id. Stop and
process exit use the same id, so their terminal events still match the
run. An idle agent still refuses the steer and gets a new run.

Fixes #10733

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: viiqswim <2517461+viiqswim@users.noreply.github.com>
2026-11-27 01:50:38 +00:00
paseo-bot[bot]andMohamed Boudra 203398fa44 fix(markdown): set HeaderCopyButton contentDescription without overriding View getter (#10964)
Fixes #10934 and #10968. Removes the HeaderCopyButton.getContentDescription() override completely so AppCompatImageButton.<init> (and Samsung One UI's View.semSetHoverPopupType) never dispatches into uninitialized subclass fields, and sets View.contentDescription directly with recursive sync on copyLabel updates.

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-11-27 08:50:00 +07:00
paseo-bot[bot] 21c2e55dd1 fix(android): let a mouse click select model picker rows (#10972)
On Android, a mouse sends a click as DOWN, BUTTON_PRESS, BUTTON_RELEASE and UP.
Gesture handler's Tap ignores DOWN and UP from a mouse and waits for the BUTTON
events. Android delivers those through dispatchGenericMotionEvent, and
RNGestureHandlerRootView forwarded only hover events from there. A mouse click
on a Gesture.Tap row, such as a provider or model row in the wide model
picker, never fired.

Backport upstream react-native-gesture-handler#4265 (2.33.0) into the 2.32.0
patch: forward BUTTON_PRESS and BUTTON_RELEASE to the orchestrator, and start
the LongPress timer on BUTTON_PRESS.

Fixes #10744

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-27 01:06:31 +00:00
paseo-bot[bot]andGtio 74c33b03d3 fix(app): keep a tab from saving a directory another tab evicted (#10942)
Each browser tab runs its own replica cache over one shared IndexedDB
database. When one tab ran over the 32 MiB budget it deleted a host's
rows, but only that tab knew. Another open tab kept writing workspace
and agent updates with its old checkpoint, so the database ended up with
a projects cursor and no project rows. A new tab trusted that cursor,
the daemon answered "no changes", and the sidebar showed no projects or
workspaces for the host.

The IndexedDB store now keeps a revision on each host's checkpoint. A
tab may write directory rows only while the stored revision matches the
one it last read or wrote, checked in the same transaction as the write.
Each write rotates the revision. A tab whose host was evicted or
rewritten by another tab has its directory writes dropped until a full
refresh replaces the baseline. Timeline writes are not affected.
Malformed-row repairs go through the same check.

Version 2 checkpoints could have been written by the cross-tab path, so
the checkpoint version moves to 3 and existing caches re-sync their
directory once.

Fixes #10206

Co-authored-by: Gtio <gtoxlili@outlook.com>
2026-11-26 18:55:57 +00:00
Mohamed Boudra e4dc119df8 Reorganize Settings by device vs. host scope and consolidate sparse sections (#10933)
* feat(app): split client and host settings and consolidate sections

Previously, client-local host configuration (connection routes, sidebar appearance, removing a host from this device) lived under Host settings alongside daemon-owned configuration, while agent prompts, tools, skills, and lifecycle toggles were split across overlapping sections and several single-row app settings had standalone sidebar pages.

Separate Settings strictly by ownership:
- 'This device' owns client-local preferences plus a new 'Hosts' page (/settings/hosts and /settings/device-hosts/[serverId]) for saved hosts, connection routes, local sidebar appearance, and removing a host from this device.
- 'Host' owns daemon-scoped settings only: 'Tools & prompts' combines system prompt, Paseo/browser tools, and Paseo skills; 'Workspaces' combines auto-archive and metadata generation while 'Projects' stays dedicated to the project list; 'Daemon' owns daemon status, updates, agent runtime lifecycle (resume after restart, release idle agents), and restart.
- Collapse sparse app sections into General (+ CLI), Chat & panes (+ sending, open location, editor, terminal, conditional files, browser data), Notifications & access (+ permissions), and About (+ diagnostics), while keeping redirects for all legacy settings routes.

* fix(app): restore offline Workspaces card, prune unused wrappers, and update docs

* docs: update Settings paths across EN and zh-CN docs

* test(e2e): update remaining app and desktop settings section selectors

* test(desktop): update Settings destination labels in memory regression check
2026-11-26 21:48:49 +07:00
Mohamed Boudra 903b71180f fix(desktop): avoid macOS Dock progress bar freeze and harden release smoke (#10939) 2026-11-26 21:46:38 +07:00
paseo-bot[bot]andClaude Opus 5.5 4201a4de35 fix(server): keep worktree ownership inside the configured worktrees root (#10878)
When a worktree directory is gone, the marker search walks up from its
path and stops at the first Paseo worktree above it. If the daemon home
lives inside another Paseo worktree, that search found the enclosing
worktree and reported it as the owner. Legacy restore then ran
`git worktree add` on the enclosing path and failed with "already
exists", and deleting the missing worktree removed the enclosing one.

A Paseo worktree that holds the worktrees root owns none of the
worktrees beneath it, so the marker search now ignores it and the path
under the worktrees root decides ownership.

Closes #10745

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-11-26 12:53:00 +00:00
Mohamed Boudra 3c0553d9db Add per-device notification preferences and plugin notification API (#10888)
* feat(push): filter daemon push notifications per device token preferences

Persist per-token notification preferences alongside push token leases and filter agent, terminal, and plugin push deliveries per device. Agent error attention is now push-eligible and governed by per-device preferences instead of hardcoded off, while default preferences suppress finished turn pushes and keep permission, error, terminal needs-input, and plugin notifications active.

* feat(app): add cross-platform notification preferences UI and client filtering

Persist per-device NotificationPreferences in AppSettings, sync preferences with mobile push token registrations on capable hosts, filter desktop and web OS notifications locally (allowing error notifications by default and suppressing finished turns until enabled), and expose Settings -> Notifications across desktop, web, iOS, and Android with per-plugin mute switches covering both client and server-only plugins.

* feat(plugins): add plugin notification send API and tap routing

Expose server.notifications.send and client.onNotificationOpen in @getpaseo/plugin so server plugins can deliver deduplicated, rate-limited notifications through Paseo's session and Expo push pipeline while honoring per-device notification preferences and per-plugin mute switches. Tapping a plugin notification waits for the host's plugin catalog on cold launch before running client.onNotificationOpen or falling back to declarative agent, workspace, or screen open targets.

* docs(plugins): add Chinese translation for notifications reference

* fix(plugins): keep catalog loading before server_info and simplify push seams

* fix(plugins): align notifications example Paseo requirement with current daemon version

* fix: harden notification preferences compatibility and plugin notifications

- Preserve legacy push filtering for mobile push tokens registered without explicit preferences so older mobile apps keep receiving agent finished pushes (tagged COMPAT(pushNotificationPreferences))
- Truncate over-limit plugin notification title (160 chars) and body (500 chars) instead of rejecting, and bound declarative open target IDs and serialized size
- Skip subscribing native mobile sessions to plugin.notification so active phones do not suppress their own Expo push alerts
- Restore >=0.18.0-beta.1 Paseo version requirement on plugin-examples/notifications and test against 0.18.0-beta.1 in runtime.posix.test.ts
- Fall back to declarative open when every client.onNotificationOpen handler throws, keep host notification taps on router.navigate, deduplicate PluginHostNavigationActions in @getpaseo/plugin, and strengthen the muted-plugin browser E2E check

* test(server): pass explicit default preferences in websocket push filter tests
2026-11-26 19:33:28 +07:00
Mohamed Boudra 2be71aedcb Eliminate flashes and show unarchiving state when restoring archived workspaces and agents (#10928)
* fix(workspace): eliminate flashes and show unarchiving state on restore

Unarchiving a workspace previously broadcast workspace_update before its archived agents finished unarchiving, emitted spurious agent_update(remove) deltas for archived agents, and dropped the Restoring screen before tabs and chat timelines settled—causing the archived-agent callout and multiple loading spinners to flash before the chat stabilized.

Defer workspace publication with token-scoped holds until workspace-archived agents finish unarchiving and their agent_update messages flush; track positive directory membership in AgentUpdatesService and suppress intermediate close broadcasts during unarchiveSnapshot; hold the Restoring overlay in an isolated stacking context until auto-open agent tabs and visible agent timelines settle; keep already-ready archived chats mounted without reverting to boot; and display an inline Unarchiving... state during both single-agent unarchive and mid-teardown workspace undo without mislabeling pre-archived agents.

* fix(server): keep mid-teardown undo visible in directory reads and update stubs

Split deferBroadcast from isPublicationDeferred so a mid-teardown archive undo holds workspace_update emission until all agents finish unarchiving without hiding the already-active workspace from WorkspaceDirectory reads for other clients.

Update createStub<WorkspaceRegistry> test harnesses with the deferral methods and seed the tracked agent in session.workspaces.test.ts before clearing its workspaceId.

* test(server): seed matching label before asserting filtered agent removal

With positive directory membership in AgentUpdatesService, filtered agent subscriptions only emit remove when an agent that was previously included leaves the filter.
2026-11-26 19:33:17 +07:00
Mohamed Boudra a27f0819c8 Navigate models, providers, and profiles with arrow keys in the model picker (#10929)
* feat(app): support arrow-key navigation in the model picker

ModelBrowser renders profiles, providers, and models as custom children inside Combobox (with an empty options array) and AdaptiveModalSheet, so arrow keys were swallowed by Combobox on wide layouts and ignored in the folded sheet.

Add a pure navigation model in ModelBrowser for profiles, providers, models, and search results, delegate overlay keys from Combobox and AdaptiveModalSheet, scroll active rows into view on explicit keyboard movement without clipping the pinned Profiles header on open, and stabilize DesktopComboboxBody's floating callback ref so Combobox re-renders do not re-register the overlay scope and steal focus onto the Back button.

* fix(app): unify model browser projection and skip native initial highlight

* fix(app): share FlatList scroll reveal and honor native hardware keyboards
2026-11-26 19:32:26 +07:00
Mohamed Boudra 46eb98d604 Stop background git fetch from spawning D-Bus daemons and hammering failing auth (#10921)
* fix(server): guard headless D-Bus autolaunch and pause background fetch on auth failure

* fix(server): resolve runtime D-Bus socket and unify repo fetch state

* fix(server): handle in-flight fetch overlap, origin removal, and setup races
2026-11-26 18:03:35 +07:00
Mohamed Boudra 7d3e045ff8 fix(linux): strip AppImage runtime environment from shells and child processes (#10920)
* fix(linux): strip AppImage runtime env from shells and child processes

The Linux AppImage wrapper exports APPIMAGE, APPDIR, ARGV0, and OWD and prepends $APPDIR paths before launching Electron. That environment leaked through Desktop's login-shell probe, the daemon launcher, and external child builders, causing zsh to override argv[0] for external commands and breaking tools like mise and systemctl aliases.

Add a shared Linux-only stripAppImageRuntimeEnv helper and apply it at the login-shell probe, daemon launch, server external process, and Desktop editor-target boundaries while leaving process.env.APPIMAGE intact in Electron main for auto-updates and CLI installation.

* fix(desktop): strip AppImage runtime env from SSH transport spawns

Electron main intentionally retains AppImage environment variables for auto-updates and CLI symlinking, so spawning ssh without an explicit env passed ARGV0 and $APPDIR paths into OpenSSH ProxyCommand/ProxyJump shell invocations.

* chore: export stripAppImageRuntimeEnv solely from @getpaseo/server/process

Drop the duplicate re-export from @getpaseo/server/daemon-control and run the platform-parameterized config-environment AppImage tests on all OSes.
2026-11-26 18:03:29 +07:00
Mohamed Boudra 20b70e37e7 test(e2e): settle Tailscale toggles and flush slowed socket queues (#10918)
In pair-device-relay.spec.ts, slowConnectionToHost left delayed WebSocket frames in its queue after restoreSpeed() ran, and disableTailscale returned once the Tailscale listener closed before the browser received daemon.tailscale.set.response. Under CI load, enableTailscale could run while the prior change was still in flight.

Wait for the Tailscale switch to return to the enabled state in enableTailscale and disableTailscale, flush queued WebSocket frames when restoring speed, and verify slow-connection off-then-on toggling in pair-device-relay.spec.ts. (PR #10903 already disabled the Tailscale switch in app code while a toggle is pending.)
2026-11-26 18:03:23 +07:00
LiebeLee fcac35d3b9 fix(timeline): recover from rewind epoch changes instead of dropping rows (#8794)
A rewind mints a new timeline epoch on the daemon. A client that misses the
agent.timeline.replacement invalidation then sees every subsequent live row in
the new epoch, and the sequencing gate dropped those rows with no recovery: the
chat stayed on pre-rewind history forever while the new epoch streamed.

Treat an epoch mismatch on a live row like a sequence gap. The app asks for
catch-up from its own cursor, the daemon answers a stale-epoch request with a
reset tail, and the existing destructive replacement installs current history.
The seq 1 fast path stays as is.
2026-11-26 10:07:49 +00:00
Mohamed Boudra 2636c4384f Refresh Tailscale availability in place (#10903)
* feat(devices): add Refresh button for Tailscale availability

When Tailscale is unavailable, waiting to start, or fails its status check in Host Settings -> Devices or Setup -> Mobile, show a Refresh button so users can install or start Tailscale in place and continue without restarting Paseo or leaving the screen.

On the daemon side, live interface detection via os.networkInterfaces() already re-probes on every daemon.get_status.request without caching, but extra listeners in the waiting state waited for their 2-second retry timer before re-attempting bind. Refreshing daemon status now re-probes waiting listeners immediately before reporting status.

On the app side, enable refetchOnWindowFocus for Tailscale status, separate manual Refresh state from background polling so polling does not flicker the button, surface manual refresh failures even when a previous status is loaded, and make refresh and toggle actions mutually exclusive.

* test(e2e): verify Refresh triggers status request ahead of poll

* test(terminal): batch writes in ten-thousand-row history test

Matches #10683: Windows ConPTY timed out at 15s while writing 12,050 rows one write at a time under parallel test load. Batching in 256-row chunks produces the identical terminal output and assertions.

* ui(devices): use circular icon button for Tailscale refresh

Replace the text-labeled Refresh pill with a circular outline icon button (with desktop tooltip and localized accessibilityLabel) so the Tailscale row stays quieter and fits on one line beside the switch on 390px compact viewports.

* ui(devices): drop Relay Recommended badge and lead subtitle with No setup

* test(website): drive code review scene clock explicitly

Matches #10808: headless WebKit on CI paints slowly, so the code review scene missed its 10s wall-clock timeout under the 64ms/frame cap. Use openHomepageWithSceneClock, page.clock.runFor, and finishPanelSwap like the sibling scene tests.
2026-11-26 15:31:42 +07:00
paseo-ai[bot] 17c08edccf fix: update lockfile signatures and Nix hash [skip ci] 2026-11-26 08:17:28 +00:00
Mohamed Boudra 0687c370ec chore(release): reconcile v0.17.5 (#10908) 2026-11-26 15:08:56 +07:00
paseo-bot[bot] a7dbeadd5f Give the Windows untrusted worktrunk test the journey's 90 second budget (#10900)
The test starts the daemon twice, archives four times, and restores twice.
On Windows CI it took 18 to 46 seconds on green main runs and timed out at
60 seconds on main run 45734061560, where every test in the file ran about
twice as slow.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-26 06:46:54 +00:00
Mohamed Boudra d46038ee4b feat(desktop): shorten the stable update cooldown to 24 hours (#10901)
The target cadence is at most one regular automatic update per day. The 72-hour cooldown from #10882 held installs back for three days.
2026-11-26 13:33:09 +07:00
Mohamed Boudra be6b5eb169 Pace stable desktop updates: canary first, at most one check every 6 hours, 3 days between updates (#10882)
* feat(desktop): pace stable updates with a canary, a check interval, and a cooldown

Stable releases now ship once or twice a day from main. The old client
checked every 30 minutes, used one fixed rollout bucket per install, and
ramped linearly over 36 hours. With daily releases that prompted the same
installs first every time, never reached the installs with a high bucket
before the next release replaced it, and put a bad release on a large share
of installs overnight.

Automatic stable updates are now paced on the client, with no server state:

- An automatic check runs at most once every 6 hours. The time of the last
  check is stored, so a restart does not reset it.
- The rollout bucket is salted with the release version, so each release
  draws a different first group.
- A release holds at 5% of installs for a canary period, then ramps to 100%.
  The default rollout is 18 hours.
- After the app moves to a newer version, automatic updates wait 72 hours
  before the next paced release.
- A downloaded build keeps its place when the next paced release appears,
  so a session that outlives a release still installs something at quit.

Every pacing decision fails open, because an install that cannot update
itself can only be repaired by a manual download. Missing, damaged, or
unwritable state, a clock that moved, a failed check, and any unexpected
error all answer "check now" and "admit". A manual check skips every gate.
A release with rollout_hours=0 skips the curve, the cooldown, and the hold
of a downloaded build. Beta is not paced.

docs/release.md gains the runbook to halt a release and to ship a fix.

* docs(desktop): state that a minor release ends the staged-update hold

Version numbers cannot show whether a fix shipped between a staged patch and
the next minor release, so the hold treats a minor or major release as a
missed release. The runbook now says so and a test pins it.
2026-11-26 12:52:20 +07:00
Mohamed Boudra c0903be174 Refuse a tool policy on plugin providers without permission.tool_policy as tool_policy_unsupported (#10889)
A plugin provider's connection negotiates permission.tool_policy, so the
registry lets a toolPolicy through. When the connection does not offer it,
ProviderRuntime.openSession threw a plain Error, which Hub reported as
create_failed instead of tool_policy_unsupported. It now throws
ToolPolicyUnsupportedError before sending session.open.
2026-11-26 12:01:05 +07:00
Mohamed Boudra 5238bfb641 fix(server): stop inviting agents to hide the subagents they create (#10887)
The create_agent `background` description told agents to use it for
helpers the user does not need to watch, so they passed `background: true`
on their own and the subagents disappeared from the UI. Both tool
descriptions and the bundled skill now state what the flag does and that
it is omitted unless the user asks, with no reasoning to latch onto.
2026-11-26 11:23:26 +07:00
Mohamed Boudra 90c8446fb8 Keep notifying the parent when a delegated agent ends its turn while background work will wake it (#10864)
Closes #6346
2026-11-26 10:36:21 +07:00
Mohamed Boudra 717e75d032 Stop leftover provider processes when a catalogue refresh times out (#10867)
Closes #10734
Closes #10810
2026-11-26 10:36:17 +07:00
Mohamed Boudra 62cdc2f2cf Free an archived chat's memory once it is no longer shown (#10866)
Refs #6477
2026-11-26 10:36:12 +07:00
Mohamed Boudra eaef730f1e Allow opting out of automatic desktop update checks and background downloads (#10785)
* feat(desktop): add automatic update modes and download progress

Give desktop users control over background updater network traffic with a persisted updates.mode setting (automatic, notify, off; default automatic).

Enforce off and notify behavior in the Electron main process as well as the renderer so automatic checks never leave the machine when opted out, quit-time installs only run in automatic mode, and explicit downloads stream live progress to both the OS window progress bar and the in-app UI.

* fix(desktop): harden update mode races, installer errors, and shared UI state

Address review findings across the desktop updater and settings store:
- Re-evaluate the saved updates.mode before authorizing background downloads during an in-flight manifest check.
- Serialize read-merge-write operations in the desktop settings store so overlapping patches cannot overwrite each other.
- Capture synchronous installer launch errors from quitAndInstall and report failures on both cached and downloaded install paths.
- Share updater state across Settings and the sidebar callout and guard against duplicate install commands and stale download loops.

* fix(desktop): gate queued update checks and await macOS install handoff

* fix(desktop): preserve quit-lifecycle handoff deadline on macOS

* fix(desktop): consolidate update mode ownership and harden settings fallback

* fix(desktop): read update mode after rollout bucket lookup
2026-11-26 10:18:03 +07:00
Mohamed Boudra f0bf09efee Limit Git rescans to checkouts affected by the change (#10863)
Closes #8771
2026-11-26 10:01:52 +07:00
Derek Gould ad068bd21d Keep change request watches out of Running (#10740)
Closes #10739
2026-11-26 09:06:38 +07:00
paseo-ai[bot] 25666d9172 fix: update lockfile signatures and Nix hash [skip ci] 2026-11-26 02:06:20 +00:00
Mohamed Boudra 6c237aabf1 Enable Tailscale from host settings and setup (#10801)
Settings → host → Devices replaces Pair a device. It keeps relay pairing and adds a Tailscale switch that shows the address to enter on another device. The phone step in setup has the same switch.

daemon.listen accepts a comma-separated list when the first entry is a network address. The first entry is the main listener and still needs a restart to change. Extra entries are TCP listeners that the daemon adds, removes, and retries while it runs. A Unix socket or named pipe stays one literal path.

Older hosts show an update prompt, gated on server_info.features.tailscale.

Refs #5264
2026-11-26 08:57:38 +07:00
Mohamed BoudraandGtio 22baf9e344 Show OMP 19.1+ ask forms as question cards instead of hanging the tool (#10862)
Closes #10471

Co-authored-by: Gtio <gtoxlili@outlook.com>
2026-11-26 08:54:18 +07:00
paseo-bot[bot] 68d58c8217 fix(app): open slash-prefixed Windows drive links (#7711)
Closes #3290
2026-11-26 08:11:37 +07:00
Mohamed Boudra e51bb7b8cd Keep Android chat long-press selection from leaving the magnifier stuck (#10844)
* fix(app): keep Android chat long-press selection from leaving the magnifier stuck

On Android, long-pressing assistant Markdown prose and dragging vertically showed the system magnifier, then let the parent chat ScrollView steal the gesture and dispatch ACTION_CANCEL. Because AOSP's Editor.SelectionModifierCursorController.onTouchEvent handles ACTION_UP but not ACTION_CANCEL, dismissMagnifier() was never called and the magnifier stayed stuck on screen while scrolling.

The trigger was reallowParentInterceptIfLinkReleased() in the vendored react-native-enriched-markdown package calling parent.requestDisallowInterceptTouchEvent(false) on every non-ACTION_DOWN event whenever no link was active, undoing Editor's disallow-intercept claim on the first ACTION_MOVE.

Backport software-mansion/enriched-markdown#1012 so LinkLongPressMovementMethod owns parent intercept disallow/release only for link/image/code-block presses it initiated, and keep Editor's disallow intact if selection started during the touch before touch slop was exceeded.

* fix(app): release parent intercept when a checkbox gesture cancels on Android

Removing reallowParentInterceptIfLinkReleased() left CheckboxTouchHelper's parent.requestDisallowInterceptTouchEvent(true) uncleared when a swipe starting on a task checkbox exceeded touch slop (such as checkboxes inside quoted lists where BlockquoteContainerView leaves checkbox hit-testing enabled).

Move parent-intercept claim/release into CheckboxTouchHelper symmetrically to LinkLongPressMovementMethod so it releases its own claim on slop exceeded, ACTION_UP, ACTION_CANCEL, or when disabled. Also update the table test to dispatch a horizontal drag through an intact overflowing TableContainerView and add a ScrollView regression test for vertical swipes starting on a checkbox.
2026-11-26 07:45:59 +07:00
paseo-bot[bot] 050e168974 Reduce PTY output in the terminal socket overflow test (#10843)
* test(terminal): reduce PTY output needed to exercise socket overflow

The terminal must finish writing before the stalled controller resumes. Use enough output to force the 4 MiB queue limit while reducing the load on Windows runners.

* test(terminal): assert both markers survive socket overflow

Write the overflow burst to the alternate screen so it does not scroll the startup marker out of the replay window. Use distinct markers to exercise replay across the disconnect.

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-26 00:42:29 +00:00
e114e13de2 Let plugins run agents, terminals, and worktree commands behind a sandbox launcher (#10786)
Refs https://github.com/getpaseo/paseo/discussions/8484
Refs https://github.com/getpaseo/paseo/discussions/8017

Co-authored-by: CL Kao <clkao@datarecce.io>
Co-authored-by: Josh Bendavid <Josh.Bendavid@cern.ch>
2026-11-26 01:09:39 +07:00
Mohamed Boudra 3777cc754b Keep mobile sheet footers above the system bar during keyboard transitions (#10827)
* fix(app): keep sheet footer safe-area clearance in lockstep with keyboard transitions

Bottom sheet visible height and bottom safe-area clearance were owned by two
separate keyboard signals on different threads: SheetVisibleFrame shrunk and
restored height on the UI thread from Gorhom's animatedKeyboardState (driven by
React Native Keyboard events), while AdaptiveModalSheet toggled
footerPaddingBottom on the JS thread from useKeyboardVisibility (driven by
react-native-keyboard-controller's keyboardWillShow and keyboardDidHide).

On keyboard close, SheetVisibleFrame restored full height at animation start
while footerPaddingBottom stayed 0 until keyboardDidHide fired after the
animation ended (~200ms later), leaving the footer visibly behind the system
navigation bar before snapping back up. On Android open, SheetVisibleFrame
shrank before the JS commit cleared safe-area padding, producing a 1-frame
upward overshoot by the nav-bar inset.

Move bottom safe-area clearance into SheetVisibleFrame (and a shared UI-thread
hook for scrollable footerless bodies) using the same effective keyboard height
that sizes the frame, keeping height and paddingBottom atomic in one commit and
removing the now-unused useKeyboardVisibility hook and sheet layout helper.

* test(app): replace JSDOM visible-frame test with Android frame-by-frame regression check

Removes the JSDOM + module-mock test in visible-frame.test.tsx per docs/testing.md
and adds a native Android screenrecord regression runner and frame analyzer under
packages/app/e2e/mobile/modal-sheet/ that verifies every frame of the Add project
footer across keyboard show/hide cycles (catching both the behind-nav-bar drop on
dismiss and the 1-frame upward overshoot on open on the parent commit).

* test(app): check absolute nav-bar clearance and keep device settings untouched in sheet footer QA script
2026-11-26 00:30:55 +07:00
Mohamed Boudra 7708e1f084 Drag agent profiles to reorder on phones, with cleaner rows and a one-line options row (#10824)
* fix(app): drag agent profiles on phones and tidy their rows

On a phone, holding a profile's grip and dragging scrolled the page instead
of moving the row. A native drag arms after a short hold and asks the nearest
scroll view to stop scrolling through the content-drag context, but only the
sheet scroll view provided that context. Usage cards live in a sheet, so they
dragged; agent profiles live on a page, so the page scroll took the touch past
the touch slop before the list's pan activated. Page scroll views now host
content drags too (withContentDrag, used by ScrollView outside a sheet and by
PageLayout). docs/drag-reorder.md records the pattern.

Settings rows with a long summary, such as the profile sheet's options row,
grew several lines tall on a phone: the label column has a zero flex basis, so
the summary squeezed it and the label wrapped. A label-only row now keeps the
label's width and truncates the summary in the remaining space.

Profile rows hang the grip in the leading padding like a Usage card, keep the
kebab on the trailing rail, and drop the repeated provider icon and the
chevron from the stacked phone layout.

* fix(app): keep scroll children intact and summaries beside their chevrons

The content-drag context sat between a scroll view and its children, so a
native scroll view saw one child and stickyHeaderIndices pinned nothing. The
context now wraps the scroll view instead. Content drag gets its own module,
content-drag.tsx, with one withContentDrag for both page and sheet scroll
views, so the browser tests can lock the scroll lock and the child pass-through.

A label-only settings row whose label column reached its 75% cap left the rest
of the row to space-between, which pushed short summaries and controls away
from the chevron on wide pages. The column's auto right margin now takes it.
2026-11-26 00:25:17 +07:00
Mohamed Boudra ba45634eee Select sidebar workspaces with Cmd/Ctrl+click and Finder-style Shift ranges (#10821)
* feat(app): select sidebar workspaces with Cmd/Ctrl+click and Finder-style Shift ranges

Cmd+click on macOS/iOS (Ctrl+click on Windows, Linux and Android) now enters
select mode on the clicked row and toggles rows without opening them, matching
Shift+click entry. The first modifier click selects only the clicked row and
never includes the open workspace, so starting a bulk archive from another row
cannot mark the workspace you are reading.

Shift+click now rebuilds the range from the anchor on every click instead of
only adding to it, so a closer Shift+click shrinks the range and crossing the
anchor flips it. Rows picked before the current Shift run are kept, and a
Cmd/Ctrl or plain click moves the anchor and commits the range.

The primary modifier follows the shortcut layer's `mod` (Meta on mac, Control
elsewhere) because Ctrl+click on macOS is the secondary click. The held-key
tracker now follows Cmd and Ctrl as well as Shift, since native responder
events from a hardware keyboard carry no modifier flags. Both sidebar lists
share one press hook instead of duplicating the routing.

* fix(app): select on the first tap after a scroll or long press in the sidebar

A scroll, swipe, drag, or long-press menu on a workspace row sets the row's
long-press flag, and only the drag interaction's press-in clears it. Modifier
taps and select-mode taps skip that press-in, so the stale flag swallowed the
next Shift/Cmd/Ctrl tap on native hardware keyboards, and the next plain tap
in select mode. Those presses never arm the long-press gesture, so the
selection press hook now clears the flag when it takes the press-in.

* fix(app): keep web context-menu rows clickable after a held press

On web, ContextMenuTrigger always handed react-native-web an onLongPress,
even though the web menu opens on right-click and the handler did nothing
there. With any onLongPress set, react-native-web marks a press held past
the long-press delay as a long press and cancels the click that ends it.
Only the next responder grant clears that mark, and react-native-web grants
none to Ctrl or Alt mousedowns. So a slow click on a sidebar row did not open
it, and on Windows/Linux the next Ctrl+click on that row was dropped too.

On web the trigger now passes only the caller's onLongPress.

* fix(app): stop selecting presses from reading the row's long-press flag

The selection press path cleared and honored the row's long-press flag, but
only the drag interaction's press-in resets that flag. A Ctrl+click on web
gets no press-in, so a flag left by an earlier touch swipe or scroll on the
row swallowed it. Selecting presses never arm the long-press gesture, and a
native long press already cancels the press, so the selection path no longer
reads the flag at all. Navigation keeps its own guard.
2026-11-26 00:20:49 +07:00
5c82a2e999 Keep a reloaded plugin's agent tools working for a busy agent (#10106)
* fix(server): keep a restarted plugin's agent tools on live sessions

A plugin restart (reload, update) gives the plugin a new instance id.
Tools attached to an open session are stamped with the old one, so
getPluginTools filters them out and the agent MCP neither lists nor
serves them ("Tool ... not found"). They came back only when the session
reopened, which happens before a prompt to an idle agent; messages to a
busy agent are steered or replace the run on the stale session, so a
busy agent could go without its plugin tools for as long as it stayed
busy.

The agent MCP now reattaches them before it builds a request's catalog:
AgentManager remembers the request a session opened with, and for
plugins whose instance changed it replays agent.open.before to those
plugins only and keeps only the tools they return. Env and MCP server
changes still wait for the reopen, which is unchanged.

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

* fix(server): keep stopped plugins eligible and guard tool replays

- A plugin that is stopped or mid-restart during an MCP request keeps its old
  attachment, so a later request retries it instead of losing its tools.
- A reopen waits for an in-flight replay, so the replay cannot overwrite the
  reopen's tool definitions inside the plugin process.
- Refreshed tools that collide with a Paseo tool or another plugin's tool are
  dropped for that plugin instead of breaking the agent's whole catalog.

* fix(server): retry a plugin whose tool replay failed

A failed replay is left out of the result like a stopped plugin, so the
agent's next MCP request retries it instead of dropping its tools until the
session reopens. The reopen race test now waits for the replay to reach its
gate before it starts the reopen.

* fix(server): replay a restarted plugin's open once per instance, as refresh

A replay whose hook threw or timed out ran again on every agent MCP
request, so each Paseo tool call waited on the broken plugin. The
runtime now remembers the instance that failed and replays it only
after the next restart.

The replay now arrives with reason "refresh", like the idle reopen the
same restart causes, so plugins no longer see "create" again.

An open waits until no replay is pending before it detaches, and a
replay that outlives its session detaches only the plugins it replayed.

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

* fix(server): keep no replay failure record for a closed agent

The replay takes the agent's record when it starts and writes a failure
into that record. Closing the agent drops it, so a replay that fails
afterwards no longer leaves an entry behind.

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

* docs(plugins): say native-tool agents keep launch-time tools until the reopen

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

* fix(server): reserve provider-disabled Paseo tool names in a tool replay

A replayed plugin tool named after a Paseo tool that the agent's provider
disables was accepted, and every later agent MCP request then failed on
the plugin collision check. The replay now builds its reserved names with
an all-enabled policy, the same names that check reserves.

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

* fix(server): reopen only sessions a plugin change affects

A plugin reload bumped one global session-open generation, so every live
agent reopened at its next idle prompt. The reopen closes the provider
session, cancels its subagents and clears background work, even for agents
the plugin never touched.

SessionAttachments now owns what each agent.open.before plugin contributed
to each live session. A refresh reruns only the plugins whose instance
changed, swaps their tools in place, and marks the session stale only when
its launch would differ. This replaces the AgentManager maps, the runtime's
failed-replay record, and the global generation. Native-tool providers
resolve plugin tools by name at call time, so their calls reach the new
instance.

* fix(server): compare plugin refreshes with the running launch

A plugin refresh decided staleness against the last refresh with a sticky
flag, so reverting a tool edit still reopened the session. A failed reopen
also deleted the session's plugin record while the old provider session kept
running, which left it without any plugin tools.

SessionAttachments now keeps the contributions the session launched with as
the baseline and works out staleness against it on every refresh. A failed
rerun or collision is kept on that plugin's contribution. A failed open keeps
the running session's record and marks its plugins for reattach on the next
refresh.

A launch-time native catalog entry now resolves the tool by plugin id and
name, so a different plugin that took the name is never called.

* fix(server): make a plugin open the baseline only once its launch takes over

A reopen whose plugin hooks succeed can still fail launch validation: a
plugin tool that takes a Paseo tool name, or an MCP server on a provider
without MCP support. The open had already replaced the session's record, so
the session lost its plugin tools, or kept a record for a launch that never
ran, and the next idle prompt did not retry.

An interactive open now stays pending until registerSession reports that the
provider launch took over. A launch that fails before then discards the
pending open, and the still-running session keeps its record. Its plugins
attach their tools again on the next refresh, and each idle prompt retries
the reopen.

* fix(server): discard a reload's plugin open on every pre-takeover rejection

resolveProviderLaunchConfig rejects a plugin MCP server that takes a saved
server name after the open is staged, and nothing discarded the staged open.
The reload now resolves and validates its launch config in one scope that
discards the staged open on any rejection, so the running session keeps its
plugin tools and the next idle prompt retries the reopen.

* fix(server): keep a tool name with its owner when a refresh replays every plugin

After a rejected reopen, every plugin replays on the next refresh, and the
collision check gave a contested name to whichever plugin sorted first. A name
now stays with the plugin that has it in the session's record, as long as that
plugin still returns the tool.

* fix(server): rerun a refreshed plugin callback with the agent's current metadata

A plugin reload used to reopen every session, so its callback saw the agent's
current title, workspace, labels, and metadata. A refresh now replays the
recorded open request instead, so a hook that filters on metadata set after
launch kept returning nothing. The refresh now overlays those agent fields,
which plugins cannot change, on the recorded request.

* fix(server): replay the plugin chain in order, hold refreshes over a plugin restart, and roll back every failed launch's plugin open

- A cached plugin contribution is reused only when its instance and the env and instructions it received still match; otherwise the plugin reruns in open order and the composed launch is compared with the running one.
- A plugin reload or source update publishes one settled change: a session refresh waits for the restart instead of reading the stop as removal.
- Create, resume, import, and reopen share one launch boundary: the pending plugin open commits when registerSession admits the agent and is discarded when the launch throws before that.

* fix(server): decide a plugin reopen from the same launch the open builds

The open and the refresh now compose the launch with one function. The staleness check compares which plugin provides each tool, so a native-tool catalog bound to a removed plugin reopens, and a proposed launch with an MCP server name collision counts as changed, so the reopen reports it.

* fix(server): reserve only Paseo's own tool names when a plugin refresh checks collisions

The agent's catalog also lists its plugin tools, so a later plugin rerun by an earlier plugin's edit saw its own tool as taken and lost it. The session owner settles names between plugins from its record. The hooks reference now says an MCP server name collision fails the reopen without hiding tools.

* fix(plugins): let a refreshed plugin's running tool calls finish

The plugin process detached the session's tools at the start of every agent.open.before, which aborted calls already running. Attaching replaces the definitions for later calls; the daemon still detaches before an open that replaces the provider session.

---------

Co-authored-by: Tom Gringauz <17593920+tomgrin10@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: paseo-bot[bot] <paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-11-25 16:51:40 +01:00
Mohamed Boudra 60943dde1c Return focus to the prompt after choosing a New Workspace field (#10632)
* fix(app): return focus to the composer after choosing a New Workspace field

A closing picker restored focus to whatever had focus when it opened. Opening
the project picker by clicking its trigger left focus on the trigger after a
keyboard pick, and every later Cmd/Ctrl+N pick captured the trigger again, so
the user had to click back into the prompt.

The New Workspace form now passes the composer as the restore target for its
pickers. The overlay accepts any handle with focus() as a restore target, so
the composer's own retrying focus can be used instead of a raw DOM element.

* fix(app): keep focus on the field when the terminal profile takes no prompt

A terminal profile without a prompt shows a read-only command preview, so there
is nothing to type into. Its pickers now fall back to returning focus to the
field that opened them instead of losing focus to the preview.
2026-11-25 22:14:42 +07:00
Mohamed Boudra e52bb6e3c4 Select multiple sidebar workspaces to archive together (#10798)
* feat(app): select multiple sidebar workspaces to archive together

Let users enter workspace select mode from Shift+click/tap or the row menu, toggle additional rows with plain clicks without holding Shift, extend ranges with Shift+click, and archive all selected workspaces in one batch with a single worktree warning and undo toast.

Tracks live hardware Shift state in the keyboard pipeline (clearing on blur and AppState backgrounding) so Shift+tap and Shift+click also work on native tablets with hardware keyboards where Pressable responder events omit shiftKey. Adds an action layout variant on ToastCard so pill controls inside action toasts share concentric padding and radius.

* fix(app): preserve batch undo and selection ownership during bulk archive

Keep workspace.archive bound for the full lifetime of sidebar select mode so pressing it at 0 selected or during a worktree check does not fall through to archive the open workspace.

On partial archive failures, update the open UndoWindow toast in place with error styling and the failure message instead of calling toast.error, so Undo and Cmd/Ctrl+Z remain available for succeeded workspaces and their layout state is not purged early.

Guard isArchiving cleanup with a per-attempt token so an earlier batch cannot unlock a newer batch's worktree check, and read the active workspace lazily at redirect time rather than capturing it at submission.

* fix(app): stack sidebar selection bar below toasts and protect newer undo

Keep the sidebar selection bar visible alongside active transient toasts (such as Undo or error toasts) by rendering both slots in ToastViewport's sidebar stack instead of hiding the persistent bar while a transient toast is open.

Route late archive errors from a superseded batch to the app-level toast when a newer batch holds an open Undo window, so an older failure does not replace the active Undo toast or purge the newer batch's layout state.

* fix(app): toggle focused sidebar workspace checkboxes with Space on web

React Native Web's Pressable activates Space only for role='button', not role='checkbox'. Handle Space on focused checkbox rows in SidebarWorkspaceContextMenu so keyboard users can toggle rows in either sidebar grouping.

* fix(app): ignore repeated Space keydown on focused workspace checkboxes

* fix(app): keep Escape owned by select mode during worktree checks
2026-11-25 22:11:10 +07:00
Mohamed Boudra 307f65d8f7 Stabilize website scene and keyboard language checks (#10808)
* fix(website): stabilize scene and keyboard language checks

Drive scene frames explicitly so sparse browser paints do not consume the test deadline. Let the landing page commit a locale change while its optional plugin count loads.

* test(website): advance the plugin panel crossfade before asserting removal

* test(website): settle native animations during the plugin panel swap

Playwright advances JavaScript frames, while the browser keeps a separate timeline for native animations. Finish the mockup’s finite native animations at the panel checkpoint so either animation path removes the outgoing panel.
2026-11-25 21:06:43 +07:00
Mohamed Boudra 163162e9f3 Teach the current plugin API in the bundled paseo-plugin skill (#10793)
* docs(skills): teach the current plugin API in the paseo-plugin skill

The skill still taught server.on and server.before, a deprecated panel
context, and an older publishing rule. It linked to hook anchors that
moved to the hooks page, and it had no entry for half of the shipped
contributions. Its RPC example imported a contract that the shared file
did not export.

The skill now indexes every public registration and links to the
reference section that owns its contract. It keeps a few complete
examples. Every ts and tsx block in the skill names its file, and the
blocks under each heading must typecheck as one plugin against the SDK,
so an example cannot drift from the API without a failing test.

* docs(skills): match the plugin skill RPC example to the scaffold and run its tests in CI

The RPC example used names that the generated client entry does not import, and it had no client entry. A PR that changed only the skill also skipped the SDK tests that typecheck its examples.

* docs(skills): keep the generated client entry in the plugin skill RPC example

Replacing index.client.tsx with a screen-only entry removed the scaffold's
Greeting sidebar item, which is the only control that opens the screen.

* docs(skills): say that npm plugins declare build for generated files

Paseo installs npm plugins with lifecycle scripts disabled, so a postinstall
step never runs.
2026-11-25 21:04:18 +07:00
Mohamed Boudra 4a6b8ae080 fix(app): keep the sidebar toggle clear of plugin screen titles (#10773)
With the left sidebar collapsed, every content header renders
SidebarMenuToggle in its leading slot. On macOS it is a blank space
under the toggle the window draws beside the traffic lights; on
Windows and Linux it is the toggle itself. The plugin screen header
built its own left side without it, so on macOS the floating toggle
sat on top of the title, and on Windows and Linux the screen had no
toggle to reopen the sidebar.
2026-11-25 20:59:43 +07:00
paseo-bot[bot] 465db78ab6 fix(opencode): clear deleted subagents from the track (#8332)
* fix(opencode): clear deleted subagents from the track

Handle provider deletion events before fetching the missing session, and reconcile removals after complete parent listings so reconnects also clear stale rows. Keep descendant cleanup scoped to the deleted child.

* fix(opencode): retain live subagents skipped during reconnect

* fix(opencode): reconcile skipped subagent descendants

* fix(opencode): restore live subagents after reconnect

A deleted child rejects environment restoration before reconnect can clean up its row. Let the child tracker remove confirmed deletions and continue restoring live descendants.

* fix(opencode): clear deleted subagents after reconnect

Let the OpenCode SDK decode missing-session responses in both runtimes. The child tracker can then remove the stale row and restore the live children when it reconnects.

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-25 13:49:39 +00:00
Mohamed Boudra 30a155127d Redesign agent profiles settings, inspector drawer, and 1-tap composer creation (#10789)
* feat(app): redesign agent profiles settings, inspector drawer, and 1-tap composer creation

Promote Host -> Agent profiles to its own settings section with a searchable 3-column roster and slide-over inspector drawer, eliminate async layout jump when provider options load, and make composer model picker '+' save, select, and toast with Edit and Undo.

- Seed cached host provider catalogs synchronously and retain same-provider controls while refetching so the form no longer collapses and jumps when switching models or modes.
- Keep form session state above drawer/modal framing so resizing across breakpoints preserves unsaved edits, and render the drawer as a right-edge overlay below 1320px pane width so opening a profile never crushes or reflows table rows.
- Reuse Paseo's SearchField, CombinedModelSelector, SettingsCard, SettingsSwitch, SettingsCollapsibleRow, SegmentedControl, ToolbarButton, DismissBackdrop, WindowChromeRegion, and ToastHost across all surfaces.

* fix(app): preserve remounted drafts, guard duplicate, and serialize profile writes

Seed profile FormTextInput fields from the live session draft so drawer-to-modal resizes and collapsible toggles display the values Save will write. Share one confirmDiscardIfDirty guard between editor transitions and Duplicate. Serialize host profile mutations through a per-host queue in useAgentProfiles so overlapping composer quick-creates and Undo compose against the latest stored list.

* fix(app): keep profile editor across compact settings and Remove cancel

Unify compact and desktop Settings detail pane wrappers into SettingsDetailPane so resizing across the 600px compact breakpoint never unmounts HostAgentProfilesPage or drops an active edit session. Remove the premature onClose() call from AgentProfileEditModal's Remove handler so the caller closes the modal only after confirmation and deletion succeed.

* fix(app): allow roster search with docked drawer and guard Settings exits

Pass manageFocus: overlay to useOverlayRegistration in AgentProfileDrawer so slide-over overlays trap focus while docked drawers keep Escape handling and allow typing in roster search. Add a before-leave guard hook in SettingsScreen wired to AgentProfilesPage's confirmDiscardIfDirty so sidebar section switches, host switches, and back navigation prompt before discarding an unsaved profile draft.

* fix(app): guard browser Back and route removal on unsaved profile draft

Add navigation/route-leave-guard so web popstate events are intercepted before Expo Router's createMemoryHistory resets the root navigator, plus beforeRemove handling for native swipe-back and hardware Back. Canceling restores the history entry and keeps both route and draft; confirming replays the exit cleanly.

* fix(app): preserve intervening history on canceled multi-step Back jumps

Track ordered Expo Router history entry IDs in route-leave-guard instead of restoring via pushState. Canceling any Back/Forward traversal now reverts via history.go(delta) without truncating intervening or forward entries, and confirming replays popstate at the browser's exact selected destination.

* fix(app): restore Back-jump URL after reload and compute dirty from resolved defaults

Persist the tab's ordered history entry IDs in sessionStorage and verify the target entry ID when reverting a canceled popstate traversal, so canceling a multi-step Back jump after a page reload always restores the exact editor URL. Move isDirty into profile-form-model against the resolved initial baseline after catalog defaults hydrate so opening an untouched provider-and-model-only profile closes without a discard prompt.

* fix(app): dismiss profile-saved toast when its composer unmounts

Scope the composer's profile-saved toast to the lifetime of useAgentProfileEditor so closing an agent tab dismisses the toast instead of leaving a dead Edit action.

* fix(app): scope save completion close to the editor session that started it

Skip onSaved when useAgentProfileFormSession has unmounted mid-save, and guard handleSavedClose and composer handleSave by session key/request identity so switching to another profile during a slow save never closes the next profile's draft.

* fix(app): unify delayed editor transitions behind a session token

Track a monotonic editor session token in AgentProfilesPage and route delayed open/close transitions (Save completion, Duplicate completion, and async discard confirmation) through applyDelayedEditTarget so a slow Duplicate updates the roster without replacing a newer profile draft.

* fix(app): track draft revision so post-confirm edits veto delayed Duplicate

Add draftRevision to AgentProfileFormState and read isDirty/draftRevision directly from the live form model instead of mirroring a boolean ref. Approve discard for a specific (sessionToken, draftRevision) pair so any edit made after confirming Duplicate advances draftRevision and keeps the newer draft open when the host responds.

* Scope discard approval to each action so failed duplicates stay dirty

* Report agent profile write failures with toast across web and native

* Use usePreventRemove for Settings dirty-draft guard so native stacks block swipe dismiss

* Keep Settings sidebar scroll anchoring intact across font-size reflows
2026-11-25 20:48:38 +07:00
e108fdc792 fix(app): keep the turn footer on plugin-transformed assistant replies (#10795)
* fix(app): preserve turn footer on plugin-transformed assistant replies

Retain sourceMessageId and sourceText when timeline projection replaces an
assistant_message with plugin items, and recognize projected assistant replies
across turn timing, footer layout, fork boundary resolution, and turn copy
(deduplicating split cards by sourceId).

No plugin SDK changes.

Closes #10438

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

* refactor(app): keep the replaced row on plugin timeline cards

Projected plugin rows copied fields from the row they replaced one at a
time (sourceId, sourceKind, sourceMessageId, sourceText), and each copy
missed a footer input: turn stats from #10496 were still dropped for a
transformed reply. Projection now keeps the replaced row as `source`,
and `getAssistantReply` reads the reply through it for turn folding,
timing, copy, fork, and turn stats.

Refs #10438

Co-authored-by: Brandon Elliott <brandon.elliott@vercel.com>

* docs(plugins): note that a replaced reply keeps its turn footer

Refs #10438

* test(app): check the turn duration under a plugin-transformed reply

Refs #10438

---------

Co-authored-by: Brandon Elliott <brandon.elliott@vercel.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-11-25 20:07:08 +07:00
Mohamed Boudra 732b936fb6 fix(codex): keep configured developer instructions when Paseo adds instructions (#10792)
Codex uses a thread's developerInstructions in place of the
developer_instructions in its config. Paseo now reads the configured
value through config/read and sends it ahead of the agent, daemon, and
plugin instructions on thread/start, thread/resume, and rewind forks.

Closes #10644
2026-11-25 20:00:15 +07:00
Mohamed Boudra 5c97cd5903 chore(ci): move dependency signature audit to release preparation (#10800)
Keep lockfile lint in CI. Review the lockfile diff and audit dependency signatures on the release commit before shipping beta or stable releases.
2026-11-25 13:23:22 +01:00
paseo-bot[bot] 019f87804e test(server): stabilize the busy-loop image decode check (#10762)
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-25 12:09:20 +00:00
Mohamed Boudra 7d425b2efe Mark desktop, web, and mobile in the homepage plugins subtitle (#10799)
Each client the subtitle names has its own color and an icon. The locale
strings tag the three names so each translation places them.
2026-11-25 18:59:47 +07:00
Mohamed Boudra 206229235f fix(hub): let Hub sessions list provider controls (#10794) 2026-11-25 18:36:42 +07:00
Mohamed Boudra 95a755e620 Say that homepage plugins install once and run on every client (#10797)
The plugins subtitle now names the server install and the desktop, web,
and native mobile clients. English and Simplified Chinese.
2026-11-25 18:33:01 +07:00
Mohamed Boudra c1b43ee571 Keep Git watchers responsive during large directory scans (#10788)
* fix(server): avoid event-loop stalls and timeouts during Git watcher scans

Compile file-observer and Git ignore root lists into ancestor-Set matchers so directory scans check direct children in O(1) instead of scanning all ignored roots per entry. Add cooperative time-sliced yielding and mid-directory abort/ignore checks to NativeRecursiveBackend and LinuxBackend directory scans, and enforce the monotonic watcher subscription deadline after Promise.race so late microtask resolutions cannot bypass timeouts.

* fix(server): attach Linux directory watches before scanning entries

Attach the inotify watcher for each newly discovered directory before calling readdir() in LinuxBackend.scan(), so writes that land during readdir() or mid-directory scan yields are captured live rather than missed between the snapshot and post-scan watch attachment.

* fix(server): track Linux directory watch inode identity across replacements

Store each Linux directory watcher with its (dev, ino) identity so watch attachment and scan reconciliation detect when a directory at a watched path is moved aside and replaced. Close stale watchers, rebind to the replacement inode, and re-verify identity after attach, readdir, and scan yields.
2026-11-25 17:48:24 +07:00
Mohamed BoudraandMarcel W. Wysocki b4af7599d5 perf(app): keep overlays and long-running sessions fast (#10778)
A dev window open for a few hours took twice as long to open the sidebar
hover card as a fresh one. Three dependencies produced the cost:

- Unistyles 3.2.4 web rewrote the whole stylesheet on every class add or
  remove. Backport upstream PR jpudysz/react-native-unistyles#1354 (3.8.0):
  classes become CSSOM rule inserts and deletes.
- @gorhom/portal kept all portal state in one context value at the app
  root, so each portal change made React search every mounted fiber. Portal
  state now lives in a store each PortalHost subscribes to. Also backport
  gorhom/react-native-portal#62 so closing one overlay no longer remounts
  later overlays in the same host.
- React 19.2 development builds never cleared their render timings.
  Backport the React 19.3.0 clearMeasures change.

The shared stylesheet e2e helper counts rules inserted, deleted and edited
for the whole interaction, so transient and in-place changes fail the
explorer resize spec.

Supersedes #10605.

Co-authored-by: Marcel W. Wysocki <maci.stgn@gmail.com>
2026-11-25 17:39:10 +07:00
Mohamed Boudra eaadacadb4 fix(app): return the previous pane to its last active tab when splitting or moving (#10716)
Detaching a pane's active tab via splitPane or moveTabToPane previously dropped focusedTabId and fell back to the rightmost remaining tab in the strip, so dragging a file tab out after coming from tab A left the previous pane on tab B instead of putting A and the file side by side.

Track per-pane tab focus recency in memory and route both close and relocate focus transitions through one explicit policy table. Closing a tab keeps its existing parent-then-neighbor order, while splitting or moving a focused tab out of a pane returns the source pane to its most recently focused remaining tab (falling back to a same-pane parent tab and then an adjacent neighbor). Keeping the focus history in memory avoids adding a new key to the strict persisted layout schema.
2026-11-25 17:31:58 +07:00
Arnold HueteandMohamed Boudra b6375b1426 Set Archive on finish from the CLI and MCP (#8479)
Schedules created through the CLI or MCP archived every run's workspace and agent, and only the app's switch could change that. Add --archive-on-finish and --no-archive-on-finish to paseo schedule create and update, and archiveOnFinish to create_schedule and update_schedule. Omitting the option stores nothing, so the default stays on.

A repeated named create_schedule that changes only Archive on finish refreshes the existing schedule instead of creating a duplicate, and keeps the saved value when the request omits it.

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-11-25 17:06:48 +07:00
bbe7e2a7fc Keep slow Import Session results and show provider errors (#10516)
* fix: bound import listing and clean up ACP probes

* fix(server): keep the full Import Session deadline

Start ACP probe cleanup when the agent manager stops waiting. Keep the 90-second window for listings that still have time to finish.

Co-authored-by: Chirag Singhal <76880977+chirag127@users.noreply.github.com>

* fix: show import provider errors and retry progress

* fix(server): return Import Session results before probe cleanup finishes

A timely ACP listing was discarded when process shutdown crossed the listing deadline. Return the completed rows and let the adapter finish reclaiming the probe.

* fix(server): preserve timely ACP listing errors during cleanup

A provider error returned within the listing window can still be displayed while its probe shuts down.

* fix(server): preserve timely ACP initialization errors during listing

* test(server): give Worktrunk integration fixtures time to finish

* fix(app): scope Import Session results to the selected host

Co-authored-by: derek <174018435+derek-geekdive@users.noreply.github.com>

* Keep pending session imports tied to their original host

* fix(server): reclaim ACP listing providers after launcher exit

---------

Co-authored-by: Chirag Singhal <76880977+chirag127@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: derek <174018435+derek-geekdive@users.noreply.github.com>
Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-11-25 10:03:51 +00:00
Mohamed BoudraandSammy Patenotte d94148a2a8 Let plugins nest dispatched workspaces under the workspace that created them (#10781)
Workspace snapshots now carry parentWorkspace, the ref of the workspace whose agent created this one on the same host, null when the host records no parent. Based on #10330 by Sammy Patenotte.

Co-authored-by: Sammy Patenotte <sammy.patenotte@yahoo.com>
2026-11-25 16:58:02 +07:00
Mohamed BoudraandDhruv Singal 831f2472f3 fix(providers): upgrade Factory Droid to 1.20.0 (#10779)
The catalog launched Factory Droid with `npx -y droid@0.249.0`, which
predates the models Factory added since, including Droid's current
default `gpt-6.2-sol`. Bump the pin to 1.20.0, the version the ACP
registry now publishes for Factory Droid. The registry still distributes
Droid as a pinned npx package with auto-update disabled, so the entry
keeps that shape and stays covered by `npm run acp:version-drift`.

Co-authored-by: Dhruv Singal <170742396+dsingal0@users.noreply.github.com>
2026-11-25 16:45:08 +07:00
Mohamed Boudra 8df6672de1 Add projects from one sheet with Existing, Clone, and New folder tabs (#10767)
* feat(app): add projects from one sheet with Existing, Clone, and New folder tabs

Add project used to start on a method list, so every use cost a step before
typing. The sheet now opens on Existing with the search focused, and Clone and
New folder sit one tab (or Mod+2/3) away, each keeping its own draft. A host
pill appears only when more than one host is online.

Rows are select-then-confirm: a tap or arrow key picks a row and the primary
button (or Enter) commits it, so a scroll-tap on touch never clones or opens
by accident.

The sheet owns its keys through AdaptiveModalSheet's new `keyboard` prop
rather than a child overlay registration, because a child at the same layer
loses to the sheet. Enter leaves a focused button alone (Close, a tab, Add
host) so keyboard users can still activate it.

Inputs focus on open only when a hardware keyboard is present; on a phone the
focus popped the keyboard and the bottom sheet jumped between snap heights on
every tab switch.

Searches keep the previous results while the next request is pending, so the
list no longer flashes to a loading state on each keystroke.

* fix(app): keep Add project results, selection, and submissions tied to their host

Searches now answer only for the host and query they were sent for. With
keepPreviousData, switching host showed the previous host's folders as
settled results, and Open project sent one host's path to the other. A
failed request no longer leaves a spinner, an old query's error no longer
shows while the next one loads, and directory search errors from the host
are shown instead of "No matching folders".

The picked row is stored by id instead of position, so a search refresh
cannot move the selection to a different folder or repository. Focusing a
row picks it, so Enter on a focused row adds that row.

A submission belongs to the open sheet and its host. Closing the sheet or
losing the host abandons it, so a late result neither navigates away from
where the user went nor blocks the next submission.

New folder and Clone default to a parent known to exist (last used, a
recent project's parent, or home) instead of ~/dev, and the Clone preview
drops a trailing .git like the host does. Tabs and rows are locked while a
submission runs, and tabs whose host lacks the capability are read-only.

* fix(app): don't open a stale Add project row, keep drive roots in Location

Enter while a new search is pending no longer opens a row from the
previous search; typed paths and URLs stay usable. Location derived from
a project at a drive or filesystem root keeps the root separator (C:\\, /).

* fix(app): keep Location on a pending search, reject drive-letter folder names

Enter in the Location picker no longer confirms a folder from the
previous search while the new one runs; a typed path still confirms.
Combobox gains remoteSearchPending for this. New folder flags names
like "C:repo" inline, matching the host's rule.

* fix(app): don't swap a dropped Add project pick for the first row

The first row is the default only while the user has not picked one.
When a new answer drops the picked row, nothing is active and the
primary action stays disabled until the user picks again.

* fix(app): keep Add project on the chosen host when it disconnects

The sheet no longer moves the draft to another online host when the
chosen one drops. It stays on that host, shows "<host> is offline", and
blocks submit until the host returns or the user picks another one.

* fix(app): block the native Go key while the Add project host is offline

Each tab's view is gated once, so the footer button, Enter and the
text field's submit key all read the same unavailable submit.

* fix(app): disable Browse while the Add project host is offline

* fix(app): don't default Add project Location to a share's server name

A project at a Windows share root (\\\\server\\share) has no parent folder,
so the default Location falls back to the next project or ~.
2026-11-25 16:28:33 +07:00
Mohamed Boudra feb7882e5c Find agent profiles by searching models, and in the Command Center (#10774)
* feat(app): find agent profiles by searching models and the Command Center

Typing in the model picker used to hide profiles, so a profile could only
be reached by clearing the search. Search now lists matching profiles
above matching models, matched on the profile name and its summary, so
searching a model also finds the profiles built on it.

The Command Center offers the same profiles as "Profile › <name>",
applied through the picker's applyProfile. Profiles are never shown as
selected: applying one writes its values and nothing stays bound to it.

* fix(app): keep profile search results scrollable and profile ids unique

A provider search that matched only profiles rendered them outside the
model list, which owns scrolling in the popover, so matches below the fold
could not be reached. They now go through the list with no model rows.

The daemon stores the profile list as given, so a hand-edited config can
repeat an id. The Command Center registry rejects duplicate ids and threw
while the composer mounted. The picker now keeps the first profile per id,
which is the one applyProfile already resolved.
2026-11-25 16:01:20 +07:00
paseo-bot[bot] cd2e56f1fa Keep Git watcher retries on schedule after reconnect (#10602)
* fix(server): keep watcher retries on schedule after reconnect

A watcher that timed out lost its pending delay when its last observer disconnected. Keep the retry with the watched path so registering the same workspace again uses polling until the scheduled scan.

* fix(server): preserve the scheduled watcher retry deadline

The ordinary recovery delay can exceed the setup-timeout delay when a watcher reports an error before timing out. Retain the scheduled deadline so reopening waits the full interval.

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-25 07:37:02 +00:00
1ff119dc2a feat(app): copy a quote's body with one tap (#10608)
Agents often write drafts as quotes meant to be pasted elsewhere. A plain
quote now has a copy control on web, desktop, Android and iOS. It copies
the quote's body without the `>` markers and with its nested Markdown. A
nested quote, a code block or a Mermaid diagram inside it keeps its own
control. Admonitions get no control.

Web reads the rendered quote at press time, so a streaming quote copies
what it shows, and writes the same two clipboard flavors as selection
copy. A rendered Mermaid diagram copies as the fence it shows, and an
admonition inside a copied quote copies as its `> [!TYPE]` source. Code
blocks and quotes share one copy button with a Copied state and an error
toast when the clipboard refuses the write. On compact layouts the
control is always visible in a band above the quote body. On wide
layouts it shows on hover or focus and the quote keeps a right gutter.

Native code blocks and quotes share one header copy control with the
Lucide Copy glyph. A quote reserves the code block's header band above
its body, so the control never covers text at any font size. Native copy
emits the quote body as written, and a copied fence grows longer than
any fence inside its code.

Supersedes #9429 and #9319. Refs discussion #9303.

Co-authored-by: Pedro Vieira <pedro.vieira@dremio.com>
Co-authored-by: Phieu Dinh <phieu@fiu.one>
2026-11-25 13:36:01 +07:00
Mohamed Boudra 6e6f224e44 Hub login prints a one-click URL, and an uninstalled Muse Code shows as unavailable (#10751)
* fix(cli): print the one-click Hub login URL

`paseo hub login` opened verificationUriComplete in a browser but printed
the bare verificationUri. Over SSH or on a remote host the browser launch
does nothing, so users had to open the bare page and type the code by hand.
Print the URL that carries ?code= and keep the code next to it so the user
can check it matches the Hub approval page.

* fix(providers): report uninstalled plugin providers as unavailable

A fresh host with only Claude Code installed listed Muse Code as an
error ("muse not found on PATH"). The snapshot manager resolves a
provider's catalogue key before it checks availability, and treats any
failure there as an error. For a plugin provider with a command, the key
lookup required a resolved executable and threw when it was missing.

A command that does not resolve has no catalogue identity. Fall back to
the target key so the availability check runs and reports unavailable.

* fix(providers): keep a removed plugin executable off its cached catalogue

The previous fix returned no catalogue key for a missing executable. A
plugin that returns no key asks for a per-workspace catalogue, so after
its executable was removed the next read bound to the catalogue cached
while it was installed and kept reporting ready.

Give a missing executable its own key. Removal now moves the provider to
a fresh catalogue, and its refresh reports unavailable.
2026-11-25 13:30:37 +07:00
Mohamed Boudra 395a5a5f80 Run OpenCode v2 agents with their own MCP servers and env on a shared OpenCode server (#10752)
* refactor(server): share the MCP client connection that providers host

OMP connected MCP servers itself; OpenCode v2 now needs the same client to
host per-session servers. The shared connection also ends Streamable HTTP
sessions explicitly on close, because a stateful server keeps them otherwise.

* fix(opencode): run agent MCP servers and env on shared v2 servers

Agents with MCP servers or a launch environment failed on any OpenCode v2
server Paseo did not start, with "require an isolated server". OpenCode's MCP
configuration is shared by every session in a location, so Paseo answered by
starting a dedicated server, which a reused server cannot do.

Paseo now hosts each session's MCP servers itself and the v2 plugin exposes
their tools only to that session and its descendants, under OpenCode's
`<server>_<tool>` names. The plugin runs OpenCode's permission check before
each call, so preapproved grants still apply; that API exists from OpenCode
2.0.29, and older servers or stale plugins fail at session creation. Launch
env reaches shells through session.environment, which children do not
inherit, so the plugin asks Paseo to adopt each child before its first model
request. No agent gets a dedicated server any more, including on Paseo's own
helper.

A registered service is skipped when the provider env configures the OpenCode
process, so a service.json no longer breaks catalogs and launches for those
setups. An explicit server URL still reports those variables.

Fixes #9669

* fix(opencode): keep user tools, child instructions, and MCP call cleanup on shared servers

- A Paseo MCP tool replaced a same-named tool from the user's own OpenCode
  configuration, and the context hook then removed it from unrelated sessions.
  The plugin now captures that tool when it registers, keeps it for sessions
  without their own Paseo tool, and runs it for them.
- MCP instructions were an instruction entry written when a child was adopted.
  OpenCode loads entries before the context hook runs, so the child's first
  request missed them. The context hook now adds them to every request.
- Structured-only MCP results reached OpenCode with empty content. The bridge
  now adds them as text, as it already does for Paseo tools.
- The bridge listened for the request's `aborted` event, which never fires
  once the body is read, so Stop left the MCP call running. It now aborts when
  the response closes before it finishes.
- Closing an HTTP MCP connection waited on a session DELETE with no deadline.
  It now waits at most two seconds before closing the transport, which aborts
  the DELETE.

* test(server): run daemon OpenCode tests with the bridge the daemon always starts

These tests built the OpenCode v2 client without a bridge, so the client
reported no native Paseo tools and the daemon injected its internal MCP
server instead. OpenCode v2 now hosts agent MCP servers through the bridge
and rejects them without one. The daemon always starts the bridge, so the
tests now do too.

* fix(server): reconnect expired MCP sessions and bound the MCP handshake

- The OpenCode plugin copied a same-named user tool's input schema into the
  shared registration. OpenCode validates arguments against the registration,
  so the agent's own calls failed the user's schema. The registration keeps a
  permissive schema, and the context hook gives each session its own.
- A stateful HTTP MCP server answers 404 after it restarts or expires a
  session, and the SDK kept sending the old session ID. A call that gets 404
  now opens a new session once and retries.
- The SDK times out only the `initialize` request, so a server that never
  answered the `initialized` notification stalled agent creation. The whole
  handshake now has a 10-second deadline.
2026-11-25 13:30:13 +07:00
Mohamed Boudra 12bc84046c Keep iOS chat visible with tall pending cards (#10759)
* fix(app): reveal chat with tall pending cards

The initial scroll can settle inside the footer, where no rows need to be measured. Run the layout readiness check before allowing cached ranges to skip it.

* test(app): cover cached range during initial list placement

Exercise an observed end offset with measured rows in the buffer. Canceling the initial scroll must complete readiness even when the render range is already cached.
2026-11-25 13:24:09 +07:00
paseo-bot[bot]andluke 44d1d6ab29 fix(app): keep long desktop turns virtualized (#8661)
* fix(app): virtualize chat turns that exceed the mounted window

- Desktop web aligns the mounted tail to the current turn, so one long tool run stayed fully mounted and stalled the chat open.
- Cap that rewind at 60 rows for the web virtualizer. A larger minimum still wins, and history paging plus the replica cache still keep a whole turn.

* test(app): read expanded turns across the virtual window

Verify every command remains accessible while scrolling and after older history loads. Requiring all expanded rows in the DOM at once contradicts bounded desktop mounting.

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

* Verify older history appears before rechecking turn expansion

---------

Co-authored-by: luke <luopeihuan@gmail.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-25 05:55:20 +00:00
paseo-bot[bot]andOuyang Xingyuan cfcf0dc7d1 fix(server): keep slow direct connections alive during large transfers (#10651)
A direct client sees activity only after a complete WebSocket message arrives. Send large responses in existing transport chunks so the client sees progress while it waits for the full response.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Ouyang Xingyuan <galaxyroaming@qq.com>
2026-11-25 04:02:49 +00:00
Mohamed Boudra 0a856ab7fc Surface E2EE relay and privacy posture on homepage and security docs (#10749)
* docs(website): surface E2EE relay and privacy posture on homepage and security docs

Add a quiet trust strip below the homepage desktop hero mockup (EN and zh-CN) so Paseo's no-telemetry, E2EE relay, open-source, and independent posture is visible before the feature chapters.

Update the public security docs, privacy policy, and SECURITY.md to match the current Noise NK relay handshake, replay protection, daemon.relay.requireProtectedSecurity setting, and pairing-link / daemon-password trust model. Sync README.md, README.zh-CN.md, connectivity docs, and the homepage FAQ connectivity link.

* docs(security): clarify two-sided Noise fallback and Unix key permissions

* docs(security): note daemon restart after enabling requireProtectedSecurity
2026-11-25 09:58:26 +07:00
paseo-bot[bot]andMohamed Boudra ad20814ec8 Restore stopped Claude background subagents as canceled after reopening (#9013)
* fix(claude): restore stopped background subagents as canceled

Resolve task-only replay notifications through the parent launch identity so stopped children keep their recorded outcome after reopening. Preserve transcript order across task and tool notifications.

* test(claude): name replay notification fixture options

* fix(claude): restore all children in grouped task notifications

A session-end notification can contain several task IDs. Apply its outcome to each linked child during transcript replay so every stopped child restores as canceled.

* fix(claude): keep quoted notices from changing replayed child status

Claude marks delivered task notifications with an origin. Require that origin for user records and require a standalone notice for queue records so prompts that quote a notice do not override a recorded outcome.

* fix(claude): keep replay task links tied to subagent results

Ignore unrelated tool results when collecting task identities so echoed launch logs cannot overwrite the link used to restore a stopped child.

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-11-25 08:30:08 +07:00
Maarten den BraberandMohamed Boudra 0688ae83fe fix(server): send Claude MCP servers over stdin to keep tokens out of argv (#10698)
* Keep MCP server headers off the Claude Code command line

The Claude Agent SDK defaults to sending MCP servers in one --mcp-config
flag, so the Paseo MCP server's bearer token (and any user MCP server
headers or env) was readable by every local account through ps or
/proc/<pid>/cmdline. Anyone who read it could call the daemon's agent MCP
endpoint.

Set mcpServersDelivery: "initialize" so the SDK sends the servers over
stdin in the initialize request. The SDK only supports that with the
Claude Code bundled with it (2.1.326) or newer, so an older Claude Code,
or a wrapper command that reports no version, keeps the command-line
delivery and the daemon logs a warning once.

A spawn test feeds Paseo's options to the real SDK and checks that the
token reaches stdin and not the launch arguments.

* fix(server): warn about MCP argv delivery only with configured servers

An empty session used the client's one-time warning before any MCP server headers would be passed to the provider. Warn on the first session that configures a server.

* fix(server): detect MCP delivery support on each provider launch

A running daemon kept selecting command-line delivery after the installed provider gained stdin support. Resolve the installed version when building SDK options for a launch with MCP servers.

* fix(server): probe MCP delivery support in the launch environment

Version-selecting wrappers can run a different binary in the workspace. Use the session working directory and environment when probing the configured command.

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-11-25 08:30:01 +07:00
paseo-bot[bot] 311728a780 test(plugins): give npm installation cases separate deadlines (#10726)
Install and reload, reviewed updates, and staging cleanup each run against a fresh service. Their npm subprocesses no longer draw from one test's deadline.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-25 00:23:46 +00:00
cf1a5a9e73 Stop idle plugin sessions from pinging the daemon (#9363)
* fix(server): stop liveness pings on plugin sessions

Every DaemonClient pings its daemon every 10 s to notice a silently dead socket. A plugin's
session runs over its IPC channel (or an in-process queue for built-in plugins), whose loss is
reported directly, and the daemon already exempts plugin sockets from the application lease those
pings renew. The pings only woke both processes: about 2 wakeups a second in an idle daemon with
nine plugins and the built-ins.

DaemonClient gets a livenessHeartbeat option (default on); the plugin host turns it off.
Explicit verification (ensureConnected({ verify: true })) still pings.

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

* fix(server): exit a plugin process when its daemon's channel closes

A plugin host only noticed that its daemon worker had died through the liveness ping: about 11 s
later the ping failed and the process exited with code 1. With the pings off it would not notice
at all and kept running as an orphan.

The plugin process now exits as soon as the IPC channel closes without the plugin closing it
itself. A normal shutdown still closes the channel from the plugin side and lets work in flight
(a provider connection that resolves late) finish.

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

---------

Co-authored-by: Brandon Elliott <923787+Brandon168@users.noreply.github.com>
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-11-24 15:51:30 +00:00
Mohamed BoudraandTaras Kornichuk e06bfbb94c Redesign host picker with configurable auto-detected icons, connection type, and latency (#10702)
Supersedes #5787.

- Add best-effort daemon hardware detection (macOS ioreg/sysctl, Linux containers, WSL, device-tree boards, cloud/VM DMI, SMBIOS chassis) exposed as optional `machineKind` on `server_info` and `/api/status`.
- Add configurable per-host icons in Host Settings -> Appearance (`Auto` plus 9 icons across all 9 locales), keeping `icon` omitted while untouched for rollback compatibility and preserving unknown future icons on disk.
- Redesign `HostPicker` and `HostChooserModal` with resolved host icons, connection type (`Local`, `Tailscale`, `Relay`, `SSH`, `Direct`, `Via`) + endpoint, on-demand round-trip latency, aligned leading and content rails, and full keyboard navigation.
- Update the website host mockup to match.

Co-authored-by: Taras Kornichuk <dread9ko@gmail.com>
2026-11-24 21:52:39 +07:00
paseo-bot[bot] 7bcd598f09 test(terminal): speed up history setup for pressure recovery (#10683)
Windows timed out while the fixture printed 12,050 rows before signaling readiness. Batch the initial writes and keep the live burst and replay assertions.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-24 12:01:34 +00:00
Mohamed Boudra c626bf3707 Skip worktree teardown commands for unapproved cross-repository checkouts (#10694)
* fix(server): skip teardown commands when archiving unapproved checkouts

`archiveByScope` previously treated `assertWorkspaceAutomationAllowed` as optional and did not skip `runWorktreeTeardownCommands` when `untrustedBacking` was already true or when archiving an unrecorded worktree directory. Four callers (`CreateAgentLifecycleDispatch`, `archiveIfSafe`, `paseo-tools` `archive_workspace`, and `handlePaseoWorktreeArchiveRequest`) also omitted `assertWorkspaceAutomationAllowed`, letting `paseo.json` teardown commands run during failed agent creation cleanup, first-turn auto-archive, auto-archive on merge, MCP workspace archive, and worktree archive RPCs.

Make `assertWorkspaceAutomationAllowed` and `isCheckoutUntrusted` required on `ArchiveDependencies`, skip teardown whenever the backing checkout is untrusted, any workspace on the checkout is blocked, or no active workspace record exists, and wire the guard through all archive callers.

* fix(server): scope archive teardown check to active checkout workspaces

`isCheckoutUntrusted` scans all workspace records by path, including previously archived records, so gating teardown on it suppressed `paseo.json` teardown for a fresh approved worktree that reused a previously archived unapproved slug path.

Keep teardown approval scoped to the active workspaces sharing the backing checkout at archive start (the records being archived plus active siblings), drop the null-workspace fallback target for unrecorded worktree-scope archives so they never run teardown or flip `untrustedBacking`, and verify caller wiring reaches `assertWorkspaceAutomationAllowed` directly.

* fix(server): inherit untrustedSource when unarchiving onto an active unapproved checkout

Unarchiving a previously approved workspace onto an existing directory that currently holds an active unapproved checkout left the restored workspace without `untrustedSource`. If the unapproved sibling was archived first, the directory remained on disk and archiving the restored workspace could run teardown commands.

Inherit `untrustedSource` from active workspaces sharing the checkout root in `ensureWorkspaceRecordUnarchived`, while ignoring already-archived historical records so restoring an approved checkout onto a reused path stays approved.

* fix(server): bind automation approval state to checkout worktree metadata

Keeping `untrustedSource` only on workspace records meant a retained unapproved worktree directory could lose its teardown block if its last unapproved workspace was archived and an older approved workspace was unarchived onto that path, while scanning archived records by path blocked fresh worktrees that reused a deleted slug.

Persist `untrustedSource` on the checkout itself in `paseo/worktree.json` when creating or restoring an unapproved worktree, clear it in `clearWorkspaceAutomationBlock` when setup is approved, and read it in both `workspace-archive-service` and `workspace-provisioning-service`. Deleting the worktree removes its metadata automatically, so fresh worktrees reusing the path start clean while retained checkouts keep their block across workspace archives and restores.

* fix(server): backfill worktree metadata when archiving retained unapproved checkouts

Unapproved checkouts created before `paseo/worktree.json` stored `untrustedSource` carry their block only in the workspace record. If archive keeps the directory on disk (such as a retained sibling or nested worktree), backfilling `untrustedSource` into `paseo/worktree.json` before removal ensures the retained checkout keeps its block even after its unapproved workspace record is archived.

* fix(server): never propagate archived untrustedSource onto fresh checkouts

Both archive metadata backfill and directory workspace creation previously consulted already-archived records matching a path, allowing an old archived unapproved record to copy `untrustedSource` onto a fresh approved worktree that reused the same slug path.

Ignore `untrustedSource` on already-archived records during archive target resolution and metadata backfill (only backfill when active workspaces are being archived), and share one `resolveCheckoutUntrustedSource` rule across `createWorkspaceForDirectory` and `ensureWorkspaceRecordUnarchived` that checks `paseo/worktree.json` first and falls back only to active workspaces.

* fix(server): align unarchived workspace approval state with the live checkout

Unarchiving an old unapproved workspace onto a path already owned by an active approved checkout kept the old record's stale `untrustedSource`, causing a later re-archive of that workspace to backfill the block onto the fresh checkout's metadata.

Align `ensureWorkspaceRecordUnarchived` symmetrically with the live checkout: adopt `untrustedSource` from `paseo/worktree.json` or active workspaces on the checkout when present, and drop stale `untrustedSource` when live active workspaces own an approved checkout at that path.

* fix(server): preserve block when opening a pre-upgrade retained checkout

Opening a pre-upgrade retained checkout directory whose last unapproved workspace was already archived before this change has no active workspace on the path and no `untrustedSource` in `paseo/worktree.json`.

In `resolveCheckoutUntrustedSource`, prefer `paseo/worktree.json`, then active workspaces on the checkout when any exist (so a fresh approved worktree at a reused path stays approved), and only when zero active workspaces exist on the directory fall back to the most recently archived record for that path.

* fix(server): share one checkout approval lookup across open and unarchive

* fix(server): resolve checkout approval state only from metadata and active workspaces

* fix(server): keep archive read-only on worktree approval metadata

* fix(server): serialize setup approval with archive checkout lock and backfill retained metadata

* fix(server): fail setup approval before clearing records when worktree metadata write fails
2026-11-24 17:46:23 +07:00
Mohamed Boudra 8b2e14f3d2 Run resolved forge CLI executables directly (#10685)
* fix(server): run resolved forge CLI executables directly

The GitHub, GitLab, and Gitea adapters resolved gh, glab, and tea with findExecutable, then discarded the resolved path and spawned the bare command name. On Windows, spawning an extensionless bare name routes through cmd.exe, which resolves commands against cwd first, expands %VAR% references, and truncates multiline arguments such as gh api graphql queries.

Forward the resolved executablePath from each forge adapter and auth probe into the shared runner, resolve bare binary names inside createForgeCliRunner when omitted, and restrict bare-name PATH discovery in findExecutable to absolute PATH directories.

* fix(server): re-resolve cached forge CLI paths if the binary disappears

Cached CLI path resolvers now support targeted invalidation, and forge adapters plus createForgeCliRunner invalidate and retry once when a previously resolved executable disappears at launch time (ENOENT, or a missing Windows batch launcher). This preserves cached lookups on normal runs while recovering automatically when a user uninstalls or relocates an installation while another copy remains on PATH.

* fix(server): refresh cached forge CLI path on any unlaunchable spawn error

Match executable-resolution's unlaunchable spawn error set (ENOENT, EACCES, ENOEXEC, UNKNOWN) when deciding whether to invalidate and re-resolve a cached forge CLI path, so losing execute permission falls back to another working copy on PATH.
2026-11-24 14:37:28 +07:00
Mohamed Boudra da74f7de1f Offer Push and Pull for a branch whose remote is not named origin (#10679)
* fix(git): offer Push and Pull for a branch whose remote is not origin

A checkout whose only remote has another name, with main tracking that
remote's main, got no Push, Pull or Pull and push. The app gated all three
on hasRemote, which is true only when origin is configured, and the
daemon's pull refused to run without origin.

Neither action needs origin. The daemon now reports where each one goes for
the current branch (pullRemote, pushRemote) and the app offers the actions
from those. One resolver picks the push destination for both the status and
the push, so the offer and the push cannot disagree.

Without origin, Push follows the upstream only when the upstream branch has
the branch's own name and git pushes the branch to that remote. A branch
such as feature tracking upstream/main can be pulled and is not pushed.
With origin, every push goes where it went before.

firstPushRemote stays on the wire for apps that predate pushRemote.

* fix(git): follow Git's own push destination when origin is missing

Without origin, Push compared the upstream's remote with the remote Git
pushes the branch to. That missed a push refspec: with
remote.<upstream>.push set, plain `git push` updates another branch, and
Paseo still updated the upstream. A regular checkout with a push refspec on
branch.<name>.pushRemote was pushed there and stayed ahead of its upstream.

Push now asks Git where `git push` sends the branch (%(push)) and follows
the upstream only when that is the upstream. This also covers
push.default. A Paseo worktree keeps the push refspec Paseo configures for
a PR checkout.

Pull no longer requires a configured upstream before it runs. Git decides,
so a branch with no upstream in a single-branch clone pulls again.

* fix(git): compare the push remote by name when origin is missing

Push compared Git's push destination with the upstream as remote-tracking
refs. Two remotes whose fetch refspecs map onto the same tracking namespace
give the same ref for different repositories, so a branch Git pushes to one
remote was sent to the other. The remote Git pushes to is now compared by
name as well.

* fix(git): leave a matching-mode push to the user when origin is missing

Under push.default=matching, git push sends a branch only when the remote still has it. The checkout's remote-tracking ref can outlive a branch deleted on the remote, so the daemon cannot tell from local metadata that the push would go to the upstream, and its explicit push would recreate the branch. Without origin, Push is now refused in that mode.
2026-11-24 14:37:23 +07:00
Mohamed Boudra 767c1efa03 Show OpenCode Go usage from the login store the installed OpenCode uses (#10678)
* fix(usage): read OpenCode Go logins from the store the installed OpenCode uses

The source treated a `credential` table in opencode.db as proof of OpenCode 2
and then ignored auth.json. OpenCode 1.17.5 and newer creates that table too
and leaves it empty, and OpenCode 2 fills it once when it opens the same data
directory. In both cases the Go key in auth.json was dropped and the source
disappeared.

The source no longer reads OpenCode's database. It asks the installed OpenCode
for its version. OpenCode 2 lists its own logins with
`opencode auth export --standalone`, with its own choice of the active one per
integration. OpenCode 1 keeps logins in auth.json. A failed OpenCode 2 listing
throws, so it never reads as "no login". An auth.json key is not used when
OpenCode 2 is installed, because OpenCode 2 never reads that file after its
one-time import.

`--standalone` matters: without it the command starts OpenCode's background
service and leaves it running.

* chore(usage): request a review of the resolved threads

* fix(usage): keep the OpenCode Go card when the version check is cut off

A version check that reached its timeout was read as OpenCode 1. Discovery then
read auth.json, and a login that only OpenCode 2 has was reported as removed.
A check that is cut off does not show which store OpenCode uses, so discovery
now fails and the daemon keeps the account it already knew.

A missing OpenCode, or one that exits with an error, still reads auth.json:
that file is the only store when OpenCode is not installed.

* fix(usage): recognize OpenCode 2 when the daemon's environment forces colors

With FORCE_COLOR set, OpenCode 2 writes its version with ANSI codes even into
a pipe. The version did not parse, the source took OpenCode for version 1, and
a login that only OpenCode 2 has disappeared. The source now runs OpenCode with
NO_COLOR, which gives plain output for the version and the login listing.

* fix(usage): read the auth.json Go key when OpenCode 2 has no Go login

OpenCode 2 imports auth.json only once. A Go key that is saved in the file
after that import is in no other place, so the card was still missing for
the state in #10659 when the installed OpenCode is 2.x: the credential
listing holds only an unrelated login and the Go key is in auth.json.

The order is now: a login OpenCode 2 can serve Go with wins, so a stale key
in the file never replaces it. Without one, the auth.json key is used. A
failed listing still throws, because it does not show that OpenCode 2 has
no Go login.

* fix(usage): read the auth.json Go key behind an OpenCode 2 login without Go

The auth.json fallback applied only when OpenCode 2 listed neither an
`opencode` nor an `opencode-go` login. With an `opencode` login whose
Console workspace has no Go, the card reported "No active OpenCode Go
subscription" while a working Go key was in auth.json.

The file's key now stands in for a missing `opencode-go` login. The
existing order then decides: the `opencode` login is asked first, and the
Go key is asked only when the Console refuses that login. A temporary
failure still keeps the card on the `opencode` login.
2026-11-24 14:37:18 +07:00
paseo-bot[bot] e03fe0d8e7 test(server): avoid per-file Git work in the diff stream fixture (#10633)
Stage the generated additions so both diff paths can read their patches in bulk while still comparing against HEAD.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-24 00:01:37 +00:00
Mohamed Boudra ff27da07bf chore(release): reconcile v0.17.4 (#10645) 2026-11-24 06:16:30 +07:00
964 changed files with 84407 additions and 12634 deletions
+1
View File
@@ -56,6 +56,7 @@ sdk:
- "packages/plugin/**"
- "plugin-examples/**"
- "public-docs/plugins/**"
- "skills/paseo-plugin/**"
- "packages/client/**"
- "packages/highlight/**"
- "packages/protocol/**"
+25 -4
View File
@@ -87,10 +87,6 @@ jobs:
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
- name: Verify dependency signatures
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.quality != 'false') }}
run: npm audit signatures
- name: Lint
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.quality != 'false') }}
run: npm run lint
@@ -135,6 +131,29 @@ 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
# Plugin process launches and launch wraps quote for cmd.exe, which only real Windows checks.
sdk-tests-windows:
name: sdk-tests (windows-latest)
needs: changes
if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.sdk != 'false') }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
- name: Install dependencies
run: node scripts/npm-retry.mjs ci
- name: Build plugin SDK
run: npm run build:relay && npm run build:client && npm run build:plugin
- 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
@@ -323,6 +342,8 @@ jobs:
run: |
npm run test:unit --workspace=@getpaseo/server -- \
src/server/file-observer \
src/server/workspace-reconciliation-observation.test.ts \
src/utils/checkout-git-identity.test.ts \
src/server/workspace-git-service.observation.test.ts \
src/server/workspace-git-service.observation.integration.test.ts \
--bail=1
+5 -4
View File
@@ -38,9 +38,9 @@ on:
- "true"
- "false"
rollout_hours:
description: "Linear rollout duration in hours. Use 0 for instant rollout."
description: "Rollout duration in hours: a 5% canary hold, then a ramp to 100%. Use 0 to admit everyone at once."
required: false
default: "36"
default: "18"
type: string
concurrency:
@@ -51,7 +51,7 @@ env:
SOURCE_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
CHECKOUT_REF: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.checkout_ref || github.ref_name) || github.ref_name }}
SHOULD_PUBLISH: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.publish != 'false' }}
ROLLOUT_HOURS: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.rollout_hours || '36' }}
ROLLOUT_HOURS: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.rollout_hours || '18' }}
DESKTOP_PACKAGE_PATH: "packages/desktop"
jobs:
@@ -96,6 +96,7 @@ jobs:
publish-macos:
needs: [create-release]
if: ${{ always() && (needs.create-release.result == 'success' || needs.create-release.result == 'skipped') && ((github.event_name == 'workflow_dispatch' && (github.event.inputs.platform == 'all' || github.event.inputs.platform == 'macos')) || (github.event_name == 'push' && (startsWith(github.ref_name, 'v') || startsWith(github.ref_name, 'desktop-v') || startsWith(github.ref_name, 'desktop-macos-v')))) }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
@@ -181,7 +182,7 @@ jobs:
npm run build:desktop "${build_args[@]}"
- name: Upload packaged smoke diagnostics
if: failure()
if: always()
uses: actions/upload-artifact@v4
with:
name: desktop-smoke-macos-${{ matrix.electron_arch }}
-3
View File
@@ -422,7 +422,6 @@
"packages/app/src/components/headers/back-header.tsx",
"packages/app/src/components/headers/screen-header.tsx",
"packages/app/src/components/host-status-dot.tsx",
"packages/app/src/components/hosts/host-picker.tsx",
"packages/app/src/components/icons/paseo-logo.tsx",
"packages/app/src/components/left-sidebar.tsx",
"packages/app/src/components/plan-card.tsx",
@@ -552,9 +551,7 @@
"packages/app/src/components/download-toast.tsx",
"packages/app/src/components/file-explorer-pane.tsx",
"packages/app/src/components/headers/back-header.tsx",
"packages/app/src/components/highlighted-code-block.tsx",
"packages/app/src/components/hosts/host-filter.tsx",
"packages/app/src/components/hosts/host-picker.tsx",
"packages/app/src/components/import-session-sheet.tsx",
"packages/app/src/components/left-sidebar.tsx",
"packages/app/src/components/markdown/fence/mermaid/host.native.tsx",
+129
View File
@@ -1,5 +1,134 @@
# Changelog
## 0.18.0 - 2026-11-27
- **Remote workspace browser proxy:** Desktop browser tabs in remote workspaces now route through the workspace daemon, so remote `localhost` servers open directly in Paseo. ([#10944](https://github.com/getpaseo/paseo/pull/10944) by [@airon-assustadus](https://github.com/airon-assustadus))
- **Per-device notification preferences:** Each device can choose which agent, terminal, and plugin events send notifications, and plugins can send notifications and handle taps. ([#10888](https://github.com/getpaseo/paseo/pull/10888))
- **Agent profile system prompts:** Save an optional system prompt on an agent profile to apply it to new agents started from that profile. ([#10996](https://github.com/getpaseo/paseo/pull/10996))
- **More syntax highlighting:** Syntax highlighting now covers diff and patch files along with Ruby, Kotlin, TOML, SQL, Lua, Protobuf, PowerShell, Groovy, Gradle, Scala, CMake, Properties, INI, R, Perl, and LaTeX. ([#11026](https://github.com/getpaseo/paseo/pull/11026) by [@hmalaspina](https://github.com/hmalaspina), [@kukicola](https://github.com/kukicola), [@MaximeConan](https://github.com/MaximeConan), [@singleton11](https://github.com/singleton11), [@chandlerok](https://github.com/chandlerok))
### Changed
- Changed ACP providers to cache model catalogs across daemon restarts instead of probing in the background, and cleaned up Antigravity ACP flags and metadata. Requires [Antigravity CLI 1.5.1 or later](https://paseo.sh/docs/supported-providers/antigravity) ([#10992](https://github.com/getpaseo/paseo/pull/10992))
### Fixed
- Fixed Paseo iOS crashing shortly after connecting when an enabled client plugin imports `react-native` ([#11011](https://github.com/getpaseo/paseo/pull/11011))
- Fixed OpenCode v2 agents staying stuck in running after Stop when stream events were missed or chat history was large ([#10955](https://github.com/getpaseo/paseo/pull/10955))
- Fixed steering a Pi agent during a run it started on its own aborting the run instead of steering it ([#10977](https://github.com/getpaseo/paseo/pull/10977) by [@viiqswim](https://github.com/viiqswim))
- Fixed creating a workspace from a pull request in a fork clone checking out the fork's pull request with the same number ([#10987](https://github.com/getpaseo/paseo/pull/10987))
- Fixed dropping images or files onto the composer leaving the input unfocused ([#11022](https://github.com/getpaseo/paseo/pull/11022))
## 0.17.6 - 2026-11-27
### Improved
- Reorganized Settings into Device and Host sections and consolidated sparse pages ([#10933](https://github.com/getpaseo/paseo/pull/10933))
- Added arrow-key navigation for models, providers, and profiles in the model picker ([#10929](https://github.com/getpaseo/paseo/pull/10929), [#10962](https://github.com/getpaseo/paseo/pull/10962))
- Added an in-place Refresh control for Tailscale availability in host settings and setup ([#10903](https://github.com/getpaseo/paseo/pull/10903))
### Changed
- Removed the Antigravity usage source that ran `agy -p /usage` in the background ([#10953](https://github.com/getpaseo/paseo/pull/10953) by [@luoph](https://github.com/luoph))
### Fixed
- Fixed Paseo Android crashing on Samsung devices when a chat shows a code block or quote ([#10964](https://github.com/getpaseo/paseo/pull/10964))
- Fixed mouse clicks not selecting model picker rows on Android ([#10972](https://github.com/getpaseo/paseo/pull/10972))
- Fixed macOS Desktop freezing during startup because of Dock progress bar updates ([#10939](https://github.com/getpaseo/paseo/pull/10939))
- Fixed Linux AppImage leaking its runtime environment into shells and child processes ([#10920](https://github.com/getpaseo/paseo/pull/10920))
- Fixed background Git fetches on Linux spawning orphan D-Bus daemons and retrying failing auth in a loop ([#10921](https://github.com/getpaseo/paseo/pull/10921))
- Fixed flashes when restoring archived workspaces and agents, and added an unarchiving state ([#10928](https://github.com/getpaseo/paseo/pull/10928))
- Fixed worktree ownership drifting outside the configured worktrees root ([#10878](https://github.com/getpaseo/paseo/pull/10878))
- Fixed new web tabs losing projects after another tab evicts the directory cache ([#10942](https://github.com/getpaseo/paseo/pull/10942))
- Fixed timelines dropping rows when a rewind epoch changes ([#8794](https://github.com/getpaseo/paseo/pull/8794) by [@LiebeLee](https://github.com/LiebeLee))
## 0.17.5 - 2026-11-26
- **Archive workspaces together:** Cmd/Ctrl+click a workspace in the sidebar to select multiple workspaces and archive them in one step. ([#10798](https://github.com/getpaseo/paseo/pull/10798), [#10821](https://github.com/getpaseo/paseo/pull/10821))
- **Copy quoted drafts:** Copy a quote from a reply with one tap, without the `>` markers. ([#10608](https://github.com/getpaseo/paseo/pull/10608) by [@pedrovieira](https://github.com/pedrovieira), [@dinhphieu](https://github.com/dinhphieu))
- **Redesigned agent profiles page:** Agent profiles have their own dedicated settings page, and the model picker saves a new profile in one tap. ([#10789](https://github.com/getpaseo/paseo/pull/10789), [#10824](https://github.com/getpaseo/paseo/pull/10824))
- **Redesigned Add project:** Add project opens on folder search, with Clone and New folder one tab away. ([#10767](https://github.com/getpaseo/paseo/pull/10767))
- **Choose how Desktop updates:** Desktop can download updates automatically, only notify you, or never check. ([#10785](https://github.com/getpaseo/paseo/pull/10785))
- **First-class Tailscale support:** Turn on Tailscale for a host from its settings or from setup, without editing its configuration. ([#10801](https://github.com/getpaseo/paseo/pull/10801))
### Added
- Added host icons, connection types, and latency to the host picker ([#10702](https://github.com/getpaseo/paseo/pull/10702) by [@artile](https://github.com/artile))
- Added agent profiles to model picker search and the Command Center ([#10774](https://github.com/getpaseo/paseo/pull/10774))
- Added Archive on finish to `paseo schedule create`, `paseo schedule update`, and the schedule MCP tools ([#8479](https://github.com/getpaseo/paseo/pull/8479) by [@ArnoldHueteG](https://github.com/ArnoldHueteG))
- Added newer Factory Droid models by updating its catalog entry to Droid 1.20.0 ([#10779](https://github.com/getpaseo/paseo/pull/10779) by [@dsingal0](https://github.com/dsingal0))
### Changed
- Changed automatic stable Desktop updates to check at most every 6 hours and to wait 24 hours after each update ([#10882](https://github.com/getpaseo/paseo/pull/10882), [#10901](https://github.com/getpaseo/paseo/pull/10901))
### Fixed
- Fixed agents hiding the subagents they create from tabs and the subagent track ([#10887](https://github.com/getpaseo/paseo/pull/10887))
- Fixed parent agents getting a Claude subagent's interim reply instead of its final reply when the subagent waits on background work ([#10864](https://github.com/getpaseo/paseo/pull/10864))
- Fixed agents that watch a pull request staying in Running after their turn ends ([#10740](https://github.com/getpaseo/paseo/pull/10740) by [@drgould](https://github.com/drgould))
- Fixed the Changes pane offering no Push or Pull when the remote is not named `origin` ([#10679](https://github.com/getpaseo/paseo/pull/10679))
- Fixed a pane switching to the wrong tab after you split or move its active tab out ([#10716](https://github.com/getpaseo/paseo/pull/10716))
- Fixed New workspace leaving focus on the project button after you choose a project ([#10632](https://github.com/getpaseo/paseo/pull/10632))
- Fixed archived chats staying in memory until the window reloads ([#10866](https://github.com/getpaseo/paseo/pull/10866))
- Fixed hover cards and other overlays slowing down in long app sessions ([#10778](https://github.com/getpaseo/paseo/pull/10778) by [@maci0](https://github.com/maci0))
- Fixed Desktop freezing when you open a chat whose last turn has hundreds of tool calls ([#8661](https://github.com/getpaseo/paseo/pull/8661) by [@luoph](https://github.com/luoph))
- Fixed direct connections dropping on slow links while a large timeline loads ([#10651](https://github.com/getpaseo/paseo/pull/10651) by [@apple-ouyang](https://github.com/apple-ouyang))
- Fixed large Git workspaces stalling the daemon while their file watchers scan ([#10788](https://github.com/getpaseo/paseo/pull/10788), [#10602](https://github.com/getpaseo/paseo/pull/10602))
- Fixed a Git change in one repository rescanning every checkout ([#10863](https://github.com/getpaseo/paseo/pull/10863) by [@viiqswim](https://github.com/viiqswim))
- Fixed iOS chats staying blank when a pending question is taller than the screen ([#10759](https://github.com/getpaseo/paseo/pull/10759))
- Fixed Android long-press text selection in chat leaving the magnifier stuck on screen ([#10844](https://github.com/getpaseo/paseo/pull/10844))
- Fixed mobile sheet footers dropping behind the system bar when the keyboard closes ([#10827](https://github.com/getpaseo/paseo/pull/10827))
- Fixed the sidebar toggle covering plugin screen titles on macOS ([#10773](https://github.com/getpaseo/paseo/pull/10773))
- Fixed Windows file links with a slash before the drive letter failing to open ([#7711](https://github.com/getpaseo/paseo/pull/7711))
- Fixed Import Session giving up on slow providers and hiding provider errors ([#10516](https://github.com/getpaseo/paseo/pull/10516) by [@chirag127](https://github.com/chirag127), [@derek-geekdive](https://github.com/derek-geekdive))
- Fixed OMP 19.1 `ask` questions not showing a question card ([#10862](https://github.com/getpaseo/paseo/pull/10862) by [@gtoxlili](https://github.com/gtoxlili))
- Fixed OpenCode 2 agents with their own MCP servers failing when a shared OpenCode server is running. Requires OpenCode 2.0.29 or later ([#10752](https://github.com/getpaseo/paseo/pull/10752))
- Fixed deleted OpenCode subagents staying in the subagent track ([#8332](https://github.com/getpaseo/paseo/pull/8332))
- Fixed stopped Claude background subagents showing as running after you reopen the parent ([#9013](https://github.com/getpaseo/paseo/pull/9013))
- Fixed plugin and Paseo instructions replacing a Codex agent's own `developer_instructions` ([#10792](https://github.com/getpaseo/paseo/pull/10792))
- Fixed the OpenCode Go usage card missing when the Go key is in OpenCode's `auth.json` ([#10678](https://github.com/getpaseo/paseo/pull/10678))
- Fixed GitHub, GitLab, and Gitea commands on Windows breaking multiline arguments and expanding `%VAR%` text ([#10685](https://github.com/getpaseo/paseo/pull/10685))
- Fixed `paseo hub login` printing a link without the code ([#10751](https://github.com/getpaseo/paseo/pull/10751))
- Fixed Hub trigger runs failing on Antigravity and other plugin providers without tool policy support ([#10889](https://github.com/getpaseo/paseo/pull/10889))
- Fixed Hub sessions being refused when they read a daemon's provider controls ([#10794](https://github.com/getpaseo/paseo/pull/10794))
- Fixed Hermes and other plugin ACP providers leaving processes running after a model list refresh times out ([#10867](https://github.com/getpaseo/paseo/pull/10867))
- Fixed a plugin's agent tools returning `Tool not found` after the plugin reloads during a turn ([#10106](https://github.com/getpaseo/paseo/pull/10106) by [@tomgrin10](https://github.com/tomgrin10))
- Fixed replies changed by a timeline plugin losing Copy, Fork, and turn duration ([#10795](https://github.com/getpaseo/paseo/pull/10795) by [@Brandon168](https://github.com/Brandon168))
- Fixed idle plugin sessions waking the daemon every 10 seconds ([#9363](https://github.com/getpaseo/paseo/pull/9363) by [@Brandon168](https://github.com/Brandon168))
### Security
- Changed Claude Code 2.1.326 or later to receive MCP server tokens over stdin instead of in process arguments that other local users can read ([#10698](https://github.com/getpaseo/paseo/pull/10698) by [@mdbraber](https://github.com/mdbraber))
- Fixed repository teardown commands running on archive for pull request worktrees whose setup you have not approved ([#10694](https://github.com/getpaseo/paseo/pull/10694))
### Plugins
- Added launch wraps so plugins can run agents, terminals, and worktree commands inside a sandbox ([#10786](https://github.com/getpaseo/paseo/pull/10786) by [@clkao](https://github.com/clkao), [@bendavid](https://github.com/bendavid))
- Added the parent workspace to plugin workspace snapshots ([#10781](https://github.com/getpaseo/paseo/pull/10781) by [@spatenotte](https://github.com/spatenotte))
- Updated the bundled `paseo-plugin` skill to the current plugin API ([#10793](https://github.com/getpaseo/paseo/pull/10793))
## 0.17.4 - 2026-11-23
### Fixed
- Fixed numbered sublists overlapping their text and quotes inside lists overlapping later messages on Android ([#10499](https://github.com/getpaseo/paseo/pull/10499))
- Fixed Android terminal input so it asks the keyboard to exclude typed text from personalized learning ([#10586](https://github.com/getpaseo/paseo/pull/10586))
- Fixed conversations disappearing when directory capitalization differs on a case-insensitive file system ([#10555](https://github.com/getpaseo/paseo/pull/10555) by [@yzim](https://github.com/yzim))
- Fixed interrupt and steer messages to archived agents being queued without starting a turn ([#10611](https://github.com/getpaseo/paseo/pull/10611) by [@thomasvan](https://github.com/thomasvan))
- Fixed Hermes Shell rows omitting part of the command ([#10614](https://github.com/getpaseo/paseo/pull/10614))
- Fixed OpenCode Go usage for logins stored in the OpenCode 2 database, including Console sign-ins and API keys ([#8729](https://github.com/getpaseo/paseo/pull/8729), [#10612](https://github.com/getpaseo/paseo/pull/10612))
- Fixed existing OpenCode sessions failing to reopen after Paseo tool definitions change ([#10533](https://github.com/getpaseo/paseo/pull/10533) by [@Peanut-HZM](https://github.com/Peanut-HZM))
- Fixed Paseo tools missing from agents that use MCP protocol version `2026-07-28` ([#10558](https://github.com/getpaseo/paseo/pull/10558) by [@apple-ouyang](https://github.com/apple-ouyang))
- Fixed Codex MCP startup failures missing from daemon warning logs ([#10566](https://github.com/getpaseo/paseo/pull/10566))
- Fixed the daemon exiting when it closes a session after the plugin process has stopped ([#10585](https://github.com/getpaseo/paseo/pull/10585))
- Fixed Git commands selecting the wrong repository when a directory has the layout of a bare repository ([#10587](https://github.com/getpaseo/paseo/pull/10587))
- Fixed Claude Auto permission mode being unavailable on Bedrock and Vertex ([#6904](https://github.com/getpaseo/paseo/pull/6904))
- Fixed the sidebar host settings button requiring two clicks to open settings ([#10562](https://github.com/getpaseo/paseo/pull/10562) by [@ShalokShalom](https://github.com/ShalokShalom))
- Fixed the Changes pane not offering Push for a new branch that was never pushed in a regular checkout ([#10631](https://github.com/getpaseo/paseo/pull/10631))
- Fixed the daemon using the wrong model catalog when Hub sends a workspace directory for trigger validation ([#10582](https://github.com/getpaseo/paseo/pull/10582))
## 0.17.3 - 2026-11-22
### Fixed
+129
View File
@@ -1,5 +1,134 @@
# Changelog
## 0.18.0 - 2026-11-27
- **远程工作区浏览器代理**:远程工作区中的桌面端浏览器标签页现在会通过该工作区的 daemon 转发流量,远程 `localhost` 服务可以直接在 Paseo 中打开。([#10944](https://github.com/getpaseo/paseo/pull/10944),贡献者:[@airon-assustadus](https://github.com/airon-assustadus))
- **按设备配置通知偏好**:每台设备都可以分别选择哪些 Agent、终端和插件事件发送通知,插件现在也可以发送通知并处理点击。([#10888](https://github.com/getpaseo/paseo/pull/10888))
- **智能体配置文件系统提示词**:在智能体配置文件中保存可选的系统提示词,以便在通过该配置启动新 Agent 时应用。([#10996](https://github.com/getpaseo/paseo/pull/10996))
- **更多语法高亮语言**:语法高亮现已支持 diff 和 patch 文件,以及 Ruby、Kotlin、TOML、SQL、Lua、Protobuf、PowerShell、Groovy、Gradle、Scala、CMake、Properties、INI、R、Perl 和 LaTeX。([#11026](https://github.com/getpaseo/paseo/pull/11026),贡献者:[@hmalaspina](https://github.com/hmalaspina), [@kukicola](https://github.com/kukicola), [@MaximeConan](https://github.com/MaximeConan), [@singleton11](https://github.com/singleton11), [@chandlerok](https://github.com/chandlerok))
### 变更
- ACP Provider 现在会在 daemon 重启间将已发现的模型目录缓存到磁盘,不再在后台轮询,同时清理了多余的 Antigravity ACP 参数和元数据。需要 [Antigravity CLI 1.5.1 或更高版本](https://paseo.sh/zh-CN/docs/supported-providers/antigravity) ([#10992](https://github.com/getpaseo/paseo/pull/10992))
### 修复
- 修复已启用的客户端插件导入 `react-native` 时,Paseo iOS 在连接后不久崩溃的问题 ([#11011](https://github.com/getpaseo/paseo/pull/11011))
- 修复流事件丢失或对话历史较大时,OpenCode v2 Agent 在点击停止后仍停留在运行中的问题 ([#10955](https://github.com/getpaseo/paseo/pull/10955))
- 修复在 Pi Agent 运行其自行启动的轮次时发送引导消息会中止该轮次而不是引导它的问题 ([#10977](https://github.com/getpaseo/paseo/pull/10977),贡献者:[@viiqswim](https://github.com/viiqswim))
- 修复在 fork 克隆中根据 PR 创建工作区时,检出到 fork 中同编号 PR 的问题 ([#10987](https://github.com/getpaseo/paseo/pull/10987))
- 修复向 Composer 拖放图片或文件后输入框未获得焦点的问题 ([#11022](https://github.com/getpaseo/paseo/pull/11022))
## 0.17.6 - 2026-11-27
### 改进
- 将设置重组为设备和主机两个范围,并合并了内容较少的页面 ([#10933](https://github.com/getpaseo/paseo/pull/10933))
- 为模型选择器中的模型、Provider 和配置文件新增方向键导航 ([#10929](https://github.com/getpaseo/paseo/pull/10929), [#10962](https://github.com/getpaseo/paseo/pull/10962))
- 在主机设置和初始设置中新增就地刷新 Tailscale 可用性的按钮 ([#10903](https://github.com/getpaseo/paseo/pull/10903))
### 变更
- 移除了在后台运行 `agy -p /usage` 的 Antigravity 用量数据源 ([#10953](https://github.com/getpaseo/paseo/pull/10953),贡献者:[@luoph](https://github.com/luoph))
### 修复
- 修复对话中出现代码块或引用时 Paseo Android 在三星设备上崩溃的问题 ([#10964](https://github.com/getpaseo/paseo/pull/10964))
- 修复在 Android 上使用鼠标点击无法选择模型选择器行的问题 ([#10972](https://github.com/getpaseo/paseo/pull/10972))
- 修复 macOS 桌面端因 Dock 进度条更新在启动时卡死的问题 ([#10939](https://github.com/getpaseo/paseo/pull/10939))
- 修复 Linux AppImage 将其运行时环境变量泄漏到 Shell 和子进程的问题 ([#10920](https://github.com/getpaseo/paseo/pull/10920))
- 修复 Linux 上后台 Git fetch 启动孤立 D-Bus 进程并在认证失败后循环重试的问题 ([#10921](https://github.com/getpaseo/paseo/pull/10921))
- 修复恢复已归档工作区和 Agent 时的界面闪烁问题,并新增恢复中状态提示 ([#10928](https://github.com/getpaseo/paseo/pull/10928))
- 修复 worktree 所有权超出已配置 worktrees 根目录的问题 ([#10878](https://github.com/getpaseo/paseo/pull/10878))
- 修复另一个标签页淘汰目录缓存后,新打开的网页标签页丢失 project 的问题 ([#10942](https://github.com/getpaseo/paseo/pull/10942))
- 修复 rewind epoch 变更时时间线丢失行的问题 ([#8794](https://github.com/getpaseo/paseo/pull/8794),贡献者:[@LiebeLee](https://github.com/LiebeLee))
## 0.17.5 - 2026-11-26
- **批量归档工作区**:在侧边栏按住 Cmd/Ctrl 点击工作区即可多选,一步归档。([#10798](https://github.com/getpaseo/paseo/pull/10798), [#10821](https://github.com/getpaseo/paseo/pull/10821))
- **复制引用草稿**:一键复制回复中的引用内容,不带 `>` 标记。([#10608](https://github.com/getpaseo/paseo/pull/10608),贡献者:[@pedrovieira](https://github.com/pedrovieira), [@dinhphieu](https://github.com/dinhphieu))
- **重新设计的智能体配置文件页面**:智能体配置文件现在有专属的设置页面,模型选择器一键即可保存新的配置文件。([#10789](https://github.com/getpaseo/paseo/pull/10789), [#10824](https://github.com/getpaseo/paseo/pull/10824))
- **重新设计的添加 project**:“添加 project”直接打开文件夹搜索,克隆和新建文件夹只需切换一个标签页。([#10767](https://github.com/getpaseo/paseo/pull/10767))
- **选择桌面端的更新方式**:桌面端可以自动下载更新、仅通知你,或完全不检查。([#10785](https://github.com/getpaseo/paseo/pull/10785))
- **全面支持 Tailscale**:在主机设置或初始设置中为主机开启 Tailscale,无需编辑配置。([#10801](https://github.com/getpaseo/paseo/pull/10801))
### 新增
- 在主机选择器中新增主机图标、连接类型和延迟 ([#10702](https://github.com/getpaseo/paseo/pull/10702),贡献者:[@artile](https://github.com/artile))
- 在模型选择器搜索和命令中心中新增智能体配置文件 ([#10774](https://github.com/getpaseo/paseo/pull/10774))
- 为 `paseo schedule create`、`paseo schedule update` 和定时任务 MCP 工具新增“完成后归档”选项 ([#8479](https://github.com/getpaseo/paseo/pull/8479),贡献者:[@ArnoldHueteG](https://github.com/ArnoldHueteG))
- 将 Factory Droid 的目录条目更新到 Droid 1.20.0,新增其较新的模型 ([#10779](https://github.com/getpaseo/paseo/pull/10779),贡献者:[@dsingal0](https://github.com/dsingal0))
### 变更
- 桌面端稳定版的自动更新改为最多每 6 小时检查一次,每次更新后等待 24 小时 ([#10882](https://github.com/getpaseo/paseo/pull/10882), [#10901](https://github.com/getpaseo/paseo/pull/10901))
### 修复
- 修复 Agent 将自己创建的子 Agent 从标签页和子 Agent 列表中隐藏的问题 ([#10887](https://github.com/getpaseo/paseo/pull/10887))
- 修复 Claude 子 Agent 等待后台任务时,父 Agent 收到的是中间回复而不是最终回复的问题 ([#10864](https://github.com/getpaseo/paseo/pull/10864))
- 修复监视 PR 的 Agent 在轮次结束后仍显示为运行中的问题 ([#10740](https://github.com/getpaseo/paseo/pull/10740),贡献者:[@drgould](https://github.com/drgould))
- 修复远程名称不是 `origin` 时“变更”面板不显示推送或拉取的问题 ([#10679](https://github.com/getpaseo/paseo/pull/10679))
- 修复拆分窗格或移出当前标签后,原窗格切换到错误标签的问题 ([#10716](https://github.com/getpaseo/paseo/pull/10716))
- 修复在“新建工作区”中选择 project 后,焦点停留在 project 按钮上的问题 ([#10632](https://github.com/getpaseo/paseo/pull/10632))
- 修复已归档的对话在窗口重新加载前一直占用内存的问题 ([#10866](https://github.com/getpaseo/paseo/pull/10866))
- 修复应用长时间运行后悬停卡片等浮层变慢的问题 ([#10778](https://github.com/getpaseo/paseo/pull/10778),贡献者:[@maci0](https://github.com/maci0))
- 修复打开最后一轮包含数百次工具调用的对话时桌面端卡顿的问题 ([#8661](https://github.com/getpaseo/paseo/pull/8661),贡献者:[@luoph](https://github.com/luoph))
- 修复在慢速网络上加载大型时间线时直接连接断开的问题 ([#10651](https://github.com/getpaseo/paseo/pull/10651),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
- 修复大型 Git 工作区在文件监视器扫描时阻塞 daemon 的问题 ([#10788](https://github.com/getpaseo/paseo/pull/10788), [#10602](https://github.com/getpaseo/paseo/pull/10602))
- 修复一个仓库中的 Git 变更导致所有检出重新扫描的问题 ([#10863](https://github.com/getpaseo/paseo/pull/10863),贡献者:[@viiqswim](https://github.com/viiqswim))
- 修复待回答问题高于屏幕时 iOS 对话一直空白的问题 ([#10759](https://github.com/getpaseo/paseo/pull/10759))
- 修复 Android 上在对话中长按选择文本后放大镜卡在屏幕上的问题 ([#10844](https://github.com/getpaseo/paseo/pull/10844))
- 修复移动端弹窗底部栏在键盘收起时落到系统栏后面的问题 ([#10827](https://github.com/getpaseo/paseo/pull/10827))
- 修复 macOS 上侧边栏切换按钮遮挡插件页面标题的问题 ([#10773](https://github.com/getpaseo/paseo/pull/10773))
- 修复 Windows 上盘符前带斜杠的文件链接无法打开的问题 ([#7711](https://github.com/getpaseo/paseo/pull/7711))
- 修复导入会话在 Provider 响应慢时提前放弃并隐藏 Provider 错误的问题 ([#10516](https://github.com/getpaseo/paseo/pull/10516),贡献者:[@chirag127](https://github.com/chirag127), [@derek-geekdive](https://github.com/derek-geekdive))
- 修复 OMP 19.1 的 `ask` 问题不显示问题卡片的问题 ([#10862](https://github.com/getpaseo/paseo/pull/10862),贡献者:[@gtoxlili](https://github.com/gtoxlili))
- 修复共享 OpenCode 服务器运行时,带有自己 MCP 服务器的 OpenCode 2 Agent 启动失败的问题。需要 OpenCode 2.0.29 或更高版本 ([#10752](https://github.com/getpaseo/paseo/pull/10752))
- 修复已删除的 OpenCode 子 Agent 一直留在子 Agent 列表中的问题 ([#8332](https://github.com/getpaseo/paseo/pull/8332))
- 修复重新打开父 Agent 后,已停止的 Claude 后台子 Agent 显示为运行中的问题 ([#9013](https://github.com/getpaseo/paseo/pull/9013))
- 修复插件和 Paseo 的指令替换 Codex Agent 自身 `developer_instructions` 的问题 ([#10792](https://github.com/getpaseo/paseo/pull/10792))
- 修复 Go 密钥保存在 OpenCode 的 `auth.json` 中时 OpenCode Go 用量卡片消失的问题 ([#10678](https://github.com/getpaseo/paseo/pull/10678))
- 修复 Windows 上 GitHub、GitLab 和 Gitea 命令破坏多行参数并展开 `%VAR%` 文本的问题 ([#10685](https://github.com/getpaseo/paseo/pull/10685))
- 修复 `paseo hub login` 输出的链接不包含验证码的问题 ([#10751](https://github.com/getpaseo/paseo/pull/10751))
- 修复 Hub 触发器在 Antigravity 等不支持工具策略的插件 Provider 上运行失败的问题 ([#10889](https://github.com/getpaseo/paseo/pull/10889))
- 修复 Hub 会话读取 daemon 的 Provider 控件时被拒绝的问题 ([#10794](https://github.com/getpaseo/paseo/pull/10794))
- 修复模型列表刷新超时后,Hermes 等插件 ACP Provider 留下进程继续运行的问题 ([#10867](https://github.com/getpaseo/paseo/pull/10867))
- 修复插件在轮次进行中重新加载后,其 Agent 工具返回 `Tool not found` 的问题 ([#10106](https://github.com/getpaseo/paseo/pull/10106),贡献者:[@tomgrin10](https://github.com/tomgrin10))
- 修复被时间线插件改写的回复缺少复制、分叉和轮次耗时的问题 ([#10795](https://github.com/getpaseo/paseo/pull/10795),贡献者:[@Brandon168](https://github.com/Brandon168))
- 修复空闲的插件会话每 10 秒唤醒一次 daemon 的问题 ([#9363](https://github.com/getpaseo/paseo/pull/9363),贡献者:[@Brandon168](https://github.com/Brandon168))
### 安全
- Claude Code 2.1.326 或更高版本现在通过 stdin 接收 MCP 服务器令牌,不再放在其他本地用户可读取的进程参数中 ([#10698](https://github.com/getpaseo/paseo/pull/10698),贡献者:[@mdbraber](https://github.com/mdbraber))
- 修复归档未批准设置的 PR worktree 时仍运行仓库 teardown 命令的问题 ([#10694](https://github.com/getpaseo/paseo/pull/10694))
### 插件
- 新增启动包装,插件可以在沙箱中运行 Agent、终端和 worktree 命令 ([#10786](https://github.com/getpaseo/paseo/pull/10786),贡献者:[@clkao](https://github.com/clkao), [@bendavid](https://github.com/bendavid))
- 在插件的工作区快照中新增父工作区 ([#10781](https://github.com/getpaseo/paseo/pull/10781),贡献者:[@spatenotte](https://github.com/spatenotte))
- 将内置的 `paseo-plugin` 技能更新到当前的插件 API ([#10793](https://github.com/getpaseo/paseo/pull/10793))
## 0.17.4 - 2026-11-23
### 修复
- 修复 Android 上嵌套编号列表的编号与正文重叠,以及列表中的引用与后续消息重叠的问题 ([#10499](https://github.com/getpaseo/paseo/pull/10499))
- 修复 Android 终端输入,要求键盘不将输入内容用于个性化学习 ([#10586](https://github.com/getpaseo/paseo/pull/10586))
- 修复在不区分大小写的文件系统上,目录路径大小写不一致导致对话消失的问题 ([#10555](https://github.com/getpaseo/paseo/pull/10555),贡献者:[@yzim](https://github.com/yzim))
- 修复发给已归档 Agent 的中断和引导消息进入队列后未启动新轮次的问题 ([#10611](https://github.com/getpaseo/paseo/pull/10611),贡献者:[@thomasvan](https://github.com/thomasvan))
- 修复 Hermes 的 Shell 工具行只显示命令摘要的问题,现在会显示完整命令 ([#10614](https://github.com/getpaseo/paseo/pull/10614))
- 修复使用 OpenCode 2 数据库中保存的登录凭据时的 Go 用量显示,涵盖 Console 登录和 API 密钥 ([#8729](https://github.com/getpaseo/paseo/pull/8729), [#10612](https://github.com/getpaseo/paseo/pull/10612))
- 修复 Paseo 工具定义变更后无法重新打开已有 OpenCode 会话的问题 ([#10533](https://github.com/getpaseo/paseo/pull/10533),贡献者:[@Peanut-HZM](https://github.com/Peanut-HZM))
- 修复使用 MCP 协议版本 `2026-07-28` 的 Agent 缺少 Paseo 工具的问题 ([#10558](https://github.com/getpaseo/paseo/pull/10558),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
- 修复 Codex MCP 启动失败时 daemon 未记录警告的问题 ([#10566](https://github.com/getpaseo/paseo/pull/10566))
- 修复插件进程停止后 daemon 在关闭会话时退出的问题 ([#10585](https://github.com/getpaseo/paseo/pull/10585))
- 修复目录结构与裸仓库相同时 Git 命令选错仓库的问题 ([#10587](https://github.com/getpaseo/paseo/pull/10587))
- 修复在 Bedrock 和 Vertex 上无法选择 Claude Auto 权限模式的问题 ([#6904](https://github.com/getpaseo/paseo/pull/6904))
- 修复侧边栏的主机设置按钮需要点击两次才能打开设置的问题 ([#10562](https://github.com/getpaseo/paseo/pull/10562),贡献者:[@ShalokShalom](https://github.com/ShalokShalom))
- 修复普通检出中从未推送过的新分支在“变更”面板中不显示“推送”的问题 ([#10631](https://github.com/getpaseo/paseo/pull/10631))
- 修复 Hub 在验证触发器时传入工作区目录后,daemon 使用错误模型目录的问题 ([#10582](https://github.com/getpaseo/paseo/pull/10582))
## 0.17.3 - 2026-11-22
### 修复
+1
View File
@@ -36,6 +36,7 @@ At the start of non-trivial work, list `docs/` and skim anything relevant to the
| [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 |
+2 -2
View File
@@ -57,9 +57,9 @@
<!-- Sponsors: one cell per sponsor in the order of packages/website/src/data/sponsors.ts, then "become a sponsor" cells up to three. -->
<table>
<tr>
<tr valign="top">
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="40"></picture></a><br><sub>Cloud coding agents</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Paseo のスポンサーになる</a></td>
<td align="center" width="33%"><a href="https://encore.dev/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/encore-on-dark.svg"><img src="packages/website/public/sponsors/encore-on-light.svg" alt="Encore" height="40"></picture></a><br><sub>Encore lets AI agents ship to production safely, at scale, in your own cloud.</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Paseo のスポンサーになる</a></td>
</tr>
</table>
+2 -2
View File
@@ -51,9 +51,9 @@
<!-- Sponsors: one cell per sponsor in the order of packages/website/src/data/sponsors.ts, then "become a sponsor" cells up to three. -->
<table>
<tr>
<tr valign="top">
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="40"></picture></a><br><sub>Cloud coding agents</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Paseo 스폰서 되기</a></td>
<td align="center" width="33%"><a href="https://encore.dev/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/encore-on-dark.svg"><img src="packages/website/public/sponsors/encore-on-light.svg" alt="Encore" height="40"></picture></a><br><sub>Encore lets AI agents ship to production safely, at scale, in your own cloud.</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Paseo 스폰서 되기</a></td>
</tr>
</table>
+3 -3
View File
@@ -48,7 +48,7 @@ Paseo is an open source agentic development environment for desktop, mobile, web
- **Multi-provider:** Claude Code, Codex, Copilot, OpenCode, Pi, Antigravity, and Muse Code through the same interface. Pick the right model for each job.
- **Voice control:** Dictate tasks or talk through problems in voice mode. Hands-free when you need it.
- **Cross-device:** iOS, Android, desktop, web, and CLI. Start work at your desk, check in from your phone, script it from the terminal.
- **Privacy-first:** Paseo doesn't have any telemetry, tracking, or forced log-ins.
- **Privacy-first:** No telemetry, tracking, or forced login. Remote access uses an optional end-to-end encrypted relay.
[Run parallel tasks in Paseo](https://paseo.sh/docs/parallel-development): start agents in separate worktrees, review their diffs, run each app, and check it in the built-in browser.
@@ -56,9 +56,9 @@ Paseo is an open source agentic development environment for desktop, mobile, web
<!-- Sponsors: one cell per sponsor in the order of packages/website/src/data/sponsors.ts, then "become a sponsor" cells up to three. -->
<table>
<tr>
<tr valign="top">
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="56"></picture></a><br><sub>Cloud coding agents</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Become a sponsor</a></td>
<td align="center" width="33%"><a href="https://encore.dev/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/encore-on-dark.svg"><img src="packages/website/public/sponsors/encore-on-light.svg" alt="Encore" height="56"></picture></a><br><sub>Encore lets AI agents ship to production safely, at scale, in your own cloud.</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Become a sponsor</a></td>
</tr>
</table>
+5 -5
View File
@@ -51,15 +51,15 @@
- **多提供商:** 通过同一个界面使用 Claude Code、Codex、Copilot、OpenCode 和 Pi。为每个任务选择合适的模型。
- **语音控制:** 在语音模式下口述任务或讨论问题。需要免手操作时很方便。
- **跨设备:** 支持 iOS、Android、桌面端、Web 和 CLI。在桌前开始工作,用手机查看进度,也可以从终端脚本化操作。
- **隐私优先:** Paseo 没有遥测、追踪,也不会强制登录。
- **隐私优先**:无遥测、无追踪、不强制登录。远程访问可使用可选的端到端加密中继。
## 赞助商
<!-- Sponsors: one cell per sponsor in the order of packages/website/src/data/sponsors.ts, then "become a sponsor" cells up to three. -->
<table>
<tr>
<tr valign="top">
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="40"></picture></a><br><sub>Cloud coding agents</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/zh-CN/sponsor">成为 Paseo 赞助商</a></td>
<td align="center" width="33%"><a href="https://encore.dev/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/encore-on-dark.svg"><img src="packages/website/public/sponsors/encore-on-light.svg" alt="Encore" height="40"></picture></a><br><sub>Encore lets AI agents ship to production safely, at scale, in your own cloud.</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/zh-CN/sponsor">成为 Paseo 赞助商</a></td>
</tr>
</table>
@@ -93,7 +93,7 @@ npm install -g @getpaseo/cli
paseo
```
终端中会显示一个二维码。你可以从任意客户端连接。这个方式适合服务器和远程机器。
Paseo 启动后会询问是否启用端到端加密中继以进行设备配对。如果拒绝,可以通过 TCP、Tailscale 或其他 VPN 直接连接。这个方式适合服务器和远程机器。
完整安装和配置见:
@@ -140,7 +140,7 @@ Monorepo 包结构速览:
- `packages/app`:Expo 客户端(iOS、Android、Web)
- `packages/cli`:用于 daemon 和 agent 工作流的 `paseo` CLI
- `packages/desktop`:Electron 桌面 app
- `packages/relay`:用于远程连接的 relay 包
- `packages/relay`:daemon 和客户端使用的中继传输与端到端加密包
- `packages/website`:营销站点和文档(`paseo.sh`)
常用命令:
+1 -1
View File
@@ -33,7 +33,7 @@ The relay sees only: IP addresses, timing, message sizes, session IDs, and the p
The daemon requires a valid cryptographic handshake before processing any commands. A compromised relay cannot:
- **Impersonate the daemon to your phone** — Without the daemon's secret key, it cannot derive the shared key, so any traffic it injects fails authenticated decryption on the phone
- **Send commands as you** — The daemon only accepts traffic that decrypts and authenticates under a shared key derived with its own secret key. The phone's keypair is ephemeral per connection, so there is no persistent phone-side secret to steal; protection comes from the daemon's secret key never leaving the daemon.
- **Open a session without pairing** — The daemon's public key is carried only in the pairing offer and is never sent to the relay. With a daemon password configured, the daemon also rejects any relay client that does not send the right password inside the encrypted channel.
- **Read your traffic** — After the handshake every message is encrypted: ChaCha20-Poly1305 in protected mode, XSalsa20-Poly1305 (NaCl box) in legacy mode
- **Forge messages** — Both constructions are authenticated encryption; a tampered message is rejected in either mode
- **Replay old messages** — In protected mode the daemon contributes a fresh ephemeral key to every session and every record carries a strictly increasing counter, so a recorded session cannot be replayed into a new one and a duplicated, reordered, or reflected record closes the session. Legacy mode has neither property: it uses random nonces, and a daemon that still admits legacy clients accepts a recorded legacy transcript (hello, credentials, commands) as a new session. Set `daemon.relay.requireProtectedSecurity: true` to refuse legacy clients once every client you use has updated.
+17 -3
View File
@@ -15,7 +15,7 @@ Each live agent in `AgentManager` carries a `lastStatus` of `initializing`, `idl
## Daemon restart recovery
Restart recovery is off by default. Enable `agents.resumeOnStartup` in host config or
Host settings → Agents to resume interrupted agents after graceful shutdown or a crash. The daemon
Settings → Host → Daemon to resume interrupted agents after graceful shutdown or a crash. The daemon
reopens the saved provider conversation and settings, then sends `Resume working.`. Customize
the prompt with `agents.resumePrompt` or the same settings page.
Disabling recovery consumes pending intent; enabling it later does not revive old work.
@@ -80,7 +80,9 @@ Provider checks follow the signals their runtimes expose:
- Codex queries background terminals for loaded threads, including native children, and protects
pending provider requests. App servers without the terminal-list RPC stay resident.
- OpenCode checks active executions and descendants. V1 checks PTYs; v2 also checks shell and
inbox inventories. The shared server remains leased while a session vetoes collection.
inbox inventories. The shared server remains leased while a session vetoes collection. V2 lets
another session's execution veto only when releasing the lease would stop the server; the shared
server stays up after its last lease goes.
- Pi checks streaming, compaction, pending replies, and adapter-owned operations. Known native
subagent signals also protect their parent through the daemon's subagent store.
- OMP additionally requires `get_state.isSettled: true` and `hasPendingAsyncWork: false`.
@@ -183,7 +185,7 @@ caller, child, and host into one watch.
Bootstrap restores these watches after repairing stale running records to `closed` and before opening
ingress. Reading a closed child's result does not load its provider. A finish notification reports that
the child's run has settled; the parent decides whether its task is complete. A child chosen for restart
the child has settled (see below); the parent decides whether its task is complete. A child chosen for restart
recovery is observed only after its resume was sent, so the parent never hears that it was closed
in between. Archived or deleted parents suppress delivery;
parent-owned creation watches also stop
@@ -196,6 +198,18 @@ outstanding intent. A crash after successful dispatch but before removal commits
notification. Clean shutdown can also flush an already queued callback while retaining its intent,
so that callback can repeat after restart. This is an at-least-once wakeup, without turn attribution or exactly-once delivery.
A turn end is not always a settled child. When the child ends its turn with work that will start its
next turn by itself, the caller gets one `message` notice ("ended its turn but is still working") and
the subscription keeps following the child. That work is 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. While following, turn ends and work changes stay
silent until nothing is pending, which sends `finished` and removes the subscription. `followingSince`
is stored before the notice is sent, so restarts resume following without repeating it, and following
ends after 24 hours with an "is still working" notice. Remote children and providers without the probe
report their first turn end as `finished`.
Permission requests are notification checkpoints, not the end of that subscription. The caller is notified again after a permission response when the child finishes, errors, or requests another permission.
The permission notification includes the normalized request plus the child and request IDs, so the caller can inspect it and respond without fetching agent status.
A watched child that closes before its finish event also notifies the caller so delegated work cannot disappear silently during archive or workspace teardown.
+3 -1
View File
@@ -133,7 +133,9 @@ A configured URL takes precedence even when unreachable; Paseo reports the conne
An explicitly configured server needs the bridge installed separately. Connect once and start a session: the setup error gives the local package directory. Copy that directory to the server's OpenCode global `plugins` directory, then retry. For a server on another machine, set `PASEO_OPENCODE_BRIDGE_PORT` in the Paseo OpenCode provider environment before starting Paseo, and set `PASEO_OPENCODE_BRIDGE_URL` to the URL the OpenCode server can use to reach that port. For example, an SSH reverse tunnel can expose the Paseo loopback port on the OpenCode host. The bridge token is exchanged through the OpenCode connection and is not written into the plugin package.
OpenCode's custom MCP registrations are shared by all sessions in a location. Paseo rejects custom MCP servers and per-agent process environment overrides on a reused server rather than applying them to other sessions or ignoring them. Session identity is applied to each session's shell environment. A Paseo-owned helper supports custom process and MCP settings; it is selected when there is no explicit URL or healthy registered service.
Agent MCP servers and per-agent environment work on a reused server with OpenCode 2.0.29 or newer. Paseo connects each agent's MCP servers itself and shows their tools only to that agent and its subagents. Other agents in the same directory and your own OpenCode sessions do not see them. The agent's environment applies to its shell commands, its subagents, and its stdio MCP servers.
The provider `env` configures the OpenCode process. When it sets variables other than the connection variables above and `XDG_CONFIG_HOME`, `XDG_STATE_HOME`, or `OPENCODE_CONFIG_DIR`, Paseo ignores a registered service and starts its own helper. With an explicit URL, Paseo reports those variables as an error.
---
+5
View File
@@ -591,6 +591,11 @@ then retry only when a requested row changes during the read. Unrelated agent st
invalidate the read. Directory baseline replacements and host removal or renaming still invalidate
the affected reads.
On web and Electron, tabs share IndexedDB but hold independent directory snapshots in memory. A
tab can commit directory deltas only while the persisted checkpoint revision matches the one it
read or wrote. If a different tab evicts or rewrites that baseline, the next full directory refresh
can replace it. Timeline writes do not depend on the directory checkpoint.
The cache is capped at 32 MiB and evicts whole hosts in least-recently-written order. After an
eviction, only a baseline replacement stores that host's directory again. Mutations queued around
the eviction are dropped when they are written, so a checkpoint never outlives its rows. Budget
+6 -6
View File
@@ -575,8 +575,9 @@ where the overrides apply; workspace scripts still find the binary through the r
## Dependency signature audit
The `quality` CI job runs `npm audit signatures`. It verifies every lockfile package's registry
signature and, for packages published with provenance, fetches
The [pre-release dependency checks](release.md#pre-release-dependency-checks) include
`npm audit signatures`. The command verifies registry signatures and, for packages published
with provenance, fetches
`/-/npm/v1/attestations/<name>@<version>` from the registry. Cloudflare caches that document
for a year. An edge that cached it in the seconds before the registry attached the publish
attestation keeps serving a document with only the provenance bundle, and npm fails with:
@@ -587,11 +588,10 @@ npm error <name>@<version> has attestations but no corresponding public key(s) c
```
The same package's registry signature verified a moment earlier with the same keys, so the
key list is intact. The failure names one package, repeats only for that package, and depends
on the Azure region the runner landed in, because each region maps to one Cloudflare colo. A
rerun passes only by landing elsewhere.
key list is intact. The failure names one package and depends on which Cloudflare edge serves
the cached attestation.
To confirm, fetch the URL from several runners and compare `content-length`, the `cf-ray` colo
To confirm, fetch the URL from several regions and compare `content-length`, the `cf-ray` colo
suffix, and the number of `attestations` entries (#7730 has the probe). To fix, remove or
replace that version in the lockfile. If the dependent’s range cannot be changed, pin a clean
version in root `overrides`. Report the URL to npm so they purge it.
+34
View File
@@ -0,0 +1,34 @@
# Drag to reorder
A list the user can reorder renders through `DraggableList` from `@/components/draggable-list`. Each row puts a `DraggableListHandle` where its grip is drawn. The Usage cards (`packages/app/src/usage/list.tsx`, `packages/app/src/usage/card.tsx`) and the agent profile roster (`packages/app/src/agent-profiles/settings/`) are the reference.
| Platform | How a drag starts |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| Web | dnd-kit pointer drag. With `useDragHandle`, only the handle starts it, and the handle reorders by keyboard. Without it, the whole row starts it. |
| Native | Hold the handle for 180 ms without moving more than 4 px. The list then owns the touch until the finger lifts. |
## The scroll view must host the drag
On native, the hold calls `drag()`, which calls `useContentDrag().setActive(true)` from `@/components/ui/content-drag` on the nearest scroll view. That scroll view stops scrolling until the drag ends. If no scroll view up the tree hosts content drags, `setActive` does nothing. The page scroll then takes the touch as soon as the finger moves past the touch slop, before the list's own pan activates. The row never moves, and the page scrolls instead.
These scroll views host content drags:
- `ScrollView` from `@/components/ui/scroll-view`, inside and outside a sheet.
- `PageLayout`, for a settings page or any other full page.
If you put a reorderable list in another scroll view, such as a third-party keyboard-aware one, wrap it with `withContentDrag` from `@/components/ui/content-drag`. `packages/app/src/components/page-layout/index.tsx` shows the pattern. A plain `ScrollView` from `react-native` breaks the drag.
Inside a sheet, the `ScrollView` also registers the drag gesture with the sheet, so the sheet's pan-to-close waits for it.
## Where the grip goes
The grip hangs in the row's leading padding, absolutely positioned over the full row height. The row's content keeps the same left rail as rows that cannot be reordered, and the grip does not take a column. On a pointer device the grip shows on hover, focus, or while dragging. On touch and compact layouts it always shows, because there is no hover.
## Test with a page that scrolls
A list that fits on the screen does not show the bug, because the page has nothing to scroll. Test on a phone with enough rows that the page scrolls. Then check both directions:
1. Hold the grip and drag a row past two others. The new order is saved.
2. Swipe quickly on a row body. The page scrolls and the order stays the same.
On an Android emulator, `adb shell input swipe` does not hold still long enough to arm the drag. Send `input motionevent DOWN`, wait 500 ms, then send `MOVE` events and `UP`.
+17 -1
View File
@@ -146,6 +146,22 @@ quietly relying on:
The fix for transforms is Gotcha 3. The fix for context is Gotcha 7.
### The portal patch
`patches/@gorhom+portal+1.0.14.patch` moves portal state out of the provider's
context value and into a store each `PortalHost` subscribes to. Upstream keeps
every host's portals in one context value at the app root, so each portal mount,
update and unmount changed that value and React searched every mounted fiber
for consumers. That cost grows with the retained panels: a hover card took
about 3 ms of it in a fresh window and 16 ms after a few hours. With the store,
a portal change renders only its own host.
Do not put per-overlay state in a context that wraps the app for the same
reason. Give the consumers a store to subscribe to.
The patch also keys each portal in its host (upstream PR #62). Without the key,
closing one overlay remounted every later overlay in the same host.
## Gotcha 3 — Keyboard layout and portal anchors
`composer/dock` owns the stationary viewport, bottom-anchored surface, composer
@@ -449,7 +465,7 @@ in a tab. An overlay opened from that content and calling `useSafeAreaInsets()`
gets that 0 and draws over the navigation bar.
- A Gorhom sheet reads the inset inside its children, which render in the app's sheet host. See
`CompactSheetBody`, `MenuSheetScrollView` and `ComboboxSheetFrame`.
`SheetVisibleFrame` (used by `CompactSheetBody` and `ComboboxSheetFrame`) and `MenuSheetScrollView`.
- An RN `Modal` passes the call site's context straight through, so wrap its content in
`WindowSafeArea` from `@/window-layout` and read the inset below that. It provides the insets of
the whole window, published by `WindowLayoutProvider`. Do not put a `SafeAreaProvider` inside the
+2 -1
View File
@@ -10,6 +10,7 @@ Authoritative terminology. UI label wins. Don't invent synonyms; use what's here
- **Agent** — See **Agent session**. UI still says "Agent" / "New Agent" in places, but moving toward **Agent session** as the canonical term. Code: `AgentSnapshotPayload` (`packages/protocol/src/messages.ts:608`). Forbidden: "Task", "Job", "Run".
- **Daemon** — Local Paseo server process; identified by `serverId`. UI: "Daemon" (system contexts only). Code: `serverId` in `ServerInfoStatusPayloadSchema` (`packages/protocol/src/messages.ts:1936`), `DaemonClient` (`packages/client/src/daemon-client.ts`).
- **Host** — Client-side connection profile pointing at a daemon; bundles one or more `HostConnection`s. UI: "Host" / "Add host" / "Switch host". Code: `HostProfile` (`packages/app/src/types/host-connection.ts:37`). Forbidden: "Connection" (means `HostConnection`, not host).
- **Device** — A computer or phone running a Paseo client. Open **Devices** in a host’s settings to connect another device.
- **Host badge** — The item on a sidebar workspace row's meta row naming which host that workspace lives on. Three things gate it, and they compose as a lattice rather than competing: the sidebar must span more than one host (automatic), **Show → Host** in the sidebar's display preferences must be on (global, all hosts at once), and then that host's own display mode decides _how_ it draws — **Name** / **Icon only** / **Hidden**. Name, color, and display mode are per-host, per-device, and live client-side on `HostProfile.appearance`; nothing about it reaches the daemon. Never add a fourth way to hide it. UI: the "Appearance" group on a host's settings page, and the "Show" submenu in the sidebar's display preferences. Code: `selectHostBadges` (`packages/app/src/hosts/appearance.ts`) takes the first two as its `enabled` input; `WorkspaceMetaRow` (`packages/app/src/components/sidebar/workspace-meta-row/index.tsx`) draws it. Don't confuse with **Status pill**, which reports state rather than identity.
- **Project host entry** — One row in a project for a single (project, daemon) pair, aggregating that daemon's workspaces in the project. Internal. Code: `ProjectHostEntry` (`packages/app/src/utils/projects.ts:11`). Don't introduce "Checkout" as a synonym.
- **Placement** — One workspace's stable foreign-key relationship to its project plus its git checkout snapshot. Internal. An explicit creation `projectId` is authoritative when active.
@@ -33,7 +34,7 @@ Authoritative terminology. UI label wins. Don't invent synonyms; use what's here
- **Agent session** — One running instance of an agent inside a workspace (one provider, one model, one cwd, one timeline). The conceptual unit; in the UI this opens as a tab. Moving toward this as the canonical term over "Agent". Code: `AgentSnapshotPayload` (`packages/protocol/src/messages.ts:608`).
- **Session** — Two senses: (a) per-client connection to a daemon, internal; (b) user-facing agent session, see **Agent session**. Code: `Session` (`packages/server/src/server/session.ts`) for (a). Don't confuse with: provider-side agent session log.
- **Profile** — Internal name for the persisted shape of a host. Code: `HostProfile` (`packages/app/src/types/host-connection.ts:37`). Never user-facing. Three other things are called "profile" in this codebase, so always qualify: **Agent profile**, **Terminal profile**, and the provider aliases in [custom-providers.md](custom-providers.md). Bare "profile" is forbidden in UI copy.
- **Agent profile** — A named launch bundle: provider, model, mode, thinking option, feature values, and free-text notes. Applying one writes those values into the **Agent controls** and is then forgotten — there is no selected profile, no default profile, and no drift tracking. The notes are written for orchestrating agents and are what the `list_profiles` MCP tool surfaces. Stored host-wide in daemon config as `agentProfiles`. UI: "Agent profiles". Code: `AgentProfile` (`packages/protocol/src/messages.ts:161`). Carries no system prompt, because a per-agent system prompt can only be set at creation. Forbidden: "Favourite", which this replaced.
- **Agent profile** — A named launch bundle: provider, model, mode, thinking option, feature values, optional system prompt, and free-text notes. Applying one writes those values into the **Agent controls** and is then forgotten — there is no selected profile, no default profile, and no drift tracking. The system prompt applies only when creating a new agent and is ignored when applying the profile to a running one. The notes are written for orchestrating agents and are what the `list_profiles` MCP tool surfaces. Stored host-wide in daemon config as `agentProfiles`. UI: "Agent profiles". Code: `AgentProfile` (`packages/protocol/src/agent-profile.ts`). Forbidden: "Favourite", which this replaced.
- **Terminal profile** — A named shell command a terminal can launch. Stored host-wide in daemon config as `terminalProfiles`. UI: "Terminal profiles". Code: `TerminalProfile` (`packages/protocol/src/messages.ts:135`), `resolveTerminalProfiles` (`packages/protocol/src/terminal-profiles.ts`). Also selectable as a New Workspace launch target, where the alternative is the chat agent.
- **Provider** — Agent backend (Claude Code, Codex, Copilot, OpenCode, Pi, Oh My Pi). UI: "Provider". Code: `ProviderSnapshotEntry` (`packages/protocol/src/messages.ts:198`).
- **Hook** — A plugin lifecycle handler registered with `server.addHook`, named `subject.operation.position` with `before` or `after`; each hook declares whether Paseo waits. See [hooks](../public-docs/plugins/hooks.md).
+11 -6
View File
@@ -32,10 +32,11 @@ CI does not build native code or run the fork's Robolectric suites. Run `npm run
Some fork changes are backports. A sync past the upstream version drops them in favour of upstream's code:
| Fork change | Upstream | Released in |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- |
| Android measurements survive parent clones | [#924](https://github.com/software-mansion/enriched-markdown/pull/924) | after `1.2.0-nightly-20261019-926ef06f0` |
| Android nested list items start their text after their own marker | [#1015](https://github.com/software-mansion/enriched-markdown/pull/1015), [#1023](https://github.com/software-mansion/enriched-markdown/pull/1023) (Android) | `1.2.0` |
| Fork change | Upstream | Released in |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- |
| Android measurements survive parent clones | [#924](https://github.com/software-mansion/enriched-markdown/pull/924) | after `1.2.0-nightly-20261019-926ef06f0` |
| Android long-press drag selection keeps parent intercept disallowed | [#1012](https://github.com/software-mansion/enriched-markdown/pull/1012) | `1.2.0` |
| Android nested list items start their text after their own marker | [#1015](https://github.com/software-mansion/enriched-markdown/pull/1015), [#1023](https://github.com/software-mansion/enriched-markdown/pull/1023) (Android) | `1.2.0` |
## Engine constraints
@@ -43,7 +44,11 @@ Math and video are disabled. Task lists and admonitions are enabled; task checkb
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.
Native code blocks use the library's copy control and compiled grammars. Web code blocks use `HighlightedCodeBlock` through the library's `renderers.codeBlock` override. Selection copy has to tell links Paseo recognized in the text (paths, forge references, code spans) from links in the Markdown, so the web link renderer marks the recognized ones. Plain-text paste carries them as the text the reply showed, and rich paste keeps them as links only when they point to an `http` or `https` URL. Authored links and parser autolinks such as a bare `www.example.com` copy as links. The fork also keeps the library's block spacing around the web code block override, preserves web list numbering and link titles, marks pending parses with `aria-busy` so Find waits for rendered text, and carries link syntax through native and web tap events. Web inline code inside a link inherits only the link colour; its code font, size and background stay intact. Keep link variants colour-only: native pills replace text runs and prevent paths from wrapping; Android pills also use the surrounding block’s font size. [Upstream PR #997](https://github.com/software-mansion/enriched-markdown/pull/997) tracks these changes.
Code blocks and plain quotes have a copy control in their top trailing corner. Native code blocks use the library's compiled grammars. On native, the code block and quote container views share one control (`HeaderCopyButton` on Android, `ENRMHeaderCopyButton` on iOS). A quote reserves the code block's header band above its body, so the control never covers quote text at any font size. On web, code blocks use `HighlightedCodeBlock` through the library's `renderers.codeBlock` override, and quotes use `WebBlockquote` through `renderers.blockquote`. Both use `BlockCopyButton`. On compact layouts the control is always visible, so the web quote reserves a band above its body, as native does. On wide layouts the control appears on hover or focus, so the quote keeps a right gutter instead; a band there would leave an empty strip above every quote.
A quote copies its body without the `>` markers, with its nested Markdown, and reads the content at the time of the press, so a streaming quote copies what it shows. A nested quote or code block keeps its own control. Web quote copy uses the same two clipboard flavors as selection copy: `text/plain` is unescaped Markdown and `text/html` is rendered from escaped Markdown. A rendered Mermaid diagram copies as its fence because its wrapper carries the fence source. Native quote copy serializes the quote's parsed Markdown, so a workspace image copies as its cached file URL, as native selection copy does; native has no map back to the workspace path. A native Mermaid diagram in a quote renders outside it (see [native selection limitations](native-text-selection.md)), so each quote fragment copies only its own text. Admonitions get no control: web renders them with a separate library renderer. On web an admonition inside a copied quote copies as its `> [!TYPE]` source; the fork marks the box and its generated title for this. Selection copy keeps the text it shows, because the cloned range cannot tell a whole callout from part of one. On native, quotes inside list items get no control, because they render as text spans in the item. Web renders them as blocks, so they get one.
Selection copy has to tell links Paseo recognized in the text (paths, forge references, code spans) from links in the Markdown, so the web link renderer marks the recognized ones. Plain-text paste carries them as the text the reply showed, and rich paste keeps them as links only when they point to an `http` or `https` URL. Authored links and parser autolinks such as a bare `www.example.com` copy as links. The fork also keeps the library's block spacing around the web code block override, preserves web list numbering and link titles, marks pending parses with `aria-busy` so Find waits for rendered text, and carries link syntax through native and web tap events. Web inline code inside a link inherits only the link colour; its code font, size and background stay intact. Keep link variants colour-only: native pills replace text runs and prevent paths from wrapping; Android pills also use the surrounding block’s font size. [Upstream PR #997](https://github.com/software-mansion/enriched-markdown/pull/997) tracks these changes.
The fork also keeps overflowing native horizontal blocks in control of their drags: Android claims parent interception at touch-down and releases it for vertical drags so the chat list can scroll; iOS keeps its scroll recognizer active for outward drags at the leading edge. This prevents compact sidebar pans from taking block scrolling without changing sidebar swipes on prose or non-overflowing blocks. Native changes require a client rebuild.
@@ -55,4 +60,4 @@ The library determines how incomplete Markdown appears during streaming. Complet
## Verification
Follow [QA](qa.md) and [mobile testing](mobile-testing.md). Exercise chat, file preview, plan and PR content on all three platforms. Include cross-paragraph selection, progressive streaming, a file-link tap, code copy/highlighting, a table and a workspace image. On iPad, repeat preview selection after opening and closing Explorer and after rotation. Check web find, selection-copy and source-message navigation after DOM changes.
Follow [QA](qa.md) and [mobile testing](mobile-testing.md). Exercise chat, file preview, plan and PR content on all three platforms. Include cross-paragraph selection, progressive streaming, a file-link tap, code copy/highlighting, quote copy (nested quote, code block in a quote, admonition, large font on native), a table and a workspace image. On iPad, repeat preview selection after opening and closing Explorer and after rotation. Check web find, selection-copy and source-message navigation after DOM changes.
+12 -2
View File
@@ -10,10 +10,20 @@ Agent payloads name a host and agent. Ignore their workspace hint when opening:
the agent can move after a notification is sent. Use `navigateToAgent`, which
uses the current store record or the agent route to resolve the workspace from
the host. Terminal payloads name their workspace and use `navigateToWorkspace`.
Plugin payloads carry `kind: "plugin"`, `serverId`, `pluginId`, `notificationId`,
and optional `open` and `data`; `openPluginNotification` in
`packages/app/src/plugins/notification-open.ts` waits up to 8 seconds for the
target host's plugin catalog to settle on cold launch, runs registered
`client.onNotificationOpen` handlers with caught error isolation, and falls back
to declarative `open` (`agent`, `workspace`, `screen`) or the host root route.
See [agent targets and deferred opens](expo-router.md#agent-targets) for route
ownership and workspace recovery. Notification generation, presence, and push
eligibility remain daemon concerns.
ownership and workspace recovery. Per-device two-knob notification preferences
(`@getpaseo/protocol/notification-preferences`) sync with mobile push tokens via
`register_push_token` (gated on `server_info.features.pushNotificationPreferences`)
so the daemon filters Expo pushes per token, while desktop and web clients filter
in-app OS notifications locally before calling `sendOsNotification`. Notification
generation and presence remain daemon concerns.
## Native delivery
+92 -3
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, header buttons, composer pills, app themes, composer attachment sources, and settings screens.
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.
@@ -462,8 +462,55 @@ Server entries register async handlers with `server.addHook(name, handler)`, ret
function. Names follow `subject.operation.position`, ending in `before` or `after`. Waiting is a per-hook
registry property, independent of position. The [hooks reference](../public-docs/plugins/hooks.md)
owns payloads, ordering, failure behavior, and examples. `agent.create.before` edits saved
configuration; `agent.open.before` contributes launch-only `env`, `tools`, and `mcpServers` on
every open. Executable tool definitions stay in the plugin process; only metadata crosses the boundary.
configuration; `agent.open.before` contributes launch-only `env`, `tools`, `mcpServers`, and a
[launch wrap](#launch-wrap) on every open. Executable tool definitions stay in the plugin process; only metadata crosses the boundary.
`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.
### Launch wrap
An `agent.open.before` result can carry `wrap: [executable, ...args]`. The provider then starts that
session's harness as `[...wrap, command, ...args]` with the final hook env. It starts with no shell,
except Windows script launchers, which go through cmd.exe like any provider launcher
(`spawnProcess` quotes each argument). An argument with spaces stays one element. `executable` must
be an absolute path.
The wrap is never saved on the agent; every open asks the hooks again, and a plugin session reopen
reuses the wrap it opened with.
- **Support is a provider property.** The provider snapshot entry carries `launchWrap: true` when the
provider can apply a wrap. Read it in `agent.create.before` with `paseo.providers.snapshot()`; an
absent field means unsupported, which is also what a host without this feature reports. Core
providers declare it in the provider contract table in `provider-registry.ts`; every core provider
that starts a local harness declares it, and custom ACP providers and providers that extend a core
one inherit it. A plugin provider declares `ProviderRegistration.launchWrap`;
`runAcpProvider({ command })` sets it, a connector declares it itself (Muse Code does). The declaration travels with the
registration metadata, so it is in the snapshot before the provider first connects.
- **One wrap per open.** A later hook, in the same plugin or a later one, may omit the wrap or return
the same value. A different value fails the open.
- **Fail closed.** `buildLaunchContext` admits a wrapped open before any session harness starts. It
throws `LaunchWrapUnsupportedError` (`code: "launch_wrap_unsupported"`) when the provider does not
declare support, or when a plugin provider's live connection lacks `session.launch_wrap`. A host
that predates `wrap` rejects the key: the hook result schema is strict. A missing launcher fails the
spawn; nothing retries the bare command.
Once an open selects a wrap, a supported provider runs that session's harness through it or fails
before starting the harness. Every provider starts through `spawnProcess({ wrap })`, which owns the
argv and Windows launcher handling; `applyLaunchWrap` covers the launches that do not go through it
(pty terminals, MCP stdio transports, worktree commands). The wrap also covers what Paseo starts for
the session: stdio MCP servers Paseo hosts for the agent (OMP, OpenCode v2), Pi's MCP probe, and ACP
client terminals. OpenCode shares one server between sessions, so a wrapped session gets a dedicated
server instead; an explicitly configured external OpenCode server cannot be wrapped and the open
fails. The guarantee does not cover:
1. Paseo's host terminal tools (`create_terminal`, `send_terminal_keys`) run outside the wrap.
2. Work before the open hook runs unwrapped: draft command and control discovery, and the catalog
lookup during create when no model is set.
3. Host-side operations run unwrapped: availability and capability probes (the ACP connection's
initialize probe included), catalog and session listing, version and update commands, usage
queries, and Codex native archive and unarchive.
4. Losing the plugin that chose the wrap is not covered: a later open without it runs unwrapped.
Worktree placement is resolved before Git source planning, so a hook can change the branch and base
without undoing fetched refs. Restores use the recorded destination and bypass creation hooks.
@@ -483,6 +530,17 @@ change requests; `remove` and `restore` fall back to built-in Git when the plugi
[worktree managers reference](../public-docs/plugins/reference.md#worktree-managers) and
`plugin-examples/worktrunk`.
`terminal.create.before` runs in `withTerminalCreateHook`, which wraps the daemon's one terminal manager, so every creation path is covered and adopted terminals are not; callers pass an `origin` to name the source. `command.run.before` runs inside the setup and teardown runners through `commandRunHook`. Setup and archive dependencies take `lifecycle` as a required field so a new caller cannot skip the hook by omission; pass `null` only where no plugins run.
Both hooks change only `env` and a [launch wrap](#launch-wrap); `keepSelectedWrap` in the lifecycle
module applies the one-wrap rule to all three wrap hooks. The terminal wrap becomes the terminal's
`command` and `args` in `withTerminalCreateHook`, so the terminal worker protocol does not change and
no previous-version adapter is needed. A default-shell terminal resolves the shell there through
`default-terminal-shell.ts`, which stays apart from `terminal.ts` so the daemon does not load node-pty.
The wrapped shell starts without Paseo's shell integration, which is why a wrapped script does not
report command completion. A setup or teardown wrap goes in front of the
`buildStringCommandShellInvocation` argv.
Emit from the operation owner, not a client subscription. Provider history replay must not trigger
live hooks. Notifications must not be awaited inside agent mutations: a handler can send a prompt
or answer a permission through its own daemon session. Awaiting it there deadlocks that command.
@@ -491,6 +549,26 @@ The same holds for a hook that runs inside an agent's lifecycle lane: an `agent.
an option, model, thinking or mode change) waits on the open, which waits on the hook. The hooks
reference tells plugin authors to start such a write without awaiting it.
## Send notifications
Server plugins call `server.notifications.send(input)` over the `notification.send` /
`notification.result` / `notification.error` IPC messages. `PluginNotificationDispatcher` in
`packages/server/src/server/plugins/notifications.ts` trims and truncates `title` (<= 160 chars)
and `body` (<= 500 chars), validates `key` (<= 128 chars), `open` (IDs <= 256 chars, serialized
<= 1,024 UTF-8 bytes), and `data` (<= 1,024 UTF-8 bytes so APNs and FCM envelopes stay within
4 KiB), drops duplicate `(pluginId, key)` pairs for 60 seconds, and enforces a per-plugin token
bucket (burst 10, refill 1 per 6 seconds). Stopping a plugin clears its deduplication and
rate-limit state.
`WebSocketServer.sendPluginNotification` stamps the runtime `pluginId`, `serverId`, and
`notificationId`, runs `computeNotificationPlan` (using `open.agentId` as the focus target when
`open.type === "agent"`), filters Expo pushes per token with `{ kind: "plugin", pluginId }`, and
publishes `plugin.notification` to sessions subscribed to that event category. Clients gate their
`"plugin.notification"` subscription on `server_info.features.pluginNotifications` (`COMPAT(pluginNotifications)`).
See [notifications.md](notifications.md) for tap routing and cold-launch catalog readiness, and the
[public notifications reference](../public-docs/plugins/reference.md#notifications) for the author
contract.
## Contribute a provider
Register a provider from `index.server.ts`. The provider connection is callback-based and owns all
@@ -582,6 +660,10 @@ persistence. Re-read credentials and provider-owned configuration on `session.op
daemon launch from `connect` and the per-session env and MCP servers from `session.open`. There is
no provider reload input.
Declare `ProviderRegistration.launchWrap: true` when every session spawns its own harness and can
run it as `[...config.wrap, command, ...args]`; offer `session.launch_wrap` on the connection. See
[Launch wrap](#launch-wrap). `runAcpProvider({ command })` does both.
For an ACP command, register `runAcpProvider({ id, label, command })` from
`@getpaseo/plugin/server/acp`. The shim builds the standard row for each ACP tool `kind`
(`acp-internal/tool-call-detail.ts`). Its transformer hooks cover narrow vendor differences; do not translate the
@@ -883,6 +965,13 @@ its Zod schema, and mounts the component inside the normal plugin runtime and er
optional output `id` distinguishes several stable replacements from the same source item; its output
index is the default.
Each replacement keeps a reference to the source row (`source` on the projected stream item), and
turn logic reads a replaced reply through it. A reply split into several cards stays one reply: turn
folding keeps every card visible, and the turn footer hangs under the last card, copies the original
reply text once, forks at its message, and shows its duration and stats. Read the reply with
`getAssistantReply` (`packages/app/src/types/stream.ts`) instead of checking `kind ===
"assistant_message"`.
Transformers run synchronously and must be deterministic. When several transformers match, the
first one that returns a result owns that source item. Plugin and registration ordering is stable.
See `plugin-examples/timeline-items` for the complete contract.
+5 -2
View File
@@ -171,7 +171,7 @@ V2.0.4 also removed the activation endpoint that gated a cold location, and a co
Paseo installs its OpenCode tool bridge through `OPENCODE_CONFIG_CONTENT`. V1 accepts a plugin file; v2 silently skips configured files and requires a package directory with a server entry point. Both versions use the daemon's private loopback bridge for caller-scoped tools. The global manifest must use agent-scoped schemas before a session is bound, because every bridge call executes in an agent session. V2 discovers definitions from each bound session's catalog: plugin-contributed tools can be absent from the global manifest, and an allowlist cannot register a missing definition. Registration is location-wide, so session filtering and caller-scoped execution must remain in place. Bridge context lives only in daemon memory and is removed when the Paseo session closes. The content-addressed plugin artifacts contain no session data or secrets. V2 also needs this plugin when native Paseo tools are disabled: its prompt API has no structured-output format, so the plugin supplies a schema-validated final-answer tool.
An agent with custom environment variables or user-configured MCP servers gets a dedicated OpenCode server. V2 supports session environment, but its MCP configuration remains location-scoped, so separate servers still prevent one agent from changing another agent's MCP setup. Configure custom MCP with `mcp.add`; do not follow it with `mcp.connect`, which only toggles config-backed servers.
No v2 agent gets a dedicated OpenCode server, because a reused server cannot provide one. OpenCode's MCP configuration is location-scoped, so Paseo never calls `mcp.add` for an agent. The daemon connects the agent's MCP servers itself (`v2/session-mcp.ts`), and the v2 plugin exposes their tools under OpenCode's native `<server>_<tool>` names. Each name registers once per location. The plugin's `context` hook gives each session its own definition and removes the tool from other sessions. If the user's own OpenCode configuration registered a tool with the same name first, other sessions keep that tool and its execution. Execution routes to the calling session's root binding. The hook also adds the servers' instructions to each request. OpenCode loads instruction entries before the hook runs, so an entry written when a child is adopted would miss the child's first request. The plugin calls OpenCode's `permission.assert` before each call, so `toolPolicy.preapproved` grants still apply. That API exists from OpenCode 2.0.29. Bind reports `features.mcpTools`, so an older server or a stale plugin fails the session at creation instead of hiding its tools. Per-agent `launch.env` reaches shells through `session.environment`, which child sessions do not inherit. The plugin asks the daemon to adopt each descendant in its first `context` hook, before its first model request.
OpenCode owns user message IDs. Do not pass Paseo-generated IDs to OpenCode prompt APIs; let OpenCode create `msg*` IDs and record the user timeline item from the `message.updated` event.
@@ -225,7 +225,10 @@ aborts the shared refresh signal at the deadline, and when it stops. Shutdown wa
probes to settle before it shuts down provider clients, so a probe cannot start provider work,
such as an OpenCode server, after its client has cleaned up. Providers name active catalog operations and
finish subprocess, server, or session cleanup before rejecting. Timeout errors list the operations
that were still active when the deadline expired.
that were still active when the deadline expired. A plugin provider's connection is shared with its
running sessions, so the bridge cannot close it at the deadline; it sends `request.cancel` for the
abandoned request instead, and the provider stops that request's work
([provider guide](../public-docs/plugins/providers.md#stop-a-request-paseo-cancels)).
Catalogue results stay cached by identity until a refresh or a change to that provider's configuration.
Providers change their model lists on the server without a CLI update, so the daemon refreshes
+122 -38
View File
@@ -17,6 +17,7 @@ A release has exactly two steps. The agent does the first, the user authorizes t
run `npm run release:prep:<mode>` to create the `chore(release): cut <version>` commit without a tag
- push the `release/vX.Y.Z` or `release/vX.Y.Z-beta.N` branch and confirm its `CI` and
`Desktop Packages` runs pass (never wait on `main` CI)
- run the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
**Go-ahead** (user says "go ahead"):
@@ -47,7 +48,7 @@ the shipped source.
The user decides when the changes on `main` warrant a release and how much risk it takes:
1. **Direct stable release** for a low-risk batch of polish and bug fixes. Stable desktop updates
already ramp over 36 hours (see [Staged rollout](#staged-rollout-stable-channel)), and store
start with a 5% canary and ramp over 18 hours (see [Staged rollout](#staged-rollout-stable-channel)), and store
review often takes about a day, with no guaranteed timing.
2. **Beta flow**, the default for changes that need testing. Release candidates on the `beta`
channel. Each beta folds into the series' single changelog entry, publishes npm only on the
@@ -107,6 +108,7 @@ An explicit user instruction can select another base.
`CI` (all 21 jobs) and `Desktop Packages` (Linux user-namespace smoke) in their own concurrency
groups, isolated from `main` traffic. Never wait on `main` CI, because `main` cancels in-progress
runs on every merge. Wait for both runs on the release branch commit to pass before shipping.
Complete the [pre-release dependency checks](#pre-release-dependency-checks) on that commit.
Pushing a `release/**` branch without a `v*` tag triggers no publish workflows.
6. After go-ahead, run `npm run release:ship` (stable) or `npm run release:ship:beta` (beta). This
publishes to npm and pushes the `v*` tag on the already-verified commit. Because the release
@@ -126,7 +128,9 @@ shipping while `0.13.3-beta.2` soaks. Never republish or reuse a shipped version
as the next unused patch beta, `0.13.4-beta.1`, from the tested beta tag. No `version:all:*` mode
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`, then ship with `npm run release:ship:beta`.
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:ship:beta`.
Record the tested beta tag as its source so its soak still counts for the unchanged content.
## Release inventory
@@ -234,6 +238,7 @@ npm run release:prep:minor
# 2. Push the release branch and wait for CI + Desktop Packages on this commit.
git push -u origin HEAD
# Complete the pre-release dependency checks on this commit.
# 3. After go-ahead and green release-branch checks: publish npm and push the tag.
npm run release:ship
@@ -269,7 +274,8 @@ npm run release:check # Typecheck, build, dry-run pack
npm run version:all:patch
npm run version:all:minor
git push -u origin HEAD # Trigger CI + Desktop Packages on release/vX.Y.Z
# Wait for CI and Desktop Packages on this branch to pass, then after go-ahead:
# Wait for CI and Desktop Packages and complete the pre-release dependency checks.
# After go-ahead:
npm run release:publish # Publish to npm (idempotent, with propagation + beta dist-tag sync)
npm run release:push # Create tag vX.Y.Z on HEAD and push (triggers release workflows)
```
@@ -286,6 +292,7 @@ npm run release:prep:beta:next # Cut X.Y.Z-beta.2, beta.3, ...
# 2. Push the release branch and wait for CI + Desktop Packages to pass:
git push -u origin HEAD
# Complete the pre-release dependency checks on this commit.
# 3. After go-ahead:
npm run release:ship:beta
@@ -293,7 +300,8 @@ npm run release:ship:beta
# Later, after soak, promote on release/vX.Y.Z:
npm run release:prep:promote
git push -u origin HEAD
# Wait for CI + Desktop Packages to pass, then after go-ahead:
# Wait for CI + Desktop Packages and complete the pre-release dependency checks.
# After go-ahead:
npm run release:ship
```
@@ -316,11 +324,33 @@ Use the beta path when you need to:
## Staged rollout (stable channel)
Stable desktop releases go out via a linear time-based rollout for automatic update checks: 0% admitted when the updater manifests appear, 100% admitted 36 hours later, linear ramp in between. Manual checks bypass the rollout so a user can install immediately when they click **Check**. Beta releases bypass the rollout entirely — beta users always receive updates immediately.
A stable desktop release reaches automatic updates in stages, so a bad release reaches few installs before you stop it. Each install decides locally from two fields in the release manifests, `releaseDate` and `rolloutHours`. No server tracks installs.
The rollout is driven by a `rolloutHours` field stamped into the GitHub Release manifests (`latest-mac.yml`, `latest-linux.yml`, `latest.yml`) by the `finalize-rollout` job in `desktop-release.yml`.
| Stage | Rule |
| -------------- | -------------------------------------------------------------------------------------------------------- |
| Canary | For the first 8 hours, 5% of installs are admitted. |
| Ramp | From 8 hours to `rolloutHours` (18 by default), admission rises in a straight line from 5% to 100%. |
| Check interval | An install asks GitHub for the latest release at most once every 6 hours. |
| Cooldown | After an install updates, it skips paced releases for 24 hours. |
| Staged update | An install that holds a downloaded update keeps it and does not download the paced release that follows. |
Desktop release builds now publish in two phases:
A paced release is a stable release with `rolloutHours` above 0. When `rolloutHours` is under 16, the canary hold is half of `rolloutHours`.
Every release places each install at a new position in the rollout, so the canary group changes with each release. With one or two releases per day, an install updates at most once every 24 hours and skips the releases in between.
These paths skip the stages:
- A manual check (**Check**) always asks GitHub and always offers the latest release.
- A release with `rolloutHours: 0` is an emergency release. Every install takes it at its next check, during a cooldown too, and it replaces a staged update.
- The beta channel has no stages. A beta install takes each release at its next check.
The **Notify** update mode follows the same stages and prompts instead of downloading. **Off** makes no automatic requests.
`packages/desktop/src/features/app-update-rollout.ts` owns the curve. `app-update-pacing.ts` owns the check interval and the cooldown, and `app-update-service.ts` owns the staged update.
### How a release is published
The `finalize-rollout` job in `desktop-release.yml` stamps `releaseDate` and `rolloutHours` into the GitHub Release manifests (`latest-mac.yml`, `latest-linux.yml`, `latest.yml`). Desktop release builds publish in two phases:
- The GitHub Release stays a draft while platform build jobs upload the installers/packages (`.dmg`, `.zip`, `.exe`, `.AppImage`, etc.).
- The final job merges and stamps every channel manifest, uploads them with the final `releaseDate` and `rolloutHours`, then publishes the GitHub Release.
@@ -329,22 +359,21 @@ Drafts do not appear in GitHub's releases feed. Updater clients continue to see
### Default behavior
`npm run release:prep:patch` or `npm run release:prep:minor` → push release branch → green checks → `npm run release:ship` → tag push → 36h ramp. No extra action needed.
Follow the [standard stable release procedure](#standard-release-stable). The tag push starts
the desktop release workflow, which sets an 18-hour rollout when it publishes the release.
The `rollout_hours` input on `desktop-release.yml` is **only read on `workflow_dispatch`** — tag-push runs always default to 36. To get any other rollout duration on a fresh release, use the post-publish flip below.
The `rollout_hours` input on `desktop-release.yml` is read only on `workflow_dispatch`. Tag-push runs always use 18. To get any other rollout duration on a fresh release, use the post-publish flip below.
### Instant-admit release (rollout_hours=0)
### Emergency release (rollout_hours=0)
Tag-push runs from `npm run release:ship` always stamp 36 hours. To admit everyone immediately (hotfix, doc-only change, a release you want out fast), ship the release normally, wait for it to publish, then flip the manifests:
Follow the [standard stable release procedure](#standard-release-stable). Wait for Desktop
Release to publish, then update the manifests to admit everyone at once.
```bash
# 1. Ship the verified release branch (36h ramp from tag push).
npm run release:ship
# 2. Wait for Desktop Release to publish the GitHub Release.
# 1. Wait for Desktop Release to publish the GitHub Release.
gh run watch <desktop-release-run-id> --exit-status
# 3. Flip the published manifests to instant admit.
# 2. Flip the published manifests to an emergency release.
gh workflow run desktop-rollout.yml \
-f tag=v0.1.64 \
-f rollout_hours=0
@@ -352,23 +381,13 @@ gh workflow run desktop-rollout.yml \
Dispatch only after `finalize-rollout` has published the release. Until then the release is a draft, and a draft has no tag: `desktop-rollout.yml` looks the release up by tag and fails with `release not found`. The concurrency group `desktop-rollout-<tag>` that the two workflows share orders them only once both are queued; it does not hold an early dispatch until the draft is published.
The first public manifests carry `rolloutHours=36` for the minutes between publish and the flip. The renderer polls every 30 minutes, so active stable users pick up the new manifest on their next check.
The first public manifests carry `rolloutHours=18` for the minutes between publish and the flip. An install sees the flip at its next check, which is up to 6 hours after its previous one. In automatic mode it then downloads the release and installs it when the app quits.
### Adjusting an already-published release
To change the rollout duration on a release that's already shipped — e.g. flip a hotfix to instant admit, or slow a release down — use the dedicated `desktop-rollout.yml` workflow. It edits the manifests in place on the GitHub release without rebuilding anything. It only rewrites `rolloutHours`; `releaseDate` is preserved, so the rollout clock keeps ticking from the original publish time.
To change the rollout duration on a release that already shipped, use the `desktop-rollout.yml` workflow. It edits the manifests in place on the GitHub release without rebuilding anything. It rewrites only `rolloutHours`. `releaseDate` is preserved, so the rollout clock keeps running from the original publish time.
**Hotfix (instant admit) on an already-shipped release:**
```bash
gh workflow run desktop-rollout.yml \
-f tag=v0.1.42 \
-f rollout_hours=0
```
`rollout_hours=0` admits 100% of stable users on their next update check (within ~30 min for active clients).
**Slow a rollout down** (e.g. extend total duration to 72h since the original release):
To slow a rollout down, for example to 72 hours since the original release:
```bash
gh workflow run desktop-rollout.yml \
@@ -376,13 +395,59 @@ gh workflow run desktop-rollout.yml \
-f rollout_hours=72
```
`rollout_hours` is **total duration since the original release date**, not "extend by N more hours from now." If `v0.1.42` was published 2h ago and you set `rollout_hours=72`, the ramp finishes 70h from now.
`rollout_hours` is the total duration since the original release date. If `v0.1.42` was published 2 hours ago and you set `rollout_hours=72`, the ramp finishes 70 hours from now.
A longer rollout does not stop a release. The canary group still updates. To stop a release, [halt it](#halt-a-release).
The dispatch is idempotent and shares the `desktop-rollout-<tag>` concurrency group with `desktop-release.yml`'s `finalize-rollout` job, so it serializes safely against an in-flight tag-push pipeline targeting the same release.
### Halt a release
Stable installs and the download page follow the release that GitHub marks as latest. To stop a release, mark the last good release as latest:
```bash
# v0.1.41 is the last good release.
gh release edit v0.1.41 --latest
# Prints v0.1.41 when the halt is in effect.
gh api repos/getpaseo/paseo/releases/latest --jq .tag_name
```
The halt applies to every stable install from its next check, including installs older than the staged rollout:
- An install that has not downloaded the halted release no longer sees it.
- An install that downloaded it asks GitHub again before it installs at quit, and drops the download.
- An install that already runs the halted release stays on it, because the app never downgrades. [Ship a fix](#fix-a-bad-release).
A halt does not reach the beta channel. Beta installs read the release list by date and still take the halted release.
To resume a halted release, run `gh release edit v0.1.42 --latest` with its tag.
### Fix a bad release
1. [Halt](#halt-a-release) the bad release.
2. Ship the fix as the next patch with the [standard stable release procedure](#standard-release-stable).
3. After Desktop Release publishes the fix, make sure that GitHub marks it as latest:
```bash
gh api repos/getpaseo/paseo/releases/latest --jq .tag_name
```
If the command prints another tag, run `gh release edit <fix-tag> --latest`.
4. Flip the fix to an [emergency release](#emergency-release-rollout_hours0):
```bash
gh workflow run desktop-rollout.yml \
-f tag=<fix-tag> \
-f rollout_hours=0
```
Do not leave the fix as a paced release. The installs that took the bad release are in their 24-hour cooldown and skip a paced release. An install that holds the bad release as a staged update, and did not check during the halt, keeps it when a paced release follows. An emergency release reaches both.
### 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). When you go that route, you can stamp a non-default ramp directly:
`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:
```bash
gh workflow run desktop-release.yml \
@@ -390,13 +455,18 @@ gh workflow run desktop-release.yml \
-f rollout_hours=6
```
This does **not** apply to fresh releases shipped via `npm run release:ship` — tag-push runs always stamp 36. For a fresh release with a custom ramp, ship normally and then dispatch `desktop-rollout.yml` (same pattern as the instant-admit flow above, with your chosen `rollout_hours`).
For a fresh release with a custom ramp, follow the [emergency release procedure](#emergency-release-rollout_hours0)
and set `rollout_hours` to your chosen duration.
### Releasing during an active rollout
If you ship N+1 while N is still ramping, N+1 starts a fresh rollout from its own publish timestamp. N's rollout effectively ends — the newer manifest supersedes it. Rollout-aware clients revalidate the manifest for up to five seconds before installing a downloaded update on quit. If N+1 has replaced N but the client is not admitted to N+1 yet, it skips the downloaded N and waits rather than installing two updates in succession. If revalidation times out, the app exits without installing the cached update.
If you ship N+1 while N is still ramping, N+1 starts a new rollout from its own publish time, and the rollout of N ends because installs no longer see its manifests.
If N+1 is a hotfix for a bug in N, dispatch `desktop-rollout.yml -f tag=v0.1.<N+1> -f rollout_hours=0` after N+1 publishes so the users who already got N reach the fix fast.
An install that holds N as a staged update keeps N when N+1 is a paced release, and installs N when the app quits. It then waits out its cooldown before it takes a later paced release. The hold covers only paced patch releases that the install saw one after the other. If the install missed a release, it evaluates the newest release instead: it replaces N when it is admitted, and drops N when it is not.
A minor or major release always ends the hold. The version numbers do not show whether a fix shipped between `0.17.4` and `0.18.0`, so the install treats `0.18.0` as if it missed a release.
Before an install at quit, the app asks GitHub for the latest release for up to five seconds. If that check does not finish in time, the app exits without installing the staged update.
### macOS system floor
@@ -409,10 +479,10 @@ macOS 13 maps to Darwin 22. The two values use different version domains; do not
### Limitations
- **No pause / kill switch.** To stop new admissions, ship a superseding release. Clients revalidate on quit and will not install the superseded download, but a client that already completed installation cannot be recalled; ship a hotfix `+1` patch.
- **No rollback.** `allowDowngrade = false`. Bad release = ship a hotfix.
- **Bootstrap caveat.** Clients running a build older than the rollout feature ignore `rolloutHours` and admit immediately. Rollout protection only applies to clients running the rollout-aware version or later.
- **Up to ~30 min automatic admission latency.** Renderer polls every 30 minutes, so a stable user may take up to that long to be evaluated against the rollout window. Clicking **Check** is manual and bypasses rollout admission.
- A release cannot be recalled from an install that runs it. `allowDowngrade` is `false`. [Halt](#halt-a-release) the release to protect the other installs, then [ship a fix](#fix-a-bad-release).
- An emergency release reaches a running install at its next check, up to 6 hours after its previous one. A manual check sees it at once.
- Installs older than the canary and cooldown build have neither. They ramp in a straight line over `rolloutHours` and check every 30 minutes. Installs older than the staged rollout ignore `rolloutHours` and update at once.
- The app window starts every automatic check. A release whose window does not load cannot update itself, and its users must download a new build from the website. Smoke the packaged app before you publish.
## Mobile builds (EAS)
@@ -859,6 +929,18 @@ Bullets within each section (Added, Changed, Fixed) follow this order:
2. **Quality-of-life improvements** — polish, performance, smoother interactions.
3. **Internal/infra changes last** — only include if they have a tangible user benefit (e.g. "faster startup" is user-facing even if the fix was internal).
## Pre-release dependency checks
Run these checks from the repository root on the release commit before shipping a beta or stable release.
Use Linux x64 so the audit includes the platform-specific dependencies that the CI job checked.
1. Review changes to dependency versions, download URLs, and integrity hashes in `git diff <previous-release-tag> HEAD -- package-lock.json`.
2. Install the exact dependencies from the release lockfile with `npm ci`.
3. Run `npm audit signatures`. Investigate failures before shipping. See [Dependency signature audit](development.md#dependency-signature-audit) for help.
Checking signatures and reviewing the lockfile diff reduce the risk of shipping compromised dependencies.
These checks help prevent supply-chain attacks from reaching users through Paseo.
## Pre-release sanity check
Before cutting a **stable** release, the release agent reviews the diff as a last line of defence against shipping bugs. Skip this for betas — the beta itself is the smoke test, and gating each beta on a code review defeats the point of using betas as fast release candidates.
@@ -886,6 +968,7 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] Fold this beta into the series' single `CHANGELOG.md` entry (heading `## X.Y.Z-beta.N - YYYY-MM-DD`, previous stable → release source), review it against the changelog policy, get approval, and commit it with its [`CHANGELOG.zh-CN.md` translation](#changelog-translations) before running `release:prep:*`
- [ ] 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)
- [ ] Complete the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
- [ ] After go-ahead, `npm run release:ship:beta` published npm and pushed the `vX.Y.Z-beta.N` tag without triggering a second CI run
- [ ] npm shows 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
@@ -909,6 +992,7 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] Verify the changelog heading follows strict `## X.Y.Z - YYYY-MM-DD` format
- [ ] 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)
- [ ] Complete the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
- [ ] After go-ahead, `npm run release:ship` published npm, updated dist-tags, and pushed the `vX.Y.Z` tag without triggering a second CI run
- [ ] `latest` resolves to the new stable, and `beta` resolves to it 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
+22 -4
View File
@@ -61,6 +61,11 @@ the chat and its replica cache would keep only the end of the reply. A recovery
running catch-up starts after whatever that catch-up applied, because the app applies a forward page
row by row and an older cursor repeats rows.
A live row whose epoch differs from the local cursor is a rewind or replacement this client never
saw as an invalidation, not a stale row. The app recovers like a gap: it asks `after` its own
cursor, and the daemon answers that stale epoch with a reset tail. Dropping the rows instead would
leave the chat on pre-rewind history while the new epoch streams.
Initialization timeouts guard lack of catch-up progress, not the full multi-page sync. A successful page that queues the next `after` page refreshes the watchdog.
Opening or resuming an agent fetches the latest available turns with a soft target of 40
@@ -202,10 +207,23 @@ owner wraps cached preparation, network catch-up, accepted timeline application,
behind one interface. React supplies transport and projection operations without selecting a cache
path or issuing a separate persistence notification.
Active-agent list reconciliation does not own transcript lifetime. An archived agent's fresh
history response can arrive before the active-list response that omits it. Clearing history there
would discard accepted rows while the viewed owner still considers them synchronized. Entity
deletion clears the transcript; list membership changes do not.
The viewed-timeline owner also owns how long a transcript stays in memory. An active agent's
transcript stays resident while its chat is hidden, so switching back to it needs no fetch. An
archived agent's transcript stays resident only while its chat is shown, for example when it is
opened from History. When an agent is archived, or the active list drops it because its workspace
was archived, the owner releases the transcript unless the chat is shown. It also releases the
transcript when the chat stops being shown. A released chat leaves the opened chats. When it is
shown again, it reads the replica cache and catches up again. A history page, live event, or cache
read that arrives after the release is dropped.
The active-list reconciliation does not release transcripts itself. An archived agent's fresh
history response can arrive before the active-list response that omits it, while the chat is
open in History. Clearing history there would discard rows the user is reading.
An agent counts as archived when the active list omits it, when its row has an archive timestamp,
or when the workspace list omits its workspace. The workspace check matters because a workspace
archive can complete while one of its agents keeps a row with no archive timestamp. Until a list
first hydrates, it marks no agent as archived. Deleting the agent clears the transcript.
Removing the host from the registry is the destructive boundary: it stops the runtime and clears the
session and host-scoped setup state together.
+10 -1
View File
@@ -86,7 +86,7 @@ mounts—never at module evaluation time.
## Dynamic Pixel Styles On Web
Avoid feeding changing pixel values such as `{ top, left }`, `{ maxHeight }`, or `{ minWidth }` into the `style` prop of Unistyles-managed React Native components on web. The web runtime hashes each distinct style object by value and appends a CSS rule to `#unistyles-web`; those rules are not reclaimed during the page lifetime, so pointer-driven positioning can turn into steady stylesheet growth.
Avoid feeding changing pixel values such as `{ top, left }`, `{ maxHeight }`, or `{ minWidth }` into the `style` prop of Unistyles-managed React Native components on web. The web runtime hashes each distinct style object by value and inserts a CSS rule into `#unistyles-web` for it, then deletes the rule when the last element using it unmounts. Pointer-driven positioning turns into a rule insert and delete per move.
Use the inline style escape hatch below for high-churn values. Do not split a component into plain/web/native variants just to keep one measured value out of the CSS registry. Raw DOM wrappers are reserved for real DOM infrastructure, such as terminal hosts, virtualized web rows, or third-party drag wrappers.
@@ -224,6 +224,7 @@ Quick confirmation in DevTools console:
```js
[...document.styleSheets]
.flatMap((s) => [...(s.cssRules || [])])
.flatMap((r) => (r.cssRules ? [...r.cssRules] : [r]))
.map((r) => r.cssText)
.filter((t) => t.includes("unistyles") && t.includes("> *"));
```
@@ -366,6 +367,14 @@ colors. Keep this patch until upstream reads the scheme through separate lists.
The desktop browser E2E checks both transition directions in an isolated Electron
process, because Playwright's focus emulation prevents real hidden-page behavior.
The stylesheet patch backports upstream PR #1354 (3.8.0). Unistyles 3.2.4 rewrote
the whole text of `#unistyles-web` whenever a class was added or removed, and
the browser then restyled the entire document: about 5 ms each time, several
times for one hover card. The backport changes one CSSOM rule per class instead.
The tag therefore has no text; read its rules through `sheet.cssRules`. Classes
without a media query sit inside an `@media all` group. Assert on the stylesheet
in E2E with `packages/app/e2e/support/helpers/shared-stylesheet.ts`.
Register every dependency patch in `scripts/postinstall-patches.mjs`. A file in
`patches/` is inert unless that script knows which installed package activates
it.
@@ -0,0 +1,7 @@
Fixed
- Fixed numbered sublists overlapping their text and quotes inside lists overlapping later messages on Android
- Fixed Android terminal input so it asks the keyboard to exclude typed text from personalized learning
- Fixed conversations disappearing when directory capitalization differs on a case-insensitive file system
- Fixed interrupt and steer messages to archived agents being queued without starting a turn
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,7 @@
Fixed
- Fixed numbered sublists overlapping their text and quotes inside lists overlapping later messages on Android
- Fixed Android terminal input so it asks the keyboard to exclude typed text from personalized learning
- Fixed conversations disappearing when directory capitalization differs on a case-insensitive file system
- Fixed interrupt and steer messages to archived agents being queued without starting a turn
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,7 @@
Fixed
- Fixed numbered sublists overlapping their text and quotes inside lists overlapping later messages on Android
- Fixed Android terminal input so it asks the keyboard to exclude typed text from personalized learning
- Fixed conversations disappearing when directory capitalization differs on a case-insensitive file system
- Fixed interrupt and steer messages to archived agents being queued without starting a turn
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,7 @@
Fixed
- Fixed numbered sublists overlapping their text and quotes inside lists overlapping later messages on Android
- Fixed Android terminal input so it asks the keyboard to exclude typed text from personalized learning
- Fixed conversations disappearing when directory capitalization differs on a case-insensitive file system
- Fixed interrupt and steer messages to archived agents being queued without starting a turn
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,5 @@
- Archive workspaces together: Cmd/Ctrl+click a workspace in the sidebar to select multiple workspaces and archive them in one step.
- Copy quoted drafts: Copy a quote from a reply with one tap, without the > markers.
- Redesigned agent profiles page: Agent profiles have their own dedicated settings page, and the model picker saves a new profile in one tap.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,5 @@
- Archive workspaces together: Cmd/Ctrl+click a workspace in the sidebar to select multiple workspaces and archive them in one step.
- Copy quoted drafts: Copy a quote from a reply with one tap, without the > markers.
- Redesigned agent profiles page: Agent profiles have their own dedicated settings page, and the model picker saves a new profile in one tap.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,5 @@
- Archive workspaces together: Cmd/Ctrl+click a workspace in the sidebar to select multiple workspaces and archive them in one step.
- Copy quoted drafts: Copy a quote from a reply with one tap, without the > markers.
- Redesigned agent profiles page: Agent profiles have their own dedicated settings page, and the model picker saves a new profile in one tap.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,5 @@
- Archive workspaces together: Cmd/Ctrl+click a workspace in the sidebar to select multiple workspaces and archive them in one step.
- Copy quoted drafts: Copy a quote from a reply with one tap, without the > markers.
- Redesigned agent profiles page: Agent profiles have their own dedicated settings page, and the model picker saves a new profile in one tap.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,12 @@
Improved
- Reorganized Settings into Device and Host sections and consolidated sparse pages
- Added arrow-key navigation for models, providers, and profiles in the model picker
- Added an in-place Refresh control for Tailscale availability in host settings and setup
Changed
- Removed the Antigravity usage source that ran agy -p /usage in the background
Fixed
- Fixed Paseo Android crashing on Samsung devices when a chat shows a code block or quote
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,12 @@
Improved
- Reorganized Settings into Device and Host sections and consolidated sparse pages
- Added arrow-key navigation for models, providers, and profiles in the model picker
- Added an in-place Refresh control for Tailscale availability in host settings and setup
Changed
- Removed the Antigravity usage source that ran agy -p /usage in the background
Fixed
- Fixed Paseo Android crashing on Samsung devices when a chat shows a code block or quote
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,12 @@
Improved
- Reorganized Settings into Device and Host sections and consolidated sparse pages
- Added arrow-key navigation for models, providers, and profiles in the model picker
- Added an in-place Refresh control for Tailscale availability in host settings and setup
Changed
- Removed the Antigravity usage source that ran agy -p /usage in the background
Fixed
- Fixed Paseo Android crashing on Samsung devices when a chat shows a code block or quote
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,12 @@
Improved
- Reorganized Settings into Device and Host sections and consolidated sparse pages
- Added arrow-key navigation for models, providers, and profiles in the model picker
- Added an in-place Refresh control for Tailscale availability in host settings and setup
Changed
- Removed the Antigravity usage source that ran agy -p /usage in the background
Fixed
- Fixed Paseo Android crashing on Samsung devices when a chat shows a code block or quote
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,4 @@
- Remote workspace browser proxy: Desktop browser tabs in remote workspaces now route through the workspace daemon, so remote localhost servers open directly in Paseo.
- Per-device notification preferences: Each device can choose which agent, terminal, and plugin events send notifications, and plugins can send notifications and handle taps.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,4 @@
- Remote workspace browser proxy: Desktop browser tabs in remote workspaces now route through the workspace daemon, so remote localhost servers open directly in Paseo.
- Per-device notification preferences: Each device can choose which agent, terminal, and plugin events send notifications, and plugins can send notifications and handle taps.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,4 @@
- Remote workspace browser proxy: Desktop browser tabs in remote workspaces now route through the workspace daemon, so remote localhost servers open directly in Paseo.
- Per-device notification preferences: Each device can choose which agent, terminal, and plugin events send notifications, and plugins can send notifications and handle taps.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,4 @@
- Remote workspace browser proxy: Desktop browser tabs in remote workspaces now route through the workspace daemon, so remote localhost servers open directly in Paseo.
- Per-device notification preferences: Each device can choose which agent, terminal, and plugin events send notifications, and plugins can send notifications and handle taps.
Full notes: https://paseo.sh/changelog
+1 -1
View File
@@ -1 +1 @@
sha256-W725BRG14xajMsR4t8Y3NmxppMnJ8AUd7Kdb6F7LmMw=
sha256-SZV3WTKLb+JhxWNo/jWyx+2sipzfL93YbbqQSihd3Wo=
+30 -29
View File
@@ -1,12 +1,12 @@
{
"name": "paseo",
"version": "0.17.3",
"version": "0.18.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "paseo",
"version": "0.17.3",
"version": "0.18.0",
"hasInstallScript": true,
"license": "Apache-2.0",
"workspaces": [
@@ -37541,7 +37541,7 @@
},
"packages/app": {
"name": "@getpaseo/app",
"version": "0.17.3",
"version": "0.18.0",
"dependencies": {
"@codemirror/commands": "6.10.4",
"@codemirror/language": "6.12.4",
@@ -39694,13 +39694,13 @@
},
"packages/cli": {
"name": "@getpaseo/cli",
"version": "0.17.3",
"version": "0.18.0",
"license": "Apache-2.0",
"dependencies": {
"@clack/prompts": "^1.0.0",
"@getpaseo/client": "0.17.3",
"@getpaseo/protocol": "0.17.3",
"@getpaseo/server": "0.17.3",
"@getpaseo/client": "0.18.0",
"@getpaseo/protocol": "0.18.0",
"@getpaseo/server": "0.18.0",
"chalk": "^5.3.0",
"commander": "^12.0.0",
"mime-types": "^2.1.35",
@@ -39947,11 +39947,11 @@
},
"packages/client": {
"name": "@getpaseo/client",
"version": "0.17.3",
"version": "0.18.0",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/protocol": "0.17.3",
"@getpaseo/relay": "0.17.3",
"@getpaseo/protocol": "0.18.0",
"@getpaseo/relay": "0.18.0",
"ws": "^8.20.0",
"zod": "^4.4.3"
},
@@ -39963,7 +39963,7 @@
},
"packages/desktop": {
"name": "@getpaseo/desktop",
"version": "0.17.3",
"version": "0.18.0",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/cli": "*",
@@ -40206,7 +40206,7 @@
},
"packages/expo-two-way-audio": {
"name": "@getpaseo/expo-two-way-audio",
"version": "0.17.3",
"version": "0.18.0",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.5.14",
@@ -40252,7 +40252,7 @@
},
"packages/highlight": {
"name": "@getpaseo/highlight",
"version": "0.17.3",
"version": "0.18.0",
"license": "Apache-2.0",
"dependencies": {
"@codemirror/language": "6.12.4",
@@ -40282,7 +40282,7 @@
},
"packages/plugin": {
"name": "@getpaseo/plugin",
"version": "0.17.3",
"version": "0.18.0",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^1.4.0",
@@ -40290,8 +40290,8 @@
"use-sync-external-store": "^1.6.0"
},
"devDependencies": {
"@getpaseo/client": "0.17.3",
"@getpaseo/protocol": "0.17.3",
"@getpaseo/client": "0.18.0",
"@getpaseo/protocol": "0.18.0",
"@types/node": "^20.9.0",
"@types/react": "~19.2.0",
"react": "19.2.3",
@@ -40301,8 +40301,8 @@
"zod": "^4.4.3"
},
"peerDependencies": {
"@getpaseo/client": "0.17.3",
"@getpaseo/protocol": "0.17.3",
"@getpaseo/client": "0.18.0",
"@getpaseo/protocol": "0.18.0",
"react": ">=19.1.0 <20",
"react-native": ">=0.81.5",
"zod": "^4.4.3"
@@ -40324,7 +40324,7 @@
},
"packages/protocol": {
"name": "@getpaseo/protocol",
"version": "0.17.3",
"version": "0.18.0",
"license": "Apache-2.0",
"dependencies": {
"semver": "^7.8.5",
@@ -40351,7 +40351,7 @@
}
},
"packages/react-native-enriched-markdown": {
"version": "0.17.1",
"version": "0.18.0",
"hasInstallScript": true,
"license": "MIT",
"peerDependencies": {
@@ -40367,7 +40367,7 @@
},
"packages/relay": {
"name": "@getpaseo/relay",
"version": "0.17.3",
"version": "0.18.0",
"license": "Apache-2.0",
"dependencies": {
"@noble/ciphers": "^2.4.0",
@@ -40589,17 +40589,17 @@
},
"packages/server": {
"name": "@getpaseo/server",
"version": "0.17.3",
"version": "0.18.0",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^0.17.1",
"@anthropic-ai/claude-agent-sdk": "0.3.326",
"@anthropic-ai/sdk": "^0.104.2",
"@getpaseo/client": "0.17.3",
"@getpaseo/highlight": "0.17.3",
"@getpaseo/plugin": "0.17.3",
"@getpaseo/protocol": "0.17.3",
"@getpaseo/relay": "0.17.3",
"@getpaseo/client": "0.18.0",
"@getpaseo/highlight": "0.18.0",
"@getpaseo/plugin": "0.18.0",
"@getpaseo/protocol": "0.18.0",
"@getpaseo/relay": "0.18.0",
"@isaacs/ttlcache": "^2.1.4",
"@modelcontextprotocol/node": "2.1.2",
"@modelcontextprotocol/sdk": "1.29.0",
@@ -40625,6 +40625,7 @@
"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",
@@ -41549,7 +41550,7 @@
},
"packages/website": {
"name": "@getpaseo/website",
"version": "0.17.3",
"version": "0.18.0",
"dependencies": {
"@cloudflare/vite-plugin": "^1.29.1",
"@cloudflare/workers-types": "^4.20260317.1",
@@ -43160,7 +43161,7 @@
},
"plugins": {
"name": "@getpaseo/builtin-plugins",
"version": "0.17.3",
"version": "0.18.0",
"dependencies": {
"@getpaseo/plugin": "*",
"zod": "^4.4.3"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "paseo",
"version": "0.17.3",
"version": "0.18.0",
"private": true,
"description": "Paseo: voice-controlled development environment for local AI coding agents",
"keywords": [
+230 -207
View File
@@ -5,27 +5,26 @@ import path from "node:path";
import { test, expect } from "../support/fixtures";
import {
addProjectFlow,
chooseAddHostFromProjectFlow,
addProjectFlowBack,
addProjectFlowHost,
addProjectFlowHostTrigger,
addProjectFlowInput,
addProjectFlowMethod,
chooseAddProjectMethod,
expectAddProjectPage,
expectNewWorkspaceForAddedProject,
addProjectFlowSubmit,
chooseAddHostFromProjectFlow,
chooseAddProjectHost,
chooseAddProjectLocation,
chooseAddProjectTab,
expectAddProjectResultVisible,
expectAddProjectTab,
expectNewWorkspaceForAddedProject,
navigateAddProjectResults,
navigateAndDismissAddProject,
watchAddProjectRenderWarnings,
openAddProjectFlow,
openAddProjectHostSelection,
watchAddProjectRenderWarnings,
} from "../support/helpers/add-project-flow";
import { gotoAppShell } from "../support/helpers/app";
import {
disconnectAllHostsAndReload,
addConnectedHostAndReload,
addConnectedHostsAndReload,
addOfflineHostAndReload,
disconnectAllHostsAndReload,
waitForConnectedHost,
} from "../support/helpers/hosts";
import {
@@ -36,6 +35,8 @@ import { expectOpenedProject } from "../support/helpers/project-picker-ui";
import { connectSeedClient } from "../support/helpers/seed-client";
import { getServerId } from "../support/helpers/server-id";
const MOD = process.platform === "darwin" ? "Meta" : "Control";
const SECONDARY_HOST_ID = "add-project-flow-secondary";
const SECONDARY_HOST_LABEL = "Secondary Host";
@@ -70,13 +71,14 @@ async function expectProjectHasNoWorkspaces(projectId: string): Promise<void> {
}
}
test.describe("Add Project command-center flow", () => {
test.describe("Add project sheet", () => {
test.describe.configure({ timeout: 180_000 });
test("Add host replaces the project dialog when no hosts are connected", async ({ page }) => {
test("Add host replaces the project sheet when no hosts are connected", async ({ page }) => {
await gotoAppShell(page);
await disconnectAllHostsAndReload(page);
await openAddProjectHostSelection(page);
await page.locator('[data-testid="sidebar-add-project"]:visible').click();
await expect(addProjectFlow(page)).toContainText("No connected hosts");
const originalUrl = page.url();
await chooseAddHostFromProjectFlow(page);
await expect(addProjectFlow(page)).toBeHidden();
@@ -86,22 +88,36 @@ test.describe("Add Project command-center flow", () => {
await expect(page).toHaveURL(originalUrl);
});
test("method selection shows the daemon's available project sources without search", async ({
test("opens on Existing, switches tabs with Mod+1/2/3, keeps each draft, and closes on Escape", async ({
page,
}) => {
const renderWarnings = watchAddProjectRenderWarnings(page);
await gotoAppShell(page);
await openAddProjectFlow(page);
await expect(addProjectFlowMethod(page, "directory-search")).toBeVisible();
await expect(addProjectFlowMethod(page, "github")).toContainText("Clone from GitHub");
await expect(addProjectFlowMethod(page, "new-directory")).toContainText("New directory");
await expect(addProjectFlowInput(page)).toHaveCount(0);
await expect(addProjectFlow(page).getByRole("textbox")).toHaveCount(0);
await expect(page.getByTestId("add-project-flow-page-host")).toHaveCount(0);
await page.keyboard.type("paseo");
await page.keyboard.press(`${MOD}+2`);
await expectAddProjectTab(page, "clone");
await expect(addProjectFlowInput(page)).toBeFocused();
await page.keyboard.type("getpaseo/");
await page.keyboard.press(`${MOD}+3`);
await expectAddProjectTab(page, "new-folder");
await expect(addProjectFlowSubmit(page)).toBeDisabled();
await page.keyboard.press(`${MOD}+1`);
await expectAddProjectTab(page, "existing");
await expect(addProjectFlowInput(page)).toHaveValue("paseo");
await chooseAddProjectTab(page, "clone");
await expect(addProjectFlowInput(page)).toHaveValue("getpaseo/");
await navigateAndDismissAddProject(page);
await expect(addProjectFlow(page)).not.toBeVisible();
expect(renderWarnings).toEqual([]);
});
test("an offline extra host neither appears nor forces host selection", async ({ page }) => {
test("a single connected host shows no host picker, even with an offline host", async ({
page,
}) => {
await gotoAppShell(page);
await addOfflineHostAndReload(page, {
serverId: "add-project-flow-offline",
@@ -110,8 +126,7 @@ test.describe("Add Project command-center flow", () => {
await openAddProjectFlow(page);
await expect(addProjectFlowHost(page, "add-project-flow-offline")).toHaveCount(0);
await expect(addProjectFlowMethod(page, "directory-search")).toBeVisible();
await expect(addProjectFlowHostTrigger(page)).toHaveCount(0);
});
test.describe("with two connected hosts", () => {
@@ -125,73 +140,7 @@ test.describe("Add Project command-center flow", () => {
await secondaryHost?.close();
});
test("keyboard selection chooses the second host", async ({ page }) => {
await gotoAppShell(page);
await addConnectedHostAndReload(page, {
serverId: secondaryHost.serverId,
label: SECONDARY_HOST_LABEL,
port: secondaryHost.port,
});
await waitForConnectedHost(page, {
serverId: SECONDARY_HOST_ID,
endpoint: `localhost:${secondaryHost.port}`,
});
await openAddProjectHostSelection(page);
await page.keyboard.press("ArrowDown");
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "method");
await expect(addProjectFlow(page)).toContainText(SECONDARY_HOST_LABEL);
});
test("Escape and Back restore searchable page input before closing at the root", async ({
page,
}) => {
const renderWarnings = watchAddProjectRenderWarnings(page);
await gotoAppShell(page);
await addConnectedHostAndReload(page, {
serverId: secondaryHost.serverId,
label: SECONDARY_HOST_LABEL,
port: secondaryHost.port,
});
await waitForConnectedHost(page, {
serverId: SECONDARY_HOST_ID,
endpoint: `localhost:${secondaryHost.port}`,
});
await openAddProjectHostSelection(page);
await addProjectFlowInput(page).fill("o");
await page.keyboard.press("ArrowDown");
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "method");
await chooseAddProjectMethod(page, "new-directory");
await expectAddProjectPage(page, "new-directory-parent");
await page.keyboard.press("Escape");
await expectAddProjectPage(page, "method");
await expect(addProjectFlowInput(page)).toHaveCount(0);
await chooseAddProjectMethod(page, "new-directory");
await expectAddProjectPage(page, "new-directory-parent");
await addProjectFlowBack(page).click();
await expectAddProjectPage(page, "method");
await addProjectFlowBack(page).click();
await expectAddProjectPage(page, "host");
await expect(addProjectFlowInput(page)).toHaveValue("o");
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "method");
await expect(addProjectFlow(page)).toContainText(SECONDARY_HOST_LABEL);
await page.keyboard.press("Escape");
await expectAddProjectPage(page, "host");
await navigateAndDismissAddProject(page);
await expect(addProjectFlow(page)).not.toBeVisible();
expect(renderWarnings).toEqual([]);
});
test("New directory creates a Project on the selected remote host", async ({ page }) => {
test("New folder creates a Project on the host chosen in the sheet", async ({ page }) => {
const parentDirectory = await mkdtemp(path.join(tmpdir(), "paseo-e2e-remote-project-"));
const directoryName = `remote-${randomUUID().slice(0, 8)}`;
const directoryPath = path.join(parentDirectory, directoryName);
@@ -207,18 +156,15 @@ test.describe("Add Project command-center flow", () => {
serverId: SECONDARY_HOST_ID,
endpoint: `localhost:${secondaryHost.port}`,
});
await openAddProjectHostSelection(page);
await addProjectFlowHost(page, SECONDARY_HOST_ID).click();
await expectAddProjectPage(page, "method");
await openAddProjectFlow(page);
await chooseAddProjectTab(page, "new-folder");
await addProjectFlowInput(page).fill(directoryName);
await expect(addProjectFlowMethod(page, "new-directory")).toContainText(
`Create an empty directory on ${SECONDARY_HOST_LABEL}`,
);
await chooseAddProjectMethod(page, "new-directory");
await addProjectFlowInput(page).fill(parentDirectory);
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "new-directory-name");
await page.keyboard.type(directoryName);
await chooseAddProjectHost(page, SECONDARY_HOST_ID);
await expect(addProjectFlowHostTrigger(page)).toContainText(SECONDARY_HOST_LABEL);
await expect(addProjectFlowInput(page)).toHaveValue(directoryName);
await chooseAddProjectLocation(page, parentDirectory);
await addProjectFlowInput(page).focus();
await page.keyboard.press("Enter");
const projectId = await expectOpenedProject(page, directoryName);
@@ -236,57 +182,35 @@ test.describe("Add Project command-center flow", () => {
});
});
test("filtered hosts keep the keyboard-selected row visible", async ({ page }) => {
const hosts: IsolatedHostDaemon[] = [];
test("a host that disconnects keeps its draft and blocks submit instead of moving it", async ({
page,
}) => {
const droppingHost = await startIsolatedHostDaemon("add-project-flow-dropping");
try {
for (let index = 1; index <= 3; index += 1) {
hosts.push(await startIsolatedHostDaemon(`scroll-host-${index}`));
}
await page.setViewportSize({ width: 1280, height: 360 });
await gotoAppShell(page);
await addConnectedHostsAndReload(
page,
hosts.map((host, index) => ({
serverId: host.serverId,
port: host.port,
label: index < 2 ? `Fleet 0${index + 1}` : "Other host",
})),
{ primaryLabel: "Fleet 00" },
await addConnectedHostAndReload(page, {
serverId: droppingHost.serverId,
label: "Dropping Host",
port: droppingHost.port,
});
await waitForConnectedHost(page, {
serverId: droppingHost.serverId,
endpoint: `localhost:${droppingHost.port}`,
});
await openAddProjectFlow(page);
await chooseAddProjectHost(page, droppingHost.serverId);
await addProjectFlowInput(page).fill(homedir());
await droppingHost.close();
await expect(page.getByTestId("add-project-flow-error")).toHaveText(
"Dropping Host is offline",
{ timeout: 30_000 },
);
for (const host of hosts) {
await waitForConnectedHost(page, {
serverId: host.serverId,
endpoint: `localhost:${host.port}`,
});
}
await openAddProjectHostSelection(page);
await expect(
addProjectFlow(page).getByRole("button").filter({ hasText: "Other host" }),
).toBeVisible();
await addProjectFlowInput(page).fill("Fleet");
await expect(addProjectFlowHost(page, hosts[2]!.serverId)).toHaveCount(0);
await navigateAddProjectResults(page, "ArrowDown", 2);
await expectAddProjectResultVisible(page, "Fleet 02");
// Filtering out the first host moves retained rows to new positions.
await addProjectFlowInput(page).fill("scroll-host");
await expect(addProjectFlowHost(page, getServerId())).toHaveCount(0);
await expectAddProjectResultVisible(page, "Fleet 01");
await navigateAddProjectResults(page, "ArrowDown", 2);
await expectAddProjectResultVisible(page, "Other host");
await navigateAddProjectResults(page, "ArrowDown", 1);
await expectAddProjectResultVisible(page, "Fleet 01");
await addProjectFlowInput(page).fill("Fleet");
await expectAddProjectResultVisible(page, "Fleet 00");
await navigateAddProjectResults(page, "ArrowDown", 2);
await expectAddProjectResultVisible(page, "Fleet 02");
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "method");
await expect(addProjectFlow(page)).toContainText("Fleet 02");
await expect(addProjectFlowHostTrigger(page)).toContainText("Dropping Host");
await expect(addProjectFlowInput(page)).toHaveValue(homedir());
await expect(addProjectFlowSubmit(page)).toBeDisabled();
} finally {
await Promise.all(hosts.map((host) => host.close()));
await droppingHost.close();
}
});
@@ -297,9 +221,6 @@ test.describe("Add Project command-center flow", () => {
await gotoAppShell(page);
await openAddProjectFlow(page);
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "directory-search");
await expect(addProjectFlowInput(page)).toBeFocused();
await page.keyboard.type(projectPickerFixture.fuzzyQuery);
await expect(addProjectFlow(page)).toContainText(projectPickerFixture.projectName, {
timeout: 30_000,
@@ -323,45 +244,32 @@ test.describe("Add Project command-center flow", () => {
const parentDirectory = await mkdtemp(path.join(homedir(), "paseo-e2e-scroll-"));
const rowPath = (index: number) =>
path.join(parentDirectory, `scroll-probe-${String(index).padStart(2, "0")}`);
const rowName = (index: number) => path.basename(rowPath(index));
let projectId: string | null = null;
try {
await Promise.all(Array.from({ length: 16 }, (_, index) => mkdir(rowPath(index))));
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
await addProjectFlowInput(page).fill(path.basename(parentDirectory));
await addProjectFlowInput(page).fill(`${path.basename(parentDirectory)}/scroll-probe`);
const results = page.getByTestId("add-project-flow-results");
await expect(results.getByRole("button", { name: /scroll-probe-/ })).toHaveCount(16, {
timeout: 30_000,
});
await navigateAddProjectResults(page, "ArrowDown", 12);
await expectAddProjectResultVisible(page, rowPath(11));
await navigateAddProjectResults(page, "ArrowDown", 11);
await expectAddProjectResultVisible(page, rowName(11));
await navigateAddProjectResults(page, "ArrowUp", 12);
await expectAddProjectResultVisible(page, parentDirectory);
await navigateAddProjectResults(page, "ArrowUp", 1);
await expectAddProjectResultVisible(page, rowPath(15));
await expectAddProjectResultVisible(page, rowName(15));
await navigateAddProjectResults(page, "ArrowDown", 1);
await expectAddProjectResultVisible(page, parentDirectory);
await expectAddProjectResultVisible(page, rowName(0));
await navigateAddProjectResults(page, "ArrowDown", 12);
await expectAddProjectResultVisible(page, rowPath(11));
await addProjectFlowInput(page).fill(`${path.basename(parentDirectory)}probe`);
await expect(results.getByRole("button")).toHaveCount(16);
await expectAddProjectResultVisible(page, rowPath(0));
await navigateAddProjectResults(page, "ArrowDown", 12);
await expectAddProjectResultVisible(page, rowPath(12));
await addProjectFlowInput(page).fill(path.basename(parentDirectory));
await expect(results.getByRole("button")).toHaveCount(17);
await expectAddProjectResultVisible(page, parentDirectory);
await navigateAddProjectResults(page, "ArrowDown", 12);
await expectAddProjectResultVisible(page, rowPath(11));
await navigateAddProjectResults(page, "ArrowDown", 11);
await page.keyboard.press("Enter");
projectId = await expectOpenedProject(page, "scroll-probe-11");
projectId = await expectOpenedProject(page, rowName(11));
await expectNewWorkspaceForAddedProject(page, {
serverId: getServerId(),
projectId,
projectName: "scroll-probe-11",
projectName: rowName(11),
projectPath: rowPath(11),
});
} finally {
@@ -370,28 +278,146 @@ test.describe("Add Project command-center flow", () => {
}
});
test("a complete repository URL remains selectable without a GitHub search result", async ({
test("Enter on a focused result adds that folder, not the one picked before", async ({
page,
}) => {
const parentDirectory = await mkdtemp(path.join(homedir(), "paseo-e2e-focus-"));
const firstPath = path.join(parentDirectory, "focus-probe-a");
const secondPath = path.join(parentDirectory, "focus-probe-b");
let projectId: string | null = null;
try {
await Promise.all([mkdir(firstPath), mkdir(secondPath)]);
await gotoAppShell(page);
await openAddProjectFlow(page);
await addProjectFlowInput(page).fill(`${path.basename(parentDirectory)}/focus-probe`);
const results = page.getByTestId("add-project-flow-results");
await expect(results.getByRole("button", { name: /focus-probe-/ })).toHaveCount(2, {
timeout: 30_000,
});
await results.getByRole("button", { name: /focus-probe-b/ }).focus();
await page.keyboard.press("Enter");
projectId = await expectOpenedProject(page, "focus-probe-b");
await expectNewWorkspaceForAddedProject(page, {
serverId: getServerId(),
projectId,
projectName: "focus-probe-b",
projectPath: secondPath,
});
} finally {
if (projectId) await removeCreatedProject(secondPath, projectId);
await rm(parentDirectory, { recursive: true, force: true });
}
});
test("Enter while a new search runs does not open a row from the previous search", async ({
page,
}) => {
const parentDirectory = await mkdtemp(path.join(homedir(), "paseo-e2e-stale-"));
try {
await mkdir(path.join(parentDirectory, "stale-probe-a"));
await gotoAppShell(page);
await openAddProjectFlow(page);
const prefix = path.basename(parentDirectory);
await addProjectFlowInput(page).fill(`${prefix}/stale-probe`);
const results = page.getByTestId("add-project-flow-results");
await expect(results.getByRole("button", { name: /stale-probe-a/ })).toBeVisible({
timeout: 30_000,
});
await addProjectFlowInput(page).fill(`${prefix}/no-such-folder`);
await page.keyboard.press("Enter");
await expect(addProjectFlow(page).getByText("No matching folders")).toBeVisible({
timeout: 30_000,
});
await expect(addProjectFlow(page)).toBeVisible();
await expect(addProjectFlowSubmit(page)).toBeDisabled();
} finally {
await rm(parentDirectory, { recursive: true, force: true });
}
});
test("a complete repository URL is cloneable without a GitHub search result", async ({
page,
}) => {
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "github");
await chooseAddProjectTab(page, "clone");
const remote = "https://github.invalid/acme/manual.git";
await addProjectFlowInput(page).fill(remote);
await expect(addProjectFlow(page).getByText("manual", { exact: true })).toBeVisible();
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "github-location");
const title = addProjectFlow(page).getByTestId("add-project-flow-title");
await expect(title.getByText("Choose destination", { exact: true })).toBeVisible();
await expect(title.getByText("localhost", { exact: true })).toBeVisible();
await expect(title).not.toContainText("Where should Paseo create");
await addProjectFlowBack(page).click();
await expect(addProjectFlowInput(page)).toHaveValue(remote);
await expect(page.getByTestId("add-project-flow-location")).toContainText("/manual");
await expect(addProjectFlowSubmit(page)).toBeEnabled();
});
test("New directory validates the name, restores parent and name state, then creates a Project", async ({
test("Enter activates a focused button instead of the primary action", async ({ page }) => {
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectTab(page, "clone");
await addProjectFlowInput(page).fill("https://github.invalid/acme/manual.git");
await expect(addProjectFlowSubmit(page)).toBeEnabled();
await addProjectFlow(page).getByRole("button", { name: "Close", exact: true }).focus();
await page.keyboard.press("Enter");
await expect(addProjectFlow(page)).toBeHidden();
});
test("a row picked during a search is not replaced by the answer's first row", async ({
page,
}) => {
const parentDirectory = await mkdtemp(path.join(homedir(), "paseo-e2e-dropped-pick-"));
try {
await Promise.all([
mkdir(path.join(parentDirectory, "previous-probe")),
mkdir(path.join(parentDirectory, "incoming-probe")),
]);
await gotoAppShell(page);
await openAddProjectFlow(page);
const prefix = path.basename(parentDirectory);
const results = page.getByTestId("add-project-flow-results");
await addProjectFlowInput(page).fill(`${prefix}/previous-probe`);
await expect(results.getByRole("button", { name: /previous-probe/ })).toBeVisible({
timeout: 30_000,
});
await addProjectFlowInput(page).fill(`${prefix}/incoming-probe`);
await page.keyboard.press("ArrowDown");
await expect(results.getByRole("button", { name: /incoming-probe/ })).toBeVisible({
timeout: 30_000,
});
await expect(addProjectFlowSubmit(page)).toBeDisabled();
} finally {
await rm(parentDirectory, { recursive: true, force: true });
}
});
test("Enter in Location while a new search runs keeps the current location", async ({ page }) => {
const parentDirectory = await mkdtemp(path.join(homedir(), "paseo-e2e-stale-location-"));
try {
await mkdir(path.join(parentDirectory, "stale-probe-a"));
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectTab(page, "new-folder");
const location = page.getByTestId("add-project-flow-location");
const locationBefore = await location.textContent();
await location.click();
const search = page.getByPlaceholder("Search folders or enter a path").last();
const prefix = path.basename(parentDirectory);
await search.fill(`${prefix}/stale-probe`);
await expect(page.getByText(/stale-probe-a/).last()).toBeVisible({ timeout: 30_000 });
await search.fill(`${prefix}/no-such-folder`);
await page.keyboard.press("Enter");
await expect(page.getByText("No matching folders")).toBeVisible({ timeout: 30_000 });
await expect(search).toBeVisible();
await expect(location).toHaveText(locationBefore ?? "");
} finally {
await rm(parentDirectory, { recursive: true, force: true });
}
});
test("New folder validates the name, then creates a Project in the chosen location", async ({
page,
}) => {
const parentDirectory = await mkdtemp(path.join(tmpdir(), "paseo-e2e-new-project-"));
@@ -402,27 +428,23 @@ test.describe("Add Project command-center flow", () => {
try {
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "new-directory");
await chooseAddProjectTab(page, "new-folder");
await chooseAddProjectLocation(page, parentDirectory);
await page.keyboard.type(parentDirectory);
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "new-directory-name");
await page.keyboard.type("../invalid");
await page.keyboard.press("Enter");
await addProjectFlowInput(page).fill("../invalid");
const nameError = page.getByTestId("add-project-flow-name-field-error");
await expect(nameError).toHaveText("Use a name without slashes");
await expect(addProjectFlowSubmit(page)).toBeDisabled();
const error = page.getByTestId("add-project-flow-error");
await expect(error).toBeVisible();
await expect(error).toContainText(/name|separator|directory/i);
await expectAddProjectPage(page, "new-directory-name");
await addProjectFlowInput(page).fill("C:repo");
await expect(nameError).toHaveText("Use a name without a drive letter");
await expect(addProjectFlowSubmit(page)).toBeDisabled();
await addProjectFlowInput(page).fill(directoryName);
await addProjectFlowBack(page).click();
await expectAddProjectPage(page, "new-directory-parent");
await expect(addProjectFlowInput(page)).toHaveValue(parentDirectory);
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "new-directory-name");
await expect(addProjectFlowInput(page)).toHaveValue(directoryName);
await page.keyboard.press("Enter");
await expect(nameError).toBeHidden();
await expect(addProjectFlowSubmit(page)).toBeEnabled();
await expect(page.getByTestId("add-project-flow-location")).toContainText(directoryName);
await addProjectFlowSubmit(page).click();
projectId = await expectOpenedProject(page, directoryName);
await expectNewWorkspaceForAddedProject(page, {
@@ -461,10 +483,11 @@ test.describe("Compact Add project context", () => {
await gotoAppShell(page);
await page.getByRole("button", { name: "Open menu", exact: true }).click();
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
await addProjectFlowInput(page).fill(projectPickerFixture.fuzzyQuery);
await expect(addProjectFlow(page)).toContainText(projectPickerFixture.projectName);
await page.keyboard.press("Enter");
await expect(
page.getByRole("button", { name: new RegExp(projectPickerFixture.projectName) }).first(),
).toBeVisible({ timeout: 30_000 });
await addProjectFlowSubmit(page).click();
const projectId = await expectOpenedProject(page, projectPickerFixture.projectName);
projectPickerFixture.rememberProjectId(projectId);
await expectNewWorkspaceForAddedProject(page, {
@@ -4,10 +4,9 @@ import path from "node:path";
import { expect, test } from "../support/fixtures";
import {
addProjectFlow,
addProjectFlowBack,
addProjectFlowInput,
chooseAddProjectMethod,
expectAddProjectPage,
chooseAddProjectLocation,
chooseAddProjectTab,
expectNewWorkspaceForAddedProject,
openAddProjectFlow,
} from "../support/helpers/add-project-flow";
@@ -39,28 +38,22 @@ test.describe("Add Project GitHub flow", () => {
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "github");
await chooseAddProjectTab(page, "clone");
await addProjectFlowInput(page).fill("getpaseo/paseo");
await expect(addProjectFlow(page).getByText("getpaseo/paseo", { exact: true })).toBeVisible({
timeout: 30_000,
});
await addProjectFlowInput(page).fill("");
await addProjectFlowInput(page).fill(repository.fullName);
const repositoryRow = addProjectFlow(page).getByText(repository.fullName, { exact: true });
await expect(repositoryRow).toBeVisible({ timeout: 30_000 });
await repositoryRow.click();
await expectAddProjectPage(page, "github-location");
await addProjectFlowInput(page).fill(parentDirectory);
await expect(addProjectFlow(page)).toContainText(checkoutPath, { timeout: 30_000 });
await addProjectFlowBack(page).click();
await expectAddProjectPage(page, "github-search");
await expect(repositoryRow).toBeVisible();
await repositoryRow.click();
await expectAddProjectPage(page, "github-location");
await expect(addProjectFlowInput(page)).toHaveValue(parentDirectory);
await chooseAddProjectLocation(page, parentDirectory);
await expect(page.getByTestId("add-project-flow-location")).toContainText(
path.join(path.basename(parentDirectory), repository.name),
);
await addProjectFlowInput(page).focus();
await mkdir(checkoutPath);
await page.keyboard.press("Enter");
@@ -32,6 +32,7 @@ import {
waitForWorkspaceTabsVisible,
} from "../support/helpers/workspace-tabs";
import { getServerId } from "../support/helpers/server-id";
import { openSettingsSection } from "../support/helpers/settings";
import { buildHostWorkspaceRoute } from "@/utils/host-routes";
import { WORKSPACE_DECK_MAX_MOUNTED_WORKSPACES } from "@/screens/workspace/workspace-deck-retention";
import { delayBrowserAgentCreatedStatus } from "../support/helpers/new-workspace";
@@ -350,6 +351,7 @@ async function selectSendBehaviorInSettings(
behaviorLabel: string,
stored: string,
): Promise<void> {
await openSettingsSection(page, "chat");
await page.getByRole("button", { name: /^Default send: / }).click();
await page.getByRole("menuitem", { name: behaviorLabel, exact: true }).click();
await expect
@@ -2,8 +2,10 @@ import { expect, test } from "../support/fixtures";
import {
applyProfileFromPicker,
closeModelPicker,
expectAgentProfileNameDraft,
expectComposerDoesNotName,
expectAgentProfilesEmptyPrompt,
expectHostAgentProfiles,
expectProfileEditTooltip,
expectComposerMode,
expectCreateProfileFromModelRow,
@@ -11,13 +13,23 @@ import {
expectModelRowProfileActionBesideRow,
expectModelRowSelected,
expectProfileEditIsPencilOnly,
expectProfileReachableByScrolling,
expectProfileSearchResult,
expectProfileVisibleForProvider,
fillAgentProfileName,
openEditProfileFromModelRow,
openModelPicker,
openAgentProfilesFromEmptyPrompt,
removeOpenModalAgentProfileWithConfirm,
searchModelPicker,
seedAgentProfiles,
selectModelRow,
} from "../support/helpers/agent-profiles";
import { expectWorkspaceAgentConfiguration } from "../support/helpers/command-center-agent-controls";
import {
chooseCommandCenterAgentControl,
expectWorkspaceAgentConfiguration,
openCommandCenterForAgent,
} from "../support/helpers/command-center-agent-controls";
import { expectComposerVisible } from "../support/helpers/composer";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
@@ -139,10 +151,129 @@ test.describe("Agent profiles in the model picker", () => {
await openModelPicker(page);
await expectModelRowProfileActionBesideRow(page, oneMinute);
await expectCreateProfileFromModelRow(page, oneMinute);
await expectComposerModel(page, "Ten second stream");
await openModelPicker(page);
await selectModelRow(page, oneMinute);
await expectComposerModel(page, oneMinute.modelLabel);
await openModelPicker(page);
await selectModelRow(page, { provider: "mock", modelId: "ten-second-stream" });
await expectComposerModel(page, "Ten second stream");
} finally {
await workspace.cleanup();
await seed.restore();
}
});
test("a profile is found by searching the model picker or the command center", async ({
page,
}) => {
const seed = await seedAgentProfiles([PROFILE]);
const workspace = await seedMockAgentWorkspace({
repoPrefix: "agent-profiles-search-",
title: "Agent profiles search",
model: "ten-second-stream",
modeId: "load-test",
});
try {
await test.step("searching its name in the model picker lists only the profile", async () => {
await openAgentRoute(page, workspace);
await expectComposerVisible(page);
await openModelPicker(page);
await searchModelPicker(page, "ui work");
await expectProfileSearchResult(page, { name: PROFILE.name });
});
await test.step("searching its model lists the profile above the model", async () => {
await searchModelPicker(page, "one minute");
await expectProfileSearchResult(page, {
name: PROFILE.name,
model: { provider: "mock", modelId: "one-minute-stream" },
});
await closeModelPicker(page);
});
await test.step("choosing it from the command center applies it", async () => {
await openCommandCenterForAgent(page, workspace);
await chooseCommandCenterAgentControl({
page,
query: "ui work",
choice: `Profile › ${PROFILE.name}`,
});
await expectComposerModel(page, "One minute stream");
await expectComposerMode(page, "Approval test");
await expectWorkspaceAgentConfiguration(workspace, {
id: workspace.agentId,
provider: "mock",
model: "one-minute-stream",
modeId: "approval-test",
});
});
} finally {
await workspace.cleanup();
await seed.restore();
}
});
test("profile-only search results scroll inside the picker", async ({ page }) => {
const profiles = Array.from({ length: 12 }, (_, index) => ({
id: `agent_profile_e2e_release_${index + 1}`,
name: `Release review ${String(index + 1).padStart(2, "0")}`,
provider: "mock",
model: "one-minute-stream",
}));
const seed = await seedAgentProfiles(profiles);
const workspace = await seedMockAgentWorkspace({
repoPrefix: "agent-profiles-search-scroll-",
title: "Agent profiles search scroll",
model: "ten-second-stream",
modeId: "load-test",
});
try {
await openAgentRoute(page, workspace);
await expectComposerVisible(page);
await openModelPicker(page);
await searchModelPicker(page, "release review");
await expectProfileSearchResult(page, { name: "Release review 01" });
await expectProfileReachableByScrolling(page, "Release review 12");
} finally {
await workspace.cleanup();
await seed.restore();
}
});
test("canceling Remove in the composer profile editor keeps the editor and draft open", async ({
page,
}) => {
const seed = await seedAgentProfiles([PROFILE]);
const workspace = await seedMockAgentWorkspace({
repoPrefix: "agent-profiles-remove-cancel-",
title: "Agent profiles remove cancel",
model: "ten-second-stream",
modeId: "load-test",
});
try {
await openAgentRoute(page, workspace);
await expectComposerVisible(page);
await openModelPicker(page);
await openEditProfileFromModelRow(page, {
provider: "mock",
modelId: "one-minute-stream",
});
await fillAgentProfileName(page, "Draft name");
await test.step("canceling Remove keeps the modal and draft intact", async () => {
await removeOpenModalAgentProfileWithConfirm(page, "dismiss");
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible();
await expectAgentProfileNameDraft(page, "Draft name");
});
await test.step("confirming Remove deletes the profile and closes the modal", async () => {
await removeOpenModalAgentProfileWithConfirm(page, "accept");
await expect(page.getByTestId("agent-profile-edit-modal")).toHaveCount(0, {
timeout: 30_000,
});
await expectHostAgentProfiles([]);
});
} finally {
await workspace.cleanup();
await seed.restore();
@@ -1,19 +1,32 @@
import { test } from "../support/fixtures";
import { expect, test } from "../support/fixtures";
import {
browserBackWithConfirm,
browserHistoryJumpWithConfirm,
createAgentProfile,
createAgentProfileFromEmptyState,
duplicateOpenAgentProfileWithConfirm,
editAgentProfile,
expectAgentProfile,
expectAgentProfileForm,
expectAgentProfileNameDraft,
expectAgentProfileNotesDraft,
expectAgentProfileOrder,
expectAgentProfileTagsGone,
expectHostAgentProfiles,
expectNoAgentProfiles,
fillAgentProfileName,
fillAgentProfileNotes,
moveAgentProfileUp,
openAgentProfileEditor,
openAgentProfileSettings,
openCompactAgentProfileSettings,
openCreateAgentProfileEditor,
removeAgentProfile,
saveOpenAgentProfile,
seedAgentProfiles,
stageLegacyFavoritesForHostMigration,
switchSettingsSectionWithConfirm,
toggleAgentProfileCustomize,
} from "../support/helpers/agent-profiles";
const MOCK_PROVIDER_LABEL = "Mock Load Test";
@@ -54,6 +67,9 @@ test.describe("Agent profiles settings", () => {
try {
await test.step("the section starts empty", async () => {
await openAgentProfileSettings(page);
await expect(page.getByTestId("agent-profiles-description")).toHaveText(
"Save agent settings that you can pick quickly and that agents can use to delegate work",
);
await expectNoAgentProfiles(page);
});
@@ -64,11 +80,18 @@ test.describe("Agent profiles settings", () => {
model: "Ten second stream",
thinking: "High",
mode: "Approval test",
systemPrompt: "Focus on layout, accessibility, and design tokens.",
notes: "Use for UI work — components, layout and design tokens.",
});
await expectAgentProfile(page, {
name: "UI work",
tags: [MOCK_PROVIDER_LABEL, "Ten second stream", "Approval test", "High"],
tags: [
MOCK_PROVIDER_LABEL,
"Ten second stream",
"Approval test",
"High",
"System prompt",
],
notes: "Use for UI work — components, layout and design tokens.",
});
});
@@ -76,11 +99,12 @@ test.describe("Agent profiles settings", () => {
await test.step("editing to a model without thinking levels drops the level", async () => {
await editAgentProfile(page, "UI work", {
model: "One minute stream",
systemPrompt: "Keep replies concise.",
notes: "Now for quick checks.",
});
await expectAgentProfile(page, {
name: "UI work",
tags: [MOCK_PROVIDER_LABEL, "One minute stream", "Approval test"],
tags: [MOCK_PROVIDER_LABEL, "One minute stream", "Approval test", "System prompt"],
notes: "Now for quick checks.",
});
await expectAgentProfileTagsGone(page, {
@@ -94,6 +118,7 @@ test.describe("Agent profiles settings", () => {
provider: MOCK_PROVIDER_LABEL,
model: "One minute stream",
mode: "Approval test",
systemPrompt: "Keep replies concise.",
notes: "Now for quick checks.",
});
});
@@ -125,4 +150,254 @@ test.describe("Agent profiles settings", () => {
await seed.restore();
}
});
test("remounting the profile form keeps draft text across resize and collapsible toggles", async ({
page,
}) => {
const seed = await seedAgentProfiles([
{
id: "agent_profile_e2e_remount",
name: "Original profile",
provider: "mock",
model: "one-minute-stream",
notes: "Original note",
},
]);
try {
await page.setViewportSize({ width: 1680, height: 900 });
await openAgentProfileSettings(page);
await test.step("drawer-to-modal and compact resizes keep the edited name and save it", async () => {
await openAgentProfileEditor(page, "Original profile");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await fillAgentProfileName(page, "Draft rename");
await page.setViewportSize({ width: 1000, height: 900 });
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible({ timeout: 30_000 });
await expectAgentProfileNameDraft(page, "Draft rename");
await page.setViewportSize({ width: 390, height: 844 });
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible({ timeout: 30_000 });
await expectAgentProfileNameDraft(page, "Draft rename");
await saveOpenAgentProfile(page);
await expectAgentProfile(page, {
name: "Draft rename",
tags: [MOCK_PROVIDER_LABEL, "One minute stream"],
notes: "Original note",
});
});
await test.step("collapsing and reopening advanced settings keeps the draft note", async () => {
await page.setViewportSize({ width: 1000, height: 900 });
await openCreateAgentProfileEditor(page);
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible({ timeout: 30_000 });
await toggleAgentProfileCustomize(page);
await fillAgentProfileNotes(page, "Draft routing note");
await toggleAgentProfileCustomize(page);
await toggleAgentProfileCustomize(page);
await expectAgentProfileNotesDraft(page, "Draft routing note");
});
} finally {
await seed.restore();
}
});
test("duplicating while editing asks before discarding unsaved changes", async ({ page }) => {
const seed = await seedAgentProfiles([
{
id: "agent_profile_e2e_duplicate",
name: "UI work",
provider: "mock",
model: "one-minute-stream",
},
]);
try {
await page.setViewportSize({ width: 1680, height: 900 });
await openAgentProfileSettings(page);
await openAgentProfileEditor(page, "UI work");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await fillAgentProfileName(page, "Draft name");
await test.step("dismissing the prompt keeps the draft and does not create a copy", async () => {
await duplicateOpenAgentProfileWithConfirm(page, "dismiss");
await expectAgentProfileNameDraft(page, "Draft name");
await expectAgentProfileOrder(page, ["UI work"]);
});
await test.step("accepting the prompt creates and opens the copy", async () => {
await duplicateOpenAgentProfileWithConfirm(page, "accept");
await expectAgentProfileOrder(page, ["UI work", "UI work (copy)"]);
await expectAgentProfileNameDraft(page, "UI work (copy)");
});
} finally {
await seed.restore();
}
});
test("docked drawer allows roster search and section switches ask before discarding a draft", async ({
page,
}) => {
const seed = await seedAgentProfiles([
{
id: "agent_profile_e2e_docked_1",
name: "UI work",
provider: "mock",
model: "one-minute-stream",
},
{
id: "agent_profile_e2e_docked_2",
name: "Deep review",
provider: "mock",
model: "five-minute-stream",
},
]);
try {
await page.setViewportSize({ width: 1680, height: 900 });
await openAgentProfileSettings(page);
await openAgentProfileEditor(page, "UI work");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await test.step("typing in roster search works while the docked drawer is open", async () => {
const searchInput = page.getByTestId("agent-profiles-search-input");
await searchInput.click();
await page.keyboard.type("Deep");
await expect(searchInput).toHaveValue("Deep");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await expectAgentProfileOrder(page, ["Deep review"]);
await page.getByTestId("agent-profiles-search-clear").click();
});
await test.step("browser Back asks before discarding a draft and canceling keeps route and draft", async () => {
await fillAgentProfileName(page, "Unsaved browser back edit");
const profilesUrl = page.url();
await browserBackWithConfirm(page, "dismiss");
await expect(page).toHaveURL(profilesUrl, { timeout: 15_000 });
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await expectAgentProfileNameDraft(page, "Unsaved browser back edit");
});
await test.step("switching Settings sections asks before discarding an edited draft", async () => {
await fillAgentProfileName(page, "Unsaved sidebar edit");
await switchSettingsSectionWithConfirm(page, "Tools & prompts", "dismiss");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await expectAgentProfileNameDraft(page, "Unsaved sidebar edit");
await switchSettingsSectionWithConfirm(page, "Tools & prompts", "accept");
await expect(page.getByTestId("agent-profile-drawer")).toHaveCount(0, { timeout: 30_000 });
await expect(page.getByTestId("settings-detail-header-title")).toHaveText(
"Tools & prompts",
);
});
await test.step("confirming browser Back leaves Agent profiles and discards the draft", async () => {
await page.getByRole("button", { name: "Agent profiles", exact: true }).click();
await expect(page.getByTestId("agent-profiles-card")).toBeVisible({ timeout: 30_000 });
await openAgentProfileEditor(page, "UI work");
await fillAgentProfileName(page, "Discard on browser back");
const profilesUrl = page.url();
await browserBackWithConfirm(page, "accept");
await expect(page).not.toHaveURL(profilesUrl, { timeout: 15_000 });
await expect(page.getByTestId("agent-profile-drawer")).toHaveCount(0, { timeout: 30_000 });
});
} finally {
await seed.restore();
}
});
test("canceling a multi-step Back jump keeps intervening browser history and confirming reaches the destination", async ({
page,
}) => {
const seed = await seedAgentProfiles([
{
id: "agent_profile_e2e_multistep",
name: "UI work",
provider: "mock",
model: "one-minute-stream",
},
]);
try {
// Narrow viewport pushes Open project -> Settings -> Agent profiles onto history.
await page.setViewportSize({ width: 390, height: 844 });
await openCompactAgentProfileSettings(page);
const profilesUrl = page.url();
await openAgentProfileEditor(page, "UI work");
await fillAgentProfileName(page, "Unsaved multi-step edit");
await test.step("canceling a two-step Back jump keeps Agent profiles, draft, and Settings in history", async () => {
await browserHistoryJumpWithConfirm(page, -2, "dismiss");
await expect(page).toHaveURL(profilesUrl, { timeout: 15_000 });
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible();
await expectAgentProfileNameDraft(page, "Unsaved multi-step edit");
});
await test.step("canceling a two-step Back jump after reload still restores the Agent profiles URL", async () => {
await page.reload();
await expect(page.getByTestId("agent-profiles-card")).toBeVisible({ timeout: 30_000 });
await openAgentProfileEditor(page, "UI work");
await fillAgentProfileName(page, "Post-reload draft");
await browserHistoryJumpWithConfirm(page, -2, "dismiss");
await expect(page).toHaveURL(profilesUrl, { timeout: 15_000 });
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible();
await expectAgentProfileNameDraft(page, "Post-reload draft");
});
await test.step("confirming a two-step Back jump lands directly on the selected destination", async () => {
await browserHistoryJumpWithConfirm(page, -2, "accept");
await expect(page).toHaveURL(/\/open-project/, { timeout: 15_000 });
await expect(page.getByTestId("agent-profile-edit-modal")).toHaveCount(0, {
timeout: 30_000,
});
});
await test.step("forward navigation confirms the intervening Settings entry survived", async () => {
await page.goForward();
await expect(page).toHaveURL(/\/settings(?:\?|$)/, { timeout: 15_000 });
});
} finally {
await seed.restore();
}
});
test("canceling an untouched provider-and-model-only profile closes without a discard prompt", async ({
page,
}) => {
const seed = await seedAgentProfiles([
{
id: "legacy_favorite:mock:one-minute-stream",
name: "One minute stream",
provider: "mock",
model: "one-minute-stream",
},
]);
let dialogTriggered = false;
const onDialog = async (dialog: { dismiss: () => Promise<void> }) => {
dialogTriggered = true;
await dialog.dismiss();
};
page.on("dialog", onDialog);
try {
await page.setViewportSize({ width: 1680, height: 900 });
await openAgentProfileSettings(page);
await openAgentProfileEditor(page, "One minute stream");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await page.getByTestId("agent-profile-cancel-button").click();
await expect(page.getByTestId("agent-profile-drawer")).toHaveCount(0, { timeout: 30_000 });
expect(dialogTriggered).toBe(false);
} finally {
page.off("dialog", onDialog);
await seed.restore();
}
});
});
@@ -757,6 +757,161 @@ test("pasting an assistant selection preserves literal underscores and authored
}
});
const QUOTE_BODY = [
"Draft for the team: **ship it** with [the notes](https://example.com/notes).",
"",
"> Nested reply.",
"",
"```ts",
"const quoted = 1;",
"```",
"",
"```mermaid",
"flowchart LR",
" Start --> Done",
"```",
"",
"Thanks!",
].join("\n");
const QUOTE_MARKDOWN = [
"Text before the quote.",
"",
...QUOTE_BODY.split("\n").map((line) => (line ? `> ${line}` : ">")),
"",
"> [!NOTE]",
"> Heads up before you paste.",
"",
"Text after the quote.",
].join("\n");
function assistantQuote(page: Page, index: number): Locator {
return assistantMessageBlocks(page).getByRole("blockquote").nth(index);
}
/** A quote's own control is its first, ahead of any nested quote's. */
function quoteCopyControl(quote: Locator): Locator {
return quote.getByRole("button", { name: "Copy quote" }).first();
}
async function copyQuote(quote: Locator): Promise<void> {
await quote.hover();
await quoteCopyControl(quote).click();
await expect(quote.getByRole("button", { name: "Copied" })).toBeVisible();
}
async function pasteIntoPlainAndRichFields(page: Page): Promise<{ plain: Locator; rich: Locator }> {
await page.evaluate(() => {
const fields = document.createElement("div");
fields.style.cssText = "position: fixed; bottom: 0; left: 0; z-index: 10000; background: white";
const plainText = document.createElement("textarea");
plainText.setAttribute("aria-label", "Plain text paste");
const richText = document.createElement("div");
richText.contentEditable = "true";
richText.setAttribute("role", "textbox");
richText.setAttribute("aria-label", "Rich text paste");
fields.append(plainText, richText);
document.body.append(fields);
});
const plain = page.getByRole("textbox", { name: "Plain text paste" });
await plain.focus();
await page.keyboard.press("ControlOrMeta+v");
const rich = page.getByRole("textbox", { name: "Rich text paste" });
await rich.focus();
await page.keyboard.press("ControlOrMeta+v");
return { plain, rich };
}
test("a quote's copy control copies only that quote's body", async ({ context, page }) => {
const agent = await seedMockAgentWorkspace({
repoPrefix: "assistant-quote-copy-",
title: "Assistant quote copy",
initialPrompt: "Render the quote fixture.",
featureValues: { mockAssistantResponse: QUOTE_MARKDOWN },
});
try {
await allowRichClipboard(context);
await agent.client.waitForAgentUpsert(
agent.agentId,
(snapshot) => snapshot.status === "idle",
30_000,
);
await openAgentRoute(page, agent);
const quote = assistantQuote(page, 0);
const nested = assistantQuote(page, 1);
await expect(quote).toContainText("Thanks!");
await test.step("an admonition has no copy control", async () => {
await expect(assistantMessageBlocks(page)).toContainText("Heads up before you paste.");
await expect(
assistantMessageBlocks(page).getByRole("button", { name: "Copy quote" }),
).toHaveCount(2);
});
await test.step("the control appears on hover or keyboard focus", async () => {
const control = quoteCopyControl(quote);
await expect(control).toHaveCSS("opacity", "0");
await quote.hover();
await expect(control).toHaveCSS("opacity", "1");
await page.mouse.move(0, 0);
await expect(control).toHaveCSS("opacity", "0");
await control.focus();
await expect(control).toHaveCSS("opacity", "1");
await control.blur();
});
await test.step("copying the quote takes its body, with a diagram as its fence", async () => {
await expect(quote.getByRole("img", { name: "Diagram" })).toBeVisible({ timeout: 30_000 });
await copyQuote(quote);
const copied = await readRichClipboard(page);
expect(copied.plainText).toBe(QUOTE_BODY);
expect(copied.html).toContain("<strong>ship it</strong>");
expect(copied.html).toContain("<blockquote>");
});
await test.step("the copy pastes as Markdown and as rich text", async () => {
const { plain, rich } = await pasteIntoPlainAndRichFields(page);
await expect(plain).toHaveValue(QUOTE_BODY);
await expect(rich.locator("strong")).toHaveText("ship it");
await expect(rich.getByRole("link", { name: "the notes" })).toHaveAttribute(
"href",
"https://example.com/notes",
);
await expect(rich).not.toContainText("Text before the quote.");
});
await test.step("a nested quote copies only itself", async () => {
await copyQuote(nested);
await expect
.poll(async () => (await readRichClipboard(page)).plainText)
.toBe("Nested reply.");
});
await test.step("a code block in the quote keeps its own copy", async () => {
const code = quote.getByText("const quoted = 1;", { exact: true });
await code.hover();
await quote.getByRole("button", { name: "Copy code" }).first().click();
await expect.poll(() => readPlainClipboard(page)).toBe("const quoted = 1;");
});
await test.step("a phone-sized layout shows the control above the full-width text", async () => {
await page.mouse.move(0, 0);
await page.setViewportSize({ width: 390, height: 844 });
const control = quoteCopyControl(quote);
await expect(control).toHaveCSS("opacity", "1");
const controlBox = await control.boundingBox();
const firstLine = await quote.getByText(/^Draft for the team/).boundingBox();
expect(controlBox && firstLine).toBeTruthy();
// The text starts below the control instead of wrapping short of it.
expect(firstLine!.y).toBeGreaterThanOrEqual(controlBox!.y + controlBox!.height);
expect(firstLine!.x + firstLine!.width).toBeGreaterThan(controlBox!.x);
});
} finally {
await agent.cleanup();
}
});
test("copying a selection across an assistant image keeps its Markdown source and alt text", async ({
context,
page,
@@ -47,7 +47,7 @@ async function openHostOverview(page: Page, daemon: IsolatedHostDaemon): Promise
endpoint: `127.0.0.1:${daemon.port}`,
},
]);
await page.goto(`/settings/hosts/${daemon.serverId}/host`);
await page.goto(`/settings/hosts/${daemon.serverId}/daemon`);
await expect(page.getByText("Online", { exact: true })).toBeVisible();
}
@@ -1,4 +1,5 @@
import { execFileSync } from "node:child_process";
import { mkdtempSync, rmSync } from "node:fs";
import { mkdir, readFile, unlink, writeFile } from "node:fs/promises";
import path from "node:path";
import { type Locator, type Page } from "@playwright/test";
@@ -498,6 +499,56 @@ test("Changes offers Push for a branch that was never pushed and the push sets i
});
});
test("Changes pushes and pulls a branch whose only remote is not named origin", async ({
page,
}) => {
const workspace = await createWorkspaceWithRemote((repoPath) => {
execFileSync("git", ["remote", "rename", "origin", "doras-mono"], { cwd: repoPath });
// git pull stops on a branch that is both ahead and behind until it is told how to combine them.
execFileSync("git", ["config", "pull.rebase", "false"], { cwd: repoPath });
});
await openWorkspaceChangesSurface(page, workspace);
const primary = page.getByTestId("changes-primary-cta");
await test.step("a branch that is ahead offers Push and the push updates the remote", async () => {
await expect(primary).toHaveAccessibleName("Commit", { timeout: 30_000 });
commitAllWithGit(workspace.repoPath, "Local work");
expect(trackingStatus(workspace)).toBe("## main...doras-mono/main [ahead 1]");
await expect(primary).toHaveAccessibleName("Push", { timeout: 30_000 });
await primary.click();
await expectInSyncWithRemote(workspace);
expect(remoteBranchSubjects(workspace, "main")).toContain("Local work");
await expectNoGitActionLeft(page);
});
await test.step("a branch that is behind offers Pull and the pull brings the commits in", async () => {
pushTeammateCommits(workspace, ["Teammate one", "Teammate two"]);
fetchRemote(workspace, "doras-mono");
expect(trackingStatus(workspace)).toBe("## main...doras-mono/main [behind 2]");
await expect(primary).toHaveAccessibleName("Pull", { timeout: 30_000 });
await primary.click();
await expectInSyncWithRemote(workspace);
expect(localBranchSubjects(workspace)).toEqual(
expect.arrayContaining(["Local work", "Teammate one", "Teammate two"]),
);
await expectNoGitActionLeft(page);
});
await test.step("a branch that is ahead and behind pulls and then pushes", async () => {
await writeFile(path.join(workspace.repoPath, "tracked.ts"), "export const tracked = 3;\n");
commitAllWithGit(workspace.repoPath, "More local work");
pushTeammateCommits(workspace, ["Teammate three", "Teammate four"]);
fetchRemote(workspace, "doras-mono");
expect(trackingStatus(workspace)).toBe("## main...doras-mono/main [ahead 1, behind 2]");
await expect(primary).toHaveAccessibleName("Pull", { timeout: 30_000 });
await page.getByTestId("changes-primary-cta-caret").click();
await page.getByTestId("changes-menu-pull-and-push").click();
await expectInSyncWithRemote(workspace);
expect(remoteBranchSubjects(workspace, "main")).toEqual(
expect.arrayContaining(["More local work", "Teammate three", "Teammate four"]),
);
await expectNoGitActionLeft(page);
});
});
test("Changes selects exact local and remote bases and retains the selection after reload", async ({
page,
}, testInfo) => {
@@ -2202,6 +2253,79 @@ function remoteBranchHead(workspace: RemoteWorkspace, branch: string): string |
return line ? (line.split("\t")[0] ?? null) : null;
}
// The branch line of `git status -sb`, such as "## main...origin/main [ahead 1, behind 2]".
function trackingStatus(workspace: RemoteWorkspace): string {
const status = execFileSync("git", ["status", "-sb"], {
cwd: workspace.repoPath,
encoding: "utf8",
});
return status.split("\n")[0] ?? "";
}
// Neither ahead nor behind, which a push reaches only after the remote accepted it.
async function expectInSyncWithRemote(workspace: RemoteWorkspace): Promise<void> {
await expect
.poll(() => trackingStatus(workspace), { timeout: 30_000 })
.toMatch(/^## [^ ]+\.\.\.[^ ]+$/);
}
// A clean main that is in sync with its remote has no git action, so the button is gone.
async function expectNoGitActionLeft(page: Page): Promise<void> {
await expect(page.getByTestId("changes-primary-cta")).toBeHidden({ timeout: 30_000 });
}
function localBranchSubjects(workspace: RemoteWorkspace): string[] {
return commitSubjects(workspace.repoPath, "HEAD");
}
function remoteBranchSubjects(workspace: RemoteWorkspace, branch: string): string[] {
return commitSubjects(workspace.remotePath, branch);
}
function commitSubjects(repoPath: string, revision: string): string[] {
const log = execFileSync("git", ["log", "--format=%s", revision], {
cwd: repoPath,
encoding: "utf8",
});
return log.trim().split("\n");
}
// Paseo fetches only origin in the background, so the checkout learns about another remote's
// commits when the user fetches it.
function fetchRemote(workspace: RemoteWorkspace, remoteName: string): void {
execFileSync("git", ["fetch", "--quiet", remoteName], { cwd: workspace.repoPath });
}
// Lands commits on the remote's main from a second clone, as a teammate's push does.
function pushTeammateCommits(workspace: RemoteWorkspace, subjects: string[]): void {
const clonePath = mkdtempSync(path.join(path.dirname(workspace.repoPath), "changes-teammate-"));
try {
execFileSync("git", ["clone", "--quiet", workspace.remotePath, clonePath]);
for (const subject of subjects) {
execFileSync(
"git",
[
"-c",
"user.name=Teammate",
"-c",
"user.email=teammate@paseo.test",
"-c",
"commit.gpgsign=false",
"commit",
"--quiet",
"--allow-empty",
"-m",
subject,
],
{ cwd: clonePath },
);
}
execFileSync("git", ["push", "--quiet", "origin", "HEAD:main"], { cwd: clonePath });
} finally {
rmSync(clonePath, { recursive: true, force: true });
}
}
// Empty until the branch has an upstream.
function branchUpstream(workspace: RemoteWorkspace, branch: string): string {
return execFileSync(
@@ -12,9 +12,12 @@ import {
openImageLightbox,
closeImageLightbox,
pressInterruptShortcut,
blurComposerInput,
expectComposerDraft,
expectComposerDisabled,
expectComposerEditable,
expectComposerFocused,
expectComposerNotFocused,
expectAttachButtonDisabled,
fillComposerDraft,
dropFileOnComposer,
@@ -175,8 +178,19 @@ test.describe("Composer attachments", () => {
await test.step("remove the image and attach a dropped file", async () => {
await removeAttachmentPill(page, "composer-image-attachment-pill", "Remove image attachment");
await expect(page.getByTestId("composer-image-attachment-pill")).toHaveCount(0);
await blurComposerInput(page);
await expectComposerNotFocused(page);
await dropFileOnComposer(page, TEST_JSON);
await expectAttachmentPill(page, "composer-file-attachment-pill");
await expectComposerFocused(page);
});
await test.step("dropping an image focuses the composer", async () => {
await blurComposerInput(page);
await expectComposerNotFocused(page);
await dropFileOnComposer(page, TEST_IMAGE);
await expectAttachmentPill(page, "composer-image-attachment-pill");
await expectComposerFocused(page);
});
});
@@ -198,9 +212,12 @@ test.describe("Composer attachments", () => {
projectDisplayName: workspace.projectDisplayName,
});
await blurComposerInput(page);
await expectComposerNotFocused(page);
await dropFileOnComposer(page, TEST_JSON);
await expectAttachmentPill(page, "composer-file-attachment-pill");
await expectComposerFocused(page);
} finally {
await workspace.cleanup();
}
@@ -0,0 +1,235 @@
import { mkdir, writeFile } from "node:fs/promises";
import path from "node:path";
import { expect, test, type Page } from "../support/fixtures";
import {
openFileExplorer,
openFileFromExplorer,
expectFileTabOpen,
} from "../support/helpers/file-explorer";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
const APP_SETTINGS_KEY = "@paseo:app-settings";
const DIFF_FIXTURE = [
"Here is a diff block:",
"",
"```diff",
"diff --git a/src/greet.ts b/src/greet.ts",
"--- a/src/greet.ts",
"+++ b/src/greet.ts",
"@@ -1,3 +1,4 @@ export function greet(name: string) {",
" const prefix = 'Hello';",
"- return `${prefix}, ${name}`;",
"+ const trimmed = name.trim();",
"+ return `${prefix}, ${trimmed}!`;",
"```",
"",
"And a patch block:",
"",
"```patch",
"--- a/README.md",
"+++ b/README.md",
"@@ -1,2 +1,2 @@",
" # Paseo",
"-Old description",
"+New description",
"```",
"",
"Plus Ruby, Kotlin, TOML, and SQL:",
"",
"```ruby",
"class Greeter",
' def hi(name) = "Hello #{name}"',
"end",
"```",
"",
"```kotlin",
'val message: String = "Kotlin ready"',
"```",
"",
"```toml",
"[server]",
'host = "localhost"',
"```",
"",
"```sql",
"SELECT id, name FROM users WHERE active = TRUE;",
"```",
].join("\n");
const FILE_DIFF_CONTENT = [
"diff --git a/app.py b/app.py",
"index 1111111..2222222 100644",
"--- a/app.py",
"+++ b/app.py",
"@@ -1,3 +1,3 @@ def greet():",
" print('hello')",
"-old_value = 1",
"+new_value = 2",
].join("\n");
async function saveScreenshot(page: Page, name: string): Promise<void> {
const dir = process.env.PASEO_QA_SCREENSHOT_DIR;
if (!dir) return;
await mkdir(dir, { recursive: true });
await page.screenshot({ path: path.join(dir, name), fullPage: true });
}
function assistantMessages(page: Page) {
return page.locator("[data-message-id]").filter({ has: page.getByTestId("assistant-message") });
}
test.describe("diff and patch syntax highlighting", () => {
for (const theme of ["dark", "light"] as const) {
test(`highlights diff and patch fences in chat (${theme} theme)`, async ({ page }) => {
await page.addInitScript(
({ key, mode }) => {
localStorage.setItem(key, JSON.stringify({ theme: mode }));
},
{ key: APP_SETTINGS_KEY, mode: theme },
);
const agent = await seedMockAgentWorkspace({
repoPrefix: `diff-chat-${theme}-`,
title: `Diff highlight (${theme})`,
initialPrompt: "Show me the diff and patch.",
featureValues: { mockAssistantResponse: DIFF_FIXTURE },
});
try {
await agent.client.waitForAgentUpsert(
agent.agentId,
(snapshot) => snapshot.status === "idle",
30_000,
);
await openAgentRoute(page, agent);
const message = assistantMessages(page);
const expectedColors =
theme === "dark"
? {
addition: "rgb(152, 195, 121)",
deletion: "rgb(224, 108, 117)",
meta: "rgb(92, 99, 112)",
}
: {
addition: "rgb(52, 130, 51)",
deletion: "rgb(214, 59, 47)",
meta: "rgb(160, 161, 167)",
};
const diffAdd = message.getByText("+ const trimmed = name.trim();", { exact: true });
const diffDel = message.getByText("- return `${prefix}, ${name}`;", { exact: true });
const diffMeta = message.getByText(
"@@ -1,3 +1,4 @@ export function greet(name: string) {",
{
exact: true,
},
);
const patchAdd = message.getByText("+New description", { exact: true });
const patchDel = message.getByText("-Old description", { exact: true });
await expect(diffAdd).toBeVisible({ timeout: 30_000 });
await expect(diffAdd).toHaveCSS("color", expectedColors.addition);
await expect(diffDel).toHaveCSS("color", expectedColors.deletion);
await expect(diffMeta).toHaveCSS("color", expectedColors.meta);
await expect(patchAdd).toHaveCSS("color", expectedColors.addition);
await expect(patchDel).toHaveCSS("color", expectedColors.deletion);
const rubyDef = message.getByText("def", { exact: true });
const kotlinVal = message.getByText("val", { exact: true });
const tomlHost = message.getByText("host", { exact: true });
const sqlSelect = message.getByText("SELECT", { exact: true });
const expectedKeyword = theme === "dark" ? "rgb(198, 120, 221)" : "rgb(166, 38, 164)";
const expectedProperty = theme === "dark" ? "rgb(209, 154, 102)" : "rgb(152, 104, 1)";
await expect(rubyDef).toHaveCSS("color", expectedKeyword);
await expect(kotlinVal).toHaveCSS("color", expectedKeyword);
await expect(tomlHost).toHaveCSS("color", expectedProperty);
await expect(sqlSelect).toHaveCSS("color", expectedKeyword);
await saveScreenshot(page, `chat-diff-patch-${theme}.png`);
} finally {
await agent.cleanup();
}
});
}
test("highlights a .diff file in the Files viewer", async ({ page, withWorkspace }) => {
await page.addInitScript(
({ key }) => {
localStorage.setItem(key, JSON.stringify({ theme: "dark" }));
},
{ key: APP_SETTINGS_KEY },
);
const workspace = await withWorkspace({ prefix: "diff-file-viewer-" });
await writeFile(path.join(workspace.repoPath, "changes.diff"), FILE_DIFF_CONTENT);
await workspace.navigateTo();
await openFileExplorer(page);
await openFileFromExplorer(page, "changes.diff");
await expectFileTabOpen(page, "changes.diff");
const editor = page.getByTestId("file-source-editor").filter({ visible: true });
await expect(editor).toBeVisible({ timeout: 30_000 });
const addLine = editor
.locator(".cm-line", { hasText: "+new_value = 2" })
.locator("span")
.first();
const delLine = editor
.locator(".cm-line", { hasText: "-old_value = 1" })
.locator("span")
.first();
const metaLine = editor
.locator(".cm-line", { hasText: "@@ -1,3 +1,3 @@ def greet():" })
.locator("span")
.first();
await expect(addLine).toHaveCSS("color", "rgb(152, 195, 121)");
await expect(delLine).toHaveCSS("color", "rgb(224, 108, 117)");
await expect(metaLine).toHaveCSS("color", "rgb(92, 99, 112)");
await saveScreenshot(page, "files-viewer-diff-dark.png");
});
test("highlights a .patch file in the Files viewer (light theme)", async ({
page,
withWorkspace,
}) => {
await page.addInitScript(
({ key }) => {
localStorage.setItem(key, JSON.stringify({ theme: "light" }));
},
{ key: APP_SETTINGS_KEY },
);
const workspace = await withWorkspace({ prefix: "patch-file-viewer-" });
await writeFile(path.join(workspace.repoPath, "fix.patch"), FILE_DIFF_CONTENT);
await workspace.navigateTo();
await openFileExplorer(page);
await openFileFromExplorer(page, "fix.patch");
await expectFileTabOpen(page, "fix.patch");
const editor = page.getByTestId("file-source-editor").filter({ visible: true });
await expect(editor).toBeVisible({ timeout: 30_000 });
const addLine = editor
.locator(".cm-line", { hasText: "+new_value = 2" })
.locator("span")
.first();
const delLine = editor
.locator(".cm-line", { hasText: "-old_value = 1" })
.locator("span")
.first();
const metaLine = editor
.locator(".cm-line", { hasText: "@@ -1,3 +1,3 @@ def greet():" })
.locator("span")
.first();
await expect(addLine).toHaveCSS("color", "rgb(52, 130, 51)");
await expect(delLine).toHaveCSS("color", "rgb(214, 59, 47)");
await expect(metaLine).toHaveCSS("color", "rgb(160, 161, 167)");
await saveScreenshot(page, "files-viewer-patch-light.png");
});
});
@@ -4,7 +4,7 @@ import { test, expect, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import {
addProjectFlowInput,
chooseAddProjectMethod,
addProjectFlowSubmit,
openAddProjectFlow,
} from "../support/helpers/add-project-flow";
import { expectOpenedProject } from "../support/helpers/project-picker-ui";
@@ -53,7 +53,6 @@ async function removeProjectFromSidebar(page: Page, projectViewKey: string): Pro
async function addProjectFromPicker(page: Page, projectPath: string): Promise<string> {
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
const input = addProjectFlowInput(page);
await input.fill(projectPath);
@@ -85,7 +84,6 @@ test.describe("Project picker search", () => {
await gotoAppShell(page);
await waitForSidebarProjectListReady(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
const input = addProjectFlowInput(page);
await input.fill(projectPickerFixture.fuzzyQuery);
@@ -93,6 +91,7 @@ test.describe("Project picker search", () => {
const suggestion = page.getByText(projectPickerFixture.projectName, { exact: false }).first();
await expect(suggestion).toBeVisible({ timeout: 30_000 });
await suggestion.click();
await addProjectFlowSubmit(page).click();
const projectId = await expectOpenedProject(page, projectPickerFixture.projectName);
projectPickerFixture.rememberProjectId(projectId);
@@ -104,13 +103,11 @@ test.describe("Project picker search", () => {
await gotoAppShell(page);
await waitForSidebarProjectListReady(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
const input = addProjectFlowInput(page);
await input.fill("paseo-loading-state-no-match");
await expect(page.getByText("Start typing a path", { exact: true })).toHaveCount(0);
await expect(page.getByText("Loading...", { exact: true })).toBeVisible();
await expect(page.getByText("Searching...", { exact: true })).toBeVisible();
});
});
@@ -4,12 +4,15 @@
// never swallow entity tabs or lose the user's focus, and
// 2) splitting a tab out of a pane leaves a New tab behind, and the app must stay
// interactive in the [agent | New | explorer] state.
import { writeFileSync } from "node:fs";
import path from "node:path";
import { expect, type Locator, type Page } from "@playwright/test";
import { test } from "../support/fixtures";
import { gotoWorkspace } from "../support/helpers/launcher";
import { seedCorruptedWorkspaceLayout } from "../support/helpers/workspace-layout";
import {
openChangesTreePanel,
openFilesPanel,
waitForWorkspaceTabsVisible,
} from "../support/helpers/workspace-tabs";
@@ -317,3 +320,75 @@ test("reloading a saved hidden generated Explorer recovers a usable workspace",
await gotoWorkspace(page, otherWorkspace.workspaceId);
await expect(draftTabChip(page)).toHaveCount(1);
});
test("dragging a file tab into a split returns the previous pane to the tab you came from", async ({
page,
withWorkspace,
e2eWorkerClient,
}) => {
const workspace = await withWorkspace({ prefix: "split-prev-tab-focus-" });
writeFileSync(path.join(workspace.repoPath, "notes.md"), "# Notes\nhello\n");
const agentA = await e2eWorkerClient.createAgent({
provider: "mock",
cwd: workspace.repoPath,
workspaceId: workspace.workspaceId,
title: "Agent A",
});
const agentB = await e2eWorkerClient.createAgent({
provider: "mock",
cwd: workspace.repoPath,
workspaceId: workspace.workspaceId,
title: "Agent B",
});
await gotoWorkspace(page, workspace.workspaceId);
await waitForWorkspaceTabsVisible(page);
const mainPane = page.getByTestId("workspace-pane-main");
await expect(mainPane.getByTestId(`workspace-tab-agent_${agentA.id}`)).toBeVisible({
timeout: 30_000,
});
await expect(mainPane.getByTestId(`workspace-tab-agent_${agentB.id}`)).toBeVisible({
timeout: 30_000,
});
const initialTabs = await mainPane
.locator('[data-testid^="workspace-tab-"]:not([data-testid^="workspace-tab-context-"])')
.evaluateAll((els) => els.map((el) => el.getAttribute("data-testid")));
const firstTab = mainPane.getByTestId(initialTabs[0]!);
const secondTab = mainPane.getByTestId(initialTabs[1]!);
// Open FILE while on B so B is the birth parent, then navigate A -> FILE before splitting.
await secondTab.click({ position: { x: 12, y: 13 } });
await expect(secondTab).toHaveAttribute("aria-selected", "true");
await openFilesPanel(page);
await page
.getByTestId("file-explorer-tree-scroll")
.getByText("notes.md", { exact: true })
.click();
const fileTab = mainPane
.locator('[data-testid^="workspace-tab-file_"]:not([data-testid^="workspace-tab-context-"])')
.first();
await expect(fileTab).toBeVisible({ timeout: 15_000 });
await firstTab.click({ position: { x: 12, y: 13 } });
await expect(firstTab).toHaveAttribute("aria-selected", "true");
await fileTab.click({ position: { x: 12, y: 13 } });
await expect(fileTab).toHaveAttribute("aria-selected", "true");
const mainBox = await mainPane.boundingBox();
if (!mainBox) throw new Error("mainPane has no bounding box");
await dragChipTo(page, fileTab, {
x: mainBox.x + mainBox.width * 0.92,
y: mainBox.y + mainBox.height * 0.5,
});
await expect(
page.locator('[data-testid^="workspace-pane-"]').filter({ visible: true }),
).toHaveCount(2, { timeout: 10_000 });
await expect(firstTab).toHaveAttribute("aria-selected", "true");
await expect(secondTab).toHaveAttribute("aria-selected", "false");
});
@@ -1,17 +1,10 @@
import type { Page } from "@playwright/test";
import { test, expect } from "../support/fixtures";
import { runWorkspaceActionFromCommandCenter } from "../support/helpers/command-center-workspace-actions";
interface DragMeasurement {
observer: MutationObserver;
stylesheetMutations: number;
}
declare global {
interface Window {
__PASEO_EXPLORER_DRAG_MEASUREMENT__?: DragMeasurement;
}
}
import {
readSharedStylesheetChanges,
rememberSharedStylesheet,
} from "../support/helpers/shared-stylesheet";
async function waitForResizePaint(page: Page): Promise<void> {
await page.evaluate(
@@ -23,23 +16,8 @@ async function waitForResizePaint(page: Page): Promise<void> {
}
async function beginResizeMeasurement(page: Page): Promise<void> {
await page.evaluate(() => {
const stylesheet = document.getElementById("unistyles-web");
if (!stylesheet) throw new Error("Shared stylesheet is missing");
globalThis.__PASEO_RESET_RENDER_PROFILE__!();
const measurement: DragMeasurement = {
stylesheetMutations: 0,
observer: new MutationObserver((records) => {
measurement.stylesheetMutations += records.length;
}),
};
measurement.observer.observe(stylesheet, {
childList: true,
subtree: true,
characterData: true,
});
window.__PASEO_EXPLORER_DRAG_MEASUREMENT__ = measurement;
});
await page.evaluate(() => globalThis.__PASEO_RESET_RENDER_PROFILE__!());
await rememberSharedStylesheet(page);
}
async function previewExplorerResize(page: Page, distance: number) {
@@ -61,16 +39,14 @@ async function previewExplorerResize(page: Page, distance: number) {
await waitForResizePaint(page);
}
const during = (await explorer.boundingBox())!.width;
const measurement = await page.evaluate(() => {
const state = window.__PASEO_EXPLORER_DRAG_MEASUREMENT__!;
state.observer.disconnect();
return {
stylesheetMutations: state.stylesheetMutations,
paneRenders: Object.entries(globalThis.__PASEO_RENDER_PROFILE_REASONS__ ?? {})
const measurement = {
stylesheetChanges: await readSharedStylesheetChanges(page),
paneRenders: await page.evaluate(() =>
Object.entries(globalThis.__PASEO_RENDER_PROFILE_REASONS__ ?? {})
.filter(([id]) => id.startsWith("SplitPaneView:"))
.reduce((sum, [, reasons]) => sum + (reasons.render ?? 0), 0),
};
});
),
};
await page.mouse.up();
await waitForResizePaint(page);
const after = (await explorer.boundingBox())!.width;
@@ -92,7 +68,7 @@ async function expectExplorerWidthSurvivesReload(page: Page, width: number): Pro
await expect.poll(async () => (await explorer.boundingBox())?.width).toBeCloseTo(width, 0);
}
test("Explorer drag previews without rerendering panes or rewriting the shared stylesheet", async ({
test("Explorer drag previews without rerendering panes or changing the shared stylesheet", async ({
page,
withWorkspace,
}) => {
@@ -117,9 +93,9 @@ test("Explorer drag previews without rerendering panes or rewriting the shared s
).toBe(true);
const grown = await previewExplorerResize(page, -100);
const shrunk = await previewExplorerResize(page, 50);
expect(grown.stylesheetMutations).toBe(0);
expect(grown.stylesheetChanges).toEqual({ added: 0, removed: 0, edited: 0, rebuilt: 0 });
expect(grown.paneRenders).toBe(0);
expect(shrunk.stylesheetMutations).toBe(0);
expect(shrunk.stylesheetChanges).toEqual({ added: 0, removed: 0, edited: 0, rebuilt: 0 });
expect(shrunk.paneRenders).toBe(0);
await expectExplorerWidthSurvivesReload(page, shrunk.width);
});
@@ -4,6 +4,7 @@ import {
addConnectedHostAndReload,
chooseHostBadgeDisplay,
chooseHostColor,
chooseHostIcon,
expectHostAppearancePreview,
expectHostBadgeIconOnly,
expectHostBadgeName,
@@ -115,12 +116,21 @@ test("customizes a host badge and preserves its appearance after reload", async
expect(widths.content).toBeLessThanOrEqual(widths.client);
});
await test.step("preview a color and apply it to the sidebar badge", async () => {
await test.step("preview a color and icon and apply them to the sidebar badge and host popover", async () => {
await openHostAppearanceSettings(page, badge.serverId);
await chooseHostColor(page, "Teal");
await chooseHostIcon(page, "Laptop");
await expectHostAppearancePreview(page, { serverId: badge.serverId, hostName, color: "teal" });
await leaveHostAppearanceSettings(page);
await expectHostBadgeTinted(page, { ...badge, hostName, color: "teal" });
await page.getByTestId("sidebar-hosts-trigger").click();
const hostRow = page.getByTestId(`sidebar-host-row-${badge.serverId}`);
await expect(hostRow).toBeVisible();
await expect(hostRow).toContainText("Direct");
await expect(hostRow).toContainText(/\d+(?:\.\d+)?(?:µs|ms|s)/);
await expect(hostRow).not.toContainText(/agents?/i);
await page.keyboard.press("Escape");
});
await test.step("keep the icon-only preference through reload", async () => {
@@ -145,3 +155,30 @@ 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",
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.
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();
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.
await trigger.click();
await expect(addHostButton).toBeVisible();
await page.keyboard.press("ArrowDown");
await page.keyboard.press("Enter");
await expect(addConnectionDialog).toBeVisible();
},
);
@@ -84,7 +84,7 @@ async function expectHelpHostVersion(page: Page, serverId: string, version: stri
async function openHostPage(page: Page, host: RestartableHostDaemon): Promise<void> {
await openSettings(page);
await selectSettingsHost(page, host.serverId);
await openHostSection(page, host.serverId, "host");
await openHostSection(page, host.serverId, "daemon");
}
function hostIdentity(page: Page) {
@@ -4,10 +4,15 @@ import { copyFile, mkdir, rm, utimes, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import type { TestInfo } from "@playwright/test";
import type { FetchRecentProviderSessionsRequestMessage } from "@getpaseo/protocol/messages";
import { expect, test, type Page } from "../support/fixtures";
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
import { addConnectedHostAndReload } from "../support/helpers/hosts";
import { ImportSessionFlow } from "../support/helpers/import-session";
import { startIsolatedHostDaemon } from "../support/helpers/isolated-host-daemon";
import {
connectNewWorkspaceDaemonClient,
loadSessionMessageReaders,
openProjectViaDaemon,
type OpenedProject,
} from "../support/helpers/new-workspace";
@@ -20,16 +25,22 @@ const SCREENSHOT_DIRECTORY = path.join(
const claudeConfigDirectory = mkdtempSync(path.join(tmpdir(), "paseo-import-flow-claude-"));
const brokenProvider = "broken-acp";
const disabledProviders = {
codex: { enabled: false },
copilot: { enabled: false },
omp: { enabled: false },
opencode: { enabled: false },
pi: { enabled: false },
antigravity: { enabled: false },
muse: { enabled: false },
};
test.use({
e2eDaemonConfig: {
version: 1,
agents: {
providers: {
codex: { enabled: false },
copilot: { enabled: false },
omp: { enabled: false },
opencode: { enabled: false },
pi: { enabled: false },
...disabledProviders,
[brokenProvider]: {
extends: "acp",
label: "Broken ACP",
@@ -136,6 +147,120 @@ test("an open Import Session row keeps its age current", async ({ page }) => {
await expect(row).toContainText("4m ago");
});
test("shows listing failure details beside healthy sessions and retries the failed provider", async ({
page,
}, testInfo) => {
const frames = await loadSessionMessageReaders();
const requests: FetchRecentProviderSessionsRequestMessage[] = [];
const completed = new Set<string>();
page.on("websocket", (socket) => {
socket.on("framesent", ({ payload }) => {
const request = frames.client(payload);
if (request?.type === "fetch_recent_provider_sessions_request") {
requests.push(request);
}
});
socket.on("framereceived", ({ payload }) => {
const response = frames.server(payload);
if (response?.type === "fetch_recent_provider_sessions_response") {
completed.add(response.payload.requestId);
}
});
});
const flow = new ImportSessionFlow(page);
for (const width of [1280, 390]) {
await flow.openWorkspace(scenario.project.workspaceId, { width, height: 844 });
await flow.openGlobally();
await flow.expectProviderError("Broken ACP");
const healthySession = page.getByTestId(
`import-session-session-claude-${scenario.importSessionId}`,
);
await expect(healthySession).toBeVisible();
await page.screenshot({ path: testInfo.outputPath(`listing-failure-${width}.png`) });
await expect(page.getByTestId("import-session-provider-errors")).toContainText(
"missing-agent-command",
);
const requestOffset = requests.length;
await flow.retryProvider(brokenProvider, "Broken ACP");
await expect
.poll(() => requests.slice(requestOffset).map((request) => request.providers))
.toEqual([[brokenProvider]]);
const retriedRequest = requests[requestOffset];
if (!retriedRequest) throw new Error("Retry did not send a provider listing request");
await expect.poll(() => completed.has(retriedRequest.requestId)).toBe(true);
await expect(page.getByTestId(`import-session-retry-${brokenProvider}`)).toBeEnabled();
await expect(page.getByTestId("import-session-provider-errors")).toContainText(
"missing-agent-command",
);
await expect(healthySession).toBeVisible();
await page.screenshot({ path: testInfo.outputPath(`listing-failure-retry-${width}.png`) });
await flow.close();
}
});
test("Import Session keeps listings tied to their host during a switch and a pending import", async ({
page,
}) => {
const secondaryHost = await startIsolatedHostDaemon("import-session-secondary", {
config: {
agents: {
providers: {
...disabledProviders,
claude: { enabled: false },
[brokenProvider]: {
extends: "acp",
label: "Broken ACP",
command: ["missing-secondary-command", "acp"],
},
},
},
},
});
try {
const gate = await installDaemonWebSocketGate(page);
const flow = new ImportSessionFlow(page);
await flow.openWorkspace(scenario.project.workspaceId, { width: 1280, height: 844 });
await addConnectedHostAndReload(page, {
serverId: secondaryHost.serverId,
port: secondaryHost.port,
label: "Second import host",
primaryLabel: "First import host",
});
await flow.chooseHostForImport("First import host");
await expect(page.getByText(/missing-agent-command/)).toBeVisible();
await flow.close();
await flow.chooseHostForImport("Second import host");
await expect(page.getByText(/missing-secondary-command/)).toBeVisible();
await expect(page.getByText(/missing-agent-command/)).toHaveCount(0);
await flow.close();
await test.step("returning to the original host omits the session imported during the switch", async () => {
const sessionId = "fixture-root-04";
await flow.chooseHostForImport("First import host");
gate.holdNextClientRequest("import_agent_request");
await flow.startImport(sessionId);
await gate.waitForHeldClientRequest();
await flow.close();
await flow.chooseHostForImport("Second import host");
await flow.expectProviderError("Broken ACP");
gate.releaseHeldClientRequest();
await flow.expectClosed();
await flow.chooseHostForImport("First import host");
await flow.revealSession("fixture-worktree");
await flow.expectSessionUnavailable(sessionId);
await flow.close();
await flow.expectTranscript("Review fixture item 4", "Fixture response 4");
});
} finally {
await secondaryHost.close();
}
});
test("captures the compact import-session journey", async ({ page }, testInfo) => {
const flow = new ImportSessionFlow(page);
await flow.openWorkspace(scenario.project.workspaceId, { width: 390, height: 844 });
@@ -378,7 +503,13 @@ async function seedClaudeSessions(input: {
unrelatedDirectory: string;
importSessionId: string;
}): Promise<number> {
const sessions = [
const sessions: {
cwd: string;
id: string;
title: string;
prompt: string;
answer?: string;
}[] = [
{
cwd: input.projectRoot,
id: input.importSessionId,
@@ -403,6 +534,7 @@ async function seedClaudeSessions(input: {
id: `fixture-root-${String(index + 1).padStart(2, "0")}`,
title: `Root session ${String(index + 1).padStart(2, "0")}`,
prompt: index === 7 ? "Investigate invoice rendering" : `Review fixture item ${index + 1}`,
...(index === 3 ? { answer: "Fixture response 4" } : {}),
})),
];
const newest = Date.now() - 60_000;
@@ -13,8 +13,8 @@ async function openMetadataGenerationSettings(page: Page) {
await gotoAppShell(page);
await openSettings(page);
await openSettingsHost(page, serverId);
await openHostSection(page, serverId, "metadata");
await expectSettingsHeader(page, "Metadata");
await openHostSection(page, serverId, "workspaces");
await expectSettingsHeader(page, "Workspaces");
}
async function openManualMetadataModelPicker(page: Page) {
@@ -3,7 +3,9 @@ import type { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import { test, expect, type Page } from "../support/fixtures";
import { connectDaemonClient } from "../support/helpers/daemon-client-loader";
import {
clickModelRowWhileProviderOpens,
closeModelPicker,
expectModelListScrollKeepsSearchFocused,
expectModelSearchEmptyState,
expectModelPickerHeight,
expectModelPickerWidth,
@@ -154,6 +156,137 @@ test.describe("Cross-provider model search", () => {
await expectModelPickerHeight(page, restingHeight);
await expectModelPickerWidth(page, restingWidth);
});
await test.step("ArrowUp wraps to the end of a virtualized catalog and Enter selects it", async () => {
await searchAllModels(page, "bulk model");
await page.keyboard.press("ArrowUp");
// Tie-broken lexicographically by modelLabel, so "Bulk model 99" sits at the bottom.
const lastRow = page
.getByTestId("combobox-desktop-container")
.getByTestId(`model-row-${LARGE_CATALOG.id}-bulk-99`);
await expect(lastRow).toBeVisible();
await expect(lastRow).toHaveAttribute("data-active", "true");
await page.keyboard.press("Enter");
await expect(page.getByTestId("combobox-desktop-container")).toHaveCount(0);
await expect(
page.getByTestId("combined-model-selector").filter({ visible: true }).first(),
).toContainText("Bulk model 99");
});
} finally {
await workspace.cleanup();
await profile.restore();
await provider.restore();
}
});
test("arrow keys navigate profiles, providers, models, and search results in the composer", async ({
page,
}) => {
const provider = await seedModelProvider(STUDIO);
const profile = await seedAgentProfiles([
{
id: "agent_profile_e2e_arrows",
name: "Arrow Profile",
provider: STUDIO.id,
modelId: "studio-fast",
},
]);
const workspace = await seedWorkspace({ repoPrefix: "model-picker-arrows-" });
try {
await test.step("open the composer model picker on the root view", async () => {
await gotoWorkspace(page, workspace.workspaceId);
await clickNewChat(page);
await expectComposerVisible(page);
await openModelPicker(page);
});
const viewport = page.getByTestId("combobox-desktop-container");
const trigger = page.getByTestId("combined-model-selector").filter({ visible: true }).first();
const profileRow = viewport.getByTestId("model-profile-row-agent_profile_e2e_arrows");
const studioProviderRow = viewport.getByTestId(`model-provider-${STUDIO.id}`);
await test.step("move from profiles to providers, drill in with ArrowRight, and go back with ArrowLeft", async () => {
await expect(profileRow).toHaveAttribute("data-active", "true");
// Root view keeps aria-selected absent while keyboard-active uses data-active.
await expect(viewport.locator("[aria-selected]")).toHaveCount(0);
// Step down until Mock Studio is active (provider order can vary across environments).
for (let step = 0; step < 10; step += 1) {
if ((await studioProviderRow.getAttribute("data-active")) === "true") break;
await page.keyboard.press("ArrowDown");
}
await expect(studioProviderRow).toHaveAttribute("data-active", "true");
await page.keyboard.press("ArrowRight");
await expect(viewport.getByTestId(`model-row-${STUDIO.id}-studio-fast`)).toBeVisible();
await page.keyboard.press("ArrowLeft");
await expect(studioProviderRow).toHaveAttribute("data-active", "true");
});
await test.step("Enter drills into the active provider and ArrowDown + Enter selects a model", async () => {
await page.keyboard.press("Enter");
const deepRow = viewport.getByTestId(`model-row-${STUDIO.id}-studio-deep`);
await expect(deepRow).toBeVisible();
await expectModelListScrollKeepsSearchFocused(page);
for (let step = 0; step < 5; step += 1) {
if ((await deepRow.getAttribute("data-active")) === "true") break;
await page.keyboard.press("ArrowDown");
}
await expect(deepRow).toHaveAttribute("data-active", "true");
await page.keyboard.press("Enter");
await expect(viewport).toHaveCount(0);
await expect(trigger).toContainText("Studio deep think");
});
await test.step("typing filters results while arrow keys select across search matches", async () => {
await openModelPicker(page);
await searchAllModels(page, "ten second stream");
const studioFast = viewport.getByTestId(`model-row-${STUDIO.id}-studio-fast`);
const mockFast = viewport.getByTestId("model-row-mock-ten-second-stream");
await expect(studioFast).toBeVisible();
await expect(mockFast).toBeVisible();
// Advance to the second match and confirm with Enter.
const initialMockActive = (await mockFast.getAttribute("data-active")) === "true";
await page.keyboard.press("ArrowDown");
const targetRow = initialMockActive ? studioFast : mockFast;
await expect(targetRow).toHaveAttribute("data-active", "true");
await page.keyboard.press("Enter");
await expect(viewport).toHaveCount(0);
await expect(trigger).toContainText("Ten second stream");
});
await test.step("a press on a model row selects it while the provider list is still opening", async () => {
await openModelPicker(page);
await clickModelRowWhileProviderOpens(page, {
provider: "mock",
modelLabel: "One minute stream",
});
await expect(viewport).toHaveCount(0);
await expect(trigger).toContainText("One minute stream");
});
await test.step("Enter on the active profile row applies it", async () => {
await openModelPicker(page);
await expect(profileRow).toHaveAttribute("data-active", "true");
await page.keyboard.press("Enter");
await expect(viewport).toHaveCount(0);
await expect(trigger).toContainText("Ten second stream");
});
await test.step("folded compact sheet also supports Enter on the active profile row", async () => {
await page.setViewportSize({ width: 390, height: 800 });
await page.getByTestId("combined-model-selector").filter({ visible: true }).first().click();
const sheetProfileRow = page.getByTestId("model-profile-row-agent_profile_e2e_arrows");
await expect(sheetProfileRow).toBeVisible();
await expect(sheetProfileRow).toHaveAttribute("data-active", "true");
await page.keyboard.press("Enter");
await expect(sheetProfileRow).toHaveCount(0);
});
} finally {
await workspace.cleanup();
await profile.restore();
@@ -1,6 +1,7 @@
import { expect, test } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import {
chooseProjectWithKeyboard,
connectNewWorkspaceDaemonClient,
expectNewWorkspaceControlsEnabled,
expectNewWorkspaceProjectSelected,
@@ -176,6 +177,33 @@ test.describe("New workspace entry points", () => {
}
});
test("choosing a project returns focus to the composer, even when the picker was opened by clicking it", async ({
page,
}) => {
const projectA: SeededWorkspace = await seedWorkspace({ repoPrefix: "entry-focus-a-" });
const projectB: SeededWorkspace = await seedWorkspace({ repoPrefix: "entry-focus-b-" });
try {
await gotoAppShell(page);
await waitForSidebarHydration(page);
await openGlobalNewWorkspaceComposer(page);
const composer = page.getByRole("textbox", { name: "Message agent..." });
await page.getByTestId("new-workspace-project-picker-trigger").click();
await chooseProjectWithKeyboard(page, projectB.projectDisplayName);
await expectNewWorkspaceProjectSelected(page, projectB.projectDisplayName);
await expect(composer).toBeFocused();
await page.keyboard.press("Control+N");
await chooseProjectWithKeyboard(page, projectA.projectDisplayName);
await expectNewWorkspaceProjectSelected(page, projectA.projectDisplayName);
await expect(composer).toBeFocused();
} finally {
await projectA.cleanup();
await projectB.cleanup();
}
});
test("keeps the in-progress form when the remembered workspace is archived elsewhere", async ({
page,
}) => {
@@ -2,6 +2,7 @@ import { expect, test, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { waitForSidebarHydration } from "../support/helpers/workspace-ui";
import {
chooseProjectWithKeyboard,
expectNewWorkspaceDraft,
fillNewWorkspaceDraft,
openNewWorkspaceComposer,
@@ -109,6 +110,27 @@ test.describe("New workspace: launching a terminal", () => {
});
});
test("with a profile that takes no prompt, choosing a project keeps focus on the Project field", async ({
page,
}) => {
await gotoAppShell(page);
await waitForSidebarHydration(page);
await openNewWorkspaceComposer(page, {
projectKey: workspace.projectKey,
projectDisplayName: workspace.projectDisplayName,
});
await selectLaunchOption(page, BARE_PROFILE.id);
await expect(terminalPromptInput(page)).toHaveCount(0);
// The read-only command preview has nothing to type into, so the picker
// hands focus back to the field that opened it.
const projectTrigger = page.getByTestId("new-workspace-project-picker-trigger");
await projectTrigger.focus();
await page.keyboard.press("Enter");
await chooseProjectWithKeyboard(page, workspace.projectDisplayName);
await expect(projectTrigger).toBeFocused();
});
test("switching terminal profiles restores the prompt and its fullscreen affordance", async ({
page,
}) => {
@@ -55,7 +55,7 @@ import {
import { getServerId } from "../support/helpers/server-id";
import { selectSidebarStatusGrouping } from "../support/helpers/sidebar";
import { getE2EDaemonPort } from "../support/helpers/daemon-port";
import { chooseAddProjectMethod, expectAddProjectPage } from "../support/helpers/add-project-flow";
import { expectAddProjectTab } from "../support/helpers/add-project-flow";
import { seedSavedSettingsHosts } from "../support/helpers/settings";
import {
expectSidebarWorkspaceSelected,
@@ -291,8 +291,7 @@ test.describe("New workspace flow", () => {
await expect(addProject).toContainText(/(?:⌘|Ctrl\+)O/);
await addProject.click();
await expectAddProjectPage(page, "method");
await chooseAddProjectMethod(page, "directory-search");
await expectAddProjectTab(page, "existing");
} finally {
await repo.cleanup();
}
@@ -0,0 +1,245 @@
import { expect, test } from "../support/fixtures";
import { gotoAppShell, openSettings } from "../support/helpers/app";
import {
clearRecordedBrowserNotifications,
clickRecordedBrowserNotification,
expectDefaultNotificationSettings,
expectNotificationSubControlsDisabled,
expectNotificationSwitchState,
expectRecordedAgentNotifications,
expectRecordedPluginNotifications,
installBrowserNotificationRecorder,
openNotificationSettings,
readRecordedBrowserNotifications,
setNotificationSwitch,
setPluginNotificationSwitch,
} from "../support/helpers/notification-settings";
import { copyPluginExample } from "../support/helpers/plugin-fixture";
import { seedWorkspace, type SeedDaemonClient } from "../support/helpers/seed-client";
const FAST_FINISHED_PROMPT =
"emit settled assistant image markdown: ![done](https://example.com/done.png)";
const PERMISSION_PROMPT = "emit a synthetic plan approval";
const ERROR_PROMPT = "emit a synthetic turn failure";
async function runMockAgentTurn(
client: SeedDaemonClient,
input: {
cwd: string;
workspaceId: string;
title: string;
prompt: string;
waitForStatus: "idle" | "error" | "running";
},
): Promise<string> {
const agent = await client.createAgent({
provider: "mock",
cwd: input.cwd,
workspaceId: input.workspaceId,
title: input.title,
modeId: "load-test",
model: "e2e-fast-stream",
initialPrompt: input.prompt,
});
await client.waitForAgentUpsert(
agent.id,
(snapshot) => snapshot.status === input.waitForStatus,
15_000,
);
return agent.id;
}
test.describe("Settings → Notifications and OS notification filtering", () => {
test("displays defaults, persists switch changes across reload, disables sub-controls when paused, and filters OS notifications", async ({
page,
}) => {
await installBrowserNotificationRecorder(page);
const seeded = await seedWorkspace({ repoPrefix: "notification-settings-" });
const pluginExample = await copyPluginExample("notifications");
let installedPlugin = false;
try {
await gotoAppShell(page);
await openSettings(page);
await openNotificationSettings(page);
await test.step("renders Settings → Notifications with expected out-of-the-box defaults", async () => {
await expectDefaultNotificationSettings(page);
await expect(
page.getByText("Installed plugins appear here so you can mute them individually", {
exact: true,
}),
).toBeVisible();
});
await test.step("default preferences suppress finished turn notifications while delivering permission and error notifications", async () => {
await clearRecordedBrowserNotifications(page);
await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Default finished agent",
prompt: FAST_FINISHED_PROMPT,
waitForStatus: "idle",
});
const permissionAgentId = await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Default permission agent",
prompt: PERMISSION_PROMPT,
waitForStatus: "running",
});
const errorAgentId = await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Default error agent",
prompt: ERROR_PROMPT,
waitForStatus: "error",
});
await expectRecordedAgentNotifications(page, [
{ agentId: permissionAgentId, reason: "permission" },
{ agentId: errorAgentId, reason: "error" },
]);
});
await test.step("enabling Agent finished persists across page reload and allows finished notifications", async () => {
await setNotificationSwitch(page, "Agent finished", true);
await page.reload();
await expectNotificationSwitchState(page, "Agent finished", {
checked: true,
disabled: false,
});
await clearRecordedBrowserNotifications(page);
const finishedAgentId = await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Enabled finished agent",
prompt: FAST_FINISHED_PROMPT,
waitForStatus: "idle",
});
await expectRecordedAgentNotifications(page, [
{ agentId: finishedAgentId, reason: "finished" },
]);
});
await test.step("toggling Enable notifications off disables sub-controls, persists across reload, and suppresses all notifications", async () => {
await setNotificationSwitch(page, "Enable notifications", false);
await expect(
page.getByText("All notifications, including plugins, are paused on this device", {
exact: true,
}),
).toBeVisible();
await expectNotificationSubControlsDisabled(page, true);
await page.reload();
await expectNotificationSwitchState(page, "Enable notifications", {
checked: false,
disabled: false,
});
await expectNotificationSubControlsDisabled(page, true);
await clearRecordedBrowserNotifications(page);
await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Paused error agent",
prompt: ERROR_PROMPT,
waitForStatus: "error",
});
await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Paused finished agent",
prompt: FAST_FINISHED_PROMPT,
waitForStatus: "idle",
});
// Give any in-flight event delivery a chance to settle and verify none fired.
await page.waitForTimeout(300);
expect(await readRecordedBrowserNotifications(page)).toEqual([]);
});
await test.step("delivers plugin notifications, routes OS notification taps through client.onNotificationOpen, and suppresses notifications when the plugin is muted", async () => {
await setNotificationSwitch(page, "Enable notifications", true);
await seeded.client.patchDaemonConfig({ pluginsEnabled: true });
await seeded.client.installDirectoryPlugin(pluginExample.directory);
installedPlugin = true;
const pluginToggle = page.getByRole("switch", { name: "Build alerts", exact: true });
await expect(pluginToggle).toBeVisible();
await expect(pluginToggle).toHaveAttribute("aria-checked", "true");
await clearRecordedBrowserNotifications(page);
const sent = (await seeded.client.invokePluginRpc("notifications-example", "alerts.send", {
buildId: "204",
title: "Build #204 failed",
body: "Playwright suite failed on main",
})) as { status: string; notificationId: string };
expect(sent.status).toBe("sent");
await expectRecordedPluginNotifications(page, [
{
pluginId: "notifications-example",
title: "Build #204 failed",
body: "Playwright suite failed on main",
notificationId: sent.notificationId,
},
]);
await clickRecordedBrowserNotification(page, 0);
await expect(page.getByText("Build alert #204", { exact: true })).toBeVisible();
await expect(
page.getByText("Playwright suite failed on main", { exact: true }),
).toBeVisible();
await expect(
page.getByText(`Notification ID: ${sent.notificationId}`, { exact: true }),
).toBeVisible();
await openSettings(page);
await openNotificationSettings(page);
await setPluginNotificationSwitch(page, "Build alerts", false);
await clearRecordedBrowserNotifications(page);
const mutedResult = (await seeded.client.invokePluginRpc(
"notifications-example",
"alerts.send",
{
buildId: "205",
title: "Build #205 failed",
body: "Muted build alert",
},
)) as { status: string };
expect(mutedResult.status).toBe("sent");
// Trigger an unmuted agent error notification so we prove delivery settled and only
// the unmuted notification arrived (Build #205 was suppressed).
const sentinelErrorAgentId = await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Sentinel unmuted error agent",
prompt: ERROR_PROMPT,
waitForStatus: "error",
});
await expectRecordedAgentNotifications(page, [
{ agentId: sentinelErrorAgentId, reason: "error" },
]);
});
} finally {
if (installedPlugin) {
await seeded.client.removePlugin("notifications-example").catch(() => undefined);
}
await pluginExample.cleanup().catch(() => undefined);
await seeded.cleanup();
}
});
});
+7 -9
View File
@@ -15,7 +15,7 @@ import {
closeRelayPairing,
emptyHome,
loadingScreen,
openTailscaleDocsFromSetup,
expectTailscaleSwitchDisabled,
paseoToolsSwitch,
pickTheme,
projectSuggestion,
@@ -105,7 +105,7 @@ test("a new user is walked through setup once", async ({ page }, testInfo) => {
await expectSetupStep(page, "Let agents use Paseo");
await expect(paseoToolsSwitch(setupModal(page))).toBeChecked();
await expect(
setupModal(page).getByRole("switch", { name: "Orchestration skills", exact: true }),
setupModal(page).getByRole("switch", { name: "Paseo skills", exact: true }),
).toBeChecked();
await page.screenshot({ path: testInfo.outputPath("4-orchestration.png") });
});
@@ -403,12 +403,10 @@ test("setup choices carry over to Settings and the phone step pairs over relay",
await continueSetup(page);
});
await test.step("Phone offers Tailscale docs and pairs over relay in its own modal", async () => {
await test.step("Phone shows a disabled Tailscale switch and pairs over relay", async () => {
await expectSetupStep(page, "Take your agents with you");
await page.screenshot({ path: testInfo.outputPath("5-phone.png") });
expect(await openTailscaleDocsFromSetup(page)).toBe(
"https://paseo.sh/docs/connectivity#tailscale",
);
await expectTailscaleSwitchDisabled(page);
const pairing = await openRelayPairingFromSetup(page);
await expect(pairing.getByText("Enable relay?", { exact: true })).toBeVisible();
await enableRelayAndExpectOffer(page);
@@ -419,7 +417,7 @@ test("setup choices carry over to Settings and the phone step pairs over relay",
await test.step("Finish closes setup and Settings shows the same Paseo tools value", async () => {
await finishSetup(page);
await page.locator('[data-testid="sidebar-settings"]:visible').first().click();
await openSettingsHostSection(page, host.serverId, "agents");
await openSettingsHostSection(page, host.serverId, "tools");
await expect(paseoToolsSwitch(page)).toBeChecked();
await page.screenshot({ path: testInfo.outputPath("7-settings-agents.png") });
});
@@ -441,7 +439,7 @@ test("with no skills picked, skills read as off and Continue moves on", async ({
await chooseCustomSkills(page, []);
await saveSkillSelection(page);
const skillsSwitch = setupModal(page).getByRole("switch", {
name: "Orchestration skills",
name: "Paseo skills",
exact: true,
});
await expect(skillsSwitch).not.toBeChecked();
@@ -478,7 +476,7 @@ test("in the compact layout, Finish on Orchestration applies its switches", asyn
await step("Let agents use Paseo");
await expect(paseoToolsSwitch(page)).toBeChecked();
// Skills are not installed, so leaving them off has nothing to apply.
const skillsSwitch = page.getByRole("switch", { name: "Orchestration skills", exact: true });
const skillsSwitch = page.getByRole("switch", { name: "Paseo skills", exact: true });
await skillsSwitch.click();
await expect(skillsSwitch).not.toBeChecked();
gate.holdNextClientRequest("set_daemon_config_request");
@@ -1,7 +1,28 @@
import { gotoAppShell, openSettings } from "../support/helpers/app";
import {
addDirectHostFromSettings,
openSettingsHostSection,
selectSettingsHost,
} from "../support/helpers/settings";
import { test } from "../support/fixtures";
import { startTailscaleTestDaemon } from "../support/helpers/tailscale-daemon";
import { startIsolatedHostDaemon } from "../support/helpers/isolated-host-daemon";
import {
expectPairingOffer,
cancelTailscaleTurnOff,
confirmTailscaleTurnOff,
connectThroughTailscale,
disableTailscale,
enableTailscale,
expectTailscaleAddress,
expectTailscaleAvailable,
expectTailscaleRowLoadsOn,
expectTailscaleUnavailable,
observeDaemonStatusPolling,
openSetupMobileStep,
refreshTailscaleAvailability,
slowConnectionToHost,
expectTailscaleUpdateRequired,
expectCompletePairingQr,
expectRelayConsent,
openPairDeviceModal,
@@ -37,3 +58,115 @@ test("keeps the pairing QR code inside its compact tile", async ({ page }, testI
await daemon.close();
}
});
test("asks for a host update when Tailscale controls are unavailable", async ({ page }) => {
const daemon = await startIsolatedHostDaemon("pair-device-browser-old-host", {
publishedVersion: "0.13.0-beta.2",
});
try {
await gotoAppShell(page);
await openSettings(page);
await addDirectHostFromSettings(page, { host: "127.0.0.1", port: daemon.port });
await selectSettingsHost(page, daemon.serverId);
await openSettingsHostSection(page, daemon.serverId, "devices");
await expectTailscaleUpdateRequired(page);
} finally {
await daemon.close();
}
});
test("turns Tailscale on and off from Devices, asking first over Tailscale", async ({
page,
baseURL,
}, testInfo) => {
test.skip(process.platform !== "linux", "Uses a second IPv4 loopback address");
// The journey opens Devices or the setup six times, two of them over a slowed connection.
test.setTimeout(120_000);
if (!baseURL) throw new Error("Expected the app base URL");
const daemon = await startTailscaleTestDaemon(baseURL);
try {
await preparePairingHost(page, daemon);
await enableTailscale(page);
await expectTailscaleAddress(page, daemon.tailscaleAddress);
await page.screenshot({ path: testInfo.outputPath("devices.png") });
await test.step("While its status loads, the row never shows Tailscale off", async () => {
const address = daemon.tailscaleAddress;
await expectTailscaleRowLoadsOn(page, address, () => preparePairingHost(page, daemon));
await expectTailscaleRowLoadsOn(page, address, () => openSetupMobileStep(page, daemon));
const restoreSpeed = await slowConnectionToHost(page, daemon.port, 300);
await expectTailscaleRowLoadsOn(page, address, () => openSetupMobileStep(page, daemon));
await expectTailscaleRowLoadsOn(page, address, () => preparePairingHost(page, daemon));
await test.step("Turning Tailscale off and back on settles over a slow connection", async () => {
await disableTailscale(page, address);
await enableTailscale(page);
await expectTailscaleAddress(page, address);
});
restoreSpeed();
});
await disableTailscale(page, daemon.tailscaleAddress);
await test.step("Over Tailscale, turning it off asks first and Cancel changes nothing", async () => {
await enableTailscale(page);
await connectThroughTailscale(page, daemon);
await cancelTailscaleTurnOff(page, daemon.tailscaleAddress);
});
await test.step("Confirming turns it off and cuts this connection", async () => {
await confirmTailscaleTurnOff(page, daemon.tailscaleAddress);
});
} finally {
await daemon.close();
}
});
test("refreshes Tailscale availability in place after Tailscale starts", async ({
page,
baseURL,
}) => {
test.skip(process.platform !== "linux", "Uses a second IPv4 loopback address");
test.setTimeout(120_000);
if (!baseURL) throw new Error("Expected the app base URL");
const daemon = await startTailscaleTestDaemon(baseURL, { initialAvailable: false });
const statusPolling = observeDaemonStatusPolling(page, daemon.port);
try {
await preparePairingHost(page, daemon);
await expectTailscaleUnavailable(page);
await test.step("Refreshing while still unavailable shows progress and stays unavailable", async () => {
const restoreSpeed = await slowConnectionToHost(page, daemon.port, 250);
await preparePairingHost(page, daemon);
await expectTailscaleUnavailable(page);
await refreshTailscaleAvailability(page);
await page.getByRole("button", { name: "Refreshing...", exact: true }).waitFor();
await expectTailscaleUnavailable(page);
restoreSpeed();
});
await test.step("Refreshing after Tailscale starts enables the switch in place", async () => {
await statusPolling.waitForFreshPollWindow();
await daemon.setTailscaleAvailable(true);
const refreshRequest = statusPolling.waitForStatusRequest(1_000);
await refreshTailscaleAvailability(page);
await refreshRequest;
await expectTailscaleAvailable(page, { timeout: 1_000 });
await enableTailscale(page);
await expectTailscaleAddress(page, daemon.tailscaleAddress);
await disableTailscale(page, daemon.tailscaleAddress);
});
await test.step("Setup mobile step also refreshes Tailscale availability in place", async () => {
await daemon.setTailscaleAvailable(false);
await openSetupMobileStep(page, daemon);
await expectTailscaleUnavailable(page);
await statusPolling.waitForFreshPollWindow();
await daemon.setTailscaleAvailable(true);
const refreshRequest = statusPolling.waitForStatusRequest(1_000);
await refreshTailscaleAvailability(page);
await refreshRequest;
await expectTailscaleAvailable(page, { timeout: 1_000 });
});
} finally {
await daemon.close();
}
});
@@ -33,7 +33,7 @@ function askAgain(page: Page) {
async function openFilesSettings(page: Page) {
await openSettings(page);
await openSettingsSection(page, "files");
await openSettingsSection(page, "chat");
await expect(page.getByTestId("file-panel-settings")).toBeVisible();
}
@@ -91,6 +91,7 @@ test("Settings > Files chooses which panel opens .md and asks again on request",
await page.setViewportSize({ width: 390, height: 844 });
await page.goto("/settings/files");
await expect(markdownDropdown(page, PLUGIN_MARKDOWN_OPTION)).toBeVisible({ timeout: 30_000 });
await askAgain(page).scrollIntoViewIfNeeded();
await expect(askAgain(page)).toBeInViewport({ ratio: 1 });
await capture(page, testInfo, "file-panel-settings-compact");
await markdownDropdown(page, PLUGIN_MARKDOWN_OPTION).click();
@@ -113,22 +114,20 @@ test("Settings > Files chooses which panel opens .md and asks again on request",
}
});
test("Settings > Files explains where file panels come from when no plugin adds one", async ({
test("Settings > Chat & panes hides file panels when no plugin adds one", async ({
page,
}, testInfo) => {
await page.setViewportSize({ width: 1280, height: 900 });
await page.goto("/settings/files");
const empty = page.getByTestId("file-panel-settings-empty");
await expect(empty).toHaveText("File panels appear here when a plugin adds one", {
timeout: 30_000,
});
await expect(page).toHaveURL(/\/settings\/chat$/);
await expect(page.getByTestId("file-panel-settings")).toHaveCount(0);
await capture(page, testInfo, "file-panel-settings-empty-wide");
await page.setViewportSize({ width: 390, height: 844 });
await expect(empty).toBeVisible();
await expect(page.getByTestId("file-panel-settings")).toHaveCount(0);
await capture(page, testInfo, "file-panel-settings-empty-compact");
});
test("Settings > Files offers Source in place of a panel no host has, and forgets it", async ({
test("Settings > Chat & panes offers Source in place of a panel no host has, and forgets it", async ({
page,
}) => {
await page.addInitScript(() => {
@@ -146,5 +145,5 @@ test("Settings > Files offers Source in place of a panel no host has, and forget
await page.keyboard.press("Escape");
await expect(page.getByRole("menuitem", { name: SOURCE_OPTION })).toBeHidden();
await row.getByRole("button", { name: "Ask again for .pdf", exact: true }).click();
await expect(page.getByTestId("file-panel-settings-empty")).toBeVisible();
await expect(page.getByTestId("file-panel-settings")).toHaveCount(0);
});
@@ -372,6 +372,25 @@ test.describe("Plugin sidebar items", () => {
await expect(page.getByText("Plugin failed", { exact: false })).toHaveCount(0);
});
test("a plugin screen keeps the sidebar toggle before its title", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await expect(headerRow(page, SHOWCASE_PLUGIN_ID, "deploys")).toBeVisible({ timeout: 30_000 });
await runCommand(page, "Open plugin workspaces");
await expect(screenTitle(page)).toHaveText("Workspaces");
await page.keyboard.press("ControlOrMeta+b");
await expect(page.getByTestId("sidebar-global-new-workspace")).not.toBeVisible();
await expect(visibleTestId(page, "menu-button")).toBeVisible();
const toggle = await boxOf(visibleTestId(page, "menu-button"));
const title = await boxOf(screenTitle(page));
expect(toggle.x + toggle.width).toBeLessThanOrEqual(title.x);
await qaScreenshot(page, "plugin-screen-sidebar-collapsed");
await visibleTestId(page, "menu-button").click();
await expect(page.getByTestId("sidebar-global-new-workspace")).toBeVisible();
});
test("a header row's shortcut hint presses the row", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
@@ -1,6 +1,12 @@
import { test } from "../support/fixtures";
import { expect, test } from "../support/fixtures";
import {
expectChatHistoryAttachment,
forkMostRecentAssistantTurnToNewTab,
observeForkAttachment,
} from "../support/helpers/assistant-fork";
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
import {
ASSISTANT_TEXT,
withTimelinePlugin,
viewInlineThinkingExample,
requestPluginTimeline,
@@ -55,3 +61,24 @@ test("inline-thinking example renders a streamed thought through host UI", async
}, info) => {
await viewInlineThinkingExample(page, info);
});
test("plugin-transformed assistant reply keeps copy, fork, and turn duration in its footer", async ({
page,
}, info) => {
const forkAttachment = observeForkAttachment(page);
await withTimelinePlugin(page, info, "assistant", async (agent) => {
await requestPluginTimeline(agent);
await agent.client.waitForFinish(agent.agentId, 30_000);
await expectWholeCompletedCard(page);
const footer = page.getByTestId("turn-footer").last();
await expect(footer).toBeVisible();
await expect(footer.getByRole("button", { name: "Copy turn" })).toBeVisible();
await expect(footer.getByRole("button", { name: "Fork chat from here" })).toBeVisible();
await expect(footer.getByText(/^Worked for /)).toBeVisible();
await forkMostRecentAssistantTurnToNewTab(page);
await expectChatHistoryAttachment(page);
expect(await forkAttachment.waitForText()).toContain(ASSISTANT_TEXT);
});
});
@@ -46,11 +46,7 @@ import {
} from "../support/helpers/project-settings";
import { gotoAppShell } from "../support/helpers/app";
import { openCompactSettings } from "../support/helpers/settings";
import {
addProjectFlowInput,
chooseAddProjectMethod,
openAddProjectFlow,
} from "../support/helpers/add-project-flow";
import { addProjectFlowInput, openAddProjectFlow } from "../support/helpers/add-project-flow";
import { createTempGitRepo } from "../support/helpers/workspace";
import {
buildOpenProjectRoute,
@@ -167,7 +163,6 @@ async function readProjectConfigFile(project: ProjectsSettingsProject): Promise<
async function addProjectFromSidebar(page: Page, projectPath: string): Promise<string> {
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
const input = addProjectFlowInput(page);
await input.fill(projectPath);
@@ -3,7 +3,7 @@ import { test } from "../support/fixtures";
import { gotoAppShell, openSettings } from "../support/helpers/app";
import { renameHostFromSettings } from "../support/helpers/hosts";
import { getServerId } from "../support/helpers/server-id";
import { openHostSection, selectSettingsHost } from "../support/helpers/settings";
import { openClientHostSettings } from "../support/helpers/settings";
const REGISTRY_KEY = "@paseo:daemon-registry";
const SEED_NONCE_KEY = "@paseo:e2e-seed-nonce";
@@ -87,8 +87,7 @@ test("saved hosts survive a registry entry this build can't read, and saving kee
await test.step("renaming a host keeps its password and the entries it can't read", async () => {
await openSettings(page);
await selectSettingsHost(page, OFFLINE_HOST.serverId);
await openHostSection(page, OFFLINE_HOST.serverId, "host");
await openClientHostSettings(page, OFFLINE_HOST.serverId);
await renameHostFromSettings(page, "Renamed offline host");
await expect
@@ -18,6 +18,7 @@ import {
expectProviderNotOnHost,
expectProviderPageLoaded,
gotoProviderPage,
openClientHostSettings,
openSettingsHost,
openHostSection,
expectHostLabelDisplayed,
@@ -53,36 +54,30 @@ test.describe("Settings host page", () => {
const port = getE2EDaemonPort();
await gotoAppShell(page);
await openSettings(page);
await openSettingsHost(page, serverId);
await test.step("connections section shows the seeded connection endpoint", async () => {
await expectSettingsHeader(page, "Connections");
await test.step("client host detail shows the seeded connection endpoint and label editor", async () => {
await openClientHostSettings(page, serverId);
await expectHostConnectionsCard(page, port);
await expectHostLabelDisplayed(page);
await clickEditHostLabel(page);
await expectHostLabelEditMode(page, TEST_HOST_LABEL);
await page.keyboard.press("Escape");
});
await test.step("agents section shows the inject MCP toggle", async () => {
await openHostSection(page, serverId, "agents");
await expectSettingsHeader(page, "Agents");
await test.step("tools section shows the inject MCP toggle", async () => {
await openHostSection(page, serverId, "tools");
await expectSettingsHeader(page, "Tools & prompts");
await expectHostInjectMcpCard(page);
});
await test.step("providers section shows the providers card", async () => {
await expectHostProvidersCard(page, serverId);
await expectSettingsHeader(page, "Providers");
});
await test.step("host section shows the host label and restart/remove action cards", async () => {
await openHostSection(page, serverId, "host");
await expectSettingsHeader(page, "Overview");
await expectHostLabelDisplayed(page);
await test.step("daemon section shows restart and client host shows remove", async () => {
await openHostSection(page, serverId, "daemon");
await expectSettingsHeader(page, "Daemon");
await expectHostActionCards(page, serverId);
});
await test.step("clicking the label pencil reveals the inline editor", async () => {
await openHostSection(page, serverId, "host");
await expectHostLabelDisplayed(page);
await clickEditHostLabel(page);
await expectHostLabelEditMode(page, TEST_HOST_LABEL);
await page.keyboard.press("Escape");
});
await test.step("host section does not render daemon lifecycle controls for a remote daemon", async () => {
await openHostSection(page, serverId, "host");
await test.step("daemon section does not render daemon lifecycle controls for a remote daemon", async () => {
await openHostSection(page, serverId, "daemon");
await expectHostNoDaemonLifecycleRow(page);
});
@@ -99,7 +94,7 @@ test.describe("Settings host page", () => {
await page.reload();
await openSettings(page);
await openSettingsHost(page, outdatedDaemon.serverId);
await openHostSection(page, outdatedDaemon.serverId, "host");
await openHostSection(page, outdatedDaemon.serverId, "daemon");
page.once("dialog", (dialog) => dialog.accept());
const updateButton = page.getByTestId("host-page-update-button");
@@ -138,8 +133,7 @@ test.describe("Settings host page", () => {
]);
await page.reload();
await openSettings(page);
await selectSettingsHost(page, daemon.serverId);
await openHostSection(page, daemon.serverId, "host");
await openClientHostSettings(page, daemon.serverId);
await test.step("the host page shows the reason and the re-add guidance, with no password UI", async () => {
await expectHostRejectedWithReAddGuidance(page, "Password required");
@@ -149,7 +143,7 @@ test.describe("Settings host page", () => {
await test.step("removing the host and adding it again with the password brings it online", async () => {
await removeHostFromHostPage(page, daemon.serverId);
await addDirectHostFromSettings(page, { host: "127.0.0.1", port: daemon.port, password });
await openHostSection(page, daemon.serverId, "host");
await openHostSection(page, daemon.serverId, "daemon");
await expectHostOnlineWithoutError(page);
});
} finally {
@@ -192,7 +186,7 @@ test.describe("Settings host page", () => {
await page.reload();
await openSettings(page);
await selectSettingsHost(page, serverId);
await openHostSection(page, serverId, "agents");
await openHostSection(page, serverId, "daemon");
};
try {
await test.step("idle agent release starts on and turns off", async () => {
@@ -213,7 +207,7 @@ test.describe("Settings host page", () => {
await test.step("other hosts keep their own setting", async () => {
await selectSettingsHost(page, primaryServerId);
await openHostSection(page, primaryServerId, "agents");
await openHostSection(page, primaryServerId, "daemon");
await expectIdleAgentRelease(page, true);
await expectLiveSavedSetting(false);
});
@@ -232,7 +226,7 @@ test.describe("Settings host page", () => {
]);
await page.reload();
await openSettings(page);
await openHostSection(page, daemon.serverId, "agents");
await openHostSection(page, daemon.serverId, "daemon");
await expectIdleAgentRelease(page, true);
// A real filesystem failure, with the daemon and RPC path intact.
await rename(configPath, `${configPath}.saved`);
@@ -251,7 +245,7 @@ test.describe("Settings host page", () => {
}
});
test("navigating to /settings/hosts/[serverId] redirects to the connections section", async ({
test("navigating to /settings/hosts/[serverId] redirects to the daemon section", async ({
page,
}) => {
const serverId = getServerId();
@@ -260,10 +254,9 @@ test.describe("Settings host page", () => {
await page.goto(`/settings/hosts/${encodeURIComponent(serverId)}`);
await expectHostPageVisible(page, serverId);
await expectSettingsHeader(page, "Connections");
await openHostSection(page, serverId, "host");
await expectHostLabelDisplayed(page);
await expectSettingsHeader(page, "Daemon");
await expectHostActionCards(page, serverId);
await expectHostLabelDisplayed(page);
});
});
@@ -286,7 +279,7 @@ test("restart recovery defaults off and persists opt-in and custom prompt", asyn
await gotoAppShell(page);
await openSettings(page);
await openSettingsHost(page, serverId);
await openHostSection(page, serverId, "agents");
await openHostSection(page, serverId, "daemon");
await expectRestartRecoveryEnabled(page, false);
await setRestartRecoveryEnabled(page, true);
await page.reload();
@@ -354,12 +347,12 @@ test("sidebar Add host completes without navigating", async ({ page }) => {
await expect(page.getByRole("button", { name: "Hosts", exact: true })).toBeVisible();
});
test("Settings Add host opens the saved host Overview", async ({ page }) => {
test("Settings Add host opens the saved host detail", async ({ page }) => {
await gotoAppShell(page);
await openSettings(page);
await addDirectHostFromSettings(page, { host: "127.0.0.1", port: Number(getE2EDaemonPort()) });
await expectSettingsHeader(page, "Overview");
await expect(page).toHaveURL(new RegExp(`/settings/hosts/${getServerId()}/host$`));
await expect(page.getByTestId("host-page-connections-card")).toBeVisible();
await expect(page).toHaveURL(new RegExp(`/settings/device-hosts/${getServerId()}$`));
});
test("New workspace Add host preserves the prompt after connecting", async ({ page }) => {
@@ -46,15 +46,15 @@ test.describe("Settings host selection", () => {
await openSettings(page);
await openSettingsHostSection(page, remoteDaemon.serverId, "connections");
await openSettingsHostSection(page, remoteDaemon.serverId, "daemon");
await selectSettingsHost(page, getServerId());
await openSettingsSection(page, "appearance");
await openSettingsHostSection(page, getServerId(), "connections");
await openSettingsHostSection(page, getServerId(), "daemon");
await clickSettingsBackToWorkspace(page);
await openSettings(page);
await openSettingsHostSection(page, remoteDaemon.serverId, "connections");
await openSettingsHostSection(page, remoteDaemon.serverId, "daemon");
} finally {
await remoteWorkspace.cleanup().catch(() => undefined);
await remoteDaemon.close().catch(() => undefined);
@@ -9,17 +9,17 @@ test("Settings language selector switches General labels", async ({ page }) => {
await openSettings(page);
await openSettingsSection(page, "general");
await expect(page.getByText("Default send", { exact: true }).first()).toBeVisible();
await expect(page.getByText("Language", { exact: true }).first()).toBeVisible();
await page.getByRole("button", { name: "System", exact: true }).click();
await page.getByRole("menuitem", { name: "简体中文 - Simplified Chinese", exact: true }).click();
await expect(page.getByText("默认发送", { exact: true }).first()).toBeVisible();
await expect(page.getByText("语言", { exact: true }).first()).toBeVisible();
await page.getByRole("button", { name: "简体中文", exact: true }).click();
await page.getByRole("menuitem", { name: "English - 英语", exact: true }).click();
await expect(page.getByText("Default send", { exact: true }).first()).toBeVisible();
await expect(page.getByText("Language", { exact: true }).first()).toBeVisible();
});
test("Settings language selector switches to Korean", async ({ page }) => {
@@ -32,10 +32,10 @@ test("Settings language selector switches to Korean", async ({ page }) => {
await page.getByRole("button", { name: "System", exact: true }).click();
await page.getByRole("menuitem", { name: "한국어 - Korean", exact: true }).click();
await expect(page.getByText("기본 전송", { exact: true }).first()).toBeVisible();
await expect(page.getByText("언어", { exact: true }).first()).toBeVisible();
await page.getByRole("button", { name: "한국어", exact: true }).click();
await page.getByRole("menuitem", { name: "English - 영어", exact: true }).click();
await expect(page.getByText("Default send", { exact: true }).first()).toBeVisible();
await expect(page.getByText("Language", { exact: true }).first()).toBeVisible();
});
@@ -62,11 +62,11 @@ import {
seedSavedSettingsHosts,
selectSettingsHost,
expectSettingsHostPickerLabel,
openClientHostSettings,
openSettingsHostSection,
removeCurrentHostFromSettings,
openSidebarHostPicker,
sidebarHostSettingsButton,
expectStandaloneSidebarHostSettingsButton,
sidebarHostRowButton,
activateSidebarHostSettingsWithKeyboard,
bindCommandCenterToEnter,
} from "../support/helpers/settings";
@@ -177,39 +177,38 @@ test.describe("Settings sidebar scroll position", () => {
}
const sidebar = page.getByTestId("settings-sidebar");
const appScrollTop = await revealSettingsSidebarSection(page, "diagnostics");
const appScrollTop = await revealSettingsSidebarSection(page, "about");
await expect(sidebar.getByRole("button", { name: "About", exact: true })).toBeInViewport();
await openSettingsSection(page, "about");
await expectAboutContent(page);
await expectDiagnosticsContent(page);
await expectSettingsSidebarScrollOffset(page, appScrollTop);
await openSettingsSection(page, "diagnostics");
await expectDiagnosticsContent(page);
await openSettingsSection(page, "shortcuts");
await expectSettingsSidebarScrollOffset(page, appScrollTop);
});
});
});
test.describe("Settings sidebar navigation", () => {
test("the sidebar host gear opens Overview in one click", async ({ page, withWorkspace }) => {
test("the sidebar host row opens Daemon in one click", async ({ page, withWorkspace }) => {
const workspace = await withWorkspace({ prefix: "sidebar-host-settings-" });
await openWorkspace(page, workspace);
await openSidebarHostPicker(page);
await expectStandaloneSidebarHostSettingsButton(page);
await sidebarHostSettingsButton(page).click();
await sidebarHostRowButton(page).click();
await expectAppRoute(page, buildSettingsHostSectionRoute(getServerId(), "host"));
await expectAppRoute(page, buildSettingsHostSectionRoute(getServerId(), "daemon"));
});
test("Enter opens the focused sidebar host gear", async ({ page, withWorkspace }) => {
test("Enter opens the active sidebar host row", async ({ page, withWorkspace }) => {
await bindCommandCenterToEnter(page);
const workspace = await withWorkspace({ prefix: "keyboard-host-settings-" });
await openWorkspace(page, workspace);
await openSidebarHostPicker(page);
await activateSidebarHostSettingsWithKeyboard(page);
await expectAppRoute(page, buildSettingsHostSectionRoute(getServerId(), "host"));
await expectAppRoute(page, buildSettingsHostSectionRoute(getServerId(), "daemon"));
});
test("opening Settings closes the composer model selector until it is opened again", async ({
@@ -284,13 +283,10 @@ test.describe("Settings sidebar navigation", () => {
await gotoAppShell(page);
await openSettings(page);
await openSettingsSection(page, "diagnostics");
await expectSettingsHeader(page, "Diagnostics");
await expectDiagnosticsContent(page);
await openSettingsSection(page, "about");
await expectSettingsHeader(page, "About");
await expectAboutContent(page);
await expectDiagnosticsContent(page);
await openSettingsSection(page, "general");
await expectSettingsHeader(page, "General");
@@ -315,18 +311,18 @@ test.describe("Settings sidebar navigation", () => {
await gotoAppShell(page);
await openSettings(page);
await selectSettingsHost(page, secondaryServerId);
await openSettingsHostSection(page, secondaryServerId, "connections");
await openSettingsHostSection(page, secondaryServerId, "daemon");
await openSettingsSection(page, "appearance");
await expectSettingsHostPickerLabel(page, "Stable horse");
await openSettingsSection(page, "general");
await expectSettingsHostPickerLabel(page, "Stable horse");
await openSettingsHostSection(page, secondaryServerId, "connections");
await openSettingsHostSection(page, secondaryServerId, "daemon");
await selectSettingsHost(page, primaryServerId);
await openSettingsSection(page, "about");
await expectSettingsHostPickerLabel(page, "First horse");
});
test("/h/[serverId]/settings redirects to the host connections section", async ({ page }) => {
test("/h/[serverId]/settings redirects to the host daemon section", async ({ page }) => {
await gotoAppShell(page);
await verifyLegacyHostSettingsRedirect(page);
});
@@ -530,12 +526,12 @@ test.describe("Settings — compact master-detail", () => {
await gotoAppShell(page);
await openCompactSettings(page, buildOpenProjectRoute());
await expectSettingsSidebarSections(page, ["general", "diagnostics", "about"]);
await expectSettingsSidebarSections(page, ["general", "hosts", "about"]);
await expectCompactSettingsList(page);
await test.step("open app details and return to the list", async () => {
await openSettingsSection(page, "diagnostics");
await expectAppRoute(page, buildSettingsSectionRoute("diagnostics"));
await openSettingsSection(page, "about");
await expectAppRoute(page, buildSettingsSectionRoute("about"));
await expectDiagnosticsContent(page);
await expectSettingsSidebarHidden(page);
await expectSettingsBackButton(page);
@@ -556,7 +552,7 @@ test.describe("Settings — compact master-detail", () => {
});
});
test("host picker settings opens Overview and backs through the settings list", async ({
test("host picker settings opens Daemon and backs through the settings list", async ({
page,
withWorkspace,
}) => {
@@ -566,10 +562,10 @@ test.describe("Settings — compact master-detail", () => {
await openWorkspace(page, workspace);
await page.getByRole("button", { name: "Open menu", exact: true }).click();
await page.getByTestId("sidebar-hosts-trigger").click();
await page.getByRole("button", { name: /Open .* settings/ }).click();
await sidebarHostRowButton(page).click();
await expectAppRoute(page, buildSettingsHostSectionRoute(getServerId(), "host"));
await expect(page.getByText("Overview", { exact: true })).toBeVisible();
await expectAppRoute(page, buildSettingsHostSectionRoute(getServerId(), "daemon"));
await expect(page.getByText("Daemon", { exact: true }).first()).toBeVisible();
await goBackInSettings(page);
await expectCompactSettingsList(page);
@@ -599,14 +595,14 @@ test.describe("Settings — compact master-detail", () => {
await expectSettingsSidebarVisible(page);
await expectSettingsHostPickerLabel(page, secondaryHostLabel);
await openSettingsHostSection(page, secondaryServerId, "connections");
await openSettingsHostSection(page, secondaryServerId, "daemon");
await goBackInSettings(page);
await expectSettingsHostPickerLabel(page, secondaryHostLabel);
await openSettingsSection(page, "appearance");
await goBackInSettings(page);
await expectSettingsHostPickerLabel(page, secondaryHostLabel);
await openSettingsHostSection(page, secondaryServerId, "connections");
await openSettingsHostSection(page, secondaryServerId, "daemon");
await goBackInSettings(page);
await expectSettingsHostPickerLabel(page, secondaryHostLabel);
});
@@ -619,8 +615,9 @@ test.describe("Settings — compact master-detail", () => {
await openWorkspace(page, workspace);
await openCompactSettings(page, buildHostWorkspaceRoute(getServerId(), workspace.workspaceId));
await openSettingsHostSection(page, getServerId(), "host");
await openClientHostSettings(page, getServerId());
await removeCurrentHostFromSettings(page);
await goBackInSettings(page);
await closeCompactSettings(page);
await expect(page).toHaveURL(/\/welcome$/);
@@ -5,6 +5,7 @@ import { createMockIdleAgent, openWorkspaceWithAgents } from "../support/helpers
import { waitForTabBar, expectAgentTabActive } from "../support/helpers/launcher";
import { seedWorkspace } from "../support/helpers/seed-client";
import { getServerId } from "../support/helpers/server-id";
import { openSettingsSection } from "../support/helpers/settings";
async function pressSettingsToggleShortcut(page: import("@playwright/test").Page) {
const modifier = process.platform === "darwin" ? "Meta" : "Control";
@@ -134,6 +135,7 @@ test.describe("Settings toggle tab regression", () => {
await pressSettingsToggleShortcut(page);
await expect(page).toHaveURL(/\/settings\/general$/);
await openSettingsSection(page, "chat");
const defaultSendTrigger = page.getByRole("button", {
name: "Default send: Steer",
@@ -324,6 +326,7 @@ test("send shortcut selection persists and controls the composer", async ({ page
});
await test.step("choose the explicit modifier shortcut and retain it after reload", async () => {
await pressSettingsToggleShortcut(page);
await openSettingsSection(page, "chat");
await expect(
page.getByRole("button", { name: "Send shortcut: Enter", exact: true }),
).toBeVisible();
@@ -351,6 +354,7 @@ test("send shortcut selection persists and controls the composer", async ({ page
});
await test.step("switch back to Enter without changing the default send behavior", async () => {
await pressSettingsToggleShortcut(page);
await openSettingsSection(page, "chat");
await selectSendingOption(page, "Send shortcut", "Enter");
await pressSettingsToggleShortcut(page);
await composer.fill("Shift still edits");
@@ -375,6 +379,7 @@ for (const behavior of ["Steer", "Interrupt", "Queue"] as const) {
await openAgentRoute(page, agent);
await expect(page.getByRole("textbox", { name: "Message agent..." })).toBeVisible();
await pressSettingsToggleShortcut(page);
await openSettingsSection(page, "chat");
await selectSendingOption(page, "Send shortcut", `${modifierLabel}+Enter`);
await selectSendingOption(page, "Default send", behavior);
await pressSettingsToggleShortcut(page);
@@ -175,7 +175,7 @@ test("searches keyboard shortcuts from the sidebar help menu", async ({ page })
test("keeps diagnostics available from Settings after globalizing the sheet", async ({ page }) => {
await gotoAppShell(page);
await openSettings(page);
await openSettingsSection(page, "diagnostics");
await openSettingsSection(page, "about");
await page.getByRole("button", { name: "Run", exact: true }).click();
await expectDiagnosticReport(page);
@@ -0,0 +1,121 @@
import type { Locator, Page } from "@playwright/test";
import { expect, test } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { getServerId } from "../support/helpers/server-id";
import { seedWorkspace } from "../support/helpers/seed-client";
import { selectSidebarStatusGrouping } from "../support/helpers/sidebar";
import { waitForSidebarHydration } from "../support/helpers/workspace-ui";
// Cmd on macOS, Ctrl on Windows and Linux: the platform primary modifier the app binds as `mod`.
const MOD = "ControlOrMeta";
type SeededProject = Awaited<ReturnType<typeof seedWorkspace>>;
async function seedProjectWithWorkspaces(count: number) {
const project = await seedWorkspace({ repoPrefix: "sidebar-selection-" });
const workspaceIds = [project.workspaceId];
for (let index = 1; index < count; index += 1) {
const created = await project.client.createWorkspace({
source: { kind: "directory", path: project.repoPath, projectId: project.projectId },
title: `Selection workspace ${index}`,
});
if (!created.workspace) throw new Error(created.error ?? "Failed to seed a workspace");
workspaceIds.push(created.workspace.id);
}
return { project, workspaceIds };
}
/** The seeded rows, in the order the sidebar shows them. */
async function rowsInSidebarOrder(page: Page, workspaceIds: readonly string[]) {
const testIds = workspaceIds.map((id) => `sidebar-workspace-row-${getServerId()}:${id}`);
const rows = page.locator(testIds.map((testId) => `[data-testid="${testId}"]`).join(", "));
await expect(rows).toHaveCount(workspaceIds.length);
const ordered = await rows.evaluateAll((elements) =>
elements.map((element) => element.getAttribute("data-testid") ?? ""),
);
return ordered.map((testId) => page.getByTestId(testId));
}
async function expectChecked(rows: readonly Locator[], checked: readonly boolean[]) {
for (const [index, row] of rows.entries()) {
await expect(row).toHaveAttribute("aria-checked", String(checked[index]));
}
}
async function expectSelectedCount(page: Page, count: number) {
await expect(page.getByTestId("workspace-selection-count")).toHaveText(`${count} selected`);
}
async function exitSelection(page: Page) {
await page.getByTestId("workspace-selection-exit").click();
await expect(page.getByTestId("workspace-selection-toast")).toHaveCount(0);
}
/**
* Walks the Finder click matrix on four rows, starting with the first row open: a modifier click
* from normal mode selects only the clicked row, Cmd/Ctrl+click toggles, Shift+click extends and
* shrinks a range from the anchor, and plain clicks keep toggling while select mode is on.
*/
async function exerciseClickMatrix(page: Page, rows: readonly Locator[]) {
const [first, second, third, fourth] = rows;
await first.click();
await expect(first).toHaveAttribute("aria-selected", "true");
const openWorkspaceUrl = page.url();
await third.click({ modifiers: [MOD] });
await expectSelectedCount(page, 1);
await expectChecked(rows, [false, false, true, false]);
await fourth.click({ modifiers: [MOD] });
await expectChecked(rows, [false, false, true, true]);
await third.click({ modifiers: [MOD] });
await expectChecked(rows, [false, false, false, true]);
await second.click();
await expectChecked(rows, [false, true, false, true]);
expect(page.url()).toBe(openWorkspaceUrl);
await exitSelection(page);
await second.click({ modifiers: ["Shift"] });
await expectSelectedCount(page, 1);
await expectChecked(rows, [false, true, false, false]);
await fourth.click({ modifiers: ["Shift"] });
await expectChecked(rows, [false, true, true, true]);
await third.click({ modifiers: ["Shift"] });
await expectChecked(rows, [false, true, true, false]);
await first.click({ modifiers: ["Shift"] });
await expectChecked(rows, [true, true, false, false]);
await fourth.click({ modifiers: [MOD] });
await third.click({ modifiers: ["Shift"] });
await expectChecked(rows, [true, true, true, true]);
expect(page.url()).toBe(openWorkspaceUrl);
await exitSelection(page);
}
test.describe("sidebar workspace selection clicks", () => {
let seeded: { project: SeededProject; workspaceIds: string[] } | null = null;
test.afterEach(async () => {
await seeded?.project.cleanup();
seeded = null;
});
test("Cmd/Ctrl+click and Shift+click select like Finder in project grouping", async ({
page,
}) => {
seeded = await seedProjectWithWorkspaces(4);
await gotoAppShell(page);
await waitForSidebarHydration(page);
await exerciseClickMatrix(page, await rowsInSidebarOrder(page, seeded.workspaceIds));
});
test("Cmd/Ctrl+click and Shift+click select like Finder in status grouping", async ({ page }) => {
seeded = await seedProjectWithWorkspaces(4);
await gotoAppShell(page);
await waitForSidebarHydration(page);
await selectSidebarStatusGrouping(page);
await exerciseClickMatrix(page, await rowsInSidebarOrder(page, seeded.workspaceIds));
});
});
@@ -25,6 +25,10 @@ import { projectEquivalenceViewKey } from "../support/helpers/project-view-key";
import { escapeRegex } from "../support/helpers/regex";
import { openFilesPanel } from "../support/helpers/workspace-tabs";
import { seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import {
readSharedStylesheetChanges,
rememberSharedStylesheet,
} from "../support/helpers/shared-stylesheet";
const GITHUB_REMOTE_URL = "https://github.com/test-owner/test-repo.git";
@@ -206,14 +210,14 @@ async function simulateDamagedLegacyDirectoryCache(
return;
}
const stored = JSON.parse(checkpoint.payload);
// Read the cursors from whichever version wrote them, then store them as version 1:
// the format whose writer could keep a checkpoint after evicting the rows it describes.
// Read the cursors from whichever version wrote them, then store them as version 2:
// the format whose writer could keep a checkpoint after another tab evicted its rows.
const cursors = typeof stored.version === "number" ? stored.cursors : stored;
if (!cursors?.workspaces?.generation) {
transaction.abort();
return;
}
store.put({ ...checkpoint, payload: JSON.stringify({ version: 1, cursors }) });
store.put({ ...checkpoint, payload: JSON.stringify({ version: 2, cursors }) });
for (const row of rows) {
if (
row.serverId === serverId &&
@@ -429,6 +433,32 @@ test.describe("Sidebar workspace list", () => {
}
});
test("workspace hover card opens and closes without rebuilding the shared stylesheet", async ({
page,
}) => {
const workspace = await seedWorkspace({ repoPrefix: "sidebar-hover-stylesheet-" });
try {
await gotoAppShell(page);
await waitForSidebarProject(page, path.basename(workspace.repoPath));
await movePointerAwayFromWorkspaceHoverCard(page);
await rememberSharedStylesheet(page);
await openWorkspaceHoverCard(page, workspace.workspaceId);
const opened = await readSharedStylesheetChanges(page);
// The card brings styles nothing else on screen uses, so the stylesheet has to grow.
expect(opened.added).toBeGreaterThan(0);
expect(opened.rebuilt).toBe(0);
await rememberSharedStylesheet(page);
await movePointerAwayFromWorkspaceHoverCard(page);
await expectWorkspaceHoverCardClosed(page);
expect((await readSharedStylesheetChanges(page)).rebuilt).toBe(0);
} finally {
await workspace.cleanup();
}
});
test("workspace hover card closes when the pointer leaves a clicked row", async ({ page }) => {
const workspace = await seedWorkspace({ repoPrefix: "sidebar-hover-click-leave-" });
+39 -4
View File
@@ -1,9 +1,11 @@
import type { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import path from "node:path";
import {
expectTimelinePromptVisible,
holdOlderHistoryPages,
scrollTimelineRowIntoView,
userScrollsTimelineToHistoryStart,
waitForTimelineGeometryToSettle,
} from "../support/helpers/timeline-pagination";
import { getActiveTabTestId } from "../support/helpers/launcher";
import type { Page, Locator } from "@playwright/test";
@@ -491,6 +493,39 @@ async function seedWholeTurnHistory() {
return agent;
}
/** Read every command across the scroll window, without requiring offscreen rows to mount. */
async function expectExpandedCommandsReadable(page: Page, count: number) {
const timeline = page.getByTestId("agent-chat-scroll");
const commands = new Set<number>();
await timeline.hover();
await waitForTimelineGeometryToSettle(page);
for (let step = 0; step < count && commands.size < count; step += 1) {
const labels = await timeline
.getByRole("button", { name: /echo stress-\d+/ })
.allTextContents();
for (const label of labels) {
const command = /echo stress-(\d+)/.exec(label);
if (command) commands.add(Number(command[1]));
}
if (commands.size < count) {
await page.mouse.wheel(0, 300);
await waitForTimelineGeometryToSettle(page);
}
}
expect([...commands].sort((a, b) => a - b)).toEqual(
Array.from({ length: count }, (_, index) => index),
);
}
async function returnToExpandedSummary(page: Page, summary: Locator) {
await page.getByTestId("agent-chat-scroll").hover();
for (let step = 0; step < 120 && !(await summary.isVisible()); step += 1) {
await page.mouse.wheel(0, -300);
await waitForTimelineGeometryToSettle(page);
}
await scrollTimelineRowIntoView(page, summary);
}
async function expectInitialFillIsConcealed(page: Page) {
await expect(page.getByTestId("agent-initial-fill")).toBeVisible();
await expect(page.getByTestId("agent-chat-scroll")).toHaveCSS("opacity", "0");
@@ -564,14 +599,14 @@ test("loads complete long turns and preserves expansion while revealing older hi
).toBeVisible();
await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(0);
await latest.click();
await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(120);
await expectExpandedCommandsReadable(page, 120);
await userScrollsTimelineToHistoryStart(page);
await history.expectRequestedPages(3);
history.releasePage(3);
await page.getByTestId("scroll-to-bottom-button").click();
await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(120);
await expectTimelinePromptVisible(page, "Short 4: emit 1 coalesced agent stream updates");
await expectExpandedCommandsReadable(page, 120);
history.expectNoRepeatedEntries();
await scrollTimelineRowIntoView(page, latest);
await returnToExpandedSummary(page, latest);
await latest.click();
await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(0);
} finally {
@@ -2,6 +2,7 @@ import type { Page } from "@playwright/test";
import { expect, test } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import {
archiveLocalWorkspaceFromDaemon,
archiveWorkspaceFromDaemon,
connectNewWorkspaceDaemonClient,
createWorktreeViaDaemon,
@@ -9,7 +10,12 @@ import {
} from "../support/helpers/new-workspace";
import { getServerId } from "../support/helpers/server-id";
import { expectWorkspaceAbsentFromSidebar } from "../support/helpers/sidebar";
import { createMockIdleAgent, openWorkspaceWithAgents } from "../support/helpers/archive-tab";
import {
createMockIdleAgent,
fetchAgentArchivedAt,
openSessions,
openWorkspaceWithAgents,
} from "../support/helpers/archive-tab";
import { connectSeedClient } from "../support/helpers/seed-client";
import { createTempGitRepo } from "../support/helpers/workspace";
import { getWorkspaceTabTestIds } from "../support/helpers/workspace-tabs";
@@ -38,6 +44,61 @@ import {
waitForWorkspaceInSidebar,
} from "../support/helpers/workspace-ui";
async function clearIndexedDbDatabases(page: Page): Promise<void> {
await page.evaluate(async () => {
const dbs = (await indexedDB.databases?.()) ?? [];
for (const db of dbs) {
if (!db.name) continue;
await new Promise<void>((resolve) => {
const req = indexedDB.deleteDatabase(db.name!);
const done = () => resolve();
req.addEventListener("success", done, { once: true });
req.addEventListener("error", done, { once: true });
req.addEventListener("blocked", done, { once: true });
});
}
});
}
async function delayRefreshAgentRequests(page: Page, delayMs: number): Promise<void> {
await page.routeWebSocket(/\/ws/, (ws) => {
const server = ws.connectToServer();
ws.onMessage((message) => {
if (typeof message === "string" && isRefreshAgentRequestMessage(message)) {
setTimeout(() => {
server.send(message);
}, delayMs);
return;
}
server.send(message);
});
server.onMessage((message) => {
ws.send(message);
});
});
}
function isRefreshAgentRequestMessage(message: string): boolean {
try {
const parsed = JSON.parse(message) as { type?: string; message?: { type?: string } };
return (
parsed.type === "refresh_agent_request" || parsed.message?.type === "refresh_agent_request"
);
} catch {
return false;
}
}
async function isSidebarFooterHitTestable(page: Page): Promise<boolean> {
return page.evaluate(() => {
const footer = document.querySelector('[data-testid="sidebar-footer"]');
if (!(footer instanceof HTMLElement)) return false;
const rect = footer.getBoundingClientRect();
const topEl = document.elementFromPoint(rect.left + rect.width / 2, rect.top + rect.height / 2);
return Boolean(topEl && footer.contains(topEl));
});
}
test.describe("Workspace archive undo", () => {
let client: Awaited<ReturnType<typeof connectNewWorkspaceDaemonClient>>;
let tempRepo: { path: string; cleanup: () => Promise<void> };
@@ -296,6 +357,12 @@ test.describe("Workspace archive undo", () => {
await createMockIdleAgent(seedClient, { ...target, title: "first" }),
await createMockIdleAgent(seedClient, { ...target, title: "second" }),
] as const;
const preArchivedAgent = await createMockIdleAgent(seedClient, {
...target,
title: "pre-archived",
});
await seedClient.archiveAgent(preArchivedAgent.id);
await expect.poll(() => fetchAgentArchivedAt(seedClient, preArchivedAgent.id)).not.toBeNull();
await openWorkspaceWithAgents(page, [agents[0], agents[1]]);
const tabsBefore = await getWorkspaceTabTestIds(page);
@@ -308,9 +375,66 @@ test.describe("Workspace archive undo", () => {
for (const agent of agents) {
await expect(page.getByTestId(`workspace-tab-agent_${agent.id}`).first()).toBeVisible();
}
await expect(
page.getByTestId("agent-unarchiving-callout").filter({ visible: true }),
).toHaveCount(1);
await expect(page.getByRole("button", { name: "Unarchive", exact: true })).toHaveCount(0);
// Opening an agent that was already archived before the workspace archive still shows
// the manual Unarchive callout rather than claiming it is unarchiving with the workspace.
await openSessions(page);
await page.getByTestId(`agent-row-${getServerId()}-${preArchivedAgent.id}`).click();
await expect(page.getByTestId("agent-archived-callout")).toBeVisible();
await expect(page.getByRole("button", { name: "Unarchive", exact: true })).toBeVisible();
await expect(
page.getByTestId("agent-unarchiving-callout").filter({ visible: true }),
).toHaveCount(0);
await page.getByTestId(`workspace-tab-agent_${agents[0].id}`).first().click();
await expect(
page.getByTestId("agent-unarchiving-callout").filter({ visible: true }),
).toHaveCount(1);
await page.evaluate(() => {
const win = window as unknown as Record<string, unknown>;
let sawAgentLoading = false;
let running = true;
const isVisible = (el: Element | null) => {
if (!el || !(el instanceof HTMLElement)) return false;
const rect = el.getBoundingClientRect();
if (rect.width === 0 || rect.height === 0) return false;
const style = getComputedStyle(el);
return style.display !== "none" && style.visibility !== "hidden" && style.opacity !== "0";
};
const tick = () => {
if (!running) return;
if (
Array.from(document.querySelectorAll('[data-testid="agent-loading"]')).some(isVisible)
) {
sawAgentLoading = true;
}
requestAnimationFrame(tick);
};
win.__stopMidUndoLoadingCheck = () => {
running = false;
return sawAgentLoading;
};
requestAnimationFrame(tick);
});
teardown.release();
await expectHostWorkspaceSettledActive(client, worktree.workspaceId);
await expect.poll(() => getWorkspaceTabTestIds(page)).toEqual(tabsBefore);
await expect(page.getByRole("textbox", { name: "Message agent..." })).toBeEditable({
timeout: 30_000,
});
const sawMidUndoLoading = await page.evaluate(() => {
const win = window as unknown as { __stopMidUndoLoadingCheck?: () => boolean };
return win.__stopMidUndoLoadingCheck?.();
});
expect(sawMidUndoLoading).toBe(false);
await expect
.poll(() => getWorkspaceTabTestIds(page))
.toEqual([...tabsBefore, `workspace-tab-agent_${preArchivedAgent.id}`]);
} finally {
teardown.release();
await seedClient.close().catch(() => undefined);
@@ -357,4 +481,318 @@ test.describe("Workspace archive undo", () => {
await expect(undoButton(page)).toHaveCount(0);
await expect(workspaceRow(page, worktree.workspaceId)).toBeVisible();
});
test("unarchiving a workspace with archived agents skips archived-callout and loading flashes", async ({
page,
}) => {
const seedClient = await connectSeedClient();
const project = await openProjectViaDaemon(client, tempRepo.path);
try {
const agent1 = await createMockIdleAgent(seedClient, {
cwd: project.workspaceDirectory,
workspaceId: project.workspaceId,
title: "Atomic restore agent 1",
});
const agent2 = await createMockIdleAgent(seedClient, {
cwd: project.workspaceDirectory,
workspaceId: project.workspaceId,
title: "Atomic restore agent 2",
});
// Seed 25 turns so the archived conversation spans multiple timeline pages (hasOlder=true).
for (let i = 0; i < 25; i += 1) {
await seedClient.sendAgentMessage(
agent1.id,
`atomic-restore-turn-${i}: emit 1 coalesced agent stream updates`,
);
await seedClient.waitForFinish(agent1.id, 15_000);
}
await archiveLocalWorkspaceFromDaemon(client, project.workspaceId);
await expect.poll(() => fetchAgentArchivedAt(seedClient, agent1.id)).not.toBeNull();
await expect.poll(() => fetchAgentArchivedAt(seedClient, agent2.id)).not.toBeNull();
await gotoAppShell(page);
// Clear persisted replica IndexedDB so this tests a true cold restore.
await clearIndexedDbDatabases(page);
await page.reload();
await waitForSidebarHydration(page);
await openSessions(page);
await page.getByTestId(`agent-row-${getServerId()}-${agent1.id}`).click();
await expect(page.getByTestId("workspace-recovery-action")).toHaveText("Unarchive", {
timeout: 30_000,
});
// Verify the compact left sidebar overlays the recovery gate rather than painting behind it.
const desktopViewport = page.viewportSize() ?? { width: 1280, height: 720 };
await page.setViewportSize({ width: 390, height: 720 });
await page.getByRole("button", { name: "Open menu", exact: true }).first().click();
const sidebarFooter = page.getByTestId("sidebar-footer").first();
await expect(sidebarFooter).toBeVisible();
await expect.poll(() => isSidebarFooterHitTestable(page)).toBe(true);
await page.setViewportSize(desktopViewport);
await expect(page.getByTestId("workspace-recovery-action")).toBeVisible();
await page.evaluate(() => {
const win = window as unknown as Record<string, unknown>;
const recoveryButton = document.querySelector('[data-testid="workspace-recovery-action"]');
const seen = {
archivedCallout: false,
agentLoading: false,
agentInitialFill: false,
updatingToast: false,
recoveryButtonRemounted: false,
firstRevealedTabsCount: -1,
firstRevealedRowCount: -1,
firstRevealedStreamOpacity: -1,
firstRevealedDistanceFromBottom: -1,
};
let running = true;
const isVisible = (el: Element | null) => {
if (!el || !(el instanceof HTMLElement)) return false;
const rect = el.getBoundingClientRect();
if (rect.width === 0 || rect.height === 0) return false;
const style = getComputedStyle(el);
return style.display !== "none" && style.visibility !== "hidden" && style.opacity !== "0";
};
const tick = () => {
if (!running) return;
const currentRecoveryButton = document.querySelector(
'[data-testid="workspace-recovery-action"]',
);
if (currentRecoveryButton && recoveryButton && currentRecoveryButton !== recoveryButton) {
seen.recoveryButtonRemounted = true;
}
if (
Array.from(document.querySelectorAll('[data-testid="agent-archived-callout"]')).some(
isVisible,
)
) {
seen.archivedCallout = true;
}
if (
Array.from(document.querySelectorAll('[data-testid="agent-loading"]')).some(isVisible)
) {
seen.agentLoading = true;
}
if (
Array.from(document.querySelectorAll('[data-testid="agent-initial-fill"]')).some(
isVisible,
)
) {
seen.agentInitialFill = true;
}
if (
Array.from(document.querySelectorAll('[data-testid="agent-updating-toast"]')).some(
isVisible,
)
) {
seen.updatingToast = true;
}
const composerVisible = Array.from(
document.querySelectorAll(
'textarea[aria-label="Message agent..."], [role="textbox"][aria-label="Message agent..."]',
),
).some(isVisible);
if (seen.firstRevealedTabsCount === -1 && composerVisible) {
seen.firstRevealedTabsCount = Array.from(
document.querySelectorAll('[data-testid^="workspace-tab-"]'),
).filter(isVisible).length;
const stream =
Array.from(document.querySelectorAll('[data-testid="agent-chat-scroll"]')).find(
isVisible,
) ?? null;
if (stream instanceof HTMLElement) {
seen.firstRevealedRowCount = stream.querySelectorAll("[data-history-row-id]").length;
seen.firstRevealedStreamOpacity = Number.parseFloat(
getComputedStyle(stream).opacity || "1",
);
seen.firstRevealedDistanceFromBottom = Math.max(
0,
Math.round(stream.scrollHeight - stream.scrollTop - stream.clientHeight),
);
}
}
requestAnimationFrame(tick);
};
win.__stopUnarchiveFlashCheck = () => {
running = false;
return seen;
};
requestAnimationFrame(tick);
});
await page.getByTestId("workspace-recovery-action").click();
await expect(page.getByRole("textbox", { name: "Message agent..." })).toBeEditable({
timeout: 30_000,
});
await expect(
page.getByText("atomic-restore-turn-24", { exact: false }).first(),
).toBeVisible();
const seen = await page.evaluate(() => {
const win = window as unknown as {
__stopUnarchiveFlashCheck?: () => {
archivedCallout: boolean;
agentLoading: boolean;
agentInitialFill: boolean;
updatingToast: boolean;
recoveryButtonRemounted: boolean;
firstRevealedTabsCount: number;
firstRevealedRowCount: number;
firstRevealedStreamOpacity: number;
firstRevealedDistanceFromBottom: number;
};
};
return win.__stopUnarchiveFlashCheck?.();
});
expect(seen).toBeDefined();
expect({
archivedCallout: seen?.archivedCallout,
agentLoading: seen?.agentLoading,
agentInitialFill: seen?.agentInitialFill,
updatingToast: seen?.updatingToast,
recoveryButtonRemounted: seen?.recoveryButtonRemounted,
firstRevealedTabsCount: seen?.firstRevealedTabsCount,
firstRevealedStreamOpacity: seen?.firstRevealedStreamOpacity,
}).toEqual({
archivedCallout: false,
agentLoading: false,
agentInitialFill: false,
updatingToast: false,
recoveryButtonRemounted: false,
firstRevealedTabsCount: 2,
firstRevealedStreamOpacity: 1,
});
expect(seen!.firstRevealedRowCount).toBeGreaterThan(0);
expect(seen!.firstRevealedDistanceFromBottom).toBeLessThanOrEqual(16);
} finally {
await client.removeProject(project.projectKey).catch(() => undefined);
await seedClient.close().catch(() => undefined);
}
});
test("unarchiving a single archived agent keeps the chat mounted without a loading flash", async ({
page,
}) => {
const seedClient = await connectSeedClient();
const project = await openProjectViaDaemon(client, tempRepo.path);
try {
const agent1 = await createMockIdleAgent(seedClient, {
cwd: project.workspaceDirectory,
workspaceId: project.workspaceId,
title: "Single unarchive agent",
});
await createMockIdleAgent(seedClient, {
cwd: project.workspaceDirectory,
workspaceId: project.workspaceId,
title: "Sibling active agent",
});
for (let i = 0; i < 6; i += 1) {
await seedClient.sendAgentMessage(
agent1.id,
`single-unarchive-turn-${i}: emit 1 coalesced agent stream updates`,
);
await seedClient.waitForFinish(agent1.id, 15_000);
}
await seedClient.archiveAgent(agent1.id);
await expect.poll(() => fetchAgentArchivedAt(seedClient, agent1.id)).not.toBeNull();
// Delay `refresh_agent_request` briefly so the UI renders its busy state on the Unarchive button.
await delayRefreshAgentRequests(page, 250);
await gotoAppShell(page);
await waitForSidebarHydration(page);
await openSessions(page);
await page.getByTestId(`agent-row-${getServerId()}-${agent1.id}`).click();
const unarchiveBtn = page.getByRole("button", { name: "Unarchive", exact: true });
await expect(unarchiveBtn).toBeVisible({ timeout: 30_000 });
await expect(
page.getByText("single-unarchive-turn-5", { exact: false }).first(),
).toBeVisible();
const idleCalloutBox = await page.getByTestId("agent-archived-callout").boundingBox();
if (!idleCalloutBox) throw new Error("Archived callout is not laid out");
await page.evaluate(() => {
const win = window as unknown as Record<string, unknown>;
const state = {
sawAgentLoading: false,
sawUnarchivingCallout: false,
unarchivingCalloutHeights: [] as number[],
minRowCount: Number.POSITIVE_INFINITY,
minStreamOpacity: Number.POSITIVE_INFINITY,
};
let running = true;
const isVisible = (el: Element | null) => {
if (!el || !(el instanceof HTMLElement)) return false;
const rect = el.getBoundingClientRect();
if (rect.width === 0 || rect.height === 0) return false;
const style = getComputedStyle(el);
return style.display !== "none" && style.visibility !== "hidden" && style.opacity !== "0";
};
const tick = () => {
if (!running) return;
if (
Array.from(document.querySelectorAll('[data-testid="agent-loading"]')).some(isVisible)
) {
state.sawAgentLoading = true;
}
const stream =
Array.from(document.querySelectorAll('[data-testid="agent-chat-scroll"]')).find(
isVisible,
) ?? null;
if (stream instanceof HTMLElement) {
const rowCount = stream.querySelectorAll("[data-history-row-id]").length;
const opacity = Number.parseFloat(getComputedStyle(stream).opacity || "1");
state.minRowCount = Math.min(state.minRowCount, rowCount);
state.minStreamOpacity = Math.min(state.minStreamOpacity, opacity);
} else {
state.minRowCount = 0;
state.minStreamOpacity = 0;
}
const unarchivingCallout = Array.from(
document.querySelectorAll('[data-testid="agent-unarchiving-callout"]'),
).find(isVisible);
if (unarchivingCallout instanceof HTMLElement) {
state.sawUnarchivingCallout = true;
state.unarchivingCalloutHeights.push(
Math.round(unarchivingCallout.getBoundingClientRect().height),
);
}
requestAnimationFrame(tick);
};
win.__stopSingleUnarchiveCheck = () => {
running = false;
return state;
};
requestAnimationFrame(tick);
});
await unarchiveBtn.click();
await expect(page.getByRole("textbox", { name: "Message agent..." })).toBeEditable({
timeout: 30_000,
});
const result = await page.evaluate(() => {
const win = window as unknown as {
__stopSingleUnarchiveCheck?: () => {
sawAgentLoading: boolean;
sawUnarchivingCallout: boolean;
unarchivingCalloutHeights: number[];
minRowCount: number;
minStreamOpacity: number;
};
};
return win.__stopSingleUnarchiveCheck?.();
});
expect(result?.sawAgentLoading).toBe(false);
expect(result?.sawUnarchivingCallout).toBe(true);
expect(result?.minRowCount).toBeGreaterThan(0);
expect(result?.minStreamOpacity).toBe(1);
for (const height of result?.unarchivingCalloutHeights ?? []) {
expect(Math.abs(height - Math.round(idleCalloutBox.height))).toBeLessThanOrEqual(1);
}
} finally {
await client.removeProject(project.projectKey).catch(() => undefined);
await seedClient.close().catch(() => undefined);
}
});
});
@@ -153,3 +153,25 @@ On iPad, replacing the field a second time appends text. For this Settings journ
native clipboard Paste menu, then continue the assertions manually. Dismiss the password keyboard
with Done to submit when the Connect button is below the keyboard. The welcome pairing regression
runs end to end without these adjustments.
## Sheet footer keyboard safe-area clearance
`footer-keyboard.android.sh` records the **Add project** sheet on an Android device or emulator
across repeated keyboard open/dismiss transitions, then runs `assert-sheet-footer-keyboard.mjs`
over every recorded frame. Configure three-button navigation, `show_ime_with_hard_keyboard=1`, and
a visible soft keyboard (such as Gboard) on the test device before running so the script does not
mutate device settings. The assertion checks both settled positions against the navigation bar
height and fails if any frame drops the **Open project** button into the navigation bar or
overshoots above its open-keyboard position.
```sh
ANDROID_SERIAL=emulator-5554 \
packages/app/e2e/mobile/modal-sheet/footer-keyboard.android.sh
```
You can also validate an existing screen recording directly (optionally passing pixel tolerance and
navigation bar height in pixels):
```sh
node packages/app/e2e/mobile/modal-sheet/assert-sheet-footer-keyboard.mjs /path/to/recording.mp4 4 96
```
@@ -0,0 +1,173 @@
import { execFileSync, spawnSync } from "node:child_process";
import process from "node:process";
const [, , videoPath, toleranceArg = "4", navBarHeightArg = "0"] = process.argv;
if (!videoPath) {
throw new Error(
"Usage: node assert-sheet-footer-keyboard.mjs <screenrecord.mp4> [pixel-tolerance] [nav-bar-height-px]",
);
}
const tolerance = Number(toleranceArg);
if (!Number.isFinite(tolerance) || tolerance < 0) {
throw new Error(`Invalid pixel tolerance: ${toleranceArg}`);
}
const navBarHeight = Number(navBarHeightArg);
if (!Number.isFinite(navBarHeight) || navBarHeight < 0) {
throw new Error(`Invalid navigation bar height: ${navBarHeightArg}`);
}
function probeDimensions(filePath) {
const output = execFileSync(
"ffprobe",
[
"-v",
"error",
"-select_streams",
"v:0",
"-show_entries",
"stream=width,height",
"-of",
"csv=s=x:p=0",
filePath,
],
{ encoding: "utf8" },
).trim();
const [width, height] = output.split("x").map(Number);
if (!width || !height) {
throw new Error(`Unable to read video dimensions for ${filePath}: ${output}`);
}
return { width, height };
}
function measureButtonBottomPerFrame(filePath, width, height) {
const centerX = Math.floor(width / 2);
// Decode only the 1px vertical centerline so full-rate recordings fit comfortably in memory.
const result = spawnSync(
"ffmpeg",
[
"-v",
"error",
"-i",
filePath,
"-vf",
`format=rgb24,crop=1:${height}:${centerX}:0`,
"-vsync",
"0",
"-f",
"rawvideo",
"-pix_fmt",
"rgb24",
"-",
],
{ maxBuffer: 64 * 1024 * 1024 },
);
if (result.status !== 0) {
throw new Error(`ffmpeg failed (${result.status}): ${result.stderr?.toString("utf8") ?? ""}`);
}
const buffer = result.stdout;
const frameSize = height * 3;
const frameCount = Math.floor(buffer.length / frameSize);
// Restrict vertical scan below the search field so its green focus ring is excluded.
const scanTop = Math.floor(height * 0.42);
const bottoms = [];
for (let frame = 0; frame < frameCount; frame += 1) {
const frameOffset = frame * frameSize;
let maxY = null;
for (let y = scanTop; y < height; y += 1) {
const offset = frameOffset + y * 3;
const r = buffer[offset];
const g = buffer[offset + 1];
const b = buffer[offset + 2];
// Matches the green primary "Open project" button (both enabled and disabled states).
if (g > 50 && g > r + 15 && g > b + 10) {
maxY = y;
}
}
bottoms.push(maxY);
}
return bottoms;
}
function findSettledValue(values, minRunLength) {
let runValue = null;
let runLength = 0;
for (const value of values) {
if (value !== null && runValue !== null && Math.abs(value - runValue) <= 2) {
runLength += 1;
if (runLength >= minRunLength) return runValue;
} else {
runValue = value;
runLength = value === null ? 0 : 1;
}
}
return null;
}
const { width, height } = probeDimensions(videoPath);
const bottoms = measureButtonBottomPerFrame(videoPath, width, height);
const visibleFrames = bottoms
.map((bottom, frame) => ({ frame, bottom }))
.filter((entry) => entry.bottom !== null);
if (visibleFrames.length < 10) {
throw new Error(
`Expected at least 10 frames with the Open project footer button visible, found ${visibleFrames.length}`,
);
}
// Identify settled resting (keyboard closed, lower on screen) and open (keyboard shown, higher on
// screen) positions by finding stable runs separated by at least 200px of keyboard height.
const minBottom = Math.min(...visibleFrames.map((entry) => entry.bottom));
const maxBottom = Math.max(...visibleFrames.map((entry) => entry.bottom));
const midpoint = (minBottom + maxBottom) / 2;
const closedSettled = findSettledValue(
bottoms.map((y) => (y !== null && y > midpoint ? y : null)),
15,
);
const openSettled = findSettledValue(
bottoms.map((y) => (y !== null && y < midpoint ? y : null)),
15,
);
if (closedSettled === null || openSettled === null || closedSettled - openSettled < 200) {
throw new Error(
`Recording did not capture settled keyboard-closed (${closedSettled}) and keyboard-open (${openSettled}) states`,
);
}
const maxAllowedBottom =
navBarHeight > 0
? Math.min(closedSettled + tolerance, height - navBarHeight)
: closedSettled + tolerance;
const belowNavViolations = visibleFrames.filter((entry) => entry.bottom > maxAllowedBottom);
const overshootViolations = visibleFrames.filter((entry) => entry.bottom < openSettled - tolerance);
if (belowNavViolations.length > 0 || overshootViolations.length > 0) {
const summary = [
`Sheet footer keyboard transition jank detected in ${videoPath}:`,
` settled closed bottom=${closedSettled}px (gap=${height - closedSettled}px), settled open bottom=${openSettled}px (gap=${height - openSettled}px), maxAllowedBottom=${maxAllowedBottom}px`,
];
if (belowNavViolations.length > 0) {
const worst = Math.max(...belowNavViolations.map((entry) => entry.bottom));
summary.push(
` dropped below safe-area clearance on ${belowNavViolations.length} frames (first=f${belowNavViolations[0].frame}, last=f${belowNavViolations.at(-1).frame}, worst bottom=${worst}px, excess=+${worst - maxAllowedBottom}px)`,
);
}
if (overshootViolations.length > 0) {
const worst = Math.min(...overshootViolations.map((entry) => entry.bottom));
summary.push(
` overshot above open keyboard position on ${overshootViolations.length} frames (first=f${overshootViolations[0].frame}, worst bottom=${worst}px, overshoot=-${openSettled - worst}px)`,
);
}
throw new Error(summary.join("\n"));
}
process.stdout.write(
`Sheet footer stayed within bounds across ${bottoms.length} frames (${visibleFrames.length} visible): closed=${closedSettled}px, open=${openSettled}px, maxAllowed=${maxAllowedBottom}px, 0 nav-bar overlap frames, 0 overshoot frames\n`,
);
@@ -0,0 +1,54 @@
#!/usr/bin/env bash
set -euo pipefail
# Verifies that the Add project bottom sheet footer never flashes behind the Android system
# navigation bar on keyboard dismiss or overshoots upward on keyboard open.
#
# Prerequisites (configured on the test device before running):
# - Three-button navigation bar enabled (for example:
# `adb shell cmd overlay enable com.android.internal.systemui.navbar.threebutton`).
# - Software keyboard enabled when a hardware keyboard is attached (`show_ime_with_hard_keyboard=1`)
# and a visible soft keyboard (such as Gboard) selected as the active IME.
# - The Add project sheet already open with a connected host so the Open project footer button is
# visible.
# - `ffmpeg` and `ffprobe` on PATH.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SERIAL="${ANDROID_SERIAL:-$(adb devices | awk '/\tdevice$/ {print $1; exit}')}"
OUT_DIR="${SHEET_FOOTER_QA_DIR:-/tmp/paseo-sheet-footer-qa}"
VIDEO_PATH="$OUT_DIR/sheet-footer-keyboard.mp4"
if [ -z "$SERIAL" ]; then
echo "No Android device attached. Set ANDROID_SERIAL or start an emulator." >&2
exit 1
fi
mkdir -p "$OUT_DIR"
# Derive tap coordinates and 3-button navigation bar height (48dp) from the active display metrics.
SIZE_LINE="$(adb -s "$SERIAL" shell wm size | tail -n 1 | tr -d '\r')"
DIMENSIONS="${SIZE_LINE##* }"
WIDTH="${DIMENSIONS%x*}"
HEIGHT="${DIMENSIONS#*x}"
DENSITY_LINE="$(adb -s "$SERIAL" shell wm density | tail -n 1 | tr -d '\r')"
DENSITY="${DENSITY_LINE##* }"
NAV_BAR_PX="${SHEET_FOOTER_NAV_BAR_PX:-$((48 * DENSITY / 160))}"
SEARCH_X=$((WIDTH / 2))
SEARCH_Y=$((HEIGHT * 34 / 100))
adb -s "$SERIAL" shell rm -f /sdcard/sheet-footer-keyboard.mp4
adb -s "$SERIAL" shell screenrecord --time-limit 9 --bit-rate 8000000 /sdcard/sheet-footer-keyboard.mp4 &
REC_PID=$!
sleep 0.8
adb -s "$SERIAL" shell input tap "$SEARCH_X" "$SEARCH_Y"
sleep 1.8
adb -s "$SERIAL" shell input keyevent 4
sleep 1.8
adb -s "$SERIAL" shell input tap "$SEARCH_X" "$SEARCH_Y"
sleep 1.8
adb -s "$SERIAL" shell input keyevent 4
wait "$REC_PID" || true
adb -s "$SERIAL" pull /sdcard/sheet-footer-keyboard.mp4 "$VIDEO_PATH" >/dev/null
node "$SCRIPT_DIR/assert-sheet-footer-keyboard.mjs" "$VIDEO_PATH" 4 "$NAV_BAR_PX"
@@ -15,8 +15,8 @@ press "id=\"model-provider-${PROVIDER_ID}\""
wait "id=\"compact-model-list\"" 3000
# The row's profile action sits inside Android's independent scroll viewport.
press "id=\"model-create-profile-${PROVIDER_ID}-${PROFILE_MODEL_ID}\""
wait "text=\"Add agent profile\"" 5000
# Closing the form keeps the remembered model: the tap did not also select the row.
back
wait "id=\"combined-model-selector\" label=\"Select model (${MODEL_LABEL})\"" 3000
wait "id=\"model-profile-created-toast\"" 5000
# Undo removes the created profile after selecting the model and closing the picker.
press "id=\"model-profile-created-undo\""
wait "id=\"combined-model-selector\"" 3000
close
@@ -38,9 +38,6 @@ fill "id=\"direct-password-input\"" "${PASSWORD}"
wait stable
press "id=\"direct-host-submit\""
wait stable
open "${APP_ID}" "paseo://settings"
wait "label=\"Connections\"" 10000
press "label=\"Connections\""
wait stable
wait "id=\"host-page-connections-card\"" 30000
open "${APP_ID}" "paseo://settings/hosts"
wait "id=\"client-hosts-card\"" 15000
screenshot "${OUT}/16-settings-connected.png"
@@ -1,4 +1,4 @@
// Start on Settings > Host > Pair device with relay enabled in the Android app.
// Start on Settings > Host > Devices with relay enabled in the Android app.
// node packages/app/e2e/mobile/pair-device/android.mjs <agent-device-session>
import assert from "node:assert/strict";
import { execFileSync } from "node:child_process";
@@ -13,11 +13,7 @@ function ad(...args) {
});
}
ad(
"press",
'label="Pair a device, Scan a QR code or copy a link to connect your phone to this host"',
"--settle",
);
ad("press", 'label="Relay"', "--settle");
ad("wait", "text", "Pairing QR code", "10000");
const { data } = JSON.parse(ad("snapshot", "-i", "--json"));
const sheet = data.nodes.find((node) => node.label === "Bottom Sheet");
@@ -1,73 +1,61 @@
import path from "node:path";
import { expect, type Locator, type Page } from "@playwright/test";
export type AddProjectFlowPage =
| "host"
| "method"
| "directory-search"
| "github-search"
| "github-location"
| "new-directory-parent"
| "new-directory-name";
export type AddProjectMethod = "directory-search" | "browse" | "github" | "new-directory";
const METHOD_DESTINATIONS: Record<Exclude<AddProjectMethod, "browse">, AddProjectFlowPage> = {
"directory-search": "directory-search",
github: "github-search",
"new-directory": "new-directory-parent",
};
export type AddProjectTab = "existing" | "clone" | "new-folder";
export function addProjectFlow(page: Page): Locator {
return page.getByTestId("add-project-flow");
}
/** The current tab's search or name field. */
export function addProjectFlowInput(page: Page): Locator {
return page.getByTestId("add-project-flow-input");
}
export function addProjectFlowBack(page: Page): Locator {
return page.getByTestId("add-project-flow-back");
export function addProjectFlowTab(page: Page, tab: AddProjectTab): Locator {
return page.getByTestId(`add-project-flow-tab-${tab}`);
}
export function addProjectFlowHost(page: Page, serverId: string): Locator {
return page.getByTestId(`add-project-flow-host-${serverId}`);
export function addProjectFlowSubmit(page: Page): Locator {
return page.getByTestId("add-project-flow-submit");
}
export function addProjectFlowMethod(page: Page, method: AddProjectMethod): Locator {
return page.getByTestId(`add-project-flow-method-${method}`);
export function addProjectFlowHostTrigger(page: Page): Locator {
return page.getByTestId("add-project-flow-host-trigger");
}
export async function expectAddProjectPage(page: Page, kind: AddProjectFlowPage): Promise<Locator> {
const currentPage = page.getByTestId(`add-project-flow-page-${kind}`);
await expect(currentPage).toBeVisible({ timeout: 30_000 });
return currentPage;
export async function expectAddProjectTab(page: Page, tab: AddProjectTab): Promise<void> {
await expect(addProjectFlowTab(page, tab)).toHaveAttribute("aria-selected", "true", {
timeout: 30_000,
});
}
async function openAddProjectFlowSurface(
page: Page,
expectedPage: "host" | "method",
): Promise<void> {
/** Opens Add project from the sidebar; it starts on Existing with the search focused. */
export async function openAddProjectFlow(page: Page): Promise<void> {
await page.locator('[data-testid="sidebar-add-project"]:visible').click();
await expect(addProjectFlow(page)).toBeVisible({ timeout: 30_000 });
await expectAddProjectPage(page, expectedPage);
}
export async function openAddProjectFlow(page: Page): Promise<void> {
await openAddProjectFlowSurface(page, "method");
}
export async function openAddProjectHostSelection(page: Page): Promise<void> {
await openAddProjectFlowSurface(page, "host");
await expectAddProjectTab(page, "existing");
await expect(addProjectFlowInput(page)).toBeFocused();
}
export async function chooseAddProjectMethod(page: Page, method: AddProjectMethod): Promise<void> {
const option = addProjectFlowMethod(page, method);
await expect(option).toBeVisible();
await option.click();
if (method !== "browse") {
await expectAddProjectPage(page, METHOD_DESTINATIONS[method]);
}
export async function chooseAddProjectTab(page: Page, tab: AddProjectTab): Promise<void> {
await addProjectFlowTab(page, tab).click();
await expectAddProjectTab(page, tab);
}
export async function chooseAddProjectHost(page: Page, serverId: string): Promise<void> {
await addProjectFlowHostTrigger(page).click();
await page.getByTestId(`add-project-flow-host-${serverId}`).click();
}
/** Types a parent directory into the Location picker and uses it as typed. */
export async function chooseAddProjectLocation(page: Page, location: string): Promise<void> {
await page.getByTestId("add-project-flow-location").click();
await page.getByPlaceholder("Search folders or enter a path").last().fill(location);
await page.getByText("Use this folder", { exact: true }).click();
await expect(page.getByTestId("add-project-flow-location")).toContainText(
path.basename(location),
);
}
export async function expectNewWorkspaceForAddedProject(
@@ -114,8 +102,10 @@ export async function expectAddProjectResultVisible(page: Page, text: string): P
.toBe(true);
}
/** Presses Enter on the focused Add host button, which the sheet's own Enter must not swallow. */
export async function chooseAddHostFromProjectFlow(page: Page): Promise<void> {
await page.getByRole("button", { name: /Add host.*No connected hosts/ }).click();
await addProjectFlow(page).getByRole("button", { name: "Add host", exact: true }).focus();
await page.keyboard.press("Enter");
}
export async function navigateAndDismissAddProject(page: Page): Promise<void> {
@@ -142,8 +142,22 @@ export async function openAgentProfileSettings(page: Page): Promise<void> {
await gotoAppShell(page);
await openSettings(page);
await openSettingsHost(page, serverId);
await page.getByRole("button", { name: "Agents", exact: true }).click();
await expectAppRoute(page, buildSettingsHostSectionRoute(serverId, "agents"));
await page.getByRole("button", { name: "Agent profiles", exact: true }).click();
await expectAppRoute(page, buildSettingsHostSectionRoute(serverId, "agent-profiles"));
await expect(page.getByTestId("agent-profiles-card")).toBeVisible({ timeout: 30_000 });
}
/** Reach agent profiles on a compact viewport so Open project -> Settings -> Agent profiles are pushed. */
export async function openCompactAgentProfileSettings(page: Page): Promise<void> {
const serverId = getServerId();
await gotoAppShell(page);
await page.getByRole("button", { name: "Open menu", exact: true }).click();
const settingsButton = page.locator('[data-testid="sidebar-settings"]:visible').first();
await expect(settingsButton).toBeVisible({ timeout: 30_000 });
await settingsButton.click();
await expect(page).toHaveURL(/\/settings(?:\?|$)/, { timeout: 30_000 });
await page.getByRole("button", { name: "Agent profiles", exact: true }).click();
await expectAppRoute(page, buildSettingsHostSectionRoute(serverId, "agent-profiles"));
await expect(page.getByTestId("agent-profiles-card")).toBeVisible({ timeout: 30_000 });
}
@@ -156,7 +170,9 @@ export async function expectNoAgentProfiles(page: Page): Promise<void> {
// ─── Settings: the profile list ────────────────────────────────────────────
export function agentProfileRow(page: Page, name: string): Locator {
return page.locator('[data-testid^="agent-profile-row-"]').filter({ hasText: name });
return page
.locator('[data-testid^="agent-profile-row-"]')
.filter({ has: page.getByText(name, { exact: true }) });
}
export async function expectAgentProfile(
@@ -165,7 +181,9 @@ export async function expectAgentProfile(
): Promise<void> {
const row = agentProfileRow(page, expected.name);
await expect(row).toBeVisible({ timeout: 30_000 });
await expect(row.getByText(expected.tags.join(" · "), { exact: true })).toBeVisible();
for (const tag of expected.tags) {
await expect(row).toContainText(tag);
}
if (expected.notes !== undefined) {
await expect(row.getByText(expected.notes, { exact: true })).toBeVisible();
}
@@ -177,7 +195,7 @@ export async function expectAgentProfileTagsGone(
): Promise<void> {
const row = agentProfileRow(page, input.name);
for (const tag of input.tags) {
await expect(row.getByText(tag, { exact: true })).toHaveCount(0);
await expect(row).not.toContainText(tag);
}
}
@@ -196,12 +214,22 @@ export async function expectAgentProfileOrder(page: Page, names: string[]): Prom
.toEqual(names);
}
async function openRowActionMenu(page: Page, name: string): Promise<void> {
const row = agentProfileRow(page, name);
await row.hover();
const trigger = row.locator('[data-testid^="agent-profile-menu-"]');
await expect(trigger).toBeVisible({ timeout: 15_000 });
await trigger.click();
}
export async function moveAgentProfileUp(page: Page, name: string): Promise<void> {
await agentProfileRow(page, name).getByRole("button", { name: "Move up", exact: true }).click();
await openRowActionMenu(page, name);
await page.getByRole("menuitem", { name: "Move up", exact: true }).click();
}
export async function moveAgentProfileDown(page: Page, name: string): Promise<void> {
await agentProfileRow(page, name).getByRole("button", { name: "Move down", exact: true }).click();
await openRowActionMenu(page, name);
await page.getByRole("menuitem", { name: "Move down", exact: true }).click();
}
/**
@@ -215,12 +243,13 @@ export async function removeAgentProfile(page: Page, name: string): Promise<void
await dialog.accept();
return message;
});
await agentProfileRow(page, name).getByRole("button", { name: "Remove", exact: true }).click();
await openRowActionMenu(page, name);
await page.getByRole("menuitem", { name: "Remove", exact: true }).click();
expect(await dialogMessage).toContain(`Remove "${name}"?`);
await expect(agentProfileRow(page, name)).toHaveCount(0, { timeout: 30_000 });
}
// ─── Settings: the edit modal ──────────────────────────────────────────────
// ─── Settings: the inspector drawer / edit sheet ───────────────────────────
export interface AgentProfileDraft {
name?: string;
@@ -228,65 +257,110 @@ export interface AgentProfileDraft {
model?: string;
thinking?: string;
mode?: string;
systemPrompt?: string;
notes?: string;
}
function editModal(page: Page): Locator {
return page.getByTestId("agent-profile-edit-modal");
function editSurface(page: Page): Locator {
return page.locator(
'[data-testid="agent-profile-drawer"], [data-testid="agent-profile-edit-modal"]',
);
}
async function chooseSelectFieldOption(
page: Page,
input: { field: "provider" | "model" | "mode" | "thinking"; option: string },
input: { field: "model" | "mode" | "thinking"; option: string },
): Promise<void> {
await editModal(page).getByTestId(`agent-profile-${input.field}-trigger`).click();
await editSurface(page).getByTestId(`agent-profile-${input.field}-trigger`).click();
const option = page
.getByTestId("combobox-desktop-container")
.getByRole("button", { name: input.option, exact: true });
await expect(option).toBeVisible({ timeout: 30_000 });
await option.click();
await expect(
page.getByRole("button", { name: `${capitalize(input.field)} (${input.option})` }),
).toBeVisible({ timeout: 30_000 });
}
function capitalize(value: string): string {
return value.charAt(0).toUpperCase() + value.slice(1);
async function ensureCustomizeExpanded(surface: Locator): Promise<void> {
const toggle = surface.getByTestId("agent-profile-customize-toggle");
if ((await toggle.count()) > 0 && (await toggle.isVisible())) {
await toggle.click();
}
}
async function chooseProfileModel(
page: Page,
input: { provider?: string; model?: string },
): Promise<void> {
await editSurface(page).getByTestId("agent-profile-model-trigger").click();
const container = page.getByTestId("combobox-desktop-container");
await expect(container).toBeVisible({ timeout: 30_000 });
if (input.provider) {
const providerRow = container.getByRole("button", {
name: new RegExp(escapeForRegex(input.provider)),
});
if ((await providerRow.count()) > 0 && (await providerRow.first().isVisible())) {
await providerRow.first().click();
}
}
const targetLabel = input.model ?? input.provider;
if (targetLabel) {
const option = container
.getByRole("button", { name: new RegExp(escapeForRegex(targetLabel)) })
.first();
await expect(option).toBeVisible({ timeout: 30_000 });
await option.click();
}
}
async function fillAgentProfileForm(page: Page, draft: AgentProfileDraft): Promise<void> {
const modal = editModal(page);
const surface = editSurface(page);
// Model first: CombinedModelSelector sets provider + model and auto-suggests defaults.
if (draft.model !== undefined || draft.provider !== undefined) {
await chooseProfileModel(page, { provider: draft.provider, model: draft.model });
}
if (draft.name !== undefined) {
await modal.getByRole("textbox", { name: "Name", exact: true }).fill(draft.name);
await surface.getByRole("textbox", { name: "Name", exact: true }).fill(draft.name);
}
// Provider first: it resets every provider-scoped field below it.
if (draft.provider !== undefined) {
await chooseSelectFieldOption(page, { field: "provider", option: draft.provider });
}
// Thinking after model: thinking levels hang off the model, and switching the
// model drops a level the new one does not offer.
if (draft.model !== undefined) {
await chooseSelectFieldOption(page, { field: "model", option: draft.model });
}
if (draft.thinking !== undefined) {
await chooseSelectFieldOption(page, { field: "thinking", option: draft.thinking });
if (
draft.thinking !== undefined ||
draft.mode !== undefined ||
draft.systemPrompt !== undefined ||
draft.notes !== undefined
) {
await ensureCustomizeExpanded(surface);
}
if (draft.mode !== undefined) {
await chooseSelectFieldOption(page, { field: "mode", option: draft.mode });
}
if (draft.thinking !== undefined) {
const thinkingContainer = surface.getByTestId("agent-profile-thinking-field");
const segmentButton = thinkingContainer.getByRole("button", {
name: draft.thinking,
exact: true,
});
if ((await segmentButton.count()) > 0) {
await segmentButton.click();
} else {
await chooseSelectFieldOption(page, { field: "thinking", option: draft.thinking });
}
}
if (draft.systemPrompt !== undefined) {
await surface
.getByRole("textbox", { name: "System prompt", exact: true })
.fill(draft.systemPrompt);
}
if (draft.notes !== undefined) {
await modal.getByRole("textbox", { name: "When to use", exact: true }).fill(draft.notes);
await surface.getByRole("textbox", { name: "When to use", exact: true }).fill(draft.notes);
}
}
async function saveAgentProfile(page: Page): Promise<void> {
await editModal(page).getByRole("button", { name: "Save", exact: true }).click();
await expect(editModal(page)).toHaveCount(0, { timeout: 30_000 });
await page.getByTestId("agent-profile-save-button").click();
await expect(editSurface(page)).toHaveCount(0, { timeout: 30_000 });
}
export async function createAgentProfile(page: Page, draft: AgentProfileDraft): Promise<void> {
await page.getByRole("button", { name: "Add agent profile", exact: true }).click();
await expect(editModal(page)).toBeVisible({ timeout: 30_000 });
await page.getByTestId("agent-profiles-add-button").click();
await expect(editSurface(page)).toBeVisible({ timeout: 30_000 });
await fillAgentProfileForm(page, draft);
await saveAgentProfile(page);
}
@@ -299,7 +373,7 @@ export async function createAgentProfileFromEmptyState(
.getByTestId("agent-profiles-card")
.getByRole("button", { name: "New profile", exact: true })
.click();
await expect(editModal(page)).toBeVisible({ timeout: 30_000 });
await expect(editSurface(page)).toBeVisible({ timeout: 30_000 });
await fillAgentProfileForm(page, draft);
await saveAgentProfile(page);
}
@@ -309,46 +383,196 @@ export async function editAgentProfile(
name: string,
changes: AgentProfileDraft,
): Promise<void> {
await agentProfileRow(page, name)
.getByRole("button", { name: "Edit profile", exact: true })
.click();
await expect(editModal(page)).toBeVisible({ timeout: 30_000 });
await agentProfileRow(page, name).click();
await expect(editSurface(page)).toBeVisible({ timeout: 30_000 });
await fillAgentProfileForm(page, changes);
await saveAgentProfile(page);
}
/** Opens the modal for a profile purely to read back what it stored. */
export async function openAgentProfileEditor(page: Page, name: string): Promise<void> {
await agentProfileRow(page, name).click();
await expect(editSurface(page)).toBeVisible({ timeout: 30_000 });
}
export async function openCreateAgentProfileEditor(page: Page): Promise<void> {
await page.getByTestId("agent-profiles-add-button").click();
await expect(editSurface(page)).toBeVisible({ timeout: 30_000 });
}
export async function fillAgentProfileName(page: Page, name: string): Promise<void> {
await page.getByRole("textbox", { name: "Name", exact: true }).fill(name);
}
export async function expectAgentProfileNameDraft(page: Page, name: string): Promise<void> {
await expect(page.getByRole("textbox", { name: "Name", exact: true })).toHaveValue(name);
}
export async function toggleAgentProfileCustomize(page: Page): Promise<void> {
await page.getByTestId("agent-profile-customize-toggle").click();
}
export async function fillAgentProfileNotes(page: Page, notes: string): Promise<void> {
await page.getByRole("textbox", { name: "When to use", exact: true }).fill(notes);
}
export async function expectAgentProfileNotesDraft(page: Page, notes: string): Promise<void> {
await expect(page.getByRole("textbox", { name: "When to use", exact: true })).toHaveValue(notes);
}
export async function saveOpenAgentProfile(page: Page): Promise<void> {
await saveAgentProfile(page);
}
export async function duplicateOpenAgentProfileWithConfirm(
page: Page,
decision: "accept" | "dismiss",
): Promise<void> {
const dialogMessage = page.waitForEvent("dialog").then(async (dialog) => {
const message = dialog.message();
if (decision === "accept") {
await dialog.accept();
} else {
await dialog.dismiss();
}
return message;
});
await page.getByTestId("agent-profile-drawer-more").click();
await page.getByTestId("agent-profile-drawer-duplicate").click();
expect(await dialogMessage).toMatch(/discard|unsaved/i);
}
export async function openEditProfileFromModelRow(
page: Page,
input: { provider: string; modelId: string },
): Promise<void> {
const row = modelRow(page, input);
await row.hover();
const editButton = pickerViewport(page).getByTestId(
`model-edit-profile-${input.provider}-${input.modelId}`,
);
await expect(editButton).toBeVisible({ timeout: 30_000 });
await editButton.click();
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible({ timeout: 30_000 });
}
export async function removeOpenModalAgentProfileWithConfirm(
page: Page,
decision: "accept" | "dismiss",
): Promise<void> {
const dialogMessage = page.waitForEvent("dialog").then(async (dialog) => {
const message = dialog.message();
if (decision === "accept") {
await dialog.accept();
} else {
await dialog.dismiss();
}
return message;
});
await page.getByTestId("agent-profile-modal-remove-button").click();
expect(await dialogMessage).toMatch(/remove/i);
}
export async function switchSettingsSectionWithConfirm(
page: Page,
sectionName: string,
decision: "accept" | "dismiss",
): Promise<void> {
const dialogMessage = page.waitForEvent("dialog").then(async (dialog) => {
const message = dialog.message();
if (decision === "accept") {
await dialog.accept();
} else {
await dialog.dismiss();
}
return message;
});
await page.getByRole("button", { name: sectionName, exact: true }).click();
expect(await dialogMessage).toMatch(/discard|unsaved/i);
}
export async function browserBackWithConfirm(
page: Page,
decision: "accept" | "dismiss",
): Promise<void> {
const dialogMessage = page.waitForEvent("dialog").then(async (dialog) => {
const message = dialog.message();
if (decision === "accept") {
await dialog.accept();
} else {
await dialog.dismiss();
}
return message;
});
await page.goBack();
expect(await dialogMessage).toMatch(/discard|unsaved/i);
}
export async function browserHistoryJumpWithConfirm(
page: Page,
delta: number,
decision: "accept" | "dismiss",
): Promise<void> {
const dialogMessage = page.waitForEvent("dialog").then(async (dialog) => {
const message = dialog.message();
if (decision === "accept") {
await dialog.accept();
} else {
await dialog.dismiss();
}
return message;
});
await page.evaluate((step) => window.history.go(step), delta);
expect(await dialogMessage).toMatch(/discard|unsaved/i);
}
/** Opens the inspector for a profile purely to read back what it stored. */
export async function expectAgentProfileForm(
page: Page,
name: string,
expected: { provider?: string; model?: string; mode?: string; notes?: string },
expected: {
provider?: string;
model?: string;
mode?: string;
systemPrompt?: string;
notes?: string;
},
): Promise<void> {
await agentProfileRow(page, name)
.getByRole("button", { name: "Edit profile", exact: true })
.click();
const modal = editModal(page);
await expect(modal).toBeVisible({ timeout: 30_000 });
await expect(modal.getByRole("textbox", { name: "Name", exact: true })).toHaveValue(name);
const notesHint = modal.getByTestId("agent-profile-notes-field-hint");
await expect(notesHint).toHaveText(
"Helps agents choose this profile when starting another agent.",
);
await agentProfileRow(page, name).click();
const surface = editSurface(page);
await expect(surface).toBeVisible({ timeout: 30_000 });
await expect(surface.getByRole("textbox", { name: "Name", exact: true })).toHaveValue(name);
const systemPromptHint = surface.getByTestId("agent-profile-system-prompt-field-hint");
await expect(systemPromptHint).toHaveText("Applies to new agents only");
const notesHint = surface.getByTestId("agent-profile-notes-field-hint");
await expect(notesHint).toHaveText("Tells agents when to pick this profile");
expect(await notesHint.evaluate((element) => getComputedStyle(element).webkitLineClamp)).not.toBe(
"1",
);
for (const [field, value] of Object.entries(expected)) {
if (field === "notes") {
await expect(modal.getByRole("textbox", { name: "When to use", exact: true })).toHaveValue(
value,
);
continue;
}
await expect(
modal.getByRole("button", { name: `${capitalize(field)} (${value})` }),
).toBeVisible({ timeout: 30_000 });
if (expected.model) {
await expect(surface.getByTestId("agent-profile-model-trigger")).toContainText(expected.model);
} else if (expected.provider) {
await expect(surface.getByTestId("agent-profile-model-trigger")).toContainText(
expected.provider,
);
}
await modal.getByRole("button", { name: "Cancel", exact: true }).click();
await expect(editModal(page)).toHaveCount(0, { timeout: 30_000 });
if (expected.provider) {
await expect(surface).toContainText(expected.provider);
}
if (expected.mode) {
await expect(surface.getByTestId("agent-profile-mode-trigger")).toContainText(expected.mode);
}
if (expected.systemPrompt !== undefined) {
await expect(surface.getByRole("textbox", { name: "System prompt", exact: true })).toHaveValue(
expected.systemPrompt,
);
}
if (expected.notes !== undefined) {
await expect(surface.getByRole("textbox", { name: "When to use", exact: true })).toHaveValue(
expected.notes,
);
}
await surface.getByRole("button", { name: "Cancel", exact: true }).click();
await expect(editSurface(page)).toHaveCount(0, { timeout: 30_000 });
}
// ─── The model picker ──────────────────────────────────────────────────────
@@ -449,6 +673,41 @@ async function boxTop(locator: Locator): Promise<number> {
return box.y;
}
export async function searchModelPicker(page: Page, query: string): Promise<void> {
await pickerViewport(page).getByTestId("model-search-input").fill(query);
}
/** A search lists matching profiles first, then the matching models under their own heading. */
export async function expectProfileSearchResult(
page: Page,
input: { name: string; model?: { provider: string; modelId: string } },
): Promise<void> {
const viewport = pickerViewport(page);
const row = profilePickerRow(page, input.name);
await expect(row).toBeVisible({ timeout: 30_000 });
if (!input.model) {
await expect(viewport.getByText("Models", { exact: true })).toHaveCount(0);
return;
}
const matchedModel = modelRow(page, input.model);
await expect(viewport.getByText("Models", { exact: true })).toBeVisible();
await expect(matchedModel).toBeVisible();
expect(await boxTop(row)).toBeLessThan(await boxTop(matchedModel));
}
/** Wheel-scrolls the picker the way a pointer user would until the profile row is on screen. */
export async function expectProfileReachableByScrolling(page: Page, name: string): Promise<void> {
const row = profilePickerRow(page, name);
await expect(row).toBeAttached({ timeout: 30_000 });
const box = await pickerViewport(page).boundingBox();
if (!box) throw new Error("model picker has no layout box");
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
await expect(async () => {
await page.mouse.wheel(0, 400);
await expect(row).toBeInViewport({ timeout: 500 });
}).toPass({ timeout: 15_000 });
}
export async function applyProfileFromPicker(page: Page, name: string): Promise<void> {
await profilePickerRow(page, name).click();
await expect(pickerViewport(page)).toHaveCount(0, { timeout: 30_000 });
@@ -500,7 +759,10 @@ export async function expectModelRowProfileActionBesideRow(
await expect(row.getByRole("button")).toHaveCount(0);
}
/** The hover-revealed plus on an unprofiled model row opens a seeded profile form. */
/**
* The hover-revealed plus on an unprofiled model row saves the profile,
* selects the model immediately, closes the picker, and surfaces an Edit / Undo toast.
*/
export async function expectCreateProfileFromModelRow(
page: Page,
input: { provider: string; modelId: string; modelLabel: string },
@@ -513,14 +775,14 @@ export async function expectCreateProfileFromModelRow(
await modelRow(page, input).hover();
await expect(action).toHaveCSS("pointer-events", "auto");
await action.click();
const modal = editModal(page);
await expect(modal).toBeVisible({ timeout: 30_000 });
await expect(modal.getByRole("textbox", { name: "Name", exact: true })).toHaveValue(
input.modelLabel,
);
await expect(modal.getByRole("button", { name: `Model (${input.modelLabel})` })).toBeVisible();
await modal.getByRole("button", { name: "Cancel", exact: true }).click();
await expect(modal).toHaveCount(0, { timeout: 30_000 });
const toast = page.getByTestId("model-profile-created-toast");
await expect(toast).toBeVisible({ timeout: 30_000 });
await expect(toast).toContainText(input.modelLabel);
// Undo removes the newly saved profile from the toast.
await toast.getByTestId("model-profile-created-undo").click();
await expect(toast).toHaveCount(0, { timeout: 30_000 });
}
export async function selectModelRow(
@@ -530,6 +792,44 @@ export async function selectModelRow(
await modelRow(page, input).click();
}
/**
* Opens a provider on a slow machine and clicks a model row before the list has
* finished laying out, holding the button as long as a person does.
*/
export async function clickModelRowWhileProviderOpens(
page: Page,
input: { provider: string; modelLabel: string },
): Promise<void> {
const viewport = pickerViewport(page);
await drillIntoProvider(page, input.provider);
const rowBox = await viewport.getByText(input.modelLabel, { exact: true }).boundingBox();
if (!rowBox) throw new Error(`Model row ${input.modelLabel} has no box`);
await viewport.getByRole("button", { name: "Back", exact: true }).click();
const cdp = await page.context().newCDPSession(page);
await cdp.send("Emulation.setCPUThrottlingRate", { rate: 10 });
try {
await drillIntoProvider(page, input.provider);
await page.mouse.click(rowBox.x + rowBox.width / 2, rowBox.y + rowBox.height / 2, {
delay: 150,
});
} finally {
await cdp.send("Emulation.setCPUThrottlingRate", { rate: 1 });
await cdp.detach();
}
}
/** Scrolling a provider's model list with the wheel leaves typing and Enter in the search field. */
export async function expectModelListScrollKeepsSearchFocused(page: Page): Promise<void> {
const search = pickerViewport(page).getByTestId("model-search-input");
const list = pickerViewport(page).getByTestId("compact-model-list");
await expect(search).toBeFocused();
await list.hover();
await page.mouse.wheel(0, 200);
await expect.poll(() => list.evaluate((element) => element.scrollTop)).toBeGreaterThan(0);
await expect(search).toBeFocused();
}
// ─── Cross-provider model search ───────────────────────────────────────────
export async function searchAllModels(page: Page, query: string): Promise<void> {
@@ -134,9 +134,13 @@ export async function openAgentSkillsSettings(
host: "127.0.0.1",
port: sandbox.daemon.port,
});
if (options.compact) await goBackInSettings(page);
if (options.compact) {
// Adding a host opens its client host detail page; back once goes to Hosts, back again returns to the Settings root.
await goBackInSettings(page);
await goBackInSettings(page);
}
await selectSettingsHost(page, sandbox.daemon.serverId);
await openHostSection(page, sandbox.daemon.serverId, "agents");
await openHostSection(page, sandbox.daemon.serverId, "tools");
await expect(page.getByTestId("host-agent-skills-card")).toBeVisible();
}
@@ -16,7 +16,7 @@ export async function openDaemonOverview(page: Page, daemon: IsolatedHostDaemon)
await page.reload();
await openSettings(page);
await openSettingsHost(page, daemon.serverId);
await openHostSection(page, daemon.serverId, "host");
await openHostSection(page, daemon.serverId, "daemon");
}
export async function restartDaemonInSettings(
+12 -4
View File
@@ -2,7 +2,7 @@ import { expect, type Page } from "@playwright/test";
import { identityForeground, type IdentityColorName } from "@/styles/identity-colors";
import { openSettings } from "./app";
import { buildSeededHost } from "./daemon-registry";
import { clickSettingsBackToWorkspace, openHostSection, selectSettingsHost } from "./settings";
import { clickSettingsBackToWorkspace, openClientHostSettings } from "./settings";
const REGISTRY_KEY = "@paseo:daemon-registry";
const SEED_NONCE_KEY = "@paseo:e2e-seed-nonce";
@@ -132,7 +132,10 @@ export async function waitForConnectedHost(
): Promise<void> {
await page.getByTestId("sidebar-hosts-trigger").click();
const host = page.getByTestId(`sidebar-host-row-${input.serverId}`);
await expect(host).toContainText(input.endpoint, { timeout: 30_000 });
const escapedEndpoint = input.endpoint.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
// Local daemons render "Local" without repeating localhost:<port>; remote hosts render the endpoint.
await expect(host).toContainText(new RegExp(`${escapedEndpoint}|Local`), { timeout: 30_000 });
await expect(host).toContainText(/\d+(?:\.\d+)?(?:µs|ms|s)/, { timeout: 30_000 });
await page.keyboard.press("Escape");
await expect(host).not.toBeVisible();
}
@@ -167,8 +170,7 @@ export async function selectAllHostsFilter(page: Page): Promise<void> {
export async function openHostAppearanceSettings(page: Page, serverId: string): Promise<void> {
await openSettings(page);
await selectSettingsHost(page, serverId);
await openHostSection(page, serverId, "host");
await openClientHostSettings(page, serverId);
await expect(page.getByTestId("host-appearance-preview")).toBeVisible({ timeout: 15_000 });
}
@@ -195,6 +197,12 @@ export async function chooseHostColor(page: Page, colorName: string): Promise<vo
await expect(page.getByRole("button", { name: `Color, ${colorName}` })).toBeVisible();
}
export async function chooseHostIcon(page: Page, iconName: string): Promise<void> {
await page.getByTestId("host-appearance-icon").click();
await page.getByRole("menuitem", { name: iconName, exact: true }).click();
await expect(page.getByRole("button", { name: `Icon, ${iconName}` })).toBeVisible();
}
export async function chooseHostBadgeDisplay(
page: Page,
option: "Name" | "Icon only" | "Hidden",
@@ -137,13 +137,22 @@ export class ImportSessionFlow {
await this.expectProviderError(label);
await expect(this.page.getByRole("progressbar")).toHaveCount(0);
}
async importSession(id: string) {
async startImport(id: string) {
await this.revealSession(id);
await this.page.getByTestId(rowTestId(id)).click();
}
async importSession(id: string) {
await this.startImport(id);
await this.expectClosed();
}
async expectClosed() {
await expect(this.page.getByTestId("import-session-sheet")).toHaveCount(0, {
timeout: 30_000,
});
}
async expectSessionUnavailable(id: string) {
await expect(this.page.getByTestId(rowTestId(id))).toHaveCount(0);
}
async expectTranscript(userText: string, assistantText: string) {
await expect(this.page.getByTestId("user-message").filter({ visible: true })).toContainText(
userText,
@@ -169,6 +178,13 @@ export class ImportSessionFlow {
await this.page.getByRole("button", { name: "Close", exact: true }).last().click();
await expect(this.page.getByTestId("import-session-sheet")).toHaveCount(0);
}
async chooseHostForImport(hostLabel: string) {
const panel = await openCommandCenter(this.page);
await panel.getByTestId("command-center-input").fill("import");
await panel.getByText("Import session", { exact: true }).click();
await this.page.getByRole("dialog").getByRole("button", { name: hostLabel }).click();
await this.expectScope(`Sessions on ${hostLabel}`);
}
async expectCommandCenterMatch() {
const panel = await openCommandCenter(this.page);
await panel.getByTestId("command-center-input").fill("import");
@@ -1,4 +1,5 @@
import { promisify } from "node:util";
import { once } from "node:events";
import {
spawn,
execFile,
@@ -11,6 +12,7 @@ import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
import net from "node:net";
import { tmpdir } from "node:os";
import path from "node:path";
import { WebSocket } from "ws";
import { withDisabledE2ESpeechEnv } from "./speech-env";
import { killProcessTree, spawnTsx } from "./spawn-node";
@@ -64,12 +66,14 @@ export async function getAvailableHostDaemonPort(): Promise<number> {
* Resolves once this daemon answers on its port. An open TCP port is not
* enough: the port is released before the daemon binds it, and whatever takes
* it in between also accepts connections while the daemon exits with
* EADDRINUSE. Only the daemon's own status reports its server id.
* EADDRINUSE. Only the daemon's own status reports its server id. Published
* daemons can serve status before they accept WebSocket upgrades.
*/
async function waitForServer(
port: number,
child: ChildProcess,
identity: { serverId: string; paseoHome: string },
published: boolean,
): Promise<void> {
const deadline = Date.now() + 90_000;
let lastError: unknown = null;
@@ -82,7 +86,10 @@ async function waitForServer(
}
try {
const serverId = await readServerId(port, identity.paseoHome);
if (serverId === identity.serverId) return;
if (serverId === identity.serverId) {
if (published) await checkWebSocketUpgrade(port);
return;
}
lastError = new Error(`Port ${port} is served by ${serverId}, not ${identity.serverId}`);
} catch (error) {
lastError = error;
@@ -97,6 +104,12 @@ async function waitForServer(
);
}
async function checkWebSocketUpgrade(port: number): Promise<void> {
const socket = new WebSocket(`ws://127.0.0.1:${port}/ws`, { handshakeTimeout: 1_000 });
await once(socket, "open");
socket.close();
}
/**
* Reads the server id from the daemon's status route. The route needs a bearer
* on a password-protected daemon; the daemon accepts the local credential it
@@ -246,7 +259,7 @@ export async function startIsolatedHostDaemon(
});
try {
await waitForServer(port, spawned, { serverId, paseoHome });
await waitForServer(port, spawned, { serverId, paseoHome }, Boolean(publishedPackageRoot));
return spawned;
} catch (error) {
throw new Error(
@@ -243,6 +243,14 @@ export async function openNewWorkspaceProjectPickerWithShortcut(
await expect(searchInput).toBeFocused();
}
export async function chooseProjectWithKeyboard(page: Page, projectName: string): Promise<void> {
const searchInput = page.getByPlaceholder("Search projects");
await expect(searchInput).toBeFocused({ timeout: 30_000 });
await page.keyboard.type(projectName);
await page.keyboard.press("Enter");
await expect(searchInput).toBeHidden({ timeout: 10_000 });
}
export async function expectNewWorkspaceProjectSelected(
page: Page,
projectDisplayName: string,
@@ -0,0 +1,269 @@
import { expect, type Page } from "@playwright/test";
import { openSettingsSection } from "./settings";
export interface RecordedBrowserNotification {
title: string;
body: string | null;
data: Record<string, unknown> | null;
}
type NotificationSwitchName =
| "Enable notifications"
| "Agent needs permission"
| "Agent errored"
| "Agent finished"
| "Terminal needs input"
| "Terminal finished"
| "Plugin notifications";
export async function installBrowserNotificationRecorder(page: Page): Promise<void> {
await page.addInitScript(() => {
const recorded: RecordedBrowserNotification[] = [];
const instances: Array<{ triggerClick: () => void }> = [];
const win = window as unknown as {
__paseoRecordedNotifications?: RecordedBrowserNotification[];
__paseoNotificationInstances?: Array<{ triggerClick: () => void }>;
};
win.__paseoRecordedNotifications = recorded;
win.__paseoNotificationInstances = instances;
class StubBrowserNotification {
static permission: NotificationPermission = "granted";
static async requestPermission(): Promise<NotificationPermission> {
return "granted";
}
title: string;
body: string | null;
data: Record<string, unknown> | null;
private readonly clickListeners: Array<() => void> = [];
constructor(
title: string,
options?: { body?: string; data?: Record<string, unknown>; icon?: string },
) {
this.title = title;
this.body = options?.body ?? null;
this.data = options?.data ?? null;
recorded.push({
title: this.title,
body: this.body,
data: this.data,
});
instances.push({
triggerClick: () => {
for (const listener of this.clickListeners) {
listener();
}
},
});
}
addEventListener(type: string, listener: () => void): void {
if (type === "click" && typeof listener === "function") {
this.clickListeners.push(listener);
}
}
close(): void {}
}
Object.defineProperty(window, "Notification", {
configurable: true,
writable: true,
value: StubBrowserNotification,
});
});
}
export async function readRecordedBrowserNotifications(
page: Page,
): Promise<RecordedBrowserNotification[]> {
return page.evaluate(() => {
const win = window as unknown as {
__paseoRecordedNotifications?: RecordedBrowserNotification[];
};
return [...(win.__paseoRecordedNotifications ?? [])];
});
}
export async function clearRecordedBrowserNotifications(page: Page): Promise<void> {
await page.evaluate(() => {
const win = window as unknown as {
__paseoRecordedNotifications?: RecordedBrowserNotification[];
__paseoNotificationInstances?: Array<{ triggerClick: () => void }>;
};
if (win.__paseoRecordedNotifications) {
win.__paseoRecordedNotifications.length = 0;
}
if (win.__paseoNotificationInstances) {
win.__paseoNotificationInstances.length = 0;
}
});
}
export async function clickRecordedBrowserNotification(page: Page, index = 0): Promise<void> {
await page.evaluate((targetIndex) => {
const win = window as unknown as {
__paseoNotificationInstances?: Array<{ triggerClick: () => void }>;
};
const instance = win.__paseoNotificationInstances?.[targetIndex];
if (!instance) {
throw new Error(`No recorded browser notification at index ${targetIndex}`);
}
instance.triggerClick();
}, index);
}
export async function expectRecordedPluginNotifications(
page: Page,
expected: ReadonlyArray<{
pluginId: string;
title: string;
body: string;
notificationId?: string;
}>,
): Promise<void> {
await expect
.poll(async () => (await readRecordedBrowserNotifications(page)).length)
.toBe(expected.length);
const notifications = await readRecordedBrowserNotifications(page);
const includeId = expected.some((item) => item.notificationId !== undefined);
expect(
notifications.map((entry) =>
includeId
? {
pluginId: entry.data?.pluginId,
title: entry.title,
body: entry.body,
notificationId: entry.data?.notificationId,
}
: {
pluginId: entry.data?.pluginId,
title: entry.title,
body: entry.body,
},
),
).toEqual(expected);
}
export async function setPluginNotificationSwitch(
page: Page,
pluginLabel: string,
checked: boolean,
): Promise<void> {
const toggle = page.getByRole("switch", { name: pluginLabel, exact: true });
await expect(toggle).toBeVisible();
await expect(toggle).toBeEnabled();
await expect(toggle).toHaveAttribute("aria-checked", String(!checked));
await toggle.click();
await expect(toggle).toHaveAttribute("aria-checked", String(checked));
}
export async function expectRecordedAgentNotifications(
page: Page,
expected: ReadonlyArray<{ agentId: string; reason: string }>,
): Promise<void> {
await expect
.poll(async () => (await readRecordedBrowserNotifications(page)).length)
.toBe(expected.length);
const notifications = await readRecordedBrowserNotifications(page);
expect(
notifications.map((entry) => ({
agentId: entry.data?.agentId,
reason: entry.data?.reason,
})),
).toEqual(expected);
}
export async function openNotificationSettings(page: Page): Promise<void> {
await openSettingsSection(page, "notifications");
await expect(
page.getByRole("switch", { name: "Enable notifications", exact: true }),
).toBeVisible();
}
export function notificationSwitch(page: Page, name: NotificationSwitchName) {
return page.getByRole("switch", { name, exact: true });
}
export async function expectNotificationSwitchState(
page: Page,
name: NotificationSwitchName,
expected: { checked: boolean; disabled?: boolean },
): Promise<void> {
const toggle = notificationSwitch(page, name);
await expect(toggle).toBeVisible();
await expect(toggle).toHaveAttribute("aria-checked", String(expected.checked));
if (expected.disabled) {
await expect(toggle).toBeDisabled();
} else {
await expect(toggle).toBeEnabled();
}
}
export async function expectDefaultNotificationSettings(page: Page): Promise<void> {
await expectNotificationSwitchState(page, "Enable notifications", {
checked: true,
disabled: false,
});
await expectNotificationSwitchState(page, "Agent needs permission", {
checked: true,
disabled: false,
});
await expectNotificationSwitchState(page, "Agent errored", {
checked: true,
disabled: false,
});
await expectNotificationSwitchState(page, "Agent finished", {
checked: false,
disabled: false,
});
await expectNotificationSwitchState(page, "Terminal needs input", {
checked: true,
disabled: false,
});
await expectNotificationSwitchState(page, "Terminal finished", {
checked: false,
disabled: false,
});
await expectNotificationSwitchState(page, "Plugin notifications", {
checked: true,
disabled: false,
});
}
export async function setNotificationSwitch(
page: Page,
name: NotificationSwitchName,
checked: boolean,
): Promise<void> {
const toggle = notificationSwitch(page, name);
await expect(toggle).toBeEnabled();
await expect(toggle).toHaveAttribute("aria-checked", String(!checked));
await toggle.click();
await expect(toggle).toHaveAttribute("aria-checked", String(checked));
}
export async function expectNotificationSubControlsDisabled(
page: Page,
disabled: boolean,
): Promise<void> {
const subSwitches: NotificationSwitchName[] = [
"Agent needs permission",
"Agent errored",
"Agent finished",
"Terminal needs input",
"Terminal finished",
"Plugin notifications",
];
for (const name of subSwitches) {
const toggle = notificationSwitch(page, name);
if (disabled) {
await expect(toggle).toBeDisabled();
} else {
await expect(toggle).toBeEnabled();
}
}
}
+6 -17
View File
@@ -4,7 +4,7 @@ import { tmpdir } from "node:os";
import path from "node:path";
import { expect, type Locator, type Page } from "@playwright/test";
import type { DaemonClient as InternalDaemonClient } from "@getpaseo/client/internal/daemon-client";
import { addProjectFlow, addProjectFlowInput, chooseAddProjectMethod } from "./add-project-flow";
import { addProjectFlow, addProjectFlowInput, expectAddProjectTab } from "./add-project-flow";
import { connectDaemonClient } from "./daemon-client-loader";
import { buildCreateAgentPreferences, buildSeededHost } from "./daemon-registry";
import { startIsolatedHostDaemon, type IsolatedHostDaemonOptions } from "./isolated-host-daemon";
@@ -122,7 +122,7 @@ export async function skipSetup(page: Page): Promise<void> {
export async function addProjectFromSetup(page: Page, projectPath: string): Promise<void> {
await setupModal(page).getByRole("button", { name: "Add project", exact: true }).click();
await expect(addProjectFlow(page)).toBeVisible({ timeout: 30_000 });
await chooseAddProjectMethod(page, "directory-search");
await expectAddProjectTab(page, "existing");
await addProjectFlowInput(page).fill(projectPath);
await page.keyboard.press("Enter");
await expect(addProjectFlow(page)).toHaveCount(0, { timeout: 30_000 });
@@ -161,7 +161,7 @@ export async function finishSetup(page: Page): Promise<void> {
/** Opens the Phone step's Relay row: the pair device modal, over setup. */
export async function openRelayPairingFromSetup(page: Page): Promise<Locator> {
await setupModal(page).getByRole("button", { name: "Relay", exact: true }).click();
const pairing = page.getByTestId("onboarding-pair-device-card");
const pairing = page.getByTestId("devices-relay-pairing");
await expect(pairing).toBeVisible();
return pairing;
}
@@ -171,20 +171,9 @@ export async function closeRelayPairing(pairing: Locator): Promise<void> {
await expect(pairing).toHaveCount(0);
}
/** Clicks the Phone step's Tailscale row and returns the docs page it opened. */
export async function openTailscaleDocsFromSetup(page: Page): Promise<string> {
await page
.context()
.route("https://paseo.sh/**", (route) =>
route.fulfill({ contentType: "text/html", body: "<title>Paseo docs</title>" }),
);
const popup = page.waitForEvent("popup");
await setupModal(page).getByRole("link", { name: "Tailscale, Docs", exact: true }).click();
const docs = await popup;
await docs.waitForLoadState("domcontentloaded");
const url = docs.url();
await docs.close();
return url;
export async function expectTailscaleSwitchDisabled(page: Page): Promise<void> {
const setup = setupModal(page);
await expect(setup.getByRole("switch", { name: "Tailscale", exact: true })).toBeDisabled();
}
export interface SetupHost {

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