Compare commits

...
Author SHA1 Message Date
Mohamed Boudra 72f1a82752 fix(app): expose unsaved plugin bypass disable state from approval store 2026-12-03 06:35:12 +01:00
Mohamed Boudra b8edaf9240 fix(app): surface and retry client plugin bypass persistence errors 2026-12-03 06:27:21 +01:00
Mohamed Boudra 5bac8d0657 chore(app): simplify General setup row copy 2026-12-03 06:27:21 +01:00
Mohamed Boudra 12cd83b7d0 feat(app): add General settings toggle to bypass client plugin approval 2026-12-03 06:27:21 +01:00
Mohamed Boudra 327230f6b6 test(desktop): wait deterministically for seeded plugin approval at startup 2026-12-03 06:27:21 +01:00
Mohamed Boudra 58e8caa47e fix(app): address plugin approval review findings and desktop E2E startup 2026-12-03 06:27:21 +01:00
Mohamed Boudra 81c597a178 test(app): approve client plugins via UI in browser E2E specs 2026-12-03 06:26:41 +01:00
Mohamed Boudra a7e0638d8c feat(app): require one-time approval before running client plugins
Add a per-host, per-plugin client execution consent model and sequential confirmation sheet before evaluating plugin client bundles.

- Enforce fail-closed execution approval inside PluginRegistry before runPluginClientBundle runs and hydrate stored decisions before catalog reconciliation.
- Queue multiple unreviewed client plugins sequentially in one persistent AdaptiveModalSheet with monotonic request IDs and steady layout geometry.
- Persist approved and declined decisions per (host, plugin) across reloads and reconnects, clear host trust on host removal or relay identity key replacement, and clear plugin decisions on uninstall.
- Surface blocked plugins in Settings -> Plugins and plugin surfaces so users can allow or block client execution on this device.
2026-12-03 06:26:21 +01:00
Xu Kang fb32ab924f fix(server): contain Codex app-server stdin errors (#11847) 2026-12-03 05:12:39 +00:00
Mohamed Boudra 183aea75aa Import session from New workspace creates a new workspace (#11845)
* feat: import from New workspace into a new workspace

Import session on the New workspace screen now creates a fresh workspace for
the session's directory instead of joining the workspace already open there.

import_agent_request gains an optional newWorkspace flag. The daemon creates a
directory workspace (inheriting a managed worktree's repository project) and
removes it again if the import fails. Requests without the flag keep the
existing find-or-create placement, and older daemons ignore the field.

* fix(server): keep a new import workspace in its directory's project

A new workspace for an imported session now joins the project of the workspace
already at that directory, so a session in an external git worktree stays under
its repository's project. Split the active and archived placement tests and drop
the component-mounting sheet test; the view-model and Playwright tests cover it.
2026-12-03 12:10:15 +07:00
Mohamed Boudra 142c880af9 Let horizontal scroll views keep sideways swipes from the mobile panels (#11841)
* fix(app): let horizontal scroll views keep swipes from the mobile panels

Outside a sheet, the shared ScrollView and FlatList rendered a plain React
Native scroller on iOS and Android. The panel pans on the page activated
first, so a sideways swipe on a plugin table or code block opened or closed
a side panel instead of scrolling. Only sheets wrapped horizontal scrollers
in a gesture that kept the touch.

Every native horizontal ScrollView and FlatList now runs under the
panel-aware Native gesture the composer track already used: it blocks the
provider's open and close pans and the nearest explorer close pan, and
disallows interruption so a sheet's pan cannot take a scrolling touch. A
sheet sits outside the panels provider, so the hook blocks no panel there.

Web keeps the plain React Native scroller: the browser scrolls an overflow
container itself and cancels the page's pointer stream.

* fix(app): give the root error screen its own gesture root

The error fallback replaces the app tree above the app's
GestureHandlerRootView. Its details now scroll sideways under a
GestureDetector, which RNGH rejects in native dev builds without a root
view above it, so the fallback threw instead of showing the error.

* fix(app): give every native modal its own gesture root

A React Native Modal is a separate window above the app's
GestureHandlerRootView. A plugin popover on wide layouts renders in one,
so a horizontal SDK ScrollView there mounted a GestureDetector with no
root view: RNGH throws in native dev builds, and on Android gestures in
that window are not recognized.

The shared Modal now wraps its native content in a GestureHandlerRootView,
so the combobox and attachment lightbox drop their own copies.
2026-12-03 11:59:14 +07:00
Mohamed Boudra ffe8f77b0f Stop hardcoding Paseo versions in the plugin skill (#11838)
* Stop hardcoding Paseo versions in the plugin skill and fix 0.18.3 doc notes

* Use 0.19.0 in the workspace layout example and its runtime test
2026-12-03 11:36:04 +07:00
Mohamed Boudra 25a3fba211 Show Logits as a Paseo sponsor on the website and READMEs (#11843)
* feat(website): add Logits as a company sponsor

Add Logits alongside Hoplite and Encore on paseo.sh and the four READMEs using the official on-light and on-dark SVGs and tagline. Tighten the homepage sponsors row gap and caption max-width so all three sponsors and the Become a sponsor invitation stay on one desktop row instead of stranding the button on a second row.

* feat(website): arrange sponsors in two columns on mobile

Use a 2-column grid with compact mobile logo heights (h-7) and captions on screens below sm across both the homepage Sponsors section and the footer/docs Sponsors band so all sponsors stay visible without tall single-column stacking, switching back to the desktop flex-wrap layout at sm and wider.
2026-12-03 11:07:50 +07:00
paseo-bot[bot]andMichael Wu 0910e25441 fix(server): release idle Codex runtimes after disconnect (#11839)
A disposed app-server cannot answer inventory requests. Let idle cleanup close the stale session through the usual lifecycle while keeping sessions that are reconnecting.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Michael Wu <michaelmwu@gmail.com>
2026-12-03 03:42:40 +00:00
paseo-bot[bot]andClaude Opus 5.5 661fd6a7a5 Start the dev daemon after the dependency watchers finish their first build (#11820)
* fix(server): start the dev daemon after the dependency watchers build

tsc --watch rewrites every dist file on its first build. The dev runner
started the daemon worker at the same time, so the worker could import a
half-written protocol module and exit with a missing-export SyntaxError.
The runner now waits for both watchers to report their first build.

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

* fix(server): keep the dev runner shape the supervision parity test checks

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

* test(cli): check the dev worker start against whole output lines in order

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 03:29:25 +00:00
Mohamed Boudra bcab3c7850 fix(desktop): deny browser webview permissions by default (#11837)
* fix(desktop): deny browser webview permissions by default

* fix(desktop): consolidate webview permission install and assert exact denial errors
2026-12-03 09:57:11 +07:00
Mohamed Boudra d59e2bd17c Use browser profiles on host-proxied desktop tabs (#11772)
* Let browser profiles work on host-proxied tabs

A browser tab's Electron partition is now the pair (route, profile).
Host-proxied tabs show the profile picker, and each profile on a host
gets its own persistent partition bound to that host's one SOCKS5 server
and tunnel. Clear, Remove, and startup pruning cover every route.

One module, browser-partition.ts, owns the partition names. The existing
local and host Default names are unchanged.

* Ignore inherited object keys when reading bound host profile partitions
2026-12-03 09:33:45 +07:00
Mohamed Boudra 08e26ebbec fix(app): steer when Send now is used with the queue send behavior (#11827) 2026-12-03 09:33:08 +07:00
KiritoXD a0c5522a71 fix(cli): allow model-only schedule updates (#11796) 2026-12-03 02:12:43 +00:00
paseo-bot[bot] 37c5f74586 fix(app): prevent middle-click tab closes from pasting (#11818)
Closing a tab restores terminal focus before Chromium pastes the Linux primary selection. Cancel the middle-button release on the tab so closing it cannot type into the terminal.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-03 00:12:43 +00:00
paseo-bot[bot]andDaniel JB Clark a7d2593744 Deliver approved answers to Pi permission prompts (#11814)
* fix(pi): honor selectedActionId on allow and steer user denial reasons

Two Pi extension UI permission bugs tracked in getpaseo/paseo#8326:

1. Allow with selectedActionId (or bare allow) cancelled the dialog:
   - Extract shared resolveAllowedExtensionUiAnswer and PiPermissionResponseError
     into providers/pi/extension-ui-answer.ts and use it across core agent.ts,
     pi-ask-user, and rpiv-ask-user-question.
   - Accept selectedActionId when it matches an offered option label, and throw
     a bounded, shell-safe error (without consuming the pending request) when an
     allow names no valid option.
   - Rethrow PiPermissionResponseError in PiExtensionHost.respondToPermission
     while preserving fault isolation for unexpected adapter errors.

2. Denial reasons (response.message) were discarded on deny:
   - Because Pi extension_ui_response { cancelled: true } has no reason field,
     steer user-supplied denial reasons (excluding fixed Paseo dismissal strings
     and interrupt denials) BEFORE sending the cancel reply while Pi is parked
     in tool execution.
   - Gate steering on a live agent loop (activeTurnStarted or activeToolCalls),
     clear activeToolCalls on turn boundaries/startTurn/interrupt/prompt-error/exit,
     bound the steer RPC with a 5 s timeout, cap steered reasons at 2048 chars
     with a provenance label, pre-register clientMessageId: null in
     pendingSteerSubmissions before awaiting steer, and wrap MCP agent callers
     in an agent-message envelope via optional internal callerAgentId/Title.

Closes getpaseo/paseo#8326

* fix(pi): preserve active tool calls and denial steering across autonomous startTurn

* Keep the Pi permission fix focused on approvals

Leave denial reason delivery for a separate decision about how Pi should receive it. Preserve the existing cancellation path and keep approval validation inside the Pi provider.

Co-authored-by: Daniel JB Clark <djbclark@gmail.com>

* Stabilize diff fallback and website search CI checks

---------

Co-authored-by: Daniel JB Clark <djbclark@gmail.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 23:43:03 +00:00
paseo-bot[bot] bb0a541338 fix(app): keep keys typed right after the Find shortcut (#11812)
React Native Web runs selectTextOnFocus in a timer after focus. Find
already selects its query when it takes focus, so the later timer
selected the keys typed in between and the next key replaced them.
Typing "a.b" right after Cmd+F gave ".b". This made chat-find
composer tests flaky on CI.

Select the query once when the widget mounts and drop
selectTextOnFocus. The chat-find test now presses the shortcut and
types in one task, which failed every time before the fix.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 21:46:05 +00:00
paseo-bot[bot] c37a407bc8 fix(claude): remove the terminal shortcut from Stop hook warnings (#11792)
The chat warning told users to open the Claude Code transcript with Ctrl+O. In Paseo on Linux, that shortcut opens Add project. Remove the terminal hint at the Claude notification boundary.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 21:12:50 +00:00
paseo-bot[bot] ef8de256ce fix(app): release replaced plugin installations (#11800)
The current plugin’s RPC closure kept the previous catalog alive after a reload. Create each plugin installation outside the catalog update scope so the previous installation can be collected.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 20:13:31 +00:00
KiritoXD 68a1cd9a33 fix(cli): resolve terminal workspaces beyond the first ten (#11799) 2026-12-02 20:13:09 +00:00
d4d8441f06 Preserve a follow-up draft while an earlier send settles (#11448)
* Preserve a follow-up draft while an earlier send settles

* Guard composer submission with the shared draft version

* Cover attachments added from Changes during a pending send

---------

Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 20:12:48 +00:00
515392cd7b fix(app): mount a web popover's content once per open (#11748)
* fix(app): mount a web popover's content once per open

An anchored menu surface renders off-screen until its anchor and content
are measured, then changed its key from "measuring" to "placed". The key
change remounted the surface and everything inside it, so a plugin
popover's Content mounted, unmounted and mounted again on every open:
effects and requests ran twice and the first mount's state was lost.

Web plays its entering animation through the Web Animations API when the
surface is placed, so the remount did nothing there. The key now stays
stable on web. Native still remounts, because Reanimated's `entering`
only runs on mount.

Fixes #9103

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

* docs(menus): only native remounts an anchored surface on placement

Web keeps the surface mounted and starts its entering animation when it is
placed, so a popover's content mounts once per open.

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

* ci: retrigger checks for the popover fix

* Wait for the desktop device menu before clicking a preset

---------

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] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 19:12:50 +00:00
paseo-bot[bot] 230037c03b test(app): keep the plugin-buttons still check polling when the subject remounts (#11801)
expectStill polled locator.screenshot() inside expect.poll. A screenshot of an
element that detaches while Playwright waits for it to be stable throws, and
expect.poll does not retry a callback that throws, so one remount of the
Workspace actions toolbar failed the test at once. Treat a detached subject as
not still yet and keep polling.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 18:50:01 +00:00
paseo-bot[bot] 0d9e960d10 fix(app): open outside folder links without trailing slashes (#11786)
Absolute Markdown paths skipped the directory probe and sent existing folders to the file viewer. Use the same host path as file preview so the directory check stays outside the workspace Files listing.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 17:12:55 +00:00
paseo-bot[bot]andClaude Opus 5.5 8d7676a5af Fix flaky OSC 11 query test that echoed the reply onto the capture line (#11773)
The capture script wrote the OSC 11 query before it put stdin in raw
mode. When the daemon's reply arrived first, the tty was still in
cooked mode with echo on, so it printed the reply as `^[]11;rgb:...`
on the same line as the capture. The test then counted two replies.
Put stdin in raw mode before the query, as a real program does.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 15:48:03 +00:00
Mohamed Boudra 56a88882d8 Stop completed agent turns from flashing back to running (#11764)
* fix(server,app): stop completed turns from flashing back to running

Session forwarded agent_state asynchronously through AgentUpdatesService while sending agent_stream synchronously. When a provider emitted usage_updated right before turn_completed (as ACP providers do on every prompt response carrying usage), agent_stream turn_completed overtook the queued running agent_update on the wire, and a slow workspace_update stretched the gap before the idle agent_update landed. On the client, TurnLiveness forgot the closed turnId on stream_close, so the lagging running snapshot re-opened the turn for a few frames.

Keep workspace broadcasts off the per-agent agent_update queue, serialize an agent's outbound agent_stream events behind any in-flight agent_update for that agent (staying synchronous when none is queued), and remember closed turn IDs in TurnLiveness so lagging snapshots from older daemons or concurrent fetches cannot re-open a finished turn.

* refactor(server): sequence agent_update and agent_stream on one per-agent queue

Replace the separate Session.agentStreamTails queue and pendingAgentUpdate() bridge with AgentUpdatesService.runAfterUpdates() so interleaved agent_update and agent_stream frames share a single per-agent FIFO queue while staying synchronous when nothing is queued.

* fix(app): preserve closedTurnId across idle snapshots and directory catch-up

An empty AgentDirectoryReplica.commitChanges() re-projects unchanged idle agents as activeTurn: null, which previously cleared closedTurnId and let a later lagging running snapshot re-open the finished turn. Keep closedTurnId on idle TurnLiveness until a newer turn opens or destructive_close resets liveness.
2026-12-02 22:29:27 +07:00
paseo-bot[bot]andodoo-mvds 2929e99147 Refresh the Scripts menu after external paseo.json edits (#11768)
* fix(server): refresh workspace scripts when paseo.json changes

Directory workspaces had no observer at all, and Git workspaces only
picked up a new paseo.json when the edit also changed their Git
snapshot. A connected app therefore kept a stale Scripts menu after
paseo.json was edited outside Paseo.

The workspace observer now watches paseo.json for every observed
workspace, Git or not, through the existing single-file observer, and
refreshes the workspace cards for that directory on change. Workspaces
sharing a directory share one watch.

Co-authored-by: odoo-mvds <odoo@applix.be>

* Keep pending file changes visible to existing subscribers

---------

Co-authored-by: odoo-mvds <odoo@applix.be>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 15:12:56 +00:00
Mohamed Boudra f9529add94 Open the reconcile PR during release preparation (#11758)
* Open the reconcile PR during release preparation

reconcile-release gains --ref so it can read the release branch before any
tag exists. The release docs open the unmerged reconcile PR right after the
release branch push, so its CI overlaps with the branch checks, and merge it
at Ship alongside npm publication.

* Check the reconcile PR against the tag before merging at Ship
2026-12-02 22:00:11 +07:00
paseo-ai[bot] 6eb595f556 fix: update lockfile signatures and Nix hash [skip ci] 2026-12-02 14:28:23 +00:00
Mohamed Boudra d8c29bbc85 chore(release): reconcile v0.19.0-beta.1 (#11757) 2026-12-02 21:17:42 +07:00
7b8be44ac7 fix(app): inset the tool call details empty state (#9129)
* fix(app): inset the tool call details empty state

The details sheet renders full-bleed sections that carry their own insets, so the
empty-state line had none and started at the screen edge while the section content
above it was inset.

Give the empty state the same box as the loading skeleton it replaces.

Closes #9128

* test(app): cover tool call details empty state inset

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

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 20:39:11 +07:00
Omer Cohen 64ab894ff3 feat(plugin): expose provider icons to client UI (#4664)
Export ProviderIcon and PluginProviderIconProps from @getpaseo/plugin/client/ui (with type re-export on @getpaseo/plugin/client), default hostId to the enclosing plugin installation host while supporting explicit hostId overrides, hydrate host provider snapshots before installing client contributions, and add SDK boundary, unit, and Playwright E2E coverage.
2026-12-02 20:18:41 +07:00
paseo-bot[bot] 423178804f Keep OpenCode reply paragraphs from running together (#11745)
* fix(opencode): keep reply paragraphs separate across text parts

OpenCode can put multiple text parts in one assistant message. Preserve their paragraph boundary when Paseo joins the streamed chunks or replays history.

* refactor(opencode): name timeline text arguments

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 13:12:52 +00:00
KiritoXD 5f3396fec0 Reject malformed label filters in agent listings (#11707) 2026-12-02 12:42:43 +00:00
Mohamed Boudra 45dfc2b98b Store durable agent message queues in paseo.db (#11740)
* refactor(server): store durable agent message queues in paseo.db

Move AgentMessageQueueStore persistence from per-recipient JSON files under $PASEO_HOME/agent-queues/ into a modular SchemaModule (agent_message_queues) in the existing SQLite daemon database (paseo.db).

Agent message queues have not shipped in a stable release yet, so switching before v0.19.0 avoids carrying permanent JSON-to-SQLite migration code and directory hygiene logic (corrupt/stray file handling). All queue transitions run inside synchronous DaemonDatabase transactions, preserving monotonic per-recipient sequence numbers, idempotency/conflict checks, depth caps, insertBeforeId ordering, urgency clearing, and lossless UTF-8/NUL/surrogate round-trips via JSON-encoded text columns.

* fix(server): JSON-encode queue ids, sessionMode, and fingerprint in SQLite

node:sqlite truncates raw TEXT columns at NUL bytes and replaces lone surrogates with U+FFFD, which could cause accepted messages with non-ASCII/surrogate messageIds to mismatch in markDispatching and stall in dispatching state. Store id, sessionMode, and fingerprint as JSON strings alongside text/payload columns and cover all lookup/mutation operations in the shared contract tests.
2026-12-02 19:14:27 +07:00
paseo-bot[bot] 6cee7dc10d fix(claude): keep goal acknowledgements after transcript import (#11733)
Claude records the goal acknowledgement as local command output. Replay that specific record so a restored conversation retains the same acknowledgement as the live turn.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 12:13:12 +00:00
Mohamed Boudra 5b2aa7e0ca fix(server): preserve session mode boundaries on direct sends and urgent queue releases (#11722)
* fix(server): preserve session mode boundaries on direct sends and urgent queue releases

Direct sends and urgent queue releases previously collected all queued messages up to the first provider switch and dispatched them as a single prompt under one session mode. A queued read-only or plan-mode message followed by a direct broader-permission prompt (or vice versa) was silently coalesced and executed under the wrong permission mode, and queued non-agent slash commands were wrapped into combined prompts.

Unify ordinary draining, urgent releases, and direct-send coalescing behind one shared dispatchGroups boundary rule covering provider switches, conflicting explicit session modes, and non-agent slash commands. When queued messages ahead of a direct send cannot share one dispatch, enqueue the direct prompt with urgency so the preceding boundary group runs first in FIFO order under its own mode and the direct prompt follows in a separate turn under its own mode.

* fix(server,app): persist urgency downgrades, preserve queue order, and defer receipts on queued direct sends

Address review findings on queued direct sends and split urgent releases:
- Defer MessageReceipts completion when sendDirect queues behind a boundary so receipts only complete via onDelivered.
- Persist clearUrgency on deferred groups before dispatching the first group so daemon restarts do not revive consumed interrupts.
- Support insertBeforeId in AgentMessageQueueStore and admit() so queued direct sends keep their slot ahead of queued provider switches and concurrent arrivals.
- Pass raw text and attachments from Session into DirectPrompt so delivery stays synchronous without re-parsing provider prompts or writing image files.
- Clear the optimistic composer timeline bubble in dispatchComposerAgentMessage when a direct send or switch returns deliveryStatus: queued.
- Remove new barrel re-exports from agent-messages/index.ts and await receipt.dispatched directly in delivery.test.ts.

* fix(server,app): dedupe retried queued direct sends, settle queued switch draft, and avoid eager image writes

Address follow-up review findings:
- Dedupe retried direct sends in sendDirect when direct.messageId is already queued in memory (with fingerprint conflict check) so retries return the existing queued receipt instead of duplicating or interrupting.
- Settle the staged provider switch draft via onProviderSwitchQueued in dispatchComposerAgentMessage when a direct switch returns deliveryStatus: queued.
- Only persist inline images via Session.queuedAttachments on direct sends when the recipient queue is non-empty, avoiding unused uploads on empty queues.
- Remove conditional assertion from delivery.test.ts using expectQueuedReceipt helper.

* fix(server): resolve inline direct-send attachments lazily inside queue save

Remove the racy Session.list(agentId) pre-check by passing a lazy resolveAttachments callback into DirectPrompt. Delivery admits the item into its exact in-memory slot synchronously and runs resolveAttachments inside item.saved only when the direct send actually queues behind a boundary, keeping both memory and store order aligned ahead of concurrent arrivals while writing zero files on immediate direct sends.

* fix(server): preserve live hold/withdraw state and store order across concurrent lazy saves

After awaiting lazy attachment resolution in save():
- Skip persisting if the message was withdrawn or rejected during the wait, and read current item.held and item.urgency rather than stale pre-await values.
- Insert before the first already-persisted successor in inbox.messages (tracked via item.persisted) so out-of-order upload completions still preserve admission order in the store.

* fix(server): close provider-switch, implicit-mode, and stray queue-file edge cases

- Respect direct providerSwitch boundaries in boundaryOfDirect()/canCoalesceDirect() so unheld messages or explicit-mode messages are not coalesced onto the target provider, while preserving Stop-held unset-mode queue carry-over.
- Treat any explicit sessionMode differing from an earlier group's mode (including undefined) as a dispatch boundary so later explicit-mode sends never retroactively promote earlier implicit-mode queued messages.
- Validate queue filename stems in createJsonAgentMessageQueueStore.listAll() before loading so stray .json files with invalid recipient ID stems are logged and ignored instead of aborting daemon startup.

* test(server): extract shared mode-boundary daemon E2E helper
2026-12-02 18:24:22 +07:00
Mohamed Boudra f576407576 fix(database): harden SQLite daemon storage defaults and statement caching (#11726)
* fix(database): harden SQLite daemon storage defaults and statement caching

Hardens the daemon SQLite layer before v0.19.0 creates paseo.db files in the wild:

- Enable PRAGMA auto_vacuum = INCREMENTAL on empty databases (page_count = 0) before creating page 1, so space reclamation never requires a blocking full VACUUM later.
- Bypass the prepared statement cache when bound string/binary parameters exceed 64 KiB (node:sqlite lacks clearBindings() and retains the last bound buffer in native memory), cap the cache with a 256-entry LRU, and evict statements on execution or iteration errors.
- Guard savepoint rollback with connection.isTransaction so SQLite auto-rollbacks (e.g. SQLITE_FULL/SQLITE_IOERR or ON CONFLICT ROLLBACK) preserve the original error instead of masking it with 'no such savepoint'.
- Probe schema_versions read-only before running mutating PRAGMAs so older daemons reject newer databases without altering page 1 or creating WAL sidecars, and pre-create missing database files atomically with O_CREAT|O_EXCL at 0o600 without opening existing inodes.
- Raise busy_timeout to 5000ms and set synchronous = NORMAL + checkpoint_fullfsync = ON on both the main connection and WalCheckpointer, set temp_store = MEMORY on main, keep a 10,000-page wal_autocheckpoint backstop while off-thread checkpointing is active, and skip WalCheckpointer if SQLite does not enter WAL mode.

* refactor(database): remove test-only accessors and harden lock test coordination

Addresses review feedback:
- Keep SqliteDaemonDatabase private with no test-only accessors and test statement cache bypass, saturation, and error eviction through the public DaemonDatabase interface.
- Keep the journal_mode === 'wal' decision in openDaemonDatabase without repeating it in checkpointOffThread.
- Extract named IterateInput and WalCheckpointerInput interfaces for multi-field parameter objects.
- Coordinate WalCheckpointer exclusive-lock contention deterministically using 0ms-timeout probe workers instead of fixed sleeps.
2026-12-02 18:10:25 +07:00
paseo-bot[bot] b2b05b599e fix(app): keep workspace sorting available when a host is offline (#11728)
The sidebar restores cached workspaces before their host sends its feature list. Keep the time sorts available until a host is known to lack support.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 10:42:45 +00:00
Mohamed Boudra 8fc8cb51b4 fix(server): validate schedule IDs in ScheduleStore (#11727)
Validate schedule IDs against [a-zA-Z0-9_-]+ and verify directory containment in ScheduleStore, and map InvalidScheduleIdError to PaseoToolInputError in the agent tool catalog.
2026-12-02 17:23:07 +07:00
TheCouchCommanderandjamescordrey-ops 18dc910689 fix(gitea): resolve bracketed IPv6 workspace remotes through Tea logins (#11692)
* fix(gitea): resolve bracketed IPv6 workspace remotes through Tea logins

* fix(gitea): canonicalize IPv6 literals when matching Tea logins

---------

Co-authored-by: jamescordrey-ops <jamescordrey-ops@users.noreply.github.com>
2026-12-02 10:18:52 +00:00
Mohamed Boudra 711188aadc fix(omp): handle lone checkbox labels and form edge cases in ask history (#11706)
* fix(omp): handle lone checkbox labels and form edge cases in ask history

* fix(omp): show Yes for checked lone checkbox asks in history
2026-12-02 16:59:56 +07:00
Mohamed Boudra d207bc5a57 feat(plugin): expose untrusted on lifecycle hooks and harden worktree-include copies (#11709)
* feat(plugin): expose untrusted on worktree and workspace lifecycle hooks

* fix(worktree-include): skip untrusted worktrees and harden destination copies

* fix(worktree-include): allow tracked destination symlinks and match realpath in test

Check only parent directory symlinks before git check-ignore so tracked leaf symlinks in the destination worktree are skipped instead of aborting creation, while ignored leaf symlinks still fail before copying. Also compare sourceCheckout with createRealpathAwarePathMatcher in paseo-worktree-service.test.ts to handle Windows short/long path and separator differences.
2026-12-02 16:59:06 +07:00
Mohamed Boudra f3213a2259 fix(daemon): harden WAL checkpointer fallback and propagate provider history read errors (#11711)
* fix(daemon): keep a failed WAL checkpoint fallback from crashing the daemon

When the WAL checkpointer worker ends on its own, the exit handler re-enabled SQLite's auto-checkpoint with no guard. A throw there (closed connection) was an uncaught exception that ended the daemon. It now logs a warning. A failing close() during a failed open also no longer replaces the DatabaseOpenError.

* fix(daemon): bound WAL checkpointer failures and propagate provider history errors

* fix(claude): reject waiting history readers when rewind rebind transcript load fails

* fix(claude): skip unparseable JSONL lines exceeding max string length during replay
2026-12-02 16:58:34 +07:00
paseo-bot[bot]andClaude Opus 5.5 370afb86c6 Keep a newer New workspace draft typed while creation finishes (#11720)
Since #11660, text typed on the web is published to the draft store after
the next paint. When workspace creation finished inside that frame, the
cleanup still saw the old draft version, cleared the draft as sent, and the
clear also dropped the unpublished text. Reopening New workspace showed an
empty composer. The cleanup now publishes pending text before it compares.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 09:44:37 +00:00
paseo-bot[bot] 6caf7f6653 fix(app): attach files pasted into the web composer (#11718)
The browser paste listener handled raster images and skipped other clipboard files. Send browser files through the same composer upload path as picked and dropped files.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 09:42:50 +00:00
Mohamed Boudra f4a6d7841c refactor(markdown): decompose renderer capabilities and tighten local image path checks (#11699)
Split MarkdownRenderer's external flag into destinations, forgeShorthand, and softBreaks, and consolidate local image path parsing in @getpaseo/protocol/path-utils to validate local drive, POSIX, and in-workspace UNC paths while rejecting out-of-workspace UNC paths, malformed file URIs, and Win32 device namespace paths.
2026-12-02 14:56:55 +07:00
paseo-ai[bot] 4db5d454cd fix: update lockfile signatures and Nix hash [skip ci] 2026-12-02 07:47:52 +00:00
b34d4f5c3f fix(daemon): clamp oversized images before they enter agent history (#5119)
* fix(daemon): clamp oversized images before they enter agent history

An image over 2000px does not just fail the turn that carries it. Anthropic
rejects the whole conversation from then on, every retry replays the poisoned
history, and there is no in-app way to repair the session — the user has to
hand-edit the agent's JSONL. A 4864x2524 Retina screenshot is enough.

Clamp pixels and bytes in the daemon, on the three paths that assemble a
prompt's image blocks. That also covers callers no client-side fix can reach:
`paseo agent send`, plugins, schedules, and direct WebSocket clients. pi only
resizes what its own tools read; images arriving over RPC pass through, which
is why the pi provider is affected too.

The strategy and decoder are pi's: Photon (Rust compiled to WASM, 2MB, no
native binaries). After scaling to fit, PNG is tried before any JPEG quality,
and a further scale step is taken only when no encoding makes the byte
budget. What reaches this path is mostly UI and code screenshots, which PNG
keeps sharp and small and JPEG smears; photos fall through to JPEG on their
own. EXIF orientation is applied first so a downscaled phone photo is not
delivered sideways.

WASM is deliberate: the daemon ships to five platforms with
`npmRebuild: false`, and a codec resolved per-platform is a codec that
silently resolves to nothing wherever CI did not build it.

GIF and SVG pass through untouched, and every failure path returns the
original attachment. A bounded image beats an unbounded one; both beat a
dropped one.

Refs #4635. Revives the location #820 chose, with a codec that ships.

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

* fix(daemon): bound image work before decoding, refuse what cannot be clamped

Read the declared size out of the container header — PNG, JPEG, WebP, GIF,
BMP — before the decoder is handed anything. A decompression bomb states
gigapixels in a few kilobytes, so measuring an attachment by decoding it was
the wrong way round. Past 50MP declared, 64MB encoded, or 100 images in one
prompt, the attachment is refused before anything is allocated for it, and an
attachment already inside the provider's limits is no longer decoded at all.

Stop swallowing failures. A decoder that fails to load, or a codec that fails
on an oversized attachment, used to forward the original — silently reaching
the state #4635 is about. Both now raise a typed error that fails one send and
leaves the session usable. An attachment whose container cannot be read is
still forwarded when it is within budget: an unknown format is not a defect.

Take a single object parameter in both public functions, per the server guide,
and yield between attachments so one prompt cannot hold the event loop for its
whole batch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(daemon): apply the image ceilings to GIF and SVG too

A format that must not be re-encoded is still a format with limits. Both
returned before any size check, so an oversized or over-budget one reached
history untouched and every later turn replayed it — the state this guard
exists to prevent, through the one door left open. They are now measured
against the same ceilings, and one that is past them fails the send: there is
no clamped version to send instead, because flattening an animation or
rasterising a vector is a different image, not a smaller one.

Declare the TIFF readers as functions and take a single object parameter in
`applyExifOrientation` and the clamp helper, per the server guide.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore(deps): reduce the lockfile change to the photon entry

The previous lockfile was regenerated with a newer npm, which deduplicated the
nested vitest trees under cli, desktop and relay and dropped rollup's peer
flags. None of that belongs to this change. Restore main's lockfile and add
only @silvia-odwyer/photon-node and its server dependency edge.

* fix(daemon): tighten the image clamp's ordering and per-step cost

- Preprocess images before buildSessionConfig in agent creation. That step
  can create a worktree or workspace, and a refused attachment must not
  leave one behind.
- Decide "never re-encode" from the bytes as well as the MIME type. A GIF
  labelled image/png, or an animated WebP, was decoded and flattened to its
  first frame; both now get the passthrough rules.
- Take each scale step from the previous step's output instead of the full
  source, and stop encoding the bottom JPEG quality twice per step. A 50MP
  source was resampled again on every step.
- Fail send_agent_message_request with a warning when an attachment is
  refused, instead of routing client input through handleAgentRunError.

* fix(app,server): verify picked image headers and clamp uploaded images in resolveAgentPrompt

- Fix mobile pickedAssetSupportedFormat so explicit unsupported mimeType/fileName never falls back to a .jpeg URI (fixes Android RawImageExporter copying AVIF/HEIC into .jpeg) and sniff the first 12 header bytes on native.
- Wire daemon image clamping into resolveAgentPrompt so uploaded role='image' attachments and inline images share one daemon clamping boundary, and correct mismatched raster MIME labels from magic bytes.
- Validate uploaded image attachments before provisioning workspaces or worktrees.

* Address review feedback on uploaded image clamping and creation pre-resolution

* Tighten image preprocessing helpers and fix EXIF parser edge cases

* Restore named option interfaces on public image preprocessing exports

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-02 14:38:07 +07:00
lukeandRoundRedDot 7bfdbbad2c fix(omp): show the question and chosen option for HTML-form asks (#11697)
Since 18.18.3 OMP's ask tool takes one HTML form ({ html }) instead of a
questions array, and OMP 19 reports the result as details.answers
({ name, question, answer }) beside the text "User answers: { name: value }".
mapOmpAskDetail only read the older questions/results shape, so a
finished ask recorded the label "Question" and the raw "User answers"
JSON: the question and the option text the user chose were lost from
the timeline and from history.

Read details.answers into the same "question\nanswer" text the older
shape produced. When a result carries only the values, read them against
the parsed form so each value shows as its option's text. While the ask
waits, or after it is interrupted, the row is named by the form's first
question.

Co-authored-by: RoundRedDot <roundreddot@gmail.com>
2026-12-02 14:30:26 +07:00
Vivek KalyanandMohamed Boudra 98c98d1017 fix(usage): let Claude Enterprise monthly spend pin to the sidebar (#11514)
* fix(usage): summarize Claude Enterprise extra usage and clean plan badge

* fix(usage): distinguish Monthly spend label, quiet balance-only warning, and split conditional test

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-02 14:28:22 +07:00
Mohamed BoudraandVivek Kalyan e9ea31ef3b feat(usage): show Codex individual spend limit amounts as Spend credits (#11702)
Show Codex spend_control.individual_limit amounts as a Spend credits UsageBalance using existing primitives.

Co-authored-by: Vivek Kalyan <hello@vivekkalyan.com>
2026-12-02 14:27:29 +07:00
paseo-bot[bot] 5a6e6d1918 test(server): verify Claude permission decisions on the event feed (#11698)
The permission tests pass their file checks but fail when they look for an event on an unrequested agent stream. Observe the permission resolution feed so each test verifies the decision the daemon publishes.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 07:13:13 +00:00
Matt CowgerandMohamed Boudra acd119743b fix(plugins): add requirements.app to split daemon and app minimums (#11494)
* fix(plugins): add requirements.app to split daemon and app minimums

* fix(plugins): name the app in requirements.app failures and cover app-only reinstall

When requirements.app is the failing range, the message now reads
"requires Paseo app <range>. Your app is <version>." A registry test locks
that a requirements.app-only edit unloads the installed plugin.

* test(plugins): split requirements.app cases so no test branches on runtime

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-02 13:50:22 +07:00
paseo-bot[bot]andClaude Opus 5.5 a7bc7ac759 Wait for the reloaded app to report presence in the notification settings test (#11694)
After a reload, the test started the finished agent before the app had
connected and sent its first heartbeat. The daemon then had no present
client and sent no in-app notification, so the test saw zero
notifications.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:43:19 +00:00
paseo-bot[bot] 9b82a65f3d fix(cli): show the active model in agent inspection and listings (#11693)
The provider reports a concrete model ID in runtime info. Preserve that ID when it matches the legacy default sentinel used in saved configurations.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 06:42:52 +00:00
Mohamed Boudra d131b54230 Fix Markdown collapse and layout shifts on plugin store navigation (#11691)
* fix(app): eliminate Markdown collapse and layout shifts on plugin store navigation

Opening a plugin in Settings -> Plugins previously painted several unstable frames before settling:

- On cold web sessions, the MD4C WASM parser only initialized after the first MarkdownRenderer mounted. Replacing OverviewSkeleton before the parser was ready collapsed the overview SettingsCard from 94px to a 34px empty box for 1-3 frames before expanding to the README.
- PluginPage tracked container width with a raw onLayout handler instead of useContainerWidthBelow, so narrow desktop windows (< 700px content width) painted a squeezed two-column first frame and hidden background stack screens recorded width 0 and flashed a stacked layout on Back navigation.
- Clicking a plugin row or card waited until navigation mounted to fetch the detail document, while showing a 94px stub skeleton, a fabricated Updates · 1 count, a mid-card Platforms insertion, and a premature Related plugins section that jumped down when the README arrived.

Expose preloadMarkdownParser and isMarkdownParserReady from react-native-enriched-markdown so the gallery warms WASM on mount and PluginPage holds one SettingsCard skeleton until both README data and the parser are ready. Prefetch plugin details on hover and press-in, compute the initial stacked threshold synchronously from window width while ignoring hidden zero-width measurements, size the overview skeleton to document proportions, defer the Updates count and Related plugins until detail resolves, and place Platforms after Updated.

* refactor(app): use named options and DSL helpers in plugin gallery navigation

* test(e2e): wait for registry detail response before clicking prefetched plugin
2026-12-02 13:39:43 +07:00
Matchy c75b718b2d fix(usage): prefer live Claude profile plan over credential snapshot (#11685)
Claude Code writes subscriptionType and rateLimitTier into
.credentials.json at sign-in and does not refresh them after a plan
change. Meanwhile GET /api/oauth/profile already returns live
organization.organization_type and organization.rate_limit_tier on the
account verification call.

Parse those fields from the profile response, resolve planLabel from the
live profile when present, and fall back atomically to the credential
snapshot only when the profile omits them so live and stale fields are
never mixed. Restrict rateLimitTier suffixes to multiplier tokens like
5x or 20x so default_claude_ai formats as "Pro" instead of "Pro ai".

Fixes #11668
2026-12-02 06:12:44 +00:00
Mohamed Boudra 3e2179cbc9 fix(copilot-usage-source): scope gh hosts.yml token lookup to github.com (#11689) 2026-12-02 13:02:44 +07:00
Mohamed Boudra 20755f5097 fix(server): restrict loopback alias origin check to canonical hosts (#11686) 2026-12-02 12:42:18 +07:00
Chirag Singhal 1fe9905fa3 fix: preserve rebound terminal routes on stale disposal (#10433) 2026-12-02 05:12:45 +00:00
Mohamed Boudra 211416b8eb feat(opencode): support conversation-only rewind on OpenCode v2 (#11675)
* feat(opencode): support Rewind conversation on OpenCode v2

OpenCode v2 stages a revert with files: false, which drops messages from the
target onward without restoring workspace files. Share one revert helper
between revertBoth (files: true) and the new revertConversation (files: false).

* refactor(opencode): pass single object parameter to OpenCodeV2Session.revert
2026-12-02 12:06:06 +07:00
Mohamed Boudra ab5e1d6fcb fix(app): wait for host connection before loading Files and related queries (#11679)
* fix(app): wait for host connection before loading Files and related queries

PR #11328 moved listWorkspaceExplorerDirectory out of useFileExplorerActions, removing the incidental client dependency that previously re-triggered FileExplorerPane initialization once the host finished connecting. Because FileExplorerPane had no connection gate, mounting while connecting wrote Host is not connected and stayed stuck after the host came online.

Gate FileExplorerPane and FileFilterResults on useHostRuntimeClient and useHostRuntimeConnectionStatus so they wait in a loading state while connecting and load automatically once online, and add useHostRuntimeIsConnected gates to the reconnect-vulnerable retry:false queries and observers (useAgentSkills, WorktreeSetupCalloutSource, add-project searches, useFileHandle/FilePane, ProviderSubagentPanel).

* refactor(app): let OwnedSubscription remain the sole reconnect owner in useFileHandle

subscribeFile already uses an OwnedSubscription that waits for connection and delivers fresh snapshots after reconnect. Keeping setObserving(observing) avoids duplicating reconnect ownership across two layers while still using useHostRuntimeClient.
2026-12-02 12:05:47 +07:00
paseo-bot[bot]andChirag Singhal 5029998013 fix: preserve workspace list connection diagnostics (#11676)
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>
2026-12-02 04:42:39 +00:00
Mohamed Boudra 2719695236 Brand plugin sponsor buttons and document funding waterfall (#11674)
* feat(plugins): brand sponsor buttons and document funding waterfall

Add shared funding platform normalization in @getpaseo/protocol and
render platform-branded Sponsor buttons with custom SVG marks across
the paseo.sh plugin sidebar and in-app plugin gallery (light and dark
themes). Document the four-tier funding collection waterfall in English
and Simplified Chinese publishing guides.

* fix(plugins): guard alias lookup, keep URL hash/port in dedup, assert theme colors
2026-12-02 11:23:51 +07:00
paseo-bot[bot] dc66f296da fix(app): confirm before discarding New Agent drafts (#11660)
Closing a New Agent tab dropped its only layout reference while leaving the draft active. Reuse the unsaved-changes prompt and finalize the draft after confirmation. Clear old active drafts once the saved layout identifies which ones still have tabs.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 03:43:15 +00:00
f7ceb13bd7 Create fork pull requests against the repository selected by gh (#11436)
* Create fork pull requests against the repository selected by gh

* Keep the origin fallback when GitHub CLI has no default remote

* Honor only an explicit GitHub CLI PR destination

* Resolve the current origin owner for fork pull requests

---------

Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 03:42:44 +00:00
paseo-bot[bot] fdec437e07 test(e2e): wait for the daemon to finish removing Hoplite (#11667)
Settings hides a provider's row as soon as Remove is confirmed, before
the daemon answers the config patch. The catalog test read the daemon
config once right after the row left, so it raced the in-flight patch
and saw hoplite still enabled. Poll the config and the providers
snapshot until the removal lands.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 03:40:13 +00:00
SuhailandMohamed Boudra 67b5da3544 fix(antigravity): omit relayed subagent tool calls from parent timeline (#11535)
* fix(antigravity): omit relayed subagent tool calls from parent timeline

* fix(acp): keep excluded tool calls out of message boundaries and turn state

Excluded tool calls (`AcpOptions.includeToolCall` returning false) are now
stored as `included: false` instead of dropped, so a later
`session/request_permission` that sends only the tool call ID still shows
the earlier input on its approval card. They no longer clear
`lastAssistantMessage`, so `turnEnd` still sees a silent executor error
that a relayed subagent call follows (#10885). They add no timeline row,
are not terminalized at turn end, and never keep the turn open. The
include decision is made once per call, on its first update.

Documents `includeToolCall` in the SDK and the provider guide, and adds
regression tests for the runtime and for Antigravity's relayed
`<uuid>:call_<id>` calls in Full access and Default modes.

Fixes #11541

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-12-02 10:26:25 +07:00
paseo-bot[bot]andChirag Singhal 197e84c337 fix: expose unconfirmed terminal cleanup in daemon status (#11658)
Co-authored-by: Chirag Singhal <76880977+chirag127@users.noreply.github.com>
2026-12-02 02:42:59 +00:00
Vivek Kalyan 4d9bc25a1d fix(usage): omit null Codex credit balances instead of coercing to zero (#11515) 2026-12-02 02:42:39 +00:00
paseo-bot[bot]andBrandon Elliott 910e65d8b2 fix(server): install registry plugins when npm omits lockfile URLs (#11656)
Managed plugin installs require a lockfile entry with a registry URL. Ask npm to emit that URL for the staged install so a user setting cannot remove it.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Brandon Elliott <923787+Brandon168@users.noreply.github.com>
2026-12-02 01:42:36 +00:00
Mohamed Boudra 12e7f1fab1 Hide the keyboard by dragging the chat down on iOS or tapping empty space (#11625)
On iOS the chat list uses interactive keyboard dismissal: a drag that
reaches the keyboard pulls it down with the finger, and the composer
rides on its edge. The release-velocity flick still dismisses on both
platforms.

The chat list now keeps taps for the control under the finger. A link,
tool call, or copy button acts on the first tap instead of only closing
the keyboard. A tap on text or empty space still closes it.

On a new agent's empty draft, the panel wrappers no longer hide the dock
background from taps, so tapping empty space closes the keyboard there.

Closes #8775
2026-12-02 08:26:06 +07:00
paseo-bot[bot] bbdc3e326d fix(app): keep Import Session errors visible during Retry (#11654)
A retry clears the query error when the first request left no response. Cache the listing outcome so the provider row keeps its error until the new request settles.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 01:12:36 +00:00
SunicemanandShane Su bac45474de Include the tracked fork owner when polling a newly pushed workspace branch (#11441)
Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
2026-12-02 00:42:47 +00:00
paseo-bot[bot]andClaude Opus 5.5 e928961472 Unmount a bottom sheet dismissed before its open animation starts (#11632)
* fix(app): dismiss a hidden bottom sheet that lands open after an interrupted open

The visibility tracker ignored an open detent when it had already moved to
closed. An open interrupted early reports -1, so an owner that hid the
sheet in that window left it closed in the tracker but open on screen.

* fix(app): unmount a bottom sheet dismissed before its open animation starts

Gorhom's BottomSheetModal sent a dismiss that arrived while the modal was
still INITIAL to BottomSheet.forceClose. The sheet still sat at its closed
position, so forceClose set isForcedClosing and animateToPosition returned
early: nothing cleared the flag, the mount animation was then skipped, and
the modal stayed mounted in DISMISSING with no onChange or onDismiss. Treat
INITIAL like CLOSED and unmount at once.

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

* fix(app): apply the INITIAL dismiss fix to Gorhom's src copy for native bundles

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 00:00:59 +00:00
ralstonandpaseo-bot[bot] 83b80351f7 fix(server): stop probing provider snapshot targets whose workspace directory is gone (#11646)
* fix(server): stop probing provider snapshot targets whose workspace directory is gone

Background refreshes warmed every snapshot target ever seen, including archived workspaces whose worktrees were deleted. Each probe of a missing cwd ran into the provider's ready timeout while holding a slot in the per-provider discovery limiter, so a new agent's provider check queued behind them for minutes. Refreshes now drop targets whose directory no longer exists and warm only the rest.

Fixes #11643

* fix(server): keep targets with waiting reads and bound directory checks when pruning

A refresh no longer forgets a missing workspace target while a read is waiting on its probe, so the read gets its own result instead of a fresh loading target. Each directory check is capped at 1s and shared per cwd, so a stalled network or FUSE mount keeps its target without holding up every other workspace's refresh or stacking blocked stats.

* Inject the workspace directory check in snapshot tests

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 23:42:41 +00:00
paseo-bot[bot] 6eba86db2f Keep local plugin reloads fast from large package directories (#11653)
* fix(plugins): keep local plugin reloads independent of daemon cwd

esbuild inherited the daemon working directory and repeatedly read large ancestor directories during import resolution. Use the plugin root for the build and its metafile paths.

* Retry temporary worktree cleanup in the auto-archive test

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 23:12:43 +00:00
Junsandpaseo-bot[bot] f83c3bab70 Preserve Codex activity timestamps on reopen (#10760)
* Preserve Codex activity timestamps on reopen

* refactor(server): align reopen timestamp fix with server conventions

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 21:42:41 +00:00
Galaxy Roamingandpaseo-bot[bot] 535f3d36d0 fix(server): make concurrent archiveAgent calls idempotent (#10590)
* fix(server): make concurrent archiveAgent calls idempotent

* Share the outcome of overlapping agent archives

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 21:13:02 +00:00
paseo-bot[bot] 32fe3074a0 Retry Pi agent creation after an extension conflict is resolved (#11642)
* fix(server): retry failed provider catalogues when creating agents

A failed Pi extension probe could block agent creation after the user fixed the project. Let an explicit workspace lookup retry the failed discovery without starting extra probes on passive reads.

* Limit provider catalogue retries to named lookups

* Name the provider retry option

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 20:42:44 +00:00
SunicemanandShane Su 5b1ccba548 Probe the full Codex command for version-gated features (#11221)
Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
2026-12-01 20:12:42 +00:00
paseo-bot[bot] 6cffd3994d fix(app): keep image selections through Android Activity recreation (#7734)
Keep in-flight Expo activity-result callbacks in the live AppContext until the picker returns, then release the detached registration. Run the lifecycle regression tests with the Android module suite.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 18:42:48 +00:00
paseo-bot[bot] 4101519112 test(server): verify stale sockets expire after reconnect (#11622)
Session pongs go to the requesting socket, so the replacement cannot fill the original socket’s send queue with pings. Exercise lease expiry and verify that the replacement keeps working.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 17:13:15 +00:00
paseo-bot[bot]andLouis Deconinck da58a57998 Recover Stop for unresponsive Pi and OMP agents (#11618)
* fix(server): recover Stop for unresponsive Pi and OMP agents

Keep turn ownership until the provider acknowledges Stop or its process exits. Resume the saved session when the user sends the next prompt.

Co-authored-by: Louis Deconinck <LouisDeconinck@users.noreply.github.com>

* Fix Pi and OMP Stop follow-up behavior

Keep idle recovery distinct from user Stop and reload Pi before applying settings to a stopped session. Force-stop a timed-out provider tree while its tool processes are still discoverable. Wait for both processes to exit in the newer-worker Windows CI test.

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Louis Deconinck <LouisDeconinck@users.noreply.github.com>
2026-12-01 17:12:44 +00:00
paseo-bot[bot]andMarcel W. Wysocki f76fd024fb Resolve full agent UUIDs without scanning history (#11617)
* Resolve full agent IDs without paging through archived agents

* test(server): guard direct lookup of stored agent UUIDs

Exercise a single-agent fetch when the archived agent has no project record. Count full scans while using the real daemon storage.

Co-authored-by: Marcel W. Wysocki <maci.stgn@gmail.com>

---------

Co-authored-by: Marcel W. Wysocki <maci.stgn@gmail.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 16:42:50 +00:00
2f7e22e621 Release inactive workspace composers during repeated switches (#11613)
* fix(app): release inactive workspace decks and bound retention

* Keep workspace expiry on the live clock

Preserve the existing retention limits and cover expiry while switching workspaces in the compiled app.

Co-authored-by: Sergey S. Volkov <16340911+js2me@users.noreply.github.com>

---------

Co-authored-by: Сергей Волков <ser.volkov@vk.team>
Co-authored-by: Sergey Volkov <js2me@outlook.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Sergey S. Volkov <16340911+js2me@users.noreply.github.com>
2026-12-01 16:12:47 +00:00
paseo-bot[bot] 9592f88fdf Make OMP idle-deadline tests independent of runner speed (#11612)
The provider idle deadline compares Date.now() with the last provider
event. Two tests measured that silence with real delays, so a slow
Windows runner stretched a 50 ms delay past the 80 ms deadline and the
turn failed before the test retried. Freeze Date in those tests and
advance it explicitly.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 15:48:26 +00:00
paseo-bot[bot] 0d244c192a Keep finished Claude subagents completed after reopening (#11602)
* fix(claude): keep completed subagents after reopening

A stop inferred during restart could overwrite the saved completion for the same SendMessage resume. Preserve the completion when the transcript proves that the latest successful resume finished.

* Test the timeline toast with a delayed reply

* Name the replay and timeline test arguments

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 14:42:42 +00:00
paseo-bot[bot]andDaniel JB Clark 6354565748 fix(desktop): prevent renderer test imports from racing (#11605)
Playwright workers share the transform cache. Load compiled workspace packages directly so fixture imports cannot read partial cache entries.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Daniel JB Clark <131936+djbclark@users.noreply.github.com>
2026-12-01 14:12:47 +00:00
Mohamed Boudra e06218e9f4 Stop status rings jumping when the sidebar slides in on Android (#11591)
* fix(app): count the indicator clock with a timing the driver cannot end early

The native clock was a decay that never slows. React Native's driver ends
a decay when its value moves less than 0.1 between two frames, and two
frames that carry the same millisecond are enough. #11586 started the
decay again from the JS thread, but every end still showed as a pause and
a jump until the JS thread got to it.

The clock is now a linear timing, which the driver reads off the time
since it started and has no such check. It counts in ten-minute spans.
The end of a span is the one event that reaches the JS thread, which
starts the next span at the current time.

* fix(app): hold running indicators in place while their panel is hidden

A ring, loader or shimmer in a panel that was not showing drew its resting
frame. On a phone the sidebar slides into view before its panel counts as
showing, so every ring sat at the resting position during the slide and
jumped to the running position when the slide settled.

A hidden indicator now stays bound to its clock and stops running it. The
clock and the loader's ticker hold the time they have run and count on from
it, so an indicator continues from where it stopped.
2026-12-01 20:25:41 +07:00
SunicemanandShane Su fec7454c31 Accept advertised question IDs for Codex async answers (#11225)
Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
2026-12-01 13:12:51 +00:00
Mohamed Boudra 5adfd4961c Stop Claude usage polling from hitting the rate limit, and wait it out across token refreshes (#11597)
* Stop Claude usage calls at turn end and honor 429 waits across token refreshes

A Claude turn's result no longer asks the usage registry to refetch: an
agent observation now only merges the usage it carries. The Claude usage
source waits at least five minutes after a 429 (escalating to an hour),
keys that wait by the login's locator instead of its token, and applies it
to the profile endpoint too. Error reports can carry retryAt, which the
registry and the app's poll honor.

* Cover retryAt wire compatibility for older clients

* Show the time left until a rate-limited usage report retries, counting down on the card

The Claude source now reports only the reason and retryAt. The app adds the time left from
retryAt, ticks it each minute, and polls when it passes.

* Print when a rate-limited usage report retries in paseo usage, and read the time when a countdown starts

The CLI appends "Retrying at <retryAt>." to the error. A relative-time label that starts ticking
after its card mounted now reads the current time instead of the mount time.
2026-12-01 19:55:11 +07:00
paseo-bot[bot] d1ee5dee63 Keep split panes from re-rendering on unrelated workspace updates (#11600)
useWorkspaceTerminals built createTerminal on the useMutation result,
which TanStack returns as a new object on every render. Each render of
the workspace screen therefore gave every pane a new compact header
renderer and re-rendered all panes. The Explorer resize performance
test failed when an unrelated render landed inside its drag.

Depend on the stable mutate and the pending flag instead.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 12:44:47 +00:00
paseo-bot[bot]andDesmond Leong 1adabf70c8 fix(claude): settle stopped subagents after a daemon restart (#11594)
Claude can send a stop before it announces tasks in the new session. Match the terminal notice to the restored child so the open chat updates its original row.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Desmond Leong <desmond@returning.ai>
2026-12-01 12:12:45 +00:00
87427c2aa1 Release the microphone when voice mode stops without a daemon connection (#11587)
If the daemon is unreachable when voice mode stops, setVoiceMode(false)
rejects and stopVoice never stopped microphone capture or released the
screen wake lock. The runtime then reported voice as disabled while the
microphone stayed open.

Release capture and the wake lock in a finally block. The rejection still
propagates to the caller.

Closes #7558

Co-authored-by: luke <luopeihuan@gmail.com>
Co-authored-by: RoundRedDot <roundreddot@gmail.com>
2026-12-01 18:10:26 +07:00
Mohamed Boudra cfa4536358 Show Antigravity usage again, refreshed only when you ask (#11585)
* Show Antigravity usage again, refreshed only when you ask

Google's December 2026 terms allow running the unmodified agy harness,
including `agy -p`, through supported interfaces. Each `agy -p "/usage"`
still refreshes the quota on Google's backend, so Paseo must not run it
in the background.

Add `refresh: "manual"` to usage source registrations. The daemon never
fetches a manual source on lists, polls, or agent observations. A
targeted or host-wide forceRefresh fetches it once and caches the result
until the next forceRefresh. Before the first refresh, the report entry
has status `not_fetched`, and the card asks the user to refresh. A failed
manual refresh is not retried.

Restore the Antigravity usage source as a manual source. API key sign-in
reports a no-quota message instead of an error.

Update the Antigravity docs for the new terms and the plugin reference
for the new field.

Refs #10952

* Keep a manual usage result when agents join or leave the account

A manual result was keyed by the account's login set. Each Antigravity
agent adds a login, so a second agent or a closed agent reset the card to
"Not checked yet". Key a manual result by its report id instead.
2026-12-01 18:08:31 +07:00
Mohamed Boudra 7f75b0e166 Keep status rings turning when the native driver ends their clock (#11586)
Every status ring and tool-call shimmer on native rides one decay animation. React Native's driver ends a decay when its value moves less than 0.1 between two frames, and on Android two frames that carry the same millisecond are enough. The clock kept its handle, so every indicator froze until all of them left the screen and one came back.

The clock now listens for the driver ending the decay and starts it again at the current time.
2026-12-01 18:00:04 +07:00
Mohamed Boudra b0ca089d54 Skip redundant finished notification after a child agent reports via send_agent_prompt (#11583)
* fix(server): skip redundant finished notice after a child reports to its caller

When a watched child calls send_agent_prompt to report back to its caller, its final wrap-up response usually takes longer than the 2s message-delivery quiet window, so the caller wakes up on the report and then receives a second redundant 'Agent ... finished' notification once the child's turn ends.

Track per-watch report state on the daemon instead of relying on debounce timing or extra agent parameters: admitting an agent-message from a watched child to its caller marks active (non-pending) watches for that pair as reported, while subsequent non-reporting tool calls or a new turn_started clear the mark. Clean turn completions with the mark set end silently (or keep following silently if pending work remains); errors, permission requests, cancellations, and closes are never suppressed.

* docs(agent-lifecycle): note text-only output after explicit report keeps mark

* fix(server): ignore turn 1 turn_started after report and update cross-host batch e2e test

On remote children, turn 1's own turn_started frame can arrive over the observation stream after a fast send_agent_message already marked the watch as reported. Track turn completion so only a turn_started after a completed turn resets per-turn report state.

Update hosts.e2e.test.ts so turn 1 verifies suppression of the redundant finished notice after REMOTE_REPORT, and a follow-up unreported turn exercises automatic remote completion delivery.
2026-12-01 17:44:03 +07:00
Mohamed Boudra 91e7713721 refactor(client,desktop,app): share HostTransportSpec and protocol URIs for browser proxy (#11577)
Follows up on #11561 so adding a new transport (such as hub://) requires no parallel union or dial branch in the desktop browser proxy.

- Move HostTransportSpec, localListenOfHostTarget, and serializeSshTransportUri into @getpaseo/protocol so app, client, and desktop share one URI and local-listen contract.
- Move routed (via) dialing into @getpaseo/client/node createHostTransportFactory (lazy-loading the full client entry so @getpaseo/client/node/lean stays lean) and export DaemonTransport and HostTransportSpec publicly.
- Collapse BrowserProxyTarget / DesktopBrowserProxyTarget onto HostTransportSpec, remove per-transport branches from openTunnelWireConnection, and deduplicate browser routing input assembly between the hook and bridge.
- Rename linkCeiling to admittedCeiling in server handleTunnelHello to match both routed channels and Hub sockets.
2026-12-01 17:43:46 +07:00
SunicemanandShane Su e20ea2aaf2 fix(acp): preserve plain-text setting errors (#11431)
Co-authored-by: Shane Su <shane.su@maiscrm.com>
2026-12-01 10:42:48 +00:00
Mohamed Boudraandluoph 806214d285 Keep long Markdown replies cheap to stream on web and mobile (#11582)
Streaming one long reply made each reveal frame more expensive as the reply grew. The renderer now splits a streaming message into sealed head parts and a tail on every platform, and finds the boundary by parsing only the source after it.

Refs #7584

Co-authored-by: luoph <1686898+luoph@users.noreply.github.com>
2026-12-01 17:36:12 +07:00
KiritoXDone e5edb6efd5 fix(server): keep the full last reply across notifications (#11578) 2026-12-01 10:12:40 +00:00
Mohamed Boudra 0a0544fa4f fix(app): keep chat loading minimal and stop post-load Updating messages flash (#11575)
* fix(app): simplify chat loading state and eliminate post-load updating toast

Loading a workspace or chat previously shifted the spinner vertically as status text swapped in and out, jumped again when underfilled history handed off to the stream viewport overlay, and flashed an "Updating messages" toast right after content painted.

- Render LoadingState as a centered minimal spinner with accessibilityLabel only (no visible text).
- Hoist the agent-initial-fill overlay onto ChatAgentReadyContent so initial history fill shares the same full-pane geometry as agent-loading and reveals the chat and composer together.
- Emit a follow-up catch_up after a bootstrap tail replace only when live head rows actually extend past endCursor.seq, avoiding a redundant after fetch that kept visibility catch-up pending after the chat rendered.
- Keep the FRESHNESS_CHECK_QUIET_MS quiet window across initial subscribe and tail catch-up for opened cursorless chats (such as display-only caches with range: null).

* refactor(app): remove dead viewport initial-fill fallback and unused hostName prop

* fix(app): keep initial history fill overlay non-interactive

The previous viewport-level agent-initial-fill overlay used pointerEvents: none so pointer interactions were never blocked while underfilled history fetched older pages. Hoisting it onto ChatHistoryLoadingOverlay omitted pointerEvents: none, which intercepted scroll.hover() until the held page timed out.
2026-12-01 17:09:59 +07:00
Mohamed Boudra 914143e8b0 Show connected clients and hosts with scopes in Devices settings (#11209)
* feat(devices): show connected clients and hosts with scopes in host settings

Expose live daemon sessions and inbound/outbound peer daemon links in
Settings → Host → Devices, and move Ways to connect (Relay + Tailscale)
into a Pair a device header button sheet so the Devices view stays focused
on active connections.

Protocol changes stay backward compatible with older daemons and clients:
- Optional hello.clientInfo carries device name, platform, kind, and peer
  daemon identity without widening the existing clientType enum.
- daemon.clients.list.request/.response/.changed (gated on
  server_info.features.connectedClients and access.manage) streams live
  connected clients and inbound daemon links with their routed sessions.
- HostSummary gains optional version, permissions, and connectedAt fields
  populated from the remote daemon's server_info while online.

* fix(devices): trim unused client wire fields, stabilize pair modal, and add browser E2E

* fix(devices): reset pair modal step on dismiss and close sheet before host switch

* fix(page-layout): attach titleTestID to title parts instead of outer header with actions

* refactor(devices): flatten daemon session summary primitive and align with auth plan

* fix(devices): keep idle and reconnecting host-link sessions visible via hello.hostLink
2026-12-01 16:59:16 +07:00
paseo-bot[bot] 1969fb331c test(terminal): batch the burst rows in the pressure recovery fixture (#11576)
The fixture batched its 12,050 startup rows because ConPTY on Windows
pays for each TTY write, but it still wrote the 4,000-row burst one row
at a time. On a loaded Windows runner the burst took longer than the
15 s wait for BURST-DONE. Write the burst through the same batching.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-01 09:33:53 +00:00
Mohamed Boudra 16b4c0b25c Show archiving with a neutral trailing spinner instead of the Working ring (#11574)
* fix(app): show archiving with a neutral trailing spinner instead of the working ring

Archiving was wired through the sidebar row's leading isLoading prop, which renders the blue Working StatusRing (and labels hoisted/status-grouped badges as Working). After #11519 made the pre-archive checkout-status check observable, every worktree archive flashed or held the Working ring even when the workspace was idle or awaiting confirmation.

Keep leading status untouched while archiving, show a muted trailing LoadingSpinner after a 150ms delay so fast local checks do not flash, stop spinning as soon as a confirmation dialog opens (while keeping duplicate presses locked out), and dim row content without shifting row or title layout.

* refactor(app): rename row archive-indicator prop to showArchiveIndicator
2026-12-01 16:20:33 +07:00
Mohamed Boudra 82ef763fc2 fix(markdown): stabilize incomplete Markdown while streaming (#11572)
During streaming, incomplete Markdown delimiters briefly rendered as raw
text, wrapped long link URLs, or flipped block types (such as a paragraph
exploding into a Setext H2 on a trailing `-` before a bullet list item,
empty headings/task checkboxes/admonitions, or half-formed tables and code
fences) before snapping back on completion.

Add an incremental, zero-AST streaming stabilizer that runs only while
`streaming` is true before `prepareMarkdownSource`, `splitMermaidFences`,
and `EnrichedMarkdownText`:

- Auto-closes open inline code spans, emphasis/strong/strikethrough
  (in LIFO order and before trailing whitespace), and unfinished links
  via `PENDING_MARKDOWN_LINK` (rendered as a non-interactive link-styled
  span on web and inert on native until the destination closes).
- Withholds bare opening delimiters, incomplete images/link definitions,
  ATX heading prefixes, Setext underline false positives after paragraphs,
  empty list/task/quote/admonition prefixes, opening and partial closing
  code fences (including inside quotes and nested lists), unconfirmed
  table headers/separators/incomplete body rows, and partial HTML tags.
- Caches completed-line fence state per renderer so steady-state reveal
  frames stay bounded to the active trailing block, and avoids double
  stabilization and phantom tail gaps on native head/tail splits.
2026-12-01 16:11:02 +07:00
Mohamed Boudra b6220fd9c6 Show the host icon with a status dot on host selectors (#11568)
* feat(app): show host icon with status dot on host selectors

After adding configurable and auto-detected host icons in #10702, host
selector triggers and single-slot host menu rows still showed only a
bare status dot. Introduce a shared HostStatusIcon that pairs the
resolved host icon (in its identity color) with a corner status dot and
surface-matched knockout ring, and use it across host selector triggers
and compact host menus.

* refactor(app): expose resolved backdrop from FieldTrigger
2026-12-01 16:06:26 +07:00
paseo-ai[bot] c3e627e1cb fix: update lockfile signatures and Nix hash [skip ci] 2026-12-01 08:59:56 +00:00
Mohamed Boudra 78633752b1 Support proxying workspace browser tabs through routed hosts (#11561)
* feat(server): accept network tunnels on routed host channels

Routed host channels required `hello` as the first frame, so a browser
tunnel to a host reached through another daemon failed with
routed_unsupported. The origin daemon now forwards a first-frame
`tunnel_hello` untouched; it pinned the destination's identity when it
accepted the link, so it does not wait for server_info. The destination
redeems the ticket and also requires workspace.write on the physical
link's admitted ceiling, so a narrowed link cannot carry a tunnel even
with a valid ticket.

`server_info.features.routedNetworkTunnel` lets the app require both
daemons to support this before routing a browser tab through them.

* feat(desktop): open browser proxy tunnels to routed hosts

A routed host has no address of its own, so the desktop browser proxy
could not reach it and the pane showed "routed hosts unsupported". The
proxy now opens a client session to the origin daemon and runs the
network tunnel over a host channel to the routed host.

All tunnel targets (direct, SSH, relay, routed) now run the tunnel_hello
handshake over the client's DaemonTransport instead of a separate socket
stack, so the proxy reuses the same connectors the app uses. SSH tunnels
take an explicit spawn env so the desktop can strip AppImage variables.

The renderer resolves the origin host for routed hosts and only offers
the proxy when both daemons advertise routedNetworkTunnel; older daemons
get the update-required state. The gate is tagged
COMPAT(routedNetworkTunnel) for removal.

* test(desktop): verify routed host browser proxy in Electron E2E
2026-12-01 15:52:03 +07:00
Mohamed Boudra 22a4447431 feat(plugins): add plugin scorecard, updates, and sidebar across website and app (#11563)
* feat(plugins): add plugin scorecard, updates, and sidebar across website and app

Extend the plugin registry wire contract with optional Health, Review, Capabilities, Updates history, author profile, sponsor funding, compatibility, and custom action link fields so users can evaluate plugin maintenance and review findings before installing without false-safety defaults.

Separate neutral plugin capabilities from review caveats so legitimate access disclosures never lower safety signals, use progressive disclosure for technical inspection details, and omit review semaphore bars when a listing has no review payload.

* fix(plugins): gate scorecards on host capability and widen scorecard wire enums

Add server_info.features.pluginRegistryScorecards so older daemons show an update-host notice instead of a false baseline-review message, show a loading skeleton on Scorecard and Updates while detail fetches, widen health grade and review status wire schemas to strings so future registry values never hide listings on older daemons, and omit review dots on related cards when no review summary is present.
2026-12-01 15:50:45 +07:00
Mohamed Boudra 5b99e6699c feat(sync,app): add optimistic overlays to SyncStore for immediate queue UI (#11566)
Queueing, cancelling, and promoting messages waited for a daemon round trip and follow-up agent.queue.update before updating the queue track, leaving a noticeable gap during uploads or over slow links.

Layered uncommitted optimistic overlays onto SyncedStoreRegistry keyed by partition so every subscriber sees pending writes immediately without mutating authoritative views or SyncPersistence. Committed overlays settle without extra requests when authoritative state already matches, or reconcile across one causal cursor catch-up so neither flashes nor ghost rows occur. Also flush pending agent.queue updates ahead of queue RPC responses on the server and remove the ad-hoc WeakSet hide workaround in AgentQueueModel.
2026-12-01 15:45:00 +07:00
657 changed files with 41281 additions and 5403 deletions
+144
View File
@@ -1,5 +1,149 @@
# Changelog
## 0.19.0-beta.1 - 2026-12-02
- **Switch providers mid-chat:** Switch a chat to another provider and keep the conversation, with chat history now stored on the host. ([#11410](https://github.com/getpaseo/paseo/pull/11410))
- **Queue survives restarts:** Queued messages now live on the host, so they survive app reloads, device switches and daemon restarts. ([#11424](https://github.com/getpaseo/paseo/pull/11424), [#11566](https://github.com/getpaseo/paseo/pull/11566), [#11740](https://github.com/getpaseo/paseo/pull/11740))
- **One switch for agent tools:** Agent tools now sit behind one Enable tools setting with orchestration, schedules, PR watching and browser groups, and are on by default. ([#11189](https://github.com/getpaseo/paseo/pull/11189))
- **Connected devices list:** Settings → Devices now shows which clients and hosts are connected and what each one can access. ([#11209](https://github.com/getpaseo/paseo/pull/11209))
- **Plugin scorecards:** Plugin pages in the app and on paseo.sh show a scorecard, update history, related plugins and sponsor links. ([#11563](https://github.com/getpaseo/paseo/pull/11563), [#11674](https://github.com/getpaseo/paseo/pull/11674), [#11691](https://github.com/getpaseo/paseo/pull/11691))
- **Share services through tunnels:** Share a running workspace service at a public URL from the Scripts menu, and dev servers keep their live-reload connections. Services now open at `localhost:<port>`, and `*.localhost` service URLs are removed. ([#11490](https://github.com/getpaseo/paseo/pull/11490))
- **Lower CPU while agents run:** Running agents use far less CPU, GPU and battery, with lighter status rings, loaders and tool-call animations. ([#11456](https://github.com/getpaseo/paseo/pull/11456), [#11474](https://github.com/getpaseo/paseo/pull/11474), [#11564](https://github.com/getpaseo/paseo/pull/11564), [#11586](https://github.com/getpaseo/paseo/pull/11586), [#11591](https://github.com/getpaseo/paseo/pull/11591) by [@djbclark](https://github.com/djbclark), [@luoph](https://github.com/luoph), [@mariotaku](https://github.com/mariotaku))
- **Steadier streaming replies:** Streaming replies show their final formatting as they arrive, and long replies no longer get slower to render as they grow. ([#11572](https://github.com/getpaseo/paseo/pull/11572), [#11582](https://github.com/getpaseo/paseo/pull/11582) by [@luoph](https://github.com/luoph))
- **Faster mobile launch:** The mobile app shows your last workspace sooner after a cold launch, about 0.7 seconds on Android. ([#11390](https://github.com/getpaseo/paseo/pull/11390) by [@luoph](https://github.com/luoph), [@maci0](https://github.com/maci0))
- **Desktop browser profiles:** Desktop browser tabs can use separate colored profiles, so you can stay signed in to two accounts on one site. ([#10357](https://github.com/getpaseo/paseo/pull/10357) by [@clkao](https://github.com/clkao))
- **Swipe away the iOS keyboard:** Drag the chat down to hide the iOS keyboard, and chat controls now work on the first tap while it is open. ([#11625](https://github.com/getpaseo/paseo/pull/11625))
### Breaking
- Paseo CLI and daemon now require Node.js 22.16.0 or later ([#11410](https://github.com/getpaseo/paseo/pull/11410))
### Added
- Added Antigravity quota to Usage, refreshed only when you select Refresh ([#11585](https://github.com/getpaseo/paseo/pull/11585))
- Added conversation-only rewind for OpenCode v2 agents ([#11675](https://github.com/getpaseo/paseo/pull/11675))
- Added desktop browser tabs for workspaces on hosts connected through another host ([#11561](https://github.com/getpaseo/paseo/pull/11561))
- Added `paseo hub run` to start Hub manual triggers from the terminal ([#11408](https://github.com/getpaseo/paseo/pull/11408))
- Added Claude Enterprise monthly spend to the Usage card and sidebar summary ([#11514](https://github.com/getpaseo/paseo/pull/11514) by [@vivekkalyan](https://github.com/vivekkalyan))
- Added Spend credits amounts for Codex individual spend limits ([#11702](https://github.com/getpaseo/paseo/pull/11702) by [@vivekkalyan](https://github.com/vivekkalyan))
### Improved
- Opened chats faster by skipping Markdown preparation for replies without workspace links ([#11327](https://github.com/getpaseo/paseo/pull/11327))
- Reduced work on each workspace switch by updating Git actions only for the visible workspace ([#11332](https://github.com/getpaseo/paseo/pull/11332))
- Stopped the sidebar re-rendering on agent updates that change only token usage ([#11565](https://github.com/getpaseo/paseo/pull/11565) by [@jl97mcad](https://github.com/jl97mcad))
- Released hidden workspace composers after ten minutes during repeated workspace switches ([#11613](https://github.com/getpaseo/paseo/pull/11613) by [@js2me](https://github.com/js2me))
- Kept typing responsive in long multiline drafts ([#11418](https://github.com/getpaseo/paseo/pull/11418))
- Served the desktop app's web UI with Brotli and gzip compression instead of an uncompressed 25 MB bundle ([#10635](https://github.com/getpaseo/paseo/pull/10635) by [@djbclark](https://github.com/djbclark))
- Changed chat loading to one steady spinner that reveals the chat and composer together, without an Updating messages flash ([#11575](https://github.com/getpaseo/paseo/pull/11575))
- Kept the Restoring screen up until a restored workspace is ready ([#11486](https://github.com/getpaseo/paseo/pull/11486))
- Showed a spinner on a worktree row while archive checks for uncommitted changes ([#11519](https://github.com/getpaseo/paseo/pull/11519), [#11574](https://github.com/getpaseo/paseo/pull/11574) by [@cxroop](https://github.com/cxroop))
- Showed each host's icon with a status dot on host selectors ([#11568](https://github.com/getpaseo/paseo/pull/11568))
- Sent the prompt with hardware-keyboard Return on iPhone, as on iPad ([#11537](https://github.com/getpaseo/paseo/pull/11537))
- Replaced the Direct connection Advanced field with a Form and URI switch, so a pasted `tcp://` URI connects in one tap ([#11402](https://github.com/getpaseo/paseo/pull/11402) by [@thecardcheat](https://github.com/thecardcheat))
### Changed
- Changed archiving to keep a worktree that has uncommitted changes unless you confirm removal ([#11430](https://github.com/getpaseo/paseo/pull/11430))
- Changed closing a New Agent tab with an unsent draft to ask before discarding it ([#11660](https://github.com/getpaseo/paseo/pull/11660))
- Changed Cmd/Ctrl+click on a sidebar workspace to open it instead of entering select mode ([#11472](https://github.com/getpaseo/paseo/pull/11472))
- Changed agents that already reported to their caller with `send_agent_prompt` to skip the extra finished notice ([#11583](https://github.com/getpaseo/paseo/pull/11583))
### Fixed
- Fixed an attached image over 2000 px breaking every later turn in its chat ([#5119](https://github.com/getpaseo/paseo/pull/5119) by [@RUIIIOVO](https://github.com/RUIIIOVO))
- Fixed voice mode agents never speaking back when Paseo tools were off ([#11161](https://github.com/getpaseo/paseo/pull/11161))
- Fixed turning off voice mode without a daemon connection leaving the microphone on ([#11587](https://github.com/getpaseo/paseo/pull/11587) by [@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- Fixed the app taking up to a minute to reconnect after returning from the background ([#10348](https://github.com/getpaseo/paseo/pull/10348) by [@dongsun1](https://github.com/dongsun1))
- Fixed one failed WebSocket handshake doubling the reconnect delay ([#11428](https://github.com/getpaseo/paseo/pull/11428) by [@suniceman](https://github.com/suniceman))
- Fixed chats staying on Reconnecting after the app switched to a faster connection ([#11029](https://github.com/getpaseo/paseo/pull/11029) by [@tmhaha](https://github.com/tmhaha))
- Fixed Updating messages staying visible after reopening a cached chat ([#11464](https://github.com/getpaseo/paseo/pull/11464) by [@oyzh888](https://github.com/oyzh888))
- Fixed terminal output stopping after a reconnect reused its subscription ([#10433](https://github.com/getpaseo/paseo/pull/10433) by [@chirag127](https://github.com/chirag127))
- Fixed Files showing Host is not connected when the app launched before the host connected ([#11679](https://github.com/getpaseo/paseo/pull/11679))
- Fixed Created and Last prompt sorting disappearing while a host is offline ([#11728](https://github.com/getpaseo/paseo/pull/11728))
- Fixed iOS header taps scrolling the chat, Explorer or workspace list to the top ([#11262](https://github.com/getpaseo/paseo/pull/11262) by [@yzim](https://github.com/yzim))
- Fixed a file sheet dismissed while opening leaving an invisible backdrop that blocked taps ([#11317](https://github.com/getpaseo/paseo/pull/11317) by [@LiebeLee](https://github.com/LiebeLee))
- Fixed bottom sheets staying open when dismissed before their open animation started ([#11632](https://github.com/getpaseo/paseo/pull/11632))
- Fixed Android attaching nothing when the app was recreated during image selection ([#7734](https://github.com/getpaseo/paseo/pull/7734))
- Fixed pasting a file into the web composer inserting its path instead of attaching it ([#11718](https://github.com/getpaseo/paseo/pull/11718))
- Fixed Content font size not applying to existing user messages in web chat ([#11469](https://github.com/getpaseo/paseo/pull/11469) by [@bearyjd](https://github.com/bearyjd))
- Fixed `<br>` in a Markdown table cell splitting the table row ([#9587](https://github.com/getpaseo/paseo/pull/9587) by [@apple-ouyang](https://github.com/apple-ouyang))
- Fixed hidden chat rows shifting the reading position on web ([#11538](https://github.com/getpaseo/paseo/pull/11538) by [@kogekiplay](https://github.com/kogekiplay))
- Fixed a plugin slash command with an attachment being sent to the agent as a message ([#11483](https://github.com/getpaseo/paseo/pull/11483) by [@suniceman](https://github.com/suniceman))
- Fixed Archive finished subagents skipping closed subagents ([#10865](https://github.com/getpaseo/paseo/pull/10865) by [@sbhas2k](https://github.com/sbhas2k))
- Fixed Import Session missing the newest ACP sessions ([#10675](https://github.com/getpaseo/paseo/pull/10675))
- Fixed Import Session hiding the provider error while Retry runs ([#11654](https://github.com/getpaseo/paseo/pull/11654))
- Fixed setup dropping project suggestions from providers that answer after 60 seconds ([#11438](https://github.com/getpaseo/paseo/pull/11438) by [@suniceman](https://github.com/suniceman))
- Fixed Open in file manager showing for workspaces on remote hosts ([#11463](https://github.com/getpaseo/paseo/pull/11463) by [@sleroq](https://github.com/sleroq))
- Fixed Reveal in Finder for workspaces rooted at `/` ([#11206](https://github.com/getpaseo/paseo/pull/11206) by [@suniceman](https://github.com/suniceman))
- Fixed large HTML files previewing as a blank pane on desktop ([#11504](https://github.com/getpaseo/paseo/pull/11504))
- Fixed the Paseo RPM failing to install alongside other Electron RPMs ([#11354](https://github.com/getpaseo/paseo/pull/11354))
- Fixed Restart and close terminals leaving terminal programs running on Windows ([#11398](https://github.com/getpaseo/paseo/pull/11398))
- Fixed agent creation hanging behind provider checks for deleted worktrees ([#11646](https://github.com/getpaseo/paseo/pull/11646) by [@ralston](https://github.com/ralston))
- Fixed finished Claude subagents showing as running or canceled after reopening a chat or restarting the daemon ([#10848](https://github.com/getpaseo/paseo/pull/10848), [#11594](https://github.com/getpaseo/paseo/pull/11594), [#11602](https://github.com/getpaseo/paseo/pull/11602) by [@monarchmaisuriya](https://github.com/monarchmaisuriya), [@desmond-rai](https://github.com/desmond-rai))
- Fixed Claude agents started by Paseo missing Claude Code's chat titles ([#11057](https://github.com/getpaseo/paseo/pull/11057) by [@Zayooo00](https://github.com/Zayooo00))
- Fixed turns Claude starts on its own staying hidden in reopened chats until Reload ([#11405](https://github.com/getpaseo/paseo/pull/11405))
- Fixed Claude Code system notices being dropped from the chat ([#11419](https://github.com/getpaseo/paseo/pull/11419) by [@minamorl](https://github.com/minamorl))
- Fixed Claude Code's Goal set reply missing from imported chats ([#11733](https://github.com/getpaseo/paseo/pull/11733))
- Fixed listing commands in an archived Claude chat starting Claude Code ([#11521](https://github.com/getpaseo/paseo/pull/11521) by [@RawSalmon69](https://github.com/RawSalmon69))
- Fixed Stop failing on unresponsive Pi and OMP agents ([#11618](https://github.com/getpaseo/paseo/pull/11618) by [@LouisDeconinck](https://github.com/LouisDeconinck))
- Fixed Pi turns never finishing when an extension handles the prompt ([#10572](https://github.com/getpaseo/paseo/pull/10572) by [@jsilhan](https://github.com/jsilhan))
- Fixed Pi prompts timing out during extension preflight and then running anyway ([#11525](https://github.com/getpaseo/paseo/pull/11525) by [@Stelath](https://github.com/Stelath))
- Fixed Pi showing the prompt twice when an extension sends context before the reply ([#11533](https://github.com/getpaseo/paseo/pull/11533) by [@Stelath](https://github.com/Stelath))
- Fixed Pi chats skipping project skills and settings in trusted workspaces ([#11527](https://github.com/getpaseo/paseo/pull/11527) by [@patrick-motard](https://github.com/patrick-motard))
- Fixed new Pi agents failing with an old extension error after the conflict was fixed ([#11642](https://github.com/getpaseo/paseo/pull/11642))
- Fixed the OMP Fast toggle missing before the first prompt ([#11553](https://github.com/getpaseo/paseo/pull/11553))
- Fixed finished OMP form questions losing the question and chosen answer ([#11697](https://github.com/getpaseo/paseo/pull/11697), [#11706](https://github.com/getpaseo/paseo/pull/11706) by [@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- Fixed Codex sends reporting failure after 60 seconds while Codex was still starting ([#11547](https://github.com/getpaseo/paseo/pull/11547) by [@nonononull](https://github.com/nonononull))
- Fixed Codex features staying hidden behind a wrapper command such as `env codex` ([#11221](https://github.com/getpaseo/paseo/pull/11221) by [@suniceman](https://github.com/suniceman))
- Fixed answers to Codex async questions being rejected ([#11225](https://github.com/getpaseo/paseo/pull/11225) by [@suniceman](https://github.com/suniceman))
- Fixed reopening a Codex chat resetting its last-activity time ([#10760](https://github.com/getpaseo/paseo/pull/10760) by [@Juns-g](https://github.com/Juns-g))
- Fixed Antigravity subagent tool calls splitting streamed replies mid-word ([#11535](https://github.com/getpaseo/paseo/pull/11535) by [@Suhail](https://github.com/Suhail))
- Fixed Antigravity turns ending as completed after an internal executor error ([#10885](https://github.com/getpaseo/paseo/pull/10885) by [@vecyang1](https://github.com/vecyang1), [@luoph](https://github.com/luoph))
- Fixed ACP chats failing to reopen when the provider rejects the saved thinking level ([#10333](https://github.com/getpaseo/paseo/pull/10333))
- Fixed the ACP thinking picker keeping the old level after a mode change ([#11478](https://github.com/getpaseo/paseo/pull/11478) by [@suniceman](https://github.com/suniceman))
- Fixed ACP setting errors leaving out the provider's explanation ([#11431](https://github.com/getpaseo/paseo/pull/11431) by [@suniceman](https://github.com/suniceman))
- Fixed Muse usage losing token totals after a context update ([#11389](https://github.com/getpaseo/paseo/pull/11389) by [@suniceman](https://github.com/suniceman))
- Fixed the Claude Usage card staying rate limited for hours ([#11597](https://github.com/getpaseo/paseo/pull/11597))
- Fixed Claude Usage showing the old plan after a subscription change ([#11685](https://github.com/getpaseo/paseo/pull/11685) by [@matchy233](https://github.com/matchy233))
- Fixed Codex Usage showing 0 credits for accounts without a credit balance ([#11515](https://github.com/getpaseo/paseo/pull/11515) by [@vivekkalyan](https://github.com/vivekkalyan))
- Fixed Copilot Usage failing when the premium request quota is exceeded ([#11006](https://github.com/getpaseo/paseo/pull/11006) by [@nathanmcnulty](https://github.com/nathanmcnulty))
- Fixed Copilot Usage reading the token of another host or account from GitHub CLI ([#11689](https://github.com/getpaseo/paseo/pull/11689))
- Fixed Create PR from a fork opening the pull request on the fork instead of its parent ([#11436](https://github.com/getpaseo/paseo/pull/11436) by [@suniceman](https://github.com/suniceman))
- Fixed a fork pull request disappearing from its worktree workspace after the first push ([#11441](https://github.com/getpaseo/paseo/pull/11441) by [@suniceman](https://github.com/suniceman))
- Fixed Create PR returning the API URL instead of the pull request page ([#11439](https://github.com/getpaseo/paseo/pull/11439) by [@suniceman](https://github.com/suniceman))
- Fixed GitHub check details failing to load annotations ([#11476](https://github.com/getpaseo/paseo/pull/11476) by [@suniceman](https://github.com/suniceman))
- Fixed GitHub check details dropping annotations when a job log is unavailable ([#11509](https://github.com/getpaseo/paseo/pull/11509))
- Fixed Gitea and Forgejo draft pull requests showing as open and conflicting ([#11545](https://github.com/getpaseo/paseo/pull/11545) by [@goodideal](https://github.com/goodideal))
- Fixed workspaces with an IPv6 Git remote not detecting their Gitea or Forgejo forge ([#11692](https://github.com/getpaseo/paseo/pull/11692) by [@jamescordrey-ops](https://github.com/jamescordrey-ops))
- Fixed workspace refreshes stalling when a `gh` or `glab` command ignores its timeout ([#11252](https://github.com/getpaseo/paseo/pull/11252), [#11411](https://github.com/getpaseo/paseo/pull/11411))
- Fixed scheduled runs in a Paseo worktree creating a duplicate project ([#10378](https://github.com/getpaseo/paseo/pull/10378) by [@kotusenka](https://github.com/kotusenka))
- Fixed archiving an agent failing with Unknown agent while another archive or close runs ([#10590](https://github.com/getpaseo/paseo/pull/10590) by [@apple-ouyang](https://github.com/apple-ouyang))
- Fixed an agent's last reply being cut off when a notification arrived mid-reply ([#11578](https://github.com/getpaseo/paseo/pull/11578) by [@KiritoXDone](https://github.com/KiritoXDone))
- Fixed a queued message running in the mode of a prompt sent after it ([#11722](https://github.com/getpaseo/paseo/pull/11722))
- Fixed `paseo ls --json` dropping timestamps and background work ([#11423](https://github.com/getpaseo/paseo/pull/11423) by [@KiritoXDone](https://github.com/KiritoXDone))
- Fixed `paseo inspect` and `paseo ls` hiding the model for Cursor Auto ([#11693](https://github.com/getpaseo/paseo/pull/11693))
- Fixed `paseo workspace ls` reporting a wrong password as a stopped daemon ([#11676](https://github.com/getpaseo/paseo/pull/11676) by [@chirag127](https://github.com/chirag127))
- Fixed `paseo daemon status` leaving out unconfirmed terminal cleanup ([#11658](https://github.com/getpaseo/paseo/pull/11658) by [@chirag127](https://github.com/chirag127))
- Fixed CLI archive, detach and reload scanning all agent history for a full agent ID ([#11617](https://github.com/getpaseo/paseo/pull/11617) by [@maci0](https://github.com/maci0))
### Security
- Blocked client file access to the daemon's own state in the Paseo home directory, and warned when a saved host's daemon key changes ([#11452](https://github.com/getpaseo/paseo/pull/11452))
- Restricted loopback origin matching to `localhost`, `127.0.0.1` and `::1` for daemon WebSocket and HTTP requests ([#11686](https://github.com/getpaseo/paseo/pull/11686))
- Stopped images in pull request comments and reviews from loading files from the host ([#11699](https://github.com/getpaseo/paseo/pull/11699))
- Stopped `.worktreeinclude` from copying local files into worktrees from fork pull requests ([#11709](https://github.com/getpaseo/paseo/pull/11709))
- Rejected schedule IDs that point outside the schedules directory ([#11727](https://github.com/getpaseo/paseo/pull/11727))
### Plugins
- Added a workspace layout API so plugins can open, move and close panes and tabs ([#11328](https://github.com/getpaseo/paseo/pull/11328))
- Added `requirements.app` to set a separate minimum app version from the daemon's ([#11494](https://github.com/getpaseo/paseo/pull/11494) by [@mcowger](https://github.com/mcowger))
- Fixed a plugin error in a press handler or timer closing the iOS and Android app ([#11412](https://github.com/getpaseo/paseo/pull/11412))
- Fixed plugin operations deleting plugin entries added to `config.json` by hand ([#11501](https://github.com/getpaseo/paseo/pull/11501) by [@matchy233](https://github.com/matchy233))
- Fixed registry plugin installs failing with Missing npm artifact when npm leaves registry URLs out of lockfiles ([#11656](https://github.com/getpaseo/paseo/pull/11656) by [@Brandon168](https://github.com/Brandon168))
- Fixed local plugin reloads taking 12 to 21 seconds when the daemon runs under a large directory ([#11653](https://github.com/getpaseo/paseo/pull/11653))
## 0.18.2 - 2026-11-30
- **Redesigned model picker:** Pick models from a two-pane desktop view with cross-provider search, an in-place phone drawer with a thinking slider, and per-provider model lists in settings. ([#11186](https://github.com/getpaseo/paseo/pull/11186), [#11280](https://github.com/getpaseo/paseo/pull/11280), [#11295](https://github.com/getpaseo/paseo/pull/11295), [#11371](https://github.com/getpaseo/paseo/pull/11371), [#11313](https://github.com/getpaseo/paseo/pull/11313))
+144
View File
@@ -1,5 +1,149 @@
# Changelog
## 0.19.0-beta.1 - 2026-12-02
- **对话中切换 Provider**:可将对话切换到其他 Provider 并保留对话内容,对话记录现在存储在主机上。([#11410](https://github.com/getpaseo/paseo/pull/11410))
- **排队消息重启不丢失**:排队消息现在保存在主机上,应用重新加载、切换设备或 daemon 重启后都不会丢失。([#11424](https://github.com/getpaseo/paseo/pull/11424), [#11566](https://github.com/getpaseo/paseo/pull/11566), [#11740](https://github.com/getpaseo/paseo/pull/11740))
- **一键开关 Agent 工具**:Agent 工具现在由一个 **启用工具** 设置统一控制,包含编排、定时任务、PR 监控和浏览器分组,并默认开启。([#11189](https://github.com/getpaseo/paseo/pull/11189))
- **已连接设备列表**:**设置 → 设备** 现在会显示哪些客户端和主机已连接,以及各自可以访问的内容。([#11209](https://github.com/getpaseo/paseo/pull/11209))
- **插件评分卡**:应用和 paseo.sh 上的插件页面现在会显示评分卡、更新历史、相关插件和赞助链接。([#11563](https://github.com/getpaseo/paseo/pull/11563), [#11674](https://github.com/getpaseo/paseo/pull/11674), [#11691](https://github.com/getpaseo/paseo/pull/11691))
- **通过隧道共享服务**:可从 Scripts 菜单将正在运行的工作区服务共享到公网地址,开发服务器也会保留实时重载连接。服务现在通过 `localhost:<port>` 打开,`*.localhost` 服务地址已移除。([#11490](https://github.com/getpaseo/paseo/pull/11490))
- **Agent 运行时更省资源**:运行中的 Agent 占用的 CPU、GPU 和电量大幅减少,状态环、加载指示器和工具调用动画也更轻量。([#11456](https://github.com/getpaseo/paseo/pull/11456), [#11474](https://github.com/getpaseo/paseo/pull/11474), [#11564](https://github.com/getpaseo/paseo/pull/11564), [#11586](https://github.com/getpaseo/paseo/pull/11586), [#11591](https://github.com/getpaseo/paseo/pull/11591),贡献者:[@djbclark](https://github.com/djbclark), [@luoph](https://github.com/luoph), [@mariotaku](https://github.com/mariotaku))
- **更稳定的流式回复**:流式回复在到达时即显示最终格式,长回复的渲染也不再随长度增长而变慢。([#11572](https://github.com/getpaseo/paseo/pull/11572), [#11582](https://github.com/getpaseo/paseo/pull/11582),贡献者:[@luoph](https://github.com/luoph))
- **更快的移动端启动**:移动端冷启动后会更快显示上次的工作区,在 Android 上约快 0.7 秒。([#11390](https://github.com/getpaseo/paseo/pull/11390),贡献者:[@luoph](https://github.com/luoph), [@maci0](https://github.com/maci0))
- **桌面端浏览器配置文件**:桌面端浏览器标签页可以使用不同颜色的独立配置文件,便于在同一网站上同时登录两个账号。([#10357](https://github.com/getpaseo/paseo/pull/10357),贡献者:[@clkao](https://github.com/clkao))
- **下滑收起 iOS 键盘**:向下拖动对话即可收起 iOS 键盘,键盘打开时对话控件首次点击即可生效。([#11625](https://github.com/getpaseo/paseo/pull/11625))
### 破坏性变更
- Paseo CLI 和 daemon 现在需要 Node.js 22.16.0 或更高版本 ([#11410](https://github.com/getpaseo/paseo/pull/11410))
### 新增
- 在用量中新增 Antigravity 配额,仅在选择 **刷新** 时更新 ([#11585](https://github.com/getpaseo/paseo/pull/11585))
- 为 OpenCode v2 Agent 新增仅回退对话的功能 ([#11675](https://github.com/getpaseo/paseo/pull/11675))
- 为通过其他主机连接的主机上的工作区新增桌面端浏览器标签页 ([#11561](https://github.com/getpaseo/paseo/pull/11561))
- 新增 `paseo hub run`,可从终端启动 Hub 手动触发器 ([#11408](https://github.com/getpaseo/paseo/pull/11408))
- 在用量卡片和侧边栏摘要中新增 Claude Enterprise 月度支出 ([#11514](https://github.com/getpaseo/paseo/pull/11514),贡献者:[@vivekkalyan](https://github.com/vivekkalyan))
- 为 Codex 个人支出限额新增 Spend credits 金额显示 ([#11702](https://github.com/getpaseo/paseo/pull/11702),贡献者:[@vivekkalyan](https://github.com/vivekkalyan))
### 改进
- 对不含工作区链接的回复跳过 Markdown 预处理,加快对话打开速度 ([#11327](https://github.com/getpaseo/paseo/pull/11327))
- 仅为可见工作区更新 Git 操作,减少每次切换工作区的开销 ([#11332](https://github.com/getpaseo/paseo/pull/11332))
- 仅改变 token 用量的 Agent 更新不再触发侧边栏重新渲染 ([#11565](https://github.com/getpaseo/paseo/pull/11565),贡献者:[@jl97mcad](https://github.com/jl97mcad))
- 反复切换工作区时,隐藏的工作区 Composer 会在十分钟后释放 ([#11613](https://github.com/getpaseo/paseo/pull/11613),贡献者:[@js2me](https://github.com/js2me))
- 在较长的多行草稿中保持输入流畅 ([#11418](https://github.com/getpaseo/paseo/pull/11418))
- 桌面应用的网页界面改用 Brotli 和 gzip 压缩传输,不再发送未压缩的 25 MB 包 ([#10635](https://github.com/getpaseo/paseo/pull/10635),贡献者:[@djbclark](https://github.com/djbclark))
- 对话加载改为显示一个稳定的加载指示器,并同时显示对话和 Composer,不再闪现 **正在更新消息** ([#11575](https://github.com/getpaseo/paseo/pull/11575))
- 恢复工作区时保持 Restoring 界面,直到工作区就绪 ([#11486](https://github.com/getpaseo/paseo/pull/11486))
- 归档检查未提交的更改时,在 worktree 行上显示加载指示器 ([#11519](https://github.com/getpaseo/paseo/pull/11519), [#11574](https://github.com/getpaseo/paseo/pull/11574),贡献者:[@cxroop](https://github.com/cxroop))
- 在主机选择器上显示各主机的图标和状态圆点 ([#11568](https://github.com/getpaseo/paseo/pull/11568))
- iPhone 上按硬件键盘的 Return 键即可发送提示词,与 iPad 一致 ([#11537](https://github.com/getpaseo/paseo/pull/11537))
- 将 **直接连接** 的 Advanced 字段替换为 **表单** 与 URI 切换,粘贴 `tcp://` URI 后一次点击即可连接 ([#11402](https://github.com/getpaseo/paseo/pull/11402),贡献者:[@thecardcheat](https://github.com/thecardcheat))
### 变更
- 归档时如果 worktree 有未提交的更改,除非确认删除,否则保留该 worktree ([#11430](https://github.com/getpaseo/paseo/pull/11430))
- 关闭带有未发送草稿的 **新建 Agent** 标签页时,会先询问是否丢弃草稿 ([#11660](https://github.com/getpaseo/paseo/pull/11660))
- 在侧边栏中 Cmd/Ctrl+点击工作区改为打开该工作区,而不再进入选择模式 ([#11472](https://github.com/getpaseo/paseo/pull/11472))
- 已通过 `send_agent_prompt` 向调用方汇报的 Agent 不再额外发送完成通知 ([#11583](https://github.com/getpaseo/paseo/pull/11583))
### 修复
- 修复附加超过 2000 px 的图片后,该对话之后的每一轮都失败的问题 ([#5119](https://github.com/getpaseo/paseo/pull/5119),贡献者:[@RUIIIOVO](https://github.com/RUIIIOVO))
- 修复关闭 Paseo 工具时语音模式 Agent 始终不回话的问题 ([#11161](https://github.com/getpaseo/paseo/pull/11161))
- 修复在没有 daemon 连接时关闭语音模式后麦克风仍保持开启的问题 ([#11587](https://github.com/getpaseo/paseo/pull/11587),贡献者:[@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- 修复应用从后台返回后需要长达一分钟才能重新连接的问题 ([#10348](https://github.com/getpaseo/paseo/pull/10348),贡献者:[@dongsun1](https://github.com/dongsun1))
- 修复一次 WebSocket 握手失败就使重连延迟翻倍的问题 ([#11428](https://github.com/getpaseo/paseo/pull/11428),贡献者:[@suniceman](https://github.com/suniceman))
- 修复应用切换到更快的连接后,对话仍停留在 **正在重新连接** 的问题 ([#11029](https://github.com/getpaseo/paseo/pull/11029),贡献者:[@tmhaha](https://github.com/tmhaha))
- 修复重新打开已缓存的对话后 **正在更新消息** 一直显示的问题 ([#11464](https://github.com/getpaseo/paseo/pull/11464),贡献者:[@oyzh888](https://github.com/oyzh888))
- 修复重连复用订阅后终端输出停止的问题 ([#10433](https://github.com/getpaseo/paseo/pull/10433),贡献者:[@chirag127](https://github.com/chirag127))
- 修复应用在主机连接前启动时 **文件** 显示 **Host 未连接** 的问题 ([#11679](https://github.com/getpaseo/paseo/pull/11679))
- 修复主机离线时 **创建时间** 和 **最近提示词** 排序选项消失的问题 ([#11728](https://github.com/getpaseo/paseo/pull/11728))
- 修复在 iOS 上点击标题栏会将对话、Explorer 或工作区列表滚动到顶部的问题 ([#11262](https://github.com/getpaseo/paseo/pull/11262),贡献者:[@yzim](https://github.com/yzim))
- 修复文件面板在打开过程中被关闭后,留下阻挡点击的不可见遮罩的问题 ([#11317](https://github.com/getpaseo/paseo/pull/11317),贡献者:[@LiebeLee](https://github.com/LiebeLee))
- 修复底部面板在打开动画开始前被关闭后仍保持打开的问题 ([#11632](https://github.com/getpaseo/paseo/pull/11632))
- 修复 Android 在选择图片期间重建应用后未附加任何内容的问题 ([#7734](https://github.com/getpaseo/paseo/pull/7734))
- 修复在网页版 Composer 中粘贴文件时插入文件路径而不是添加附件的问题 ([#11718](https://github.com/getpaseo/paseo/pull/11718))
- 修复 **内容字体大小** 未应用到网页端对话中已有用户消息的问题 ([#11469](https://github.com/getpaseo/paseo/pull/11469),贡献者:[@bearyjd](https://github.com/bearyjd))
- 修复 Markdown 表格单元格中的 `<br>` 拆分表格行的问题 ([#9587](https://github.com/getpaseo/paseo/pull/9587),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
- 修复网页端隐藏的对话行导致阅读位置偏移的问题 ([#11538](https://github.com/getpaseo/paseo/pull/11538),贡献者:[@kogekiplay](https://github.com/kogekiplay))
- 修复带附件的插件斜杠命令被当作消息发送给 Agent 的问题 ([#11483](https://github.com/getpaseo/paseo/pull/11483),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 **归档已完成的 subagent** 跳过已关闭子 Agent 的问题 ([#10865](https://github.com/getpaseo/paseo/pull/10865),贡献者:[@sbhas2k](https://github.com/sbhas2k))
- 修复 **导入会话** 遗漏最新 ACP 会话的问题 ([#10675](https://github.com/getpaseo/paseo/pull/10675))
- 修复 **导入会话** 在 **重试** 期间隐藏 Provider 错误的问题 ([#11654](https://github.com/getpaseo/paseo/pull/11654))
- 修复设置时丢弃 60 秒后才响应的 Provider 所给出的项目建议的问题 ([#11438](https://github.com/getpaseo/paseo/pull/11438),贡献者:[@suniceman](https://github.com/suniceman))
- 修复远程主机上的工作区显示 Open in file manager 的问题 ([#11463](https://github.com/getpaseo/paseo/pull/11463),贡献者:[@sleroq](https://github.com/sleroq))
- 修复根目录为 `/` 的工作区无法使用 Reveal in Finder 的问题 ([#11206](https://github.com/getpaseo/paseo/pull/11206),贡献者:[@suniceman](https://github.com/suniceman))
- 修复桌面端预览大型 HTML 文件时显示空白面板的问题 ([#11504](https://github.com/getpaseo/paseo/pull/11504))
- 修复 Paseo RPM 无法与其他 Electron RPM 同时安装的问题 ([#11354](https://github.com/getpaseo/paseo/pull/11354))
- 修复 Windows 上 Restart and close 终端后终端程序仍在运行的问题 ([#11398](https://github.com/getpaseo/paseo/pull/11398))
- 修复已删除 worktree 的 Provider 检查导致 Agent 创建卡住的问题 ([#11646](https://github.com/getpaseo/paseo/pull/11646),贡献者:[@ralston](https://github.com/ralston))
- 修复重新打开对话或重启 daemon 后,已完成的 Claude 子 Agent 显示为运行中或已取消的问题 ([#10848](https://github.com/getpaseo/paseo/pull/10848), [#11594](https://github.com/getpaseo/paseo/pull/11594), [#11602](https://github.com/getpaseo/paseo/pull/11602),贡献者:[@monarchmaisuriya](https://github.com/monarchmaisuriya), [@desmond-rai](https://github.com/desmond-rai))
- 修复由 Paseo 启动的 Claude Agent 缺少 Claude Code 对话标题的问题 ([#11057](https://github.com/getpaseo/paseo/pull/11057),贡献者:[@Zayooo00](https://github.com/Zayooo00))
- 修复 Claude 自行开始的轮次在重新打开的对话中被隐藏、直到 **重新加载** 才显示的问题 ([#11405](https://github.com/getpaseo/paseo/pull/11405))
- 修复 Claude Code 系统通知从对话中丢失的问题 ([#11419](https://github.com/getpaseo/paseo/pull/11419),贡献者:[@minamorl](https://github.com/minamorl))
- 修复导入的 Claude Code 对话中缺少 Goal set 回复的问题 ([#11733](https://github.com/getpaseo/paseo/pull/11733))
- 修复在已归档的 Claude 对话中列出命令时启动 Claude Code 的问题 ([#11521](https://github.com/getpaseo/paseo/pull/11521),贡献者:[@RawSalmon69](https://github.com/RawSalmon69))
- 修复 **停止** 对无响应的 Pi 和 OMP Agent 无效的问题 ([#11618](https://github.com/getpaseo/paseo/pull/11618),贡献者:[@LouisDeconinck](https://github.com/LouisDeconinck))
- 修复扩展处理提示词时 Pi 轮次永远无法结束的问题 ([#10572](https://github.com/getpaseo/paseo/pull/10572),贡献者:[@jsilhan](https://github.com/jsilhan))
- 修复 Pi 提示词在扩展预检期间超时后仍继续执行的问题 ([#11525](https://github.com/getpaseo/paseo/pull/11525),贡献者:[@Stelath](https://github.com/Stelath))
- 修复扩展在回复前发送上下文时 Pi 重复显示提示词的问题 ([#11533](https://github.com/getpaseo/paseo/pull/11533),贡献者:[@Stelath](https://github.com/Stelath))
- 修复在受信任的工作区中 Pi 对话跳过项目技能和设置的问题 ([#11527](https://github.com/getpaseo/paseo/pull/11527),贡献者:[@patrick-motard](https://github.com/patrick-motard))
- 修复冲突解决后新建 Pi Agent 仍报旧扩展错误的问题 ([#11642](https://github.com/getpaseo/paseo/pull/11642))
- 修复首次发送提示词前缺少 OMP **快速** 开关的问题 ([#11553](https://github.com/getpaseo/paseo/pull/11553))
- 修复已完成的 OMP 表单提问不再显示提问内容和所选答案的问题 ([#11697](https://github.com/getpaseo/paseo/pull/11697), [#11706](https://github.com/getpaseo/paseo/pull/11706),贡献者:[@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- 修复 Codex 仍在启动时发送消息于 60 秒后报告失败的问题 ([#11547](https://github.com/getpaseo/paseo/pull/11547),贡献者:[@nonononull](https://github.com/nonononull))
- 修复通过 `env codex` 等包装命令启动时 Codex 功能被隐藏的问题 ([#11221](https://github.com/getpaseo/paseo/pull/11221),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 Codex 异步提问的回答被拒绝的问题 ([#11225](https://github.com/getpaseo/paseo/pull/11225),贡献者:[@suniceman](https://github.com/suniceman))
- 修复重新打开 Codex 对话时重置其最近活动时间的问题 ([#10760](https://github.com/getpaseo/paseo/pull/10760),贡献者:[@Juns-g](https://github.com/Juns-g))
- 修复 Antigravity 子 Agent 工具调用将流式回复从单词中间截断的问题 ([#11535](https://github.com/getpaseo/paseo/pull/11535),贡献者:[@Suhail](https://github.com/Suhail))
- 修复 Antigravity 轮次在内部执行器出错后仍以完成状态结束的问题 ([#10885](https://github.com/getpaseo/paseo/pull/10885),贡献者:[@vecyang1](https://github.com/vecyang1), [@luoph](https://github.com/luoph))
- 修复 Provider 拒绝已保存的思考强度时 ACP 对话无法重新打开的问题 ([#10333](https://github.com/getpaseo/paseo/pull/10333))
- 修复切换模式后 ACP 思考强度选择器仍保留旧级别的问题 ([#11478](https://github.com/getpaseo/paseo/pull/11478),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 ACP 设置错误中缺少 Provider 说明的问题 ([#11431](https://github.com/getpaseo/paseo/pull/11431),贡献者:[@suniceman](https://github.com/suniceman))
- 修复上下文更新后 Muse 用量丢失 token 总数的问题 ([#11389](https://github.com/getpaseo/paseo/pull/11389),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 Claude 用量卡片持续数小时显示受速率限制的问题 ([#11597](https://github.com/getpaseo/paseo/pull/11597))
- 修复订阅变更后 Claude 用量仍显示旧套餐的问题 ([#11685](https://github.com/getpaseo/paseo/pull/11685),贡献者:[@matchy233](https://github.com/matchy233))
- 修复没有额度余额的账号 Codex 用量显示 0 额度的问题 ([#11515](https://github.com/getpaseo/paseo/pull/11515),贡献者:[@vivekkalyan](https://github.com/vivekkalyan))
- 修复超出高级请求配额时 Copilot 用量获取失败的问题 ([#11006](https://github.com/getpaseo/paseo/pull/11006),贡献者:[@nathanmcnulty](https://github.com/nathanmcnulty))
- 修复 Copilot 用量从 GitHub CLI 读取其他 GitHub 主机或账号 token 的问题 ([#11689](https://github.com/getpaseo/paseo/pull/11689))
- 修复从 fork 执行 **创建 PR** 时将 PR 创建在 fork 而非其上游仓库的问题 ([#11436](https://github.com/getpaseo/paseo/pull/11436),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 fork PR 在首次推送后从其 worktree 工作区中消失的问题 ([#11441](https://github.com/getpaseo/paseo/pull/11441),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 **创建 PR** 返回 API 地址而非 PR 页面的问题 ([#11439](https://github.com/getpaseo/paseo/pull/11439),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 GitHub 检查详情无法加载注释的问题 ([#11476](https://github.com/getpaseo/paseo/pull/11476),贡献者:[@suniceman](https://github.com/suniceman))
- 修复作业日志不可用时 GitHub 检查详情丢失注释的问题 ([#11509](https://github.com/getpaseo/paseo/pull/11509))
- 修复 Gitea 和 Forgejo 的草稿 PR 显示为已打开且存在冲突的问题 ([#11545](https://github.com/getpaseo/paseo/pull/11545),贡献者:[@goodideal](https://github.com/goodideal))
- 修复 Git 远程地址为 IPv6 的工作区无法识别其 Gitea 或 Forgejo forge 的问题 ([#11692](https://github.com/getpaseo/paseo/pull/11692),贡献者:[@jamescordrey-ops](https://github.com/jamescordrey-ops))
- 修复 `gh` 或 `glab` 命令忽略超时导致工作区刷新卡住的问题 ([#11252](https://github.com/getpaseo/paseo/pull/11252), [#11411](https://github.com/getpaseo/paseo/pull/11411))
- 修复在 Paseo worktree 中运行定时任务时创建重复项目的问题 ([#10378](https://github.com/getpaseo/paseo/pull/10378),贡献者:[@kotusenka](https://github.com/kotusenka))
- 修复在其他归档或关闭操作进行时归档 Agent 报 Unknown agent 错误的问题 ([#10590](https://github.com/getpaseo/paseo/pull/10590),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
- 修复 Agent 回复过程中收到通知导致最后一条回复被截断的问题 ([#11578](https://github.com/getpaseo/paseo/pull/11578),贡献者:[@KiritoXDone](https://github.com/KiritoXDone))
- 修复排队消息以之后发送的提示词的模式运行的问题 ([#11722](https://github.com/getpaseo/paseo/pull/11722))
- 修复 `paseo ls --json` 丢失时间戳和后台任务的问题 ([#11423](https://github.com/getpaseo/paseo/pull/11423),贡献者:[@KiritoXDone](https://github.com/KiritoXDone))
- 修复 `paseo inspect` 和 `paseo ls` 隐藏 Cursor Auto 模型的问题 ([#11693](https://github.com/getpaseo/paseo/pull/11693))
- 修复 `paseo workspace ls` 将密码错误报告为 daemon 已停止的问题 ([#11676](https://github.com/getpaseo/paseo/pull/11676),贡献者:[@chirag127](https://github.com/chirag127))
- 修复 `paseo daemon status` 遗漏未确认的终端清理的问题 ([#11658](https://github.com/getpaseo/paseo/pull/11658),贡献者:[@chirag127](https://github.com/chirag127))
- 修复 CLI 归档、分离和重新加载时为匹配完整 Agent ID 而扫描全部 Agent 历史记录的问题 ([#11617](https://github.com/getpaseo/paseo/pull/11617),贡献者:[@maci0](https://github.com/maci0))
### 安全
- 阻止客户端访问 Paseo 主目录中 daemon 自身的状态文件,并在已保存主机的 daemon 密钥变化时发出警告 ([#11452](https://github.com/getpaseo/paseo/pull/11452))
- 将 daemon WebSocket 和 HTTP 请求的回环来源匹配限制为 `localhost`、`127.0.0.1` 和 `::1` ([#11686](https://github.com/getpaseo/paseo/pull/11686))
- 禁止 PR 评论和审查中的图片读取主机上的文件 ([#11699](https://github.com/getpaseo/paseo/pull/11699))
- 禁止 `.worktreeinclude` 将本地文件复制到来自 fork PR 的 worktree 中 ([#11709](https://github.com/getpaseo/paseo/pull/11709))
- 拒绝指向定时任务目录之外的定时任务 ID ([#11727](https://github.com/getpaseo/paseo/pull/11727))
### 插件
- 新增工作区布局 API,插件可以打开、移动和关闭面板与标签页 ([#11328](https://github.com/getpaseo/paseo/pull/11328))
- 新增 `requirements.app`,可单独设置与 daemon 不同的最低应用版本 ([#11494](https://github.com/getpaseo/paseo/pull/11494),贡献者:[@mcowger](https://github.com/mcowger))
- 修复插件在按下处理函数或定时器中出错导致 iOS 和 Android 应用关闭的问题 ([#11412](https://github.com/getpaseo/paseo/pull/11412))
- 修复插件操作删除手动添加到 `config.json` 中插件条目的问题 ([#11501](https://github.com/getpaseo/paseo/pull/11501),贡献者:[@matchy233](https://github.com/matchy233))
- 修复 npm 在锁文件中省略 registry 地址时,注册表插件安装报 Missing npm artifact 错误的问题 ([#11656](https://github.com/getpaseo/paseo/pull/11656),贡献者:[@Brandon168](https://github.com/Brandon168))
- 修复 daemon 运行在大型目录下时,本地插件重新加载耗时 12 至 21 秒的问题 ([#11653](https://github.com/getpaseo/paseo/pull/11653))
## 0.18.2 - 2026-11-30
- **重新设计的模型选择器**:桌面端采用支持跨 Provider 搜索的双栏视图,手机端合并为带思考强度滑块的单层抽屉,并支持在设置中按 Provider 筛选常用模型。([#11186](https://github.com/getpaseo/paseo/pull/11186), [#11280](https://github.com/getpaseo/paseo/pull/11280), [#11295](https://github.com/getpaseo/paseo/pull/11295), [#11371](https://github.com/getpaseo/paseo/pull/11371), [#11313](https://github.com/getpaseo/paseo/pull/11313))
+1 -1
View File
@@ -60,7 +60,7 @@
<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>Hoplite runs swarms of coding agents in the cloud.</sub></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>
<td align="center" width="33%"><a href="https://logits.com/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/logits-on-dark.svg"><img src="packages/website/public/sponsors/logits-on-light.svg" alt="Logits" height="40"></picture></a><br><sub>Optimized intelligence per token, second, dollar.</sub></td>
</tr>
</table>
+1 -1
View File
@@ -54,7 +54,7 @@
<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>Hoplite runs swarms of coding agents in the cloud.</sub></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>
<td align="center" width="33%"><a href="https://logits.com/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/logits-on-dark.svg"><img src="packages/website/public/sponsors/logits-on-light.svg" alt="Logits" height="40"></picture></a><br><sub>Optimized intelligence per token, second, dollar.</sub></td>
</tr>
</table>
+1 -1
View File
@@ -59,7 +59,7 @@ Paseo is an open source agentic development environment for desktop, mobile, web
<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>Hoplite runs swarms of coding agents in the cloud.</sub></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>
<td align="center" width="33%"><a href="https://logits.com/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/logits-on-dark.svg"><img src="packages/website/public/sponsors/logits-on-light.svg" alt="Logits" height="56"></picture></a><br><sub>Optimized intelligence per token, second, dollar.</sub></td>
</tr>
</table>
+1 -1
View File
@@ -60,7 +60,7 @@
<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>Hoplite runs swarms of coding agents in the cloud.</sub></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>
<td align="center" width="33%"><a href="https://logits.com/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/logits-on-dark.svg"><img src="packages/website/public/sponsors/logits-on-light.svg" alt="Logits" height="40"></picture></a><br><sub>Optimized intelligence per token, second, dollar.</sub></td>
</tr>
</table>
+20 -14
View File
@@ -178,9 +178,9 @@ the switch. Promoting the switch cuts the running turn once the target is known
already on the target takes the message and its settings as a plain prompt. A switch that fails keeps
the message and holds the queue; the reason is in the daemon log.
The queue is saved in `$PASEO_HOME/agent-queues/` ([data model](data-model.md#directory-layout)),
The queue is saved in `$PASEO_HOME/paseo.db` ([data model](data-model.md#agent-message-queues)),
and a message is saved before its receipt is sent. Inline images are first saved as uploads, so the
queue file holds references. An empty message is refused, and a recipient holds at most 100
queue holds references. An empty message is refused, and a recipient holds at most 100
messages.
A message is marked `dispatching` before the provider can receive it and removed when the provider
@@ -236,17 +236,23 @@ wake-ups), or the child's own outstanding finish subscriptions as a caller. Hear
crons, change-request watches, and other daemon background items never count: they are external
triggers, not work the caller is waiting for.
Every turn end reports `finished` at once. When work is still pending, the notice names it and the
subscription follows the child: each later turn end reports `finished` again, and the child settling
with nothing pending sends a final `finished` and removes the subscription, even when the work
drains without another turn. Reporting at once keeps a long-lived task, such as a dev server, from
leaving the caller without the child's reply. Following is what lets the caller hear the reply a
background task wakes up later ([#6346](https://github.com/getpaseo/paseo/issues/6346)). A work change
that leaves work pending sends nothing. Errors, permission requests, and closes report as they
happen. `followingSince` is stored when following starts, so a restart keeps following instead of
waiting for another turn end. After 24 hours of following, the caller gets a final `finished` with
the child's last reply and the subscription ends. Remote children and providers without the probe
report their first turn end as a settled `finished`.
Every turn end reports `finished` at once, unless the child already sent an agent message to its
caller during that turn and started no further tool work afterwards. In that case the child's
message already delivered its reply, so the redundant `finished` notice is skipped: a settled watch
ends silently, and a watch with pending work keeps following silently until a later turn starts or
the work drains. Starting another non-reporting tool call or a new turn clears that mark (plain text output after the
message does not), and errors, permission requests, cancellations, and closes are never suppressed. When work is still
pending on an unreported turn end, the notice names it and the subscription follows the child: each
later turn end reports `finished` again, and the child settling with nothing pending sends a final
`finished` and removes the subscription, even when the work drains without another turn. Reporting
at once keeps a long-lived task, such as a dev server, from leaving the caller without the child's
reply. Following is what lets the caller hear the reply a background task wakes up later
([#6346](https://github.com/getpaseo/paseo/issues/6346)). A work change that leaves work pending
sends nothing. Errors, permission requests, and closes report as they happen. `followingSince` is
stored when following starts, so a restart keeps following instead of waiting for another turn end.
After 24 hours of following, the caller gets a final `finished` with the child's last reply and the
subscription ends. Remote children and providers without the probe report their first turn end as a
settled `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.
@@ -444,7 +450,7 @@ the message is queued, so any device can open a row's attachments.
Rows take these commands:
- **Send now** promotes the row with your send behavior setting: `steer`, otherwise `interrupt`.
- **Send now** promotes the row as `interrupt` when your send behavior setting is `interrupt`, and as `steer` otherwise (including `queue`, where the row is already waiting and Send now should not cancel the turn).
- **Edit** is offered on your own messages only. It withdraws the row, then replaces the composer
draft with its text and attachments, and stages the row's provider switch again. If the host
already started sending the row, the draft stays as it is.
+12 -4
View File
@@ -29,7 +29,7 @@ So arrival sets a _target_ and the reveal rate is derived from the backlog inste
- **The coalescer is leading + trailing.** The first delta after an idle window flushes synchronously; only the rest of the burst waits for the trailing timer. Reverting to trailing-only adds a full window to the first character of every turn. Same shape and the same reason as `TerminalOutputCoalescer`.
- **The leading flush adds a canonical row, and that is fine.** A burst's first chunk lands as its own timeline row. `mergeAssistantChunks` / `mergeReasoningChunks` in `timeline-projection.ts` join contiguous same-turn rows, and clients read the projected timeline, so history is unaffected. Tests that assert on raw rows have to account for the extra row; tests that assert on what a client sees do not.
- **The store holds the full text; only the rendered slice is paced.** Copy, selection, the chat outline, and scroll geometry all read the same string the user can see. Pacing the store instead would leave the bottom anchor chasing a content height that is ahead of the reveal.
- **One source assistant message is one display row.** Presentation projects plugin output and caches unchanged history. The shared [Markdown renderer](markdown-renderer.md) owns rendering on every platform. Chat paces the visible source and applies a 32,000-character render cap on web; native keeps the complete message. The native renderer keeps closed blocks in a stable head and sends the paced suffix to a separate tail view during streaming; completion reunites them for selection. This stays inside the renderer, without promoting blocks into timeline history.
- **One source assistant message is one display row.** Presentation projects plugin output and caches unchanged history. The shared [Markdown renderer](markdown-renderer.md) owns rendering on every platform. Chat paces the visible source and applies a 32,000-character render cap on web; native keeps the complete message. While streaming, the renderer keeps closed blocks in head parts and sends the paced suffix to a separate tail; completion reunites them for selection. This stays inside the renderer, without promoting blocks into timeline history.
- **Message identity survives completion.** Assistant row ids are source message ids. Plugin rows can replace a source, so find, scroll-to-message and history reveal still use `getStreamItemMessageId`. Width-specific measurements describe whole rendered messages.
- **First sight of a text is revealed whole.** Only growth is paced. This is what makes history hydration, timeline replay, a virtualized row remounting on scroll, and an already-finished message all render complete on first paint without a special case for each.
- **Leaving `phase: "streaming"` snaps the reveal.** A completed turn must never be left holding characters. `layoutStream` sets the phase, so anything outside the live head with an active turn is already complete.
@@ -49,11 +49,19 @@ So arrival sets a _target_ and the reveal rate is derived from the backlog inste
while text arrives, and release obsolete window caches as the reader reveals more history;
window caches must stay bounded while their source timeline remains loaded.
## Native parsing cost
## Markdown parsing cost
The native library reparses and measures its entire `markdown` prop on each update. During streaming, the renderer splits source at an mdast block boundary and memoizes the head, so per-frame updates parse only the tail. Boundary discovery runs when a source line completes, rather than on every reveal frame. The unfinished line and final parsed block stay in the tail, preserving list continuation, setext headings, tables and open fences. Reference-dependent source and HTML retain a larger tail because later source can change their meaning. A single long block therefore still carries its full parsing cost.
Both engines reparse their entire `markdown` prop on each update: md4c in C++ on native, md4c in WASM plus a JSON tree on web. Source adaptation adds a full mdast parse for some text, such as any `&`, at about 1 µs per character. Rendering a growing reply whole on each reveal frame therefore makes the reply quadratic to stream.
Completion restores one native text view per Mermaid-delimited segment, so selection crosses prose paragraphs again. The head retains its trailing block margin while split. JS reveal remains the pacing source; native opacity animation stays disabled.
While streaming, `createStreamingMarkdownSplitter` in `components/markdown/streaming.ts` splits the message into head parts and a tail, on every platform. The tail is the last block and the unfinished line, so list continuation, setext headings, tables and open fences render as they will when complete. Rules that keep the cost per frame flat as the reply grows:
- **Discovery is incremental.** The boundary moves only when a line completes, and each time the splitter parses only the source after the boundary. Blocks before it are closed and need no document context.
- **Head parts are sealed at 2,000 characters.** Each completed block re-renders the head part it lands in. Only the last part grows, so that work stays bounded. A single head would re-render all closed blocks each time a block completes.
- **The first part keeps its React key from the first frame to the completed message.** Completion re-renders it in place instead of remounting it, and the parts share one image occurrence key, so an image keeps its acquisition when its block moves into the head.
Two kinds of source fall back to a growing render, because later source can change how earlier source reads. A link definition can turn an earlier `[label]` into a link, so a message with one renders as one document until it completes. HTML needs its enclosing source, so HTML and every block after it stay in the tail. A single long block also carries its full cost.
Completion renders one view per Mermaid-delimited segment, so native selection crosses prose paragraphs again; while streaming it crosses only within a part. JS reveal remains the pacing source; native opacity animation stays disabled.
## Measuring
+8 -1
View File
@@ -219,7 +219,14 @@ file after the daemon confirms persistence.
> **Window-state v1 limitation:** only the _first_ window of a session restores and persists saved geometry (size/position/maximized). Windows opened via ⌘⇧N / second-instance / "Open in new window" open at the default size, OS-cascaded, and do not persist — this avoids every window stacking on the same restored bounds and fighting over the single window-state store. Lifting this needs per-window state keys.
>
> **In-app browser profiles.** Each local browser tab runs in a persistent Electron partition and can switch profiles at any time; switching replaces the `<webview>` under the new partition and reloads the current URL in that profile's session. Partition names are the identity: `persist:paseo-browser` is **Default** and preserves cookies from before profiles; `persist:paseo-profile-<slug>` is a named profile. Display names and colors live in the main-owned catalog `<userData>/browser-profiles.json`, so editing a profile's name or color keeps sign-ins intact and updates open tabs live. Main admits only `persist:paseo-browser`, `persist:paseo-profile-<slug>`, and active host-proxy partitions (`persist:paseo-browser-host-<16hex>`) at `will-attach-webview`. The tab's chosen profile slug lives in its `workspace-browser-store` record. After every `did-attach`, the renderer registers its browser id, workspace id, partition, and current guest `WebContents` id, and main accepts it only when that guest belongs to the calling renderer and its session matches the partition. Registration is intentionally repeated because reparenting a retained `<webview>` can replace its guest without replacing the DOM element. Settings > Chat & panes manages profiles: clearing a profile clears its storage/cache and reloads its open tabs; removing a named profile closes its open tabs, removes it from the catalog, clears its session, and deletes its `Partitions/paseo-profile-<slug>` directory from disk. Default cannot be removed.
> **In-app browser profiles.** A browser tab's Electron partition is the pair (route, profile). The route is local, or a host's browser proxy. The profile is **Default** or a named profile. Electron sets the proxy per session (`session.setProxy`), not per `<webview>`, so the route is part of the partition name. Partition names are the identity, and `packages/desktop/src/features/browser-partition.ts` owns them:
>
> | Route | Default | Named profile |
> | ----- | ------------------------------------ | --------------------------------------------------- |
> | Local | `persist:paseo-browser` | `persist:paseo-profile-<slug>` |
> | Host | `persist:paseo-browser-host-<16hex>` | `persist:paseo-browser-host-<16hex>-profile-<slug>` |
>
> `persist:paseo-browser` keeps cookies from before profiles, and the host Default name predates profiles; do not rename either. A host runs one loopback SOCKS5 server and one tunnel. Every profile session on that host points `setProxy` at the same port, so a new profile never opens a second tunnel. Main binds a host profile's session when the renderer calls `ensureHostProxy` with its slug, and verifies it with `resolveProxy`. The status snapshot lists bound sessions in `profilePartitions`, and the tab mounts only after its profile appears there. A tab can switch profile and route at any time: the `<webview>` is replaced under the new partition and reloads the current URL. Display names and colors live in the main-owned catalog `<userData>/browser-profiles.json`, so editing a name or color keeps sign-ins intact and updates open tabs live. At `will-attach-webview`, main admits local partitions and only those host partitions whose session it bound. The tab's chosen profile slug lives in its `workspace-browser-store` record. After every `did-attach`, the renderer registers its browser id, workspace id, partition, and current guest `WebContents` id. Main accepts it only when that guest belongs to the calling renderer and its session matches the partition, and for a host partition, only when the session is bound to the proxy. Registration is repeated on purpose, because reparenting a retained `<webview>` can replace its guest without replacing the DOM element. Settings > Chat & panes manages profiles on every route: clearing a profile clears its storage and cache on the local route and on each host, then reloads its open tabs. Removing a named profile closes its open tabs, removes it from the catalog, clears its sessions, and deletes each of its `Partitions/` directories. Startup deletes the directories of profiles that are no longer in the catalog. Default cannot be removed.
>
> **In-app browser window opens.** Ordinary link opens, including Shift-clicked links, become Paseo workspace tabs and inherit the opener tab's browser profile. Script-created opens with popup features or a named window target and POST-backed opens remain secured Electron child windows in the opener’s browser profile, preserving `window.opener`, `postMessage`, named-window reuse, request bodies, and `window.close()` for OAuth, payment, and similar popup protocols. Unsupported URL schemes are denied before either path.
>
+9 -5
View File
@@ -34,7 +34,7 @@ Workspace archive runs lifecycle teardown from the exact `cwd` but removes only
`worktreeRoot` after its last active reference disappears. Worktree recovery recreates that backing
checkout from `mainRepoRoot`, then restores the relative path from `worktreeRoot` to `cwd`.
Paseo persists most stores as JSON files, and agent timelines in the [daemon database](#daemon-database). JSON data is validated at runtime with Zod schemas. Most JSON stores write atomically (write to temp file, then rename); a few still use plain `writeFile` — see each section. JSON stores have no schema-versioning/migration framework — schemas rely on optional fields with defaults for forward compatibility, with a small amount of inline normalization in `persisted-config.ts` for legacy provider/speech entries.
Paseo persists most stores as JSON files, and agent timelines and agent message queues in the [daemon database](#daemon-database). JSON data is validated at runtime with Zod schemas. Most JSON stores write atomically (write to temp file, then rename); a few still use plain `writeFile` — see each section. JSON stores have no schema-versioning/migration framework — schemas rely on optional fields with defaults for forward compatibility, with a small amount of inline normalization in `persisted-config.ts` for legacy provider/speech entries.
All server-side stores live under `$PASEO_HOME` (defaults to `~/.paseo`).
@@ -60,9 +60,6 @@ $PASEO_HOME/
│ └── {agentId}.json # One file per agent
├── schedules/
│ └── {scheduleId}.json # One file per schedule
├── agent-queues/
│ ├── {agentId}.json # Undelivered messages for one agent; removed when empty
│ └── {agentId}.json.corrupt.{ms} # Unreadable queue file, set aside at startup
├── projects/
│ ├── projects.json # Project registry
│ ├── workspaces.json # Workspace registry
@@ -188,7 +185,7 @@ Terminal activity contributes to the workspace status bucket **per `workspaceId`
## Daemon database
`$PASEO_HOME/paseo.db` is one SQLite file that the daemon opens at startup with `node:sqlite`
(`packages/server/src/server/database/`). Agent timelines are its only store today. Each store is a
(`packages/server/src/server/database/`). Agent timelines and agent message queues live here. Each store is a
`SchemaModule`: its own table-name prefix and an append-only list of migrations.
- **Migrations.** Startup runs every module's pending migrations in one transaction, so a failed
@@ -222,6 +219,13 @@ of a streamed assistant or reasoning message is stored as one chunk per source e
row, so a chunk never rewrites the message. An earlier file store rewrote the whole transcript on
every update. See [owned history](timeline-sync.md#owned-history).
### Agent message queues
`AgentMessageQueueStore` stores undelivered per-recipient messages in `agent_message_queue_items`
and monotonic per-recipient sequence counters in `agent_message_queue_recipients`. Message text and
structured payloads are stored as JSON strings so NUL bytes and lone surrogates round-trip through
`node:sqlite`. See [agent-lifecycle.md](agent-lifecycle.md).
---
## 2. Daemon Configuration
+8 -4
View File
@@ -2,11 +2,11 @@
Use `MarkdownRenderer` for chat replies, file previews, plans, pull requests and changelog content. It uses `react-native-enriched-markdown` on iOS, Android and web. Keep source adaptation and renderer configuration in `components/markdown`; consumers supply Markdown and, when needed, its file location.
Native selection belongs to the library's text view. Keep an assistant message in one row so selection can cross paragraphs, headings and lists. Code blocks and tables use the library's native views and their selection behavior. Web uses browser selection over semantic HTML. Once its WASM parser is initialized, the library parses synchronously for the first commit of each mounted row; an empty interim row would corrupt virtualized measurements and move the reader. Chat owns paced reveal, the web render cap, message identity and list measurement. Native renders completed messages together. While streaming, it keeps closed blocks in one head view and updates a separate tail, then reunites the text on completion. See [native parsing cost](agent-stream-performance.md#native-parsing-cost) for the boundary and pacing constraints.
Native selection belongs to the library's text view. Keep an assistant message in one row so selection can cross paragraphs, headings and lists. Code blocks and tables use the library's native views and their selection behavior. Web uses browser selection over semantic HTML. Once its WASM parser is initialized, the library parses synchronously for the first commit of each mounted row; an empty interim row would corrupt virtualized measurements and move the reader. Call `preloadMarkdownParser()` ahead of navigation or gate a loading skeleton on `useMarkdownParserReady()` (`packages/app/src/components/markdown/parser-ready.ts`) so cold web mounts do not paint an empty interim container. Chat owns paced reveal, the web render cap, message identity and list measurement. A completed message renders as one document. While streaming, the renderer keeps closed blocks in head parts and updates a separate tail, then reunites the text on completion. See [Markdown parsing cost](agent-stream-performance.md#markdown-parsing-cost) for the boundary and pacing constraints.
## Block spacing
Every block is separated by one gap, `density.blockGap`: 12 on compact layouts, 16 wider. Inside the library's text, every element style ends with that gap and the library drops it after the last block. Views stacked outside the library (Mermaid segments, streaming head and tail) use the same gap through `MarkdownBlockStack`. Do not give a block type its own margins; change the gap.
Every block is separated by one gap, `density.blockGap`: 12 on compact layouts, 16 wider. Inside the library's text, every element style ends with that gap and the library drops it after the last block. Views stacked outside the library (Mermaid segments, streaming head parts and tail) use the same gap through `MarkdownBlockStack`. Do not give a block type its own margins; change the gap.
## Links and images
@@ -14,7 +14,11 @@ Workspace file links use the shared file-link resolver. The workspace supplies i
Right-click on web and long press on native open one link menu per rendered part (`components/markdown/link-menu`), not one per link: a menu root cannot sit inside a paragraph without producing invalid markup on web. The native long-press event carries only the URL, with no position and no syntax context. The menu takes the position from the touch that started the press, and treats a URL that is no `](destination)` in the source as recognized text.
Pass `external` for author-controlled Markdown from outside the host, such as a plugin README. It follows the registry's overview contract in `packages/protocol/src/plugin-overview.ts`, which the website also uses: only absolute https links and images work, and any other destination renders as its label or alt text. The parser still autolinks bare `http://`, `www.` and email text, so a link press checks the URL again and opens only https. None of the workspace recognition above applies, so `Node.js` is prose, not a file. The lines of a paragraph join, as they do on the README's forge.
Compose the renderer's capabilities per surface instead of bundling them under one flag:
- `destinations="https"` restricts links and images to absolute `https://` destinations following the registry's overview contract in `packages/protocol/src/plugin-overview.ts` (which the website also uses). Any other destination renders as its label or alt text, no host files are read via `client.readFile`, and workspace path recognition is off so `Node.js` stays prose. The parser still autolinks bare `http://`, `www.` and email text, so a link press checks the URL again and opens only `https://`.
- `forgeShorthand` (default `true`) controls whether `#12` / `owner/repo#12` references resolve against the workspace's `ForgeShorthandProvider`. Pull request comments keep `destinations="https"` with `forgeShorthand` enabled; plugin READMEs and the changelog disable `forgeShorthand` so they never link to whichever workspace happens to be open.
- `softBreaks` (`"break"` default, `"join"` for READMEs and changelogs) controls whether single newlines inside a paragraph become hard breaks or join into one line as they do on a forge.
Resolve workspace image paths over the existing session RPC, then give the library a cached native file URL or web blob URL. HTTP(S) images pass through unchanged. This preserves relay, SSH and local socket connections, which do not expose a daemon HTTP endpoint. Each mounted renderer owns its image acquisition identity, so a later reply reads a rewritten path again while the earlier mounted reply retains its snapshot. Image taps open the attachment lightbox. File previews resolve relative images against the Markdown file's directory. An image alone on its line becomes its own paragraph before the library sees it, so it renders as a block on every platform; the library only treats sole-child paragraph images as blocks, and with hard soft breaks every newline is a break node, which left own-line images inline on iOS and web. Images that share a line with text stay inline at line height and keep their aspect ratio. A linked image counts as an image, so review-bot badges such as `[![Retrigger](badge.svg)](url) Confidence` stay inline on web; the library's web renderer only checked direct paragraph children, so it rendered them as full-width block images (fixed in the fork).
@@ -58,7 +62,7 @@ On iOS a newly mounted Markdown view paints empty for a frame or more after it i
Android measurements use a size-only, 512-entry LRU across view unmounts, matching the library’s existing iOS cache. Scrolling back through history can reuse layout sizes without parsing those rows again. Content, layout props and width identify each entry; font-scale changes and native layout invalidation discard affected sizes. The cache retains no views or spans.
The library determines how incomplete Markdown appears during streaming. Completed text uses the same component and engine as history. Find and scroll-to-message address source message ids; selection-copy understands semantic HTML and the web code component's copy metadata.
While `streaming` is true, `stabilizeStreamingMarkdown` in `components/markdown/streaming.ts` closes unfinished inline constructs (code spans, emphasis, strikethrough, links) and withholds incomplete block prefixes (headings, Setext underlines after paragraphs, list/task markers, empty quotes and admonitions, opening and partial closing code fences, unconfirmed tables, images and HTML tags/comments) before `prepareMarkdownSource` runs. Incomplete links render with link styling through `PENDING_MARKDOWN_LINK` without becoming interactive anchors or opening link actions until their destination closes. Completed text bypasses stabilization and uses the same component and engine as history. Find and scroll-to-message address source message ids; selection-copy understands semantic HTML and the web code component's copy metadata.
## Verification
+5 -3
View File
@@ -216,9 +216,11 @@ its own.
grew once its data arrived left the menu clipped, or hanging over its anchor, until it moved
again. `AnchoredSurface` plays the same keyframes through the Web Animations API on web, which
leaves no inline style; native keeps the Reanimated `Keyframe`.
- **Animate only once placed.** `AnchoredSurface` remounts the surface when its position resolves,
so the entering animation runs at the final position rather than ending unseen at the
off-screen measuring position.
- **Animate only once placed.** The entering animation must run at the final position, not end
unseen at the off-screen measuring position. Native remounts the surface when its position
resolves, because Reanimated's `entering` runs only on mount. Web keeps the surface mounted and
starts its Web Animations entering animation on placement, so a popover's content mounts once
per open.
- **Sheets size to content.** `enableDynamicSizing`, not fixed snap points. A pushed page is
rarely the height of the page before it. A fill page is the one exception.
- **The sheet's content is teleported out of the menu's subtree**, so `MenuSheetSurface` rebuilds
+12 -4
View File
@@ -104,7 +104,14 @@ definition, no longer eligible to begin.
## Integration rules
- Callers request semantic targets through `panel-store`; they never write shared values.
- Gesture behavior comes from the four explicit hooks in `mobile-panels/gestures.ts`.
- Gesture behavior comes from the explicit hooks in `mobile-panels/gestures.ts`.
- A horizontal scroller keeps the touches that start on it: no panel opens or closes under it. Use
`ScrollView` or `FlatList` from `components/ui/scroll-view` with `horizontal`; plugins get the same
components from `@getpaseo/plugin/client/ui`. An `Animated.ScrollView` puts
`usePanelAwareHorizontalScrollGesture` on its own `GestureDetector`. The gesture blocks the
provider's pans and the nearest explorer close pan. Browsers scroll an overflow container
themselves and cancel the page's pointer stream, so the web `ScrollView` needs no gesture. The diff
document's scroller differs on purpose: at its leading edge it waits for the explorer close pan.
- Navigation gestures accept touch pointers only. Mouse and pen fail at touch-down, so dragging a
mouse to select text on a hybrid laptop never moves a panel. Browsers without a touch screen
(`hooks/pointer-capabilities`) never enable them.
@@ -146,9 +153,10 @@ definition, no longer eligible to begin.
- Panels whose gesture wrapper already owns visibility use `RetainedPanelActivity` to provide the
same active signal without adding another layout root. Persistent animations, timers, polling, and
shared clocks must subscribe to that signal and stop when their final visible consumer leaves.
- Synchronized step animations use one wall-clock-aligned source. Register a local shared value only
while its retained panel is active so hidden animated styles remain mounted without receiving clock
updates. Do not give every instance its own loop or leave hidden styles subscribed to the source.
- Synchronized step animations use one source. Do not give every instance its own loop. A hidden
instance stops running the source and keeps its place, because the active signal changes after the
panel has slid into view; see
[running-indicators.md](running-indicators.md#hidden-panels).
- Retention order and render order are separate concerns. LRU metadata may change on every switch;
keyed retained roots must keep a stable sibling order. Moving large retained roots triggered Fabric
Differ failures (`addViewAt` / `removeViewAt` view reuse) on Android.
+7 -3
View File
@@ -257,9 +257,13 @@ Do not put any other code modules in the plugin root.
Shared files import contract helpers and types from `@getpaseo/plugin`. Server handler files import
`PluginHandlerContext` from `@getpaseo/plugin/server`. Client files import Paseo UI from
`@getpaseo/plugin/client/ui`. Its `Icon` draws a Lucide name from the client's installed
icon set, or any `PluginIcon` through its `icon` prop; an unknown name or unsafe SVG renders nothing
so it cannot break the plugin surface.
`@getpaseo/plugin/client/ui`. The module provides host-rendered `Icon` and `ProviderIcon`
components. `Icon` draws a Lucide name from the client's installed icon set, or any `PluginIcon`
through its `icon` prop; an unknown name or unsafe SVG renders nothing so it cannot break the
plugin surface. `ProviderIcon` resolves a built-in, catalog, or host-scoped plugin provider icon,
defaulting to the installation's host when `hostId` is omitted; unknown providers render the
standard provider fallback. `PluginCatalogSync` hydrates the host's provider snapshot before
installing client contributions so `ProviderIcon` resolves plugin SVGs on initial render.
Its controlled modal keeps presentation metadata on `<Modal title="…" icon={…}>` and body UI in
`<Modal.Content>`. Body layout, sheet-aware scrolling, and clipboard actions follow the
[host UI contract](../public-docs/plugins/reference.md#host-ui).
+36 -25
View File
@@ -16,8 +16,9 @@ Preparation is reversible and runs on the release branch before the user authori
4. Run the [pre-release sanity check](#pre-release-sanity-check) for stable releases, and report any findings to the user.
5. Commit the approved changelog and any requested ACP update, then run `npm run format`, `npm run lint`, and `npm run typecheck`.
6. Run `npm run release:prep:<mode>` to create the `chore(release): cut <version>` commit without a tag.
7. Push `release/vX.Y.Z` or `release/vX.Y.Z-beta.N` and wait for `CI` and `Desktop Packages` on that branch to pass (never wait on `main` CI).
8. Run the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit.
7. Push `release/vX.Y.Z` or `release/vX.Y.Z-beta.N`.
8. Right after the push, open the unmerged [reconcile `main`](#reconcile-main) PR from `reconcile/vX.Y.Z` or `reconcile/vX.Y.Z-beta.N`, so its CI runs in parallel with the release branch's `CI` and `Desktop Packages`. Do not merge it during Preparation.
9. Wait for `CI` and `Desktop Packages` on the release branch to pass (never wait on `main` CI), and run the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit.
### Ship
@@ -25,7 +26,7 @@ Ship starts after the user says "go ahead". All tag-triggered GitHub Actions wor
1. Run `npm run release:push` first to verify the clean release branch and push `vX.Y.Z` or `vX.Y.Z-beta.N`. Pushing the tag takes a few seconds and starts `Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and (for stable tags) `Deploy App` on GitHub Actions, plus `Release Mobile` (stable) or `Release iOS Beta` (beta) on EAS. (`Deploy Website` runs later on the `release: published` event when `Desktop Release` publishes the stable GitHub Release.)
2. Run `npm run release:publish` (stable) or `npm run release:publish:beta` (beta) in parallel with the remote builds. `scripts/publish-release-packages.mjs` publishes the seven `@getpaseo/*` packages in dependency waves and polls npm visibility between packages to avoid `E409` or `E404` propagation races.
3. Open the [reconcile `main`](#reconcile-main) PR from `reconcile/vX.Y.Z` or `reconcile/vX.Y.Z-beta.N` right after `npm run release:push` finishes, so its CI run overlaps with npm publication and the release builds.
3. Check the green [reconcile `main`](#reconcile-main) PR against the pushed tag, then merge it right after `npm run release:push` finishes, in parallel with npm publication and the release builds. Wait for its checks only if the tag check produced changes.
4. Create the release heartbeat immediately with `create_heartbeat` to track every ship step to completion.
### Sync gates
@@ -120,6 +121,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` runs queue behind
each other and a newer merge replaces the pending one.
Open the [reconcile `main`](#reconcile-main) PR now so its CI runs in parallel with these two.
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.
@@ -127,9 +129,8 @@ An explicit user instruction can select another base.
Because the release branch is already pushed at `HEAD`, no second branch CI run starts, and only
the tag release workflows run.
7. Immediately in parallel after `npm run release:push` finishes: publish npm packages with
`npm run release:publish` (stable) or `npm run release:publish:beta` (beta), start
[Reconcile `main`](#reconcile-main) so its PR checks overlap with desktop and EAS builds, and
create the release heartbeat. (`npm run release:ship` and `npm run release:ship:beta` also run
`npm run release:publish` (stable) or `npm run release:publish:beta` (beta), merge the
already-green [reconcile `main`](#reconcile-main) PR, and create the release heartbeat. (`npm run release:ship` and `npm run release:ship:beta` also run
`release:push` before `release:publish`, so tag builds never wait behind npm.)
When promoting or branching from a tag created before `release:prep:*`, `release:ship`, and the
@@ -174,27 +175,35 @@ For a promotion, every item defaults to defer.
## Reconcile main
Right after `npm run release:push` pushes the tag (in parallel with npm publication and all desktop, APK, Docker, and EAS builds), open a PR into `main` from a fresh branch off `origin/main` named `reconcile/vX.Y.Z` or `reconcile/vX.Y.Z-beta.N`. Reconcile reads only the tagged git commit, so it does not wait for npm or any release build:
Open the reconcile PR during Preparation, right after pushing `release/vX.Y.Z` or `release/vX.Y.Z-beta.N`. Its CI takes about 30 minutes and npm publication takes about 5, so opening it at Ship would leave Ship waiting on CI. An unmerged PR changes nothing on `main`. Reconcile reads only the release branch commit, so it does not wait for the release branch's `CI` or `Desktop Packages`:
```bash
git fetch origin --tags
git fetch origin
git checkout -b reconcile/vX.Y.Z origin/main
npm run release:reconcile -- --tag vX.Y.Z
npm run release:reconcile -- --ref origin/release/vX.Y.Z
```
Use `release/vX.Y.Z-beta.N` and `reconcile/vX.Y.Z-beta.N` for a beta. `--tag vX.Y.Z` reads a published tag instead, for a release that is already tagged.
`scripts/reconcile-release.mjs` updates the working tree without cherry-picking stale lockfile
hunks from the release base:
- Copies the tagged `CHANGELOG.md` and `CHANGELOG.zh-CN.md` entries verbatim. A beta or promotion
- Copies the release branch's `CHANGELOG.md` and `CHANGELOG.zh-CN.md` entries verbatim. A beta or promotion
entry replaces the series beta entry on `main`. A stable hotfix on an older line is placed below
any newer entries.
- Copies the generated F-Droid changelog files from the tag for stable releases.
- Copies the generated F-Droid changelog files from the release branch for stable releases.
- Updates every `package.json` version and regenerates `package-lock.json` on top of current `main`
only when the shipped version is newer than `main`'s version.
- Leaves unshipped work on `main` untouched and makes no claims about unshipped work in the
changelog entry.
Commit, open the PR into `main`, and merge once its checks pass. Delete the remote release branch
Commit and open the PR into `main`, but do not merge it during Preparation:
- If the release is cancelled, close the PR. `main` is untouched.
- If the release branch changes during Preparation, re-run `npm run release:reconcile -- --ref origin/release/vX.Y.Z` on the same branch and push to the same PR.
- At Ship, right after `npm run release:push` pushes the tag, run `npm run release:reconcile -- --tag vX.Y.Z` on the reconcile branch. A clean `git status` means the PR already matches the tag, so merge it in parallel with `npm run release:publish` and the tag builds. If it shows changes, push them and wait for the PR checks before merging.
Delete the remote release branch
(`git push origin --delete release/vX.Y.Z` or `release/vX.Y.Z-beta.N`) only after the reconcile PR
merges and every [sync gate](#sync-gates) passes. The tag is the record of shipped source, and
Paseo maintains no release track besides `main`.
@@ -250,16 +259,16 @@ npm run release:prep:patch
# or:
npm run release:prep:minor
# 2. Push the release branch and wait for CI + Desktop Packages on this commit.
# 2. Push the release branch, then open the reconcile/vX.Y.Z PR into main (do not merge it).
git push -u origin HEAD
# Complete the pre-release dependency checks on this commit.
# Wait for CI + Desktop Packages on this commit and complete the pre-release dependency checks.
# 3. After go-ahead and green release-branch checks: push the tag first to start builds.
npm run release:push
# 4. Run these in parallel immediately after step 3:
npm run release:publish
# Also open the reconcile/vX.Y.Z PR into main and create the release heartbeat.
# Also merge the green reconcile/vX.Y.Z PR and create the release heartbeat.
# (`npm run release:ship` runs `release:push` before `release:publish` if used standalone.)
```
@@ -294,12 +303,13 @@ 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
# Open the reconcile/vX.Y.Z PR into main now (do not merge it).
# Wait for CI and Desktop Packages and complete the pre-release dependency checks.
# After go-ahead:
npm run release:push # Create tag vX.Y.Z on HEAD and push (starts release builds)
# In parallel right after release:push:
npm run release:publish # Publish to npm (idempotent, with propagation + beta dist-tag sync)
# Open reconcile/vX.Y.Z PR into main and create the release heartbeat.
# Merge the green reconcile/vX.Y.Z PR and create the release heartbeat.
```
## Beta flow
@@ -312,23 +322,24 @@ npm run release:prep:beta:minor # Start the next minor beta line
# or for follow-up betas:
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:
# 2. Push the release branch and open the reconcile/vX.Y.Z-beta.N PR into main (do not merge it):
git push -u origin HEAD
# Complete the pre-release dependency checks on this commit.
# Wait for CI + Desktop Packages to pass and complete the pre-release dependency checks.
# 3. After go-ahead: push the tag first, then run npm publish, reconcile, and heartbeat in parallel:
# 3. After go-ahead: push the tag first, then run npm publish, merge the reconcile PR, and heartbeat in parallel:
npm run release:push
npm run release:publish:beta
# (Or run `npm run release:ship:beta` in one shell while opening reconcile/vX.Y.Z-beta.N.)
# (Or run `npm run release:ship:beta` in one shell while merging reconcile/vX.Y.Z-beta.N.)
# Later, after soak, promote on release/vX.Y.Z:
npm run release:prep:promote
git push -u origin HEAD
# Open the reconcile/vX.Y.Z PR into main (do not merge it).
# Wait for CI + Desktop Packages and complete the pre-release dependency checks.
# After go-ahead:
npm run release:push
npm run release:publish
# Open reconcile/vX.Y.Z PR into main and create the release heartbeat in parallel.
# Merge the green reconcile/vX.Y.Z PR and create the release heartbeat in parallel.
```
- Beta tags are published GitHub prereleases like `v0.1.41-beta.1`
@@ -1004,9 +1015,9 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] Every PR in the release range has been opened, and its full description and every linked issue have been read before drafting the changelog
- [ ] 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)
- [ ] `npm run release:prep:beta:patch`, `release:prep:beta:minor`, or `release:prep:beta:next` created the version commit on `release/vX.Y.Z-beta.N` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI), with the unmerged reconcile PR opened right after the branch push
- [ ] Complete the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z-beta.N` tag without triggering a second CI run, while `npm run release:publish:beta`, the `reconcile/vX.Y.Z-beta.N` PR, and the release heartbeat started in parallel
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z-beta.N` tag without triggering a second CI run, while `npm run release:publish:beta`, the merge of the green `reconcile/vX.Y.Z-beta.N` PR, and the release heartbeat started in parallel
- [ ] All seven `@getpaseo/*` npm packages show the version under the `beta` dist-tag, not `latest`
- [ ] The GitHub prerelease was published only after the three beta manifests were uploaded, and it has the changelog body and every expected macOS, Linux, Windows, and Android APK asset
- [ ] GitHub `Desktop Release` workflow for the `v*-beta.N` tag is green
@@ -1028,9 +1039,9 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] Update `CHANGELOG.md` with user-facing release notes (features, fixes, not refactors). Promotion renames the series' `## X.Y.Z-beta.N` entry to `## X.Y.Z - YYYY-MM-DD` and re-checks it covers the full release. Commit the matching [`CHANGELOG.zh-CN.md` entry](#changelog-translations) with it
- [ ] 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)
- [ ] `npm run release:prep:patch`, `release:prep:minor`, or `release:prep:promote` created the version commit on `release/vX.Y.Z` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI), with the unmerged reconcile PR opened right after the branch push
- [ ] Complete the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z` tag without triggering a second CI run, while `npm run release:publish`, the `reconcile/vX.Y.Z` PR, and the release heartbeat started in parallel
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z` tag without triggering a second CI run, while `npm run release:publish`, the merge of the green `reconcile/vX.Y.Z` PR, and the release heartbeat started in parallel
- [ ] All seven `@getpaseo/*` npm packages show `latest` at the new stable, and `beta` at the new stable too unless an active newer beta holds `beta`
- [ ] The GitHub Release was published only after the three stable manifests were uploaded, and it has the changelog body and every expected macOS, Linux, Windows, and Android APK asset
- [ ] GitHub `Desktop Release` workflow for the `v*` tag is green
+53 -13
View File
@@ -14,14 +14,37 @@ value.
`components/indicator-motion` owns the two pieces every indicator shares:
- `useIndicatorMotion()` decides whether an indicator may move: not under reduced motion, not in a
retained panel that is not showing, not while the app is in the background. An indicator that may
not move draws its resting frame and runs nothing. Ask this hook; do not read reduced motion or
visibility yourself.
- `useIndicatorMotion()` says what an indicator does now. Ask this hook; do not read reduced motion
or visibility yourself.
- `moving`: it runs.
- `held`: nobody can see it, in a retained panel that is not showing or in an app in the
background. It runs nothing and keeps its place.
- `resting`: the system asks for reduced motion. It draws its resting frame and runs nothing.
- The driver: `loop.web.ts` on web, `clock.ts` on native.
Animate only `transform` and `opacity`. Anything else is painted on the main thread every frame.
## Hidden panels
A phone's sidebar slides into view before its panel counts as showing: the panel's active signal
changes when the slide settles, never during it (see [mobile-panels.md](mobile-panels.md)). An
indicator that changes what it draws on that signal changes it in front of the user. A held ring
that drew its resting position jumped to the running position at the end of every slide.
So on native a held indicator stays bound to its clock and stops running it:
- The clock and the loader's ticker count the time they have run, and hold it while nothing runs
them. They are never set back to zero or to the wall clock.
- While another panel runs the clock, a held view follows it. Measured on an Android emulator with
six held rings behind a running chat, the app drew the same frames a second as with the rings
unbound, and CPU on each thread differed by less than it does between two runs.
- While nothing runs the clock, a held view costs nothing: behind an idle chat the app draws no
frames.
- One commit can stop the last moving indicator and start another, as when the sidebar replaces the
chat. The clock stops after the commit, so it counts through that without a restart.
Web does not do this: a held indicator on web cancels its loop and draws its resting frame.
## Frames
Keeping the animation off the React thread does not make it free. Every time an indicator moves,
@@ -88,11 +111,27 @@ For a transition that is fine. For an indicator that runs for an hour it was 22
the UI thread of an Android emulator.
React Native's own `Animated` with `useNativeDriver: true` updates the view from the native driver
and commits nothing. `clock.ts` builds a clock out of it: a decay that never slows, at one unit per
millisecond, is the time since it started. Decay is the one native-driven animation that computes
its value from the frame timestamp instead of replaying a 60 fps recording, so it is exact at any
refresh rate and needs no loop restart. `Animated.modulo` and `interpolate` turn the clock into a
rotation or a translation, all inside the native driver.
and commits nothing. `clock.ts` builds a clock out of it: a linear timing at one unit per
millisecond is the time since the clock started. `Animated.modulo` and `interpolate` turn the clock
into a rotation or a translation, all inside the native driver.
The timing counts in spans of ten minutes. The end of a span is the one event that reaches the JS
thread, which starts the next span where that one ended, so a cycle keeps its place from one span to
the next.
The native driver owns the clock's value. The JS thread starts and stops the counting and never
sets the value, so a stopped clock keeps the value its views show. When the clock stops, the driver
reports the value it stopped at, and the next start counts on from it.
Do not drive the clock with a decay. A decay that never slows counts time without spans, but the
driver ends a decay when its value moves less than 0.1 between two frames, whatever the
deceleration. Two frames that carry the same millisecond are enough, and then every indicator on
the clock freezes. Starting the decay again from the JS thread shows as a pause and a jump each
time.
Android replays a timing as 60 positions a second at any refresh rate, and iOS interpolates between
them. Every cycle on the clock is stepped at 30 positions a second, so this does not show. A cycle
without steps would move 60 times a second on a 120 Hz Android display.
`cycle(periodMs, { steps })` holds the position at each step. The driver still ticks every frame,
but a view whose transform did not change is not invalidated, so nothing is drawn between steps.
@@ -100,14 +139,15 @@ but a view whose transform did not change is not invalidated, so nothing is draw
The native clock starts on the frame where the driver picks it up, so two clocks started at
different times turn their steps over on different frames. That is why the shimmer rides
`sharedIndicatorClock`, the rings' clock, with `phase: "own"`: its pass starts at the clock's
current step. The JS thread works out that step from the time it started the clock. The driver
current step. The JS thread works out that step from the time it started the clock and the value
the clock started from. The driver
starts the clock a frame or two later, so a pass can start one step early or late. The band starts
one band width outside the label, so this does not show.
The loader changes six times per cycle, so it does not ride the frame clock. `step-ticker.ts` wakes
the JS thread once per step, aligned to wall-clock step boundaries, and publishes the step into a
native `Animated.Value`. A wake-up that arrives late publishes the step that is current by then, so
the loader never drifts and every loader shows the same step.
the JS thread once per step and publishes the step into a native `Animated.Value`. A wake-up that
arrives late publishes the step that is current by then, so the loader never drifts. Every loader
reads the one value, so they all show the same step.
Do not apply Unistyles dynamic styles to these `Animated.View`s; see
[unistyles.md](unistyles.md#reanimated-animatedview--dynamic-styles-crashes).
+4 -3
View File
@@ -172,9 +172,10 @@ is offline and until a reconnected chat's check answers, so an unchanged chat ne
toast. Returning from background on a socket that stayed connected shows nothing until the check
answers: the chat stayed subscribed, so a slow answer is no reason to doubt it, and a socket that
died without closing fails the foreground liveness probe and becomes a reconnect. Updating messages
appears for a chat that is behind, until the fetch completes, and for an opened chat whose check is
still unanswered `FRESHNESS_CHECK_QUIET_MS` after it was sent. That delay measures the daemon, so it
starts at the request: on a cold start the cache read alone can take longer. Socket connectivity
appears for a chat that is behind, until the fetch completes, and for an opened chat whose check or
cursorless initial tail catch-up (such as a display-only cache) is still unanswered
`FRESHNESS_CHECK_QUIET_MS` after the subscribe request was sent. That delay measures the daemon, so
it starts at the request: on a cold start the cache read alone can take longer. Socket connectivity
alone cannot certify that the displayed conversation is current. The timeline owner publishes freshness; the view renders it without a toast timer or a
separate resume workflow.
+1 -1
View File
@@ -1 +1 @@
sha256-ZVIrRfb7oyTwx7kz6F51hs/ctT45qUdZM4v0QRLW9zA=
sha256-oBd6CQ8+BhzMHhrpRIwzojuFPUwqXpgc3ZAPqKPs5QQ=
+37 -29
View File
@@ -1,12 +1,12 @@
{
"name": "paseo",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "paseo",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"hasInstallScript": true,
"license": "Apache-2.0",
"workspaces": [
@@ -12136,6 +12136,12 @@
"dev": true,
"license": "BSD-3-Clause"
},
"node_modules/@silvia-odwyer/photon-node": {
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@silvia-odwyer/photon-node/-/photon-node-0.3.4.tgz",
"integrity": "sha512-bnly4BKB3KDTFxrUIcgCLbaeVVS8lrAkri1pEzskpmxu9MdfGQTy8b8EgcD83ywD3RPMsIulY8xJH5Awa+t9fA==",
"license": "Apache-2.0"
},
"node_modules/@sinclair/typebox": {
"version": "0.27.10",
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz",
@@ -37546,7 +37552,7 @@
},
"packages/app": {
"name": "@getpaseo/app",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"dependencies": {
"@codemirror/commands": "6.10.4",
"@codemirror/language": "6.12.4",
@@ -39699,13 +39705,13 @@
},
"packages/cli": {
"name": "@getpaseo/cli",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@clack/prompts": "^1.0.0",
"@getpaseo/client": "0.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/server": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/server": "0.19.0-beta.1",
"chalk": "^5.3.0",
"commander": "^12.0.0",
"mime-types": "^2.1.35",
@@ -39955,11 +39961,11 @@
},
"packages/client": {
"name": "@getpaseo/client",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/protocol": "0.18.2",
"@getpaseo/relay": "0.18.2",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/relay": "0.19.0-beta.1",
"ws": "^8.20.0",
"zod": "^4.4.3"
},
@@ -39971,10 +39977,11 @@
},
"packages/desktop": {
"name": "@getpaseo/desktop",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/cli": "*",
"@getpaseo/client": "*",
"@getpaseo/server": "*",
"electron-log": "^5.4.3",
"electron-updater": "^6.6.2",
@@ -40214,7 +40221,7 @@
},
"packages/expo-two-way-audio": {
"name": "@getpaseo/expo-two-way-audio",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.5.14",
@@ -40260,7 +40267,7 @@
},
"packages/highlight": {
"name": "@getpaseo/highlight",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@codemirror/language": "6.12.4",
@@ -40290,7 +40297,7 @@
},
"packages/plugin": {
"name": "@getpaseo/plugin",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^1.4.0",
@@ -40298,8 +40305,8 @@
"use-sync-external-store": "^1.6.0"
},
"devDependencies": {
"@getpaseo/client": "0.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@types/node": "^20.9.0",
"@types/react": "~19.2.0",
"react": "19.2.3",
@@ -40309,8 +40316,8 @@
"zod": "^4.4.3"
},
"peerDependencies": {
"@getpaseo/client": "0.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"react": ">=19.1.0 <20",
"react-native": ">=0.81.5",
"zod": "^4.4.3"
@@ -40332,7 +40339,7 @@
},
"packages/protocol": {
"name": "@getpaseo/protocol",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"semver": "^7.8.5",
@@ -40359,7 +40366,7 @@
}
},
"packages/react-native-enriched-markdown": {
"version": "0.18.2",
"version": "0.19.0-beta.1",
"hasInstallScript": true,
"license": "MIT",
"peerDependencies": {
@@ -40375,7 +40382,7 @@
},
"packages/relay": {
"name": "@getpaseo/relay",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@noble/ciphers": "^2.4.0",
@@ -40597,23 +40604,24 @@
},
"packages/server": {
"name": "@getpaseo/server",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"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.18.2",
"@getpaseo/highlight": "0.18.2",
"@getpaseo/plugin": "0.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/relay": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/highlight": "0.19.0-beta.1",
"@getpaseo/plugin": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/relay": "0.19.0-beta.1",
"@isaacs/ttlcache": "^2.1.4",
"@modelcontextprotocol/node": "2.1.2",
"@modelcontextprotocol/sdk": "1.29.0",
"@modelcontextprotocol/server": "2.4.0",
"@opencode-ai/sdk": "1.14.46",
"@opencode/client": "2.0.10",
"@silvia-odwyer/photon-node": "^0.3.4",
"@xterm/addon-serialize": "0.14.0",
"@xterm/addon-unicode-graphemes": "0.5.0-beta.330",
"@xterm/headless": "6.1.0-beta.334",
@@ -41571,7 +41579,7 @@
},
"packages/website": {
"name": "@getpaseo/website",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"dependencies": {
"@cloudflare/vite-plugin": "^1.29.1",
"@cloudflare/workers-types": "^4.20260317.1",
@@ -43197,7 +43205,7 @@
},
"plugins": {
"name": "@getpaseo/builtin-plugins",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"dependencies": {
"@getpaseo/plugin": "*",
"zod": "^4.4.3"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "paseo",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"private": true,
"description": "Paseo: voice-controlled development environment for local AI coding agents",
"keywords": [
@@ -125,10 +125,17 @@ for (const theme of ["light", "dark"] as const) {
await expect(
page.getByRole("button", { name: "Hoplite provider details", exact: true }),
).toHaveCount(0);
expect((await client.getDaemonConfig()).config.providers?.hoplite).toBeUndefined();
expect(
(await client.getProvidersSnapshot()).entries.some((entry) => entry.provider === "hoplite"),
).toBe(false);
// The row leaves the list once Remove is confirmed, before the daemon answers.
await expect
.poll(async () => (await client.getDaemonConfig()).config.providers?.hoplite)
.toBeUndefined();
await expect
.poll(async () =>
(await client.getProvidersSnapshot()).entries.some(
(entry) => entry.provider === "hoplite",
),
)
.toBe(false);
await writeFile(
testInfo.outputPath(`hoplite-removed-${theme}.json`),
JSON.stringify(await client.getProvidersSnapshot(), null, 2),
@@ -1,5 +1,8 @@
import { mkdir, writeFile } from "node:fs/promises";
import path from "node:path";
import { gateNextAgentMessage } from "../support/helpers/agent-message-gate";
import { expectComposerDraft, submitMessage } from "../support/helpers/composer";
import { expectAgentIdle } from "../support/helpers/agent-stream";
import { test, expect, type Page } from "../support/fixtures";
import { seedMockAgentWorkspace, openAgentRoute } from "../support/helpers/mock-agent";
import { openChangesPanel, openChangesTreePanel } from "../support/helpers/workspace-tabs";
@@ -55,3 +58,45 @@ for (const width of [1400, 390]) {
}
});
}
async function addChangedFileToChat(page: Page) {
await openChangesPanel(page);
await page.getByTestId("diff-file-0-toggle").click({ button: "right" });
await page.getByTestId("diff-file-0-add-to-chat").click();
}
async function expectFollowUpAttachment(page: Page) {
await expect(page.getByTestId("composer-workspace-file-attachment-pill")).toContainText(
"follow-up.ts",
);
}
test("keeps a file added from Changes when an earlier send fails", async ({ page }) => {
const gate = await gateNextAgentMessage(page);
const workspace = await seedMockAgentWorkspace({
repoPrefix: "attachment-during-send-",
title: "Target chat",
featureValues: { mockPromptRejections: 1 },
});
try {
await writeFile(path.join(workspace.cwd, "follow-up.ts"), "export const followUp = true;\n");
await workspace.client.checkoutRefresh(workspace.cwd);
await openAgentRoute(page, workspace);
await expectAgentIdle(page);
await submitMessage(page, "Send this first.");
await gate.waitForRequest();
await addChangedFileToChat(page);
await expectFollowUpAttachment(page);
gate.accept();
await expect(
page.getByRole("alert").filter({ hasText: "Requested mock prompt rejection" }),
).toBeVisible();
await expectFollowUpAttachment(page);
await expectComposerDraft(page, "");
} finally {
await workspace.cleanup();
}
});
@@ -1219,6 +1219,30 @@ test.describe("Agent message submission", () => {
await retryRestoredSubmission(page, prompt);
});
test("keeps a follow-up draft after the earlier send is rejected", async ({ page }, testInfo) => {
const gate = await gateNextAgentMessage(page);
const agent = await seedMockAgentWorkspace({
repoPrefix: `pending-rejection-${testInfo.workerIndex}-`,
title: "Pending rejection",
model: "ten-second-stream",
featureValues: { mockPromptRejections: 1 },
});
try {
await openAgentRoute(page, { workspaceId: agent.workspaceId, agentId: agent.agentId });
await expectAgentIdle(page);
await submitMessage(page, "Send this first.");
await gate.waitForRequest();
await fillComposerDraft(page, "Keep this follow-up.");
gate.accept();
await expect(
page.getByRole("alert").filter({ hasText: "Requested mock prompt rejection" }),
).toBeVisible();
await expectComposerDraft(page, "Keep this follow-up.");
} finally {
await agent.cleanup();
}
});
test("restores an ambiguous Steer failure without retrying or interrupting", async ({
page,
}, testInfo) => {
@@ -14,6 +14,7 @@ import {
answerFreshnessCheck,
commitTimelineTurnsWhileDisconnected,
disconnectViewedTimeline,
expectCleanLoadingSurfaces,
expectEmptyChatSynced,
expectPromptAndWholeReply,
expectResumeAnsweredWithoutFetch,
@@ -26,11 +27,14 @@ import {
restoreViewedTimelineWithHeldResponse,
restoreViewedTimelineWithLiveRowsFirst,
reopenWithFreshnessCheckUnanswered,
reopenWithTimelineTailUnanswered,
seedStreamingReplyAgent,
sendPromptWhileDisconnected,
stopStreamingReply,
waitForDisplayOnlyTimelineCache,
waitForResumeAnswer,
reopenAppWatchingForUpdatingToast,
watchColdAndReloadLoadingSurfaces,
watchForUpdatingToast,
} from "../support/helpers/timeline-resume";
@@ -176,4 +180,36 @@ test.describe("Agent timeline resume", () => {
await agent.cleanup();
}
});
test("cold opens and display-only cache reloads keep loading steady and reserve Updating messages for slow replies", async ({
page,
}) => {
test.setTimeout(120_000);
const gate = await installDaemonWebSocketGate(page);
const agent = await seedLongMockAgentTimeline({ turns: 30 });
try {
await watchColdAndReloadLoadingSurfaces(page);
await test.step("cold open fetches one tail without showing a premature toast", async () => {
const requests = rememberTimelineRequestCounts(gate, agent.agentId);
await openAgentTimeline(page, agent);
await expectTimelinePromptVisible(page, agent.newestPrompt);
await expectCleanLoadingSurfaces(page, gate, requests);
});
await test.step("display-only cached reload shows Updating messages until the overdue tail arrives", async () => {
await scrollTimelineUntilOlderHistoryIsReachable(page, agent.firstOlderPagePrompt);
await waitForDisplayOnlyTimelineCache(page, agent);
const requests = rememberTimelineRequestCounts(gate, agent.agentId);
await reopenWithTimelineTailUnanswered({ page, gate, agentId: agent.agentId });
await expectTimelinePromptVisible(page, agent.newestPrompt);
gate.releaseHeldTimelineResponses();
await expectCleanLoadingSurfaces(page, gate, requests);
});
} finally {
gate.restore();
await agent.cleanup();
}
});
});
@@ -20,7 +20,9 @@ import {
} from "../support/helpers/composer";
import { openCommandCenter, closeCommandCenter } from "../support/helpers/command-center";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import {
PROMPT_PLUGIN_ID,
expectPromptsDrawnByPlugin,
withPromptTimelinePlugin,
} from "../support/helpers/plugin-timeline";
@@ -279,6 +281,7 @@ test("finds text in a prompt a timeline plugin draws", async ({ page }, testInfo
await agent.client.waitForFinish(agent.agentId, 15_000);
await withPromptTimelinePlugin(async () => {
await openAgentRoute(page, agent);
await approveClientPluginsInUi(page, [PROMPT_PLUGIN_ID]);
await expectPromptsDrawnByPlugin(page);
await openChatFind(page);
await query(page).fill("scope-needle");
@@ -606,6 +609,35 @@ async function refocusFindAndReplaceQuery(page: Page, shortcut: string) {
await page.keyboard.type("a.b");
await expect(query(page)).toHaveValue("a.b");
await expectHighlight(page, "a.b");
await typeInTheSameTaskAsShortcut(page, shortcut, "x");
await page.keyboard.type(".y");
await expect(query(page)).toHaveValue("x.y");
}
/**
* A fast typist's first key can land before the browser runs any timer queued
* by the shortcut. Pressing the shortcut and typing in one task makes that
* ordering certain instead of left to CI speed.
*/
async function typeInTheSameTaskAsShortcut(page: Page, shortcut: string, text: string) {
await composerLocator(page).click();
await expectComposerFocused(page);
await composerLocator(page).evaluate(
(element, { metaKey, typed }) => {
element.dispatchEvent(
new KeyboardEvent("keydown", {
key: "f",
metaKey,
ctrlKey: !metaKey,
bubbles: true,
cancelable: true,
}),
);
document.execCommand("insertText", false, typed);
},
{ metaKey: shortcut.startsWith("Meta"), typed: text },
);
await expect(query(page)).toBeFocused();
}
async function expectCommandCenterOwnsFindShortcut(page: Page, shortcut: string) {
@@ -25,7 +25,9 @@ import {
expectReadingStreamedMarkdown,
} from "../support/helpers/chat-outline";
import { createCreationScenario } from "../support/helpers/creation";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import {
PROMPT_PLUGIN_ID,
attachPromptTimelineEvidence,
expectPromptsDrawnByPlugin,
expectVirtualizedPluginPromptVisible,
@@ -118,6 +120,7 @@ test.describe("desktop chat outline", () => {
await withPromptTimelinePlugin(async () => {
await page.setViewportSize(WIDE_VIEWPORT);
await openAgentTimeline(page, agent);
await approveClientPluginsInUi(page, [PROMPT_PLUGIN_ID]);
await expectChatOutlinePrompts(page, 80);
await expectPromptsDrawnByPlugin(page);
await expectTimelinePromptNotMounted(page, agent.prompts[39]);
@@ -148,6 +151,7 @@ test.describe("desktop chat outline", () => {
const history = await holdOlderHistoryPages(page, agent);
await page.setViewportSize(WIDE_VIEWPORT);
await openAgentTimeline(page, agent);
await approveClientPluginsInUi(page, [PROMPT_PLUGIN_ID]);
await expectChatOutlinePrompts(page, 80);
await scrollThroughOlderHistoryPages(page, 2, history);
await scrollTimelineToNewestLoadedEdge(page);
@@ -1,4 +1,5 @@
import { expect, test, type Page } from "../support/fixtures";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { withDirectoryPlugin } from "../support/helpers/plugin-timeline";
import {
attachImageFromMenu,
@@ -158,6 +159,7 @@ test.describe("Client slash commands", () => {
}`,
run: async () => {
await withOpenReadyMockAgent(page, { title: "Attached slash command" }, async () => {
await approveClientPluginsInUi(page, ["attachment-slash-e2e"]);
const input = composerLocator(page);
await input.fill("/pict");
await expect(
@@ -21,6 +21,7 @@ import {
expectAttachButtonDisabled,
fillComposerDraft,
dropFileOnComposer,
pasteFilesIntoComposer,
sendDraftToQueue,
expectQueuedMessageButton,
startRunningMockAgent,
@@ -152,7 +153,7 @@ test.describe("Composer attachments", () => {
// needed before this can be exercised end-to-end.
});
test("attaches, previews, and removes an image before dropping a file", async ({
test("attaches files from the menu, clipboard, and drag and drop", async ({
page,
withWorkspace,
}) => {
@@ -185,6 +186,19 @@ test.describe("Composer attachments", () => {
await expectComposerFocused(page);
});
await test.step("paste a Markdown file into the composer", async () => {
const file = {
name: "notes.md",
mimeType: "text/markdown",
buffer: Buffer.from("# Clipboard notes"),
};
const handled = await pasteFilesIntoComposer(page, [file]);
await expect(page.getByText(file.name, { exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: file.name, exact: true })).toBeVisible();
expect(handled).toBe(true);
await expectComposerDraft(page, "");
});
await test.step("dropping an image focuses the composer", async () => {
await blurComposerInput(page);
await expectComposerNotFocused(page);
@@ -192,6 +206,15 @@ test.describe("Composer attachments", () => {
await expectAttachmentPill(page, "composer-image-attachment-pill");
await expectComposerFocused(page);
});
await test.step("paste a file and an image together", async () => {
await removeAttachmentPill(page, "composer-image-attachment-pill", "Remove image attachment");
await expect(page.getByTestId("composer-image-attachment-pill")).toHaveCount(0);
const file = { ...TEST_JSON, name: "clipboard.json" };
await pasteFilesIntoComposer(page, [file, TEST_IMAGE]);
await expect(page.getByRole("button", { name: file.name, exact: true })).toBeVisible();
await expectAttachmentPill(page, "composer-image-attachment-pill");
});
});
test("dropped JSON file renders as a file attachment in New Workspace", async ({ page }) => {
@@ -4,6 +4,7 @@ import {
attachComposerTestImage,
cancelAgent,
composerLocator,
configureComposerQueueSend,
expectAttachmentPill,
expectComposerDraft,
expectComposerVisible,
@@ -102,6 +103,27 @@ test.describe("Composer queue", () => {
}
});
test("Send now with the queue send behavior steers instead of interrupting", async ({ page }) => {
const prompt = "Fold this into the running turn.";
await configureComposerQueueSend(page);
const agent = await seedAgentWithOpenTurn({ repoPrefix: "queue-steer-", title: "Queue steer" });
try {
await openAgentRoute(page, agent);
await expectComposerVisible(page);
await queueMessage(page, prompt);
await sendQueuedMessageNow(page, prompt);
await expectDeliveredOnce(page, prompt);
// Steering keeps the open turn, so its plan approval is still waiting. An interrupt
// would have replaced the turn and dropped it.
const fetched = await agent.client.fetchAgent({ agentId: agent.agentId });
expect(fetched?.agent.pendingPermissions).toHaveLength(1);
} finally {
await agent.cleanup();
}
});
test("the host delivers a queued prompt with every client closed", async ({ page }) => {
const prompt = "Continue while I am away.";
const agent = await seedAgentWithOpenTurn({
@@ -172,7 +172,7 @@ test("retrying failed agent initialization keeps the plugin metadata set on New
startup,
composerMetadata,
}) => {
await creation.openWorkspaceForm("local");
await creation.openWorkspaceForm("local", { approvePlugins: ["composer-metadata"] });
await composerMetadata.set({ "composer-metadata.tag": "kept" });
await creation.submitPrompt("Start the tagged task.", "Create");
await creation.expectAgentStillStarting();
@@ -1,6 +1,9 @@
import { seedMockAgentWorkspace, openAgentRoute } from "../support/helpers/mock-agent";
import { writeFile } from "node:fs/promises";
import path from "node:path";
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
import { openFileFromExplorer } from "../support/helpers/file-explorer";
import { waitForWorkspaceInReplicaCache } from "../support/helpers/replica-cache-storage";
import { openSettingsSection, clickSettingsBackToWorkspace } from "../support/helpers/settings";
import { expect, test } from "../support/fixtures";
import {
@@ -547,3 +550,64 @@ test("keeps the comment shortcut in the editor beside an Explorer agent", async
await workspace.cleanup();
}
});
async function restoreHostConnection(gate: Awaited<ReturnType<typeof installDaemonWebSocketGate>>) {
gate.holdNextServerMessage("status");
gate.restore();
await gate.waitForHeldServerMessage("status");
gate.releaseHeldServerMessage("status");
}
test("loads Files and file filter automatically once the host connects after launch or disconnect", async ({
page,
withWorkspace,
}) => {
const gate = await installDaemonWebSocketGate(page);
const workspace = await withWorkspace();
await writeFile(path.join(workspace.repoPath, "startup-repro.txt"), "hello\n", "utf8");
await test.step("open Files on the workspace before reloading", async () => {
await workspace.navigateTo();
const explorer = await ensureExplorerSidebar(page);
await openFilesPanel(page);
await expect(
explorer
.getByTestId("file-explorer-tree-scroll")
.getByText("startup-repro.txt", { exact: true }),
).toBeVisible();
await waitForWorkspaceInReplicaCache(page, workspace.workspaceId);
});
await test.step("reload while the host is unreachable and recover automatically on connect", async () => {
await gate.drop();
await page.reload();
await gate.waitForBlockedConnection();
const explorer = explorerSidebar(page);
await expect(explorer).toBeVisible();
await restoreHostConnection(gate);
await expect(
explorer
.getByTestId("file-explorer-tree-scroll")
.getByText("startup-repro.txt", { exact: true }),
).toBeVisible();
await expect(explorer.getByText("Host is not connected", { exact: true })).toHaveCount(0);
});
await test.step("filter Files while disconnected and recover automatically on reconnect", async () => {
const explorer = explorerSidebar(page);
await gate.drop();
await gate.waitForBlockedConnection();
await explorer.getByPlaceholder("Search files").fill("startup-repro");
await restoreHostConnection(gate);
await expect(
explorer.getByTestId("file-filter-results").getByText("startup-repro.txt", { exact: true }),
).toBeVisible();
await expect(explorer.getByText("Host is not connected", { exact: true })).toHaveCount(0);
});
});
@@ -9,6 +9,7 @@ import {
expectHostBadgeIconOnly,
expectHostBadgeName,
expectHostBadgeTinted,
expectHostSelectorStatusIcon,
expectNoHostBadge,
leaveHostAppearanceSettings,
openHostAppearanceSettings,
@@ -116,14 +117,29 @@ 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 icon and apply them to the sidebar badge and host popover", async () => {
await test.step("preview a color and icon and apply them to the sidebar badge, host selectors, 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" });
// The Settings sidebar host selector shows the host's resolved icon badged with its status dot.
const settingsHostPicker = page.getByTestId("settings-host-picker");
await settingsHostPicker.click();
await page.getByTestId(`settings-host-picker-item-${badge.serverId}`).click();
await expectHostSelectorStatusIcon(settingsHostPicker, { color: "teal" });
await leaveHostAppearanceSettings(page);
await expectHostBadgeTinted(page, { ...badge, hostName, color: "teal" });
// The New Workspace host selector also shows the host icon with its status dot.
await page.getByTestId("sidebar-global-new-workspace").click();
const newWorkspaceHostTrigger = page.getByTestId("host-picker-trigger");
await expect(newWorkspaceHostTrigger).toBeVisible();
await newWorkspaceHostTrigger.click();
await page.getByTestId(`new-workspace-host-picker-option-${badge.serverId}`).click();
await expectHostSelectorStatusIcon(newWorkspaceHostTrigger, { color: "teal" });
await page.getByTestId("sidebar-hosts-trigger").click();
const hostRow = page.getByTestId(`sidebar-host-row-${badge.serverId}`);
await expect(hostRow).toBeVisible();
@@ -199,6 +199,39 @@ test("shows listing failure details beside healthy sessions and retries the fail
}
});
test("keeps a request timeout visible while retrying the provider", async ({ page }) => {
const gate = await installDaemonWebSocketGate(page);
const flow = new ImportSessionFlow(page);
await flow.openWorkspace(scenario.project.workspaceId, { width: 1280, height: 844 });
await page.clock.install();
await test.step("the first listings time out before any response reaches the sheet", async () => {
gate.setServerMessageSuppressed("fetch_recent_provider_sessions_response", true);
await flow.openFromWorkspaceHeader();
await expect
.poll(() => gate.getClientRequestCount("fetch_recent_provider_sessions_request"))
.toBeGreaterThanOrEqual(2);
await page.clock.fastForward(101_000);
await flow.expectProviderError("Claude");
await flow.expectProviderRequestTimeout();
gate.setServerMessageSuppressed("fetch_recent_provider_sessions_response", false);
});
await test.step("Retry keeps the timeout visible until Claude replies", async () => {
gate.holdNextClientRequest("fetch_recent_provider_sessions_request");
await flow.startProviderRetry("claude");
await gate.waitForHeldClientRequest();
await flow.expectProviderRetryPending("claude");
await flow.expectProviderError("Claude");
await flow.expectProviderRequestTimeout();
gate.releaseHeldClientRequest();
await flow.expectProviderRecovered("Claude");
await flow.expectRows({ first: [scenario.importSessionId] });
await flow.expectProviderError("Broken ACP");
});
});
test("Import Session keeps listings tied to their host during a switch and a pending import", async ({
page,
}) => {
@@ -261,6 +294,22 @@ test("Import Session keeps listings tied to their host during a switch and a pen
}
});
test("New workspace imports a session into a new workspace beside the one open at its directory", async ({
page,
}, testInfo) => {
const flow = new ImportSessionFlow(page);
await flow.openWorkspace(scenario.project.workspaceId, { width: 1280, height: 844 });
await flow.openGlobally();
await flow.importSession("fixture-root-07");
await flow.expectImportedIntoNewWorkspace({
existingWorkspaceId: scenario.project.workspaceId,
userText: "Review fixture item 7",
});
await page.screenshot({ path: testInfo.outputPath("new-workspace-import.png") });
});
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 });
@@ -0,0 +1,83 @@
import { expect, test, type Page } from "../support/fixtures";
import { expectComposerDraft, fillComposerDraft } from "../support/helpers/composer";
import { gotoWorkspace } from "../support/helpers/launcher";
import { runWorkspaceActionFromCommandCenter } from "../support/helpers/command-center-workspace-actions";
import { waitForDraftComposer } from "../support/helpers/command-center-agent-controls";
import { seedWorkspace } from "../support/helpers/seed-client";
const openText = "Keep this open New Agent draft";
const orphanText = "Unreachable draft from an earlier version";
const existingAgentText = "Keep this archived conversation draft";
async function openDraftTab(page: Page): Promise<void> {
await runWorkspaceActionFromCommandCenter(page, "New agent");
await waitForDraftComposer(page);
}
async function persistedDraftTexts(page: Page): Promise<string[]> {
return page.evaluate(() => {
const drafts = JSON.parse(localStorage.getItem("paseo-drafts") ?? "{}").state?.drafts ?? {};
return Object.values(drafts).map(
(record) => (record as { input: { text: string } }).input.text,
);
});
}
async function seedOrphanBeforeUpgrade(page: Page): Promise<void> {
await page.evaluate(
({ orphan, archived }) => {
const makeDraft = (text: string) => ({
input: { text, attachments: [] },
lifecycle: "active",
updatedAt: Date.now(),
version: 1,
});
const envelope = JSON.parse(localStorage.getItem("paseo-drafts") ?? "{}");
envelope.state.drafts["draft:old-server:previously-closed-tab"] = makeDraft(orphan);
envelope.state.drafts["agent:old-server:archived-agent"] = makeDraft(archived);
localStorage.setItem("paseo-drafts", JSON.stringify(envelope));
localStorage.removeItem("paseo:orphaned-workspace-drafts-swept");
const nonce = localStorage.getItem("@paseo:e2e-seed-nonce");
if (nonce) localStorage.setItem("@paseo:e2e-disable-default-seed-once", nonce);
},
{ orphan: orphanText, archived: existingAgentText },
);
}
async function closeDraftWithShortcut(page: Page, answer: "cancel" | "discard"): Promise<void> {
const prompt = page.waitForEvent("dialog");
const shortcut = page.keyboard.press("Alt+Shift+w");
const dialog = await prompt;
expect(dialog.message()).toContain("Unsaved changes");
if (answer === "cancel") await dialog.dismiss();
else await dialog.accept();
await shortcut;
}
test("keeps open New Agent drafts through upgrade and confirms before discarding them", async ({
page,
}) => {
const workspace = await seedWorkspace({ repoPrefix: "discard-new-agent-draft-" });
try {
await gotoWorkspace(page, workspace.workspaceId);
await openDraftTab(page);
await fillComposerDraft(page, openText);
await expect.poll(() => persistedDraftTexts(page)).toContain(openText);
await seedOrphanBeforeUpgrade(page);
await page.reload();
await expectComposerDraft(page, openText);
await expect.poll(() => persistedDraftTexts(page)).not.toContain(orphanText);
await expect.poll(() => persistedDraftTexts(page)).toContain(existingAgentText);
await closeDraftWithShortcut(page, "cancel");
await expectComposerDraft(page, openText);
await closeDraftWithShortcut(page, "discard");
await expect.poll(() => persistedDraftTexts(page)).not.toContain(openText);
await openDraftTab(page);
await expectComposerDraft(page, "");
} finally {
await workspace.cleanup();
}
});
@@ -11,9 +11,11 @@ import {
installBrowserNotificationRecorder,
openNotificationSettings,
readRecordedBrowserNotifications,
reloadAndWaitForDevicePresence,
setNotificationSwitch,
setPluginNotificationSwitch,
} from "../support/helpers/notification-settings";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { copyPluginExample } from "../support/helpers/plugin-fixture";
import { seedWorkspace, type SeedDaemonClient } from "../support/helpers/seed-client";
@@ -107,7 +109,7 @@ test.describe("Settings → Notifications and OS notification filtering", () =>
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 reloadAndWaitForDevicePresence(page);
await expectNotificationSwitchState(page, "Agent finished", {
checked: true,
disabled: false,
@@ -137,7 +139,7 @@ test.describe("Settings → Notifications and OS notification filtering", () =>
).toBeVisible();
await expectNotificationSubControlsDisabled(page, true);
await page.reload();
await reloadAndWaitForDevicePresence(page);
await expectNotificationSwitchState(page, "Enable notifications", {
checked: false,
disabled: false,
@@ -172,6 +174,7 @@ test.describe("Settings → Notifications and OS notification filtering", () =>
await seeded.client.patchDaemonConfig({ pluginsEnabled: true });
await seeded.client.installDirectoryPlugin(pluginExample.directory);
installedPlugin = true;
await approveClientPluginsInUi(page, ["notifications-example"]);
const pluginToggle = page.getByRole("switch", { name: "Build alerts", exact: true });
await expect(pluginToggle).toBeVisible();
@@ -1,3 +1,5 @@
import { createHostClient } from "@getpaseo/client/node";
import { expect } from "@playwright/test";
import { gotoAppShell, openSettings } from "../support/helpers/app";
import {
addDirectHostFromSettings,
@@ -24,11 +26,51 @@ import {
slowConnectionToHost,
expectTailscaleUpdateRequired,
expectCompletePairingQr,
expectConnectedClientRow,
expectRelayConsent,
expandConnectedClientRow,
openDevicesPage,
openPairDeviceModal,
preparePairingHost,
returnFromRelayToWaysToConnect,
} from "../support/helpers/pair-device";
test("lists connected clients with scopes and navigates Pair a device → Relay → Back", async ({
page,
}) => {
const daemon = await startIsolatedHostDaemon("pair-device-connected-clients", {
mutableRelay: { enabled: true },
});
const viewer = createHostClient(`127.0.0.1:${daemon.port}`, {
clientId: "cid_e2e_phone_viewer",
clientType: "mobile",
appVersion: "0.18.1",
clientInfo: { name: "Test Phone", platform: "ios" },
sessionPermissions: ["daemon.read", "workspace.read"],
reconnect: { enabled: false },
});
try {
await openDevicesPage(page, daemon);
await expectConnectedClientRow(page, "This device", "Full access");
await expandConnectedClientRow(page, "This device");
await expect(
page
.getByTestId("devices-connected-clients-card")
.getByText("access.manage", { exact: true }),
).toBeVisible();
await viewer.connect();
await expectConnectedClientRow(page, "Test Phone", "Read-only");
await openPairDeviceModal(page);
await expectPairingOffer(page);
await returnFromRelayToWaysToConnect(page);
} finally {
await viewer.close();
await daemon.close();
}
});
test("opens relay consent in browser web", async ({ page }) => {
const daemon = await startIsolatedHostDaemon("pair-device-browser-relay-off", {
mutableRelay: { enabled: false },
@@ -81,7 +123,7 @@ test("turns Tailscale on and off from Devices, asking first over Tailscale", asy
}, 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);
test.setTimeout(180_000);
if (!baseURL) throw new Error("Expected the app base URL");
const daemon = await startTailscaleTestDaemon(baseURL);
try {
@@ -1,5 +1,11 @@
import path from "node:path";
import { expect } from "../support/fixtures";
import {
test,
expectInstantPrefetchedRelatedOpen,
expectStableDesktopBackToListing,
expectStableUncachedListingOpen,
expectStackedFirstFrameOnNarrowDesktop,
expectStillBrowsing,
installFromPage,
installListingFromRow,
@@ -22,3 +28,145 @@ test("installs a listed plugin from Browse and uninstalls it from either of its
await openFromInstalledTab(page);
await uninstallFromPage(page);
});
test("shows scorecard progressive disclosure, updates, custom links, and related plugins", async ({
page,
directoryHost,
}) => {
const captureDir = process.env.PASEO_CAPTURE_DIR;
if (captureDir) {
await page.emulateMedia({ colorScheme: "dark" });
}
await page.setViewportSize({ width: 1280, height: 960 });
await openDirectory(page, directoryHost);
await openListingPage(page);
await expect(page.getByText("Related plugins", { exact: true })).toBeVisible();
await expect(page.getByTestId("plugin-related-acme/pr-radar")).toBeVisible();
if (captureDir) {
await page.waitForTimeout(300);
await page.screenshot({ path: path.join(captureDir, "live-app-desktop-overview.png") });
}
// Open Scorecard tab and expand a capability row.
await page.getByTestId("plugin-page-tab-scorecard").click();
await expect(page.getByText("This plugin is actively maintained.")).toBeVisible();
const panelRow = page.getByRole("button", { name: /Workspace panel/ });
await panelRow.click();
await expect(page.getByText(/index\.client\.ts/)).toBeVisible();
if (captureDir) {
await page.waitForTimeout(300);
await page.screenshot({ path: path.join(captureDir, "live-app-desktop-scorecard.png") });
}
// Open Updates tab and custom actions menu.
await page.getByTestId("plugin-page-tab-updates").click();
await expect(page.getByText("v1.2.0", { exact: true })).toBeVisible();
await expect(page.getByText("c81a4f2", { exact: true })).toBeVisible();
await page.getByTestId("plugin-actions-acme/directory-example").click();
await expect(page.getByText("Documentation", { exact: true })).toBeVisible();
if (captureDir) {
await page.waitForTimeout(300);
await page.screenshot({ path: path.join(captureDir, "live-app-desktop-updates.png") });
}
await page.keyboard.press("Escape");
// Verify compact mobile layout on the same listing page.
await page.setViewportSize({ width: 390, height: 844 });
await page.getByTestId("plugin-page-tab-scorecard").click();
await expect(page.getByText("This plugin is actively maintained.")).toBeVisible();
if (captureDir) {
await page.waitForTimeout(300);
await page.screenshot({ path: path.join(captureDir, "live-app-mobile-scorecard.png") });
}
});
test("renders branded sponsor buttons for single and stacked platforms in light and dark themes", async ({
page,
directoryHost,
}) => {
const captureDir = process.env.PASEO_CAPTURE_DIR;
await page.setViewportSize({ width: 1280, height: 1000 });
await page.emulateMedia({ colorScheme: "dark" });
await openDirectory(page, directoryHost);
await openListingPage(page);
const singleGithub = page.getByTestId("funding-button-github");
await expect(singleGithub).toBeVisible();
await expect(singleGithub).toContainText("Sponsor on GitHub");
await expect(singleGithub).toHaveCSS("background-color", "rgba(219, 97, 162, 0.1)");
await expect(singleGithub).toHaveCSS("border-top-color", "rgba(219, 97, 162, 0.32)");
await expect(singleGithub.locator("svg")).toHaveAttribute("fill", "#ea7bb3");
if (captureDir) {
await page.waitForTimeout(300);
await page.screenshot({ path: path.join(captureDir, "app-gallery-single-dark.png") });
}
await page.emulateMedia({ colorScheme: "light" });
await expect(singleGithub).toBeVisible();
await expect(singleGithub).toHaveCSS("background-color", "rgba(191, 57, 137, 0.08)");
await expect(singleGithub).toHaveCSS("border-top-color", "rgba(191, 57, 137, 0.3)");
await expect(singleGithub.locator("svg")).toHaveAttribute("fill", "#bf3989");
if (captureDir) {
await page.waitForTimeout(300);
await page.screenshot({ path: path.join(captureDir, "app-gallery-single-light.png") });
}
await page.getByTestId("plugin-related-acme/pr-radar").click();
const platforms = [
["github", "Sponsor on GitHub"],
["kofi", "Support on Ko-fi"],
["buymeacoffee", "Buy Me a Coffee"],
["opencollective", "Sponsor on Open Collective"],
["patreon", "Support on Patreon"],
["polar", "Sponsor on Polar"],
["liberapay", "Donate on Liberapay"],
["paypal", "Donate via PayPal"],
["custom", "Sponsor"],
] as const;
for (const [platform, label] of platforms) {
const btn = page.getByTestId(`funding-button-${platform}`).filter({ visible: true });
await expect(btn).toBeVisible();
await expect(btn).toContainText(label);
}
const stackedKofi = page.getByTestId("funding-button-kofi").filter({ visible: true });
await expect(stackedKofi).toHaveCSS("background-color", "rgba(217, 67, 64, 0.08)");
await expect(stackedKofi.locator("svg")).toHaveAttribute("fill", "#d94340");
if (captureDir) {
await page.waitForTimeout(300);
await page.screenshot({ path: path.join(captureDir, "app-gallery-stacked-light.png") });
}
await page.emulateMedia({ colorScheme: "dark" });
for (const [platform] of platforms) {
await expect(
page.getByTestId(`funding-button-${platform}`).filter({ visible: true }),
).toBeVisible();
}
await expect(stackedKofi).toHaveCSS("background-color", "rgba(255, 94, 91, 0.1)");
await expect(stackedKofi.locator("svg")).toHaveAttribute("fill", "#ff7a78");
if (captureDir) {
await page.waitForTimeout(300);
await page.screenshot({ path: path.join(captureDir, "app-gallery-stacked-dark.png") });
}
});
test("opens plugin pages without empty markdown collapse, stacked back flash, or layout shift", async ({
page,
directoryHost,
}) => {
await page.setViewportSize({ width: 1280, height: 960 });
directoryHost.setDetailDelayMs(250);
await openDirectory(page, directoryHost);
await expectStableUncachedListingOpen(page);
await expectInstantPrefetchedRelatedOpen(page, directoryHost);
await expectStableDesktopBackToListing(page);
await expectStackedFirstFrameOnNarrowDesktop(page);
});
@@ -0,0 +1,279 @@
import path from "node:path";
import { expect, test } from "../support/fixtures";
import { gotoAppShell, openSettings } from "../support/helpers/app";
import { openHostSection } from "../support/helpers/settings";
import { getServerId } from "../support/helpers/server-id";
import { waitForSettledPosition } from "../support/helpers/sheet-layout";
import { openPluginPage, openPluginPageActions } from "../support/helpers/plugin-gallery";
import {
allowPluginExecution,
cancelPluginExecutionBypassConfirm,
confirmPluginExecutionBypass,
declinePluginExecution,
ensureArtifactsDir,
expectExecutedPluginMarkers,
expectExecutedPluginMarkersContain,
expectPluginApprovalPrompt,
expectPluginExecutionBypass,
getExecutedPluginMarkers,
openPluginExecutionBypassConfirm,
pluginApprovalSheet,
pluginExecutionBypassConfirmModal,
pluginExecutionBypassSwitch,
reloadKeepingPersistedState,
setPluginExecutionBypass,
withInstalledClientPlugins,
type ClientProbePluginSpec,
} from "../support/helpers/plugin-execution-approval";
const REPO_ROOT = path.resolve(__dirname, "../../../..");
const ALPHA: ClientProbePluginSpec = {
id: "alpha-probe",
name: "Alpha Probe",
sidebarTitle: "Alpha Probe",
markerKey: "alpha-probe",
};
const BETA: ClientProbePluginSpec = {
id: "beta-probe",
name: "Beta Probe",
sidebarTitle: "Beta Probe",
markerKey: "beta-probe",
};
const GAMMA: ClientProbePluginSpec = {
id: "gamma-probe",
name: "Gamma Probe",
sidebarTitle: "Gamma Probe",
markerKey: "gamma-probe",
};
test("prompts sequentially before evaluating stacked client plugins, holds layout steady, persists decisions, and lets settings allow or block them", async ({
page,
}) => {
test.setTimeout(120_000);
await page.setViewportSize({ width: 1440, height: 900 });
const artifacts = await ensureArtifactsDir(REPO_ROOT);
await withInstalledClientPlugins([ALPHA, BETA, GAMMA], async () => {
await gotoAppShell(page);
await test.step("no client plugin executes before user approval", async () => {
await expectPluginApprovalPrompt(page, { pluginId: ALPHA.id, progress: "1 of 3" });
expect(await getExecutedPluginMarkers(page)).toEqual([]);
await expect(page.getByText(ALPHA.sidebarTitle, { exact: true })).toHaveCount(0);
await expect(page.getByText(BETA.sidebarTitle, { exact: true })).toHaveCount(0);
await expect(page.getByText(GAMMA.sidebarTitle, { exact: true })).toHaveCount(0);
await page.screenshot({ path: path.join(artifacts, "02-after-prompt-1-of-3.png") });
});
await test.step("approving the first advances in place with steady button geometry", async () => {
const sheet = pluginApprovalSheet(page);
const allowButton = sheet.getByRole("button", { name: "Allow", exact: true });
const declineButton = sheet.getByRole("button", { name: "Don't allow", exact: true });
const beforeAllow = await allowButton.boundingBox();
const beforeDecline = await declineButton.boundingBox();
expect(beforeAllow).not.toBeNull();
expect(beforeDecline).not.toBeNull();
await allowPluginExecution(page);
await expectPluginApprovalPrompt(page, { pluginId: BETA.id, progress: "2 of 3" });
await expectExecutedPluginMarkers(page, [ALPHA.markerKey]);
await expect(page.getByText(ALPHA.sidebarTitle, { exact: true })).toBeVisible();
await expect(page.getByText(BETA.sidebarTitle, { exact: true })).toHaveCount(0);
const afterAllow = await allowButton.boundingBox();
const afterDecline = await declineButton.boundingBox();
expect(afterAllow).toEqual(beforeAllow);
expect(afterDecline).toEqual(beforeDecline);
await page.screenshot({ path: path.join(artifacts, "03-after-prompt-2-of-3.png") });
});
await test.step("declining the second and approving the third settles cleanly", async () => {
await declinePluginExecution(page);
await expectPluginApprovalPrompt(page, { pluginId: GAMMA.id, progress: "3 of 3" });
expect(await getExecutedPluginMarkers(page)).toEqual([ALPHA.markerKey]);
await allowPluginExecution(page);
await expect(pluginApprovalSheet(page)).toHaveCount(0);
await expectExecutedPluginMarkers(page, [ALPHA.markerKey, GAMMA.markerKey]);
await expect(page.getByText(ALPHA.sidebarTitle, { exact: true })).toBeVisible();
await expect(page.getByText(GAMMA.sidebarTitle, { exact: true })).toBeVisible();
await expect(page.getByText(BETA.sidebarTitle, { exact: true })).toHaveCount(0);
await page.screenshot({
path: path.join(artifacts, "04-after-settled-approved-and-declined.png"),
});
});
await test.step("reloading keeps approved plugins active and declined blocked without re-prompting", async () => {
await reloadKeepingPersistedState(page);
await expect(page.getByText(ALPHA.sidebarTitle, { exact: true })).toBeVisible({
timeout: 30_000,
});
await expect(page.getByText(GAMMA.sidebarTitle, { exact: true })).toBeVisible();
await expect(pluginApprovalSheet(page)).toHaveCount(0);
expect(await getExecutedPluginMarkers(page)).toEqual([ALPHA.markerKey, GAMMA.markerKey]);
await expect(page.getByText(BETA.sidebarTitle, { exact: true })).toHaveCount(0);
});
await test.step("settings surfaces the declined plugin and lets the user allow or block it", async () => {
await openSettings(page);
await openHostSection(page, getServerId(), "plugins");
await expect(page.getByTestId(`plugin-row-${BETA.id}`)).toContainText("blocked");
await openPluginPage(page, BETA.name, BETA.id);
await expect(page.getByTestId("plugin-client-blocked-alert")).toBeVisible();
await page.screenshot({ path: path.join(artifacts, "05-after-settings-blocked-plugin.png") });
await page.getByTestId("plugin-client-execution-allow").click();
await expect(page.getByTestId("plugin-client-blocked-alert")).toHaveCount(0);
await expectExecutedPluginMarkersContain(page, BETA.markerKey);
await openPluginPageActions(page, BETA.name);
await page.getByRole("menuitem", { name: "Block on this device", exact: true }).click();
await expect(page.getByTestId("plugin-client-blocked-alert")).toBeVisible();
});
});
});
test("presents the queued approval bottom sheet cleanly on compact viewports and closes cleanly on dismiss", async ({
page,
}) => {
test.setTimeout(120_000);
await page.setViewportSize({ width: 390, height: 844 });
const artifacts = await ensureArtifactsDir(REPO_ROOT);
await withInstalledClientPlugins([ALPHA, BETA], async () => {
await gotoAppShell(page);
await test.step("shows the first prompt in a compact bottom sheet", async () => {
await expectPluginApprovalPrompt(page, { pluginId: ALPHA.id, progress: "1 of 2" });
await waitForSettledPosition(pluginApprovalSheet(page));
expect(await getExecutedPluginMarkers(page)).toEqual([]);
await page.screenshot({ path: path.join(artifacts, "06-after-compact-sheet-1-of-2.png") });
});
await test.step("approves the first and dismisses the remaining queue cleanly", async () => {
await allowPluginExecution(page);
await expectPluginApprovalPrompt(page, { pluginId: BETA.id, progress: "2 of 2" });
await expectExecutedPluginMarkers(page, [ALPHA.markerKey]);
await page.getByRole("button", { name: "Close", exact: true }).click();
await expect(pluginApprovalSheet(page)).toHaveCount(0);
expect(await getExecutedPluginMarkers(page)).toEqual([ALPHA.markerKey]);
});
});
});
test("lets Settings -> General toggle bypass client plugin approval, persists across reload, and restores prompting when turned off", async ({
page,
}) => {
test.setTimeout(120_000);
await page.setViewportSize({ width: 1440, height: 900 });
const artifacts = await ensureArtifactsDir(REPO_ROOT);
await withInstalledClientPlugins([ALPHA, BETA], async ({ install }) => {
await gotoAppShell(page);
await test.step("approve one plugin and decline the other before opening Settings -> General", async () => {
await expectPluginApprovalPrompt(page, { pluginId: ALPHA.id, progress: "1 of 2" });
await allowPluginExecution(page);
await expectPluginApprovalPrompt(page, { pluginId: BETA.id, progress: "2 of 2" });
await declinePluginExecution(page);
await expect(pluginApprovalSheet(page)).toHaveCount(0);
await expectExecutedPluginMarkers(page, [ALPHA.markerKey]);
});
await test.step("General settings shows the minimal bypass toggle off by default", async () => {
await openSettings(page);
const row = page.getByTestId("settings-plugin-execution-bypass-row");
await expect(row).toBeVisible();
await expect(row).toContainText("Run plugins without asking");
await expect(row).not.toContainText("Unsafe");
await expect(row).toContainText(
"Any connected host can run plugin code inside Paseo and reach your other hosts",
);
await expectPluginExecutionBypass(page, false);
await page.screenshot({
path: path.join(artifacts, "settings-general-plugin-bypass-off-desktop.png"),
});
});
await test.step("turning bypass on requires confirmation and canceling keeps it off", async () => {
await openPluginExecutionBypassConfirm(page);
const modal = pluginExecutionBypassConfirmModal(page);
await expect(modal).toContainText("Run plugins without asking?");
await expect(modal).toContainText(
"Any connected host can run plugin code inside Paseo and reach your other connected hosts.",
);
await expectPluginExecutionBypass(page, false);
await expect(modal.getByRole("dialog")).toHaveCSS("opacity", "1");
await page.screenshot({
path: path.join(artifacts, "settings-general-plugin-bypass-confirm-desktop.png"),
});
await cancelPluginExecutionBypassConfirm(page);
expect(await getExecutedPluginMarkers(page)).toEqual([ALPHA.markerKey]);
});
await test.step("confirming turns bypass on and runs declined and newly installed plugins without prompting", async () => {
await openPluginExecutionBypassConfirm(page);
await confirmPluginExecutionBypass(page);
await expectExecutedPluginMarkersContain(page, BETA.markerKey);
await expect(pluginApprovalSheet(page)).toHaveCount(0);
await install(GAMMA);
await expectExecutedPluginMarkersContain(page, GAMMA.markerKey);
await expect(pluginApprovalSheet(page)).toHaveCount(0);
// Let the 180ms switch track animation settle before capturing the ON screenshot.
await page.waitForTimeout(300);
await page.screenshot({
path: path.join(artifacts, "settings-general-plugin-bypass-on-desktop.png"),
});
});
await test.step("reloading preserves bypass on and runs all plugins without prompting", async () => {
await reloadKeepingPersistedState(page);
await expectPluginExecutionBypass(page, true);
await expectExecutedPluginMarkersContain(page, ALPHA.markerKey);
await expectExecutedPluginMarkersContain(page, BETA.markerKey);
await expectExecutedPluginMarkersContain(page, GAMMA.markerKey);
await expect(pluginApprovalSheet(page)).toHaveCount(0);
});
await test.step("turning bypass off needs no confirmation, restores prompting for unreviewed plugins, and persists across reload", async () => {
await setPluginExecutionBypass(page, false);
await expectPluginApprovalPrompt(page, { pluginId: GAMMA.id });
await declinePluginExecution(page);
await expect(pluginApprovalSheet(page)).toHaveCount(0);
await reloadKeepingPersistedState(page);
await expectPluginExecutionBypass(page, false);
await expect(pluginApprovalSheet(page)).toHaveCount(0);
await expectExecutedPluginMarkers(page, [ALPHA.markerKey]);
});
await test.step("compact mobile viewport renders the General toggle and confirm sheet cleanly", async () => {
await page.setViewportSize({ width: 390, height: 844 });
const row = page.getByTestId("settings-plugin-execution-bypass-row");
const toggle = pluginExecutionBypassSwitch(page);
await expect(row).toBeVisible();
await expect(toggle).toBeVisible();
const rowBox = await row.boundingBox();
const toggleBox = await toggle.boundingBox();
expect(rowBox).not.toBeNull();
expect(toggleBox).not.toBeNull();
expect(toggleBox!.x + toggleBox!.width).toBeLessThanOrEqual(390);
await page.screenshot({
path: path.join(artifacts, "settings-general-plugin-bypass-compact.png"),
});
await openPluginExecutionBypassConfirm(page);
await waitForSettledPosition(pluginExecutionBypassConfirmModal(page));
await page.screenshot({
path: path.join(artifacts, "settings-general-plugin-bypass-confirm-compact.png"),
});
await cancelPluginExecutionBypassConfirm(page);
});
});
});
@@ -3,6 +3,7 @@ import { readFile, writeFile } from "node:fs/promises";
import path from "node:path";
import type { Frame, TestInfo } from "@playwright/test";
import { expect, test, type Page } from "../support/fixtures";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { copyPluginExample } from "../support/helpers/plugin-fixture";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
import { seedWorkspace } from "../support/helpers/seed-client";
@@ -172,6 +173,7 @@ test("directory examples mount the PDF frame and write Markdown through the file
await page.setViewportSize(WIDE);
const gate = await installDaemonWebSocketGate(page);
await gotoWorkspace(page, workspace.workspaceId);
await approveClientPluginsInUi(page, ["pdf-panel", "markdown-panel"]);
await openFileExplorer(page);
await openFile(page, "report.pdf");
await expect(page.getByTitle("Document preview", { exact: true })).toHaveAttribute(
@@ -6,6 +6,7 @@ import { expectFileTabOpen, openFileExplorer } from "../support/helpers/file-exp
import {
BUILTIN_MARKDOWN_OPTION,
MARKDOWN_PANEL_ID,
MARKDOWN_PANEL_PLUGIN_ID,
PLUGIN_MARKDOWN_OPTION,
expectBuiltinMarkdown,
expectPluginMarkdown,
@@ -14,6 +15,7 @@ import {
openMarkdown,
storedFilePanelAssociations,
} from "../support/helpers/markdown-file-panel-plugin";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
async function choosePanel(page: Page, option: string, options: { remember: boolean }) {
await page.getByRole("radio", { name: option, exact: true }).click();
@@ -110,6 +112,7 @@ test("asks once which panel opens Markdown and remembers it when told to", async
try {
await page.setViewportSize({ width: 1280, height: 900 });
await gotoWorkspace(page, workspace.workspaceId);
await approveClientPluginsInUi(page, [MARKDOWN_PANEL_PLUGIN_ID]);
await openFileExplorer(page);
// First open: the built-in renders under the picker.
@@ -6,6 +6,7 @@ import { gotoWorkspace } from "../support/helpers/launcher";
import {
BUILTIN_MARKDOWN_OPTION,
MARKDOWN_PANEL_ID,
MARKDOWN_PANEL_PLUGIN_ID,
PLUGIN_MARKDOWN_OPTION,
expectPluginMarkdown,
filePanelPicker,
@@ -13,6 +14,7 @@ import {
openMarkdown,
storedFilePanelAssociations,
} from "../support/helpers/markdown-file-panel-plugin";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { seedWorkspace } from "../support/helpers/seed-client";
import { openSettingsSection } from "../support/helpers/settings";
@@ -59,6 +61,7 @@ test("Settings > Files chooses which panel opens .md and asks again on request",
try {
await page.setViewportSize({ width: 1280, height: 900 });
await gotoWorkspace(page, workspace.workspaceId);
await approveClientPluginsInUi(page, [MARKDOWN_PANEL_PLUGIN_ID]);
await openFilesSettings(page);
// Nothing remembered: the row asks every time and has nothing to forget.
@@ -3,6 +3,7 @@ import { tmpdir } from "node:os";
import path from "node:path";
import { expect, test, type Page } from "../support/fixtures";
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { pluginRequirements } from "../support/helpers/plugin-fixture";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
import { seedWorkspace } from "../support/helpers/seed-client";
@@ -131,6 +132,7 @@ test("directory plugins render PDF bytes and write Markdown through the file han
await page.setViewportSize({ width: 1280, height: 900 });
const gate = await installDaemonWebSocketGate(page);
await gotoWorkspace(page, workspace.workspaceId);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await openFileExplorer(page);
await openWorkspaceFile(page, "report.pdf");
await expect(page.getByText("PDF plugin: report.pdf", { exact: true })).toBeVisible();
@@ -9,7 +9,9 @@ import {
expectRemovedPlugin,
} from "../support/helpers/plugin-reconnect";
import { verifyPluginTranslations } from "../support/helpers/plugin-translations";
import { pluginRequirements } from "../support/helpers/plugin-fixture";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { copyPluginExample, pluginRequirements } from "../support/helpers/plugin-fixture";
import { expectProviderIcon, readIconPaths } from "../support/helpers/plugin-provider-icons";
import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
@@ -26,7 +28,7 @@ const TINY_PNG = Buffer.from(
);
const PLUGIN_SOURCE = `import { usePaseo } from "@getpaseo/plugin/client";
import { Icon, Modal, useToast, Markdown } from "@getpaseo/plugin/client/ui";
import { Icon, Modal, ProviderIcon, useToast, Markdown } from "@getpaseo/plugin/client/ui";
import { useQueryClient } from "@tanstack/react-query";
import React, { useState } from "react";
import { Pressable, Text, View } from "react-native";
@@ -53,7 +55,7 @@ function ModalBody({ onSaved }) {
</View>;
}
function Surface({ playAudio }) {
function Surface({ host, theme, playAudio }) {
const [audioStatus, setAudioStatus] = useState("Audio ready");
async function play(base64) {
setAudioStatus("Playing audio");
@@ -62,6 +64,18 @@ function Surface({ playAudio }) {
}
const [open, setOpen] = useState(false);
return <View>
<View testID="plugin-provider-icon-builtin">
<ProviderIcon provider="codex" size={18} color={theme.colors.foreground} />
</View>
<View testID="plugin-provider-icon-plugin">
<ProviderIcon provider="direct-example" hostId={host.id} size={18} color={theme.colors.foreground} />
</View>
<View testID="plugin-provider-icon-fallback">
<ProviderIcon provider="unknown-provider-e2e" size={18} color={theme.colors.foreground} />
</View>
<View testID="plugin-provider-icon-bot-ref">
<Icon name="Bot" size={18} color={theme.colors.foreground} />
</View>
<Text>{audioStatus}</Text>
<Markdown>{"![Before](" + SCREENSHOT_PATH + ")\\n\\n![After](" + SCREENSHOT_FILE_URL + ")"}</Markdown>
<Pressable accessibilityRole="button" onPress={() => play(AUDIO_BASE64)}><Text>Play plugin audio</Text></Pressable>
@@ -86,7 +100,7 @@ function Surface({ playAudio }) {
}
export default function contribute(plugin) {
plugin.addSurface("main", () => <Surface playAudio={plugin.playAudio} />);
plugin.addSurface("main", (props) => <Surface {...props} playAudio={plugin.playAudio} />);
plugin.addSidebarItem({
id: "main",
title: "Host UI",
@@ -98,6 +112,7 @@ export default function contribute(plugin) {
async function openHostUiPlugin(page: Page): Promise<void> {
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_ID, "provider-direct-example"]);
await page.getByRole("button", { name: "Host UI", exact: true }).click();
}
@@ -166,8 +181,9 @@ async function savePluginIssue(page: Page): Promise<void> {
await expect(page.getByText("Plugin modal contexts ready", { exact: true })).not.toBeVisible();
}
test("plugin modal adapts its presentation and preserves host contexts", async ({ page }) => {
test("plugin host UI renders provider icons and preserves modal contexts", async ({ page }) => {
const directory = await mkdtemp(path.join(tmpdir(), "paseo-plugin-host-ui-e2e-"));
const providerPlugin = await copyPluginExample("provider-direct");
const client = await connectNewWorkspaceDaemonClient({ ownProjects: false });
const previousConfig = await client.getDaemonConfig();
await writeFile(
@@ -187,10 +203,29 @@ test("plugin modal adapts its presentation and preserves host contexts", async (
try {
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(providerPlugin.directory);
await client.installDirectoryPlugin(directory);
await useNonCompactLayout(page);
await openHostUiPlugin(page);
await test.step("ProviderIcon renders built-in, daemon plugin SVG, and fallback icons", async () => {
const providerIconPaths = await readIconPaths(page, providerPlugin.directory);
await expectProviderIcon(page.getByTestId("plugin-provider-icon-plugin"), providerIconPaths);
const builtinSvg = page.getByTestId("plugin-provider-icon-builtin").locator("svg");
const fallbackSvg = page.getByTestId("plugin-provider-icon-fallback").locator("svg");
const botRefSvg = page.getByTestId("plugin-provider-icon-bot-ref").locator("svg");
await expect(builtinSvg).toBeVisible();
await expect(fallbackSvg).toBeVisible();
await expect(botRefSvg).toBeVisible();
const fallbackMarkup = await fallbackSvg.innerHTML();
const botRefMarkup = await botRefSvg.innerHTML();
const builtinMarkup = await builtinSvg.innerHTML();
expect(fallbackMarkup).toBe(botRefMarkup);
expect(builtinMarkup).not.toBe(botRefMarkup);
});
await test.step("plugin screen Markdown renders local absolute and file:// PNG images inline", async () => {
await expectLoadedMarkdownImage(page, "Before");
await expectLoadedMarkdownImage(page, "After");
@@ -217,11 +252,13 @@ test("plugin modal adapts its presentation and preserves host contexts", async (
});
} finally {
await client.removePlugin(PLUGIN_ID).catch(() => undefined);
await client.removePlugin("provider-direct-example").catch(() => undefined);
await client
.patchDaemonConfig({ pluginsEnabled: previousConfig.config.pluginsEnabled ?? false })
.catch(() => undefined);
await client.close().catch(() => undefined);
await rm(directory, { recursive: true, force: true });
await providerPlugin.cleanup();
}
});
@@ -6,6 +6,7 @@ import { expect, test, type Page } from "../support/fixtures";
import { openCommandCenter } from "../support/helpers/command-center";
import { gotoAppShell } from "../support/helpers/app";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { pluginRequirements } from "../support/helpers/plugin-fixture";
import { seedWorkspace } from "../support/helpers/seed-client";
import { getServerId } from "../support/helpers/server-id";
@@ -87,6 +88,7 @@ test.describe("plugin icons", () => {
await client.installDirectoryPlugin(directory);
await page.setViewportSize({ width: 1280, height: 800 });
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
const target = { serverId: getServerId(), workspaceId: workspace.workspaceId };
await waitForWorkspaceInSidebar(page, target);
await switchWorkspaceViaSidebar({ page, ...target });
@@ -1,5 +1,6 @@
import { existsSync } from "node:fs";
import overviewCorpus from "../../../protocol/tests/fixtures/plugin-overview.json";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { pluginRequirements } from "../support/helpers/plugin-fixture";
import { execFileSync } from "node:child_process";
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
@@ -500,6 +501,7 @@ async function installLocalPluginWithStatusExamples(
const catalog = observePluginCatalog(page);
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["failed-preview-plugin"]);
await openPluginSettings(page);
await catalog.waitForInitialFetch();
await expectPluginFailed(page, "failed-preview-plugin");
@@ -514,6 +516,7 @@ async function installLocalPluginWithStatusExamples(
await openSourceInstall(page);
await expectPluginSourceDocsOpen(page);
await submitSourceInstall(page, directory);
await approveClientPluginsInUi(page, ["e2e-plugin"]);
await expectSourceInstalled(page, "e2e-plugin");
await expectPluginOn(page, "e2e-plugin");
await expectPluginHealthy(page, "e2e-plugin");
@@ -605,6 +608,7 @@ async function toggleRemoveAndReinstallLocalPlugin(page: Page, directory: string
await expectPluginRemoved(page, "e2e-plugin");
await installFromSource(page, directory, "e2e-plugin");
await approveClientPluginsInUi(page, ["e2e-plugin"]);
await expectPluginOn(page, "e2e-plugin");
await gotoAppShell(page);
await openContribution(page, "Plugin v3", "Plugin v3 cleanup 7");
@@ -659,6 +663,10 @@ async function retryGitInstallAndInspectRows(
await capturePluginInstallForm(page, testInfo, "compact-error");
await submitSourceInstall(page, pathToFileURL(repository).href);
await approveClientPluginsInUi(page, [
"compact-plugin-with-a-realistically-long-name",
"git-e2e-plugin",
]);
await expectSourceInstalled(page, "git-e2e-plugin");
await expectPluginsOn(page);
await expectPluginOn(page, "git-e2e-plugin");
@@ -724,6 +732,7 @@ async function prepareLegacyPluginHost(
pluginGitManagement: true,
});
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["legacy-source-plugin"]);
await openPluginSettings(page);
return directory;
@@ -906,6 +915,7 @@ test("keeps Reload pending past a minute while the plugin queue is busy", async
// Plugins on is a precondition here, not the subject: set it through the daemon.
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installPluginSource({ source: pluginDirectory });
await approveClientPluginsInUi(page, ["e2e-plugin"]);
// Installed before Plugins opens, so it opens on the Installed tab.
await openPluginSettings(page);
await expectPluginOn(page, "e2e-plugin");
@@ -928,6 +938,7 @@ test("keeps Reload pending past a minute while the plugin queue is busy", async
await capturePluginSurface(page, testInfo, "plugin-reload-past-deadline.png");
await queue.release();
await approveClientPluginsInUi(page, ["gated-build-plugin"]);
// The daemon's answer only arrives once the plugin really started again.
await reload.waitForResponse();
expect(reload.requestCount()).toBe(1);
@@ -1,3 +1,4 @@
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { copyPluginExample } from "../support/helpers/plugin-fixture";
import { expect, test as base, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
@@ -119,6 +120,7 @@ const test = base.extend<{ modalExample: Page }>({
async function openWideExamples(page: Page) {
await page.setViewportSize({ width: 1100, height: 800 });
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["modal-ui-example"]);
await page.getByRole("button", { name: "Modal examples", exact: true }).click();
}
@@ -1,7 +1,8 @@
import { expect, test, type Page } from "../support/fixtures";
import { composerLocator, submitMessageWithButton } from "../support/helpers/composer";
import { seedMockAgentWorkspace, openAgentRoute } from "../support/helpers/mock-agent";
import { withPopoverTimelinePlugin } from "../support/helpers/plugin-timeline";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { POPOVER_PLUGIN_ID, withPopoverTimelinePlugin } from "../support/helpers/plugin-timeline";
async function openPreviewWhileTyping(page: Page): Promise<void> {
await composerLocator(page).focus();
@@ -25,6 +26,7 @@ test("Escape dismisses a plugin preview before interrupting the agent", async ({
try {
await withPopoverTimelinePlugin(async () => {
await openAgentRoute(page, agent);
await approveClientPluginsInUi(page, [POPOVER_PLUGIN_ID]);
await submitMessageWithButton(page, "Show the plugin preview.");
await agent.client.waitForFinish(agent.agentId, 30_000);
await expect(page.getByRole("button", { name: "Hover plugin preview" })).toBeVisible();
@@ -12,7 +12,7 @@ test("shows which runtime is incompatible and recovers after the requirement is
}) => {
await openRequirementHost(page, requirementHost);
await expectAppMismatch(page);
await correctRequirementAndReload(page, requirementHost.directory);
await correctRequirementAndReload(page, requirementHost.directory, { approvePrompt: true });
await rejectDaemonMismatch(page, requirementHost.directory);
await correctRequirementAndReload(page, requirementHost.directory);
});
@@ -9,6 +9,7 @@ import {
LEGACY_PLUGIN_ID,
SHOWCASE_PLUGIN_ID,
WIDE,
approveSidebarPluginsInUi,
closeScreen,
expectRowActive,
footerItem,
@@ -182,6 +183,7 @@ test.describe("Plugin sidebar items", () => {
}) => {
await page.setViewportSize({ width: 390, height: 600 });
await gotoAppShell(page);
await approveSidebarPluginsInUi(page);
await page.getByRole("button", { name: "Open menu", exact: true }).first().click();
await expect(botRow(page, "status")).toBeAttached();
const workspace = visibleTestId(page, `sidebar-workspace-row-${getServerId()}:${workspaceId}`);
@@ -213,6 +215,7 @@ test.describe("Plugin sidebar items", () => {
}) => {
await page.setViewportSize({ width: 1280, height: 480 });
await gotoAppShell(page);
await approveSidebarPluginsInUi(page);
await expect(botRow(page, "status")).toBeAttached();
const workspace = visibleTestId(page, `sidebar-workspace-row-${getServerId()}:${workspaceId}`);
await expect(workspace).toBeInViewport({ ratio: 1 });
@@ -240,6 +243,7 @@ test.describe("Plugin sidebar items", () => {
test("a restored plugin screen waits for its catalog before rendering", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await approveSidebarPluginsInUi(page);
const row = headerRow(page, SHOWCASE_PLUGIN_ID, "deploys");
await expect(row).toBeVisible({ timeout: 30_000 });
await row.click();
@@ -278,6 +282,7 @@ test.describe("Plugin sidebar items", () => {
await seedSidebarFooterPreferences(page, [{ key: "usage", visible: true }]);
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await approveSidebarPluginsInUi(page);
const row = headerRow(page, SHOWCASE_PLUGIN_ID, "deploys");
const sync = footerItem(page, SHOWCASE_PLUGIN_ID, "sync");
await expect(row).toBeVisible({ timeout: 30_000 });
@@ -365,6 +370,7 @@ test.describe("Plugin sidebar items", () => {
test("a plugin screen reads workspaces through the state hooks", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await approveSidebarPluginsInUi(page);
await expect(headerRow(page, SHOWCASE_PLUGIN_ID, "deploys")).toBeVisible({ timeout: 30_000 });
await runCommand(page, "Open plugin workspaces");
await expect(screenTitle(page)).toHaveText("Workspaces");
@@ -375,6 +381,7 @@ test.describe("Plugin sidebar items", () => {
test("a plugin screen keeps the sidebar toggle before its title", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await approveSidebarPluginsInUi(page);
await expect(headerRow(page, SHOWCASE_PLUGIN_ID, "deploys")).toBeVisible({ timeout: 30_000 });
await runCommand(page, "Open plugin workspaces");
await expect(screenTitle(page)).toHaveText("Workspaces");
@@ -394,6 +401,7 @@ test.describe("Plugin sidebar items", () => {
test("a header row's shortcut hint presses the row", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await approveSidebarPluginsInUi(page);
const newWorkspace = visibleTestId(page, "sidebar-global-new-workspace");
await expect(newWorkspace).toBeVisible({ timeout: 30_000 });
await newWorkspace.hover();
@@ -419,6 +427,7 @@ test.describe("Plugin sidebar items", () => {
);
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await approveSidebarPluginsInUi(page);
const entry = headerRow(page, LEGACY_PLUGIN_ID, "entry");
await expect(entry).toBeVisible({ timeout: 30_000 });
let entryIcon = "";
@@ -503,6 +512,7 @@ test.describe("Plugin sidebar items", () => {
test.setTimeout(180_000);
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await approveSidebarPluginsInUi(page);
const bot1 = botRow(page, "bot-1");
const bot2 = botRow(page, "bot-2");
const status = botRow(page, "status");
@@ -587,6 +597,7 @@ test.describe("Plugin sidebar items", () => {
test.setTimeout(120_000);
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await approveSidebarPluginsInUi(page);
await expect(botRow(page, "bot-1")).toBeVisible({ timeout: 30_000 });
const alerts = footerItem(page, BOTS_PLUGIN_ID, "alerts");
await expect(alerts).toHaveCount(0);
@@ -606,6 +617,7 @@ test.describe("Plugin sidebar items", () => {
const alerts = footerItem(page, BOTS_PLUGIN_ID, "alerts");
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await approveSidebarPluginsInUi(page);
await expect(botRow(page, "bot-1")).toBeVisible({ timeout: 30_000 });
await runCommand(page, "Add bot alerts");
@@ -4,6 +4,7 @@ import { expect, test, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { openCommandCenter } from "../support/helpers/command-center";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { copyPluginExample } from "../support/helpers/plugin-fixture";
import { seedWorkspace, type SeededWorkspace } from "../support/helpers/seed-client";
import { getServerId } from "../support/helpers/server-id";
@@ -34,6 +35,7 @@ async function withExample(
await client.installDirectoryPlugin(copy.directory);
await page.setViewportSize({ width: 1280, height: 800 });
await gotoAppShell(page);
await approveClientPluginsInUi(page, [example.id]);
const target = { serverId: getServerId(), workspaceId: workspace.workspaceId };
await waitForWorkspaceInSidebar(page, target);
await switchWorkspaceViaSidebar({ page, ...target });
@@ -1,3 +1,4 @@
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { pluginRequirements } from "../support/helpers/plugin-fixture";
import { mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
@@ -63,8 +64,11 @@ const MOCHA_MUTED_FOREGROUND = "rgb(166, 173, 200)";
const LATTE_MUTED_FOREGROUND = "rgb(108, 111, 133)";
const LATTE_RING = "rgb(156, 160, 176)";
async function selectTheme(page: Page, name: string) {
async function selectTheme(page: Page, name: string, approvePluginId?: string) {
await page.goto("/settings");
if (approvePluginId) {
await approveClientPluginsInUi(page, [approvePluginId]);
}
await openSettingsSection(page, "appearance");
const theme = page.getByRole("radio", { name, exact: true });
await expect(theme).toBeVisible({ timeout: 30_000 });
@@ -108,7 +112,7 @@ test("keeps plugin workspace timestamps readable on state surfaces and honors ov
try {
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(directory);
await selectTheme(page, "Solarized Dark");
await selectTheme(page, "Solarized Dark", PLUGIN_ID);
await openAgentRoute(page, selected);
const selectedRow = page.getByTestId(
`sidebar-workspace-row-${getServerId()}:${selected.workspaceId}`,
@@ -160,6 +164,7 @@ test("applies a contributed theme and falls back when its plugin is gone", async
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(directory);
await page.goto("/settings");
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await expect(page.getByTestId("settings-sidebar")).toBeVisible();
await openSettingsSection(page, "appearance");
@@ -263,6 +268,7 @@ test("reaches the last theme when a plugin contributes more themes than fit", as
await client.installDirectoryPlugin(directory);
await page.setViewportSize({ width: 1280, height: 720 });
await page.goto("/settings");
await approveClientPluginsInUi(page, [MANY_THEMES_PLUGIN_ID]);
await expect(page.getByTestId("settings-sidebar")).toBeVisible();
await openSettingsSection(page, "appearance");
@@ -8,6 +8,7 @@ import { submitMessageWithButton } from "../support/helpers/composer";
import { openFileExplorer, openFileFromExplorer } from "../support/helpers/file-explorer";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { copyPluginExample } from "../support/helpers/plugin-fixture";
import { runCommand } from "../support/helpers/plugin-sidebar-items";
import {
@@ -214,6 +215,7 @@ test("the workspace layout example arranges a wide workspace", async ({ page })
await withLayoutExample(undefined, async ({ agentId, workspaceId }) => {
await page.setViewportSize(WIDE);
await openAgentRoute(page, { workspaceId, agentId });
await approveClientPluginsInUi(page, ["workspace-layout"]);
await test.step("/aside opens the child agent's chat in the Explorer", async () => {
await sendToMainChat(page, "/aside hey");
@@ -264,6 +266,7 @@ test("the workspace layout example opens over a phone's chat", async ({ page })
await withLayoutExample(promptMentioning(FILE_LINK), async ({ agentId, workspaceId }) => {
await page.setViewportSize(COMPACT);
await openAgentRoute(page, { workspaceId, agentId });
await approveClientPluginsInUi(page, ["workspace-layout"]);
await test.step("/aside opens the Explorer over the chat", async () => {
await submitMessageWithButton(page, "/aside hey");
@@ -302,6 +305,7 @@ test("a file a plugin opens in another workspace waits there on a phone", async
await page.setViewportSize(COMPACT);
// Visiting the first workspace leaves its screen mounted behind the second.
await openAgentRoute(page, first);
await approveClientPluginsInUi(page, ["workspace-layout"]);
await expect(composerIn(page.locator("body"))).toBeEditable({ timeout: 30_000 });
await switchToWorkspace(page, second.workspaceId);
@@ -1,3 +1,4 @@
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { pluginRequirements } from "../support/helpers/plugin-fixture";
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
@@ -297,6 +298,7 @@ test.describe("plugin workspace panels and Command Center", () => {
await primaryClient.installDirectoryPlugin(directory);
await page.setViewportSize(WIDE_VIEWPORT);
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await addConnectedHostAndReload(page, {
serverId: secondaryDaemon.serverId,
label: "Secondary plugin host",
@@ -5,6 +5,7 @@ import type { Page } from "@playwright/test";
import { expect, test } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { pluginRequirements } from "../support/helpers/plugin-fixture";
import { seedWorkspace } from "../support/helpers/seed-client";
import {
@@ -95,6 +96,7 @@ test("a plugin badge shows on workspace rows, hides quietly, and follows its Sho
await page.setViewportSize({ width: 1280, height: 900 });
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await test.step("the badge draws on the row; a null item and a throwing item draw nothing", async () => {
await expect(badge(page, "review")).toBeVisible();
@@ -15,6 +15,7 @@ import {
openSettingsHost,
openSettingsHostSection,
} from "../support/helpers/settings";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { copyPluginExample } from "../support/helpers/plugin-fixture";
const CUSTOM_PROVIDER = {
@@ -202,6 +203,7 @@ test.describe("provider removal", () => {
await client.installDirectoryPlugin(plugin.directory);
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_PROVIDER.pluginId]);
await openSettings(page);
await openSettingsHost(page, getServerId());
await openSettingsHostSection(page, getServerId(), "providers");
@@ -19,6 +19,7 @@ import {
} from "../support/helpers/composer";
import { connectDaemonClient } from "../support/helpers/daemon-client-loader";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { copyPluginExample } from "../support/helpers/plugin-fixture";
import { userScrollsTimelineToHistoryStart } from "../support/helpers/timeline-pagination";
@@ -266,6 +267,7 @@ test.describe.serial("Provider switching in chat", () => {
try {
await openAgentRoute(page, workspace);
await approveClientPluginsInUi(page, [DIRECT_PROVIDER.pluginId]);
await expectComposerVisible(page);
await expectComposerMode(page, "Load test");
@@ -461,6 +463,7 @@ test.describe.serial("Provider switching in chat", () => {
try {
await openAgentRoute(page, workspace);
await approveClientPluginsInUi(page, [DIRECT_PROVIDER.pluginId]);
await expectComposerVisible(page);
await submitMessage(page, runningPrompt);
@@ -513,6 +516,7 @@ test.describe.serial("Provider switching in chat", () => {
try {
await openAgentRoute(page, workspace);
await approveClientPluginsInUi(page, [DIRECT_PROVIDER.pluginId]);
await expectComposerVisible(page);
await submitMessage(page, "Run a one-minute mock turn first.");
await expectAgentReadyToInterrupt(page);
@@ -567,6 +571,7 @@ test.describe.serial("Provider switching in chat", () => {
try {
await openAgentRoute(page, workspace);
await approveClientPluginsInUi(page, [DIRECT_PROVIDER.pluginId]);
await expectComposerVisible(page);
await submitMessageWithButton(page, preSwitchPrompt);
@@ -13,7 +13,7 @@ import {
test("a refresh clears a failed update from the provider's page and its row", async ({
providerUpdateFailure: { page, otherClient },
}) => {
await openProviderInstallation(page);
await openProviderInstallation(page, { approvePlugin: true });
await test.step("Refresh on the page clears the failure", async () => {
await runFailingUpdate(page);
@@ -9,7 +9,11 @@ import {
expectCompactSidebarOpen,
} from "../support/helpers/usage-sidebar-item";
import { gotoAppShell } from "../support/helpers/app";
import { SHOWCASE_PLUGIN_ID, installSidebarPlugins } from "../support/helpers/plugin-sidebar-items";
import {
SHOWCASE_PLUGIN_ID,
approveSidebarPluginsInUi,
installSidebarPlugins,
} from "../support/helpers/plugin-sidebar-items";
import {
expectFooterIconRow,
expectFooterSeparator,
@@ -227,6 +231,7 @@ test.describe("Sidebar footer rows in Appearance settings", () => {
{ key: "import", visible: false },
]);
await gotoAppShell(page);
await approveSidebarPluginsInUi(page);
await test.step("the Footer card lists only the footer rows", async () => {
await openSidebarNavSettings(page);
@@ -2,6 +2,8 @@ import path from "node:path";
import type { Page, TestInfo } from "@playwright/test";
import { test, expect } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { addConnectedHostsAndReload } from "../support/helpers/hosts";
import { startIsolatedHostDaemon } from "../support/helpers/isolated-host-daemon";
import {
closeMobileAgentSidebar,
expectMobileAgentSidebarHidden,
@@ -141,6 +143,7 @@ async function withPaseoOwnedWorktree(
async function readCachedRowIds(
page: Page,
rowKind: "workspace" | "checkpoint",
hostServerId = getServerId(),
): Promise<string[]> {
return page.evaluate(
async ({ serverId, kind }) => {
@@ -169,7 +172,7 @@ async function readCachedRowIds(
database.close();
}
},
{ serverId: getServerId(), kind: rowKind },
{ serverId: hostServerId, kind: rowKind },
);
}
@@ -317,7 +320,60 @@ async function expectRecoveredWorkspacesAfterReload(
});
}
async function expectTimeSortingAvailable(page: Page): Promise<void> {
await page.getByLabel("Display preferences", { exact: true }).click();
await page.getByRole("menuitem", { name: /^Sort/ }).click();
await expect(page.getByRole("menuitem", { name: "Created", exact: true })).toBeVisible();
await expect(page.getByRole("menuitem", { name: "Last prompt", exact: true })).toBeVisible();
await page.getByRole("menuitem", { name: "Created", exact: true }).click();
await page.getByLabel("Display preferences", { exact: true }).click();
await expect(page.getByRole("menuitem", { name: /^Sort/ })).toContainText("Created");
await page.keyboard.press("Escape");
}
async function cacheSecondaryHostWorkspace(page: Page, serverId: string, workspaceId: string) {
await expect(page.getByTestId(`sidebar-workspace-row-${serverId}:${workspaceId}`)).toBeVisible();
await expect.poll(() => readCachedRowIds(page, "workspace", serverId)).toContain(workspaceId);
}
test.describe("Sidebar workspace list", () => {
test("keeps time sorting when a host's cached workspaces load offline", async ({ page }) => {
test.setTimeout(120_000);
const laptop = await startIsolatedHostDaemon("sidebar-sort-laptop");
try {
const other = await startIsolatedHostDaemon("sidebar-sort-other");
try {
const workspace = await seedWorkspace({
repoPrefix: "sidebar-sort-laptop-",
port: laptop.port,
});
try {
await gotoAppShell(page);
const hosts = [
{ ...laptop, label: "Laptop" },
{ ...other, label: "Other host" },
];
await test.step("cache the laptop workspace while its host is online", async () => {
await addConnectedHostsAndReload(page, hosts);
await cacheSecondaryHostWorkspace(page, laptop.serverId, workspace.workspaceId);
await expectTimeSortingAvailable(page);
});
await test.step("reopen the sidebar with the laptop offline", async () => {
await laptop.close();
await addConnectedHostsAndReload(page, hosts);
await cacheSecondaryHostWorkspace(page, laptop.serverId, workspace.workspaceId);
await expectTimeSortingAvailable(page);
});
} finally {
await workspace.cleanup();
}
} finally {
await other.close();
}
} finally {
await laptop.close();
}
});
test("recovers missing workspaces from a damaged legacy cache after reload", async ({
page,
}, testInfo) => {
@@ -18,7 +18,8 @@ function finish() {
process.exit(0);
}
process.stdout.write("\\x1b]11;?\\x07");
// Raw mode before the query: a reply that arrives while the tty still echoes
// would be printed on the capture line as a second "]11;rgb:".
if (process.stdin.isTTY) {
process.stdin.setRawMode(true);
}
@@ -26,6 +27,7 @@ process.stdin.resume();
process.stdin.on("data", (chunk) => {
captured = Buffer.concat([captured, chunk]);
});
process.stdout.write("\\x1b]11;?\\x07");
setTimeout(finish, 700);
`;
@@ -11,6 +11,7 @@ import { getActiveTabTestId } from "../support/helpers/launcher";
import type { Page, Locator } from "@playwright/test";
import { test, expect } from "../support/fixtures";
import { expectComposerVisible } from "../support/helpers/composer";
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
import { withDirectoryPlugin } from "../support/helpers/plugin-timeline";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import { getE2EDaemonPort } from "../support/helpers/daemon-port";
@@ -188,6 +189,7 @@ export default function contribute(client) {
run: async () => {
await page.setViewportSize({ width: 1280, height: 1000 });
await openAgentRoute(page, agent);
await approveClientPluginsInUi(page, ["reply-fold-e2e"]);
await expectComposerVisible(page);
for (const width of [1280, 390]) {
await page.setViewportSize({ width, height: 1000 });
@@ -34,7 +34,9 @@ function report(input: {
sourceLabel: input.sourceLabel,
icon: ICON,
report:
input.report.status === "error" || input.report.status === "unavailable"
input.report.status === "error" ||
input.report.status === "unavailable" ||
input.report.status === "not_fetched"
? input.report
: {
status: "available",
@@ -138,6 +140,45 @@ test.describe("usage settings", () => {
await expect(card.getByText("64% used")).toBeVisible();
});
test("a manual report asks for Refresh and changes only on the user's Refresh", async ({
page,
}) => {
test.setTimeout(120_000);
const serverId = getServerId();
const manual = (entry: UsageReportEntry): UsageReportEntry => ({ ...entry, refresh: "manual" });
const usage = await installUsageReportsFixture(page, {
lists: [
(request) => [
manual(
report({
sourceId: "quota",
sourceLabel: "Quota",
report: request.forceRefresh
? { status: "available", windows: [{ id: "w", label: "Weekly", usedPct: 12 }] }
: { status: "not_fetched" },
}),
),
],
],
});
await gotoAppShell(page);
await openSettings(page);
await openSettingsHostSection(page, serverId, "usage");
const card = page.getByTestId("usage-report-quota:account");
await expect(
card.getByText("Not checked yet. Quota usage updates only when you refresh it."),
).toBeVisible({ timeout: 10_000 });
await expect(card.getByText("Error", { exact: true })).toHaveCount(0);
expect(forcedRefreshCount(usage)).toBe(0);
await card.getByTestId("usage-refresh").click();
await expect(card.getByText("12% used")).toBeVisible();
expect(usage.listRequests().filter((request) => request.forceRefresh)).toEqual([
{ forceRefresh: true, reportIds: ["quota:account"] },
]);
});
test("asks to update a host without usage support and never calls it", async ({ page }) => {
test.setTimeout(120_000);
const serverId = getServerId();
@@ -3,12 +3,17 @@ import type { Locator, Page } from "@playwright/test";
import { expect, test } from "../support/fixtures";
import { createIdleAgent } from "../support/helpers/archive-tab";
import { expectComposerVisible } from "../support/helpers/composer";
import { clickNewTerminal, terminalSurfaceLocator } from "../support/helpers/launcher";
import {
clickNewChat,
clickNewTerminal,
terminalSurfaceLocator,
} from "../support/helpers/launcher";
import { renameModalInput } from "../support/helpers/rename";
import { seedWorkspace } from "../support/helpers/seed-client";
import { getServerId } from "../support/helpers/server-id";
import { clickSettingsBackToWorkspace, openCompactSettings } from "../support/helpers/settings";
import { openSettings } from "../support/helpers/app";
import { gotoAppShell, openSettings } from "../support/helpers/app";
import { selectWorkspaceInSidebar } from "../support/helpers/sidebar";
import { runWorkspaceActionFromCommandCenter } from "../support/helpers/command-center-workspace-actions";
import {
clickFirstTerminalTab,
@@ -35,8 +40,12 @@ async function expectSameRenderedNode(
);
}
function isRenderedNodeConnected(node: Awaited<ReturnType<typeof captureRenderedNode>>) {
return node.evaluate((candidate) => candidate.isConnected);
}
async function expectNodeConnected(node: Awaited<ReturnType<typeof captureRenderedNode>>) {
expect(await node.evaluate((candidate) => candidate.isConnected)).toBe(true);
expect(await isRenderedNodeConnected(node)).toBe(true);
}
async function getSettingsShortcut(page: Page) {
@@ -50,6 +59,34 @@ async function waitForWorkspaceRoute(page: Page, route: string) {
}
test.describe("Workspace pane mounting", () => {
test("inactive composers expire while switching between other workspaces", async ({
page,
withWorkspace,
}) => {
const first = await withWorkspace({ prefix: "deck-expiry-first-" });
const second = await withWorkspace({ prefix: "deck-expiry-second-" });
const third = await withWorkspace({ prefix: "deck-expiry-third-" });
const oneMinute = 60_000;
await page.clock.install();
await gotoAppShell(page);
await selectWorkspaceInSidebar(page, first.workspaceId);
await clickNewChat(page);
const composer = await captureRenderedNode(
page.getByTestId("message-input-root").filter({ visible: true }),
);
await selectWorkspaceInSidebar(page, second.workspaceId);
await expect(page).toHaveURL(buildHostWorkspaceRoute(getServerId(), second.workspaceId));
await page.clock.fastForward(9 * oneMinute);
await expectNodeConnected(composer);
await selectWorkspaceInSidebar(page, third.workspaceId);
await expect(page).toHaveURL(buildHostWorkspaceRoute(getServerId(), third.workspaceId));
await page.clock.fastForward(2 * oneMinute);
await expect.poll(() => isRenderedNodeConnected(composer)).toBe(false);
});
test("workspace navigation keeps the existing agent composer mounted", async ({ page }) => {
test.setTimeout(90_000);
// Keep both split panes wide enough for the tab-rail interactions below.
@@ -1,5 +1,10 @@
import type { Locator, Page } from "@playwright/test";
import { expect, test } from "../support/fixtures";
import { clickNewTerminal, gotoWorkspace } from "../support/helpers/launcher";
import {
clickNewTerminal,
gotoWorkspace,
openNewTabMenuWithShortcut,
} from "../support/helpers/launcher";
import { seedWorkspace } from "../support/helpers/seed-client";
import { waitForWorkspaceTabsVisible } from "../support/helpers/workspace-tabs";
@@ -30,3 +35,44 @@ test("web switches to the previous and next tab with Alt+Shift+[ and ]", async (
await workspace.cleanup();
}
});
async function openBlankTabAfterTerminal(page: Page) {
await clickNewTerminal(page);
await page.getByRole("button", { name: "Terminal 1", exact: true }).focus();
await openNewTabMenuWithShortcut(page);
return page
.getByRole("button", { name: "New tab", exact: true })
.and(page.locator('[aria-selected="true"]'));
}
async function middleClickWithoutDefaultMouseUp(tab: Locator) {
const release = await tab.evaluateHandle((element) => {
const result = { event: null as Event | null };
element.addEventListener(
"mouseup",
(event) => {
result.event = event;
},
{ once: true },
);
return result;
});
await tab.click({ button: "middle" });
await expect(tab).toHaveCount(0);
// Chromium uses the mouseup default action to paste the X11 selection.
expect(await release.evaluate(({ event }) => event?.defaultPrevented)).toBe(true);
}
test("middle-clicking a tab cancels the mouse release before returning to a terminal", async ({
page,
withWorkspace,
}) => {
const workspace = await withWorkspace({ prefix: "tab-middle-click-" });
await workspace.navigateTo();
const tab = await openBlankTabAfterTerminal(page);
await test.step("close the blank tab without the browser's default middle-button action", async () => {
await middleClickWithoutDefaultMouseUp(tab);
await expect(page.getByRole("textbox", { name: "Terminal input" })).toBeFocused();
});
});
@@ -17,6 +17,7 @@ import { getServerId } from "../support/helpers/server-id";
import {
clickArchiveWorkspaceMenuItem,
expectWorkspaceAbsentFromSidebar,
selectSidebarStatusGrouping,
} from "../support/helpers/sidebar";
import { createTempGitRepo } from "../support/helpers/workspace";
import {
@@ -100,7 +101,7 @@ async function clickRowArchiveButton(page: Page, workspaceId: string): Promise<v
}
function rowArchivePendingIndicator(page: Page, workspaceId: string) {
return workspaceRow(page, workspaceId).getByTestId("workspace-status-indicator-loading");
return workspaceRow(page, workspaceId).getByTestId("workspace-archive-pending-indicator");
}
async function cycleThemeAndWaitForSidebar(page: Page, workspaceId: string): Promise<void> {
@@ -372,19 +373,38 @@ test.describe("Workspace archive risk warning for worktree backing", () => {
expect(existsSync(path.join(worktree.workspaceDirectory, "DIRTY.md"))).toBe(true);
});
test("the row shows the archive as pending from the press until the host answers", async ({
test("the row shows a trailing archive spinner without changing status or shifting layout", async ({
page,
}) => {
const worktree = await createWorktree("archive-risk-pending");
const statusRequest = await holdCheckoutStatusRequest(page, worktree);
await openSidebarRow(page, worktree.workspaceId);
const row = workspaceRow(page, worktree.workspaceId);
const title = page.getByTestId(
`sidebar-workspace-title-${getServerId()}:${worktree.workspaceId}`,
);
await expect(rowArchivePendingIndicator(page, worktree.workspaceId)).toHaveCount(0);
await expect(row.getByTestId("workspace-status-indicator-done")).toBeVisible();
const idleRowBox = await row.boundingBox();
const idleTitleBox = await title.boundingBox();
expect(idleRowBox).not.toBeNull();
expect(idleTitleBox).not.toBeNull();
statusRequest.arm();
await clickRowArchiveButton(page, worktree.workspaceId);
await statusRequest.waitForHeld();
try {
await expect(rowArchivePendingIndicator(page, worktree.workspaceId)).toBeVisible();
// Leading status must stay done — never turn into the Working status ring.
await expect(row.getByTestId("workspace-status-indicator-done")).toBeVisible();
await expect(row.getByTestId("workspace-status-indicator-loading")).toHaveCount(0);
await expect(row.getByTestId("workspace-status-indicator-running")).toHaveCount(0);
const archivingRowBox = await row.boundingBox();
const archivingTitleBox = await title.boundingBox();
expect(archivingRowBox).toEqual(idleRowBox);
expect(archivingTitleBox).toEqual(idleTitleBox);
expect(statusRequest.archiveRequests()).toBe(0);
} finally {
statusRequest.release();
@@ -394,6 +414,50 @@ test.describe("Workspace archive risk warning for worktree backing", () => {
await expect(undoButton(page)).toBeVisible();
});
test("status grouping keeps the row in its original group with no Working badge while archiving", async ({
page,
}) => {
const worktree = await createWorktree("archive-risk-status-pending");
const statusRequest = await holdCheckoutStatusRequest(page, worktree);
await openSidebarRow(page, worktree.workspaceId);
await selectSidebarStatusGrouping(page);
const doneRows = page.getByTestId("sidebar-status-group-rows-done");
const row = doneRows.getByTestId(
`sidebar-workspace-row-${getServerId()}:${worktree.workspaceId}`,
);
const title = row.getByTestId(
`sidebar-workspace-title-${getServerId()}:${worktree.workspaceId}`,
);
await expect(row).toBeVisible();
await expect(row.getByTestId("project-status-badge")).toHaveCount(0);
const idleRowBox = await row.boundingBox();
const idleTitleBox = await title.boundingBox();
expect(idleRowBox).not.toBeNull();
expect(idleTitleBox).not.toBeNull();
statusRequest.arm();
await row.hover();
await rowArchiveButton(page, worktree.workspaceId).click();
await statusRequest.waitForHeld();
try {
await expect(row.getByTestId("workspace-archive-pending-indicator")).toBeVisible();
// Must remain in the Done group and never gain a Working status ring badge.
await expect(row).toBeVisible();
await expect(row.getByTestId("project-status-badge")).toHaveCount(0);
const archivingRowBox = await row.boundingBox();
const archivingTitleBox = await title.boundingBox();
expect(archivingRowBox).toEqual(idleRowBox);
expect(archivingTitleBox).toEqual(idleTitleBox);
} finally {
statusRequest.release();
}
await expectWorkspaceAbsentFromSidebar(page, worktree.workspaceId);
});
test("a worktree holding only new files warns when the repository hides untracked files", async ({
page,
}) => {
@@ -13,6 +13,8 @@ function ad(...args) {
});
}
ad("press", 'label="Pair a device"', "--settle");
ad("wait", "text", "Relay", "10000");
ad("press", 'label="Relay"', "--settle");
ad("wait", "text", "Pairing QR code", "10000");
const { data } = JSON.parse(ad("snapshot", "-i", "--json"));
@@ -6,6 +6,7 @@ import appPackage from "../../../package.json";
import { expect, test as base, type Page } from "../fixtures";
import { gotoAppShell } from "./app";
import { addConnectedHostAndReload } from "./hosts";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { pluginRequirements } from "./plugin-fixture";
const pluginId = "builtin-settings";
@@ -69,6 +70,7 @@ export async function openBuiltinPluginSettings(
label: "Built-in settings host",
destination: `/settings/hosts/${host.serverId}/plugins/${pluginId}/${screenId}`,
});
await approveClientPluginsInUi(page, [pluginId]);
}
export async function expectBuiltinPluginSettings(page: Page) {
+40 -14
View File
@@ -178,24 +178,50 @@ export async function attachFileFromMenu(
await (await chooserPromise).setFiles(file);
}
export async function dropFileOnComposer(
page: Page,
file: { name: string; mimeType: string; buffer: Buffer },
): Promise<void> {
const dataTransfer = await page.evaluateHandle(
({ name, mimeType, base64 }) => {
const bytes = Uint8Array.from(atob(base64), (char) => char.charCodeAt(0));
const droppedFile = new File([bytes], name, { type: mimeType });
interface TransferFile {
name: string;
mimeType: string;
buffer: Buffer;
}
function createFileTransfer(page: Page, files: TransferFile[]) {
return page.evaluateHandle(
(entries) => {
const transfer = new DataTransfer();
transfer.items.add(droppedFile);
for (const { name, mimeType, base64 } of entries) {
const bytes = Uint8Array.from(atob(base64), (char) => char.charCodeAt(0));
transfer.items.add(new File([bytes], name, { type: mimeType }));
}
return transfer;
},
{
name: file.name,
mimeType: file.mimeType,
base64: file.buffer.toString("base64"),
},
files.map(({ name, mimeType, buffer }) => ({
name,
mimeType,
base64: buffer.toString("base64"),
})),
);
}
export async function pasteFilesIntoComposer(page: Page, files: TransferFile[]): Promise<boolean> {
const clipboardData = await createFileTransfer(page, files);
try {
const input = composerInput(page);
await input.focus();
return await input.evaluate((element, transfer) => {
const event = new ClipboardEvent("paste", {
clipboardData: transfer,
bubbles: true,
cancelable: true,
});
return !element.dispatchEvent(event);
}, clipboardData);
} finally {
await clipboardData.dispose();
}
}
export async function dropFileOnComposer(page: Page, file: TransferFile): Promise<void> {
const dataTransfer = await createFileTransfer(page, [file]);
const composerRoot = page.getByTestId("message-input-root").filter({ visible: true }).first();
await expect(composerRoot).toBeVisible({ timeout: 10_000 });
+8 -1
View File
@@ -2,6 +2,7 @@ import type { WorkspaceCreateRequest } from "@getpaseo/protocol/messages";
import { expect, type Page } from "@playwright/test";
import { daemonWsRoutePattern } from "./daemon-port";
import { gotoAppShell } from "./app";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { gotoWorkspace } from "./launcher";
import { fillComposerDraft } from "./composer";
import { createAgentTabFromMenu } from "./workspace-tabs";
@@ -146,8 +147,14 @@ export async function createCreationScenario(page: Page) {
const evictionWorkspaceIds = new Set<string>();
return {
cleanup: project.cleanup,
async openWorkspaceForm(isolation: "local" | "worktree") {
async openWorkspaceForm(
isolation: "local" | "worktree",
options?: { approvePlugins?: readonly string[] },
) {
await gotoAppShell(page);
if (options?.approvePlugins?.length) {
await approveClientPluginsInUi(page, options.approvePlugins);
}
await waitForSidebarHydration(page);
await openNewWorkspaceComposer(page, project);
await selectWorkspaceIsolation(page, isolation);
@@ -5,6 +5,7 @@ import { expect, type Page, type TestInfo } from "@playwright/test";
import { gotoWorkspace } from "./launcher";
import { buildAgentRoute } from "./mock-agent";
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { pluginRequirements } from "./plugin-fixture";
import { seedWorkspace } from "./seed-client";
import { ensureExplorerSidebar } from "./workspace-tabs";
@@ -63,6 +64,7 @@ export async function withExplorerPanelPlugins(
await client.installDirectoryPlugin(second);
await page.setViewportSize({ width: 1280, height: 900 });
await gotoWorkspace(page, workspace.workspaceId);
await approveClientPluginsInUi(page, ["explorer-review", "explorer-other"]);
await run(workspace);
} finally {
+15 -1
View File
@@ -1,4 +1,4 @@
import { expect, type Page } from "@playwright/test";
import { expect, type Locator, type Page } from "@playwright/test";
import { identityForeground, type IdentityColorName } from "@/styles/identity-colors";
import { openSettings } from "./app";
import { buildSeededHost } from "./daemon-registry";
@@ -289,6 +289,20 @@ export async function expectHostAppearancePreview(
);
}
export async function expectHostSelectorStatusIcon(
trigger: Locator,
options?: { color?: IdentityColorName },
): Promise<void> {
const icon = trigger.getByTestId("host-status-icon");
await expect(icon).toBeVisible({ timeout: 15_000 });
await expect(icon.getByTestId("host-status-icon-dot")).toBeVisible();
const svg = icon.locator("svg");
await expect(svg).toBeVisible();
if (options?.color) {
await expect(svg).toHaveAttribute("stroke", identityForeground(options.color, "light"));
}
}
// The auto-seed fixture rewrites the host registry on every navigation. Setting the
// disable-once flag to the current nonce makes it skip exactly one reload, which is what proves
// the appearance survived rather than being reseeded.
@@ -1,5 +1,5 @@
import { expect, type Page } from "@playwright/test";
import { buildHostWorkspaceRoute } from "@/utils/host-routes";
import { buildHostWorkspaceRoute, parseHostWorkspaceRouteFromPathname } from "@/utils/host-routes";
import { gotoAppShell } from "./app";
import { openCommandCenter } from "./command-center";
import { openGlobalNewWorkspaceComposer } from "./new-workspace";
@@ -132,11 +132,31 @@ export class ImportSessionFlow {
}
async retryProvider(provider: string, label: string) {
await this.expectProviderError(label);
await this.page.getByTestId(`import-session-retry-${provider}`).click();
await this.startProviderRetry(provider);
await expect(this.page.getByTestId(`import-session-retry-${provider}`)).toBeEnabled();
await this.expectProviderError(label);
await expect(this.page.getByRole("progressbar")).toHaveCount(0);
}
async startProviderRetry(provider: string) {
await this.page.getByTestId(`import-session-retry-${provider}`).click();
}
async expectProviderRetryPending(provider: string) {
await expect(this.page.getByTestId(`import-session-retry-${provider}`)).toBeDisabled();
}
async expectProviderRequestTimeout() {
await expect(
this.page
.getByText("No response to fetch_recent_provider_sessions_request after 100000ms", {
exact: true,
})
.first(),
).toBeVisible();
}
async expectProviderRecovered(label: string) {
await expect(
this.page.getByText(`Could not load ${label} sessions`, { exact: true }),
).toHaveCount(0);
}
async startImport(id: string) {
await this.revealSession(id);
await this.page.getByTestId(rowTestId(id)).click();
@@ -174,6 +194,30 @@ export class ImportSessionFlow {
userText,
);
}
/** The import opened in a workspace of its own, listed in the sidebar beside `existingWorkspaceId`. */
async expectImportedIntoNewWorkspace(input: {
existingWorkspaceId: string;
userText: string;
}): Promise<string> {
await expect
.poll(
() => {
const workspaceId = this.currentWorkspaceId();
return workspaceId !== null && workspaceId !== input.existingWorkspaceId;
},
{ timeout: 30_000 },
)
.toBe(true);
const importedWorkspaceId = this.currentWorkspaceId();
if (!importedWorkspaceId) throw new Error("The import left the workspace route");
await this.expectImportedIntoWorkspace(importedWorkspaceId, input.userText);
for (const id of [input.existingWorkspaceId, importedWorkspaceId]) {
await expect(
this.page.getByTestId(`sidebar-workspace-row-${getServerId()}:${id}`),
).toBeVisible();
}
return importedWorkspaceId;
}
async close() {
await this.page.getByRole("button", { name: "Close", exact: true }).last().click();
await expect(this.page.getByTestId("import-session-sheet")).toHaveCount(0);
@@ -198,6 +242,11 @@ export class ImportSessionFlow {
timeout: 30_000,
});
}
private currentWorkspaceId(): string | null {
return (
parseHostWorkspaceRouteFromPathname(new URL(this.page.url()).pathname)?.workspaceId ?? null
);
}
private async rowIds() {
return await this.page
.locator('[data-testid^="import-session-session-claude-"]')
@@ -1,4 +1,4 @@
import { expect, type Page } from "@playwright/test";
import { expect, type Page, type WebSocket } from "@playwright/test";
import { openSettingsSection } from "./settings";
export interface RecordedBrowserNotification {
@@ -75,6 +75,32 @@ export async function installBrowserNotificationRecorder(page: Page): Promise<vo
});
}
/**
* Reloads the app and waits until it has told the daemon this device is present.
*
* The daemon shows an attention notification only on a client that has sent a
* heartbeat. Settings render from local storage before the reloaded app connects,
* so an agent that finishes right after the reload finds no present client and
* no notification is shown.
*/
export async function reloadAndWaitForDevicePresence(page: Page): Promise<void> {
let presenceReported = false;
const watchHeartbeats = (socket: WebSocket) => {
socket.on("framesent", (frame) => {
if (typeof frame.payload === "string" && frame.payload.includes('"client_heartbeat"')) {
presenceReported = true;
}
});
};
page.on("websocket", watchHeartbeats);
try {
await page.reload();
await expect.poll(() => presenceReported).toBe(true);
} finally {
page.off("websocket", watchHeartbeats);
}
}
export async function readRecordedBrowserNotifications(
page: Page,
): Promise<RecordedBrowserNotification[]> {
@@ -134,7 +134,7 @@ export async function addProjectFromSetup(page: Page, projectPath: string): Prom
export async function showSetupAgainFromSettings(page: Page): Promise<void> {
await page.locator('[data-testid="sidebar-settings"]:visible').first().click();
await page.getByRole("button", { name: "Show setup again", exact: true }).click();
await page.getByRole("button", { name: "Show", exact: true }).click();
}
export async function goToSetupStep(page: Page, label: string): Promise<void> {
@@ -66,6 +66,56 @@ type PairingHost =
| Pick<IsolatedHostDaemon, "serverId" | "port">
| Pick<OutdatedDaemon, "serverId" | "endpoint">;
export async function openDevicesPage(page: Page, daemon: PairingHost): Promise<void> {
await openAppOnPairingHost(page, daemon);
await openSettings(page);
await openSettingsHost(page, daemon.serverId);
await openSettingsHostSection(page, daemon.serverId, "devices");
await expect(page.getByTestId("devices-connected-clients-card")).toBeVisible();
}
export async function expectConnectedClientRow(
page: Page,
title: string,
scopeLabel: string,
): Promise<void> {
const card = page.getByTestId("devices-connected-clients-card");
const row = card.getByRole("button", { name: title, exact: true });
await expect(row).toBeVisible();
await expect(card.getByText(scopeLabel, { exact: true }).first()).toBeVisible();
}
export async function expandConnectedClientRow(page: Page, title: string): Promise<void> {
const card = page.getByTestId("devices-connected-clients-card");
await card.getByRole("button", { name: title, exact: true }).click();
await expect(card.getByText("Permissions", { exact: true })).toBeVisible();
}
export async function returnFromRelayToWaysToConnect(page: Page): Promise<void> {
await page
.getByTestId("devices-relay-pairing")
.getByRole("button", { name: "Back", exact: true })
.click();
await expect(page.getByTestId("devices-relay")).toBeVisible();
await expect(page.getByRole("switch", { name: "Tailscale", exact: true })).toBeVisible();
}
export async function openPairDeviceWaysSheet(page: Page): Promise<void> {
await expect(page.getByTestId("devices-pair-button")).toBeVisible();
await page.getByTestId("devices-pair-button").click();
await expect(page.getByTestId("devices-relay")).toBeVisible();
}
async function ensurePairDeviceWaysSheetOpen(page: Page): Promise<void> {
const relayRow = page.getByTestId("devices-relay");
const pairButton = page.getByTestId("devices-pair-button");
await relayRow.or(pairButton).first().waitFor({ state: "visible" });
if (!(await relayRow.isVisible())) {
await pairButton.click();
await expect(relayRow).toBeVisible();
}
}
export async function preparePairingHost(
page: Page,
daemon: PairingHost,
@@ -74,9 +124,9 @@ export async function preparePairingHost(
await openAppOnPairingHost(page, daemon, additionalHosts);
await openSettings(page);
await openSettingsHost(page, daemon.serverId);
await expect(page.getByTestId("devices-relay")).toHaveCount(0);
await expect(page.getByTestId("devices-pair-button")).toHaveCount(0);
await openSettingsHostSection(page, daemon.serverId, "devices");
await expect(page.getByTestId("devices-relay")).toBeVisible();
await openPairDeviceWaysSheet(page);
}
/** Loads the app afresh with `daemon` as its first host, then opens the setup's Mobile step. */
@@ -185,10 +235,12 @@ export async function cancelTailscaleTurnOff(page: Page, address: string): Promi
*/
export async function confirmTailscaleTurnOff(page: Page, address: string): Promise<void> {
const question = answerNextDialog(page, "accept");
await page.getByRole("switch", { name: "Tailscale", exact: true }).click();
const sheet = page.getByTestId("devices-pair-sheet");
const scope = (await sheet.isVisible()) ? sheet : page;
await scope.getByRole("switch", { name: "Tailscale", exact: true }).click();
expect(await question).toBe(TURN_OFF_QUESTION);
await expect(page.getByText("Host is not connected", { exact: true })).toBeVisible();
await expect(page.getByRole("switch", { name: "Tailscale", exact: true })).toHaveCount(0);
await expect(scope.getByText("Host is not connected", { exact: true })).toBeVisible();
await expect(scope.getByRole("switch", { name: "Tailscale", exact: true })).toHaveCount(0);
await expectHostUnreachableAt(address);
}
@@ -372,9 +424,12 @@ function deliverInOrderAfter(delay: () => number, deliver: (message: string | Bu
}
export async function expectTailscaleUpdateRequired(page: Page): Promise<void> {
await expect(page.getByRole("switch", { name: "Tailscale", exact: true })).toBeDisabled();
await expect(page.getByText("Update this host to use Tailscale", { exact: true })).toBeVisible();
await expect(page.getByRole("link", { name: "How to update", exact: true })).toBeVisible();
await ensurePairDeviceWaysSheetOpen(page);
const sheet = page.getByTestId("devices-pair-sheet");
const scope = (await sheet.isVisible()) ? sheet : page;
await expect(scope.getByRole("switch", { name: "Tailscale", exact: true })).toBeDisabled();
await expect(scope.getByText("Update this host to use Tailscale", { exact: true })).toBeVisible();
await expect(scope.getByRole("link", { name: "How to update", exact: true })).toBeVisible();
}
export async function expectTailscaleUnavailable(page: Page): Promise<void> {
@@ -460,6 +515,7 @@ export function observeDaemonStatusPolling(page: Page, port: number) {
}
export async function openPairDeviceModal(page: Page): Promise<void> {
await ensurePairDeviceWaysSheetOpen(page);
await page.getByRole("button", { name: "Relay", exact: true }).click();
await expect(page.getByTestId("devices-relay-pairing")).toBeVisible();
}
@@ -579,9 +635,14 @@ export async function expectPairingDisconnected(page: Page): Promise<void> {
}
export async function switchPairDeviceToHost(page: Page, serverId: string): Promise<void> {
const sheet = page.getByTestId("devices-pair-sheet");
if (await sheet.isVisible()) {
await sheet.getByRole("button", { name: "Close", exact: true }).click();
await expect(sheet).toHaveCount(0);
}
await selectSettingsHost(page, serverId);
await expectAppRoute(page, buildSettingsHostSectionRoute(serverId, "devices"));
await expect(page.getByTestId("devices-relay")).toBeVisible();
await openPairDeviceWaysSheet(page);
}
export async function openRelaySecurityDocs(page: Page): Promise<void> {
@@ -1,5 +1,6 @@
import type { Locator, TestInfo } from "@playwright/test";
import { test, expect, type Page } from "@playwright/test";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { copyPluginExample } from "./plugin-fixture";
import { gotoAppShell } from "./app";
import { buildAgentRoute } from "./mock-agent";
@@ -73,6 +74,7 @@ export async function withButtonAuthorExample(
await client.installDirectoryPlugin(example.directory);
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["button-examples"]);
await page.goto(buildAgentRoute(workspace.workspaceId, agent.id));
await run({
@@ -17,6 +17,7 @@ import {
} from "./compact-workspace-scripts";
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
import { seedWorkspace } from "./seed-client";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { pluginRequirements } from "./plugin-fixture";
const PLUGIN_ID = "button-showcase";
@@ -45,6 +46,9 @@ function Details({ workspaceId, theme, layout, close }) {
owner.subscribe({ snapshot(value) { setOwnerId(value.subscriptionId); }, update() { setUpdates((n) => n + 1); } });
return () => { void owner.release(); };
}, [paseo]);
React.useEffect(() => {
globalThis.__buttonContentMounts = (globalThis.__buttonContentMounts ?? 0) + 1;
}, []);
const rpc = useRpc(summary);
const query = useQuery({ queryKey: ["summary"], queryFn: () => rpc({}) });
if (failed) throw new Error("Button content failed");
@@ -198,6 +202,13 @@ async function expectDetails(page: Page) {
await expect(page.getByText("All systems operational", { exact: true })).toBeInViewport();
}
/** How many times button content has mounted on the page, counted by the content itself. */
async function contentMounts(page: Page): Promise<number> {
return page.evaluate(
() => (globalThis as { __buttonContentMounts?: number }).__buttonContentMounts ?? 0,
);
}
// The details render before the daemon answers their event subscription, and reopened
// details show the cached summary at once, so wait for the subscription id to arrive.
async function readContentObservation(page: Page): Promise<string> {
@@ -231,14 +242,17 @@ async function expectCompactDetails(page: Page) {
await expect(menu.getByText("Presentation: compact", { exact: true })).toBeVisible();
}
/** Resolves once `subject` renders the same pixels twice in a row: entering animations are done. */
/**
* Resolves once `subject` renders the same pixels twice in a row: entering animations are done.
* A remount detaches the element mid-screenshot; that is not still yet, so the poll starts over.
*/
async function expectStill(subject: Locator) {
let previous: Buffer | null = null;
await expect
.poll(
async () => {
const current = await subject.screenshot();
const still = previous !== null && current.equals(previous);
const current = await screenshotAttached(subject);
const still = previous !== null && current !== null && current.equals(previous);
previous = current;
return still;
},
@@ -247,6 +261,17 @@ async function expectStill(subject: Locator) {
.toBe(true);
}
async function screenshotAttached(subject: Locator): Promise<Buffer | null> {
try {
return await subject.screenshot();
} catch (error) {
if (error instanceof Error && error.message.includes("Element is not attached to the DOM")) {
return null;
}
throw error;
}
}
/** Attaches the screen once per colour scheme, for review alongside the run. */
async function captureSchemes(page: Page, info: TestInfo, name: string, subject: Locator) {
for (const colorScheme of ["light", "dark"] as const) {
@@ -354,21 +379,25 @@ export async function withButtonShowcase(
try {
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await page.goto(buildAgentRoute(workspace.workspaceId, agent.id));
await expect(page.getByRole("button", { name: "Run review", exact: true })).toBeVisible();
await run({
verifyObservationLifetime: () =>
test.step("closing and crashing content release its owner while sibling buttons and app remain live", async () => {
const mountsBefore = await contentMounts(page);
await press(page, "Header status");
await expectDetails(page);
const first = await readContentObservation(page);
expect(await contentMounts(page)).toBe(mountsBefore + 1);
await press(page, "Close deployment details");
await expect.poll(() => released.has(first)).toBe(true);
await press(page, "Composer status");
await expectDetails(page);
const second = await readContentObservation(page);
expect(second).not.toBe(first);
expect(await contentMounts(page)).toBe(mountsBefore + 2);
await workspace.client.renameProject(workspace.projectId, "Observer control");
await expect(page.getByText("Observed updates: 1", { exact: true })).toBeVisible();
await press(page, "Fail button content");
@@ -5,6 +5,7 @@ import { expect, test, type Page } from "@playwright/test";
import { gotoAppShell } from "./app";
import { openAgentRoute } from "./mock-agent";
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
import { seedWorkspace } from "./seed-client";
@@ -39,6 +40,7 @@ export async function withComposerControlsExample(
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(example.directory);
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await openAgentRoute(page, { workspaceId: workspace.workspaceId, agentId: agent.id });
await run({
narrowTheWindow: () =>
@@ -217,6 +219,7 @@ async function withToolbarPlugin(
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(directory);
await gotoAppShell(page);
await approveClientPluginsInUi(page, [ONE_TOGGLE_PLUGIN_ID]);
await openAgentRoute(page, { workspaceId: workspace.workspaceId, agentId: agent.id });
await expect(toolbar(page)).toBeVisible({ timeout: 30_000 });
await run({
@@ -13,6 +13,7 @@ import { gotoWorkspace } from "./launcher";
import { openCommandCenter } from "./command-center";
import { openAgentRoute, seedMockAgentWorkspace } from "./mock-agent";
import { connectNewWorkspaceDaemonClient, openGlobalNewWorkspaceComposer } from "./new-workspace";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
import { seedWorkspace } from "./seed-client";
import {
@@ -86,6 +87,7 @@ export async function withComposerToolsExample(
await client.installDirectoryPlugin(example.directory);
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["composer-controls-example"]);
await openAgentRoute(page, { workspaceId: workspace.workspaceId, agentId: agent.id });
await run({
openComposerToolsInExplorer: () =>
@@ -213,6 +215,7 @@ export async function withPluginWritingToAnotherWorkspace(
await client.installDirectoryPlugin(directory);
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["composer-ref"]);
await run({
openTargetAgent: () =>
test.step("open the agent the plugin will write to", async () => {
@@ -356,6 +359,7 @@ export default function contribute(client) {
await client.installDirectoryPlugin(directory);
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["composer-focus"]);
await run({
openOtherAgent: () =>
test.step("open another agent, so the target's tab is not showing", async () => {
@@ -479,6 +483,7 @@ export default function contribute(client) {
await client.installDirectoryPlugin(directory);
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["held-composer"]);
await run({
openNewWorkspace: () =>
test.step("open the New workspace composer", async () => {
@@ -596,6 +601,7 @@ export async function withPluginFocusingASubagent(
try {
await page.setViewportSize(COMPACT);
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["focus-agent"]);
await run({
keepParentInExplorerOnCompactScreen: () =>
test.step("move the parent into the Explorer, then narrow the window", async () => {
@@ -740,6 +746,7 @@ export async function withPluginFocusingAnAgentWithContextUsage(
try {
await page.setViewportSize(COMPACT);
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["focus-agent"]);
await run({
openContextUsageOnPhone: () =>
test.step("open the agent's context usage on a phone", async () => {
@@ -8,6 +8,7 @@ import { expect, test as base, type Page } from "../fixtures";
import appPackage from "../../../package.json";
import { gotoAppShell, openSettings } from "./app";
import { addConnectedHostAndReload } from "./hosts";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { pluginRequirements } from "./plugin-fixture";
import {
expectToast,
@@ -31,7 +32,14 @@ export const LISTING = {
overview: "Directory example keeps a checklist beside your agents.",
};
export const test = base.extend<{ directoryHost: { serverId: string; port: number } }>({
export const test = base.extend<{
directoryHost: {
serverId: string;
port: number;
setDetailDelayMs: (ms: number) => void;
waitForDetailServed: (listingId: string) => Promise<void>;
};
}>({
directoryHost: async ({ e2eWorker }, provide) => {
void e2eWorker;
const root = await mkdtemp(path.join(tmpdir(), "paseo-plugin-directory-"));
@@ -42,7 +50,12 @@ export const test = base.extend<{ directoryHost: { serverId: string; port: numbe
pluginRegistryUrl: registry.url,
});
try {
await provide({ serverId: host.serverId, port: host.port });
await provide({
serverId: host.serverId,
port: host.port,
setDetailDelayMs: registry.setDetailDelayMs,
waitForDetailServed: registry.waitForDetailServed,
});
} finally {
await host.dispose();
}
@@ -80,17 +93,38 @@ async function createListedPlugin(root: string) {
git("add", "-A");
git("commit", "-m", "initial");
const date = "2026-10-03T00:00:00.000Z";
const commit = git("rev-parse", "HEAD");
return {
id: LISTING.id,
name: LISTING.name,
description: LISTING.description,
license: "MIT",
requirements: { paseo: ">=0.8.0" },
categories: ["tools"],
author: { github: "acme", name: "Acme" },
repository: { url: "https://github.com/acme/directory-example" },
author: {
github: "acme",
name: "Acme",
bio: "Building developer workflow plugins for Paseo.",
website: "https://acme.dev",
},
repository: { url: "https://github.com/acme/directory-example", commit },
artifact: {
kind: "git",
remote: pathToFileURL(repository).href,
commit: git("rev-parse", "HEAD"),
commit,
},
links: [
{ label: "Documentation", url: "https://acme.dev/docs", icon: "book" },
{
label: "Changelog",
url: "https://github.com/acme/directory-example/releases",
icon: "changelog",
},
],
funding: [{ platform: "github", url: "https://github.com/sponsors/acme" }],
scorecardSummary: {
health: { grade: "excellent" },
review: { status: "passed", score: 4, noteCount: 0 },
},
media: [],
submittedAt: date,
@@ -101,20 +135,206 @@ async function createListedPlugin(root: string) {
};
}
function createRelatedFixtures(date: string) {
const specs = [
[
"acme/pr-radar",
"PR Radar",
"Monitors pull requests and CI checks across connected hosts.",
1400,
],
[
"acme/commit-diff",
"Commit Diff",
"Compact commit history and inline file tree diff viewer.",
980,
],
[
"acme/sidebar-plus",
"Sidebar Plus",
"Groups workspaces into folders with custom status pills.",
1120,
],
[
"acme/linear-sync",
"Linear Sync",
"Attaches Linear tickets to workspaces from slash commands.",
860,
],
[
"acme/worktree-guard",
"Worktree Guard",
"Fast-forwards base branches before creating new worktrees.",
740,
],
[
"acme/usage-meter",
"Usage Meter",
"Shows live token usage and session pacing in the sidebar.",
650,
],
] as const;
return specs.map(([id, name, description, installs]) => {
const entry: Record<string, unknown> = {
id,
name,
description,
license: "MIT",
categories: ["tools"],
author:
id === "acme/pr-radar"
? {
github: "acme",
name: "Acme",
bio: "Building developer workflow plugins for Paseo.",
website: "https://acme.dev",
}
: { github: "acme", name: "Acme" },
repository: { url: `https://github.com/${id}` },
artifact: { kind: "git", remote: `https://github.com/${id}.git`, commit: "a".repeat(40) },
scorecardSummary: {
health: { grade: "good" },
review: { status: "passed", score: 4, noteCount: 0 },
},
media: [],
submittedAt: date,
reviewedAt: date,
updatedAt: date,
publishedAt: date,
installs,
};
if (id === "acme/pr-radar") {
entry.funding = [
{ platform: "github", url: "https://github.com/sponsors/acme" },
{ platform: "kofi", url: "https://ko-fi.com/acme" },
{ platform: "buymeacoffee", url: "https://buymeacoffee.com/acme" },
{ platform: "opencollective", url: "https://opencollective.com/acme" },
{ platform: "patreon", url: "https://patreon.com/acme" },
{ platform: "polar", url: "https://polar.sh/acme" },
{ platform: "liberapay", url: "https://liberapay.com/acme" },
{ platform: "paypal", url: "https://paypal.me/acme" },
{ url: "https://ifdian.net/a/acme" },
];
}
return entry;
});
}
async function startRegistry(listing: Record<string, unknown>) {
const date = "2026-10-03T00:00:00.000Z";
const commit = (listing.artifact as { commit: string }).commit;
const related = createRelatedFixtures(date);
const detailDocument = {
...listing,
readme: `# ${LISTING.name}\n\n${LISTING.overview}\n\n## Capabilities\n\n- Adds a lightweight review checklist panel to every workspace.\n- Works across Desktop, Web, and Mobile without extra setup.`,
health: {
grade: "excellent",
summary: "This plugin is actively maintained.",
signals: [
{
id: "hygiene",
summary: "Overview, MIT license, and Paseo version requirement present.",
},
{
id: "maintenance",
summary: "Last commit 2 days ago. 64 commits in the past year.",
},
{
id: "responsiveness",
summary: "Closed 94% of 18 issues. 2 active contributors.",
},
{ id: "adoption", summary: "1.2k installations, 86 stars." },
],
},
review: {
status: "passed",
score: 4,
reviewedAt: date,
reviewUrl: "https://github.com/getpaseo/plugins/pull/2410",
policyUrl: "https://github.com/getpaseo/plugins/blob/main/REVIEW.md",
platforms: ["desktop", "web", "ios", "android"],
notes: [],
passed: [
{ id: "integrity", summary: "Artifact matches pinned Git commit hash." },
{ id: "lockfile", summary: "No external runtime dependencies or install scripts." },
{ id: "obfuscation", summary: "No obfuscation detected." },
{ id: "network", summary: "No suspicious network or exfiltration patterns found." },
],
capabilities: [
{
id: "cap.workspace",
label: "Workspace panel",
summary: "Renders a checklist tab inside Paseo workspaces.",
details:
"Registers a client workspace panel via @getpaseo/plugin/client in index.client.ts.",
},
{
id: "cap.storage",
label: "Plugin settings",
summary: "Stores checklist templates in plugin-scoped settings.",
details:
"Uses registerSettings with Zod schema validation; writes no files outside plugin storage.",
},
],
},
history: [
{
label: "v1.2.0",
kind: "git",
commit,
tag: "v1.2.0",
publishedAt: date,
url: "https://github.com/acme/directory-example/releases/tag/v1.2.0",
reviewUrl: "https://github.com/getpaseo/plugins/pull/2410",
},
{
label: "v1.1.0",
kind: "git",
commit: "b".repeat(40),
tag: "v1.1.0",
publishedAt: "2026-09-20T00:00:00.000Z",
url: "https://github.com/acme/directory-example/releases/tag/v1.1.0",
reviewUrl: "https://github.com/getpaseo/plugins/pull/2180",
},
{
label: "c81a4f2",
kind: "git",
commit: "c81a4f2".padEnd(40, "0"),
publishedAt: "2026-09-05T00:00:00.000Z",
url: `https://github.com/acme/directory-example/commit/${"c81a4f2".padEnd(40, "0")}`,
},
],
};
const documents: Record<string, unknown> = {
"/index.json": {
schemaVersion: 1,
registry: { name: "Local", url: "http://127.0.0.1" },
categories: [{ slug: "tools", label: "Tools" }],
plugins: [listing],
plugins: [listing, ...related],
featured: [],
generatedAt: "2026-10-03T00:00:00.000Z",
},
[`/plugins/${LISTING.id}.json`]: {
...listing,
readme: `# ${LISTING.name}\n\n${LISTING.overview}`,
generatedAt: date,
},
[`/plugins/${LISTING.id}.json`]: detailDocument,
};
for (const item of related) {
documents[`/plugins/${item.id}.json`] = {
...item,
readme: `# ${item.name}\n\n${item.description}`,
};
}
let detailDelayMs = 0;
const servedDetails = new Set<string>();
const detailWaiters = new Map<string, Array<() => void>>();
const markDetailServed = (requestUrl: string | undefined) => {
const match = requestUrl ? /^\/plugins\/(.+)\.json$/.exec(requestUrl) : null;
if (!match) return;
const id = match[1]!;
servedDetails.add(id);
const waiters = detailWaiters.get(id);
if (waiters) {
detailWaiters.delete(id);
for (const resolve of waiters) resolve();
}
};
const server = createServer((request, response) => {
const document = request.url ? documents[request.url] : undefined;
@@ -122,14 +342,32 @@ async function startRegistry(listing: Record<string, unknown>) {
response.writeHead(404).end();
return;
}
response.setHeader("Content-Type", "application/json");
response.end(JSON.stringify(document));
const respond = () => {
response.setHeader("Content-Type", "application/json");
response.end(JSON.stringify(document), () => markDetailServed(request.url));
};
if (detailDelayMs > 0 && request.url?.startsWith("/plugins/")) {
setTimeout(respond, detailDelayMs);
} else {
respond();
}
});
await new Promise<void>((resolve) => server.listen(0, "127.0.0.1", resolve));
const address = server.address();
if (!address || typeof address === "string") throw new Error("Missing registry address");
return {
url: `http://127.0.0.1:${address.port}`,
setDetailDelayMs: (ms: number) => {
detailDelayMs = ms;
},
waitForDetailServed: (listingId: string) => {
if (servedDetails.has(listingId)) return Promise.resolve();
return new Promise<void>((resolve) => {
const list = detailWaiters.get(listingId) ?? [];
list.push(resolve);
detailWaiters.set(listingId, list);
});
},
close: () => new Promise<void>((resolve) => server.close(() => resolve())),
};
}
@@ -159,6 +397,7 @@ export async function installListingFromRow(page: Page) {
const sheet = page.getByTestId("plugin-install-sheet");
await expect(sheet).toContainText("Acme");
await sheet.getByTestId("plugin-install-confirm").click();
await approveClientPluginsInUi(page, ["directory-example"]);
await expect(listingRow(page).getByTestId(`plugin-uninstall-${LISTING.id}`)).toBeVisible({
timeout: 60_000,
});
@@ -193,6 +432,7 @@ export async function uninstallFromPage(page: Page) {
export async function installFromPage(page: Page) {
await page.getByTestId(`plugin-install-${LISTING.id}`).filter({ visible: true }).click();
await page.getByTestId("plugin-install-confirm").click();
await approveClientPluginsInUi(page, ["directory-example"]);
await expect(
page.getByRole("button", { name: `Actions for ${LISTING.name}`, exact: true }),
).toBeVisible({ timeout: 60_000 });
@@ -203,3 +443,237 @@ export async function openFromInstalledTab(page: Page) {
await selectInstalledTab(page);
await openPluginPage(page, LISTING.name, "directory-example");
}
interface PluginFrameSample {
url: string;
stacked: boolean;
hasSkeleton: boolean;
updatesLabel: string | null;
overviewHeight: number | null;
overviewTextLen: number;
licenseY: number | null;
relatedY: number | null;
}
async function sampleFramesDuring(
page: Page,
{
action,
waitUntilSettled,
}: { action: () => Promise<void>; waitUntilSettled: () => Promise<void> },
): Promise<PluginFrameSample[]> {
await page.evaluate(() => {
const samples: PluginFrameSample[] = [];
const host = window as unknown as {
__pluginFrameSamples?: PluginFrameSample[];
__stopPluginFrameSampling?: () => void;
};
host.__pluginFrameSamples = samples;
let running = true;
host.__stopPluginFrameSampling = () => {
running = false;
};
const isVisible = (el: Element): boolean => {
const rect = el.getBoundingClientRect();
return rect.width > 0 && rect.height > 0;
};
const queryVisible = (selector: string): Element | null => {
const nodes = Array.from(document.querySelectorAll(selector));
for (let i = nodes.length - 1; i >= 0; i -= 1) {
if (isVisible(nodes[i]!)) return nodes[i]!;
}
return null;
};
const findVisibleText = (text: string): Element | null => {
const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT);
let node: Node | null;
let match: Element | null = null;
while ((node = walker.nextNode())) {
if (
node.textContent?.trim() === text &&
node.parentElement &&
isVisible(node.parentElement)
) {
match = node.parentElement;
}
}
return match;
};
const findOverviewCard = (tabsEl: Element | null, stacked: boolean): Element | null => {
if (!tabsEl) return null;
const container = stacked
? (tabsEl.closest('[style*="overflow"]')?.parentElement ??
tabsEl.parentElement?.parentElement?.parentElement)
: tabsEl.parentElement?.parentElement;
if (!container) return null;
const visibleChildren = Array.from(container.children).filter(isVisible);
return visibleChildren[visibleChildren.length - 1] ?? null;
};
const roundRect = (el: Element | null) => el?.getBoundingClientRect() ?? null;
const record = () => {
const tabsEl = queryVisible('[data-testid="plugin-page-tabs"]');
const stacked = Boolean(queryVisible('[data-testid="plugin-page-tab-details"]'));
const updatesTabEl = queryVisible('[data-testid="plugin-page-tab-updates"]');
const skeletonEl = queryVisible('[data-testid="plugin-overview-skeleton"]');
const licenseRect = roundRect(findVisibleText("License"));
const relatedRect = roundRect(findVisibleText("Related plugins"));
const overviewCard = findOverviewCard(tabsEl, stacked);
const overviewRect = roundRect(overviewCard);
samples.push({
url: location.pathname,
stacked,
hasSkeleton: Boolean(skeletonEl),
updatesLabel: updatesTabEl?.textContent?.trim() ?? null,
overviewHeight: overviewRect ? Math.round(overviewRect.height) : null,
overviewTextLen: overviewCard?.textContent?.trim().length ?? 0,
licenseY: licenseRect ? Math.round(licenseRect.y) : null,
relatedY: relatedRect ? Math.round(relatedRect.y) : null,
});
if (running) requestAnimationFrame(record);
};
requestAnimationFrame(record);
});
await action();
await waitUntilSettled();
await page.evaluate(
() =>
new Promise<void>((resolve) =>
requestAnimationFrame(() => requestAnimationFrame(() => resolve())),
),
);
return page.evaluate(() => {
const host = window as unknown as {
__pluginFrameSamples?: PluginFrameSample[];
__stopPluginFrameSampling?: () => void;
};
host.__stopPluginFrameSampling?.();
return host.__pluginFrameSamples ?? [];
});
}
function assertOverviewNeverCollapsed(
frames: PluginFrameSample[],
{ minHeight }: { minHeight: number },
) {
const withOverview = frames.filter((frame) => frame.overviewHeight !== null);
expect(withOverview.length).toBeGreaterThan(0);
for (const frame of withOverview) {
expect(frame.hasSkeleton || frame.overviewTextLen > 0).toBe(true);
expect(frame.overviewHeight).toBeGreaterThanOrEqual(minHeight);
}
}
/** Opens the example listing without hovering first and verifies zero collapse or layout shift. */
export async function expectStableUncachedListingOpen(page: Page) {
const frames = await sampleFramesDuring(page, {
action: async () => {
await listingRow(page).getByText(LISTING.name, { exact: true }).click();
},
waitUntilSettled: async () => {
await expect(page.getByText(LISTING.overview, { exact: true })).toBeVisible();
},
});
const onPage = frames.filter((frame) => frame.url.endsWith(`/${LISTING.id}`));
expect(onPage.length).toBeGreaterThan(0);
for (const frame of onPage) {
expect(frame.stacked).toBe(false);
expect(frame.updatesLabel).not.toBe("Updates · 1");
}
assertOverviewNeverCollapsed(onPage, { minHeight: 200 });
const licensePositions = new Set(
onPage.map((frame) => frame.licenseY).filter((y): y is number => y !== null),
);
expect(licensePositions.size).toBe(1);
const relatedPositions = new Set(
onPage.map((frame) => frame.relatedY).filter((y): y is number => y !== null),
);
expect(relatedPositions.size).toBe(1);
}
/** Hovers a related plugin to prefetch it, clicks it, and asserts Markdown lands on frame 1. */
export async function expectInstantPrefetchedRelatedOpen(
page: Page,
{ waitForDetailServed }: { waitForDetailServed: (listingId: string) => Promise<void> },
) {
const relatedCard = page.getByTestId("plugin-related-acme/pr-radar").filter({ visible: true });
await relatedCard.hover();
await waitForDetailServed("acme/pr-radar");
// Allow the local daemon WebSocket response to reach the browser query cache.
await page.waitForTimeout(200);
const frames = await sampleFramesDuring(page, {
action: async () => {
await relatedCard.click();
},
waitUntilSettled: async () => {
await expect(pluginPageName(page)).toHaveText("PR Radar");
await expect(
page
.getByText("Monitors pull requests and CI checks across connected hosts.")
.filter({ visible: true })
.nth(1),
).toBeVisible();
},
});
const onPage = frames.filter((frame) => frame.url.endsWith("/acme/pr-radar"));
expect(onPage.length).toBeGreaterThan(0);
for (const frame of onPage) {
expect(frame.hasSkeleton).toBe(false);
expect(frame.overviewTextLen).toBeGreaterThan(0);
}
}
/** Goes back to the previous plugin page and asserts it stays two-column on every frame. */
export async function expectStableDesktopBackToListing(page: Page) {
const frames = await sampleFramesDuring(page, {
action: async () => {
await page.goBack();
},
waitUntilSettled: async () => {
await expect(pluginPageName(page)).toHaveText(LISTING.name);
},
});
const onPage = frames.filter((frame) => frame.url.endsWith(`/${LISTING.id}`));
expect(onPage.length).toBeGreaterThan(0);
for (const frame of onPage) {
expect(frame.stacked).toBe(false);
}
}
/** Opens a listing in a narrow desktop split (< 700px detail width) and asserts stacked frame 1. */
export async function expectStackedFirstFrameOnNarrowDesktop(page: Page) {
await page
.getByRole("button", { name: "Back to plugins", exact: true })
.filter({ visible: true })
.click();
await expect(listingRow(page)).toBeVisible();
await page.setViewportSize({ width: 920, height: 960 });
const frames = await sampleFramesDuring(page, {
action: async () => {
await page
.getByTestId("plugin-listing-acme/commit-diff")
.filter({ visible: true })
.getByText("Commit Diff", { exact: true })
.click();
},
waitUntilSettled: async () => {
await expect(pluginPageName(page)).toHaveText("Commit Diff");
await expect(
page
.getByText("Compact commit history and inline file tree diff viewer.")
.filter({ visible: true })
.nth(1),
).toBeVisible();
},
});
const onPage = frames.filter((frame) => frame.url.endsWith("/acme/commit-diff"));
expect(onPage.length).toBeGreaterThan(0);
for (const frame of onPage) {
expect(frame.stacked).toBe(true);
}
assertOverviewNeverCollapsed(onPage, { minHeight: 80 });
}
@@ -0,0 +1,284 @@
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import { expect, type Locator, type Page } from "@playwright/test";
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
import { pluginRequirements } from "./plugin-fixture";
export interface ClientProbePluginSpec {
id: string;
name: string;
sidebarTitle: string;
markerKey: string;
}
export async function createClientProbePlugin(spec: ClientProbePluginSpec): Promise<{
directory: string;
cleanup: () => Promise<void>;
}> {
const directory = await mkdtemp(path.join(tmpdir(), `paseo-plugin-approval-${spec.id}-`));
await writeFile(
path.join(directory, "paseo-plugin.json"),
JSON.stringify({
id: spec.id,
name: spec.name,
requirements: pluginRequirements,
}),
);
await writeFile(
path.join(directory, "index.server.ts"),
`export default function contribute() { return () => {}; }\n`,
);
await writeFile(
path.join(directory, "index.client.tsx"),
`import React from "react";
import { Text, View } from "react-native";
import { SidebarRow } from "@getpaseo/plugin/client/ui";
const executed = (globalThis.__paseoPluginExecutions = globalThis.__paseoPluginExecutions || []);
executed.push(${JSON.stringify(spec.markerKey)});
function ProbeScreen({ theme }) {
return (
<View style={{ flex: 1, padding: 24 }}>
<Text style={{ color: theme.colors.foreground }}>${spec.name} screen</Text>
</View>
);
}
function ProbeItem({ currentScreen, openScreen }) {
return (
<SidebarRow
icon="Puzzle"
active={currentScreen?.screenId === "main"}
onPress={() => openScreen({ screenId: "main" })}
/>
);
}
export default function contribute(client) {
client.addScreen({ id: "main", title: ${JSON.stringify(spec.sidebarTitle)}, Component: ProbeScreen });
client.addSidebarHeaderItem({
id: "main",
title: ${JSON.stringify(spec.sidebarTitle)},
Component: ProbeItem,
});
return () => {};
}
`,
);
return {
directory,
cleanup: () => rm(directory, { recursive: true, force: true }),
};
}
export interface InstalledClientPluginsContext {
install: (spec: ClientProbePluginSpec) => Promise<void>;
}
export async function withInstalledClientPlugins<T>(
specs: readonly ClientProbePluginSpec[],
run: (ctx: InstalledClientPluginsContext) => Promise<T>,
): Promise<T> {
const client = await connectNewWorkspaceDaemonClient({ ownProjects: false });
const previous = await client.getDaemonConfig();
const created: Array<{ id: string; cleanup: () => Promise<void> }> = [];
const install = async (spec: ClientProbePluginSpec) => {
const fixture = await createClientProbePlugin(spec);
created.push({ id: spec.id, cleanup: fixture.cleanup });
await client.installDirectoryPlugin(fixture.directory);
};
try {
await client.patchDaemonConfig({ pluginsEnabled: true });
for (const spec of specs) {
await install(spec);
}
return await run({ install });
} finally {
for (const item of created.toReversed()) {
await client.removePlugin(item.id).catch(() => undefined);
}
await client
.patchDaemonConfig({ pluginsEnabled: previous.config.pluginsEnabled ?? false })
.catch(() => undefined);
await client.close().catch(() => undefined);
for (const item of created) {
await item.cleanup().catch(() => undefined);
}
}
}
export function pluginExecutionBypassSwitch(page: Page): Locator {
return page.getByRole("switch", { name: "Run plugins without asking", exact: true });
}
export function pluginExecutionBypassConfirmModal(page: Page): Locator {
return page.getByTestId("plugin-execution-bypass-confirm-modal");
}
export async function expectPluginExecutionBypass(page: Page, enabled: boolean): Promise<void> {
const toggle = pluginExecutionBypassSwitch(page);
await expect(toggle).toBeVisible({ timeout: 30_000 });
await expect(toggle).toHaveAttribute("aria-checked", String(enabled));
}
export async function openPluginExecutionBypassConfirm(page: Page): Promise<void> {
const toggle = pluginExecutionBypassSwitch(page);
await expect(toggle).toHaveAttribute("aria-checked", "false");
await toggle.click();
await expect(pluginExecutionBypassConfirmModal(page)).toBeVisible();
}
export async function cancelPluginExecutionBypassConfirm(page: Page): Promise<void> {
const modal = pluginExecutionBypassConfirmModal(page);
await expect(modal).toBeVisible();
await page.getByRole("button", { name: "Cancel", exact: true }).click();
await expect(modal).toHaveCount(0);
await expectPluginExecutionBypass(page, false);
}
export async function confirmPluginExecutionBypass(page: Page): Promise<void> {
const modal = pluginExecutionBypassConfirmModal(page);
await expect(modal).toBeVisible();
await page.getByRole("button", { name: "Turn on", exact: true }).click();
await expect(modal).toHaveCount(0);
await expectPluginExecutionBypass(page, true);
}
export async function setPluginExecutionBypass(page: Page, enabled: boolean): Promise<void> {
if (enabled) {
await openPluginExecutionBypassConfirm(page);
await confirmPluginExecutionBypass(page);
return;
}
const toggle = pluginExecutionBypassSwitch(page);
await expect(toggle).toHaveAttribute("aria-checked", "true");
await toggle.click();
await expect(pluginExecutionBypassConfirmModal(page)).toHaveCount(0);
await expectPluginExecutionBypass(page, false);
}
export function pluginApprovalSheet(page: Page): Locator {
return page.getByTestId("plugin-execution-approval");
}
export async function expectPluginApprovalPrompt(
page: Page,
expected: { pluginId: string; progress?: string },
): Promise<void> {
await expect(pluginApprovalSheet(page)).toBeVisible({ timeout: 30_000 });
await expect(page.getByTestId("plugin-execution-approval-plugin")).toContainText(
expected.pluginId,
);
if (expected.progress) {
await expect(page.getByTestId("plugin-execution-approval-progress")).toHaveText(
expected.progress,
);
}
}
export async function allowPluginExecution(page: Page): Promise<void> {
await page.getByRole("button", { name: "Allow", exact: true }).click();
}
export async function declinePluginExecution(page: Page): Promise<void> {
await page.getByRole("button", { name: "Don't allow", exact: true }).click();
}
async function readPromptIdentity(
page: Page,
): Promise<{ pluginText: string; hostText: string; key: string } | null> {
const pluginLocator = page.getByTestId("plugin-execution-approval-plugin");
const hostLocator = page.getByTestId("plugin-execution-approval-host");
if (!(await pluginLocator.isVisible().catch(() => false))) return null;
if (!(await hostLocator.isVisible().catch(() => false))) return null;
const pluginText = (await pluginLocator.textContent().catch(() => ""))?.trim() ?? "";
const hostText = (await hostLocator.textContent().catch(() => ""))?.trim() ?? "";
if (!pluginText || !hostText) return null;
return { pluginText, hostText, key: `${pluginText}\0${hostText}` };
}
async function waitForNextApprovalTarget(
page: Page,
previousKey: string | null,
): Promise<{ pluginText: string; hostText: string; key: string }> {
let matched: { pluginText: string; hostText: string; key: string } | null = null;
await expect
.poll(
async () => {
const current = await readPromptIdentity(page);
if (!current || current.key === previousKey) return false;
matched = current;
return true;
},
{ timeout: 30_000, message: "Expected next plugin execution approval prompt" },
)
.toBe(true);
if (!matched) {
throw new Error("Expected next plugin execution approval prompt");
}
return matched;
}
/**
* Approves every expected client plugin through the real confirmation sheet UI.
* Handles stacked plugins and multi-host arrivals in any order, then waits for the sheet to close.
*/
export async function approveClientPluginsInUi(
page: Page,
pluginIds: readonly string[],
): Promise<void> {
const remaining = [...pluginIds];
let previousKey: string | null = null;
while (remaining.length > 0) {
await expect(pluginApprovalSheet(page)).toBeVisible({ timeout: 30_000 });
const target = await waitForNextApprovalTarget(page, previousKey);
const matchedIndex = remaining.findIndex((id) => target.pluginText.includes(id));
if (matchedIndex === -1) {
throw new Error(
`Unexpected plugin execution prompt "${target.pluginText}" on "${target.hostText}"; expected one of: ${remaining.join(", ")}`,
);
}
remaining.splice(matchedIndex, 1);
previousKey = target.key;
await allowPluginExecution(page);
}
await expect(pluginApprovalSheet(page)).toHaveCount(0);
}
export async function getExecutedPluginMarkers(page: Page): Promise<string[]> {
return page.evaluate(() => {
const raw = (globalThis as { __paseoPluginExecutions?: unknown }).__paseoPluginExecutions;
return Array.isArray(raw) ? raw.filter((item): item is string => typeof item === "string") : [];
});
}
export async function expectExecutedPluginMarkers(
page: Page,
expected: readonly string[],
): Promise<void> {
await expect.poll(() => getExecutedPluginMarkers(page)).toEqual(expected);
}
export async function expectExecutedPluginMarkersContain(
page: Page,
marker: string,
): Promise<void> {
await expect.poll(() => getExecutedPluginMarkers(page)).toContain(marker);
}
export async function reloadKeepingPersistedState(page: Page): Promise<void> {
await page.evaluate(() => {
const nonce = localStorage.getItem("@paseo:e2e-seed-nonce");
if (!nonce) throw new Error("Expected e2e seed nonce before reload");
localStorage.setItem("@paseo:e2e-disable-default-seed-once", nonce);
});
await page.reload();
}
export async function ensureArtifactsDir(repoRoot: string): Promise<string> {
const dir = path.join(repoRoot, ".artifacts");
await mkdir(dir, { recursive: true });
return dir;
}
@@ -6,6 +6,7 @@ import { gotoAppShell } from "./app";
import { addConnectedHostAndReload } from "./hosts";
import { startIsolatedHostDaemon } from "./isolated-host-daemon";
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { pluginRequirements } from "./plugin-fixture";
const id = "host-clients";
@@ -98,6 +99,7 @@ export async function installHostClientsScenario(page: Page) {
await primary.patchDaemonConfig({ pluginsEnabled: true });
await primary.installDirectoryPlugin(directory);
await gotoAppShell(page);
await approveClientPluginsInUi(page, [id]);
await openHostClients(page);
await addConnectedHostAndReload(page, {
serverId: secondary.serverId,
@@ -12,6 +12,7 @@ import {
openProjectViaDaemon,
submitNewWorkspacePrompt,
} from "./new-workspace";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { copyPluginExample } from "./plugin-fixture";
import { getServerId } from "./server-id";
import { createTempGitRepo } from "./workspace";
@@ -147,6 +148,7 @@ export async function withNewWorkspaceIssuesExample(
const other = otherRepo ? await openProjectViaDaemon(client, otherRepo.path) : null;
let target = project;
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await waitForSidebarHydration(page);
await openNewWorkspaceComposer(page, project);
// The sidebar rows used to reach the screen exist only at desktop width.
@@ -6,6 +6,7 @@ import { gotoAppShell, openSettings } from "./app";
import { openModelPicker } from "./agent-profiles";
import { openAgentRoute } from "./mock-agent";
import { connectNewWorkspaceDaemonClient, openGlobalNewWorkspaceComposer } from "./new-workspace";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { copyPluginExample } from "./plugin-fixture";
import { seedWorkspace, type SeededWorkspace } from "./seed-client";
import { getServerId } from "./server-id";
@@ -15,7 +16,7 @@ const MODEL_LABEL = "Select model (Example 1)";
const WIDE = { width: 1400, height: 950 };
const COMPACT = { width: 390, height: 844 };
async function readIconPaths(page: Page, pluginDirectory: string): Promise<string[]> {
export async function readIconPaths(page: Page, pluginDirectory: string): Promise<string[]> {
const svg = await readFile(path.join(pluginDirectory, "icon.svg"), "utf8");
return page.evaluate(
(source) =>
@@ -33,7 +34,7 @@ function readIconDrawings(icons: SVGElement[]): string[][] {
);
}
async function expectProviderIcon(surface: Locator, paths: string[]): Promise<void> {
export async function expectProviderIcon(surface: Locator, paths: string[]): Promise<void> {
await expect(surface).toBeVisible();
// Provider icons are decorative SVGs without accessible names. Compare the
// plugin asset's drawing, allowing surface-specific size and theme colours.
@@ -76,6 +77,7 @@ export const test = base.extend<{ providerIcons: ProviderIconJourney }>({
try {
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["provider-direct-example"]);
const iconPaths = await readIconPaths(page, plugin.directory);
await provide({ page, testInfo, iconPaths, workspace });
} finally {
@@ -7,6 +7,7 @@ import { expect, type Page } from "../fixtures";
import { gotoAppShell } from "./app";
import { installDaemonWebSocketGate } from "./daemon-websocket-gate";
import { connectDaemonClient } from "./daemon-client-loader";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
const PLUGIN_ID = "retained-plugin-e2e";
@@ -76,6 +77,7 @@ async function createProbe(page: Page) {
async open() {
await page.setViewportSize({ width: 1100, height: 800 });
await gotoAppShell(page);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await page.getByRole("button", { name: "Reconnect probe", exact: true }).click();
await expect(page.getByText("Stored title: Agent monitor", { exact: true })).toBeVisible();
},
@@ -8,6 +8,7 @@ import { connectDaemonClient } from "./daemon-client-loader";
import { addConnectedHostAndReload } from "./hosts";
import { gotoAppShell, openSettings } from "./app";
import { openHostSection, selectSettingsHost } from "./settings";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { pluginRequirements } from "./plugin-fixture";
import {
backToPlugins,
@@ -108,9 +109,16 @@ export async function expectAppMismatch(page: Page) {
).toBeVisible();
}
export async function correctRequirementAndReload(page: Page, directory: string) {
export async function correctRequirementAndReload(
page: Page,
directory: string,
options?: { approvePrompt?: boolean },
) {
await writeRequirements(directory, pluginRequirements.paseo);
await reloadRequirementsPlugin(page);
if (options?.approvePrompt) {
await approveClientPluginsInUi(page, [PLUGIN_ID]);
}
await backToPlugins(page, PLUGIN_ID);
await expectPluginHealthy(page, PLUGIN_ID);
await expect(page.getByText(/Your app is/)).toHaveCount(0);
@@ -1,6 +1,7 @@
import { mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
import { expect, test as base, type Page } from "../fixtures";
import { gotoAppShell, openSettings } from "./app";
@@ -99,11 +100,13 @@ export const test = base.extend<{ settingsPlugin: SettingsClient }>({
export async function openDisplaySettings(page: Page) {
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["settings-example", TABBED_PLUGIN_ID]);
await openSettings(page);
await openSettingsExamplePage(page);
}
export async function openCompactDisplaySettings(page: Page) {
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["settings-example", TABBED_PLUGIN_ID]);
await openCompactSettings(page, new URL(page.url()).pathname);
await openSettingsExamplePage(page);
}
@@ -120,6 +123,7 @@ async function expectSettingsExampleScreen(page: Page) {
}
export async function openPluginsPage(page: Page) {
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["settings-example", TABBED_PLUGIN_ID]);
await openSettings(page);
await openHostSection(page, getServerId(), "plugins");
}
@@ -183,6 +187,7 @@ export async function expectSettingsTab(page: Page, title: "General" | "Advanced
}
export async function openTabbedSettingsLink(page: Page, title: "General" | "Advanced") {
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["settings-example", TABBED_PLUGIN_ID]);
await page.goto(`${pluginPageRoute(TABBED_PLUGIN_ID)}/${title.toLowerCase()}`);
await expectSettingsTab(page, title);
}
@@ -4,11 +4,16 @@ import path from "node:path";
import { expect, type Locator, type Page } from "@playwright/test";
import { openCommandCenter } from "./command-center";
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { pluginRequirements } from "./plugin-fixture";
export const SHOWCASE_PLUGIN_ID = "sidebar-showcase";
export const LEGACY_PLUGIN_ID = "legacy-sidebar";
export const BOTS_PLUGIN_ID = "sidebar-bots";
export async function approveSidebarPluginsInUi(page: Page): Promise<void> {
await approveClientPluginsInUi(page, [SHOWCASE_PLUGIN_ID, LEGACY_PLUGIN_ID, BOTS_PLUGIN_ID]);
}
export const WIDE = { width: 1440, height: 900 };
export const COMPACT = { width: 390, height: 844 };
@@ -2,6 +2,7 @@ import { mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import { expect, type Page, type TestInfo } from "@playwright/test";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
import { openAgentRoute, seedMockAgentWorkspace, type MockAgentWorkspace } from "./mock-agent";
@@ -110,7 +111,8 @@ export default function contribute(client) {
return () => {};
}`;
const PROMPT_PLUGIN_ID = "timeline-prompt-e2e";
export const PROMPT_PLUGIN_ID = "timeline-prompt-e2e";
export const POPOVER_PLUGIN_ID = "timeline-popover-e2e";
function promptClientSource(prompts?: readonly string[]): string {
return `import React from "react";
@@ -201,6 +203,7 @@ export async function withTimelinePlugin(
run: async () => {
try {
await openAgentRoute(page, agent);
await approveClientPluginsInUi(page, [PLUGIN_ID]);
await expect(
page.getByRole("textbox", { name: "Message agent..." }).first(),
).toBeVisible();
@@ -356,6 +359,7 @@ export async function viewInlineThinkingExample(page: Page, info: TestInfo): Pro
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(example.directory);
await openAgentRoute(page, agent);
await approveClientPluginsInUi(page, ["inline-thinking"]);
await expect(page.getByRole("textbox", { name: "Message agent..." }).first()).toBeVisible();
await requestPluginTimeline(agent);
const thought = page.getByText(/^Need to find the scroll container/);
@@ -423,6 +427,7 @@ export default function contribute(client) {
}`,
run: async () => {
await openAgentRoute(page, agent);
await approveClientPluginsInUi(page, ["timeline-local-ids"]);
await expect(page.getByRole("textbox", { name: "Message agent..." }).first()).toBeVisible();
await run();
},
@@ -6,6 +6,7 @@ import type { TestInfo, BrowserContext } from "@playwright/test";
import { expect, type Page } from "../fixtures";
import { gotoAppShell, openSettings } from "./app";
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { copyPluginExample } from "./plugin-fixture";
async function chooseChinese(page: Page) {
@@ -40,6 +41,7 @@ export async function verifyPluginTranslations(page: Page, info: TestInfo) {
await client.installDirectoryPlugin(example.directory);
await page.setViewportSize({ width: 1440, height: 1000 });
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["translation-notes"]);
await page.getByRole("button", { name: "Workspace notes", exact: true }).click();
await expect(page.getByText("App language: en", { exact: true })).toBeVisible();
await page
@@ -125,6 +127,7 @@ export async function verifyPluginToolTranslations(page: Page, info: TestInfo) {
await client.installDirectoryPlugin(example.directory);
await page.setViewportSize({ width: 1440, height: 1000 });
await gotoAppShell(page);
await approveClientPluginsInUi(page, ["translation-notes"]);
await page.goto(buildAgentRoute(workspace.workspaceId, agent.id));
const commandCenter = await openCommandCenter(page);
await commandCenter.getByTestId("command-center-input").fill("Show notes tools");
@@ -4,6 +4,7 @@ import type { DaemonClient as InternalDaemonClient } from "@getpaseo/client/inte
import { expect, test as base, type Page } from "../fixtures";
import { gotoAppShell, openSettings } from "./app";
import { connectDaemonClient } from "./daemon-client-loader";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
import { getServerId } from "./server-id";
import { leaveProviderDetail, openSettingsHostSection } from "./settings";
@@ -84,8 +85,14 @@ export const test = base.extend<{ providerUpdateFailure: ProviderUpdateFailure }
},
});
export async function openProviderInstallation(page: Page): Promise<void> {
export async function openProviderInstallation(
page: Page,
options?: { approvePlugin?: boolean },
): Promise<void> {
await gotoAppShell(page);
if (options?.approvePlugin) {
await approveClientPluginsInUi(page, [PLUGIN_ID]);
}
await openSettings(page);
await openSettingsHostSection(page, getServerId(), "providers");
await page
@@ -1,6 +1,7 @@
import { readFile, writeFile } from "node:fs/promises";
import path from "node:path";
import { expect, type Page } from "@playwright/test";
import { approveClientPluginsInUi } from "./plugin-execution-approval";
import { copyPluginExample } from "./plugin-fixture";
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
import { seedWorkspace } from "./seed-client";
@@ -33,6 +34,7 @@ export async function withSidebarViews(
await client.installDirectoryPlugin(example.directory);
await page.setViewportSize({ width: 1280, height: 900 });
await gotoWorkspace(page, workspace.workspaceId);
await approveClientPluginsInUi(page, ["sidebar-views"]);
await run(sidebarViews(page, workspace.workspaceId, client));
} finally {
await client.removePlugin("sidebar-views");
@@ -45,7 +45,10 @@ export async function requestStreamingMarkdown(agent: StreamingMarkdownAgent): P
export async function expectUnfinishedBold(page: Page): Promise<void> {
const message = page.getByTestId("assistant-message").last();
await expect(message.locator(".enrm-text")).toContainText("Bold");
const bold = message.locator("strong");
await expect(bold).toContainText("Bold");
await expect(bold).toHaveCSS("font-weight", "700");
await expect(message).not.toContainText("*");
await expect(message).not.toContainText("stays bold");
}
@@ -58,6 +61,7 @@ export async function expectUnfinishedLink(
await agent.stream.showThrough("**Bold text stays bold** and [Paseo docs");
await expect(message).toContainText("Paseo docs");
await expect(message.getByRole("link", { name: "Paseo docs" })).toHaveCount(0);
await expect(message).not.toContainText("[");
await expect(message).not.toContainText("https:");
await captureMarkdown(page, testInfo, "unfinished-link");
}
@@ -175,6 +175,22 @@ export async function reopenWithFreshnessCheckUnanswered(
await expect(page.getByRole("alert").filter({ hasText: "Updating messages" })).toBeVisible();
}
/** Reopens display-only history with the tail held until the app shows the outstanding update. */
export async function reopenWithTimelineTailUnanswered({
page,
gate,
agentId,
}: {
page: Page;
gate: DaemonWebSocketGate;
agentId: string;
}): Promise<void> {
gate.holdTimelineResponses(agentId);
await page.reload();
await gate.waitForHeldTimelineResponse();
await expect(page.getByRole("alert").filter({ hasText: "Updating messages" })).toBeVisible();
}
export async function answerFreshnessCheck(page: Page, gate: DaemonWebSocketGate): Promise<void> {
gate.releaseHeldClientRequest();
await expect(page.getByRole("alert").filter({ hasText: "Updating messages" })).toHaveCount(0);
@@ -324,6 +340,121 @@ export async function stopStreamingReply(agent: StreamingReplyAgent): Promise<st
return reply;
}
interface LoadingSurfaceRecord {
loaderText: string[];
spinnerYsByTestId: Record<string, number[]>;
}
declare global {
interface Window {
__loadingSurfaceRecord?: LoadingSurfaceRecord;
}
}
function recordLoadingSurfaces(): void {
const record: LoadingSurfaceRecord = {
loaderText: [],
spinnerYsByTestId: {},
};
window.__loadingSurfaceRecord = record;
const isVisible = (el: Element | null): el is HTMLElement => {
if (!(el instanceof HTMLElement)) return false;
const style = window.getComputedStyle(el);
if (style.display === "none" || style.visibility === "hidden" || style.opacity === "0") {
return false;
}
const rect = el.getBoundingClientRect();
return rect.width > 0 && rect.height > 0;
};
const sample = () => {
if (!document.body) return;
for (const testId of [
"workspace-loading",
"agent-loading",
"agent-history-overlay",
"agent-initial-fill",
]) {
const el = document.querySelector(`[data-testid="${testId}"]`);
if (!isVisible(el)) continue;
const text = (el.textContent ?? "").trim();
if (text.length > 0 && !record.loaderText.includes(text)) {
record.loaderText.push(text);
}
const spinner = el.querySelector('[role="progressbar"]');
if (spinner) {
const y = Math.round(spinner.getBoundingClientRect().y);
const list = record.spinnerYsByTestId[testId] ?? [];
if (!list.includes(y)) list.push(y);
record.spinnerYsByTestId[testId] = list;
}
}
};
const start = () => {
const observer = new MutationObserver(sample);
observer.observe(document.documentElement ?? document, {
childList: true,
subtree: true,
attributes: true,
characterData: true,
});
sample();
};
if (document.documentElement) start();
else document.addEventListener("DOMContentLoaded", start, { once: true });
}
/** Records loading text, spinner Y positions, and any Updating messages toast from first paint. */
export async function watchColdAndReloadLoadingSurfaces(page: Page): Promise<void> {
await page.addInitScript(recordLoadingSurfaces);
await page.addInitScript(recordUpdatingToastTiming);
}
/** Checks loading geometry and verifies the toast waits for a slow daemon reply. */
export async function expectCleanLoadingSurfaces(
page: Page,
gate: DaemonWebSocketGate,
before: TimelineRequestCounts,
): Promise<void> {
await gate.waitForServerMessage(TIMELINE_RESPONSE, before.fetches + 1);
await expect(page.getByRole("alert").filter({ hasText: "Updating messages" })).toHaveCount(0);
await expectToastWaitedForTheDaemon(page);
const record = await page.evaluate(() => window.__loadingSurfaceRecord as LoadingSurfaceRecord);
expect(record.loaderText, "loading states must not render visible text").toEqual([]);
for (const [testId, ys] of Object.entries(record.spinnerYsByTestId)) {
expect(
ys.length,
`${testId} spinner shifted vertically (${ys.join(", ")})`,
).toBeLessThanOrEqual(1);
}
expect(
gate.getTimelineRequestCount("after", before.agentId) - before.after,
"initial tail load must not trigger a redundant after catch-up",
).toBe(0);
}
/** Waits until the persisted replica cache drops coverage to a display-only snapshot. */
export async function waitForDisplayOnlyTimelineCache(
page: Page,
agent: LongTimelineAgent,
): Promise<void> {
await expect
.poll(
async () => {
const cache = await readReplicaCache(page);
const timeline = cache?.hosts
?.flatMap((host) => host.timelines)
.find((entry) => entry.agentId === agent.agentId);
return timeline?.items ? { items: timeline.items.length, range: timeline.range } : null;
},
{ timeout: 15_000 },
)
.toMatchObject({ range: null });
}
export async function expectPromptAndWholeReply(
page: Page,
agent: StreamingReplyAgent,
+3
View File
@@ -14,5 +14,8 @@ import { renderRootComponent } from "expo-router/build/renderRootComponent";
import { startWatchdog } from "./src/watchdog";
import { RootApp } from "./src/root-app";
import { sweepOrphanedWorkspaceDrafts } from "./src/workspace-tabs/sweep-orphaned-drafts";
startWatchdog();
void sweepOrphanedWorkspaceDrafts();
renderRootComponent(RootApp);
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/app",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"private": true,
"main": "index.ts",
"scripts": {
@@ -41,7 +41,7 @@
"dev:ios": "npm --prefix ../.. run build:client && cross-env APP_VARIANT=development expo run:ios",
"build:apk": "npm --prefix ../.. run build:apk",
"build:apk:arm64": "npm --prefix ../.. run build:apk:arm64",
"test:android": "expo prebuild --platform android --no-install && cd android && ./gradlew :paseo-native-trace:testReleaseUnitTest :paseo-hardware-keyboard:testReleaseUnitTest :react-native-enriched-markdown:testReleaseUnitTest --tests '*InlineCodeFormattingTest' --tests '*ListRenderingTest' --tests '*TaskListInteractionTest' --tests '*ListBlockquoteMeasurementTest' --tests '*BlockquoteCopyTest' --tests '*CodeBlockCopyButtonConstructionTest' --tests '*LongPressSelectionInterceptTest' --no-daemon --max-workers=2 -Dorg.gradle.parallel=false"
"test:android": "expo prebuild --platform android --no-install && cd android && ./gradlew :paseo-native-trace:testReleaseUnitTest :paseo-hardware-keyboard:testReleaseUnitTest :expo-modules-core:testReleaseUnitTest --tests expo.modules.kotlin.activityresult.AppContextActivityResultRegistryRecreationTest :react-native-enriched-markdown:testReleaseUnitTest --tests '*InlineCodeFormattingTest' --tests '*ListRenderingTest' --tests '*TaskListInteractionTest' --tests '*ListBlockquoteMeasurementTest' --tests '*BlockquoteCopyTest' --tests '*CodeBlockCopyButtonConstructionTest' --tests '*LongPressSelectionInterceptTest' --no-daemon --max-workers=2 -Dorg.gradle.parallel=false"
},
"dependencies": {
"@codemirror/commands": "6.10.4",
+12 -4
View File
@@ -3,16 +3,19 @@ import { Text, View } from "react-native";
import { StyleSheet } from "react-native-unistyles";
import { Folder, FolderPlus, Plus } from "lucide-react-native";
import { AdaptiveModalSheet, type SheetKeyboard } from "@/components/adaptive-modal-sheet";
import { HostStatusDot } from "@/components/host-status-dot";
import { HostPicker } from "@/components/hosts/host-picker";
import { GitHubIcon } from "@/components/icons/github-icon";
import { Button } from "@/components/ui/button";
import { SegmentedControl, type SegmentedControlOption } from "@/components/ui/segmented-control";
import { useIsCompactFormFactor } from "@/constants/layout";
import { useAddHost } from "@/hosts/add-host";
import { HostStatusIcon } from "@/hosts/host-status-icon";
import { useHardwareKeyboardPresent, type KeyboardInputEvent } from "@/keyboard";
import { Shortcut } from "@/components/ui/shortcut";
import { FieldTrigger } from "@/screens/new-workspace/form/field-trigger";
import {
FieldTrigger,
type FieldTriggerInteractionState,
} from "@/screens/new-workspace/form/field-trigger";
import {
useAddProjectFlowStore,
type AddProjectFlowRequest,
@@ -362,7 +365,12 @@ function HostPill({
const [open, setOpen] = useState(false);
const openPicker = useCallback(() => setOpen(true), []);
const label = hosts.find((host) => host.serverId === hostId)?.label ?? hostId;
const icon = useMemo(() => <HostStatusDot serverId={hostId} />, [hostId]);
const renderIcon = useCallback(
({ backdrop }: FieldTriggerInteractionState) => (
<HostStatusIcon serverId={hostId} size="sm" backdrop={backdrop} />
),
[hostId],
);
return (
<HostPicker
hosts={hosts}
@@ -383,7 +391,7 @@ function HostPill({
label="Host"
accessibilityLabel="Project host"
tooltip="Host"
icon={icon}
icon={renderIcon}
value={label}
onPress={openPicker}
disabled={disabled}
@@ -1,7 +1,7 @@
import { useMemo } from "react";
import { useFetchQuery } from "@/data/query";
import { useDebouncedValue } from "@/hooks/use-debounced-value";
import { useHostRuntimeClient } from "@/runtime/host-runtime";
import { useHostRuntimeClient, useHostRuntimeIsConnected } from "@/runtime/host-runtime";
import type { GithubRepositoryChoice } from "./model";
import { resolveSearch, type SearchResult } from "./search-result";
@@ -19,8 +19,9 @@ export function useDirectorySearch(input: {
}): SearchResult<string> {
const { hostId } = input;
const client = useHostRuntimeClient(hostId ?? "");
const isConnected = useHostRuntimeIsConnected(hostId ?? "");
const debouncedQuery = useDebouncedValue(input.query, SEARCH_DEBOUNCE_MS);
const enabled = Boolean(client && input.enabled);
const enabled = Boolean(client && isConnected && input.enabled);
const search = useFetchQuery({
queryKey: ["add-project-flow-directories", hostId, debouncedQuery],
queryFn: async () => {
@@ -64,8 +65,9 @@ export function useGithubRepositorySearch(input: {
}): SearchResult<GithubRepositoryChoice> {
const { hostId } = input;
const client = useHostRuntimeClient(hostId ?? "");
const isConnected = useHostRuntimeIsConnected(hostId ?? "");
const debouncedQuery = useDebouncedValue(input.query, SEARCH_DEBOUNCE_MS);
const enabled = Boolean(client && input.enabled);
const enabled = Boolean(client && isConnected && input.enabled);
const search = useFetchQuery({
queryKey: ["add-project-flow-github", hostId, debouncedQuery],
queryFn: async () => {
+1
View File
@@ -2,6 +2,7 @@ import { useActivatedStore } from "@/sync";
import { createAgentQueueModel, type AgentQueueModel, type AgentQueueSnapshot } from "./model";
export type { AgentQueueModel, AgentQueueSnapshot } from "./model";
export { optimisticEnqueueAgentMessage } from "./overlays";
/** Observes one agent's queue while the caller is mounted in a visible panel. */
export function useAgentQueue(
@@ -101,14 +101,47 @@ test("marks a row busy while it is withdrawn, then hides it ahead of the host up
test("hides a withdrawn row even when an older update overtakes the answer", async () => {
const { daemon, model, rowIds } = await observeQueue();
daemon.holdCommands();
const result = model.withdraw("a");
await daemon.publish("agent", queueOf("a", "b", "c"));
daemon.releaseCommands();
await result;
await daemon.settle();
expect(rowIds()).toEqual(["b", "c"]);
});
test("optimistic cancel hides the row immediately and restores it if the host refuses", async () => {
const { daemon, model, rowIds } = await observeQueue();
daemon.holdCommands();
const pending = model.withdraw("a", { optimistic: true });
expect(rowIds()).toEqual(["b"]);
daemon.refuseWithdrawals("already_dispatching");
daemon.releaseCommands();
expect(await pending).toEqual({ withdrawn: false, reason: "already_dispatching" });
expect(rowIds()).toEqual(["a", "b"]);
});
test("optimistic promote marks the row dispatching, clears held, and rolls back if refused", async () => {
const { daemon, model } = await observeQueue({
held: true,
items: [queuedItem("a", { held: true }), queuedItem("b", { seq: 2, held: true })],
});
daemon.holdCommands();
const pending = model.promote("b", "interrupt");
expect(model.getSnapshot().held).toBe(false);
expect(model.getSnapshot().items.find((item) => item.id === "b")?.state).toBe("dispatching");
daemon.refusePromotions("already_dispatching");
daemon.releaseCommands();
expect(await pending).toEqual({ promoted: false, reason: "already_dispatching" });
expect(model.getSnapshot().held).toBe(true);
expect(model.getSnapshot().items.find((item) => item.id === "b")?.state).toBe("queued");
});
test("keeps the row when the host already started sending it", async () => {
const { daemon, model, rowIds } = await observeQueue();
daemon.refuseWithdrawals("already_dispatching");

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