Compare commits

..
Author SHA1 Message Date
Mohamed Boudra afb8634dc3 chore(release): cut 0.17.6 2026-11-27 03:11:49 +01:00
Mohamed Boudra 0baecb2e0a docs: prepare v0.17.6 changelog 2026-11-27 03:01:01 +01:00
lukeandRoundRedDot 3fcb4524bb fix(antigravity): remove the account usage source
The usage source ran `agy -p /usage` in the background on behalf of the
user. Google's Antigravity FAQ says headless mode is intended for direct
scripting and CI, and that wrapping agy inside third-party applications is
not supported on consumer plans and can lead to account suspension. A
maintainer reply in google-antigravity/antigravity-cli#1493 confirms that
driving `agy -p` from a third-party harness breaches the terms, with no
exception for personal use.

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

Co-authored-by: RoundRedDot <roundreddot@gmail.com>
2026-11-27 03:00:25 +01:00
paseo-bot[bot] edd526561f Fix two model picker bugs that lost a click or an Enter (#10962)
* fix(app): keep a pressed model row under the pointer

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

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

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

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

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

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit e6f0ad272d)
2026-11-27 02:56:07 +01:00
Mohamed Boudra 2f54a1d750 fix(markdown): set HeaderCopyButton contentDescription without overriding View getter
Fixes #10934 and #10968. Removes the HeaderCopyButton.getContentDescription() override completely so AppCompatImageButton.<init> (and Samsung One UI's View.semSetHoverPopupType) never dispatches into uninitialized subclass fields, and sets View.contentDescription directly with recursive sync on copyLabel updates.

(cherry picked from commit a3389a063d)
2026-11-27 02:25:58 +01:00
paseo-bot[bot] 12ae5f537b fix(android): let a mouse click select model picker rows (#10972)
On Android, a mouse sends a click as DOWN, BUTTON_PRESS, BUTTON_RELEASE and UP.
Gesture handler's Tap ignores DOWN and UP from a mouse and waits for the BUTTON
events. Android delivers those through dispatchGenericMotionEvent, and
RNGestureHandlerRootView forwarded only hover events from there. A mouse click
on a Gesture.Tap row, such as a provider or model row in the wide model
picker, never fired.

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

Fixes #10744

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

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

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

Fixes #10206

Co-authored-by: Gtio <gtoxlili@outlook.com>
(cherry picked from commit 74c33b03d3)
2026-11-27 02:18:25 +01:00
Mohamed Boudra 5bbc180cfe Reorganize Settings by device vs. host scope and consolidate sparse sections (#10933)
* feat(app): split client and host settings and consolidate sections

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

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

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

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

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

* test(desktop): update Settings destination labels in memory regression check

(cherry picked from commit e4dc119df8)
2026-11-27 02:18:25 +01:00
paseo-bot[bot] 557d2e596d fix(server): keep worktree ownership inside the configured worktrees root (#10878)
When a worktree directory is gone, the marker search walks up from its
path and stops at the first Paseo worktree above it. If the daemon home
lives inside another Paseo worktree, that search found the enclosing
worktree and reported it as the owner. Legacy restore then ran
`git worktree add` on the enclosing path and failed with "already
exists", and deleting the missing worktree removed the enclosing one.

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

Closes #10745

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 4201a4de35)
2026-11-27 02:14:58 +01:00
Mohamed Boudra f2102d0c2a Eliminate flashes and show unarchiving state when restoring archived workspaces and agents (#10928)
* fix(workspace): eliminate flashes and show unarchiving state on restore

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

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

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

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

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

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

With positive directory membership in AgentUpdatesService, filtered agent subscriptions only emit remove when an agent that was previously included leaves the filter.

(cherry picked from commit 2be71aedcb)
2026-11-27 02:14:58 +01:00
Mohamed Boudra 186899e66f Navigate models, providers, and profiles with arrow keys in the model picker (#10929)
* feat(app): support arrow-key navigation in the model picker

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

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

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

* fix(app): share FlatList scroll reveal and honor native hardware keyboards

(cherry picked from commit a27f0819c8)
2026-11-27 02:14:58 +01:00
Mohamed Boudra 7d14347282 Stop background git fetch from spawning D-Bus daemons and hammering failing auth (#10921)
* fix(server): guard headless D-Bus autolaunch and pause background fetch on auth failure

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

* fix(server): handle in-flight fetch overlap, origin removal, and setup races

(cherry picked from commit 46eb98d604)
2026-11-27 02:14:58 +01:00
Mohamed Boudra 89b0f85c8c fix(linux): strip AppImage runtime environment from shells and child processes (#10920)
* fix(linux): strip AppImage runtime env from shells and child processes

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

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

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

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

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

Drop the duplicate re-export from @getpaseo/server/daemon-control and run the platform-parameterized config-environment AppImage tests on all OSes.

(cherry picked from commit 7d3e045ff8)
2026-11-27 02:14:58 +01:00
Mohamed Boudra 3fc2ef4469 test(e2e): settle Tailscale toggles and flush slowed socket queues (#10918)
In pair-device-relay.spec.ts, slowConnectionToHost left delayed WebSocket frames in its queue after restoreSpeed() ran, and disableTailscale returned once the Tailscale listener closed before the browser received daemon.tailscale.set.response. Under CI load, enableTailscale could run while the prior change was still in flight.

Wait for the Tailscale switch to return to the enabled state in enableTailscale and disableTailscale, flush queued WebSocket frames when restoring speed, and verify slow-connection off-then-on toggling in pair-device-relay.spec.ts. (PR #10903 already disabled the Tailscale switch in app code while a toggle is pending.)

(cherry picked from commit 20b70e37e7)
2026-11-27 02:14:58 +01:00
LiebeLee bf41c28a5e fix(timeline): recover from rewind epoch changes instead of dropping rows (#8794)
A rewind mints a new timeline epoch on the daemon. A client that misses the
agent.timeline.replacement invalidation then sees every subsequent live row in
the new epoch, and the sequencing gate dropped those rows with no recovery: the
chat stayed on pre-rewind history forever while the new epoch streamed.

Treat an epoch mismatch on a live row like a sequence gap. The app asks for
catch-up from its own cursor, the daemon answers a stale-epoch request with a
reset tail, and the existing destructive replacement installs current history.
The seq 1 fast path stays as is.

(cherry picked from commit fcac35d3b9)
2026-11-27 02:14:58 +01:00
Mohamed Boudra 2428a8c232 Refresh Tailscale availability in place (#10903)
* feat(devices): add Refresh button for Tailscale availability

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

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

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

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

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

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

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

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

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

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

Matches #10808: headless WebKit on CI paints slowly, so the code review scene missed its 10s wall-clock timeout under the 64ms/frame cap. Use openHomepageWithSceneClock, page.clock.runFor, and finishPanelSwap like the sibling scene tests.

(cherry picked from commit 2636c4384f)
2026-11-27 02:14:57 +01:00
paseo-bot[bot] 64b8861a9f Give the Windows untrusted worktrunk test the journey's 90 second budget (#10900)
The test starts the daemon twice, archives four times, and restores twice.
On Windows CI it took 18 to 46 seconds on green main runs and timed out at
60 seconds on main run 45734061560, where every test in the file ran about
twice as slow.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
(cherry picked from commit a7dbeadd5f)
2026-11-27 02:14:57 +01:00
Mohamed Boudra ccd9f0a436 fix(desktop): avoid macOS Dock progress bar freeze and harden release smoke 2026-11-26 15:29:16 +01:00
Mohamed Boudra 713b6dbbfe chore(release): cut 0.17.5 2026-11-26 07:42:07 +01:00
Mohamed Boudra 32c3805aad docs: prepare v0.17.5 changelog 2026-11-26 07:36:24 +01:00
1061 changed files with 16573 additions and 106607 deletions
+2 -7
View File
@@ -1,6 +1,6 @@
# Pull-request checks are routed by the behavior they prove. Package consumers
# do not inherit their dependencies' test suites, except where noted below; main
# and manual runs execute every contract regardless of these paths.
# do not inherit their dependencies' test suites; main and manual runs execute
# every contract regardless of these paths.
routing:
- ".github/ci-paths.yml"
@@ -60,7 +60,6 @@ sdk:
- "packages/client/**"
- "packages/highlight/**"
- "packages/protocol/**"
- "packages/workflows/**"
browser:
- "packages/server/src/server/agent/provider-snapshot-manager.ts"
@@ -88,9 +87,5 @@ browser:
relay:
- "packages/relay/**"
# cli-tests is also a daemon end-to-end suite: it drives a real daemon, built-in
# plugins included, so daemon changes run it too.
cli:
- "packages/cli/**"
- "packages/server/**"
- "plugins/**"
+5 -26
View File
@@ -8,14 +8,13 @@ on:
merge_group:
workflow_dispatch:
# A newer push cancels the run still in progress on every ref except main,
# because a full run costs about 200 runner-minutes against the org's 20
# concurrent jobs. A main run finishes: cancelling it mid-flight leaves CANCELLED
# checks that paint the commit red. Each ref has one run in progress and one
# pending, so a newer push replaces a pending main run before it starts any job.
# A newer push to the same ref cancels the run still in progress, main included.
# A full run costs about 200 runner-minutes against the org's 20 concurrent
# jobs, and a superseded main run only answers a question the newer commit
# answers again.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
cancel-in-progress: true
env:
# CI does not use the CUDA execution provider, and the onnxruntime-node
@@ -128,14 +127,6 @@ jobs:
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.sdk != 'false') }}
run: npm run test --workspace=@getpaseo/highlight
- name: Build workflows package
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.sdk != 'false') }}
run: npm run build:workflows
- name: Run workflows tests
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.sdk != 'false') }}
run: npm run test --workspace=@getpaseo/workflows
- name: Typecheck client examples
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.sdk != 'false') }}
run: npm run typecheck:examples --workspace=@getpaseo/client
@@ -183,9 +174,6 @@ jobs:
- name: Verify dependency patch recovery
run: node --test scripts/postinstall-patches.test.mjs
- name: Verify daemon runtime trace contract
run: node --test scripts/trace-daemon.test.mjs
- name: Build server stack
run: npm run build:server
@@ -225,15 +213,6 @@ jobs:
- name: Verify website mockups
run: npm run test:e2e --workspace=@getpaseo/website
- name: Upload website test artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: website-playwright-results
path: packages/website/test-results/
if-no-files-found: ignore
retention-days: 7
- name: Verify public package contents
run: |
npm pack --dry-run --ignore-scripts --workspace=@getpaseo/protocol
+1 -3
View File
@@ -13,11 +13,9 @@ on:
- ".github/workflows/desktop-packages.yml"
workflow_dispatch:
# A main run finishes. A run cancelled mid-flight leaves CANCELLED checks that
# paint the commit red.
concurrency:
group: desktop-packages-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
cancel-in-progress: true
permissions:
contents: read
+1 -3
View File
@@ -28,11 +28,9 @@ on:
- "false"
- "true"
# main, tag and publish runs finish. A run cancelled mid-flight leaves CANCELLED
# checks that paint a main commit red.
concurrency:
group: docker-${{ github.workflow }}-${{ github.event_name == 'workflow_dispatch' && inputs.publish == 'true' && format('publish-{0}', inputs.paseo_version || github.run_id) || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') && !(github.event_name == 'workflow_dispatch' && inputs.publish == 'true') }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') && !(github.event_name == 'workflow_dispatch' && inputs.publish == 'true') }}
env:
REGISTRY: ghcr.io
-30
View File
@@ -3,37 +3,8 @@ name: Nix
on:
push:
branches: [main]
# Prove the real Nix package and daemon smoke before merge when Nix, CLI,
# server, or daemon packaging inputs change.
pull_request:
paths:
- "nix/**"
- "flake.nix"
- "flake.lock"
- "package.json"
- "package-lock.json"
- "packages/protocol/**"
- "packages/client/**"
- "packages/highlight/**"
- "packages/plugin/**"
- "packages/server/**"
- "packages/relay/**"
- "packages/cli/**"
- "packages/desktop/**"
- "plugins/**"
- "skills/**"
- "scripts/trace-daemon.mjs"
- "scripts/is-main-module.mjs"
- "scripts/build-daemon-web-ui.mjs"
- "scripts/update-nix.sh"
- "scripts/fix-lockfile.mjs"
- ".github/workflows/nix.yml"
workflow_dispatch:
concurrency:
group: nix-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
@@ -131,7 +102,6 @@ jobs:
run: nix build .#desktop -o result-desktop
build-desktop-darwin:
if: ${{ github.event_name != 'pull_request' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
-1
View File
@@ -86,7 +86,6 @@ packages/server/src/server/fixtures/dictation/dictation-debug-largest.wav
packages/server/src/server/fixtures/dictation/dictation-debug-largest.transcript.txt
packages/protocol/src/generated/validation/*.aot.ts
packages/protocol/src/generated/validation/ws-outbound-schema-metadata.ts
packages/protocol/src/generated/validation/message-defaults.ts
packages/protocol/codegen/generated/
/artifacts
-1
View File
@@ -15,7 +15,6 @@
"*.lock",
"**/*.gen.ts",
"**/*.gen.tsx",
"**/*.icon/**",
"packages/react-native-enriched-markdown/**"
]
}
-44
View File
@@ -1,49 +1,5 @@
# Changelog
## 0.18.1 - 2026-11-27
- **Host metadata instructions:** Set host-wide instructions once to guide language, tone, and formatting for generated workspace titles, branch names, commit messages, and pull requests. ([#11064](https://github.com/getpaseo/paseo/pull/11064))
- **Enterprise spending usage:** Usage now shows Claude extra-usage spending and Codex individual spending limits with reset times. ([#8976](https://github.com/getpaseo/paseo/pull/8976) by [@mcowger](https://github.com/mcowger), [@JasprW](https://github.com/JasprW))
### Fixed
- Fixed Android agent push notifications arriving minutes late during Doze ([#8501](https://github.com/getpaseo/paseo/pull/8501) by [@truelecter](https://github.com/truelecter))
- Fixed Command Center results reordering mid-word while typing ([#11085](https://github.com/getpaseo/paseo/pull/11085))
- Fixed composer slash and `@` autocomplete stopping after closing a web overlay or opening while a prompt submits ([#11041](https://github.com/getpaseo/paseo/pull/11041))
- Fixed the Starting ref popover in New Workspace jumping in height and shifting rows on first open ([#11042](https://github.com/getpaseo/paseo/pull/11042))
- Fixed the iOS Home Screen web app status bar overlapping focus-mode tabs, the overlay sidebar, and the Mermaid fullscreen viewer on wide layouts ([#9970](https://github.com/getpaseo/paseo/pull/9970) by [@mywaffles](https://github.com/mywaffles))
- Fixed Mark as read on a workspace not clearing finished terminal attention ([#11040](https://github.com/getpaseo/paseo/pull/11040))
- Fixed GitLab merge request checks and pipeline details failing with 404 when the pipeline runs in a fork project ([#11074](https://github.com/getpaseo/paseo/pull/11074))
- Fixed messages sent while Pi runs a turn it started itself failing instead of queuing ([#11077](https://github.com/getpaseo/paseo/pull/11077))
- Fixed OpenCode v2 tool approvals staying stuck after OpenCode already dropped the request ([#11061](https://github.com/getpaseo/paseo/pull/11061) by [@rhettjay](https://github.com/rhettjay))
- Fixed idle cleanup keeping OpenCode v2 chats in memory while another session runs on the shared server ([#11039](https://github.com/getpaseo/paseo/pull/11039))
- Fixed idle ACP agents failing permanently after their process exits instead of reopening on the next message ([#11047](https://github.com/getpaseo/paseo/pull/11047))
- Fixed Kimi usage failing or showing an expired login for global `kimi.ai` accounts ([#8505](https://github.com/getpaseo/paseo/pull/8505) by [@benthecarman](https://github.com/benthecarman))
- Fixed the Z.ai Usage card missing when GLM Agent is signed in via `Z_AI_API_KEY` or its credentials file ([#8376](https://github.com/getpaseo/paseo/pull/8376) by [@Peanut-HZM](https://github.com/Peanut-HZM))
### Plugins
- Added OMP tool-call intent to `item.metadata.intent` for timeline plugins ([#10727](https://github.com/getpaseo/paseo/pull/10727) by [@mcowger](https://github.com/mcowger))
## 0.18.0 - 2026-11-27
- **Remote workspace browser proxy:** Desktop browser tabs in remote workspaces now route through the workspace daemon, so remote `localhost` servers open directly in Paseo. ([#10944](https://github.com/getpaseo/paseo/pull/10944) by [@airon-assustadus](https://github.com/airon-assustadus))
- **Per-device notification preferences:** Each device can choose which agent, terminal, and plugin events send notifications, and plugins can send notifications and handle taps. ([#10888](https://github.com/getpaseo/paseo/pull/10888))
- **Agent profile system prompts:** Save an optional system prompt on an agent profile to apply it to new agents started from that profile. ([#10996](https://github.com/getpaseo/paseo/pull/10996))
- **More syntax highlighting:** Syntax highlighting now covers diff and patch files along with Ruby, Kotlin, TOML, SQL, Lua, Protobuf, PowerShell, Groovy, Gradle, Scala, CMake, Properties, INI, R, Perl, and LaTeX. ([#11026](https://github.com/getpaseo/paseo/pull/11026) by [@hmalaspina](https://github.com/hmalaspina), [@kukicola](https://github.com/kukicola), [@MaximeConan](https://github.com/MaximeConan), [@singleton11](https://github.com/singleton11), [@chandlerok](https://github.com/chandlerok))
### Changed
- Changed ACP providers to cache model catalogs across daemon restarts instead of probing in the background, and cleaned up Antigravity ACP flags and metadata. Requires [Antigravity CLI 1.5.1 or later](https://paseo.sh/docs/supported-providers/antigravity) ([#10992](https://github.com/getpaseo/paseo/pull/10992))
### Fixed
- Fixed Paseo iOS crashing shortly after connecting when an enabled client plugin imports `react-native` ([#11011](https://github.com/getpaseo/paseo/pull/11011))
- Fixed OpenCode v2 agents staying stuck in running after Stop when stream events were missed or chat history was large ([#10955](https://github.com/getpaseo/paseo/pull/10955))
- Fixed steering a Pi agent during a run it started on its own aborting the run instead of steering it ([#10977](https://github.com/getpaseo/paseo/pull/10977) by [@viiqswim](https://github.com/viiqswim))
- Fixed creating a workspace from a pull request in a fork clone checking out the fork's pull request with the same number ([#10987](https://github.com/getpaseo/paseo/pull/10987))
- Fixed dropping images or files onto the composer leaving the input unfocused ([#11022](https://github.com/getpaseo/paseo/pull/11022))
## 0.17.6 - 2026-11-27
### Improved
-44
View File
@@ -1,49 +1,5 @@
# Changelog
## 0.18.1 - 2026-11-27
- **主机元数据指令**:设置一次主机级指令,即可统一控制自动生成的工作区标题、分支名、提交信息和 PR 的语言、语气与格式。([#11064](https://github.com/getpaseo/paseo/pull/11064))
- **企业消费用量**:使用情况现已显示 Claude 额外消费用量以及 Codex 个人消费限额和重置时间。([#8976](https://github.com/getpaseo/paseo/pull/8976),贡献者:[@mcowger](https://github.com/mcowger), [@JasprW](https://github.com/JasprW))
### 修复
- 修复 Android 在 Doze 休眠模式下 Agent 推送通知延迟数分钟送达的问题 ([#8501](https://github.com/getpaseo/paseo/pull/8501),贡献者:[@truelecter](https://github.com/truelecter))
- 修复在命令中心输入时结果顺序在单词输入中途跳动的问题 ([#11085](https://github.com/getpaseo/paseo/pull/11085))
- 修复关闭网页浮层后 Composer 的斜杠与 `@` 自动补全失效,以及提交提示词时自动补全弹出的问题 ([#11041](https://github.com/getpaseo/paseo/pull/11041))
- 修复在“新建工作区”中首次打开“起始 ref”浮层时高度跳动和行位偏移的问题 ([#11042](https://github.com/getpaseo/paseo/pull/11042))
- 修复宽屏布局下 iOS 主屏幕网页应用的状态栏遮挡专注模式标签栏、覆盖侧边栏和 Mermaid 全屏查看器的问题 ([#9970](https://github.com/getpaseo/paseo/pull/9970),贡献者:[@mywaffles](https://github.com/mywaffles))
- 修复将工作区标记为已读时未清除已完成终端提醒的问题 ([#11040](https://github.com/getpaseo/paseo/pull/11040))
- 修复 GitLab 合并请求的流水线运行在 fork 项目中时,检查状态和流水线详情返回 404 的问题 ([#11074](https://github.com/getpaseo/paseo/pull/11074))
- 修复 Pi 运行其自行启动的轮次时发送的消息直接失败而不是排队的问题 ([#11077](https://github.com/getpaseo/paseo/pull/11077))
- 修复 OpenCode v2 已丢弃工具审批请求后,审批卡片仍一直卡住的问题 ([#11061](https://github.com/getpaseo/paseo/pull/11061),贡献者:[@rhettjay](https://github.com/rhettjay))
- 修复共享服务器上运行其他会话时,空闲清理不会卸载闲置 OpenCode v2 对话的问题 ([#11039](https://github.com/getpaseo/paseo/pull/11039))
- 修复空闲 ACP Agent 的进程意外退出后永久失败,而不是在下一条消息时重新打开会话的问题 ([#11047](https://github.com/getpaseo/paseo/pull/11047))
- 修复使用全局 `kimi.ai` 账号登录时 Kimi 用量加载失败或显示登录已过期的问题 ([#8505](https://github.com/getpaseo/paseo/pull/8505),贡献者:[@benthecarman](https://github.com/benthecarman))
- 修复通过 `Z_AI_API_KEY` 或凭据文件登录 GLM Agent 时缺少 Z.ai 使用情况卡片的问题 ([#8376](https://github.com/getpaseo/paseo/pull/8376),贡献者:[@Peanut-HZM](https://github.com/Peanut-HZM))
### 插件
- 为时间线插件在 `item.metadata.intent` 中新增 OMP 工具调用意图 ([#10727](https://github.com/getpaseo/paseo/pull/10727),贡献者:[@mcowger](https://github.com/mcowger))
## 0.18.0 - 2026-11-27
- **远程工作区浏览器代理**:远程工作区中的桌面端浏览器标签页现在会通过该工作区的 daemon 转发流量,远程 `localhost` 服务可以直接在 Paseo 中打开。([#10944](https://github.com/getpaseo/paseo/pull/10944),贡献者:[@airon-assustadus](https://github.com/airon-assustadus))
- **按设备配置通知偏好**:每台设备都可以分别选择哪些 Agent、终端和插件事件发送通知,插件现在也可以发送通知并处理点击。([#10888](https://github.com/getpaseo/paseo/pull/10888))
- **智能体配置文件系统提示词**:在智能体配置文件中保存可选的系统提示词,以便在通过该配置启动新 Agent 时应用。([#10996](https://github.com/getpaseo/paseo/pull/10996))
- **更多语法高亮语言**:语法高亮现已支持 diff 和 patch 文件,以及 Ruby、Kotlin、TOML、SQL、Lua、Protobuf、PowerShell、Groovy、Gradle、Scala、CMake、Properties、INI、R、Perl 和 LaTeX。([#11026](https://github.com/getpaseo/paseo/pull/11026),贡献者:[@hmalaspina](https://github.com/hmalaspina), [@kukicola](https://github.com/kukicola), [@MaximeConan](https://github.com/MaximeConan), [@singleton11](https://github.com/singleton11), [@chandlerok](https://github.com/chandlerok))
### 变更
- ACP Provider 现在会在 daemon 重启间将已发现的模型目录缓存到磁盘,不再在后台轮询,同时清理了多余的 Antigravity ACP 参数和元数据。需要 [Antigravity CLI 1.5.1 或更高版本](https://paseo.sh/zh-CN/docs/supported-providers/antigravity) ([#10992](https://github.com/getpaseo/paseo/pull/10992))
### 修复
- 修复已启用的客户端插件导入 `react-native` 时,Paseo iOS 在连接后不久崩溃的问题 ([#11011](https://github.com/getpaseo/paseo/pull/11011))
- 修复流事件丢失或对话历史较大时,OpenCode v2 Agent 在点击停止后仍停留在运行中的问题 ([#10955](https://github.com/getpaseo/paseo/pull/10955))
- 修复在 Pi Agent 运行其自行启动的轮次时发送引导消息会中止该轮次而不是引导它的问题 ([#10977](https://github.com/getpaseo/paseo/pull/10977),贡献者:[@viiqswim](https://github.com/viiqswim))
- 修复在 fork 克隆中根据 PR 创建工作区时,检出到 fork 中同编号 PR 的问题 ([#10987](https://github.com/getpaseo/paseo/pull/10987))
- 修复向 Composer 拖放图片或文件后输入框未获得焦点的问题 ([#11022](https://github.com/getpaseo/paseo/pull/11022))
## 0.17.6 - 2026-11-27
### 改进
+3 -3
View File
@@ -57,9 +57,9 @@
<!-- Sponsors: one cell per sponsor in the order of packages/website/src/data/sponsors.ts, then "become a sponsor" cells up to three. -->
<table>
<tr 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>
<tr>
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="40"></picture></a><br><sub>Cloud coding agents</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Paseo のスポンサーになる</a></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Paseo のスポンサーになる</a></td>
</tr>
</table>
+3 -3
View File
@@ -51,9 +51,9 @@
<!-- Sponsors: one cell per sponsor in the order of packages/website/src/data/sponsors.ts, then "become a sponsor" cells up to three. -->
<table>
<tr 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>
<tr>
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="40"></picture></a><br><sub>Cloud coding agents</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Paseo 스폰서 되기</a></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Paseo 스폰서 되기</a></td>
</tr>
</table>
+3 -3
View File
@@ -56,9 +56,9 @@ Paseo is an open source agentic development environment for desktop, mobile, web
<!-- Sponsors: one cell per sponsor in the order of packages/website/src/data/sponsors.ts, then "become a sponsor" cells up to three. -->
<table>
<tr 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>
<tr>
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="56"></picture></a><br><sub>Cloud coding agents</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Become a sponsor</a></td>
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Become a sponsor</a></td>
</tr>
</table>
+3 -3
View File
@@ -57,9 +57,9 @@
<!-- Sponsors: one cell per sponsor in the order of packages/website/src/data/sponsors.ts, then "become a sponsor" cells up to three. -->
<table>
<tr 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>
<tr>
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="40"></picture></a><br><sub>Cloud coding agents</sub></td>
<td align="center" width="33%"><a href="https://paseo.sh/zh-CN/sponsor">成为 Paseo 赞助商</a></td>
<td align="center" width="33%"><a href="https://paseo.sh/zh-CN/sponsor">成为 Paseo 赞助商</a></td>
</tr>
</table>
+1 -27
View File
@@ -1,6 +1,6 @@
# Brand assets
Canonical marks, lockups, and wordmark font for **Paseo** and **Paseo Hub**. These are the source assets for the icons across the app, desktop client, website, docs, and Hub.
Canonical marks, lockups, and wordmark font for **Paseo** and **Paseo Hub**. These are the source assets that will replace the existing icons across the app, desktop client, website, docs, and Hub in follow-up work.
## Brand architecture
@@ -37,10 +37,6 @@ All lockups (`lockups/*.svg`) share a `144`-unit height (`140`-unit flower ink h
```text
assets/brand/
build.mjs Regenerates all marks and lockups
build-app-icons.mjs Regenerates the desktop and mobile app icons
app-icons/
paseo-lit.png
paseo-dev-lit.png
fonts/
PlusJakartaSans-SemiBold.ttf
OFL.txt
@@ -65,25 +61,3 @@ assets/brand/
```sh
node assets/brand/build.mjs
```
## App icons
`build-app-icons.mjs` renders every desktop and mobile app icon from `marks/paseo-white.svg`: the white butterfly on a black tile, and a blueprint tile for desktop development builds. Regenerate them after changing the butterfly:
```sh
node assets/brand/build-app-icons.mjs
```
The icons that ship are flat. Each platform masks and lights its own icons, so lit artwork ends up lit twice. `app-icons/` keeps a lit version of the two desktop icons, a baked approximation of macOS Liquid Glass. Nothing uses them.
The packaged Mac app takes its icon from `packages/desktop/assets/icon.icon`, an Icon Composer document the script also writes. macOS draws Liquid Glass on it and derives the dark, tinted, and clear variants. electron-builder compiles the document with `actool`, so packaging the Mac app needs Xcode 26 or later. The Nix build has no Xcode and uses `icon.icns`.
To see what macOS draws from the document without packaging the app, export it with Icon Composer's command line tool on a Mac:
```sh
"/Applications/Xcode.app/Contents/Applications/Icon Composer.app/Contents/Executables/ictool" \
packages/desktop/assets/icon.icon --export-image --output-file icon.png \
--platform macOS --rendition Default --width 1024 --height 1024 --scale 1
```
`--rendition` also takes `Dark`, `TintedLight`, `TintedDark`, `ClearLight`, and `ClearDark`.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

-464
View File
@@ -1,464 +0,0 @@
// Generates every Paseo app icon from the canonical butterfly mark.
//
// node assets/brand/build-app-icons.mjs
//
// The artwork is the white butterfly on a black tile. A desktop development build gets the same
// tile drawn as a blueprint, so it is never mistaken for an installed app.
//
// The icons that ship are flat. Each platform masks and lights its own icons, and artwork that
// arrives already lit ends up lit twice. The lit finish is a baked approximation of the Liquid
// Glass material macOS draws for Icon Composer icons. It is written to app-icons/ so it stays
// available, and nothing consumes it.
//
// A packaged Mac app gets its icon from the Icon Composer document in the desktop assets, which
// macOS masks and lights itself. macOS draws a dev build's Dock icon and an .icns exactly as
// supplied, so those carry the system's tile in the artwork. Its geometry is measured from the icon
// macOS 27 draws for that document: the tile covers 824 of the 1024 canvas pixels and its corners
// are continuous curves with a radius of 26.4% of the tile.
//
// sharp is not a declared dependency. It resolves from the workspace root, the way opentype.js
// does for build.mjs.
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import sharp from "sharp";
const brandDir = path.dirname(fileURLToPath(import.meta.url));
const repoRoot = path.resolve(brandDir, "../..");
const brandMarkPath = path.join(brandDir, "marks/paseo-white.svg");
const CANVAS = 1024;
const MACOS_TILE_ON_CANVAS = 824 / CANVAS;
// Windows and Linux have no icon grid, and a tile with the macOS margin looks small next to their
// other icons.
const WINDOWS_LINUX_TILE_ON_CANVAS = 928 / CANVAS;
// Artwork is drawn in the brand mark's own 700-unit box, which the tile fills.
const TILE = 700;
const TILE_RADIUS = 185;
const MARK_INK = 527;
// Scaled down, the mark keeps clear of the tile's corners and covers as much of the tile as the
// glyphs in Apple's icons do.
const MARK_SCALE = 0.9;
const MARK_INK_ON_TILE = (MARK_INK * MARK_SCALE) / TILE;
// Android shows the middle 72 of an adaptive icon's 108 units.
const ANDROID_ADAPTIVE_VISIBLE = 72 / 108;
const NOTIFICATION_MARK_INK = 0.75;
// Apple's continuous corner. Each pair is a distance back along the incoming edge and a distance
// along the outgoing edge, in units of the corner radius.
const CORNER_SEGMENTS = [
["C", [1.08849296, 0], [0.86840694, 0], [0.66993427, 0.065496]],
["L", [0.63149399, 0.074911]],
["C", [0.37282392, 0.16905899], [0.16905899, 0.37282392], [0.074911, 0.63149399]],
["L", [0.065496, 0.66993427]],
["C", [0, 0.86840694], [0, 1.08849296], [0, 1.52866483]],
];
const CORNER_START = [1.52866483, 0];
function continuousSquarePath(inset) {
const near = inset;
const far = TILE - inset;
const radius = TILE_RADIUS - inset;
const corners = [
{ at: [far, near], incoming: [1, 0], outgoing: [0, 1] },
{ at: [far, far], incoming: [0, 1], outgoing: [-1, 0] },
{ at: [near, far], incoming: [-1, 0], outgoing: [0, -1] },
{ at: [near, near], incoming: [0, -1], outgoing: [1, 0] },
];
const commands = corners.map(({ at, incoming, outgoing }, cornerIndex) => {
const point = ([back, along]) =>
[0, 1]
.map((axis) => at[axis] - incoming[axis] * back * radius + outgoing[axis] * along * radius)
.map((value) => Number(value.toFixed(2)))
.join(" ");
const segments = CORNER_SEGMENTS.map(
([command, ...points]) => `${command}${points.map(point).join(" ")}`,
);
return `${cornerIndex === 0 ? "M" : "L"}${point(CORNER_START)}${segments.join("")}`;
});
return `${commands.join("")}Z`;
}
const TILE_SHAPE = `<path d="${continuousSquarePath(0)}" />`;
const FILL_TILE = `<rect width="${TILE}" height="${TILE}" fill="url(#surface)" />`;
const PRODUCTION = {
flat: {
defs: `<linearGradient id="surface"><stop stop-color="#000000" /></linearGradient>`,
surface: FILL_TILE,
},
lit: {
defs: `
<linearGradient id="surface" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#202022" />
<stop offset="1" stop-color="#0E0E10" />
</linearGradient>`,
surface: FILL_TILE,
tileEdge: { color: "#000000", opacity: 0.75 },
markEdge: { color: "#4A5568", opacity: 0.45 },
markShadow: { color: "#000000", opacity: 0.5 },
},
};
const GRID_DIVISIONS = 8;
const GRID_MAJOR_EVERY = 2;
const OUTLINE_INSET = 28;
function gridLines(isIncluded) {
const step = TILE / GRID_DIVISIONS;
const segments = [];
for (let index = 1; index < GRID_DIVISIONS; index += 1) {
if (!isIncluded(index)) continue;
const at = index * step;
segments.push(`M${at} 0V${TILE}`, `M0 ${at}H${TILE}`);
}
return segments.join("");
}
const isMajorLine = (index) => index % GRID_MAJOR_EVERY === 0;
const BLUEPRINT_SHEET = {
defs: `
<linearGradient id="surface" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#05C2FE" />
<stop offset="0.5" stop-color="#0191FD" />
<stop offset="1" stop-color="#026CFA" />
</linearGradient>`,
surface: `
${FILL_TILE}
<g fill="none" stroke="#FFFFFF">
<path d="${gridLines((index) => !isMajorLine(index))}" stroke-opacity="0.16" stroke-width="1.5" />
<path d="${gridLines(isMajorLine)}" stroke-opacity="0.34" stroke-width="2" />
<circle cx="${TILE / 2}" cy="${TILE / 2}" r="${TILE / 2 - OUTLINE_INSET}" stroke-opacity="0.45" stroke-width="2" stroke-dasharray="10 8" />
<path d="${continuousSquarePath(OUTLINE_INSET)}" stroke-opacity="0.34" stroke-width="2" />
</g>`,
};
const BLUEPRINT = {
flat: BLUEPRINT_SHEET,
lit: {
...BLUEPRINT_SHEET,
tileEdge: { color: "#0034B4", opacity: 0.55 },
markEdge: { color: "#1E5FD0", opacity: 0.5 },
markShadow: { color: "#00308F", opacity: 0.4 },
},
};
// The lit finish, tuned against Apple's own renders. The light comes from straight above: a
// layer's upward-facing edge gets a bright highlight, its downward-facing edge a fainter one, and
// its side edges darken.
//
// An edge highlight is the part of the layer that a vertically shifted copy does not cover. A
// vertical blur of the shifted copy makes the highlight brightest at the edge and absent on
// vertical edges. A wider, round blur of the same band dims it where the edge turns away from
// the light, which is what keeps the tile's corners quieter than its top.
function glassFilter({ id, edge, edgeWidth, lightWidth, upperLight, lowerLight, shadow }) {
const light = (name, direction, opacity) => `
<feOffset in="SourceAlpha" dy="${direction * lightWidth}" />
<feGaussianBlur stdDeviation="0 ${lightWidth}" result="${name}Shifted" />
<feComposite in="SourceAlpha" in2="${name}Shifted" operator="out" result="${name}Edge" />
<feOffset in="SourceAlpha" dy="${direction * lightWidth * 2}" result="${name}Far" />
<feComposite in="SourceAlpha" in2="${name}Far" operator="out" />
<feGaussianBlur stdDeviation="${lightWidth * 3}" />
<feComponentTransfer><feFuncA type="gamma" exponent="3" amplitude="65" /></feComponentTransfer>
<feComposite in2="${name}Edge" operator="arithmetic" k1="1" result="${name}Shape" />
<feFlood flood-color="#FFFFFF" flood-opacity="${opacity}" />
<feComposite in2="${name}Shape" operator="in" result="${name}" />`;
const dropShadow = shadow
? `
<feGaussianBlur in="SourceAlpha" stdDeviation="${shadow.blur}" />
<feOffset dy="${shadow.offset}" result="shadowShape" />
<feFlood flood-color="${shadow.color}" flood-opacity="${shadow.opacity}" />
<feComposite in2="shadowShape" operator="in" result="shadow" />`
: "";
return `
<filter id="${id}" x="-20%" y="-20%" width="140%" height="140%" color-interpolation-filters="sRGB">${dropShadow}
<feMorphology in="SourceAlpha" operator="erode" radius="${edgeWidth * 0.6}" />
<feGaussianBlur stdDeviation="${edgeWidth}" result="core" />
<feFlood flood-color="${edge.color}" flood-opacity="${edge.opacity}" />
<feComposite in2="core" operator="out" />
<feComposite in2="SourceAlpha" operator="in" result="edge" />
${light("upper", 1, upperLight)}
${light("lower", -1, lowerLight)}
<feMerge>
${shadow ? '<feMergeNode in="shadow" />' : ""}
<feMergeNode in="SourceGraphic" />
<feMergeNode in="edge" />
<feMergeNode in="upper" />
<feMergeNode in="lower" />
</feMerge>
</filter>`;
}
function litDefs({ tileEdge, markEdge, markShadow }) {
const markBody = `
<linearGradient id="markBody" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#FFFFFF" />
<stop offset="0.4" stop-color="#FFFFFF" />
<stop offset="1" stop-color="#D9DFE9" />
</linearGradient>`;
const tileGlass = glassFilter({
id: "tileGlass",
edge: tileEdge,
edgeWidth: 3,
lightWidth: 3.6,
upperLight: 0.82,
lowerLight: 0.45,
});
const markGlass = glassFilter({
id: "markGlass",
edge: markEdge,
edgeWidth: 1.2,
lightWidth: 1.6,
upperLight: 1,
lowerLight: 0.6,
shadow: { ...markShadow, blur: 9, offset: 8 },
});
return `${markBody}${tileGlass}${markGlass}`;
}
function brandMark(stroke) {
const svg = readFileSync(brandMarkPath, "utf8");
const outline = svg.match(/\bd="([^"]+)"/);
const strokeWidth = svg.match(/\bstroke-width="([^"]+)"/);
if (!outline || !strokeWidth) {
throw new Error(`No stroked mark path in ${brandMarkPath}`);
}
// The path carries its own `fill="none"`: Icon Composer ignores the one on the <svg> element and
// draws a hairline from the end of the stroke back to its start.
return `<path d="${outline[1]}" fill="none" stroke="${stroke}" stroke-width="${strokeWidth[1]}" stroke-linecap="round" stroke-linejoin="round" />`;
}
function scaledAboutCentre(scale, content) {
const centre = TILE / 2;
return `<g transform="translate(${centre} ${centre}) scale(${scale}) translate(${-centre} ${-centre})">${content}</g>`;
}
// A square canvas with the 700-unit artwork box centred on it and covering `boxOnCanvas` of its
// width.
function canvasSvg(boxOnCanvas, content) {
const canvasUnits = TILE / boxOnCanvas;
const origin = (TILE - canvasUnits) / 2;
return [
`<svg width="${CANVAS}" height="${CANVAS}" viewBox="${origin} ${origin} ${canvasUnits} ${canvasUnits}" fill="none" xmlns="http://www.w3.org/2000/svg">`,
content,
"</svg>",
].join("\n");
}
// The tile with the mark on it. A masked tile has the continuous corners cut into the artwork. A
// square tile is for platforms that apply their own mask.
function tileIconSvg({ artwork, finish, tileOnCanvas, corners }) {
const look = artwork[finish];
const isLit = finish === "lit";
const filtered = (id, content) => (isLit ? `<g filter="url(#${id})">${content}</g>` : content);
const tile =
corners === "continuous" ? `<g clip-path="url(#tile)">${look.surface}</g>` : look.surface;
const mark = scaledAboutCentre(MARK_SCALE, brandMark(isLit ? "url(#markBody)" : "#FFFFFF"));
return canvasSvg(
tileOnCanvas,
[
`<defs><clipPath id="tile">${TILE_SHAPE}</clipPath>${look.defs}${isLit ? litDefs(look) : ""}</defs>`,
filtered("tileGlass", tile),
filtered("markGlass", mark),
].join("\n"),
);
}
// The white mark alone on a transparent canvas, its ink covering `inkOnCanvas` of the width.
function markOnlySvg(inkOnCanvas) {
return canvasSvg((inkOnCanvas * TILE) / MARK_INK, brandMark("#FFFFFF"));
}
function rasterizer(svg) {
const source = Buffer.from(svg);
const sized = (size) => sharp(source).resize(size, size);
return {
png: (size) => sized(size).png({ compressionLevel: 9 }).toBuffer(),
opaquePng: (size) => sized(size).removeAlpha().png({ compressionLevel: 9 }).toBuffer(),
rgba: (size) => sized(size).ensureAlpha().raw().toBuffer(),
};
}
// ICO: a directory of PNG-encoded entries. A size byte of 0 means 256.
function encodeIco(entries) {
const header = Buffer.alloc(6);
header.writeUInt16LE(1, 2);
header.writeUInt16LE(entries.length, 4);
let offset = header.length + entries.length * 16;
const directory = entries.map(({ size, png }) => {
const entry = Buffer.alloc(16);
entry.writeUInt8(size % 256, 0);
entry.writeUInt8(size % 256, 1);
entry.writeUInt16LE(1, 4);
entry.writeUInt16LE(32, 6);
entry.writeUInt32LE(png.length, 8);
entry.writeUInt32LE(offset, 12);
offset += png.length;
return entry;
});
return Buffer.concat([header, ...directory, ...entries.map((entry) => entry.png)]);
}
function icnsElement(type, data) {
const header = Buffer.alloc(8);
header.write(type, 0, "latin1");
header.writeUInt32BE(header.length + data.length, 4);
return Buffer.concat([header, data]);
}
// The 16 and 32 pixel ICNS slots predate PNG: three run-length-encoded colour planes plus a
// separate 8-bit alpha mask. A control byte below 128 copies the next (byte + 1) values, so
// literal-only chunks are a valid encoding.
function icnsLegacyElements(colorType, maskType, rgba) {
const pixels = rgba.length / 4;
const chunks = [];
for (let channel = 0; channel < 3; channel += 1) {
for (let start = 0; start < pixels; start += 128) {
const length = Math.min(128, pixels - start);
const chunk = Buffer.alloc(length + 1);
chunk[0] = length - 1;
for (let index = 0; index < length; index += 1) {
chunk[index + 1] = rgba[(start + index) * 4 + channel];
}
chunks.push(chunk);
}
}
const mask = Buffer.alloc(pixels);
for (let index = 0; index < pixels; index += 1) {
mask[index] = rgba[index * 4 + 3];
}
return [icnsElement(colorType, Buffer.concat(chunks)), icnsElement(maskType, mask)];
}
async function encodeIcns(icon) {
const pngSlots = [
["ic07", 128],
["ic08", 256],
["ic09", 512],
["ic10", 1024],
["ic11", 32],
["ic12", 64],
["ic13", 256],
["ic14", 512],
];
const elements = [
...icnsLegacyElements("is32", "s8mk", await icon.rgba(16)),
...icnsLegacyElements("il32", "l8mk", await icon.rgba(32)),
];
for (const [type, size] of pngSlots) {
elements.push(icnsElement(type, await icon.png(size)));
}
const body = Buffer.concat(elements);
const header = Buffer.alloc(8);
header.write("icns", 0, "latin1");
header.writeUInt32BE(header.length + body.length, 4);
return Buffer.concat([header, body]);
}
// The Icon Composer document macOS 26 and later build the app icon from. The canvas is the whole
// tile: macOS adds the mask, the margin, and the lighting. The mark stays opaque so it reads as
// solid white on the black tile.
function iconComposerFiles() {
const layer = "butterfly.svg";
const document = {
fill: { solid: "srgb:0.00000,0.00000,0.00000,1.00000" },
groups: [
{
layers: [{ "image-name": layer, name: "butterfly" }],
shadow: { kind: "neutral", opacity: 0.5 },
translucency: { enabled: false, value: 0.5 },
},
],
"supported-platforms": { squares: ["macOS"] },
};
return [
["icon.json", `${JSON.stringify(document, null, 2)}\n`],
[`Assets/${layer}`, `${markOnlySvg(MARK_INK_ON_TILE)}\n`],
];
}
function write(file, data) {
const target = path.join(repoRoot, file);
mkdirSync(path.dirname(target), { recursive: true });
writeFileSync(target, data);
}
function desktopIcon(artwork, finish, tileOnCanvas) {
return rasterizer(tileIconSvg({ artwork, finish, tileOnCanvas, corners: "continuous" }));
}
async function buildDesktopIcons() {
const production = desktopIcon(PRODUCTION, "flat", WINDOWS_LINUX_TILE_ON_CANVAS);
const assets = "packages/desktop/assets";
const pngFiles = [
["icon.png", 512],
["32x32.png", 32],
["64x64.png", 64],
["128x128.png", 128],
["128x128@2x.png", 256],
];
for (const [file, size] of pngFiles) {
write(`${assets}/${file}`, await production.png(size));
}
const icoEntries = [];
for (const size of [32, 16, 24, 48, 64, 256]) {
icoEntries.push({ size, png: await production.png(size) });
}
write(`${assets}/icon.ico`, encodeIco(icoEntries));
write(
`${assets}/icon.icns`,
await encodeIcns(desktopIcon(PRODUCTION, "flat", MACOS_TILE_ON_CANVAS)),
);
for (const [file, content] of iconComposerFiles()) {
write(`${assets}/icon.icon/${file}`, content);
}
write(
`${assets}/icon-dev.png`,
await desktopIcon(BLUEPRINT, "flat", MACOS_TILE_ON_CANVAS).png(CANVAS),
);
}
async function buildMobileIcons() {
const flat = (corners) =>
rasterizer(tileIconSvg({ artwork: PRODUCTION, finish: "flat", tileOnCanvas: 1, corners }));
// iOS masks these itself, and Expo flattens any transparency in the app icon onto white.
const square = flat("square");
// Shown as supplied, so the corners are part of the artwork.
const masked = flat("continuous");
const adaptiveForeground = rasterizer(markOnlySvg(ANDROID_ADAPTIVE_VISIBLE * MARK_INK_ON_TILE));
const notification = rasterizer(markOnlySvg(NOTIFICATION_MARK_INK));
write("packages/app/assets/images/icon.png", await square.opaquePng(1024));
write("packages/app/public/apple-touch-icon.png", await square.opaquePng(180));
write(
"packages/app/assets/images/android-icon-foreground.png",
await adaptiveForeground.png(1024),
);
write("packages/app/assets/images/notification-icon.png", await notification.png(96));
write("packages/app/assets/images/splash-icon.png", await masked.png(1024));
write("packages/app/public/pwa-icon-192.png", await masked.png(192));
write("packages/app/public/pwa-icon-512.png", await masked.png(512));
write("fastlane/metadata/android/en-US/images/icon.png", await masked.png(512));
}
async function buildLitIcons() {
for (const [file, artwork] of [
["paseo-lit.png", PRODUCTION],
["paseo-dev-lit.png", BLUEPRINT],
]) {
const icon = desktopIcon(artwork, "lit", MACOS_TILE_ON_CANVAS);
write(`assets/brand/app-icons/${file}`, await icon.png(CANVAS));
}
}
await buildDesktopIcons();
await buildMobileIcons();
await buildLitIcons();
+16 -25
View File
@@ -80,9 +80,7 @@ Provider checks follow the signals their runtimes expose:
- Codex queries background terminals for loaded threads, including native children, and protects
pending provider requests. App servers without the terminal-list RPC stay resident.
- OpenCode checks active executions and descendants. V1 checks PTYs; v2 also checks shell and
inbox inventories. The shared server remains leased while a session vetoes collection. V2 lets
another session's execution veto only when releasing the lease would stop the server; the shared
server stays up after its last lease goes.
inbox inventories. The shared server remains leased while a session vetoes collection.
- Pi checks streaming, compaction, pending replies, and adapter-owned operations. Known native
subagent signals also protect their parent through the daemon's subagent store.
- OMP additionally requires `get_state.isSettled: true` and `hasPendingAsyncWork: false`.
@@ -154,17 +152,17 @@ Users can also detach an existing subagent from the subagents track. Detach is d
Agent-originated messages and automatic notifications share a recipient-daemon delivery module. A queued receipt acknowledges admission before provider dispatch. The module keeps one ordered queue per recipient, and the recipient reads its prompts in the order the daemon admitted them. Nothing overtakes an older queued message. A prompt takes its place when the daemon admits it, even while the provider is still starting an earlier turn, and a message stays in the queue until the turn that carries it starts. The turn has started when the agent manager acknowledges the run start; a turn that fails after that point is not delivered again.
Any sender picks `queue`, `steer`, or `interrupt` with `activeTurnBehavior`. Agent senders default to `queue`; non-agent senders (app, CLI, plugins, Hub, top-level MCP) default to `interrupt`. Each kind of prompt is released this way:
An agent sender picks `queue`, `steer`, or `interrupt` with `activeTurnBehavior`. `steer` and `interrupt` mean what they mean for a person. A person's send has no `queue`. Each kind of prompt is released this way:
- **`queue`** waits for any running or starting turn (including compaction) to end on its own or fail, then delivers the queued prompts together. The daemon releases it when it observes the recipient settle; a two-second timer also retries. On an idle recipient, agent messages wait two quiet seconds (steady arrivals cannot hold that window open past ten seconds); a non-agent queued message skips that quiet window and starts a turn at once. A non-agent queued message is sent unwrapped when dispatched alone, and in a `kind="user-message"` envelope when it shares a prompt with other messages. Finish notifications and change-request updates always queue.
- **`queue`** (the agent default) waits. An idle recipient gets the queue after two quiet seconds; steady arrivals cannot hold that window open past ten seconds. While the recipient has a running or starting turn (including compaction), the queue waits and is delivered together when that turn ends on its own or fails. The daemon releases it when it observes the recipient settle; a two-second timer also retries. Finish notifications and change-request updates always queue.
- **`steer`** waits for neither the quiet window nor the turn. It is dispatched at admission as one prompt that enters the running turn: the messages queued before it, then the steer. A provider that cannot steer, or that refuses this steer, gets the prompt as a replacing turn instead, the same as a person's steer.
- **`interrupt`** is dispatched at admission the same way, as one prompt that replaces the running turn. An older queued message cannot start a turn after the newer `interrupt` that countermands it.
- **A person's direct prompt** (`steer` or `interrupt` from app, CLI, plugins, Hub, or top-level MCP) is dispatched directly and takes the queue along the same way: the messages admitted before it first, then the person's text, in one provider prompt. Messages admitted after it follow it. The person's text keeps its own transcript row. When the turn does not start, the messages return to the queue in their place. That covers a start the provider rejects and a start that is not acknowledged within 60 seconds; a provider that starts the turn after those 60 seconds receives the messages twice.
- **A person's prompt** (app, CLI, top-level MCP) is dispatched directly with its existing steer or interrupt behavior and takes the queue along the same way: the messages admitted before it first, then the person's text, in one provider prompt. Messages admitted after it follow it. The person's text keeps its own transcript row. When the turn does not start, the messages return to the queue in their place. That covers a start the provider rejects and a start that is not acknowledged within 60 seconds; a provider that starts the turn after those 60 seconds receives the messages twice.
- **Stop** (the stop button, Escape, `cancel_agent`, a Hub interrupt) starts nothing. Messages admitted before the Stop are held, not dropped, including an interrupt whose turn had not started yet. They go ahead of the recipient's next prompt, in that prompt's turn: a person's prompt, or an agent message or notification admitted after the Stop. A held steer or interrupt no longer enters the turn; it waits like a queued message. A queue step or dispatch decided before the Stop is void, and the queue is held again when the message that reopened it is withdrawn. A replacing prompt, a reload, and a rewind are not a Stop. Neither is `cancel_agent` on a recipient with no running or starting turn: it stops nothing, reports that it canceled no run, and a queued message keeps its quiet window.
The queued receipt carries the applied behavior and guidance text for the sender. The text comes from two facts known at admission: whether the recipient has a running turn, and whether its provider can steer (`AgentManager.canSteer`, which is true when the session offers `steerActiveTurn`). It does not wait for the outcome. Guidance for a message queued behind a running turn tells the sender to send a short `steer` or `interrupt` follow-up instead of resending, because the follow-up carries the queued message ahead of it and a resend would be read twice. The MCP tool, the WebSocket `send_agent_message_response`, the CLI, and the connected-host path all relay this one text.
Older CLIs and connected hosts send an explicit `steer` for every default agent send. The daemon reads an agent sender's `steer` as `queue` unless the client advertises the `agent_active_turn_behaviors` capability. A new client talking to a daemon without `server_info.features.agentActiveTurnBehaviors` sends no behavior for `queue` and refuses a `steer`. A new client talking to a daemon without `server_info.features.nonAgentMessageQueue` refuses a non-agent `queue` before sending.
Older CLIs and connected hosts send an explicit `steer` for every default agent send. The daemon reads an agent sender's `steer` as `queue` unless the client advertises the `agent_active_turn_behaviors` capability. A new client talking to a daemon without `server_info.features.agentActiveTurnBehaviors` sends no behavior for `queue` and refuses a `steer`.
A command the provider accepts out of band is the one exception to admission order: it runs alone without ending the turn. A queued command runs ahead of older messages, and a `steer` or `interrupt` that runs this way takes no queued message along. A person's command leaves the queue where it is. A prompt is a command when it starts with a slash and a name that has no second slash, so `/compact` is one and `/tmp/build.log is stale` is plain text.
@@ -198,24 +196,17 @@ outstanding intent. A crash after successful dispatch but before removal commits
notification. Clean shutdown can also flush an already queued callback while retaining its intent,
so that callback can repeat after restart. This is an at-least-once wakeup, without turn attribution or exactly-once delivery.
A turn end is not always a settled child. A child can end its turn with work that will start its next
turn by itself: a running turn, queued messages, a pending provider wake-up
(`AgentSession.hasPendingWakeup`: Claude background tasks, task notifications, and one-shot
wake-ups), or the child's own outstanding finish subscriptions as a caller. Heartbeats, recurring
crons, change-request watches, and other daemon background items never count: they are external
triggers, not work the caller is waiting for.
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`.
A turn end is not always a settled child. When the child ends its turn with work that will start its
next turn by itself, the caller gets one `message` notice ("ended its turn but is still working") and
the subscription keeps following the child. That work is a running turn, queued messages, a pending
provider wake-up (`AgentSession.hasPendingWakeup`: Claude background tasks, task notifications, and
one-shot wake-ups), or the child's own outstanding finish subscriptions as a caller. Heartbeats,
recurring crons, change-request watches, and other daemon background items never count: they are
external triggers, not work the caller is waiting for. While following, turn ends and work changes stay
silent until nothing is pending, which sends `finished` and removes the subscription. `followingSince`
is stored before the notice is sent, so restarts resume following without repeating it, and following
ends after 24 hours with an "is still working" notice. Remote children and providers without the probe
report their first turn end as `finished`.
Permission requests are notification checkpoints, not the end of that subscription. The caller is notified again after a permission response when the child finishes, errors, or requests another permission.
The permission notification includes the normalized request plus the child and request IDs, so the caller can inspect it and respond without fetching agent status.
+2 -2
View File
@@ -329,7 +329,7 @@ messages or transfers.
### Compatibility rules
- WebSocket schemas are append-only. Add fields, do not remove fields, and never make optional fields required.
- New wire enum values must be gated at serialization with `session.supports(CLIENT_CAPS.someCapability)`. An older reader skips an unknown value inside a list; gate it anyway when the old client must see something.
- New wire enum values must be gated at serialization with `session.supports(CLIENT_CAPS.someCapability)`.
- Capabilities belong to the physical source socket. `session.supports(...)` reads the requesting or observing source at the domain projection boundary; one socket must not borrow a sibling's capabilities.
Example: adding a new enum value
@@ -337,7 +337,7 @@ Example: adding a new enum value
```ts
// 1. Add CLIENT_CAPS.newThing = "new_thing"
// 2. Let new clients advertise it in WS hello
// 3. Add the value to the shared schema; no catch-all branch
// 3. Keep the shared producer schema strict
// 4. Gate the new emitted value: session.supports(CLIENT_CAPS.newThing) ? "new_value" : "old_value"
```
+2 -3
View File
@@ -240,8 +240,7 @@ snapshot so a mixed edit can apply its live subset and still name the paths that
// `extends` (one of the built-ins or `"acp"`) and `label`. See `provider-launch-config.ts`.
providers: Record<providerId, ProviderOverride>,
metadataGeneration: {
providers: [{ provider, model?, thinkingOptionId? }],
instructions?: string
providers: [{ provider, model?, thinkingOptionId? }]
}
},
pluginsEnabled: boolean,
@@ -320,7 +319,7 @@ Paseo tools; otherwise the provider policy applies. Provider and global policy a
session is created, resumed, imported, or reloaded, so configuration changes affect the next
session rather than an already-running one.
`agents.metadataGeneration.providers` selects the models for daemon-side metadata tasks: commit messages, PR text, branch names, and generated titles. An empty list is Automatic; a non-empty list is Manual and only those models are tried. `agents.metadataGeneration.instructions` adds host-wide guidance to every metadata generation prompt alongside the built-in or per-project style. See [public-docs/metadata-generation.md](../public-docs/metadata-generation.md#how-a-model-is-chosen).
`agents.metadataGeneration.providers` selects the models for daemon-side metadata tasks: commit messages, PR text, branch names, and generated titles. An empty list is Automatic; a non-empty list is Manual and only those models are tried. See [public-docs/metadata-generation.md](../public-docs/metadata-generation.md#how-a-model-is-chosen).
### Git process limits
+1 -1
View File
@@ -177,7 +177,7 @@ Electron window controls are top-corner obstructions, not a compact-layout condi
Windows and Linux controls are fixed window chrome, outside scrolling header content. A tab rail that reaches them ends at their obstruction and shows the shared overflow fade. On macOS, the Explorer toggle occupies a fixed top-right window slot so opening and closing Explorer does not move the pointer target.
Each window edge has one safe-area owner. `WindowLayoutProvider` publishes the bottom inset that every surface reads through `useSafeAreaInsets()`: on iOS 27.1 and later it is UIKit's bottom-bar clearance, which refines the rectangular home-indicator inset to the screen's corners, and elsewhere the system inset. Surfaces apply that value once and never stack their own spacing under it; `WindowLayoutSurface` owns the horizontal insets the same way, and on wide web layouts it also owns the top inset: it pads the status bar of an iOS Home Screen web app once and gives its content a top inset of 0. Content inside the surface that draws against the window instead of the padded content reads the window's insets; see Gotcha 8 in `docs/floating-panels.md`.
Each window edge has one safe-area owner. `WindowLayoutProvider` publishes the bottom inset that every surface reads through `useSafeAreaInsets()`: on iOS 27.1 and later it is UIKit's bottom-bar clearance, which refines the rectangular home-indicator inset to the screen's corners, and elsewhere the system inset. Surfaces apply that value once and never stack their own spacing under it; `WindowLayoutSurface` owns the horizontal insets the same way.
A new list+detail feature copies the settings shell. A new workspace-shaped feature copies the workspace shell. Inventing a third shape happens in design review, not in a PR.
+4 -3
View File
@@ -205,9 +205,10 @@ docker build \
.
```
The Docker workflow builds the image on `main` as a non-publishing check.
Stable `vX.Y.Z` tag pushes publish `ghcr.io/getpaseo/paseo:X.Y.Z` and
`ghcr.io/getpaseo/paseo:latest`. Beta tags publish only the exact prerelease tag, such as
The Docker workflow builds the image on pull requests and on `main` as a
non-publishing check. Stable `vX.Y.Z` tag pushes publish
`ghcr.io/getpaseo/paseo:X.Y.Z` and `ghcr.io/getpaseo/paseo:latest`. Beta tags
publish only the exact prerelease tag, such as
`ghcr.io/getpaseo/paseo:0.1.102-beta.1`, and do not update `latest`.
To replace a Docker image in place without rebuilding desktop, APK, or EAS
-4
View File
@@ -36,10 +36,6 @@ ordinary `WorkspaceTab` (`SheetTab` in the store) and is an `IsolatedBottomSheet
other sheet in the app, so it sits on the one app-wide stack: a sheet opened from any sheet lands on
top of it, and closing the top sheet (drag, Close, backdrop, or Android Back) uncovers the one below.
Because that stack is app-wide and hidden workspace screens stay mounted, a sheet is not presented
until its workspace has been on screen. A target opened in a workspace before the user gets there
waits in the store and appears on arrival.
A subagent chosen from the subagents list is the exception. It opens as a page of the list's own
sheet and replaces the list in place: Back returns to the list, Close ends both, and Open parent
closes the list, landing on the pane the list was opened from. The store's `selectSheetTab` describes
+10 -37
View File
@@ -301,10 +301,9 @@ translation scope is React context and does not cross it (Gotcha 7). It returns:
height with it; never animate height per frame.
Do not measure an anchor with `measureInWindow` and correct it by the keyboard
shift. On iOS the translate view uses the native driver, which moves the view
without updating the shadow tree. The translate view commits the resting lift to
the shadow tree once the keyboard settles, so `measureInWindow` includes the lift
at rest and misses it while the keyboard moves. Any correction double-lifts the
shift. On iOS the translate view uses the native driver, and `measureInWindow`
includes its transform only when the view happened to re-render since the
keyboard moved. Both results were observed, so any correction double-lifts the
popover or leaves it behind the keyboard. `measureAtRest` measures through
Fabric's transform-free `measureLayout` instead. Re-measure when `isMoving`
settles; the composer's resting position changes as the draft grows.
@@ -316,8 +315,8 @@ the anchor's rect against the layer and commits the placement with `flushSync`,
which runs after layout and before paint. On native a Reanimated frame callback
reads only the anchor's height on the UI thread and holds its bottom edge at
the rest measurement. A height carries no transform. On iOS the absolute
position does not include one while the keyboard moves: the lift runs on the
native driver and reaches the shadow tree only at rest. The
position does not reliably include one: the keyboard lift runs on the native
driver and reaches the shadow tree only when the view re-renders. The
fixed-bottom model is wrong for the centered New workspace composer on tablets,
which grows around its middle, and for width or x changes. The popover is off
there by half the growth, or by the old width, until the next rest measurement.
@@ -325,21 +324,6 @@ Keep the portal's `KeyboardTranslateView` host-sized with
`pointerEvents="box-none"` and position the popover inside it, so the popover
moves without leaving its parent's bounds (Gotcha 1).
The resting commit also keeps touches working. Pressability measures a
`Pressable`'s press region in the shadow tree. If the region stays at the
unlifted position, a tap that drifts a few points leaves it and the press is
dropped. This hit every control in the dock: Send, attach, and the model selector.
`Combobox` positions its native popover with floating-ui against the window, and
the software keyboard covers part of the window. It adds the settled keyboard
height (`useSettledKeyboardHeight`) to its bottom collision padding. The height
changes on `keyboardDidShow` and `keyboardDidHide`, at the end of the move. The new
padding re-measures the anchor on the next frame, when the resting lift is in the
shadow tree, so the popover follows an anchor that rides the keyboard.
Opening the model picker moves focus to its search input, and the keyboard hides
and shows again on the way. A height that changes at `keyboardWillShow` instead
measures the trigger before it lifts and leaves the popover over the keyboard.
The provider also reconciles iOS from the controller's native `onEnd` event.
The controller's stock iOS shared values update at move start and during an
interactive move, but not at the terminal event, so JS contention can otherwise
@@ -475,15 +459,10 @@ Wrapping providers _around_ the modal does nothing. They land on the wrong side.
## Gotcha 8 — Read safe-area insets where the overlay draws
Two containers spend an inset and give their content 0 for that edge:
- A compact sheet tab's body (`SheetBottomInset` in `adaptive-modal-sheet.tsx`) pads the bottom
inset, so the composer dock sits the same in a sheet as in a tab.
- `WindowLayoutSurface` on a wide web layout pads the top inset, the status bar of an iOS Home
Screen web app (`docs/design.md`, section 9).
An overlay opened from that content and calling `useSafeAreaInsets()` at its call site gets that 0
and draws over the navigation bar or under the status bar. Read the inset where the overlay draws:
A compact sheet tab's body (`SheetBottomInset` in `adaptive-modal-sheet.tsx`) pads the bottom
inset and gives its content a bottom inset of 0, so the composer dock sits the same in a sheet as
in a tab. An overlay opened from that content and calling `useSafeAreaInsets()` at its call site
gets that 0 and draws over the navigation bar.
- A Gorhom sheet reads the inset inside its children, which render in the app's sheet host. See
`SheetVisibleFrame` (used by `CompactSheetBody` and `ComboboxSheetFrame`) and `MenuSheetScrollView`.
@@ -491,13 +470,7 @@ and draws over the navigation bar or under the status bar. Read the inset where
`WindowSafeArea` from `@/window-layout` and read the inset below that. It provides the insets of
the whole window, published by `WindowLayoutProvider`. Do not put a `SafeAreaProvider` inside the
modal: on Android it measures the dialog window, whose bottom inset reads 24, then 0, then 24
again over the first frames, and everything padded by it jumps. See `attachment-lightbox.tsx`
and the Mermaid fullscreen viewer.
- A panel in a `FloatingPanelPortalHost` reads `useSafeAreaInsets()` inside the portal, where it
resolves at the host's position (Gotcha 2): the root host sits outside the layout surface and
gets the window's inset, a workspace host inside it gets 0. See the autocomplete `PopoverFrame`.
- An absolutely positioned view that covers the surface's padding, such as the overlay left
sidebar, reads the window's insets with `useWindowSafeAreaInsets()`.
again over the first frames, and everything padded by it jumps. See `attachment-lightbox.tsx`.
## Recipe for a new anchored panel
+1 -1
View File
@@ -34,7 +34,7 @@ Authoritative terminology. UI label wins. Don't invent synonyms; use what's here
- **Agent session** — One running instance of an agent inside a workspace (one provider, one model, one cwd, one timeline). The conceptual unit; in the UI this opens as a tab. Moving toward this as the canonical term over "Agent". Code: `AgentSnapshotPayload` (`packages/protocol/src/messages.ts:608`).
- **Session** — Two senses: (a) per-client connection to a daemon, internal; (b) user-facing agent session, see **Agent session**. Code: `Session` (`packages/server/src/server/session.ts`) for (a). Don't confuse with: provider-side agent session log.
- **Profile** — Internal name for the persisted shape of a host. Code: `HostProfile` (`packages/app/src/types/host-connection.ts:37`). Never user-facing. Three other things are called "profile" in this codebase, so always qualify: **Agent profile**, **Terminal profile**, and the provider aliases in [custom-providers.md](custom-providers.md). Bare "profile" is forbidden in UI copy.
- **Agent profile** — A named launch bundle: provider, model, mode, thinking option, feature values, optional system prompt, and free-text notes. Applying one writes those values into the **Agent controls** and is then forgotten — there is no selected profile, no default profile, and no drift tracking. The system prompt applies only when creating a new agent and is ignored when applying the profile to a running one. The notes are written for orchestrating agents and are what the `list_profiles` MCP tool surfaces. Stored host-wide in daemon config as `agentProfiles`. UI: "Agent profiles". Code: `AgentProfile` (`packages/protocol/src/agent-profile.ts`). Forbidden: "Favourite", which this replaced.
- **Agent profile** — A named launch bundle: provider, model, mode, thinking option, feature values, and free-text notes. Applying one writes those values into the **Agent controls** and is then forgotten — there is no selected profile, no default profile, and no drift tracking. The notes are written for orchestrating agents and are what the `list_profiles` MCP tool surfaces. Stored host-wide in daemon config as `agentProfiles`. UI: "Agent profiles". Code: `AgentProfile` (`packages/protocol/src/messages.ts:161`). Carries no system prompt, because a per-agent system prompt can only be set at creation. Forbidden: "Favourite", which this replaced.
- **Terminal profile** — A named shell command a terminal can launch. Stored host-wide in daemon config as `terminalProfiles`. UI: "Terminal profiles". Code: `TerminalProfile` (`packages/protocol/src/messages.ts:135`), `resolveTerminalProfiles` (`packages/protocol/src/terminal-profiles.ts`). Also selectable as a New Workspace launch target, where the alternative is the chat agent.
- **Provider** — Agent backend (Claude Code, Codex, Copilot, OpenCode, Pi, Oh My Pi). UI: "Provider". Code: `ProviderSnapshotEntry` (`packages/protocol/src/messages.ts:198`).
- **Hook** — A plugin lifecycle handler registered with `server.addHook`, named `subject.operation.position` with `before` or `after`; each hook declares whether Paseo waits. See [hooks](../public-docs/plugins/hooks.md).
+3 -1
View File
@@ -72,7 +72,9 @@ hashes, never prompts, environment values, or credentials.
Before messaging an archived workspace, call `workspace.recovery.inspect.request`, then
`workspace.recovery.restore.request` and await success. The native message handler unarchives the
agent and loads its persisted provider session. A Hub message is a direct send (no `sourceAgentId`), so `activeTurnBehavior: "steer"` uses the provider's native steering and interrupts the running turn when that provider cannot steer, and `activeTurnBehavior: "queue"` waits for the running turn to end when the host advertises `server_info.features.nonAgentMessageQueue`.
agent and loads its persisted provider session. A Hub message is a direct send (no `sourceAgentId`), so
`activeTurnBehavior: "steer"` uses the provider's native steering and interrupts the running turn
when that provider cannot steer. The daemon rejects `queue` on a direct send.
Execution completion and arrival-specific output authority remain Hub responsibilities.
The older `hub.execution.*` RPCs remain accepted for existing clients. Their execution ownership
+3 -3
View File
@@ -95,9 +95,9 @@ A focused terminal excludes that binding. The source leaves terminal Escape alon
terminal Escape/Ctrl forwarding is a separate feature.
Terminal arrows never pass through the shortcut pipeline. The Android hardware
module claims them while the terminal's native input (`nativeID`) owns the focus,
so Android DPAD focus search cannot move focus away from the terminal view, while
leaving active IME composition spans untouched for candidate navigation.
module claims them while the terminal's hidden input (`nativeID`) owns the focus.
`TextInput.onKeyPress` only sees IME keys, and an arrow that falls through moves
the hidden caret and desyncs the next text change, so the pipeline cannot own them.
## Keys shared with text editing
-2
View File
@@ -12,8 +12,6 @@ Every block is separated by one gap, `density.blockGap`: 12 on compact layouts,
Workspace file links use the shared file-link resolver. The workspace supplies its client, root and open-file action once; chat can supply the agent's more specific context. URLs use the same link press path. Recognized inline-code paths stay tappable. The library callback carries the tapped occurrence’s syntax context. Preserve it when opening files: explicit Markdown links decode URL escapes, while recognized inline-code paths preserve literal percent characters and use suffix lookup. Identical URL strings in different occurrences must stay distinct. Explicit absolute workspace links receive a relative hover title; existing authored titles remain intact. Inside a workspace, forge references such as `#12` and `owner/repo#12` are recognized in prose (not code) and open the workspace forge; the reference pattern comes before path recognition so `group/project#12` is not read as a path. See [forge providers](forge-providers.md#gotchas).
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.
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).
+1 -4
View File
@@ -127,10 +127,7 @@ With a Codex draft selected, set `_SCENARIO=growth` on a 402pt-wide iPhone to
check live wrapping, shrinking, the 12pt anchor gap, and command insertion. Set
`_SCENARIO=previews` on an SE-sized iPhone to check long and short descriptions
under an eight-line draft, selection with the keyboard shown and hidden, and
file mentions. Set `_SCENARIO=controls` to tap the attach button and the model
selector with a 3pt drag while the keyboard is open, then check that a wide
layout's model popover clears both the trigger and the keyboard. Run it on an
iPhone and on the iPhone Duo unfolded. These scenarios only need `_SERVER_ID` and `_WORKSPACE_ID`;
file mentions. These scenarios only need `_SERVER_ID` and `_WORKSPACE_ID`;
`_UDID` selects an exact simulator and `_ARTIFACTS_DIR` overrides the output path.
The Android sidebar scroll-retention flow requires a connected host with enough
+2 -14
View File
@@ -10,20 +10,10 @@ Agent payloads name a host and agent. Ignore their workspace hint when opening:
the agent can move after a notification is sent. Use `navigateToAgent`, which
uses the current store record or the agent route to resolve the workspace from
the host. Terminal payloads name their workspace and use `navigateToWorkspace`.
Plugin payloads carry `kind: "plugin"`, `serverId`, `pluginId`, `notificationId`,
and optional `open` and `data`; `openPluginNotification` in
`packages/app/src/plugins/notification-open.ts` waits up to 8 seconds for the
target host's plugin catalog to settle on cold launch, runs registered
`client.onNotificationOpen` handlers with caught error isolation, and falls back
to declarative `open` (`agent`, `workspace`, `screen`) or the host root route.
See [agent targets and deferred opens](expo-router.md#agent-targets) for route
ownership and workspace recovery. Per-device two-knob notification preferences
(`@getpaseo/protocol/notification-preferences`) sync with mobile push tokens via
`register_push_token` (gated on `server_info.features.pushNotificationPreferences`)
so the daemon filters Expo pushes per token, while desktop and web clients filter
in-app OS notifications locally before calling `sendOsNotification`. Notification
generation and presence remain daemon concerns.
ownership and workspace recovery. Notification generation, presence, and push
eligibility remain daemon concerns.
## Native delivery
@@ -63,8 +53,6 @@ An arbitrary Activity launch with data extras does not exercise Expo's FCM path.
Foreground pushes remain in Notification Center without a banner or sound.
This preserves notifications sent with stale presence information.
Native clients have no DOM events, so presence comes from `@/hooks/native-user-activity`: touches on the root `GestureHandlerRootView` and edits in the native `EditingTextInput` refresh `lastActivityAt`. Touches inside a native `Modal` open a separate window and do not reach the root.
## Startup and verification
Wait for the root navigator, host registry, remembered selection, and startup
+3 -44
View File
@@ -1,7 +1,7 @@
# Plugins
Local plugins contribute daemon RPCs, native app surfaces, workspace panels, Command Center items,
client slash commands, timeline items, notifications, header buttons, composer pills, app themes, composer attachment sources, and settings screens.
client slash commands, timeline items, header buttons, composer pills, app themes, composer attachment sources, and settings screens.
Paseo executes `index.server.ts` in a subprocess and `index.client.tsx` in every connected app.
> **Trust every plugin you add.** `paseo plugin add` and `paseo plugin install` mean “I trust this codebase.” Plugins are unsandboxed: server code and preparation commands run with the daemon user's access on the daemon host, and client contributions run inside Paseo. The repository's dependencies and future updates are part of that trust decision. With `--host`, preparation runs on that remote daemon host.
@@ -103,13 +103,6 @@ The `worktree-include` built-in copies gitignored files selected by
[`.worktreeinclude`](../public-docs/worktrees.md#copy-local-files-with-worktreeinclude)
before setup and agents, through `worktree.create.after`.
The `cloudflared-tunnel` and `tailscale-funnel` built-ins register tunnel providers through
`server.registerTunnelProvider()`. Both start without installed binaries or credentials and report
availability through `status()`. `cloudflared-tunnel` runs quick tunnels only, with `--url` set to
the exposure target. Named Cloudflare tunnels are not supported: the Cloudflare dashboard sets
their routing, so their URL does not serve the exposure target. `tailscale-funnel` runs `tailscale funnel` in the foreground: with
`--bg`, tailscaled keeps the Funnel public after a crash with no owner.
Desktop packaging ships the entire built-in plugin directory as an external resource,
including declarations. The external esbuild compiler cannot read Electron's `app.asar`
filesystem, and packaging dependencies excludes `.d.ts` files needed for import validation.
@@ -267,10 +260,6 @@ Plugin UI runs on desktop and mobile across multiple themes: color every `Text`
`theme.colors.foreground` or `theme.colors.foregroundMuted`, and size layout from `layout.compact`.
See `public-docs/plugins/reference.md`.
A plugin reads and arranges panes and tabs through `PluginWorkspaceLayout`. Its host,
`packages/app/src/plugins/workspace-layout/`, is a facade over the layout store and `workspace-tabs`,
so add behavior to those owners and keep layout mechanics out of the SDK types.
### SDK import boundaries
Classify every SDK export before adding it. All client entry points and implementations live under
@@ -560,26 +549,6 @@ The same holds for a hook that runs inside an agent's lifecycle lane: an `agent.
an option, model, thinking or mode change) waits on the open, which waits on the hook. The hooks
reference tells plugin authors to start such a write without awaiting it.
## Send notifications
Server plugins call `server.notifications.send(input)` over the `notification.send` /
`notification.result` / `notification.error` IPC messages. `PluginNotificationDispatcher` in
`packages/server/src/server/plugins/notifications.ts` trims and truncates `title` (<= 160 chars)
and `body` (<= 500 chars), validates `key` (<= 128 chars), `open` (IDs <= 256 chars, serialized
<= 1,024 UTF-8 bytes), and `data` (<= 1,024 UTF-8 bytes so APNs and FCM envelopes stay within
4 KiB), drops duplicate `(pluginId, key)` pairs for 60 seconds, and enforces a per-plugin token
bucket (burst 10, refill 1 per 6 seconds). Stopping a plugin clears its deduplication and
rate-limit state.
`WebSocketServer.sendPluginNotification` stamps the runtime `pluginId`, `serverId`, and
`notificationId`, runs `computeNotificationPlan` (using `open.agentId` as the focus target when
`open.type === "agent"`), filters Expo pushes per token with `{ kind: "plugin", pluginId }`, and
publishes `plugin.notification` to sessions subscribed to that event category. Clients gate their
`"plugin.notification"` subscription on `server_info.features.pluginNotifications` (`COMPAT(pluginNotifications)`).
See [notifications.md](notifications.md) for tap routing and cold-launch catalog readiness, and the
[public notifications reference](../public-docs/plugins/reference.md#notifications) for the author
contract.
## Contribute a provider
Register a provider from `index.server.ts`. The provider connection is callback-based and owns all
@@ -643,12 +612,6 @@ effective configuration and execution environment, or
`undefined` for target-specific caching. Ignore `force` when choosing identity. Existing providers
need no change. See [catalogue ownership](providers.md#provider-snapshot-refresh-contract).
Both sides of the provider protocol ignore fields they do not know. A list element of an unknown
kind, such as a prompt content block, a command kind, or a timeline item, is dropped and the rest of
the input or event is kept. The daemon drops an event of a kind it does not know and keeps the
connection open. Paseo supplies the SDK at runtime, so both sides read with the daemon's parser. An
input the provider must act on still needs a connection capability, as `session.launch_wrap` does.
`send()` resolves after acceptance. Publish operation completion, prompt disposition, turn state,
configuration, permissions, persistence, and complete timeline snapshots through `onEvent()`.
Route messages, structured commands, steering, and command side effects through `session.prompt`.
@@ -989,10 +952,6 @@ reply text once, forks at its message, and shows its duration and stats. Read th
`getAssistantReply` (`packages/app/src/types/stream.ts`) instead of checking `kind ===
"assistant_message"`.
A provider-only fact about a tool call goes in the item's `metadata`, which transformers already
receive. Do not add a shared tool-call field for it. OMP's intent string is
[`metadata.intent`](../public-docs/plugins/reference.md#timeline-items).
Transformers run synchronously and must be deterministic. When several transformers match, the
first one that returns a result owns that source item. Plugin and registration ordering is stable.
See `plugin-examples/timeline-items` for the complete contract.
@@ -1022,8 +981,8 @@ payload that cannot be rendered intact. The daemon advertises this RPC through
`addSlashCommand` registers an agent- or workspace-context command in the composer. The
callback runs in the app, receives the trimmed text after the command name as `args`, and receives
the same `paseo`, `rpc`, `openScreen`, workspace, agent, and `workspaceLayout` capabilities as the
matching Command Center callback.
the same `paseo`, `rpc`, `openScreen`, workspace, agent, and `openPanel` capabilities as the matching
Command Center callback.
```ts
client.addSlashCommand({
-3
View File
@@ -17,9 +17,6 @@ A schema change must not break parsing in either direction. An old app still par
- A field you stop sending stays accepted. You stop writing it, you don't stop reading it.
- Wire schemas are pure structural declarations. No `.transform()`, `.catch()`, or `.preprocess()` on WebSocket message schemas — normalization happens in an explicit pass after validation. The reason is in [protocol-validation.md](protocol-validation.md): inbound validators are generated, and the generator only compiles pure schemas.
- Plain `z.union()` is forbidden when every branch shares a literal tag. Use `z.discriminatedUnion()`.
- Wire objects ignore keys they do not know. Never put `.strict()` or `z.strictObject` on a schema that reads another process's data. `packages/protocol/tests/validation/evolvability.test.ts` audits every app↔daemon schema. Strict objects belong to local files that should reject typos, such as the `config.json` copies in `packages/server/src/server/persisted-config.ts`. The browser automation request is the one wire exception: it rejects legacy tab targeting so a request cannot run against the wrong tab.
- An unknown variant inside a list costs one element. Readers parse through `safeParseSkippingUnknownVariants` (`packages/protocol/src/validation/unknown-variants.ts`): an unrecognized tag or enum value inside an array drops that element and keeps the message. Outside an array the read fails with `unknownVariant: true` and the reader drops that one message. Schemas stay closed, so consumer `switch`es stay exhaustive. Pruning reaches a list only through objects, arrays, and discriminated unions; a list under a plain `z.union()` branch or a record value is not pruned.
- Skipping is not support. When an old reader must see something for the feature to make sense, gate the new value at serialization ([architecture](architecture.md#compatibility-rules)).
- `.default()` belongs on primitive leaves only, never on item schemas inside large arrays or big inbound containers.
Two questions to ask before you commit a schema change:
+2 -2
View File
@@ -6,7 +6,7 @@ The reason is mobile performance. A captured 353 KB provider snapshot cost about
## Runtime Path
`packages/protocol/src/validation/ws-outbound.ts` is the shipped boundary. It validates the envelope with a generated validator that checks only each session message's `type` tag, then runs the generated validator for that one message type and returns the validated data. Issue paths from the message validator, including nested union branches, are prefixed with `message`, so callers see the same issues as when one validator covered the whole envelope. It does not normalize or repair the generated result. When the only failures are unknown variants inside lists, the boundary removes those elements and validates once more ([protocol-compatibility](protocol-compatibility.md#the-protocol-contract-always-compatible)). The reader classifies failures from the issue list, so it behaves the same over the generated validator and Zod, and a valid message pays nothing extra.
`packages/protocol/src/validation/ws-outbound.ts` is the shipped boundary. It validates the envelope with a generated validator that checks only each session message's `type` tag, then runs the generated validator for that one message type and returns the validated data. Issue paths from the message validator, including nested union branches, are prefixed with `message`, so callers see the same issues as when one validator covered the whole envelope. It does not normalize, repair, or re-validate the generated result.
Keep one generated function per message type. zod-aot inlines every nested schema into the function it compiles, so compiling `WSOutboundMessageSchema` as a whole produced one 11 MB function. On V8 (daemon clients, plugin hosts, the CLI, and Electron), the Maglev tier compiled that function once it was hot, allocating about 800 MB and stalling for seconds, and compiled it again after each deoptimization. Hermes has no JIT, so mobile never showed it. `packages/protocol/tests/validation/ws-outbound.test.ts` fails if a generated function grows past 1 MB.
@@ -21,7 +21,7 @@ The protocol package owns generation.
- `packages/protocol/src/validation/ws-outbound-envelope.ts` defines the tag-only envelope schema and exposes the session message schemas that get their own validators.
- `packages/protocol/scripts/generate-validation-aot.mjs` writes the zod-aot discovery entry and the runtime schema metadata, runs the exact-pinned compiler, and applies the small local compiler patches before generation. It also emits the `type` → validator map the boundary dispatches through.
- `packages/protocol/scripts/watch-validation-aot.mjs` reruns generation while editing protocol sources.
- `packages/protocol/codegen/generated/ws-outbound.compile.ts`, `packages/protocol/src/generated/validation/ws-outbound.aot.ts`, `packages/protocol/src/generated/validation/ws-outbound-schema-metadata.ts`, and `packages/protocol/src/generated/validation/message-defaults.ts` are generated and gitignored. The metadata module lets generated code reach schema fallback/default values, and `message-defaults.ts` lets zero-Zod clients (`packages/protocol/src/validation/message-defaults.ts`) apply every schema `.default()` without loading Zod or `ws-outbound.aot.ts`.
- `packages/protocol/codegen/generated/ws-outbound.compile.ts`, `packages/protocol/src/generated/validation/ws-outbound.aot.ts`, and `packages/protocol/src/generated/validation/ws-outbound-schema-metadata.ts` are generated and gitignored. The metadata module lets generated code reach schema fallback/default values.
Generation runs from protocol-owned lifecycle hooks: `prebuild`, `pretypecheck`, `pretest`, and `watch`. Installs do not run generation: published packages consume protocol from prebuilt `dist`, and local build/typecheck/test flows generate the source file at the point it is actually needed.
-3
View File
@@ -340,9 +340,6 @@ See the [public usage source reference](../public-docs/plugins/reference.md#usag
contract, account and window identity, provider-derived period names, login fallback, and
read-only credential rules. Usage adapters own the interpretation of provider fields; the app
renders their names and resolves pins without provider-specific duration guesses.
Claude's OAuth usage endpoint is undocumented. Extra-usage amounts are reported in minor currency
units and displayed only for USD; the balance contract does not represent other currencies.
Codex individual spending limits provide percentages, not dollar amounts.
---
+74 -113
View File
@@ -4,41 +4,29 @@ All workspaces share one version and release together.
## Two steps
A release has two steps. The agent runs Preparation before approval, and the user authorizes Ship.
A release has exactly two steps. The agent does the first, the user authorizes the second.
### Preparation
**Preparation** (reversible — agent does this on the release branch):
Preparation is reversible and runs on the release branch before the user authorizes shipping.
- resolve the [release base](#release-base-and-source) and get the [release inventory](#release-inventory) approved when one applies
- classify the diff from the previous stable to the release source as patch or minor, then show the
target version and rationale to the user
- draft `CHANGELOG.md` and `CHANGELOG.zh-CN.md`, show the draft to the user, and wait for review
- run the pre-release sanity check (stable only) and surface findings to the user
- commit the approved changelog and any requested ACP update, run format, lint, and typecheck, then
run `npm run release:prep:<mode>` to create the `chore(release): cut <version>` commit without a tag
- push the `release/vX.Y.Z` or `release/vX.Y.Z-beta.N` branch and confirm its `CI` and
`Desktop Packages` runs pass (never wait on `main` CI)
- run the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
1. Resolve the [release base](#release-base-and-source) and get the [release inventory](#release-inventory) approved when one applies.
2. Classify the diff from the previous stable release to the release source as patch or minor, then show the target version and rationale to the user.
3. Draft `CHANGELOG.md` and `CHANGELOG.zh-CN.md`, show the draft to the user, and wait for approval.
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.
**Go-ahead** (user says "go ahead"):
### Ship
Ship starts after the user says "go ahead". All tag-triggered GitHub Actions workflows and EAS workflows build from the checked-out tag commit with local workspace packages, so none of them install `@getpaseo/*` from the public npm registry.
1. Run `npm run release:push` first to verify the clean release branch and push `vX.Y.Z` or `vX.Y.Z-beta.N`. Pushing the tag takes a few seconds and starts `Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and (for stable tags) `Deploy App` on GitHub Actions, plus `Release Mobile` (stable) or `Release iOS Beta` (beta) on EAS. (`Deploy Website` runs later on the `release: published` event when `Desktop Release` publishes the stable GitHub Release.)
2. Run `npm run release:publish` (stable) or `npm run release:publish:beta` (beta) in parallel with the remote builds. `scripts/publish-release-packages.mjs` publishes the seven `@getpaseo/*` packages in dependency waves and polls npm visibility between packages to avoid `E409` or `E404` propagation races.
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.
4. Create the release heartbeat immediately with `create_heartbeat` to track every ship step to completion.
### Sync gates
Wait until every gate below passes before deleting the remote release branch or reporting the release as shipped:
- All seven `@getpaseo/*` npm packages are visible on `latest` (stable) or `beta` (beta), and on stable the `beta` dist-tag points to the shipped version unless an active newer beta exists.
- All tag-triggered GitHub Actions workflows are green (`Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and `Deploy App` for stable), and `Deploy Website` ran after stable publication.
- The GitHub Release is published and non-draft (marked prerelease for beta) with the synced changelog body, all macOS, Linux, and Windows assets, the Android APK asset, and all three channel manifests (`latest-mac.yml`, `latest-linux.yml`, `latest.yml` for stable; `beta-mac.yml`, `beta-linux.yml`, `beta.yml` for beta).
- The matching EAS workflow is green (`Release Mobile` with all six build, distribution, screenshot, and review-submission jobs for stable; `Release iOS Beta` for beta).
- The reconcile PR is merged into `main`.
Once all sync gates pass, delete the remote release branch (`git push origin --delete release/vX.Y.Z` or `release/vX.Y.Z-beta.N`), delete the heartbeat, and report the release as shipped.
- run `npm run release:ship` (stable) or `npm run release:ship:beta` (beta), which publishes npm
with retry and registry visibility checks, advances the `beta` dist-tag on stable when newer, and
pushes the tag on the already-verified commit
- create the release heartbeat immediately and babysit it to completion
- open the [reconcile `main`](#reconcile-main) PR right away so its CI runs in parallel with release
builds, then delete the remote release branch once the PR merges
Rules that apply to both steps:
@@ -118,25 +106,22 @@ An explicit user instruction can select another base.
`chore(release): cut <version>` without a tag.
5. Push the release branch (`git push -u origin HEAD`). Pushing any `release/**` branch triggers
`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.
Wait for both runs on the release branch commit to pass before shipping.
groups, isolated from `main` traffic. Never wait on `main` CI, because `main` cancels in-progress
runs on every merge. Wait for both runs on the release branch commit to pass before shipping.
Complete the [pre-release dependency checks](#pre-release-dependency-checks) on that commit.
Pushing a `release/**` branch without a `v*` tag triggers no publish workflows.
6. After go-ahead, push the tag first with `npm run release:push` so remote builds start right away.
Because the release branch is already pushed at `HEAD`, no second branch CI run starts, and only
the tag release workflows run.
7. Immediately in parallel after `npm run release:push` finishes: publish npm packages with
`npm run release:publish` (stable) or `npm run release:publish:beta` (beta), 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
`release:push` before `release:publish`, so tag builds never wait behind npm.)
6. After go-ahead, run `npm run release:ship` (stable) or `npm run release:ship:beta` (beta). This
publishes to npm and pushes the `v*` tag on the already-verified commit. Because the release
branch is already pushed at `HEAD`, no second CI run starts and only the tag release workflows
run.
7. Start [Reconcile `main`](#reconcile-main) immediately so its PR checks overlap with desktop and
EAS builds.
When promoting or branching from a tag created before `release:prep:*`, `release:ship`, and the
`release/**` workflow triggers existed (for example `v0.17.0-beta.1`), either cherry-pick the
release-tooling commit onto the release branch (leaving product code unchanged) or follow the
older tag's scripts (`version:all:*`, manual `gh workflow run ci.yml --ref <branch>`,
`release:push`, and `release:publish`) until the next tag carries the new tooling.
`release:publish`, and `release:push`) until the next tag carries the new tooling.
A stable hotfix can take the version a patch beta line would promote to, such as `0.13.3`
shipping while `0.13.3-beta.2` soaks. Never republish or reuse a shipped version. Continue the line
@@ -145,7 +130,7 @@ computes that from a prerelease, so run `npm run release:check`, bump with
`npm version 0.13.4-beta.1 --include-workspace-root --no-git-tag-version && git commit -m "chore(release): cut 0.13.4-beta.1"`,
push the release branch for `CI` and `Desktop Packages`, and complete the
[pre-release dependency checks](#pre-release-dependency-checks) before shipping with
`npm run release:push` and `npm run release:publish:beta` (or `npm run release:ship:beta`).
`npm run release:ship:beta`.
Record the tested beta tag as its source so its soak still counts for the unchanged content.
## Release inventory
@@ -174,7 +159,8 @@ 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:
Right after the tag push (in parallel with desktop 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`:
```bash
git fetch origin --tags
@@ -194,10 +180,10 @@ hunks from the release base:
- 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
(`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`.
Commit, open the PR into `main`, and merge once its checks pass. After the reconcile PR merges and
the release completes, delete the remote release branch (`git push origin --delete release/vX.Y.Z`
or `release/vX.Y.Z-beta.N`). The tag is the record of shipped source; Paseo maintains no release
track besides `main`.
## ACP catalog updates
@@ -254,32 +240,26 @@ npm run release:prep:minor
git push -u origin HEAD
# Complete the pre-release dependency checks on this commit.
# 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.
# (`npm run release:ship` runs `release:push` before `release:publish` if used standalone.)
# 3. After go-ahead and green release-branch checks: publish npm and push the tag.
npm run release:ship
```
`scripts/push-current-release-tag.mjs` refuses non-`release/*` branches, checks that `HEAD` matches `origin/release/*`, tags `HEAD` with `vX.Y.Z`, and pushes the tag. Because `HEAD` is already on the pushed release branch, no second branch CI run starts.
`release:ship` runs `scripts/publish-release-packages.mjs` and `scripts/push-current-release-tag.mjs`:
`scripts/publish-release-packages.mjs` publishes the seven `@getpaseo/*` packages in dependency-wave order:
- Publishes all seven `@getpaseo/*` packages in dependency order, skips versions already on npm,
retries transient 429/5xx/network errors, and waits until each version is visible on npm before
continuing.
- Checks `npm view @getpaseo/cli dist-tags` and moves npm's `beta` dist-tag to the new stable
version across all seven packages whenever the stable version is newer than `beta` (leaving
`beta` untouched during a stable hotfix on an older line).
- Refuses non-`release/*` branches, tags `HEAD` with `vX.Y.Z`, and pushes the tag. Because `HEAD`
is already on the release branch, no second CI run starts.
1. Wave 1: `@getpaseo/highlight`, `@getpaseo/relay`, and `@getpaseo/protocol` (no `@getpaseo/*` dependencies).
2. Wave 2: `@getpaseo/client` (depends on `@getpaseo/protocol` and `@getpaseo/relay`).
3. Wave 3: `@getpaseo/plugin` (depends on `@getpaseo/client` and `@getpaseo/protocol`).
4. Wave 4: `@getpaseo/server` (depends on `@getpaseo/client`, `@getpaseo/highlight`, `@getpaseo/plugin`, `@getpaseo/protocol`, and `@getpaseo/relay`).
5. Wave 5: `@getpaseo/cli` (depends on `@getpaseo/client`, `@getpaseo/protocol`, and `@getpaseo/server`).
The tag push triggers `Desktop Release`, `Android APK Release`, `Docker`, and `Release Notes Sync` on GitHub Actions. The workflows create the GitHub Release as a draft while builds and release-note sync run. EAS picks up the same tag via the EAS GitHub app and starts the iOS + Android store builds in parallel (see "Mobile builds (EAS)" below) — there is no mobile-release workflow under `.github/workflows`.
After each `npm publish`, the script polls `npm view` (up to 12 checks, 5 seconds apart) until the published version is visible on npm before moving to the next package. Waiting for registry visibility prevents dependent publishes and manual retries from hitting `E409` conflicts or `E404` propagation lag. On stable releases, the script also checks `npm view @getpaseo/cli dist-tags` and moves npm's `beta` dist-tag to the new stable version across all seven packages whenever the stable version is newer than `beta` (leaving `beta` untouched during a stable hotfix on an older line).
Verify `npm view @getpaseo/cli dist-tags` shows `latest` at the shipped version, and `beta` at the shipped version or an active newer beta, before considering the stable release complete.
The tag push triggers `Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and `Deploy App` (`app.paseo.sh`, stable tags only) on GitHub Actions. `Desktop Release` and `Release Notes Sync` create the GitHub Release as a draft while builds and release-note sync run. `Deploy Website` triggers later on `release: published` when `Desktop Release` publishes the non-draft stable GitHub Release. EAS picks up the same tag through the EAS GitHub app and starts `Release Mobile` (iOS and Android store builds) in parallel, with no mobile-release workflow under `.github/workflows`. None of these workflows install `@getpaseo/*` from the public npm registry because all of them build from the checked-out tag commit and workspace packages.
Confirm that `npm view @getpaseo/cli dist-tags` shows `latest` at the shipped version, and `beta` at the shipped version or an active newer beta, before considering the stable release complete.
The Docker workflow builds images from the checked-out source tree on `main` as non-publishing checks (a running check finishes, and a newer merge replaces the pending one). Stable `vX.Y.Z` tag pushes publish `ghcr.io/getpaseo/paseo:X.Y.Z` and `ghcr.io/getpaseo/paseo:latest`; beta `vX.Y.Z-beta.N` tag pushes publish only `ghcr.io/getpaseo/paseo:X.Y.Z-beta.N` and never move `latest`.
The Docker workflow builds images from the checked-out source tree on `main` as non-publishing checks (cancelling superseded `main` runs). Stable `vX.Y.Z` tag pushes publish `ghcr.io/getpaseo/paseo:X.Y.Z` and `ghcr.io/getpaseo/paseo:latest`; beta `vX.Y.Z-beta.N` tag pushes publish only `ghcr.io/getpaseo/paseo:X.Y.Z-beta.N` and never move `latest`.
The production relay is the Elixir service in [getpaseo/paseo-relay](https://github.com/getpaseo/paseo-relay), with its own deployment process. Paseo releases and pushes to this repository do not deploy it. The Cloudflare relay code and workflow in this repository are legacy and are not used in production.
@@ -296,10 +276,8 @@ npm run version:all:minor
git push -u origin HEAD # Trigger CI + Desktop Packages on release/vX.Y.Z
# Wait for CI and Desktop Packages 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.
npm run release:push # Create tag vX.Y.Z on HEAD and push (triggers release workflows)
```
## Beta flow
@@ -316,19 +294,15 @@ npm run release:prep:beta:next # Cut X.Y.Z-beta.2, beta.3, ...
git push -u origin HEAD
# Complete the pre-release dependency checks on this commit.
# 3. After go-ahead: push the tag first, then run npm publish, reconcile, 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.)
# 3. After go-ahead:
npm run release:ship:beta
# Later, after soak, promote on release/vX.Y.Z:
npm run release:prep:promote
git push -u origin HEAD
# Wait for CI + Desktop Packages 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.
npm run release:ship
```
- Beta tags are published GitHub prereleases like `v0.1.41-beta.1`
@@ -515,7 +489,7 @@ macOS 13 maps to Darwin 22. The two values use different version domains; do not
iOS and Android store builds are not in `.github/workflows`. They are triggered by the EAS GitHub app the moment the `v*` tag is pushed:
- **Android (Play Store)** — EAS builds with profile `production` and auto-submits to the Play Store via `eas submit` (EAS-managed credentials). A Fastlane lane then replaces the store screenshots.
- **iOS (TestFlight + App Store)** — EAS builds with profile `production`, uploads once through a `testflight` job, distributes the build to the `Paseo Beta` external group with Beta App Review submission, and a Fastlane lane uploads the store screenshots and submits that same build for App Store review. When an earlier iOS version is already in Apple's review or release queue (`WAITING_FOR_REVIEW`, `IN_REVIEW`, `PENDING_APPLE_RELEASE`, `PENDING_DEVELOPER_RELEASE`, `PROCESSING_FOR_DISTRIBUTION`, `WAITING_FOR_EXPORT_COMPLIANCE`, or `ACCEPTED`), `submit_review` leaves it untouched, logs `IOS_REVIEW_SKIPPED` with the in-review version and the waiting TestFlight build, and exits `0` so `Release Mobile` stays green.
- **iOS (TestFlight + App Store)** — EAS builds with profile `production`, uploads once through a `testflight` job, distributes the build to the `Paseo Beta` external group with Beta App Review submission, and a Fastlane lane uploads the store screenshots and submits that same build for App Store review.
- **Android APK (GitHub Release asset)** — separate, via `.github/workflows/android-apk-release.yml`. This is the only Android-related workflow that lives in this repo.
EAS uses the local app version source. `packages/app/app.config.js` derives the native version from the package version. Android `versionCode` is `major * 1_000_000 + minor * 1_000 + patch`. iOS reserves 1,000 build slots per app version: beta `N` uses slot `N`, and stable uses slot `999`. For example, `0.2.6-beta.2` appears in App Store Connect as version `0.2.6` build `2006002`; stable uses build `2006999`. Rebuilding the same tag produces the same native build number; if a store has already accepted a binary and you need a different binary, cut the next beta or patch instead of relying on EAS remote auto-increment.
@@ -561,22 +535,11 @@ npx eas build:view <build-id>
# and submit_ios_for_review.
npx eas workflow:view <workflow-run-id> --json
# Read submit/review job logs (also check for IOS_REVIEW_SKIPPED on green runs).
# Read failed submit/review job logs.
npx eas workflow:logs <workflow-job-id> --all-steps --non-interactive
# Stream logs for a build.
npx eas build:view <build-id> --json | jq '.logFiles[]'
# Check live App Store Connect review state + top 5 recent iOS TestFlight builds.
npx eas workflow:run ios-review-status.yml
# Submit a waiting TestFlight build once the review slot is free (default replace_in_review=false skips if still active).
npx eas workflow:run resubmit-ios-review.yml
# Or force-replace an in-flight review for an urgent iOS hotfix:
npx eas workflow:run resubmit-ios-review.yml -F app_version=0.18.1 -F app_build_version=18001999 -F replace_in_review=true
# Cancel an active in-flight iOS App Store review (pass expected_version to guard against version drift).
npx eas workflow:run cancel-ios-review.yml -F expected_version=0.18.0
```
A build's `gitCommitHash` must match the release tag commit. `status` walks through `NEW` → `IN_QUEUE` → `IN_PROGRESS` → `FINISHED` (or `ERRORED`/`CANCELED`). The EAS workflow run's `gitCommitHash` and `trigger` must also match the release tag.
@@ -592,14 +555,15 @@ For the `Release Mobile` EAS workflow, these jobs must pass:
- `submit_android` — Android binary submitted to the Play Store
- `upload_android_screenshots` — Google Play screenshots replaced from the repo
Do not treat `build_ios: SUCCESS` or `distribute_ios: SUCCESS` as a completed iOS release. `submit_ios_for_review: FAILURE` means the iOS release is blocked even if the build is visible in TestFlight. Even when `submit_ios_for_review` passes, inspect its log with `npx eas workflow:logs <workflow-job-id> --all-steps --non-interactive` for `IOS_REVIEW_SKIPPED`. If App Store submission was skipped because an earlier version is already in flight, explicitly notify the maintainer with both the in-review version/state and the waiting TestFlight version/build so they can either let the current review finish and run `npx eas workflow:run resubmit-ios-review.yml` later, or replace it with `replace_in_review=true`.
Do not treat `build_ios: SUCCESS` or `distribute_ios: SUCCESS` as a completed iOS release. `submit_ios_for_review: FAILURE` means the iOS release is blocked even if the build is visible in TestFlight.
To confirm the submission landed, inspect the EAS workflow with `npx eas workflow:view <workflow-run-id> --json`. App Store Connect (review state for the matching version/build) and the Play Console track are the final ground truth.
## Release completion and heartbeat
A release is in progress once the tag is pushed. Report it as shipped only after every applicable
[sync gate](#sync-gates) and completion checklist item passes.
A release is **in progress** after npm publication and tag push. Report it as
**shipped** only after every applicable build, publication, asset, manifest, and
store submission passes the completion checklist.
Immediately after every beta, stable, or promotion tag push, create a heartbeat
that resumes the release in the current conversation. Create it automatically
@@ -608,10 +572,9 @@ the completion checklist or finds a failure that needs new user authority.
Each heartbeat checks the release tag commit, `CI` and `Desktop Packages` for the release branch,
every tag-triggered GitHub Actions run (`Desktop Release`, `Android APK Release`, `Docker`,
`Release Notes Sync`, and `Deploy App` for stable), `Deploy Website` after stable release
publication, npm dist-tags, the GitHub Release body and assets, desktop updater manifests, the
published Docker image, the applicable EAS workflow, the reconcile PR, and remote release branch
cleanup. Inspect the GitHub Release itself and confirm that the macOS, Linux,
`Release Notes Sync`), npm dist-tags, the GitHub Release body and assets, desktop updater
manifests, the published Docker image, the applicable EAS workflow, the reconcile PR, and remote
release branch cleanup. Inspect the GitHub Release itself and confirm that the macOS, Linux,
Windows, and Android APK assets are present along with the channel manifests
(`latest-mac.yml`, `latest-linux.yml`, and `latest.yml` for stable;
`beta-mac.yml`, `beta-linux.yml`, and `beta.yml` for beta).
@@ -634,7 +597,7 @@ Pattern:
"timezone": "UTC",
"maxRuns": 120,
"expiresIn": "24h",
"prompt": "Resume the vX.Y.Z release babysit for commit <sha>. Check npm tags; CI and Desktop Packages on release/vX.Y.Z; every tag-triggered GitHub Actions run (Desktop Release, Android APK Release, Docker, Release Notes Sync, and Deploy App on stable) plus Deploy Website after release publish; the published GitHub Release body, expected desktop/APK assets, and channel manifests; the Docker image; the matching EAS workflow; and the reconcile PR into main. Completion requires every applicable checklist item. For stable, require build_ios, distribute_ios (Paseo Beta external distribution and Beta App Review submission), submit_ios_for_review, build_android, submit_android, and upload_android_screenshots to succeed, and inspect the submit_ios_for_review log for IOS_REVIEW_SKIPPED (if skipped, explicitly report both the in-review version and the waiting TestFlight build to the maintainer). For beta, require the beta TestFlight distribution and Beta App Review path. If work is pending, wait for the next heartbeat. If a failure can be retried safely for the same version, follow the failed-release procedure; otherwise report the blocker. When every applicable completion-checklist item passes and the reconcile PR is merged, delete origin/release/vX.Y.Z, delete THIS heartbeat, report shipped, and stop.",
"prompt": "Resume the vX.Y.Z release babysit for commit <sha>. Check npm tags; CI and Desktop Packages on release/vX.Y.Z; every tag-triggered GitHub Actions run; the published GitHub Release body, expected desktop/APK assets, and channel manifests; the Docker image; the matching EAS workflow; and the reconcile PR into main. Completion requires every applicable checklist item. For stable, require build_ios, distribute_ios (Paseo Beta external distribution and Beta App Review submission), submit_ios_for_review, build_android, and submit_android to succeed. For beta, require the beta TestFlight distribution and Beta App Review path. If work is pending, wait for the next heartbeat. If a failure can be retried safely for the same version, follow the failed-release procedure; otherwise report the blocker. When every applicable completion-checklist item passes and the reconcile PR is merged, delete origin/release/vX.Y.Z, delete THIS heartbeat, report shipped, and stop.",
}
```
@@ -659,8 +622,6 @@ The GitHub Release body is populated automatically by the `Release Notes Sync` w
**NEVER bump the version to fix a build problem.** New versions are reserved for meaningful product changes (features, fixes, improvements). Build/CI failures are fixed on the current version.
If `npm run release:publish` or `npm run release:publish:beta` fails after `npm run release:push` pushed the tag, fix the npm authentication, OTP, or local build issue and rerun the publish command on the same commit. Do not move or force-push the `v*` tag, because `scripts/publish-release-packages.mjs` skips packages already visible on npm and resumes from the remaining packages.
**Do not rely on `workflow_dispatch` for tagged code fixes.** The `workflow_dispatch` trigger runs the workflow file from the default branch but checks out the code at the tag ref (`ref: ${{ inputs.tag }}`). That means fixes committed to `main` won't change the tagged source tree being built. `workflow_dispatch` only helps when the fix lives in the workflow file itself.
For Docker-only retries, **do not push or force-push a `v*` release tag**.
@@ -745,7 +706,9 @@ intentionally unavailable to desktop updater clients.
- The npm `version` lifecycle regenerates F-Droid changelog files from `CHANGELOG.md` for stable releases only (`npm run fdroid:changelogs`) and stages them, so the release commit and tag carry them. Betas are a no-op. A stable run **aborts the release** if `CHANGELOG.md` has no entry for the version being cut — commit the changelog entry first. See [docs/android.md](android.md) for why these files are generated per ABI.
- `release:prepare` refreshes workspace `node_modules` links to prevent stale types.
- `npm run dev:desktop` and `npm run build:desktop` target the Electron desktop package in `packages/desktop`.
- `release:publish` and `release:publish:beta` run `scripts/publish-release-packages.mjs`. They publish the seven `@getpaseo/*` packages in dependency waves, skip versions already visible on npm, retry transient registry errors, and poll `npm view` between packages so dependents do not hit `E409` or `E404` propagation lag. `release:ship` and `release:ship:beta` run `release:push` before `release:publish` or `release:publish:beta`.
- `release:publish` and `release:publish:beta` run `scripts/publish-release-packages.mjs`: if a run
fails partway through, re-running skips versions already published on npm, retries transient
registry errors, and waits for each version to become visible on npm before continuing.
- The website uses GitHub's latest published release API for download links, so published beta prereleases do not replace the stable download target.
## Changelog format
@@ -1006,8 +969,8 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] The diff from the previous stable to the resolved release source is classified as patch or minor, with the target version and rationale approved
- [ ] `npm run release:prep:beta:patch`, `release:prep:beta:minor`, or `release:prep:beta:next` created the version commit on `release/vX.Y.Z-beta.N` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI)
- [ ] 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
- [ ] All seven `@getpaseo/*` npm packages show the version under the `beta` dist-tag, not `latest`
- [ ] After go-ahead, `npm run release:ship:beta` published npm and pushed the `vX.Y.Z-beta.N` tag without triggering a second CI run
- [ ] npm shows the version under the `beta` dist-tag, not `latest`
- [ ] The GitHub prerelease was published only after the three beta manifests were uploaded, and it has the changelog body and every expected macOS, Linux, Windows, and Android APK asset
- [ ] GitHub `Desktop Release` workflow for the `v*-beta.N` tag is green
- [ ] The GitHub prerelease contains `beta-mac.yml`, `beta-linux.yml`, and `beta.yml`
@@ -1015,7 +978,7 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] GitHub `Docker` workflow is green and the versioned beta image is published without moving `latest`
- [ ] GitHub `Release Notes Sync` mirrored the beta entry into the prerelease body
- [ ] EAS `Release iOS Beta` completed its build, TestFlight distribution, external beta group, and Beta App Review path
- [ ] The [reconcile PR](#reconcile-main) brought the shipped changelog entries and version into `main` and merged before cleanup, and `origin/release/vX.Y.Z-beta.N` was deleted after all sync gates passed
- [ ] The [reconcile PR](#reconcile-main) brought the shipped changelog entries and version into `main`, and `origin/release/vX.Y.Z-beta.N` was deleted
- [ ] The release heartbeat was created after the tag push and deleted only after every item above passed
### Stable release (or promotion)
@@ -1025,13 +988,13 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] The release base and changes match the [release base table](#release-base-and-source) and any approved [inventory](#release-inventory)
- [ ] A promotion ships the tested beta's product content after its soak, unless the user explicitly overrode either default
- [ ] Every PR in the release range has been opened, and its full description and every linked issue have been read before drafting the changelog
- [ ] 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
- [ ] 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)
- [ ] 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
- [ ] 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`
- [ ] After go-ahead, `npm run release:ship` published npm, updated dist-tags, and pushed the `vX.Y.Z` tag without triggering a second CI run
- [ ] `latest` resolves to the new stable, and `beta` resolves to it too unless an active newer beta holds `beta`
- [ ] The GitHub Release was published only after the three stable manifests were uploaded, and it has the changelog body and every expected macOS, Linux, Windows, and Android APK asset
- [ ] GitHub `Desktop Release` workflow for the `v*` tag is green
- [ ] The GitHub Release contains `latest-mac.yml`, `latest-linux.yml`, and `latest.yml`
@@ -1039,13 +1002,11 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] GitHub `Android APK Release` workflow for the same tag is green
- [ ] GitHub `Docker` workflow is green and both the versioned and `latest` images are published
- [ ] GitHub `Release Notes Sync` is green and the release body matches the stable changelog entry
- [ ] GitHub `Deploy App` workflow for the same tag is green, and `Deploy Website` succeeded after the release published
- [ ] EAS `Release Mobile` workflow for the same tag is green
- [ ] EAS iOS `build_ios` completes for the same tag
- [ ] EAS iOS `distribute_ios` succeeds, uploading the binary once, distributing it to `Paseo Beta`, and submitting it for Beta App Review
- [ ] EAS iOS `submit_ios_for_review` succeeds, putting the build into App Store review (or its log was checked for `IOS_REVIEW_SKIPPED` and the maintainer was notified with both the in-review version and the waiting TestFlight build)
- [ ] EAS iOS `submit_ios_for_review` succeeds, putting the build into App Store review
- [ ] EAS Android `build_android` completes for the same tag
- [ ] EAS Android `submit_android` succeeds, putting the build on its Play Store track
- [ ] EAS Android `upload_android_screenshots` succeeds for the same tag
- [ ] The [reconcile PR](#reconcile-main) brought the shipped changelog entries, F-Droid changelogs, and version into `main` and merged before cleanup, and `origin/release/vX.Y.Z` was deleted after all sync gates passed
- [ ] The [reconcile PR](#reconcile-main) brought the shipped changelog entries, F-Droid changelogs, and version into `main`, and `origin/release/vX.Y.Z` was deleted
- [ ] The release heartbeat was created after the tag push and deleted only after every item above passed
+1 -1
View File
@@ -30,7 +30,7 @@ Terminal directory snapshots (`terminalsChanged`) and workspace contribution cha
Each `onChange` delivers both the new snapshot and the `previous` one (`{ state, changedAt }`). The transition flows unchanged up through `TerminalSession.onActivityChange` (as `{ activity, previous }`), the worker protocol's `terminalActivityChange` event, and the manager-level `subscribeTerminalActivity(listener)` stream (`{ terminalId, name, cwd, activity, previous }`).
The daemon consumes these transitions, not snapshots. When a transition moves from `working` to `idle`, the tracker records finished attention, so the terminal shows the same green finished dot as an idle agent that needs review. Focusing the terminal tab or using Mark as read on its owning workspace clears finished attention. Mark as read leaves needs-input attention alone, the same way it leaves an agent's pending permission. The websocket layer also fires a "Terminal finished" attention notification. A terminal that exits while still working emits no turn-end notification.
The daemon consumes these transitions, not snapshots. When a transition moves from `working` to `idle`, the tracker records finished attention, so the terminal shows the same green finished dot as an idle agent that needs review. The websocket layer also fires a "Terminal finished" attention notification. A terminal that exits while still working emits no turn-end notification.
Terminal list visibility is `workspaceId`-scoped: a terminal belongs to the workspace that created it, and same-`cwd` sibling workspaces do not see it in their terminal lists. Terminal status routing starts from that owning workspace, uses the owning workspace's `cwd`, then fans the status bucket out to every active workspace with the same `cwd`.
+1 -1
View File
@@ -200,7 +200,7 @@ Test suites in this repo are heavy. Running them in bulk freezes the machine, es
## Pull-request test routing
PR checks are routed by the behavior each suite proves, using `.github/ci-paths.yml`. A package does not inherit every test suite of its runtime consumers: app changes do not run CLI or Electron-wrapper tests, and protocol changes do not run every package that imports the protocol. The CLI E2E tests are the exception: they drive a real daemon, so changes to the server or built-in plugins run them too. Cross-package static compatibility belongs to `typecheck`; full integration coverage runs after merge on main and in manual CI runs.
PR checks are routed by the behavior each suite proves, using `.github/ci-paths.yml`. A package does not inherit every test suite of its runtime consumers: app changes do not run CLI or Electron-wrapper tests, and protocol changes do not run every package that imports the protocol. Cross-package static compatibility belongs to `typecheck`; full integration coverage runs after merge on main and in manual CI runs.
Required matrix legs are declared as statically named jobs. Their shared steps use YAML anchors, while job-level `if` conditions let GitHub report an unaffected leg as genuinely skipped without allocating a runner or losing the exact required-check name.
+8 -24
View File
@@ -330,35 +330,19 @@ that starts or accepts them. Received messages retain sender attribution, while
notifications remain visible events. Collapse, timing and locally mounted history share
these boundaries.
Agent-message markup belongs to the daemon's `agent/agent-messages` boundary. Prompt delivery encodes
Agent-message XML belongs to the daemon's `agent/agent-messages` boundary. Prompt delivery encodes
provenance; acceptance, provider echoes, import, and replay share its projection. The delivery ID is
also the projected call ID, so a provider echo cannot create a second row. Sender IDs are opaque and
do not imply local ownership or authorization. Capture the sender title at delivery: archived or
removed senders must remain understandable without a live directory lookup.
Each delivered message keeps its text first and ends with a `<paseo-message … length="N"/>` marker.
Text at character 0 stays the sender's, so a provider still reads a slash command there, and bodies
are never escaped. `length` bounds the text before the marker, so marker syntax inside a body cannot
split it, and a batch splits back into rows by reading markers from the end. A person's prompt gets a
marker only when it shares a provider turn with other deliveries or contains `<paseo-message` or
`<paseo-system`. Transcripts written before markers open with a `<paseo-system>` envelope; the
projection still reads those (`COMPAT(leadingPaseoSystemEnvelope)`).
The daemon decides whether a delivery is a message or a tool call, and clients render what it sends:
- A person's text is a `user_message`.
- A peer message is an `agent_message` tool call whose `agentMessage` carries sender and text. The
wire has no sender on `user_message`, so clients present it as a "Sent by" bubble.
- Lifecycle notifications (`agent_finished`, `agent_errored`, `agent_needs_permission`,
`agent_closed`), schedule fires (`heartbeat`), and change-request updates
are plain tool calls. `plain_text` detail carries the sender in `label`, the body in `text`, and
the icon. Clients render the heading from the tool name, so no notification event reaches them.
`isTimelineTurnTrigger` (`packages/protocol/src/timeline-turn.ts`) lists the delivered tool names that
start a turn. Add a name there when the daemon projects a new delivery. Rows that older daemons stored
with notification `agentMessage` metadata are rewritten to the plain call at presentation
(`COMPAT(agentNotificationMetadata)`). Stream reduction and disk-cache serialization preserve the
payload without rendering it.
The optional `agentMessage` payload carries event, sender, and delivered text. Shared client
presentation (`protocol/paseo-tool-presentation`) owns its heading and expanded details, next to the
labels for every Paseo MCP tool. The daemon
must not construct UI labels or prepend sender labels to the semantic message body. The existing
`tool_call` / `plain_text` envelope is a compatibility adapter: older clients still parse the row and
expand its body. New clients use the typed payload, never infer the event from a tool name or parse
XML. Stream reduction and disk-cache serialization preserve the payload without rendering it.
The compatibility boundary for older daemons is snapshot normalization: running/idle status becomes an
anonymous active turn or idle state once, and downstream code consumes the same activity shape. The app
@@ -1,4 +0,0 @@
- Remote workspace browser proxy: Desktop browser tabs in remote workspaces now route through the workspace daemon, so remote localhost servers open directly in Paseo.
- Per-device notification preferences: Each device can choose which agent, terminal, and plugin events send notifications, and plugins can send notifications and handle taps.
Full notes: https://paseo.sh/changelog
@@ -1,4 +0,0 @@
- Remote workspace browser proxy: Desktop browser tabs in remote workspaces now route through the workspace daemon, so remote localhost servers open directly in Paseo.
- Per-device notification preferences: Each device can choose which agent, terminal, and plugin events send notifications, and plugins can send notifications and handle taps.
Full notes: https://paseo.sh/changelog
@@ -1,4 +0,0 @@
- Remote workspace browser proxy: Desktop browser tabs in remote workspaces now route through the workspace daemon, so remote localhost servers open directly in Paseo.
- Per-device notification preferences: Each device can choose which agent, terminal, and plugin events send notifications, and plugins can send notifications and handle taps.
Full notes: https://paseo.sh/changelog
@@ -1,4 +0,0 @@
- Remote workspace browser proxy: Desktop browser tabs in remote workspaces now route through the workspace daemon, so remote localhost servers open directly in Paseo.
- Per-device notification preferences: Each device can choose which agent, terminal, and plugin events send notifications, and plugins can send notifications and handle taps.
Full notes: https://paseo.sh/changelog
@@ -1,8 +0,0 @@
- Host metadata instructions: Set host-wide instructions once to guide language, tone, and formatting for generated workspace titles, branch names, commit messages, and pull requests.
- Enterprise spending usage: Usage now shows Claude extra-usage spending and Codex individual spending limits with reset times.
Fixed
- Fixed Android agent push notifications arriving minutes late during Doze
- Fixed Command Center results reordering mid-word while typing
Full notes: https://paseo.sh/changelog
@@ -1,8 +0,0 @@
- Host metadata instructions: Set host-wide instructions once to guide language, tone, and formatting for generated workspace titles, branch names, commit messages, and pull requests.
- Enterprise spending usage: Usage now shows Claude extra-usage spending and Codex individual spending limits with reset times.
Fixed
- Fixed Android agent push notifications arriving minutes late during Doze
- Fixed Command Center results reordering mid-word while typing
Full notes: https://paseo.sh/changelog
@@ -1,8 +0,0 @@
- Host metadata instructions: Set host-wide instructions once to guide language, tone, and formatting for generated workspace titles, branch names, commit messages, and pull requests.
- Enterprise spending usage: Usage now shows Claude extra-usage spending and Codex individual spending limits with reset times.
Fixed
- Fixed Android agent push notifications arriving minutes late during Doze
- Fixed Command Center results reordering mid-word while typing
Full notes: https://paseo.sh/changelog
@@ -1,8 +0,0 @@
- Host metadata instructions: Set host-wide instructions once to guide language, tone, and formatting for generated workspace titles, branch names, commit messages, and pull requests.
- Enterprise spending usage: Usage now shows Claude extra-usage spending and Codex individual spending limits with reset times.
Fixed
- Fixed Android agent push notifications arriving minutes late during Doze
- Fixed Command Center results reordering mid-word while typing
Full notes: https://paseo.sh/changelog
Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

+2 -19
View File
@@ -47,14 +47,8 @@
"ignore": ["android/**", "ios/**", ".expo/**", "dist/**", "scripts/reset-project.js"]
},
"packages/cli": {
"entry": [
"src/index.ts",
"bin/paseo",
"scripts/**/*.mjs",
"src/**/*.test.{ts,tsx}",
"tests/**/*.{ts,tsx}"
],
"project": ["src/**/*.{ts,tsx}", "scripts/**/*.mjs", "tests/**/*.{ts,tsx}"]
"entry": ["src/index.ts", "bin/paseo", "src/**/*.test.{ts,tsx}", "tests/**/*.{ts,tsx}"],
"project": ["src/**/*.{ts,tsx}", "tests/**/*.{ts,tsx}"]
},
"packages/relay": {
"entry": ["src/index.ts", "src/e2ee.ts", "src/cloudflare-adapter.ts", "src/**/*.test.ts"],
@@ -73,17 +67,6 @@
"entry": ["src/index.ts", "src/**/*.test.ts"],
"project": ["src/**/*.ts"]
},
"packages/workflows": {
"entry": [
"src/index.ts",
"src/ir.ts",
"src/dsl.ts",
"src/yaml.ts",
"src/testing.ts",
"test/**/*.test.ts"
],
"project": ["src/**/*.ts", "test/**/*.ts"]
},
"packages/expo-two-way-audio": {
"entry": ["src/index.ts"],
"project": ["src/**/*.ts"]
+1 -4
View File
@@ -128,8 +128,6 @@ buildNpmPackage {
cd packages/desktop
# The Nix output is not a distributable DMG, so leave it unsigned and
# disable the hardened runtime that requires a matching signature.
# Compiling the Icon Composer document needs Xcode, which the build
# does not have, so use the prebuilt icns.
CSC_IDENTITY_AUTO_DISCOVERY=false \
npm exec --offline -- electron-builder \
--config electron-builder.yml \
@@ -140,8 +138,7 @@ buildNpmPackage {
--config.buildVersion=${lib.escapeShellArg buildVersion} \
--config.mac.identity=null \
--config.mac.hardenedRuntime=false \
--config.mac.notarize=false \
--config.mac.icon=assets/icon.icns
--config.mac.notarize=false
)
''}
+1 -1
View File
@@ -1 +1 @@
sha256-34bUBmRmjekbUSp93597GLTmSWKt23TCHaK3ViXG+iU=
sha256-6XXAVBTH6rIdg5eQ9cUeUwV22ikVqTtdWo7i9DYO+/M=
+32 -49
View File
@@ -1,12 +1,12 @@
{
"name": "paseo",
"version": "0.18.1",
"version": "0.17.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "paseo",
"version": "0.18.1",
"version": "0.17.6",
"hasInstallScript": true,
"license": "Apache-2.0",
"workspaces": [
@@ -16,7 +16,6 @@
"packages/highlight",
"packages/plugin",
"packages/protocol",
"packages/workflows",
"packages/client",
"packages/server",
"packages/app",
@@ -6710,10 +6709,6 @@
"resolved": "packages/website",
"link": true
},
"node_modules/@getpaseo/workflows": {
"resolved": "packages/workflows",
"link": true
},
"node_modules/@gorhom/bottom-sheet": {
"version": "5.2.14",
"resolved": "https://registry.npmjs.org/@gorhom/bottom-sheet/-/bottom-sheet-5.2.14.tgz",
@@ -14929,6 +14924,7 @@
"version": "8.11.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
"integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.1",
@@ -31402,6 +31398,7 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6"
@@ -36231,6 +36228,7 @@
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"punycode": "^2.1.0"
@@ -37543,7 +37541,7 @@
},
"packages/app": {
"name": "@getpaseo/app",
"version": "0.18.1",
"version": "0.17.6",
"dependencies": {
"@codemirror/commands": "6.10.4",
"@codemirror/language": "6.12.4",
@@ -39696,13 +39694,13 @@
},
"packages/cli": {
"name": "@getpaseo/cli",
"version": "0.18.1",
"version": "0.17.6",
"license": "Apache-2.0",
"dependencies": {
"@clack/prompts": "^1.0.0",
"@getpaseo/client": "0.18.1",
"@getpaseo/protocol": "0.18.1",
"@getpaseo/server": "0.18.1",
"@getpaseo/client": "0.17.6",
"@getpaseo/protocol": "0.17.6",
"@getpaseo/server": "0.17.6",
"chalk": "^5.3.0",
"commander": "^12.0.0",
"mime-types": "^2.1.35",
@@ -39949,11 +39947,11 @@
},
"packages/client": {
"name": "@getpaseo/client",
"version": "0.18.1",
"version": "0.17.6",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/protocol": "0.18.1",
"@getpaseo/relay": "0.18.1",
"@getpaseo/protocol": "0.17.6",
"@getpaseo/relay": "0.17.6",
"ws": "^8.20.0",
"zod": "^4.4.3"
},
@@ -39965,7 +39963,7 @@
},
"packages/desktop": {
"name": "@getpaseo/desktop",
"version": "0.18.1",
"version": "0.17.6",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/cli": "*",
@@ -40208,7 +40206,7 @@
},
"packages/expo-two-way-audio": {
"name": "@getpaseo/expo-two-way-audio",
"version": "0.18.1",
"version": "0.17.6",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.5.14",
@@ -40254,7 +40252,7 @@
},
"packages/highlight": {
"name": "@getpaseo/highlight",
"version": "0.18.1",
"version": "0.17.6",
"license": "Apache-2.0",
"dependencies": {
"@codemirror/language": "6.12.4",
@@ -40284,7 +40282,7 @@
},
"packages/plugin": {
"name": "@getpaseo/plugin",
"version": "0.18.1",
"version": "0.17.6",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^1.4.0",
@@ -40292,8 +40290,8 @@
"use-sync-external-store": "^1.6.0"
},
"devDependencies": {
"@getpaseo/client": "0.18.1",
"@getpaseo/protocol": "0.18.1",
"@getpaseo/client": "0.17.6",
"@getpaseo/protocol": "0.17.6",
"@types/node": "^20.9.0",
"@types/react": "~19.2.0",
"react": "19.2.3",
@@ -40303,8 +40301,8 @@
"zod": "^4.4.3"
},
"peerDependencies": {
"@getpaseo/client": "0.18.1",
"@getpaseo/protocol": "0.18.1",
"@getpaseo/client": "0.17.6",
"@getpaseo/protocol": "0.17.6",
"react": ">=19.1.0 <20",
"react-native": ">=0.81.5",
"zod": "^4.4.3"
@@ -40326,7 +40324,7 @@
},
"packages/protocol": {
"name": "@getpaseo/protocol",
"version": "0.18.1",
"version": "0.17.6",
"license": "Apache-2.0",
"dependencies": {
"semver": "^7.8.5",
@@ -40353,7 +40351,7 @@
}
},
"packages/react-native-enriched-markdown": {
"version": "0.18.1",
"version": "0.17.6",
"hasInstallScript": true,
"license": "MIT",
"peerDependencies": {
@@ -40369,7 +40367,7 @@
},
"packages/relay": {
"name": "@getpaseo/relay",
"version": "0.18.1",
"version": "0.17.6",
"license": "Apache-2.0",
"dependencies": {
"@noble/ciphers": "^2.4.0",
@@ -40591,17 +40589,17 @@
},
"packages/server": {
"name": "@getpaseo/server",
"version": "0.18.1",
"version": "0.17.6",
"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.1",
"@getpaseo/highlight": "0.18.1",
"@getpaseo/plugin": "0.18.1",
"@getpaseo/protocol": "0.18.1",
"@getpaseo/relay": "0.18.1",
"@getpaseo/client": "0.17.6",
"@getpaseo/highlight": "0.17.6",
"@getpaseo/plugin": "0.17.6",
"@getpaseo/protocol": "0.17.6",
"@getpaseo/relay": "0.17.6",
"@isaacs/ttlcache": "^2.1.4",
"@modelcontextprotocol/node": "2.1.2",
"@modelcontextprotocol/sdk": "1.29.0",
@@ -41552,7 +41550,7 @@
},
"packages/website": {
"name": "@getpaseo/website",
"version": "0.18.1",
"version": "0.17.6",
"dependencies": {
"@cloudflare/vite-plugin": "^1.29.1",
"@cloudflare/workers-types": "^4.20260317.1",
@@ -43161,24 +43159,9 @@
}
}
},
"packages/workflows": {
"name": "@getpaseo/workflows",
"version": "0.1.0",
"license": "Apache-2.0",
"dependencies": {
"ajv": "^8.11.0",
"js-yaml": "^4.1.1",
"zod": "^4.4.3"
},
"devDependencies": {
"@types/node": "^20.9.0",
"typescript": "^5.9.3",
"vitest": "^4.1.6"
}
},
"plugins": {
"name": "@getpaseo/builtin-plugins",
"version": "0.18.1",
"version": "0.17.6",
"dependencies": {
"@getpaseo/plugin": "*",
"zod": "^4.4.3"
+3 -6
View File
@@ -1,6 +1,6 @@
{
"name": "paseo",
"version": "0.18.1",
"version": "0.17.6",
"private": true,
"description": "Paseo: voice-controlled development environment for local AI coding agents",
"keywords": [
@@ -27,7 +27,6 @@
"packages/highlight",
"packages/plugin",
"packages/protocol",
"packages/workflows",
"packages/client",
"packages/server",
"packages/app",
@@ -61,8 +60,6 @@
"build:relay:clean": "npm run build:clean --workspace=@getpaseo/relay",
"build:protocol": "npm run build --workspace=@getpaseo/protocol",
"build:protocol:clean": "npm run build:clean --workspace=@getpaseo/protocol",
"build:workflows": "npm run build --workspace=@getpaseo/workflows",
"build:workflows:clean": "npm run build:clean --workspace=@getpaseo/workflows",
"build:client": "npm run build --workspace=@getpaseo/client",
"build:client:clean": "npm run build:protocol:clean && npm run build:clean --workspace=@getpaseo/client",
"build:server-deps": "npm run build:client && concurrently --kill-others-on-fail --names highlight,plugin,relay --prefix-colors yellow,green,blue \"npm run build:highlight\" \"npm run build:plugin\" \"npm run build:relay\"",
@@ -127,8 +124,8 @@
"release:publish": "node scripts/publish-release-packages.mjs",
"release:publish:beta": "node scripts/publish-release-packages.mjs --beta",
"release:push": "node scripts/push-current-release-tag.mjs",
"release:ship": "npm run release:push && npm run release:publish",
"release:ship:beta": "npm run release:push && npm run release:publish:beta",
"release:ship": "node scripts/push-current-release-tag.mjs --check && npm run release:publish && npm run release:push",
"release:ship:beta": "node scripts/push-current-release-tag.mjs --check && npm run release:publish:beta && npm run release:push",
"release:reconcile": "node scripts/reconcile-release.mjs"
},
"devDependencies": {
@@ -1,27 +0,0 @@
name: Cancel iOS App Store review
# Cancel an active in-flight iOS App Store review submission on App Store
# Connect. Pass expected_version to abort safely if Apple has already moved on
# to a different version.
on:
workflow_dispatch:
inputs:
expected_version:
type: string
required: false
description: "Expected marketing version currently in review, e.g. 0.18.0. Fails without cancelling if the active submission is for a different version."
jobs:
cancel_ios_review:
name: Cancel iOS App Store review
environment: production
runs_on: macos-medium
steps:
- uses: eas/checkout
- name: Install fastlane
run: bundle install
- name: Cancel review
run: |
export EXPECTED_VERSION="${{ inputs.expected_version }}"
bundle exec fastlane ios cancel_review
@@ -1,20 +0,0 @@
name: Check iOS App Store review status
# Inspect live App Store Connect state for sh.paseo: the live App Store
# version, any active or pending App Store versions, active review submissions,
# and the five most recently uploaded iOS TestFlight builds.
on:
workflow_dispatch: {}
jobs:
check_ios_review_status:
name: Check iOS App Store review status
environment: production
runs_on: macos-medium
steps:
- uses: eas/checkout
- name: Install fastlane
run: bundle install
- name: Check review status
run: bundle exec fastlane ios review_status
@@ -69,5 +69,4 @@ jobs:
run: |
export APP_VERSION="${{ needs.build_ios.outputs.app_version }}"
export APP_BUILD_VERSION="${{ needs.build_ios.outputs.app_build_version }}"
export REPLACE_IN_REVIEW="false"
bundle exec fastlane ios submit_review
@@ -1,11 +1,9 @@
name: Resubmit iOS for App Store review
# Standalone trigger for the App Store review submission step. The iOS binary
# is already uploaded to TestFlight via the EAS GitHub app's tag-push build;
# this workflow runs fastlane ios submit_review without rebuilding or
# re-uploading. By default (replace_in_review=false) it skips cleanly if
# another App Store review is already in flight; pass replace_in_review=true
# to cancel an in-flight review and submit an urgent replacement.
# Standalone re-trigger for the App Store review submission step. The iOS
# binary is already uploaded to TestFlight via the EAS GitHub app's tag-push
# build; this workflow just runs the fastlane submit_review lane against the
# latest TestFlight build, without rebuilding or re-uploading.
on:
workflow_dispatch:
@@ -18,11 +16,6 @@ on:
type: string
required: false
description: "CFBundleVersion to resubmit, e.g. 2. Only used when app_version is set."
replace_in_review:
type: boolean
required: false
default: false
description: "Cancel an in-flight App Store review and submit this build instead. Leave false to skip safely while another review is active."
jobs:
submit_ios_for_review:
@@ -37,5 +30,4 @@ jobs:
run: |
export APP_VERSION="${{ inputs.app_version }}"
export APP_BUILD_VERSION="${{ inputs.app_build_version }}"
export REPLACE_IN_REVIEW="${{ inputs.replace_in_review }}"
bundle exec fastlane ios submit_review
-2
View File
@@ -2,7 +2,6 @@ const fs = require("node:fs");
const path = require("node:path");
const pkg = require("./package.json");
const withAndroidAsyncStorageSize = require("./plugins/with-android-async-storage-size");
const withAndroidIgnoreBoldText = require("./plugins/with-android-ignore-bold-text");
const withAndroidOptionalCamera = require("./plugins/with-android-optional-camera");
const withAndroidProfileable = require("./plugins/with-android-profileable");
const withFdroidAutolinking = require("./plugins/with-fdroid-autolinking");
@@ -149,7 +148,6 @@ export default {
withPasteInput,
withAndroidScroll,
withAndroidDisplayMetrics,
withAndroidIgnoreBoldText,
[withAndroidAsyncStorageSize, 64],
...buildProfile.cameraPlugins,
withAndroidOptionalCamera,
-89
View File
@@ -112,92 +112,3 @@ describe("hardware keyboard scene integration", () => {
expect(configureHardwareKeyboardAppDelegate(configured)).toBe(configured);
});
});
// Android Bold text bolds unstyled text at draw time after React Native measured it
// unbolded, which clips trailing words (#4057, #10152, #10850). The activity must opt out
// with a sparse Configuration() so other configuration fields still update live.
describe("Android Bold text opt-out", () => {
const {
configureIgnoreBoldTextMainActivity,
} = require("./plugins/with-android-ignore-bold-text.js");
const {
configureDisplayMetricsActivity,
} = require("./modules/paseo-display-metrics/app.plugin.js");
const mainActivity = [
"package sh.paseo",
"import expo.modules.splashscreen.SplashScreenManager",
"",
"import android.os.Build",
"import android.os.Bundle",
"",
"import com.facebook.react.ReactActivity",
"",
"class MainActivity : ReactActivity() {",
" override fun onCreate(savedInstanceState: Bundle?) {",
" super.onCreate(null)",
" }",
"}",
"",
].join("\n");
it("zeroes fontWeightAdjustment on a sparse Configuration before attaching and is idempotent", () => {
const configured = configureIgnoreBoldTextMainActivity(mainActivity);
expect(configured).toMatch(/^import android\.content\.Context$/m);
expect(configured).toMatch(/^import android\.content\.res\.Configuration$/m);
expect(configured).toContain("override fun attachBaseContext(newBase: Context)");
expect(configured).toContain("val override = Configuration()");
expect(configured).not.toContain("Configuration(configuration)");
expect(configured).toContain("override.fontWeightAdjustment = 0");
expect(configured).toContain(
"super.attachBaseContext(newBase.createConfigurationContext(override))",
);
expect(configured.indexOf("attachBaseContext")).toBeLessThan(configured.indexOf("onCreate"));
expect(configureIgnoreBoldTextMainActivity(configured)).toBe(configured);
});
it("composes cleanly with withAndroidDisplayMetrics in both plugin orders", () => {
const displayFirst = configureIgnoreBoldTextMainActivity(
configureDisplayMetricsActivity(mainActivity),
);
const boldFirst = configureDisplayMetricsActivity(
configureIgnoreBoldTextMainActivity(mainActivity),
);
for (const configured of [displayFirst, boldFirst]) {
expect(configured).toContain("override fun attachBaseContext(newBase: Context)");
expect(configured).toContain("val override = Configuration()");
expect(configured).toContain("override.fontWeightAdjustment = 0");
expect(configured).toContain("override fun onContentChanged()");
expect(configured).toContain(
"override fun onConfigurationChanged(newConfig: android.content.res.Configuration)",
);
expect(configured).toContain(
"sh.paseo.displaymetrics.PaseoDisplayMetrics.syncWithWindow(this)",
);
expect(configureIgnoreBoldTextMainActivity(configured)).toBe(configured);
expect(configureDisplayMetricsActivity(configured)).toBe(configured);
}
});
it("fails the prebuild when the MainActivity template changes shape", () => {
expect(() => configureIgnoreBoldTextMainActivity("package sh.paseo\n")).toThrow(
/MainActivity class declaration/,
);
});
it("fails the prebuild rather than duplicate an existing attachBaseContext override", () => {
const withExistingOverride = mainActivity.replace(
"override fun onCreate",
"override fun attachBaseContext(newBase: Context) { super.attachBaseContext(newBase) }\n\n override fun onCreate",
);
expect(() => configureIgnoreBoldTextMainActivity(withExistingOverride)).toThrow(
/existing attachBaseContext override/,
);
});
it("is registered in the app config", async () => {
const { exp } = await getPrebuildConfigAsync(__dirname, { platforms: ["android"] });
// Expo records function plugins by name.
expect(exp.plugins).toContain("withAndroidIgnoreBoldText");
}, 30_000);
});
Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

@@ -6,15 +6,16 @@ import {
expectComposerDoesNotName,
expectAgentProfilesEmptyPrompt,
expectHostAgentProfiles,
expectProfileEditTooltip,
expectComposerMode,
expectCreateProfileFromModelRow,
expectComposerModel,
expectModelRowProfileActionBesideRow,
expectModelRowSelected,
expectProfileEditIsPencilOnly,
expectProfileReachableByScrolling,
expectProfileSearchResult,
expectPickerProfile,
expectProfilesEditLink,
expectProfileVisibleForProvider,
fillAgentProfileName,
openEditProfileFromModelRow,
openModelPicker,
@@ -85,16 +86,17 @@ test.describe("Agent profiles in the model picker", () => {
await expectComposerMode(page, "Load test");
});
await test.step("the single-provider picker lists Profiles above the agent's models without a rail", async () => {
await test.step("the sole provider opens directly", async () => {
await openModelPicker(page);
await expect(page.getByTestId("model-search-input").first()).toBeFocused();
await expect(page.getByTestId("model-picker-rail")).toHaveCount(0);
await expectModelRowSelected(page, { provider: "mock", modelId: "ten-second-stream" });
await expectPickerProfile(page, {
await expect(page.getByTestId("model-search-input").first()).toBeVisible();
await expect(page.getByTestId("sheet-header-back")).toHaveCount(0);
await expect(page.locator('[data-testid^="model-provider-"]')).toHaveCount(0);
await expectProfileVisibleForProvider(page, {
name: PROFILE.name,
summary: PROFILE_SUMMARY,
});
await expectProfilesEditLink(page);
await expectProfileEditIsPencilOnly(page);
await expectProfileEditTooltip(page);
});
await test.step("applying it writes its model and mode into the composer", async () => {
@@ -113,13 +115,14 @@ test.describe("Agent profiles in the model picker", () => {
await expectComposerDoesNotName(page, PROFILE.name);
});
await test.step("reopening returns to the provider models with the new model checked", async () => {
await test.step("reopening returns directly to the provider models", async () => {
await openModelPicker(page);
await expectModelRowSelected(page, { provider: "mock", modelId: "one-minute-stream" });
await expectPickerProfile(page, {
await expect(page.getByTestId("model-search-input").first()).toBeVisible();
await expectProfileVisibleForProvider(page, {
name: PROFILE.name,
summary: PROFILE_SUMMARY,
});
await expectModelRowSelected(page, { provider: "mock", modelId: "one-minute-stream" });
await closeModelPicker(page);
});
} finally {
@@ -67,9 +67,6 @@ test.describe("Agent profiles settings", () => {
try {
await test.step("the section starts empty", async () => {
await openAgentProfileSettings(page);
await expect(page.getByTestId("agent-profiles-description")).toHaveText(
"Save agent settings that you can pick quickly and that agents can use to delegate work",
);
await expectNoAgentProfiles(page);
});
@@ -80,18 +77,11 @@ test.describe("Agent profiles settings", () => {
model: "Ten second stream",
thinking: "High",
mode: "Approval test",
systemPrompt: "Focus on layout, accessibility, and design tokens.",
notes: "Use for UI work — components, layout and design tokens.",
});
await expectAgentProfile(page, {
name: "UI work",
tags: [
MOCK_PROVIDER_LABEL,
"Ten second stream",
"Approval test",
"High",
"System prompt",
],
tags: [MOCK_PROVIDER_LABEL, "Ten second stream", "Approval test", "High"],
notes: "Use for UI work — components, layout and design tokens.",
});
});
@@ -99,12 +89,11 @@ test.describe("Agent profiles settings", () => {
await test.step("editing to a model without thinking levels drops the level", async () => {
await editAgentProfile(page, "UI work", {
model: "One minute stream",
systemPrompt: "Keep replies concise.",
notes: "Now for quick checks.",
});
await expectAgentProfile(page, {
name: "UI work",
tags: [MOCK_PROVIDER_LABEL, "One minute stream", "Approval test", "System prompt"],
tags: [MOCK_PROVIDER_LABEL, "One minute stream", "Approval test"],
notes: "Now for quick checks.",
});
await expectAgentProfileTagsGone(page, {
@@ -118,7 +107,6 @@ test.describe("Agent profiles settings", () => {
provider: MOCK_PROVIDER_LABEL,
model: "One minute stream",
mode: "Approval test",
systemPrompt: "Keep replies concise.",
notes: "Now for quick checks.",
});
});
@@ -1,559 +0,0 @@
import type { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import { connectDaemonClient } from "../support/helpers/daemon-client-loader";
import {
beginTextReveal,
retargetTextReveal,
visibleRevealedText,
} from "../../src/agent-stream/text-reveal";
import type { Page } from "@playwright/test";
import { test, expect } from "../support/fixtures";
import { expectComposerVisible } from "../support/helpers/composer";
import { scrollChatAwayFromBottom } from "../support/helpers/agent-bottom-anchor";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
test.use({
e2eDaemonConfig: {
version: 1,
agents: {
providers: Object.fromEntries(
[
"claude",
"codex",
"copilot",
"opencode",
"pi",
"omp",
"antigravity",
"hoplite",
"muse",
].map((id) => [id, { enabled: false }]),
),
},
},
});
interface ClosingFenceFrameSample {
text: string;
codeBlockHeights: number[];
codeBlockTexts: string[];
messageHeights: number[];
partialFenceLines: string[];
}
interface ClosingFenceFrameReport {
finished: boolean;
samples: ClosingFenceFrameSample[];
}
async function sampleClosingFenceFrames(page: Page): Promise<ClosingFenceFrameReport> {
return await page.evaluate(async () => {
const samples: ClosingFenceFrameSample[] = [];
let finished = false;
await new Promise<void>((resolve) => {
const tick = () => {
const messages = Array.from(
document.querySelectorAll<HTMLElement>('[data-testid="assistant-message"]'),
);
const text = messages.map((message) => message.textContent ?? "").join("");
const sample: ClosingFenceFrameSample = {
text,
codeBlockHeights: [],
codeBlockTexts: [],
messageHeights: messages.map((message) =>
Math.round(message.getBoundingClientRect().height),
),
partialFenceLines: [],
};
for (const message of messages) {
for (const block of message.querySelectorAll<HTMLElement>(
'pre, [data-paseo-markdown-tag="pre"]',
)) {
const code = block.querySelector<HTMLElement>('code, [data-paseo-markdown-tag="code"]');
const codeText = code?.textContent ?? block.textContent ?? "";
sample.codeBlockTexts.push(codeText.trimEnd());
// Opening fence prefixes render as prose; closing artifacts live inside code blocks.
for (const line of codeText.split(/\r?\n/)) {
if (/^\s*`{1,2}\s*$/.test(line)) sample.partialFenceLines.push(line);
}
sample.codeBlockHeights.push(Math.round(block.getBoundingClientRect().height));
}
}
samples.push(sample);
finished = text.includes("Both blocks are closed.");
if (finished) {
resolve();
return;
}
requestAnimationFrame(tick);
};
requestAnimationFrame(tick);
});
return { finished, samples };
});
}
const FIRST_PAUSE_TEXT = "Here is the first snippet:const answer = 42;\nconsole.log(answer);";
const SECOND_PAUSE_TEXT = `${FIRST_PAUSE_TEXT}And a second one:echo done`;
for (const { label, html } of [
{ label: "semantic", html: "<pre><code>const answer = 42;\n`\n``</code></pre>" },
{
label: "annotated",
html: '<div data-paseo-markdown-tag="pre"><span data-paseo-markdown-tag="code">const answer = 42;\n`\n``</span><button>Copy</button></div>',
},
{
label: "annotated semantic",
html: '<pre data-paseo-markdown-tag="pre"><code data-paseo-markdown-tag="code">const answer = 42;\n`\n``</code></pre>',
},
]) {
test(`samples ${label} code block DOM without duplicate blocks or controls`, async ({ page }) => {
await page.setContent(
`<div data-testid="assistant-message">${html}<p>Both blocks are closed.</p></div>`,
);
const report = await sampleClosingFenceFrames(page);
const sample = report.samples.at(-1)!;
expect(report.finished).toBe(true);
expect(sample.codeBlockTexts).toEqual(["const answer = 42;\n`\n``"]);
expect(sample.partialFenceLines).toEqual(["`", "``"]);
expect(sample.codeBlockHeights).toHaveLength(1);
expect(sample.codeBlockHeights[0]).toBeGreaterThan(0);
});
}
function closingFencePauseSamples(
samples: readonly ClosingFenceFrameSample[],
pauseText: string,
): ClosingFenceFrameSample[] {
return samples.filter((sample) => sample.text === pauseText);
}
function expectStableGeometry(
samples: readonly ClosingFenceFrameSample[],
expectedCodeBlockTexts: readonly string[],
): void {
expect(samples.length, "the paused text state should be sampled").toBeGreaterThan(0);
expect(
samples.every(
(sample) => JSON.stringify(sample.codeBlockTexts) === JSON.stringify(expectedCodeBlockTexts),
),
"the sampled code should contain only the authored lines",
).toBe(true);
const geometries = new Set(
samples.map((sample) => JSON.stringify([sample.messageHeights, sample.codeBlockHeights])),
);
expect(
geometries.size,
"message and code block geometry should stay fixed during the pause",
).toBe(1);
}
/**
* A closing fence that is still being typed must not be painted as code.
*
* The mock reply closes each code block in two arrivals: one backtick, a pause,
* then the other two. Painted, that first backtick is a line of code that
* vanishes when the fence completes, so the block grows and shrinks and every
* row below it moves twice. Each pause is sampled and its text geometry checked.
*/
test("does not paint a closing fence while it is still being typed", async ({ page }, testInfo) => {
test.setTimeout(90_000);
const agent = await seedMockAgentWorkspace({
repoPrefix: "closing-fence-",
title: "Closing fence",
model: "e2e-fast-stream",
});
try {
await openAgentRoute(page, agent);
await expectComposerVisible(page);
const reportPromise = sampleClosingFenceFrames(page);
await agent.client.sendAgentMessage(
agent.agentId,
"Stream a code block with a split closing fence.",
);
const report = await reportPromise;
await testInfo.attach("closing-fence-frames", {
body: JSON.stringify(report, null, 2),
contentType: "application/json",
});
expect(report.finished, "the reply should finish streaming").toBe(true);
expect(
report.samples.flatMap((sample) => sample.partialFenceLines),
"no frame, including transitions outside the pause windows, may show a partial fence inside code",
).toEqual([]);
const firstPauseSamples = closingFencePauseSamples(report.samples, FIRST_PAUSE_TEXT);
const secondPauseSamples = closingFencePauseSamples(report.samples, SECOND_PAUSE_TEXT);
expectStableGeometry(firstPauseSamples, ["const answer = 42;\nconsole.log(answer);"]);
expectStableGeometry(secondPauseSamples, [
"const answer = 42;\nconsole.log(answer);",
"echo done",
]);
expect(secondPauseSamples[0]?.codeBlockHeights[0]).toBe(
firstPauseSamples[0]?.codeBlockHeights[0],
);
} finally {
await agent.cleanup();
}
});
test("excludes each revealed character of the next paragraph from both pauses", () => {
for (const [pauseText, paragraph] of [
[FIRST_PAUSE_TEXT, "And a second one:"],
[SECOND_PAUSE_TEXT, "Both blocks are closed."],
]) {
const state = retargetTextReveal(beginTextReveal(pauseText), pauseText + paragraph);
const samples = Array.from({ length: paragraph.length + 1 }, (_, index) => ({
text: visibleRevealedText({ ...state, revealed: pauseText.length + index }),
codeBlockHeights: [],
codeBlockTexts: [],
messageHeights: [index],
partialFenceLines: [],
}));
expect(closingFencePauseSamples(samples, pauseText)).toEqual([samples[0]]);
}
});
for (const { label, markdown, expectedCode, expectedPartialFenceLines } of [
{
label: "opening prefixes in prose",
markdown: "And a second one:\n\n`\n\n``\n\nBoth blocks are closed.",
expectedCode: [],
expectedPartialFenceLines: [],
},
{
label: "partial fences inside rendered code",
markdown: "```ts\nconst answer = 42;\n`\n``\n```\n\nBoth blocks are closed.",
expectedCode: ["const answer = 42;\n`\n``"],
expectedPartialFenceLines: ["`", "``"],
},
]) {
test(`samples ${label} in the correct container`, async ({ page }, testInfo) => {
const agent = await seedMockAgentWorkspace({
repoPrefix: "fence-sample-container-",
title: "Fence sample container",
featureValues: { mockAssistantResponse: markdown },
});
try {
await openAgentRoute(page, agent);
await expectComposerVisible(page);
const reportPromise = sampleClosingFenceFrames(page);
await agent.client.sendAgentMessage(agent.agentId, "Show the fence sampling fixture.");
const report = await reportPromise;
await testInfo.attach("fence-container-frames", {
body: JSON.stringify(report, null, 2),
contentType: "application/json",
});
expect(report.finished).toBe(true);
const messageText = await page.getByTestId("assistant-message").innerText();
const messageLines = messageText.split(/\r?\n/);
const messageFenceLines = messageLines.filter((line) => /^\s*`{1,2}\s*$/.test(line));
expect(messageFenceLines).toEqual(["`", "``"]);
const finalSample = report.samples.at(-1);
expect(finalSample?.codeBlockTexts).toEqual(expectedCode);
expect(finalSample?.partialFenceLines).toEqual(expectedPartialFenceLines);
} finally {
await agent.cleanup();
}
});
}
test("shows the complete reasoning after a streamed turn finishes", async ({ page }, testInfo) => {
test.setTimeout(90_000);
await page.setViewportSize({ width: 1280, height: 900 });
await page.addInitScript(() => {
localStorage.setItem(
"@paseo:app-settings",
JSON.stringify({ toolCallDetailLevel: "detailed", autoExpandReasoning: true }),
);
});
const reasoning =
"Need to find the scroll container, the layout effect that watches for new messages, and any gesture handler that might fight with programmatic scrolling. Probably a ref on the FlatList plus a near-bottom threshold.";
const agent = await seedMockAgentWorkspace({
repoPrefix: "finished-reasoning-",
title: "Finished reasoning",
model: "ten-second-stream",
});
const historyClient = await connectDaemonClient<
Pick<DaemonClient, "connect" | "close" | "fetchAgentTimeline">
>({ clientIdPrefix: "finished-reasoning-history" });
try {
await openAgentRoute(page, agent);
await expectComposerVisible(page);
await agent.client.sendAgentMessage(
agent.agentId,
"Stream briefly to check finished reasoning.",
);
await agent.client.waitForFinish(agent.agentId, 30_000);
const history = await historyClient.fetchAgentTimeline(agent.agentId, { limit: 500 });
const thoughts = history.entries
.map((entry) => entry.item)
.filter((item) => item.type === "reasoning");
await testInfo.attach("canonical-reasoning", {
body: JSON.stringify(thoughts, null, 2),
contentType: "application/json",
});
expect(thoughts[0]?.text).toBe(reasoning);
const expectedCounts = new Map<string, number>();
for (const thought of thoughts)
expectedCounts.set(thought.text, (expectedCounts.get(thought.text) ?? 0) + 1);
const rendered = page.getByText(reasoning, { exact: true });
for (const [text, count] of expectedCounts)
await expect(page.getByText(text, { exact: true })).toHaveCount(count);
await expect(rendered.first()).toBeVisible();
await testInfo.attach("finished-reasoning", {
body: await page.screenshot(),
contentType: "image/png",
});
await page.reload();
for (const [text, count] of expectedCounts)
await expect(page.getByText(text, { exact: true })).toHaveCount(count);
await expect(rendered.first()).toBeVisible();
} catch (error) {
await testInfo.attach("reasoning-before-cleanup", {
body: await page.screenshot(),
contentType: "image/png",
});
throw error;
} finally {
await historyClient.close();
await agent.cleanup();
}
});
test("records equal-input long-reply rendering metrics", async ({ page }, testInfo) => {
test.setTimeout(120_000);
await page.setViewportSize({ width: 1280, height: 900 });
const markdown =
Array.from({ length: 15 }, (_, index) =>
[
"### Block " + index,
"",
"\x60\x60\x60ts",
...Array.from(
{ length: 12 },
(_value, line) => "const value_" + index + "_" + line + " = " + (index * 12 + line) + ";",
),
"\x60\x60\x60",
"",
].join("\n"),
).join("\n") + "\nEqual-input stream complete.";
const agent = await seedMockAgentWorkspace({
repoPrefix: "equal-input-long-reply-",
title: "Equal-input long reply",
featureValues: {
mockStreamingAssistantResponse: markdown,
mockStreamingAssistantIntervalMs: 5,
},
});
try {
await openAgentRoute(page, agent);
await expectComposerVisible(page);
const session = await page.context().newCDPSession(page);
await session.send("Performance.enable");
const before = await session.send("Performance.getMetrics");
const sampler = await page.evaluateHandle(() => {
const state = {
frames: [] as number[],
longTasks: [] as number[],
running: true,
last: performance.now(),
};
const observer = new PerformanceObserver((list) => {
state.longTasks.push(...list.getEntries().map((entry) => entry.duration));
});
observer.observe({ type: "longtask", buffered: false });
const tick = (now: number) => {
state.frames.push(now - state.last);
state.last = now;
if (state.running) requestAnimationFrame(tick);
};
requestAnimationFrame(tick);
return { state, observer };
});
await agent.client.sendAgentMessage(agent.agentId, "Render the fixed fifteen-block fixture.");
await agent.client.waitForFinish(agent.agentId, 60_000);
const message = page.getByTestId("assistant-message").last();
await expect(message).toContainText("Equal-input stream complete.", { timeout: 30_000 });
const blocks = message.locator('pre, [data-paseo-markdown-tag="pre"]');
await expect(blocks).toHaveCount(15);
for (let index = 0; index < 15; index++) {
await expect(blocks.nth(index)).toContainText(
"const value_" + index + "_11 = " + (index * 12 + 11) + ";",
);
}
const samples = await sampler.evaluate(({ state, observer }) => {
state.running = false;
state.longTasks.push(...observer.takeRecords().map((entry) => entry.duration));
observer.disconnect();
return state;
});
const after = await session.send("Performance.getMetrics");
const frames = [...samples.frames].sort((a, b) => a - b);
await testInfo.attach("equal-input-rendering", {
body: JSON.stringify(
{
markdown,
viewport: page.viewportSize(),
intervalMs: 5,
frameCount: frames.length,
frameP95Ms: frames[Math.floor(frames.length * 0.95)],
maxFrameMs: frames.at(-1),
longTasksMs: samples.longTasks,
before: before.metrics,
after: after.metrics,
},
null,
2,
),
contentType: "application/json",
});
await sampler.dispose();
await session.detach();
} finally {
await agent.cleanup();
}
});
test("manually expands complete reasoning after leaving output following", async ({
page,
}, testInfo) => {
test.setTimeout(90_000);
await page.setViewportSize({ width: 1280, height: 900 });
await page.addInitScript(() => {
localStorage.setItem(
"@paseo:app-settings",
JSON.stringify({ chatDisplay: "full", autoExpandReasoning: false }),
);
});
const agent = await seedMockAgentWorkspace({
repoPrefix: "manual-finished-reasoning-",
title: "Manual finished reasoning",
model: "ten-second-stream",
});
const historyClient = await connectDaemonClient<
Pick<DaemonClient, "connect" | "close" | "fetchAgentTimeline">
>({ clientIdPrefix: "manual-finished-reasoning-history" });
try {
await openAgentRoute(page, agent);
await expectComposerVisible(page);
await agent.client.sendAgentMessage(
agent.agentId,
"Stream briefly to check finished reasoning.",
);
const finished = await agent.client.waitForFinish(agent.agentId, 30_000);
expect(finished.status).toBe("idle");
await testInfo.attach("manual-completed-turn", {
body: JSON.stringify(finished),
contentType: "application/json",
});
const history = await historyClient.fetchAgentTimeline(agent.agentId, { limit: 500 });
const thoughts = history.entries
.map((entry) => entry.item)
.filter((item) => item.type === "reasoning");
expect(thoughts.length).toBeGreaterThan(0);
expect(thoughts.every((thought) => thought.text.length > 0)).toBe(true);
const expectedCounts = new Map<string, number>();
for (const thought of thoughts)
expectedCounts.set(thought.text, (expectedCounts.get(thought.text) ?? 0) + 1);
await testInfo.attach("manual-canonical-reasoning", {
body: JSON.stringify(thoughts, null, 2),
contentType: "application/json",
});
const pointerCapture = await page.evaluateHandle(() => {
const events: {
type: string;
timestamp: number;
tag: string;
label: string;
scrollTop: number | null;
}[] = [];
const observe = (event: Event) => {
const target = event.target;
if (!(target instanceof HTMLElement)) return;
const scroll = document.querySelector<HTMLElement>('[data-testid="agent-chat-scroll"]');
events.push({
type: event.type,
timestamp: event.timeStamp,
tag: target.tagName,
label: target.textContent?.slice(0, 80) ?? "",
scrollTop: scroll?.scrollTop ?? null,
});
};
for (const type of ["pointerdown", "pointerup", "wheel"])
document.addEventListener(type, observe, true);
return {
events,
stop: () => {
for (const type of ["pointerdown", "pointerup", "wheel"])
document.removeEventListener(type, observe, true);
},
};
});
const badges = page.getByTestId("tool-call-badge").filter({ hasText: "Thinking" });
await expect(badges).toHaveCount(thoughts.length);
// Locator scrolling alone leaves output-following armed, so pointer-down can
// snap the feed to its tail before pointer-up reaches the Thinking control.
await scrollChatAwayFromBottom(page, { deltaY: -600, minDistanceFromBottom: 100 });
for (let index = 0; index < thoughts.length; index++) {
await badges
.nth(index)
.getByRole("button", { name: "Thinking", exact: true })
.first()
.click();
await expect(
badges.nth(index).getByText(thoughts[index].text, { exact: true }),
).toBeVisible();
}
for (const [text, count] of expectedCounts)
await expect(page.getByText(text, { exact: true })).toHaveCount(count);
const first = badges.first();
await first.getByRole("button", { name: "Thinking", exact: true }).first().click();
await expect(first.getByText(thoughts[0].text, { exact: true })).not.toBeVisible();
await first.getByRole("button", { name: "Thinking", exact: true }).first().click();
await expect(first.getByText(thoughts[0].text, { exact: true })).toBeVisible();
for (const [text, count] of expectedCounts)
await expect(page.getByText(text, { exact: true })).toHaveCount(count);
await testInfo.attach("manual-expanded-reasoning", {
body: await page.screenshot(),
contentType: "image/png",
});
const pointerEvents = await pointerCapture.evaluate(({ events, stop }) => {
stop();
return events;
});
await pointerCapture.dispose();
await testInfo.attach("manual-pointer-events", {
body: JSON.stringify(pointerEvents, null, 2),
contentType: "application/json",
});
await page.reload();
await expect(badges).toHaveCount(thoughts.length);
await scrollChatAwayFromBottom(page, { deltaY: -600, minDistanceFromBottom: 100 });
for (let index = 0; index < thoughts.length; index++) {
await badges
.nth(index)
.getByRole("button", { name: "Thinking", exact: true })
.first()
.click();
await expect(
badges.nth(index).getByText(thoughts[index].text, { exact: true }),
).toBeVisible();
}
for (const [text, count] of expectedCounts)
await expect(page.getByText(text, { exact: true })).toHaveCount(count);
} catch (error) {
await testInfo.attach("manual-before-cleanup", {
body: await page.screenshot(),
contentType: "image/png",
});
throw error;
} finally {
await historyClient.close();
await agent.cleanup();
}
});
@@ -84,14 +84,17 @@ async function openModelSelector(page: Page) {
await expect(page.getByTestId("agent-controls-settings-list")).toBeVisible({ timeout: 10_000 });
}
async function openModelPage(page: Page) {
await page.getByTestId("agent-controls-model").click();
await expect(page.getByTestId("mobile-model-page")).toBeVisible();
await expect(page.getByTestId("agent-controls-settings-list")).toHaveCount(0);
}
async function returnHomeWithBack(page: Page) {
await page.getByTestId("sheet-header-back").click();
async function dismissStackedModelPickerWithBackdrop(page: Page) {
await page
.getByTestId("agent-controls-settings-list")
.getByRole("button", { name: /Select model/ })
.click();
await expect(page.getByTestId("agent-controls-model-browser-sheet")).toBeInViewport();
await page.mouse.click(MOBILE_VIEWPORT.width / 2, 24);
// In CI, Gorhom retains the dismissed sheet below the viewport.
// Dismissal is complete when it leaves the displayed surface.
await expect(page.getByTestId("agent-controls-model-browser-sheet")).not.toBeInViewport();
await expect(page.getByTestId("agent-controls-model-sheet")).toBeVisible();
await expect(page.getByTestId("agent-controls-settings-list")).toBeVisible();
}
@@ -110,7 +113,7 @@ async function openAndCloseModelSelectorTwice(page: Page) {
}
test.describe("mobile bottom sheet reopen", () => {
test("sheets reopen and a model pick returns to Home", async ({ page }) => {
test("sheets reopen and model search returns to configuration", async ({ page }) => {
const session = await openMockAgentAtMobileBreakpoint(page);
try {
await test.step("tab switcher opens, closes, and reopens", async () => {
@@ -121,28 +124,24 @@ test.describe("mobile bottom sheet reopen", () => {
await openAndCloseModelSelectorTwice(page);
});
await test.step("the Model page swaps in place and Back returns to Home", async () => {
await test.step("model search returns to configuration", async () => {
await openModelSelector(page);
const sheet = page.getByTestId("agent-controls-model-sheet");
await openModelPage(page);
await returnHomeWithBack(page);
await expect(sheet).toBeVisible();
});
await test.step("a model found by search returns to Home with that model", async () => {
await openModelPage(page);
const search = page.getByTestId("model-search-all-input");
await expect(search).not.toBeFocused();
await search.click();
await search.fill("Ten second");
await dismissStackedModelPickerWithBackdrop(page);
await page.getByTestId("model-search-all-input").click();
const model = page.getByRole("button", { name: /^Ten second stream/ });
await expect(model).toBeVisible({ timeout: 10_000 });
await expect(model).toBeVisible({
timeout: 10_000,
});
await model.click();
await expect(page.getByTestId("agent-controls-model-sheet")).toBeVisible();
await expect(sheet).toBeVisible();
await expect(page.getByTestId("agent-controls-settings-list")).toBeVisible();
await expect(page.getByTestId("agent-controls-model")).toContainText("Ten second stream");
await expect(page.getByTestId("agent-controls-model-browser-sheet")).not.toBeInViewport();
});
} finally {
await session.cleanup();
@@ -1,13 +0,0 @@
import {
expectBuiltinPluginSettings,
openBuiltinPluginSettings,
test,
} from "../support/helpers/builtin-plugin-settings";
test("a built-in plugin's settings link opens its screen", async ({
page,
builtinSettingsHost,
}) => {
await openBuiltinPluginSettings(page, builtinSettingsHost);
await expectBuiltinPluginSettings(page);
});
@@ -1042,7 +1042,7 @@ test("changes context menu recursively collapses descendant folders", async ({ p
nestedLabel.boundingBox(),
]);
if (!rootBounds || !nestedBounds) throw new Error("Changes tree rows have no bounds");
expect(nestedBounds.x - rootBounds.x).toBe(16);
expect(nestedBounds.x - rootBounds.x).toBe(12);
await tree.getByTestId("diff-folder-src-toggle").click({ button: "right" });
await page.getByTestId("diff-folder-src-collapse-folder").click();
+1 -25
View File
@@ -30,14 +30,7 @@ test.use({
const ACTIVE_SPEED_COLOR = "rgb(251, 191, 36)";
const NORMAL_SPEED_COLOR = "rgb(113, 113, 122)";
const COMPACT_SPEED_CONTROL = "agent-feature-service_tier";
const COMPACT_SPEED_SECTION = `${COMPACT_SPEED_CONTROL}-section`;
async function openSpeedSelector(page: Page): Promise<void> {
const compactSection = page.getByTestId(COMPACT_SPEED_SECTION);
if (await compactSection.isVisible().catch(() => false)) {
return;
}
const speed = page.getByRole("button", { name: /^(Select speed|Speed: .+)$/ });
const features = page.getByRole("button", { name: "Open agent features", exact: true });
const modelSettings = page.getByRole("button", { name: /^Select model \(/ });
@@ -46,12 +39,7 @@ async function openSpeedSelector(page: Page): Promise<void> {
});
if (!(await speed.isVisible())) {
if (await features.isVisible()) await features.click();
else {
await modelSettings.click();
await expect(compactSection).toBeVisible({ timeout: 30_000 });
await expect(compactSection.getByText("Normal", { exact: true })).toBeVisible();
return;
}
else await modelSettings.click();
}
await expect(speed).toBeVisible({ timeout: 30_000 });
await speed.click();
@@ -59,13 +47,6 @@ async function openSpeedSelector(page: Page): Promise<void> {
}
async function selectSpeed(page: Page, label: string): Promise<void> {
const compactSection = page.getByTestId(COMPACT_SPEED_SECTION);
if (await compactSection.isVisible().catch(() => false)) {
const pill = compactSection.getByRole("button", { name: label, exact: true });
await pill.click();
await expect(pill).toHaveAttribute("aria-selected", "true");
return;
}
await page.getByRole("button", { name: label, exact: true }).last().click();
const toolbarTrigger = page.getByRole("button", { name: `Speed: ${label}`, exact: true });
const sheetTrigger = page.getByRole("button", { name: "Select speed", exact: true });
@@ -75,11 +56,6 @@ async function selectSpeed(page: Page, label: string): Promise<void> {
}
async function expectSpeedIconColor(page: Page, color: string): Promise<void> {
const compactSection = page.getByTestId(COMPACT_SPEED_SECTION);
if (await compactSection.isVisible().catch(() => false)) {
await expect(compactSection.locator("svg").first()).toHaveCSS("stroke", color);
return;
}
const trigger = page
.getByRole("button", { name: /^(Speed: .+|Select speed)$/ })
.filter({ visible: true });
@@ -2,7 +2,6 @@ import type { Locator } from "@playwright/test";
import { test, expect, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import { seedWorkspace, type SeededWorkspace } from "../support/helpers/seed-client";
import { getServerId } from "../support/helpers/server-id";
@@ -143,38 +142,6 @@ test.describe("Command center workspace management", () => {
}
});
test("keeps Rename workspace ahead of Rename agent across renam and rename", async ({ page }) => {
const workspace = await seedMockAgentWorkspace({
repoPrefix: "cc-rename-order-",
title: "Command center rename order",
model: "five-minute-stream",
});
try {
await openAgentRoute(page, workspace);
const panel = await openCommandCenter(page);
const searchInput = panel.getByTestId("command-center-input");
const renameWorkspace = action(panel, "Rename workspace");
const renameAgent = action(panel, "Rename agent");
for (const query of ["renam", "rename"]) {
await searchInput.fill(query);
await expect(renameWorkspace).toBeVisible({ timeout: 15_000 });
await expect(renameAgent).toBeVisible({ timeout: 15_000 });
const workspaceTop = (await renameWorkspace.boundingBox())?.y ?? Number.NaN;
const agentTop = (await renameAgent.boundingBox())?.y ?? Number.NaN;
expect(workspaceTop, query).toBeLessThan(agentTop);
}
await page.keyboard.press("Enter");
await expect(page.getByTestId("workspace-rename-modal-global-input")).toBeFocused({
timeout: 15_000,
});
} finally {
await workspace.cleanup();
}
});
test("copies the workspace path and confirms with a toast", async ({ page }) => {
const workspace = await seedWorkspace({ repoPrefix: "cc-copy-path-" });
@@ -3,7 +3,6 @@ import path from "node:path";
import { expect, test } from "../support/fixtures";
import { expectComposerVisible } from "../support/helpers/composer";
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
import { installLocalDesktopHost } from "../support/helpers/local-desktop-host";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import {
expectSubagentRowGone,
@@ -30,89 +29,6 @@ import {
const FILE_LINK = "linked.ts:3";
test("compact offers file actions from a link and from the file sheet", async ({ page }) => {
await page.setViewportSize({ width: 390, height: 844 });
const workspace = await seedMockAgentWorkspace({
repoPrefix: "compact-file-actions-",
title: "File actions",
initialPrompt: promptMentioning(FILE_LINK),
});
try {
await writeFile(path.join(workspace.cwd, "linked.ts"), "one\ntwo\nthree\n", "utf8");
await openAgentRoute(page, { workspaceId: workspace.workspaceId, agentId: workspace.agentId });
const fileLink = page.getByText(FILE_LINK, { exact: true });
await expect(fileLink).toBeVisible({ timeout: 15_000 });
// Native opens the same sheet from a long press.
await fileLink.click({ button: "right" });
const linkMenu = page.getByTestId("markdown-link-menu-content");
await expect(linkMenu.getByRole("menuitem")).toHaveText([
"Open file",
"Reveal in Files",
"Download",
"Copy path",
"Copy relative path",
]);
await linkMenu.getByRole("menuitem", { name: "Open file" }).click();
await expect(sheet(page, "linked.ts")).toBeVisible();
await page.getByTestId("sheet-file-menu-trigger").click();
const sheetMenu = page.getByTestId("sheet-file-menu-content");
await expect(sheetMenu.getByRole("menuitem")).toHaveText([
"Reveal in Files",
"Download",
"Copy path",
"Copy relative path",
]);
await expect(sheetMenu.getByRole("menuitem").last()).toBeInViewport({ ratio: 1 });
await page.screenshot({
path: test.info().outputPath("compact-file-sheet-menu.png"),
animations: "disabled",
});
await sheetMenu.getByRole("menuitem", { name: "Reveal in Files" }).click();
await expectNoSheetOpen(page);
await expect(
page.locator('[data-testid^="file-explorer-row-"][aria-selected="true"]'),
).toContainText("linked.ts");
await page.screenshot({
path: test.info().outputPath("compact-reveal-in-files.png"),
animations: "disabled",
});
} finally {
await workspace.cleanup();
}
});
test("a narrow desktop window keeps the desktop actions in the file sheet menu", async ({
page,
}) => {
await page.setViewportSize({ width: 390, height: 844 });
const workspace = await seedMockAgentWorkspace({
repoPrefix: "narrow-desktop-file-actions-",
title: "File actions",
initialPrompt: promptMentioning(FILE_LINK),
});
try {
await writeFile(path.join(workspace.cwd, "linked.ts"), "one\ntwo\nthree\n", "utf8");
await installLocalDesktopHost(page, workspace.cwd, { fileManager: "Dolphin" });
await openAgentRoute(page, { workspaceId: workspace.workspaceId, agentId: workspace.agentId });
await page.getByText(FILE_LINK, { exact: true }).click();
await expect(sheet(page, "linked.ts")).toBeVisible({ timeout: 15_000 });
await page.getByTestId("sheet-file-menu-trigger").click();
await expect(page.getByTestId("sheet-file-menu-content").getByRole("menuitem")).toHaveText([
"Reveal in Files",
"Reveal in Dolphin",
"Open in default app",
"Download",
"Copy path",
"Copy relative path",
]);
} finally {
await workspace.cleanup();
}
});
test("compact opens files and subagents in a sheet, leaving the tabs for agents", async ({
page,
}) => {
@@ -12,12 +12,9 @@ import {
openImageLightbox,
closeImageLightbox,
pressInterruptShortcut,
blurComposerInput,
expectComposerDraft,
expectComposerDisabled,
expectComposerEditable,
expectComposerFocused,
expectComposerNotFocused,
expectAttachButtonDisabled,
fillComposerDraft,
dropFileOnComposer,
@@ -178,19 +175,8 @@ test.describe("Composer attachments", () => {
await test.step("remove the image and attach a dropped file", async () => {
await removeAttachmentPill(page, "composer-image-attachment-pill", "Remove image attachment");
await expect(page.getByTestId("composer-image-attachment-pill")).toHaveCount(0);
await blurComposerInput(page);
await expectComposerNotFocused(page);
await dropFileOnComposer(page, TEST_JSON);
await expectAttachmentPill(page, "composer-file-attachment-pill");
await expectComposerFocused(page);
});
await test.step("dropping an image focuses the composer", async () => {
await blurComposerInput(page);
await expectComposerNotFocused(page);
await dropFileOnComposer(page, TEST_IMAGE);
await expectAttachmentPill(page, "composer-image-attachment-pill");
await expectComposerFocused(page);
});
});
@@ -212,12 +198,9 @@ test.describe("Composer attachments", () => {
projectDisplayName: workspace.projectDisplayName,
});
await blurComposerInput(page);
await expectComposerNotFocused(page);
await dropFileOnComposer(page, TEST_JSON);
await expectAttachmentPill(page, "composer-file-attachment-pill");
await expectComposerFocused(page);
} finally {
await workspace.cleanup();
}
@@ -12,25 +12,14 @@ import {
import { expectWorkspaceTabVisible, openSessions } from "../support/helpers/archive-tab";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
import { getServerId } from "../support/helpers/server-id";
import {
switchWorkspaceViaSidebar,
waitForSidebarHydration,
} from "../support/helpers/workspace-ui";
import { switchWorkspaceViaSidebar } from "../support/helpers/workspace-ui";
import {
closeMobileAgentSidebar,
expectMobileAgentSidebarHidden,
expectMobileAgentSidebarVisible,
openMobileAgentSidebar,
} from "../support/helpers/sidebar";
import {
expectNewWorkspaceProjectSelected,
openGlobalNewWorkspaceComposer,
openStartingRefPicker,
selectBranchInPicker,
selectWorkspaceIsolation,
} from "../support/helpers/new-workspace";
import { gotoAppShell } from "../support/helpers/app";
import { seedWorkspace } from "../support/helpers/seed-client";
import { expectNewWorkspaceProjectSelected } from "../support/helpers/new-workspace";
const TEST_COMMANDS = [
{
@@ -130,18 +119,11 @@ const TEST_COMMANDS_REPLY: ListCommandsReply = { commands: TEST_COMMANDS, error:
async function installListCommandsStub(
page: Page,
reply: () => ListCommandsReply | Promise<ListCommandsReply> = () => TEST_COMMANDS_REPLY,
options?: {
onClientMessage?: (message: string | Buffer, forward: () => void) => void;
},
): Promise<void> {
await page.routeWebSocket(daemonWsRoutePattern(), (ws) => {
const server = ws.connectToServer();
ws.onMessage((message) => {
if (options?.onClientMessage) {
options.onClientMessage(message, () => server.send(message));
return;
}
server.send(message);
});
@@ -187,24 +169,6 @@ async function installListCommandsStub(
});
}
async function holdWorkspaceCreateWithCommandsStub(page: Page): Promise<{ release: () => void }> {
let release: (() => void) | null = null;
await installListCommandsStub(page, undefined, {
onClientMessage(message, forward) {
if (typeof message === "string" && message.includes('"workspace.create.request"')) {
release = forward;
return;
}
forward();
},
});
return {
release: () => {
release?.();
},
};
}
function createHeldReply(): {
reply: () => Promise<ListCommandsReply>;
release: () => void;
@@ -486,44 +450,6 @@ test.describe("Composer autocomplete", () => {
}
});
test("shows autocomplete after closing the New Workspace branch picker and hides it while submitting", async ({
page,
}) => {
const heldCreate = await holdWorkspaceCreateWithCommandsStub(page);
const seeded = await seedWorkspace({ repoPrefix: "autocomplete-branch-picker-" });
try {
await gotoAppShell(page);
await waitForSidebarHydration(page);
await openGlobalNewWorkspaceComposer(page);
const input = composerLocator(page);
await expect(input).toBeEditable({ timeout: 30_000 });
await selectWorkspaceIsolation(page, "worktree");
await expect(page.getByTestId("new-workspace-ref-picker-trigger")).toBeVisible({
timeout: 30_000,
});
await openStartingRefPicker(page);
await selectBranchInPicker(page, "main");
await expect(input).toBeFocused();
await page.keyboard.type("/h");
const popover = page.getByTestId("composer-autocomplete-popover");
await expect(popover.getByText("/help", { exact: true }).first()).toBeVisible({
timeout: 30_000,
});
// Submitting while locked hides the autocomplete popover instead of leaving it over loading.
await page.getByTestId("workspace-create-submit").click();
await expect(input).not.toBeEditable({ timeout: 10_000 });
await expect(popover).toHaveCount(0);
} finally {
heldCreate.release();
await seeded.cleanup();
}
});
test("keeps New workspace off the running-agent command list before a project is chosen", async ({
page,
}) => {
@@ -387,10 +387,7 @@ test.describe("Composer model and effort shortcuts", () => {
const effortLabel = page.getByTestId("combined-model-selector-thinking-label");
await expect(effortLabel).toHaveText("Medium");
await toggleModelPickerFromComposer(page);
const drawerModelRow = page.getByTestId("agent-controls-model");
await expect(drawerModelRow).toBeVisible();
await page.keyboard.press(`${SHORTCUT_MOD}+Slash`);
await expect(drawerModelRow).toBeHidden();
await expectModelPickerClosesFromSearch(page);
await cycleComposerEffort(page);
await expect(effortLabel).toHaveText("High");
});
@@ -233,63 +233,6 @@ test("opening an agent focuses the composer when a mouse drives the UI", async (
}
});
/** The composer frame's border colour once its border-color transition has finished. */
async function readSettledFrameBorder(page: Page): Promise<string> {
return composerLocator(page).evaluate(async (input) => {
let frame = input.parentElement;
while (frame && parseFloat(getComputedStyle(frame).borderTopWidth) < 1) {
frame = frame.parentElement;
}
if (!frame) throw new Error("Composer frame has no border");
while (frame.getAnimations().length > 0) {
await new Promise((resolve) => requestAnimationFrame(resolve));
}
return getComputedStyle(frame).borderTopColor;
});
}
// `borderAccent` at rest, `surface4` while focused: greys in both themes, never the accent.
const FRAME_BORDERS = {
dark: { rest: "rgb(47, 53, 52)", focus: "rgb(89, 91, 91)" },
light: { rest: "rgb(236, 236, 241)", focus: "rgb(212, 212, 216)" },
} as const;
for (const colorScheme of ["dark", "light"] as const) {
test(`the composer frame takes a neutral border on focus in the ${colorScheme} theme`, async ({
page,
}) => {
const agent = await seedMockAgentWorkspace({
repoPrefix: "composer-frame-focus-",
title: "Composer frame focus",
});
const borders = FRAME_BORDERS[colorScheme];
try {
await page.emulateMedia({ colorScheme });
await openAgentRoute(page, agent);
const composer = composerLocator(page);
await expectComposerVisible(page);
await page.mouse.move(0, 0);
await blurComposerInput(page);
expect(await readSettledFrameBorder(page)).toBe(borders.rest);
await composer.click();
await page.mouse.move(0, 0);
await expectComposerFocused(page);
expect(await readSettledFrameBorder(page)).toBe(borders.focus);
await blurComposerInput(page);
expect(await readSettledFrameBorder(page)).toBe(borders.rest);
// Hover alone leaves the frame at rest, so the border only ever means focus.
await composer.hover();
expect(await readSettledFrameBorder(page)).toBe(borders.rest);
} finally {
await agent.cleanup();
}
});
}
async function waitForAnimationFrames(page: Page, count: number): Promise<void> {
await page.evaluate(async (frames) => {
for (let frame = 0; frame < frames; frame += 1) {
@@ -1,235 +0,0 @@
import { mkdir, writeFile } from "node:fs/promises";
import path from "node:path";
import { expect, test, type Page } from "../support/fixtures";
import {
openFileExplorer,
openFileFromExplorer,
expectFileTabOpen,
} from "../support/helpers/file-explorer";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
const APP_SETTINGS_KEY = "@paseo:app-settings";
const DIFF_FIXTURE = [
"Here is a diff block:",
"",
"```diff",
"diff --git a/src/greet.ts b/src/greet.ts",
"--- a/src/greet.ts",
"+++ b/src/greet.ts",
"@@ -1,3 +1,4 @@ export function greet(name: string) {",
" const prefix = 'Hello';",
"- return `${prefix}, ${name}`;",
"+ const trimmed = name.trim();",
"+ return `${prefix}, ${trimmed}!`;",
"```",
"",
"And a patch block:",
"",
"```patch",
"--- a/README.md",
"+++ b/README.md",
"@@ -1,2 +1,2 @@",
" # Paseo",
"-Old description",
"+New description",
"```",
"",
"Plus Ruby, Kotlin, TOML, and SQL:",
"",
"```ruby",
"class Greeter",
' def hi(name) = "Hello #{name}"',
"end",
"```",
"",
"```kotlin",
'val message: String = "Kotlin ready"',
"```",
"",
"```toml",
"[server]",
'host = "localhost"',
"```",
"",
"```sql",
"SELECT id, name FROM users WHERE active = TRUE;",
"```",
].join("\n");
const FILE_DIFF_CONTENT = [
"diff --git a/app.py b/app.py",
"index 1111111..2222222 100644",
"--- a/app.py",
"+++ b/app.py",
"@@ -1,3 +1,3 @@ def greet():",
" print('hello')",
"-old_value = 1",
"+new_value = 2",
].join("\n");
async function saveScreenshot(page: Page, name: string): Promise<void> {
const dir = process.env.PASEO_QA_SCREENSHOT_DIR;
if (!dir) return;
await mkdir(dir, { recursive: true });
await page.screenshot({ path: path.join(dir, name), fullPage: true });
}
function assistantMessages(page: Page) {
return page.locator("[data-message-id]").filter({ has: page.getByTestId("assistant-message") });
}
test.describe("diff and patch syntax highlighting", () => {
for (const theme of ["dark", "light"] as const) {
test(`highlights diff and patch fences in chat (${theme} theme)`, async ({ page }) => {
await page.addInitScript(
({ key, mode }) => {
localStorage.setItem(key, JSON.stringify({ theme: mode }));
},
{ key: APP_SETTINGS_KEY, mode: theme },
);
const agent = await seedMockAgentWorkspace({
repoPrefix: `diff-chat-${theme}-`,
title: `Diff highlight (${theme})`,
initialPrompt: "Show me the diff and patch.",
featureValues: { mockAssistantResponse: DIFF_FIXTURE },
});
try {
await agent.client.waitForAgentUpsert(
agent.agentId,
(snapshot) => snapshot.status === "idle",
30_000,
);
await openAgentRoute(page, agent);
const message = assistantMessages(page);
const expectedColors =
theme === "dark"
? {
addition: "rgb(152, 195, 121)",
deletion: "rgb(224, 108, 117)",
meta: "rgb(92, 99, 112)",
}
: {
addition: "rgb(52, 130, 51)",
deletion: "rgb(214, 59, 47)",
meta: "rgb(160, 161, 167)",
};
const diffAdd = message.getByText("+ const trimmed = name.trim();", { exact: true });
const diffDel = message.getByText("- return `${prefix}, ${name}`;", { exact: true });
const diffMeta = message.getByText(
"@@ -1,3 +1,4 @@ export function greet(name: string) {",
{
exact: true,
},
);
const patchAdd = message.getByText("+New description", { exact: true });
const patchDel = message.getByText("-Old description", { exact: true });
await expect(diffAdd).toBeVisible({ timeout: 30_000 });
await expect(diffAdd).toHaveCSS("color", expectedColors.addition);
await expect(diffDel).toHaveCSS("color", expectedColors.deletion);
await expect(diffMeta).toHaveCSS("color", expectedColors.meta);
await expect(patchAdd).toHaveCSS("color", expectedColors.addition);
await expect(patchDel).toHaveCSS("color", expectedColors.deletion);
const rubyDef = message.getByText("def", { exact: true });
const kotlinVal = message.getByText("val", { exact: true });
const tomlHost = message.getByText("host", { exact: true });
const sqlSelect = message.getByText("SELECT", { exact: true });
const expectedKeyword = theme === "dark" ? "rgb(198, 120, 221)" : "rgb(166, 38, 164)";
const expectedProperty = theme === "dark" ? "rgb(209, 154, 102)" : "rgb(152, 104, 1)";
await expect(rubyDef).toHaveCSS("color", expectedKeyword);
await expect(kotlinVal).toHaveCSS("color", expectedKeyword);
await expect(tomlHost).toHaveCSS("color", expectedProperty);
await expect(sqlSelect).toHaveCSS("color", expectedKeyword);
await saveScreenshot(page, `chat-diff-patch-${theme}.png`);
} finally {
await agent.cleanup();
}
});
}
test("highlights a .diff file in the Files viewer", async ({ page, withWorkspace }) => {
await page.addInitScript(
({ key }) => {
localStorage.setItem(key, JSON.stringify({ theme: "dark" }));
},
{ key: APP_SETTINGS_KEY },
);
const workspace = await withWorkspace({ prefix: "diff-file-viewer-" });
await writeFile(path.join(workspace.repoPath, "changes.diff"), FILE_DIFF_CONTENT);
await workspace.navigateTo();
await openFileExplorer(page);
await openFileFromExplorer(page, "changes.diff");
await expectFileTabOpen(page, "changes.diff");
const editor = page.getByTestId("file-source-editor").filter({ visible: true });
await expect(editor).toBeVisible({ timeout: 30_000 });
const addLine = editor
.locator(".cm-line", { hasText: "+new_value = 2" })
.locator("span")
.first();
const delLine = editor
.locator(".cm-line", { hasText: "-old_value = 1" })
.locator("span")
.first();
const metaLine = editor
.locator(".cm-line", { hasText: "@@ -1,3 +1,3 @@ def greet():" })
.locator("span")
.first();
await expect(addLine).toHaveCSS("color", "rgb(152, 195, 121)");
await expect(delLine).toHaveCSS("color", "rgb(224, 108, 117)");
await expect(metaLine).toHaveCSS("color", "rgb(92, 99, 112)");
await saveScreenshot(page, "files-viewer-diff-dark.png");
});
test("highlights a .patch file in the Files viewer (light theme)", async ({
page,
withWorkspace,
}) => {
await page.addInitScript(
({ key }) => {
localStorage.setItem(key, JSON.stringify({ theme: "light" }));
},
{ key: APP_SETTINGS_KEY },
);
const workspace = await withWorkspace({ prefix: "patch-file-viewer-" });
await writeFile(path.join(workspace.repoPath, "fix.patch"), FILE_DIFF_CONTENT);
await workspace.navigateTo();
await openFileExplorer(page);
await openFileFromExplorer(page, "fix.patch");
await expectFileTabOpen(page, "fix.patch");
const editor = page.getByTestId("file-source-editor").filter({ visible: true });
await expect(editor).toBeVisible({ timeout: 30_000 });
const addLine = editor
.locator(".cm-line", { hasText: "+new_value = 2" })
.locator("span")
.first();
const delLine = editor
.locator(".cm-line", { hasText: "-old_value = 1" })
.locator("span")
.first();
const metaLine = editor
.locator(".cm-line", { hasText: "@@ -1,3 +1,3 @@ def greet():" })
.locator("span")
.first();
await expect(addLine).toHaveCSS("color", "rgb(52, 130, 51)");
await expect(delLine).toHaveCSS("color", "rgb(214, 59, 47)");
await expect(metaLine).toHaveCSS("color", "rgb(160, 161, 167)");
await saveScreenshot(page, "files-viewer-patch-light.png");
});
});
@@ -753,10 +753,6 @@ test.describe("CodeMirror workspace file editing", () => {
const imagePath = path.join(workspace.repoPath, "pixel.png");
await writeFile(markdownPath, "# First heading\n", "utf8");
await writeFile(imagePath, RED_PIXEL);
await writeFile(
path.join(workspace.repoPath, "shape.svg"),
await readFile(path.resolve(__dirname, "../mobile/fixtures/native-preview.svg")),
);
await workspace.navigateTo();
await openWorkspaceFile(page, "notes.md");
@@ -804,11 +800,6 @@ test.describe("CodeMirror workspace file editing", () => {
const initialSource = await image.getAttribute("src");
await writeFile(imagePath, BLUE_PIXEL);
await expect.poll(() => image.getAttribute("src")).not.toBe(initialSource);
await openWorkspaceFile(page, "shape.svg");
await expect(imageCanvas).toBeVisible();
await expect(image).toBeVisible();
await expect(image).toHaveJSProperty("naturalWidth", 240);
});
test("renders local relative images inside Markdown preview", async ({ page, withWorkspace }) => {
@@ -1,143 +0,0 @@
import { mkdir, writeFile } from "node:fs/promises";
import path from "node:path";
import { expect, type Page } from "@playwright/test";
import { test } from "../support/fixtures";
import {
expectExplorerEntryHidden,
expectExplorerEntryVisible,
expandFolder,
expectFileTabOpen,
openFileExplorer,
} from "../support/helpers/file-explorer";
import { gotoWorkspace } from "../support/helpers/launcher";
import { seedWorkspace, type SeededWorkspace } from "../support/helpers/seed-client";
let workspace: SeededWorkspace;
test.beforeEach(async () => {
workspace = await seedWorkspace({ repoPrefix: "file-explorer-filter-" });
await mkdir(path.join(workspace.repoPath, "data/nested"), { recursive: true });
await writeFile(path.join(workspace.repoPath, "data/nested/report.csv"), "name,total\n");
await mkdir(path.join(workspace.repoPath, "docs"), { recursive: true });
await writeFile(path.join(workspace.repoPath, "docs/guide.md"), "# Guide\n");
});
test.afterEach(async () => {
await workspace?.cleanup();
});
function filterInput(page: Page) {
return page.getByTestId("files-filter-input");
}
function matches(page: Page) {
return page.locator('[data-testid^="file-filter-row-"][aria-selected]');
}
function match(page: Page, name: string) {
return matches(page).filter({ hasText: name });
}
test("finds files in collapsed folders and acts on them", async ({ page }) => {
await gotoWorkspace(page, workspace.workspaceId);
await openFileExplorer(page);
await expandFolder(page, "docs");
await expectExplorerEntryVisible(page, "guide.md");
await filterInput(page).fill("report");
await expect(matches(page)).toHaveCount(1);
await expect(match(page, "report.csv")).toContainText("data/nested");
// Draggable onto the chat, like a tree row.
await expect(match(page, "report.csv").locator('[draggable="true"]')).toHaveCount(1);
await match(page, "report.csv").click({ button: "right" });
const menu = page.getByTestId(/file-filter-row-\d+-context-menu$/);
for (const name of [
"Reveal in Files",
"Copy path",
"Copy relative path",
"Download",
"Rename",
"Delete",
]) {
await expect(menu.getByRole("menuitem", { name, exact: true })).toBeVisible();
}
await expect(menu.getByRole("menuitem", { name: "New file", exact: true })).toHaveCount(0);
await page.keyboard.press("Escape");
await expect(menu).toHaveCount(0);
await match(page, "report.csv").click();
await expectFileTabOpen(page, "data/nested/report.csv");
// Escape restores the tree with its expanded folders.
await filterInput(page).press("Escape");
await expect(filterInput(page)).toHaveValue("");
await expectExplorerEntryVisible(page, "guide.md");
await expectExplorerEntryHidden(page, "report.csv");
// So does the clear button.
await filterInput(page).fill("zzz-no-such-file");
await expect(page.getByText("No matching files", { exact: true })).toBeVisible();
await page.getByTestId("files-filter-clear").click();
await expect(filterInput(page)).toHaveValue("");
await expectExplorerEntryVisible(page, "guide.md");
// Revealing a match leaves the filter and selects the file in the tree.
await filterInput(page).fill("report");
await match(page, "report.csv").click({ button: "right" });
await page.getByRole("menuitem", { name: "Reveal in Files", exact: true }).click();
await expect(filterInput(page)).toHaveValue("");
await expect(
page.locator('[data-testid^="file-explorer-row-"][aria-selected="true"]'),
).toContainText("report.csv");
});
/** The directory listings the app asks the host for, by path. */
function recordDirectoryListings(page: Page): string[] {
const listed: string[] = [];
page.on("websocket", (socket) => {
socket.on("framesent", ({ payload }) => {
if (typeof payload !== "string") return;
const { message } = JSON.parse(payload);
if (message?.type === "file_explorer_request" && message.mode === "list") {
listed.push(message.path);
}
});
});
return listed;
}
test("opens a matching folder in the tree", async ({ page }) => {
const listed = recordDirectoryListings(page);
await gotoWorkspace(page, workspace.workspaceId);
await openFileExplorer(page);
await filterInput(page).fill("nested");
await match(page, "nested").first().click();
await expect(filterInput(page)).toHaveValue("");
await expectExplorerEntryVisible(page, "report.csv");
await expect(
page.locator('[data-testid^="file-explorer-row-"][aria-selected="true"]'),
).toContainText("nested");
// One walk down to the folder: its collapsed parent is listed once.
expect(listed.filter((directory) => directory === "data")).toEqual(["data"]);
});
test("renames and deletes a match without leaving the filter", async ({ page }) => {
await gotoWorkspace(page, workspace.workspaceId);
await openFileExplorer(page);
await filterInput(page).fill("guide");
await match(page, "guide.md").click({ button: "right" });
await page.getByRole("menuitem", { name: "Rename", exact: true }).click();
const nameInput = page.getByTestId("file-explorer-name-input");
await nameInput.fill("guide-v2.md");
await nameInput.press("Enter");
await expect(match(page, "guide-v2.md")).toBeVisible();
page.once("dialog", (dialog) => void dialog.accept());
await match(page, "guide-v2.md").click({ button: "right" });
await page.getByRole("menuitem", { name: "Delete", exact: true }).click();
await expect(page.getByText("No matching files", { exact: true })).toBeVisible();
});
@@ -1,135 +0,0 @@
import { mkdir, writeFile } from "node:fs/promises";
import path from "node:path";
import { expect, test, type Page } from "../support/fixtures";
import { commandCenterSection, openCommandCenter } from "../support/helpers/command-center";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
const REPLY = [
"Read [the report](data/report.csv), the [settings](.config/nested/file-55.json),",
"the [data folder](data) or the [website](https://example.test/docs).",
"Nothing is at gone.md.",
].join(" ");
async function seedLinkedFiles() {
const agent = await seedMockAgentWorkspace({
repoPrefix: "file-link-menu-",
title: "File link actions",
initialPrompt: "Show the links",
featureValues: { mockAssistantResponse: REPLY },
});
await mkdir(path.join(agent.cwd, "data"), { recursive: true });
await writeFile(path.join(agent.cwd, "data/report.csv"), "name,total\nalpha,1\n");
await mkdir(path.join(agent.cwd, ".config/nested"), { recursive: true });
// Enough siblings that the target row starts outside the tree's viewport.
await Promise.all(
Array.from({ length: 60 }, (_, index) =>
writeFile(
path.join(agent.cwd, `.config/nested/file-${String(index).padStart(2, "0")}.json`),
"{}\n",
),
),
);
await agent.client.waitForFinish(agent.agentId, 30_000);
return agent;
}
function replyLink(page: Page, name: string) {
return page.getByTestId("assistant-message").getByRole("link", { name, exact: true });
}
function linkMenu(page: Page) {
return page.getByTestId("markdown-link-menu");
}
function selectedTreeRow(page: Page) {
return page.locator('[data-testid^="file-explorer-row-"][aria-selected="true"]');
}
async function expectMenuItems(page: Page, names: string[]) {
await expect(linkMenu(page).getByRole("menuitem")).toHaveText(names);
}
async function dismissMenu(page: Page) {
await page.keyboard.press("Escape");
await expect(linkMenu(page)).toHaveCount(0);
}
async function screenshot(page: Page, name: string) {
await page.screenshot({
path: test.info().outputPath(`${name}.png`),
animations: "disabled",
});
}
test("links in chat and file tabs offer file actions and reveal the file in Files", async ({
page,
}, testInfo) => {
testInfo.setTimeout(180_000);
const agent = await seedLinkedFiles();
try {
await page.addInitScript(() => {
localStorage.setItem(
"panel-state",
JSON.stringify({ state: { explorerShowHiddenFiles: false }, version: 0 }),
);
});
await openAgentRoute(page, agent);
await replyLink(page, "the report").click({ button: "right" });
await expectMenuItems(page, [
"Open file",
"Open to the side",
"Reveal in Files",
"Download",
"Copy path",
"Copy relative path",
]);
await screenshot(page, "chat-file-link-menu");
await dismissMenu(page);
await replyLink(page, "data folder").click({ button: "right" });
await expectMenuItems(page, ["Reveal in Files", "Copy path", "Copy relative path"]);
await dismissMenu(page);
await replyLink(page, "website").click({ button: "right" });
await expectMenuItems(page, ["Open in default browser", "Copy link"]);
await screenshot(page, "chat-web-link-menu");
await dismissMenu(page);
// A bare name is looked up while the menu is open; acting on one that matches nothing says so.
await replyLink(page, "gone.md").click({ button: "right" });
await linkMenu(page).getByRole("menuitem", { name: "Download" }).click();
await expect(page.getByTestId("assistant-file-link-not-found-toast")).toContainText("gone.md");
await replyLink(page, "the report").click({ button: "right" });
await linkMenu(page).getByRole("menuitem", { name: "Reveal in Files" }).click();
await expect(selectedTreeRow(page)).toContainText("report.csv");
await expect(replyLink(page, "the report")).toBeVisible();
await screenshot(page, "reveal-in-files-from-chat-link");
// A hidden folder, a freshly expanded tree and a row far below the fold.
await replyLink(page, "settings").click();
const fileTab = page.getByTestId("workspace-tab-file_.config/nested/file-55.json").first();
await expect(fileTab).toBeVisible();
await fileTab.click({ button: "right" });
const tabMenu = page.getByTestId("workspace-tab-context-file_.config/nested/file-55.json");
await expect(tabMenu.getByRole("menuitem", { name: "Reveal in Files" })).toBeVisible();
await expect(tabMenu.getByRole("menuitem", { name: "Copy relative path" })).toBeVisible();
await screenshot(page, "file-tab-menu");
await tabMenu.getByRole("menuitem", { name: "Reveal in Files" }).click();
await expect(selectedTreeRow(page)).toContainText("file-55.json");
await expect(selectedTreeRow(page)).toBeInViewport();
await screenshot(page, "reveal-in-files-from-file-tab");
// The tree is already mounted and scrolled elsewhere. Command Center reveals the active tab.
await page.getByTestId("file-explorer-tree-scroll").hover();
await page.mouse.wheel(0, -100_000);
await expect(selectedTreeRow(page)).not.toBeInViewport();
const commandCenter = await openCommandCenter(page);
await commandCenter.getByTestId("command-center-input").fill("Reveal in Files");
await commandCenterSection(commandCenter, "Reveal in Files").click();
await expect(selectedTreeRow(page)).toBeInViewport();
} finally {
await agent.cleanup();
}
});
@@ -111,102 +111,3 @@ test("replaces only the first configured metadata model", async ({ page }) => {
}
}
});
test("saves and clears host-wide metadata instructions without overwriting providers", async ({
page,
}, testInfo) => {
const client = await connectNewWorkspaceDaemonClient({ ownProjects: false });
const previousConfig = await client.getDaemonConfig();
try {
await client.patchDaemonConfig({
metadataGeneration: {
providers: [{ provider: "mock", model: "ten-second-stream" }],
instructions: "",
},
});
await openMetadataGenerationSettings(page);
const instructionsRow = page.getByTestId("metadata-generation-instructions-row");
await expect(instructionsRow).toBeVisible();
await page.screenshot({
path: testInfo.outputPath("metadata-instructions-tucked-empty.png"),
fullPage: true,
});
await instructionsRow.click();
const instructionsSheet = page.getByTestId("metadata-generation-instructions-sheet");
const instructionsInput = page.getByTestId("metadata-generation-instructions-input");
const saveButton = page.getByTestId("metadata-generation-instructions-save");
await expect(instructionsSheet).toBeVisible();
await expect(saveButton).toBeDisabled();
await page.screenshot({
path: testInfo.outputPath("metadata-instructions-sheet-empty.png"),
fullPage: true,
animations: "disabled",
});
await instructionsInput.fill("Write in Simplified Chinese. Do not use em dashes.");
await expect(saveButton).toBeEnabled();
await saveButton.click();
await expect(instructionsSheet).toHaveCount(0);
await expect
.poll(async () => (await client.getDaemonConfig()).config.metadataGeneration)
.toEqual({
providers: [{ provider: "mock", model: "ten-second-stream" }],
instructions: "Write in Simplified Chinese. Do not use em dashes.",
});
await page.reload();
await expect(
page
.getByTestId("metadata-generation-instructions-row")
.getByText("Write in Simplified Chinese. Do not use em dashes."),
).toBeVisible();
await page.screenshot({
path: testInfo.outputPath("metadata-instructions-tucked-saved.png"),
fullPage: true,
});
// Verify compact layout keeps the tucked row and bottom sheet clean.
await page.setViewportSize({ width: 390, height: 844 });
await expect(page.getByTestId("metadata-generation-instructions-row")).toBeVisible();
await page.screenshot({
path: testInfo.outputPath("metadata-instructions-compact-row.png"),
fullPage: true,
});
await page.getByTestId("metadata-generation-instructions-row").click();
await expect(page.getByTestId("metadata-generation-instructions-input")).toHaveValue(
"Write in Simplified Chinese. Do not use em dashes.",
);
await page.screenshot({
path: testInfo.outputPath("metadata-instructions-compact-sheet.png"),
fullPage: true,
});
await page.getByTestId("metadata-generation-instructions-input").fill("");
await expect(page.getByTestId("metadata-generation-instructions-save")).toBeEnabled();
await page.getByTestId("metadata-generation-instructions-save").click();
await expect(page.getByTestId("metadata-generation-instructions-sheet")).toHaveCount(0);
await expect
.poll(async () => (await client.getDaemonConfig()).config.metadataGeneration)
.toEqual({
providers: [{ provider: "mock", model: "ten-second-stream" }],
});
} finally {
try {
await client.patchDaemonConfig({
metadataGeneration: {
providers: previousConfig.config.metadataGeneration.providers,
instructions: previousConfig.config.metadataGeneration.instructions ?? "",
},
});
} finally {
await client.close().catch(() => undefined);
}
}
});
@@ -3,11 +3,9 @@ import type { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import { test, expect, type Page } from "../support/fixtures";
import { connectDaemonClient } from "../support/helpers/daemon-client-loader";
import {
clearModelSearchWithEscape,
clickModelRowWhileProviderOpens,
closeModelPicker,
expectModelListScrollKeepsSearchFocused,
expectSearchProfilesAtTop,
expectModelSearchEmptyState,
expectModelPickerHeight,
expectModelPickerWidth,
@@ -21,14 +19,8 @@ import {
seedModelProvider,
expectSearchResultsVirtualized,
} from "../support/helpers/agent-profiles";
import {
blurComposerInput,
expectComposerFocused,
expectComposerVisible,
} from "../support/helpers/composer";
import { openGlobalNewWorkspaceComposer } from "../support/helpers/new-workspace";
import { expectComposerVisible } from "../support/helpers/composer";
import { clickNewChat, clickNewTerminal, gotoWorkspace } from "../support/helpers/launcher";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import { seedWorkspace } from "../support/helpers/seed-client";
const MOCK_PROVIDER_LABEL = "Mock Load Test";
@@ -64,7 +56,9 @@ const LARGE_CATALOG = {
};
test.describe("Cross-provider model search", () => {
test("one query reaches every provider and names each result's provider", async ({ page }) => {
test("one query over the picker root reaches every provider and names each result's provider", async ({
page,
}) => {
const provider = await seedModelProvider(STUDIO);
const profile = await seedAgentProfiles([ROOT_VIEW_PROFILE]);
const workspace = await seedWorkspace({ repoPrefix: "model-search-providers-" });
@@ -105,7 +99,7 @@ test.describe("Cross-provider model search", () => {
});
});
await test.step("results replace the Profiles list", async () => {
await test.step("results replace the pinned profiles", async () => {
await expectPinnedProfilesHidden(page);
});
@@ -114,10 +108,6 @@ test.describe("Cross-provider model search", () => {
await test.step("a query with no matches repeats the query back", async () => {
await searchAllModels(page, "zzz");
await expectModelSearchEmptyState(page, "zzz");
});
await test.step("Escape clears the query before it closes the picker", async () => {
await clearModelSearchWithEscape(page);
await closeModelPicker(page);
});
} finally {
@@ -145,23 +135,16 @@ test.describe("Cross-provider model search", () => {
const restingHeight = await readModelPickerHeight(page);
const restingWidth = await readModelPickerWidth(page);
await test.step("a broad query renders only the visible result window and scrolls without leaving search", async () => {
await test.step("a broad query renders only the visible result window", async () => {
await searchAllModels(page, "bulk model");
await expectSearchResultsVirtualized(page, {
provider: LARGE_CATALOG.id,
total: LARGE_CATALOG_SIZE,
});
await expectModelListScrollKeepsSearchFocused(page);
await expectModelPickerHeight(page, restingHeight);
await expectModelPickerWidth(page, restingWidth);
});
await test.step("a new query opens at the top, with the Profiles heading above the matching profile", async () => {
// "search" matches the profile's name and every bulk model's description.
await searchAllModels(page, "search");
await expectSearchProfilesAtTop(page, ROOT_VIEW_PROFILE.id);
});
await test.step("narrowing to one result does not resize the picker", async () => {
await searchAllModels(page, "bulk model 199");
await expectModelSearchResult(page, {
@@ -196,7 +179,7 @@ test.describe("Cross-provider model search", () => {
}
});
test("arrow keys move between the rail, the model list, and search results in the composer", async ({
test("arrow keys navigate profiles, providers, models, and search results in the composer", async ({
page,
}) => {
const provider = await seedModelProvider(STUDIO);
@@ -211,7 +194,7 @@ test.describe("Cross-provider model search", () => {
const workspace = await seedWorkspace({ repoPrefix: "model-picker-arrows-" });
try {
await test.step("open the composer model picker", async () => {
await test.step("open the composer model picker on the root view", async () => {
await gotoWorkspace(page, workspace.workspaceId);
await clickNewChat(page);
await expectComposerVisible(page);
@@ -221,42 +204,32 @@ test.describe("Cross-provider model search", () => {
const viewport = page.getByTestId("combobox-desktop-container");
const trigger = page.getByTestId("combined-model-selector").filter({ visible: true }).first();
const profileRow = viewport.getByTestId("model-profile-row-agent_profile_e2e_arrows");
const profilesRailRow = viewport.getByTestId("model-picker-rail-profiles");
const studioProviderRow = viewport.getByTestId(`model-provider-${STUDIO.id}`);
await test.step("ArrowLeft moves to the rail, ArrowDown opens each entry, ArrowRight enters its list", async () => {
await page.keyboard.press("ArrowLeft");
// The rail opens what it lands on, so ArrowUp from any provider reaches Profiles.
for (let step = 0; step < 10; step += 1) {
if ((await profilesRailRow.getAttribute("data-active")) === "true") break;
await page.keyboard.press("ArrowUp");
}
await expect(profilesRailRow).toHaveAttribute("data-active", "true");
await expect(profileRow).toBeVisible();
await test.step("move from profiles to providers, drill in with ArrowRight, and go back with ArrowLeft", async () => {
await expect(profileRow).toHaveAttribute("data-active", "true");
// Root view keeps aria-selected absent while keyboard-active uses data-active.
await expect(viewport.locator("[aria-selected]")).toHaveCount(0);
// Step down until Mock Studio is open (provider order can vary across environments).
// Step down until Mock Studio is active (provider order can vary across environments).
for (let step = 0; step < 10; step += 1) {
if ((await studioProviderRow.getAttribute("data-active")) === "true") break;
await page.keyboard.press("ArrowDown");
}
await expect(studioProviderRow).toHaveAttribute("data-active", "true");
await expect(viewport.getByTestId(`model-row-${STUDIO.id}-studio-fast`)).toBeVisible();
await page.keyboard.press("ArrowRight");
await expect(viewport.getByTestId(`model-row-${STUDIO.id}-studio-fast`)).toHaveAttribute(
"data-active",
"true",
);
await expect(viewport.getByTestId(`model-row-${STUDIO.id}-studio-fast`)).toBeVisible();
await page.keyboard.press("ArrowLeft");
await expect(
viewport.locator('[data-testid^="model-row-"][data-active="true"]'),
).toHaveCount(0);
await expect(studioProviderRow).toHaveAttribute("data-active", "true");
});
await test.step("Enter moves from the rail into the list and ArrowDown + Enter selects a model", async () => {
await test.step("Enter drills into the active provider and ArrowDown + Enter selects a model", async () => {
await page.keyboard.press("Enter");
const deepRow = viewport.getByTestId(`model-row-${STUDIO.id}-studio-deep`);
await expect(deepRow).toBeVisible();
await expectModelListScrollKeepsSearchFocused(page);
for (let step = 0; step < 5; step += 1) {
if ((await deepRow.getAttribute("data-active")) === "true") break;
@@ -267,7 +240,6 @@ test.describe("Cross-provider model search", () => {
await page.keyboard.press("Enter");
await expect(viewport).toHaveCount(0);
await expect(trigger).toContainText("Studio deep think");
await expectComposerFocused(page);
});
await test.step("typing filters results while arrow keys select across search matches", async () => {
@@ -286,7 +258,6 @@ test.describe("Cross-provider model search", () => {
await page.keyboard.press("Enter");
await expect(viewport).toHaveCount(0);
await expect(trigger).toContainText("Ten second stream");
await expectComposerFocused(page);
});
await test.step("a press on a model row selects it while the provider list is still opening", async () => {
@@ -294,77 +265,27 @@ test.describe("Cross-provider model search", () => {
await clickModelRowWhileProviderOpens(page, {
provider: "mock",
modelLabel: "One minute stream",
otherProvider: STUDIO.id,
});
await expect(viewport).toHaveCount(0);
await expect(trigger).toContainText("One minute stream");
await expectComposerFocused(page);
});
await test.step("Enter on the active profile row applies it", async () => {
await openModelPicker(page);
await page.keyboard.press("ArrowLeft");
for (let step = 0; step < 10; step += 1) {
if ((await profilesRailRow.getAttribute("data-active")) === "true") break;
await page.keyboard.press("ArrowUp");
}
await page.keyboard.press("ArrowRight");
await expect(profileRow).toHaveAttribute("data-active", "true");
await page.keyboard.press("Enter");
await expect(viewport).toHaveCount(0);
await expect(trigger).toContainText("Ten second stream");
await expectComposerFocused(page);
});
await test.step("the compact drawer surfaces collapsed Profiles above Model on Home and keeps provider headers stable on collapse", async () => {
await test.step("folded compact sheet also supports Enter on the active profile row", async () => {
await page.setViewportSize({ width: 390, height: 800 });
await page.getByTestId("combined-model-selector").filter({ visible: true }).first().click();
const profilesToggle = page.getByTestId("agent-controls-profiles");
const modelRowButton = page.getByTestId("agent-controls-model");
await expect(profilesToggle).toBeVisible();
await expect(page.getByTestId("agent-controls-profiles-list")).toHaveCount(0);
const profilesBox = await profilesToggle.boundingBox();
const modelBox = await modelRowButton.boundingBox();
expect(profilesBox && modelBox && profilesBox.y < modelBox.y).toBe(true);
// Open Model: Profiles is extracted onto Home, and provider headers keep exact geometry when collapsed.
await modelRowButton.click();
await expect(page.getByTestId("compact-model-list")).toBeVisible();
await expect(page.getByTestId("model-picker-rail-profiles")).toHaveCount(0);
const expandedHeader = page.locator('[data-testid^="model-provider-section-"]').first();
const expandedBox = await expandedHeader.boundingBox();
const expandedProviderId = (await expandedHeader.getAttribute("data-testid"))?.replace(
"model-provider-section-",
"",
);
await expandedHeader.click();
await expect(page.getByTestId("compact-model-list")).toHaveCount(0);
const collapsedHeader = page.getByTestId(`model-provider-${expandedProviderId}`);
const collapsedBox = await collapsedHeader.boundingBox();
expect(expandedBox && collapsedBox).toBeTruthy();
expect(Math.abs(expandedBox!.y - collapsedBox!.y)).toBeLessThanOrEqual(1);
expect(Math.abs(expandedBox!.height - collapsedBox!.height)).toBeLessThanOrEqual(1);
// Search dock matches the collapsed provider card's outer rails, height, and text rail.
const searchContainer = page.getByTestId("model-search-all-input-container");
const searchInput = page.getByTestId("model-search-all-input");
const searchBox = await searchContainer.boundingBox();
const searchInputBox = await searchInput.boundingBox();
const collapsedCardBox = await readCollapsedCardGeometry(collapsedHeader);
expect(searchBox && searchInputBox && collapsedCardBox).toBeTruthy();
expect(Math.abs(searchBox!.x - collapsedCardBox!.cardX)).toBeLessThanOrEqual(1);
expect(Math.abs(searchBox!.width - collapsedCardBox!.cardWidth)).toBeLessThanOrEqual(1);
expect(Math.abs(searchBox!.height - collapsedCardBox!.cardHeight)).toBeLessThanOrEqual(1);
expect(Math.abs(searchInputBox!.x - collapsedCardBox!.labelX)).toBeLessThanOrEqual(2);
// Return Home, expand Profiles in place, and apply the profile.
await page.getByTestId("sheet-header-back").click();
await profilesToggle.click();
const sheetProfileRow = page.getByTestId("model-profile-row-agent_profile_e2e_arrows");
await expect(sheetProfileRow).toBeVisible();
await sheetProfileRow.click();
await expect(sheetProfileRow).toHaveAttribute("data-active", "true");
await page.keyboard.press("Enter");
await expect(sheetProfileRow).toHaveCount(0);
await expect(page.getByTestId("agent-controls-model-sheet")).not.toBeInViewport();
});
} finally {
await workspace.cleanup();
@@ -372,230 +293,8 @@ test.describe("Cross-provider model search", () => {
await provider.restore();
}
});
test("choosing a model restores composer focus in workspace drafts and New Workspace", async ({
page,
}) => {
const provider = await seedModelProvider(STUDIO);
const workspace = await seedWorkspace({ repoPrefix: "model-picker-focus-" });
try {
await test.step("clicking a model after blurring the workspace draft returns focus to the composer", async () => {
await gotoWorkspace(page, workspace.workspaceId);
await clickNewChat(page);
await expectComposerVisible(page);
await blurComposerInput(page);
await openModelPicker(page);
const viewport = page.getByTestId("combobox-desktop-container");
await viewport.getByTestId(`model-provider-${STUDIO.id}`).click();
await viewport.getByTestId(`model-row-${STUDIO.id}-studio-deep`).click();
await expect(viewport).toHaveCount(0);
await expectComposerFocused(page);
});
await test.step("clicking a model on the New Workspace screen returns focus to the composer", async () => {
await openGlobalNewWorkspaceComposer(page);
await expectComposerVisible(page);
await blurComposerInput(page);
await openModelPicker(page);
const viewport = page.getByTestId("combobox-desktop-container");
await viewport.getByTestId(`model-provider-${STUDIO.id}`).click();
await viewport.getByTestId(`model-row-${STUDIO.id}-studio-fast`).click();
await expect(viewport).toHaveCount(0);
await expectComposerFocused(page);
});
} finally {
await workspace.cleanup();
await provider.restore();
}
});
test("reopening a deep selected model lands at its scroll offset on the first paint on desktop and mobile", async ({
page,
}) => {
const provider = await seedModelProvider(LARGE_CATALOG);
const workspace = await seedWorkspace({ repoPrefix: "model-picker-initial-scroll-" });
try {
await gotoWorkspace(page, workspace.workspaceId);
await clickNewChat(page);
await expectComposerVisible(page);
// Select a model deep in the 200-item catalog.
await openModelPicker(page);
await searchAllModels(page, "bulk model 80");
await page
.getByTestId("combobox-desktop-container")
.getByTestId(`model-row-${LARGE_CATALOG.id}-bulk-80`)
.click();
await expect(page.getByTestId("combobox-desktop-container")).toHaveCount(0);
await test.step("desktop opens directly at the selected row without flashing scrollTop 0", async () => {
await startScrollSampling(page, "model-picker-model-list");
await page.getByTestId("combined-model-selector").filter({ visible: true }).first().click();
const samples = await readScrollSamples(page, "model-picker-model-list");
expect(samples[0]).toBeGreaterThan(0);
await expect(
page
.getByTestId("combobox-desktop-container")
.getByTestId(`model-row-${LARGE_CATALOG.id}-bulk-80`),
).toBeInViewport();
await closeModelPicker(page);
});
await test.step("mobile opens directly at the selected row without flashing scrollTop 0", async () => {
await page.setViewportSize({ width: 390, height: 800 });
await page.getByTestId("combined-model-selector").filter({ visible: true }).first().click();
await expect(page.getByTestId("agent-controls-model")).toBeVisible();
await startScrollSampling(page, "compact-model-list");
await page.getByTestId("agent-controls-model").click();
const samples = await readScrollSamples(page, "compact-model-list");
expect(samples[0]).toBeGreaterThan(0);
const listBox = await page.getByTestId("compact-model-list").boundingBox();
const rowBox = await page
.getByTestId(`model-row-${LARGE_CATALOG.id}-bulk-80`)
.boundingBox();
expect(listBox && rowBox).toBeTruthy();
expect(rowBox!.y).toBeGreaterThanOrEqual(listBox!.y - 1);
expect(rowBox!.y + rowBox!.height).toBeLessThanOrEqual(listBox!.y + listBox!.height + 1);
});
} finally {
await workspace.cleanup();
await provider.restore();
}
});
test("compact single-provider picker keeps its header fixed and scrolls to the last model row", async ({
page,
}) => {
const extraModels = Array.from({ length: 24 }, (_, index) => ({
id: `extra-scroll-${String(index).padStart(2, "0")}`,
label: `Extra scroll model ${String(index).padStart(2, "0")}`,
description: `Extra row ${index}`,
}));
const client = await connectDaemonClient<DaemonClient>({
clientIdPrefix: "single-provider-scroll",
});
const workspace = await seedMockAgentWorkspace({
repoPrefix: "single-provider-scroll-",
title: "Single provider scroll",
model: "ten-second-stream",
modeId: "load-test",
});
try {
await client.patchDaemonConfig({
providers: {
mock: {
additionalModels: extraModels,
},
},
});
await page.setViewportSize({ width: 390, height: 800 });
await openAgentRoute(page, workspace);
await expectComposerVisible(page);
await page.getByTestId("combined-model-selector").filter({ visible: true }).first().click();
await expect(page.getByTestId("agent-controls-model")).toBeVisible();
await page.getByTestId("agent-controls-model").click();
const list = page.getByTestId("compact-model-list");
await expect(list).toBeVisible();
const header = page.getByTestId("model-provider-section-mock");
await expect(header).toBeVisible();
const headerBox = await header.boundingBox();
expect(headerBox).toBeTruthy();
expect(headerBox!.height).toBeGreaterThanOrEqual(16);
// Scroll to the bottom of the lone provider's list and confirm the final row is fully in view.
await list.evaluate((node) => {
node.scrollTop = node.scrollHeight;
});
const lastRow = page.getByTestId("model-row-mock-extra-scroll-23");
await expect(lastRow).toBeVisible();
const listBox = await list.boundingBox();
const lastRowBox = await lastRow.boundingBox();
expect(listBox && lastRowBox).toBeTruthy();
expect(lastRowBox!.y + lastRowBox!.height).toBeLessThanOrEqual(
listBox!.y + listBox!.height + 1,
);
await lastRow.click();
await expect(page.getByTestId("agent-controls-model")).toContainText("Extra scroll model 23");
} finally {
await client
.patchDaemonConfig({
providers: {
mock: {
additionalModels: [],
},
},
})
.catch(() => undefined);
await client.close().catch(() => undefined);
await workspace.cleanup();
}
});
});
async function readCollapsedCardGeometry(collapsedHeader: ReturnType<Page["getByTestId"]>) {
return collapsedHeader.evaluate((node) => {
// Walk up from the press overlay to the SettingsCard container (2px taller for borders).
const header = node.parentElement;
const card = header?.parentElement?.parentElement;
const rect = card?.getBoundingClientRect();
const label = header?.querySelector('[dir="auto"]');
const labelRect = label?.getBoundingClientRect();
return rect && labelRect
? {
cardX: rect.x,
cardWidth: rect.width,
cardHeight: rect.height,
labelX: labelRect.x,
}
: null;
});
}
async function startScrollSampling(page: Page, listTestId: string): Promise<void> {
await page.evaluate((testId) => {
const samples: number[] = [];
const win = window as unknown as {
__scrollSamples?: number[];
__scrollObserver?: MutationObserver;
};
win.__scrollObserver?.disconnect();
win.__scrollSamples = samples;
const capture = (el: Element) => {
samples.push(el.scrollTop);
let remaining = 4;
const tick = () => {
const current = document.querySelector(`[data-testid="${testId}"]`);
if (current) samples.push(current.scrollTop);
remaining -= 1;
if (remaining > 0) requestAnimationFrame(tick);
};
requestAnimationFrame(tick);
};
const observer = new MutationObserver(() => {
const el = document.querySelector(`[data-testid="${testId}"]`);
if (!el) return;
observer.disconnect();
capture(el);
});
win.__scrollObserver = observer;
observer.observe(document.body, { childList: true, subtree: true });
}, listTestId);
}
async function readScrollSamples(page: Page, listTestId: string): Promise<number[]> {
await expect(page.getByTestId(listTestId)).toBeVisible({ timeout: 10_000 });
const readSamples = () =>
page.evaluate(
() => (window as unknown as { __scrollSamples?: number[] }).__scrollSamples ?? [],
);
await expect.poll(async () => (await readSamples()).length).toBeGreaterThanOrEqual(2);
return readSamples();
}
async function setRuntimeCatalog(client: DaemonClient, count: number, cwd: string) {
await client.patchDaemonConfig({
providers: {
@@ -633,6 +332,7 @@ async function reloadSavedDraft(page: Page) {
}
async function expectOneCatalogChoice(page: Page, label: string) {
await openModelPicker(page);
await page.getByRole("button", { name: "Back", exact: true }).click();
await searchAllModels(page, label);
await expect(page.getByTestId("model-row-gemini-gemini-3.5-flash")).toHaveCount(1);
await closeModelPicker(page);
@@ -6,7 +6,6 @@ import {
openStartingRefPicker,
selectBranchInPicker,
selectWorkspaceIsolation,
watchBrowserBranchSuggestions,
} from "../support/helpers/new-workspace";
import { seedWorkspace, type SeededWorkspace } from "../support/helpers/seed-client";
import { getServerId } from "../support/helpers/server-id";
@@ -17,21 +16,6 @@ const LONG_HOST_NAME =
"development-macbook-pro.local-connected-through-a-very-long-private-hostname";
const LONG_BRANCH_NAME =
"feat/app/add-amoled-theme-with-a-very-long-pull-request-and-branch-description";
const MANY_BRANCHES = Array.from(
{ length: 12 },
(_, index) => `feat/branch-${String(index + 1).padStart(2, "0")}`,
);
interface PopoverFrameSample {
t: number;
opacity: number;
top: number;
left: number;
width: number;
height: number;
rowCount: number;
mainTop: number | null;
}
function measureControlRightEdges(controls: HTMLElement[]) {
const measurements: Array<{ label: string | null; right: number }> = [];
@@ -42,69 +26,13 @@ function measureControlRightEdges(controls: HTMLElement[]) {
return measurements;
}
async function startPopoverFrameSampler(page: import("@playwright/test").Page): Promise<void> {
await page.evaluate(() => {
const win = window as unknown as {
__popoverFrames?: PopoverFrameSample[];
__popoverSamplerStop?: () => void;
};
const samples: PopoverFrameSample[] = [];
const start = performance.now();
let stopped = false;
let rafId = 0;
const tick = () => {
if (stopped) return;
const el = document.querySelector<HTMLElement>('[data-testid="combobox-desktop-container"]');
if (el) {
const style = getComputedStyle(el);
const opacity = Number.parseFloat(style.opacity || "1");
const rect = el.getBoundingClientRect();
const rows = el.querySelectorAll("[data-combobox-option-index]");
const mainEl = el.querySelector<HTMLElement>(
'[data-testid="new-workspace-ref-picker-branch-main"]',
);
samples.push({
t: Math.round(performance.now() - start),
opacity,
top: Math.round(rect.top),
left: Math.round(rect.left),
width: Math.round(rect.width),
height: Math.round(rect.height),
rowCount: rows.length,
mainTop: mainEl ? Math.round(mainEl.getBoundingClientRect().top) : null,
});
}
rafId = requestAnimationFrame(tick);
};
rafId = requestAnimationFrame(tick);
win.__popoverFrames = samples;
win.__popoverSamplerStop = () => {
stopped = true;
cancelAnimationFrame(rafId);
};
});
}
async function stopPopoverFrameSampler(
page: import("@playwright/test").Page,
): Promise<PopoverFrameSample[]> {
return page.evaluate(() => {
const win = window as unknown as {
__popoverFrames?: PopoverFrameSample[];
__popoverSamplerStop?: () => void;
};
win.__popoverSamplerStop?.();
return win.__popoverFrames ?? [];
});
}
test.describe("New workspace metadata row layout", () => {
let workspace: SeededWorkspace;
test.beforeEach(async () => {
workspace = await seedWorkspace({
repoPrefix: "new-workspace-layout-",
repo: { branches: [LONG_BRANCH_NAME, ...MANY_BRANCHES] },
repo: { branches: [LONG_BRANCH_NAME] },
});
});
@@ -156,110 +84,4 @@ test.describe("New workspace metadata row layout", () => {
).toBeLessThanOrEqual(composerRightRail + 1);
}
});
test("starting ref popover holds height and row positions on a cold first open", async ({
page,
}) => {
await page.setViewportSize({ width: 1280, height: 900 });
const branchWatch = await watchBrowserBranchSuggestions(page, { hold: true });
await gotoAppShell(page);
await waitForSidebarHydration(page);
await openNewWorkspaceComposer(page, {
projectKey: workspace.projectKey,
projectDisplayName: workspace.projectDisplayName,
});
await selectWorkspaceIsolation(page, "worktree");
await startPopoverFrameSampler(page);
await openStartingRefPicker(page);
const popover = page.getByTestId("combobox-desktop-container");
await expect(popover).toBeVisible({ timeout: 10_000 });
await branchWatch.waitForResponse();
// Give the loading state several frames to paint before releasing the branch list.
await page.waitForTimeout(120);
const loadingBox = await popover.boundingBox();
expect(loadingBox).not.toBeNull();
branchWatch.release();
await expect(page.getByTestId("new-workspace-ref-picker-branch-feat/branch-12")).toBeVisible({
timeout: 10_000,
});
await page.waitForTimeout(80);
const settledBox = await popover.boundingBox();
expect(settledBox).not.toBeNull();
const samples = await stopPopoverFrameSampler(page);
const visibleSamples = samples.filter((s) => s.opacity > 0.9);
expect(visibleSamples.length).toBeGreaterThan(0);
const heights = visibleSamples.map((s) => s.height);
const tops = visibleSamples.map((s) => s.top);
const mainTops = visibleSamples
.map((s) => s.mainTop)
.filter((value): value is number => value !== null);
expect(
Math.max(...heights) - Math.min(...heights),
`popover height shifted across visible frames: ${JSON.stringify(visibleSamples)}`,
).toBeLessThanOrEqual(1);
expect(
Math.max(...tops) - Math.min(...tops),
`popover top shifted across visible frames: ${JSON.stringify(visibleSamples)}`,
).toBeLessThanOrEqual(1);
expect(
mainTops.length > 0 ? Math.max(...mainTops) - Math.min(...mainTops) : 0,
`main row jumped vertically across visible frames: ${JSON.stringify(visibleSamples)}`,
).toBeLessThanOrEqual(1);
// Switching to Pull requests keeps the same frame height.
await page.getByTestId("new-workspace-ref-picker-tab-pull-requests").click();
await page.waitForTimeout(80);
const prBox = await popover.boundingBox();
expect(prBox).not.toBeNull();
expect(Math.abs(prBox!.height - settledBox!.height)).toBeLessThanOrEqual(1);
});
test("starting ref popover prefetches branches before the first click and clamps to short viewports", async ({
page,
}) => {
await page.setViewportSize({ width: 1280, height: 900 });
const branchWatch = await watchBrowserBranchSuggestions(page, { hold: false });
await gotoAppShell(page);
await waitForSidebarHydration(page);
await openNewWorkspaceComposer(page, {
projectKey: workspace.projectKey,
projectDisplayName: workspace.projectDisplayName,
});
await selectWorkspaceIsolation(page, "worktree");
// Branches must prefetch before the user ever clicks the trigger.
await branchWatch.waitForResponse();
await page.waitForTimeout(100);
await startPopoverFrameSampler(page);
await openStartingRefPicker(page);
await expect(page.getByTestId("new-workspace-ref-picker-branch-feat/branch-12")).toBeVisible({
timeout: 10_000,
});
await page.waitForTimeout(80);
const samples = await stopPopoverFrameSampler(page);
const firstVisible = samples.find((s) => s.opacity > 0.9);
expect(firstVisible).toBeDefined();
expect(firstVisible!.rowCount).toBeGreaterThan(5);
// Close and verify short viewport clamping keeps the popover inside the window.
await page.keyboard.press("Escape");
await page.setViewportSize({ width: 1280, height: 500 });
await openStartingRefPicker(page);
const popover = page.getByTestId("combobox-desktop-container");
await expect(popover).toBeVisible({ timeout: 10_000 });
await page.waitForTimeout(100);
const shortBox = await popover.boundingBox();
expect(shortBox).not.toBeNull();
expect(shortBox!.y + shortBox!.height).toBeLessThanOrEqual(500);
});
});
@@ -34,6 +34,7 @@ async function rememberModel(page: Page) {
async function expectRecoveredModelInPicker(page: Page) {
await openModelPicker(page);
await page.getByRole("dialog").getByRole("button", { name: "Back", exact: true }).click();
await drillIntoProvider(page, PROVIDER);
await expect(
page.getByTestId("combobox-desktop-container").getByText(LABEL, { exact: true }),
@@ -1,245 +0,0 @@
import { expect, test } from "../support/fixtures";
import { gotoAppShell, openSettings } from "../support/helpers/app";
import {
clearRecordedBrowserNotifications,
clickRecordedBrowserNotification,
expectDefaultNotificationSettings,
expectNotificationSubControlsDisabled,
expectNotificationSwitchState,
expectRecordedAgentNotifications,
expectRecordedPluginNotifications,
installBrowserNotificationRecorder,
openNotificationSettings,
readRecordedBrowserNotifications,
setNotificationSwitch,
setPluginNotificationSwitch,
} from "../support/helpers/notification-settings";
import { copyPluginExample } from "../support/helpers/plugin-fixture";
import { seedWorkspace, type SeedDaemonClient } from "../support/helpers/seed-client";
const FAST_FINISHED_PROMPT =
"emit settled assistant image markdown: ![done](https://example.com/done.png)";
const PERMISSION_PROMPT = "emit a synthetic plan approval";
const ERROR_PROMPT = "emit a synthetic turn failure";
async function runMockAgentTurn(
client: SeedDaemonClient,
input: {
cwd: string;
workspaceId: string;
title: string;
prompt: string;
waitForStatus: "idle" | "error" | "running";
},
): Promise<string> {
const agent = await client.createAgent({
provider: "mock",
cwd: input.cwd,
workspaceId: input.workspaceId,
title: input.title,
modeId: "load-test",
model: "e2e-fast-stream",
initialPrompt: input.prompt,
});
await client.waitForAgentUpsert(
agent.id,
(snapshot) => snapshot.status === input.waitForStatus,
15_000,
);
return agent.id;
}
test.describe("Settings → Notifications and OS notification filtering", () => {
test("displays defaults, persists switch changes across reload, disables sub-controls when paused, and filters OS notifications", async ({
page,
}) => {
await installBrowserNotificationRecorder(page);
const seeded = await seedWorkspace({ repoPrefix: "notification-settings-" });
const pluginExample = await copyPluginExample("notifications");
let installedPlugin = false;
try {
await gotoAppShell(page);
await openSettings(page);
await openNotificationSettings(page);
await test.step("renders Settings → Notifications with expected out-of-the-box defaults", async () => {
await expectDefaultNotificationSettings(page);
await expect(
page.getByText("Installed plugins appear here so you can mute them individually", {
exact: true,
}),
).toBeVisible();
});
await test.step("default preferences suppress finished turn notifications while delivering permission and error notifications", async () => {
await clearRecordedBrowserNotifications(page);
await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Default finished agent",
prompt: FAST_FINISHED_PROMPT,
waitForStatus: "idle",
});
const permissionAgentId = await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Default permission agent",
prompt: PERMISSION_PROMPT,
waitForStatus: "running",
});
const errorAgentId = await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Default error agent",
prompt: ERROR_PROMPT,
waitForStatus: "error",
});
await expectRecordedAgentNotifications(page, [
{ agentId: permissionAgentId, reason: "permission" },
{ agentId: errorAgentId, reason: "error" },
]);
});
await test.step("enabling Agent finished persists across page reload and allows finished notifications", async () => {
await setNotificationSwitch(page, "Agent finished", true);
await page.reload();
await expectNotificationSwitchState(page, "Agent finished", {
checked: true,
disabled: false,
});
await clearRecordedBrowserNotifications(page);
const finishedAgentId = await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Enabled finished agent",
prompt: FAST_FINISHED_PROMPT,
waitForStatus: "idle",
});
await expectRecordedAgentNotifications(page, [
{ agentId: finishedAgentId, reason: "finished" },
]);
});
await test.step("toggling Enable notifications off disables sub-controls, persists across reload, and suppresses all notifications", async () => {
await setNotificationSwitch(page, "Enable notifications", false);
await expect(
page.getByText("All notifications, including plugins, are paused on this device", {
exact: true,
}),
).toBeVisible();
await expectNotificationSubControlsDisabled(page, true);
await page.reload();
await expectNotificationSwitchState(page, "Enable notifications", {
checked: false,
disabled: false,
});
await expectNotificationSubControlsDisabled(page, true);
await clearRecordedBrowserNotifications(page);
await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Paused error agent",
prompt: ERROR_PROMPT,
waitForStatus: "error",
});
await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Paused finished agent",
prompt: FAST_FINISHED_PROMPT,
waitForStatus: "idle",
});
// Give any in-flight event delivery a chance to settle and verify none fired.
await page.waitForTimeout(300);
expect(await readRecordedBrowserNotifications(page)).toEqual([]);
});
await test.step("delivers plugin notifications, routes OS notification taps through client.onNotificationOpen, and suppresses notifications when the plugin is muted", async () => {
await setNotificationSwitch(page, "Enable notifications", true);
await seeded.client.patchDaemonConfig({ pluginsEnabled: true });
await seeded.client.installDirectoryPlugin(pluginExample.directory);
installedPlugin = true;
const pluginToggle = page.getByRole("switch", { name: "Build alerts", exact: true });
await expect(pluginToggle).toBeVisible();
await expect(pluginToggle).toHaveAttribute("aria-checked", "true");
await clearRecordedBrowserNotifications(page);
const sent = (await seeded.client.invokePluginRpc("notifications-example", "alerts.send", {
buildId: "204",
title: "Build #204 failed",
body: "Playwright suite failed on main",
})) as { status: string; notificationId: string };
expect(sent.status).toBe("sent");
await expectRecordedPluginNotifications(page, [
{
pluginId: "notifications-example",
title: "Build #204 failed",
body: "Playwright suite failed on main",
notificationId: sent.notificationId,
},
]);
await clickRecordedBrowserNotification(page, 0);
await expect(page.getByText("Build alert #204", { exact: true })).toBeVisible();
await expect(
page.getByText("Playwright suite failed on main", { exact: true }),
).toBeVisible();
await expect(
page.getByText(`Notification ID: ${sent.notificationId}`, { exact: true }),
).toBeVisible();
await openSettings(page);
await openNotificationSettings(page);
await setPluginNotificationSwitch(page, "Build alerts", false);
await clearRecordedBrowserNotifications(page);
const mutedResult = (await seeded.client.invokePluginRpc(
"notifications-example",
"alerts.send",
{
buildId: "205",
title: "Build #205 failed",
body: "Muted build alert",
},
)) as { status: string };
expect(mutedResult.status).toBe("sent");
// Trigger an unmuted agent error notification so we prove delivery settled and only
// the unmuted notification arrived (Build #205 was suppressed).
const sentinelErrorAgentId = await runMockAgentTurn(seeded.client, {
cwd: seeded.repoPath,
workspaceId: seeded.workspaceId,
title: "Sentinel unmuted error agent",
prompt: ERROR_PROMPT,
waitForStatus: "error",
});
await expectRecordedAgentNotifications(page, [
{ agentId: sentinelErrorAgentId, reason: "error" },
]);
});
} finally {
if (installedPlugin) {
await seeded.client.removePlugin("notifications-example").catch(() => undefined);
}
await pluginExample.cleanup().catch(() => undefined);
await seeded.cleanup();
}
});
});
@@ -13,17 +13,11 @@ import { pluginRequirements } from "../support/helpers/plugin-fixture";
import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import { pathToFileURL } from "node:url";
import type { Locator } from "@playwright/test";
import { expect, test, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
const PLUGIN_ID = "plugin-host-ui-e2e";
const TINY_PNG = Buffer.from(
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==",
"base64",
);
const PLUGIN_SOURCE = `import { usePaseo } from "@getpaseo/plugin/client";
import { Icon, Modal, useToast, Markdown } from "@getpaseo/plugin/client/ui";
@@ -45,7 +39,6 @@ function ModalBody({ onSaved }) {
<Text>Plugin modal contexts ready</Text>
<Markdown>{"## Plugin report"}</Markdown>
<Markdown>{"Checks **passed**. [Documentation](https://paseo.sh/docs/plugins)"}</Markdown>
<Markdown>{"![Modal preview](" + SCREENSHOT_PATH + ")"}</Markdown>
<Markdown>{""}</Markdown>
<Pressable accessibilityRole="button" onPress={save}>
<Text>Save issue</Text>
@@ -63,7 +56,6 @@ function Surface({ playAudio }) {
const [open, setOpen] = useState(false);
return <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>
<Pressable accessibilityRole="button" onPress={() => play("UklGRg==")}><Text>Play invalid audio</Text></Pressable>
<Pressable accessibilityRole="button" onPress={() => setOpen(true)}>
@@ -113,39 +105,20 @@ async function openPluginModal(page: Page): Promise<void> {
await page.getByRole("button", { name: "Open plugin modal", exact: true }).click();
}
async function expectLoadedMarkdownImage(scope: Page | Locator, alt: string): Promise<void> {
const image = scope.getByAltText(alt, { exact: true });
await expect(image).toBeVisible();
await expect
.poll(() =>
image.evaluate((node) => {
const img = node as HTMLImageElement;
return {
isBlob: img.src.startsWith("blob:"),
complete: img.complete,
naturalWidth: img.naturalWidth,
};
}),
)
.toEqual({ isBlob: true, complete: true, naturalWidth: 1 });
}
async function expectPluginMarkdown(scope: Page | Locator): Promise<void> {
await expect(scope.getByRole("heading", { name: "Plugin report" })).toBeVisible();
await expect(scope.getByText("Checks passed.", { exact: false })).toBeVisible();
await expect(scope.getByRole("link", { name: "Documentation", exact: true })).toHaveAttribute(
async function expectPluginMarkdown(page: Page): Promise<void> {
await expect(page.getByRole("heading", { name: "Plugin report" })).toBeVisible();
await expect(page.getByText("Checks passed.", { exact: false })).toBeVisible();
await expect(page.getByRole("link", { name: "Documentation", exact: true })).toHaveAttribute(
"href",
"https://paseo.sh/docs/plugins",
);
await expectLoadedMarkdownImage(scope, "Modal preview");
await expect(scope.getByText("Image unavailable")).toHaveCount(0);
}
async function expectCenteredPluginDialog(page: Page): Promise<void> {
const dialog = page.getByRole("dialog");
await expect(dialog.getByText("Edit plugin issue", { exact: true })).toBeVisible();
await expect(dialog.getByText("Plugin modal contexts ready", { exact: true })).toBeVisible();
await expectPluginMarkdown(dialog);
await expectPluginMarkdown(page);
}
async function closeCenteredPluginDialog(page: Page): Promise<void> {
@@ -174,15 +147,10 @@ test("plugin modal adapts its presentation and preserves host contexts", async (
path.join(directory, "paseo-plugin.json"),
JSON.stringify({ id: PLUGIN_ID, requirements: pluginRequirements }),
);
const beforePath = path.join(directory, "before.png");
const afterPath = path.join(directory, "after.png");
const afterFileUrl = pathToFileURL(afterPath).href;
await writeFile(beforePath, TINY_PNG);
await writeFile(afterPath, TINY_PNG);
const audio = await readFile(path.resolve(__dirname, "../../assets/audio/thinking-tone.wav"));
await writeFile(
path.join(directory, "index.client.tsx"),
`const AUDIO_BASE64 = ${JSON.stringify(audio.toString("base64"))};\nconst SCREENSHOT_PATH = ${JSON.stringify(beforePath)};\nconst SCREENSHOT_FILE_URL = ${JSON.stringify(afterFileUrl)};\n${PLUGIN_SOURCE}`,
`const AUDIO_BASE64 = ${JSON.stringify(audio.toString("base64"))};\n${PLUGIN_SOURCE}`,
);
try {
@@ -191,12 +159,6 @@ test("plugin modal adapts its presentation and preserves host contexts", async (
await useNonCompactLayout(page);
await openHostUiPlugin(page);
await test.step("plugin screen Markdown renders local absolute and file:// PNG images inline", async () => {
await expectLoadedMarkdownImage(page, "Before");
await expectLoadedMarkdownImage(page, "After");
await expect(page.getByText("Image unavailable")).toHaveCount(0);
});
await test.step("plugin audio finishes, rejects corrupt files, and recovers", async () => {
await playPluginAudio(page, "Play plugin audio", "Audio finished");
await playPluginAudio(page, "Play invalid audio", "Audio rejected");
@@ -1,324 +0,0 @@
import { writeFile } from "node:fs/promises";
import path from "node:path";
import type { Locator } from "@playwright/test";
import { expect, test, type Page } from "../support/fixtures";
import { openCommandCenter } from "../support/helpers/command-center";
import { runWorkspaceActionFromCommandCenter } from "../support/helpers/command-center-workspace-actions";
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 { copyPluginExample } from "../support/helpers/plugin-fixture";
import { runCommand } from "../support/helpers/plugin-sidebar-items";
import {
closeSheet,
expectNoSheetOpen,
expectOneSheetOpen,
promptMentioning,
sheet,
} from "../support/helpers/sheet";
import {
closeMobileExplorer,
expectMobileExplorerHidden,
expectMobileExplorerVisible,
openMobileAgentSidebar,
selectWorkspaceInSidebar,
} from "../support/helpers/sidebar";
import { getServerId } from "../support/helpers/server-id";
const WIDE = { width: 1600, height: 900 };
const COMPACT = { width: 390, height: 844 };
const AGENT_TITLE = "Layout agent";
const FILE_LINK = "README.md:1";
const NO_FILE = "Focus a file to see its outline";
const REPO_FILES = [
{ path: "README.md", content: "# Guide\n\n## Install\n" },
{ path: "notes.md", content: "# Notes\n\n## Open questions\n" },
{ path: "src/app.ts", content: "// TODO: handle errors\nexport const ready = true;\n" },
];
const REVIEW_TAB = "workspace-tab-plugin_agent_16_workspace-layout_6_review_";
const FINDINGS_TAB = "workspace-tab-plugin_workspace_16_workspace-layout_8_findings";
const OUTLINE_TAB = "workspace-tab-plugin_workspace_16_workspace-layout_7_outline";
async function withLayoutExample(
initialPrompt: string | undefined,
run: (agent: { agentId: string; workspaceId: string }) => Promise<void>,
): Promise<void> {
const example = await copyPluginExample("workspace-layout");
const workspace = await seedMockAgentWorkspace({
repoPrefix: "plugin-workspace-layout-",
title: AGENT_TITLE,
repo: { files: REPO_FILES },
initialPrompt,
});
try {
await withPluginInstalled(example.directory, () => run(workspace));
} finally {
await workspace.cleanup();
await example.cleanup();
}
}
async function withPluginInstalled(directory: string, run: () => Promise<void>): Promise<void> {
const client = await connectNewWorkspaceDaemonClient({ ownProjects: false });
const previous = await client.getDaemonConfig();
try {
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(directory);
await run();
} finally {
await client.removePlugin("workspace-layout").catch(() => undefined);
await client.patchDaemonConfig({ pluginsEnabled: previous.config.pluginsEnabled ?? false });
await client.close();
}
}
/** `/open-elsewhere <id>` opens a file in that workspace, then one where the command ran. */
const OPEN_ELSEWHERE_ENTRY = `import type { PluginClientContext } from "@getpaseo/plugin/client";
export default function contribute(client: PluginClientContext) {
client.addSlashCommand({
name: "open-elsewhere",
description: "Open a file there, then one here",
argumentHint: "<workspaceId>",
context: "agent",
onSubmit({ args, workspaceLayout }) {
const there = client.workspaceLayout(args.trim());
there.open({ panelId: "paseo/file", params: { path: "README.md" } });
workspaceLayout.open({ panelId: "paseo/file", params: { path: "notes.md" } });
},
});
return () => {};
}
`;
async function withTwoWorkspaces(
run: (workspaces: {
first: { agentId: string; workspaceId: string };
second: { agentId: string; workspaceId: string };
}) => Promise<void>,
): Promise<void> {
const example = await copyPluginExample("workspace-layout");
await writeFile(path.join(example.directory, "index.client.tsx"), OPEN_ELSEWHERE_ENTRY);
const seed = (title: string) =>
seedMockAgentWorkspace({
repoPrefix: "plugin-workspace-layout-",
title,
repo: { files: REPO_FILES },
});
const first = await seed("First agent");
const second = await seed("Second agent");
try {
await withPluginInstalled(example.directory, () => run({ first, second }));
} finally {
await second.cleanup();
await first.cleanup();
await example.cleanup();
}
}
/** Picks a workspace in a phone's agent list. */
async function switchToWorkspace(page: Page, workspaceId: string): Promise<void> {
await openMobileAgentSidebar(page);
await selectWorkspaceInSidebar(page, workspaceId);
await expect(
page.getByTestId(`workspace-deck-entry-${getServerId()}:${workspaceId}`),
).toBeVisible();
await expect(composerIn(page.locator("body"))).toBeEditable({ timeout: 30_000 });
}
function mainPanes(page: Page): Locator {
return page.locator('[data-testid^="workspace-pane-"]').filter({ visible: true });
}
function explorer(page: Page): Locator {
return page.getByTestId("workspace-explorer-sidebar");
}
function agentTabs(scope: Locator): Locator {
return scope.locator('[data-testid^="workspace-tab-agent_"]');
}
function composerIn(scope: Locator): Locator {
return scope.getByRole("textbox", { name: "Message agent..." }).filter({ visible: true });
}
async function sendToMainChat(page: Page, text: string): Promise<void> {
const composer = composerIn(mainPanes(page).first());
await expect(composer).toBeEditable({ timeout: 30_000 });
await composer.fill(text);
await composer.press("Enter");
}
async function expectAsideChat(page: Page, input: { message: string; tabs: number }) {
const chats = agentTabs(explorer(page));
await expect(chats).toHaveCount(input.tabs, { timeout: 30_000 });
await expect(chats.last()).toHaveAttribute("aria-selected", "true");
await expect(
explorer(page).getByTestId("user-message").getByText(input.message, { exact: true }),
).toBeVisible();
await expect(composerIn(explorer(page))).toBeEditable();
}
/** Every visible tab chip, pane by pane, to compare the arrangement before and after. */
async function tabsByPane(page: Page): Promise<string[][]> {
const scopes = [...(await mainPanes(page).all()), explorer(page)];
return Promise.all(
scopes.map((scope) =>
scope
.getByTestId("workspace-tabs-row")
.locator('[data-testid^="workspace-tab-"]:not([data-testid^="workspace-tab-tooltip"])')
.evaluateAll((chips) => chips.map((chip) => chip.getAttribute("data-testid") ?? "")),
),
);
}
async function expectReviewLayout(page: Page, agentId: string): Promise<void> {
await expect(mainPanes(page)).toHaveCount(2);
const left = mainPanes(page).first();
const right = mainPanes(page).last();
await expect(left.getByTestId(`workspace-tab-agent_${agentId}`)).toBeVisible();
const review = right.getByTestId(`${REVIEW_TAB}${agentId.length}_${agentId}`);
await expect(review).toHaveAttribute("aria-selected", "true");
await expect(right.getByText(`Reviewing ${AGENT_TITLE}`, { exact: true })).toBeVisible();
await expect(right.getByTestId("workspace-tab-working_diff")).toHaveAttribute(
"aria-selected",
"false",
);
await expect(explorer(page).getByTestId(FINDINGS_TAB)).toBeVisible();
const [leftBox, rightBox] = [await left.boundingBox(), await right.boundingBox()];
if (!leftBox || !rightBox) throw new Error("Review layout panes have no bounds");
expect(rightBox.x).toBeGreaterThan(leftBox.x);
expect(rightBox.width / (leftBox.width + rightBox.width)).toBeCloseTo(0.4, 1);
}
async function openFileInFocusedPane(page: Page, name: string): Promise<void> {
await openFileExplorer(page);
await openFileFromExplorer(page, name);
await expect(mainPanes(page).getByTestId(`workspace-tab-file_${name}`)).toBeVisible();
}
async function expectOutline(page: Page, lines: string[]): Promise<void> {
const outline = page.getByTestId("workspace-layout-outline");
for (const line of lines) {
await expect(outline.getByText(line, { exact: true })).toHaveCount(1);
}
}
test("the workspace layout example arranges a wide workspace", async ({ page }) => {
test.setTimeout(180_000);
await withLayoutExample(undefined, async ({ agentId, workspaceId }) => {
await page.setViewportSize(WIDE);
await openAgentRoute(page, { workspaceId, agentId });
await test.step("/aside opens the child agent's chat in the Explorer", async () => {
await sendToMainChat(page, "/aside hey");
await expectAsideChat(page, { message: "hey", tabs: 1 });
await expect(agentTabs(mainPanes(page))).toHaveCount(1);
});
await test.step("a second /aside adds a second tab", async () => {
await sendToMainChat(page, "/aside again");
await expectAsideChat(page, { message: "again", tabs: 2 });
await expect(agentTabs(mainPanes(page))).toHaveCount(1);
});
await test.step("Review layout splits the workspace, and running it again changes nothing", async () => {
await runCommand(page, "Review layout");
await expectReviewLayout(page, agentId);
const arranged = await tabsByPane(page);
await mainPanes(page).first().getByTestId(`workspace-tab-agent_${agentId}`).click();
await runCommand(page, "Review layout");
await expectReviewLayout(page, agentId);
expect(await tabsByPane(page)).toEqual(arranged);
});
await test.step("the outline follows the focused file across split panes", async () => {
await mainPanes(page).first().getByTestId(`workspace-tab-agent_${agentId}`).click();
await runCommand(page, "Show outline");
await expectOutline(page, [NO_FILE]);
await openFileInFocusedPane(page, "README.md");
await explorer(page).getByTestId(OUTLINE_TAB).click();
await expectOutline(page, ["README.md", "Guide", "Install"]);
await runWorkspaceActionFromCommandCenter(page, "Split pane right");
await expect(mainPanes(page)).toHaveCount(3);
await openFileInFocusedPane(page, "notes.md");
await explorer(page).getByTestId(OUTLINE_TAB).click();
await expectOutline(page, ["notes.md", "Notes", "Open questions"]);
await mainPanes(page).getByTestId("workspace-tab-file_README.md").click();
await expectOutline(page, ["README.md", "Guide", "Install"]);
});
});
});
test("the workspace layout example opens over a phone's chat", async ({ page }) => {
test.setTimeout(180_000);
await withLayoutExample(promptMentioning(FILE_LINK), async ({ agentId, workspaceId }) => {
await page.setViewportSize(COMPACT);
await openAgentRoute(page, { workspaceId, agentId });
await test.step("/aside opens the Explorer over the chat", async () => {
await submitMessageWithButton(page, "/aside hey");
await expectMobileExplorerVisible(page);
await expectAsideChat(page, { message: "hey", tabs: 1 });
await closeMobileExplorer(page);
await expectMobileExplorerHidden(page);
await expect(
page.getByRole("button", { name: "Switch tabs (1 open)" }).filter({ visible: true }),
).toBeVisible();
});
await test.step("a file sheet updates the outline, and closing it restores it", async () => {
await openMobileAgentSidebar(page);
const commandCenter = await openCommandCenter(page);
await commandCenter.getByTestId("command-center-input").fill("Show outline");
await commandCenter.getByRole("button", { name: "Show outline", exact: true }).click();
await expectMobileExplorerVisible(page);
await expectOutline(page, [NO_FILE]);
await closeMobileExplorer(page);
await expectMobileExplorerHidden(page);
await page.getByText(FILE_LINK, { exact: true }).first().click();
await expect(sheet(page, "README.md")).toBeVisible();
// The sheet covers the Explorer, so the outline can only be read, not seen.
await expectOutline(page, ["README.md", "Guide", "Install"]);
await closeSheet(page, "README.md");
await expectOutline(page, [NO_FILE]);
});
});
});
test("a file a plugin opens in another workspace waits there on a phone", async ({ page }) => {
test.setTimeout(180_000);
await withTwoWorkspaces(async ({ first, second }) => {
await page.setViewportSize(COMPACT);
// Visiting the first workspace leaves its screen mounted behind the second.
await openAgentRoute(page, first);
await expect(composerIn(page.locator("body"))).toBeEditable({ timeout: 30_000 });
await switchToWorkspace(page, second.workspaceId);
await test.step("only the sheet of the workspace on screen is shown", async () => {
await submitMessageWithButton(page, `/open-elsewhere ${first.workspaceId}`);
await expect(sheet(page, "notes.md")).toBeVisible();
await expectOneSheetOpen(page);
await closeSheet(page, "notes.md");
await expectNoSheetOpen(page);
});
await test.step("the other sheet is there when the user goes to its workspace", async () => {
await switchToWorkspace(page, first.workspaceId);
await expect(sheet(page, "README.md")).toBeVisible();
await expectOneSheetOpen(page);
await closeSheet(page, "README.md");
await expectNoSheetOpen(page);
});
});
});
@@ -26,14 +26,16 @@ async function openProviderSettingsFromModelSelector(page: Page) {
const configuration = page.getByTestId("agent-controls-model-sheet");
await expect(configuration).toBeVisible({ timeout: 10_000 });
await page.getByTestId("agent-controls-model").click();
await expect(page.getByTestId("mobile-model-page")).toBeVisible({ timeout: 10_000 });
const modelBrowser = page.getByTestId("agent-controls-model-browser-sheet");
await expect(modelBrowser).toBeVisible({ timeout: 10_000 });
await page.getByRole("button", { name: /Open .* settings/ }).click();
await expect(page.getByTestId("provider-settings-sheet")).toBeVisible({ timeout: 10_000 });
}
async function expectModelPageVisible(page: Page) {
await expect(page.getByTestId("mobile-model-page")).toBeVisible({
async function expectModelBrowserVisible(page: Page) {
await expect(page.getByTestId("agent-controls-model-browser-sheet")).toBeVisible({
timeout: 10_000,
});
await expect(page.getByRole("button", { name: /Open .* settings/ })).toBeVisible();
@@ -185,7 +187,7 @@ test.describe("provider settings overlay stack", () => {
}
});
test("provider settings and children close back to the Model page, then Back reaches Home", async ({
test("provider settings and children close back through the model browser to configuration", async ({
page,
}) => {
test.setTimeout(180_000);
@@ -197,15 +199,17 @@ test.describe("provider settings overlay stack", () => {
await exerciseProviderSettingsStack(page);
await closeSheetByHeaderButton(page, "provider-settings-sheet");
await expectModelPageVisible(page);
await expectModelBrowserVisible(page);
await page.getByRole("button", { name: /Open .* settings/ }).click();
await expect(page.getByTestId("provider-settings-sheet")).toBeVisible({ timeout: 10_000 });
await exerciseProviderSettingsStack(page);
await closeSheetByHeaderButton(page, "provider-settings-sheet");
await expectModelPageVisible(page);
await page.getByTestId("sheet-header-back").click();
await expect(page.getByTestId("mobile-model-page")).toHaveCount(0);
await expectModelBrowserVisible(page);
await closeTopSheet(page);
await expect(page.getByTestId("agent-controls-model-browser-sheet")).not.toBeVisible({
timeout: 10_000,
});
await expect(page.getByTestId("agent-controls-settings-list")).toBeVisible();
await closeTopSheet(page);
} finally {
@@ -222,6 +226,8 @@ async function openTimedOutProvider(page: Page, workspaceId: string, width: numb
await page.getByRole("button", { name: /Select model/ }).click();
if (width < 600) {
await page.getByTestId("agent-controls-model").click();
} else {
await page.getByRole("button", { name: "Back", exact: true }).click();
}
await page.getByTestId("model-provider-picker-timeout").click();
await expect(page.getByText(/Timed out refreshing Pi timeout/)).toBeVisible();
@@ -1,51 +0,0 @@
import { test, expect } from "../support/fixtures";
import { TerminalE2EHarness, withTerminalInApp } from "../support/helpers/terminal-dsl";
import { waitForTerminalContent } from "../support/helpers/terminal-perf";
const CODE_FONT = "monospace";
const INTERFACE_FONT = "serif";
test("terminal text keeps the code font when an interface font is set", async ({ page }) => {
// Without WebGL2 the terminal falls back to xterm's DOM renderer, whose rows are
// styled by CSS and so can inherit the interface font.
await page.addInitScript(() => {
const getContext = HTMLCanvasElement.prototype.getContext;
HTMLCanvasElement.prototype.getContext = function (
this: HTMLCanvasElement,
type: string,
...rest: unknown[]
) {
if (type === "webgl2") return null;
return (getContext as (...args: unknown[]) => unknown).call(this, type, ...rest);
} as typeof getContext;
});
await page.addInitScript(
(fonts) => {
const saved = JSON.parse(localStorage.getItem("@paseo:app-settings") ?? "{}");
localStorage.setItem("@paseo:app-settings", JSON.stringify({ ...saved, ...fonts }));
},
{ monoFontFamily: CODE_FONT, uiFontFamily: INTERFACE_FONT },
);
const harness = await TerminalE2EHarness.create({ tempPrefix: "terminal-font-family-" });
try {
await withTerminalInApp(page, harness, { name: "font-family" }, async () => {
await harness.setupPrompt(page);
await harness
.terminalSurface(page)
.pressSequentially("clear; printf 'iiiiiiiiii\\nWWWWWWWWWW\\n'\n", { delay: 0 });
await waitForTerminalContent(page, (text) => text.includes("WWWWWWWWWW"), 10_000);
await harness
.terminalSurface(page)
.screenshot({ path: test.info().outputPath("terminal-font-family.png") });
const rowFont = await page
.locator(".xterm-rows")
.evaluate((rows) => getComputedStyle(rows).fontFamily);
expect(rowFont).toBe(CODE_FONT);
});
} finally {
await harness.cleanup();
}
});
@@ -4,9 +4,7 @@ import path from "node:path";
import type { Page } from "@playwright/test";
import { test, expect } from "../support/fixtures";
import { holdFileUploadResponse } from "../support/helpers/file-upload-gate";
import { clickNewTerminal, gotoWorkspace } from "../support/helpers/launcher";
import { installLocalDesktopHost } from "../support/helpers/local-desktop-host";
import { clickSettingsBackToWorkspace, openSettingsSection } from "../support/helpers/settings";
import { TerminalE2EHarness } from "../support/helpers/terminal-dsl";
import { getTerminalBufferText, waitForTerminalContent } from "../support/helpers/terminal-perf";
@@ -25,134 +23,13 @@ if (process.stdin.isTTY) {
process.stdin.resume();
process.stdin.on("data", (chunk) => {
captured = Buffer.concat([captured, chunk]);
if (captured.includes(Buffer.from("rgb:"))) {
finish();
}
});
setTimeout(finish, 700);
`;
const TERMINAL_PALETTE_PROBE_SCRIPT = `
process.stdin.setRawMode(true);
process.stdin.resume();
const mode = process.argv[2];
let buf = "";
const timer = setTimeout(() => {
process.stdout.write("PROBE_TIMEOUT:" + mode + ":" + buf.replace(/\\x1b/g, "ESC") + "\\n");
process.exit(2);
}, 5000);
if (mode === "osc") {
const code = process.argv[3];
process.stdin.on("data", (chunk) => {
buf += chunk.toString("binary");
const match = buf.match(new RegExp("\\\\x1b\\\\]" + code + ";rgb:[0-9a-f/]+\\\\x1b\\\\\\\\"));
if (!match) return;
clearTimeout(timer);
process.stdout.write("OSC_COLOR_OK:" + code + ":" + match[0].replace(/\\x1b/g, "ESC") + "\\n");
process.exit(0);
});
process.stdout.write("\\x1b]" + code + ";?\\x07");
} else if (mode === "dsr996") {
process.stdin.on("data", (chunk) => {
buf += chunk.toString("binary");
const match = buf.match(/\\x1b\\[\\?997;([12])n/);
if (!match) return;
clearTimeout(timer);
process.stdout.write("DSR996_OK:" + match[1] + "\\n");
process.exit(0);
});
process.stdout.write("\\x1b[?996n");
} else if (mode === "watch2031") {
clearTimeout(timer);
process.stdin.on("data", (chunk) => {
buf += chunk.toString("binary");
if (buf.includes("Q")) {
process.stdout.write("\\x1b[?2031lWATCH2031_DONE\\n");
process.exit(0);
}
let match;
while ((match = buf.match(/\\x1b\\[\\?997;([12])n/))) {
process.stdout.write("WATCH2031_EVENT:" + match[1] + "\\n");
buf = buf.slice(match.index + match[0].length);
}
});
process.stdout.write("\\x1b[?2031hWATCH2031_READY\\n");
}
`;
const TERMINAL_PALETTE_SCENARIOS = {
light: {
label: "Light",
colorFgBg: "0;15",
schemeCode: "2",
colors: {
10: "rgb:1a1a/1a1a/1e1e",
11: "rgb:ffff/ffff/ffff",
12: "rgb:1a1a/1a1a/1e1e",
},
},
dark: {
label: "Dark",
colorFgBg: "15;0",
schemeCode: "1",
colors: {
10: "rgb:fafa/fafa/fafa",
11: "rgb:1818/1b1b/1a1a",
12: "rgb:fafa/fafa/fafa",
},
},
} as const;
type TerminalPaletteScenario =
(typeof TERMINAL_PALETTE_SCENARIOS)[keyof typeof TERMINAL_PALETTE_SCENARIOS];
async function selectAppThemeInApp(
page: Page,
label: TerminalPaletteScenario["label"],
): Promise<void> {
await page.getByRole("button", { name: "Settings", exact: true }).click();
await expect(page.getByTestId("settings-sidebar")).toBeVisible();
await openSettingsSection(page, "appearance");
const themeRadio = page.getByRole("radio", { name: label, exact: true });
await themeRadio.click();
await expect(themeRadio).toBeChecked();
await clickSettingsBackToWorkspace(page);
}
function collectBrowserOsc11Replies(page: Page): string[] {
const replies: string[] = [];
page.on("websocket", (ws) => {
ws.on("framesent", ({ payload }) => {
const text = typeof payload === "string" ? payload : payload.toString("latin1");
if (text.includes("]11;rgb:")) {
replies.push(text);
}
});
});
return replies;
}
async function waitForCreatedTerminal(
harness: TerminalE2EHarness,
knownTerminalIds: Set<string>,
): Promise<string> {
let createdTerminalId: string | undefined;
await expect
.poll(
async () => {
const result = await harness.client.listTerminals(harness.tempRepo.path, undefined, {
workspaceId: harness.workspaceId,
});
createdTerminalId = result.terminals.find(
(terminal) => !knownTerminalIds.has(terminal.id),
)?.id;
return createdTerminalId;
},
{ timeout: 10_000 },
)
.toBeTruthy();
return createdTerminalId!;
}
// A TUI stand-in: turns on bracketed paste, reads every quoted path in each
// bracketed paste, and echoes typed lines, so the PTY output proves what reached
// the terminal and where the file was read from.
@@ -281,10 +158,6 @@ test.describe("Terminal protocol queries", () => {
test.beforeAll(async () => {
harness = await TerminalE2EHarness.create({ tempPrefix: "terminal-protocol-query-" });
await writeFile(path.join(harness.tempRepo.path, "osc11-capture.cjs"), OSC11_CAPTURE_SCRIPT);
await writeFile(
path.join(harness.tempRepo.path, "palette-probe.cjs"),
TERMINAL_PALETTE_PROBE_SCRIPT,
);
await writeFile(path.join(harness.tempRepo.path, "file-receiver.cjs"), FILE_RECEIVER_SCRIPT);
});
@@ -293,8 +166,6 @@ test.describe("Terminal protocol queries", () => {
});
test("does not send browser OSC 11 color-query replies back to the PTY", async ({ page }) => {
const browserOscReplies = collectBrowserOsc11Replies(page);
const terminalInstance = await harness.createTerminal({ name: "osc11-query" });
try {
await harness.openTerminal(page, { terminalId: terminalInstance.id });
@@ -307,110 +178,14 @@ test.describe("Terminal protocol queries", () => {
await page.waitForTimeout(500);
const text = await getTerminalBufferText(page);
const captureLine =
text.split("\n").find((line) => line.includes("PASEO_OSC11_CAPTURE:")) ?? "";
const capturedMatches = captureLine.match(/\]11;rgb:[0-9a-f/]+/g) ?? [];
expect(capturedMatches).toHaveLength(1);
expect(browserOscReplies).toEqual([]);
const afterCapture = text.slice(text.indexOf("PASEO_OSC11_CAPTURE:") + captureLine.length);
expect(afterCapture).not.toContain("rgb:");
expect(text).toContain("rgb:0b0b/0b0b/0b0b");
expect(text).not.toContain("rgb:ffff/ffff/ffff");
} finally {
await harness.killTerminal(terminalInstance.id);
}
});
test("reports Light and Dark palettes through OSC 10/11/12, COLORFGBG, DSR 996/997, and live DEC 2031 toggles", async ({
page,
}) => {
const createAppTerminal = async (): Promise<string> => {
const existing = await harness.client.listTerminals(harness.tempRepo.path, undefined, {
workspaceId: harness.workspaceId,
});
const knownIds = new Set(existing.terminals.map((entry) => entry.id));
await clickNewTerminal(page);
const terminalId = await waitForCreatedTerminal(harness, knownIds);
const surface = terminalSurface(page);
await expect(surface).toBeVisible({ timeout: 20_000 });
await surface.click();
const readyTag = `READY_${Date.now()}`;
await surface.pressSequentially(`echo ${readyTag}\n`, { delay: 0 });
await expectTerminalOutput(terminalId, readyTag);
return terminalId;
};
const runPaletteChecks = async (
terminalId: string,
scenario: TerminalPaletteScenario,
options: { checkColorFgBg: boolean },
): Promise<void> => {
const surface = terminalSurface(page);
await surface.click();
if (options.checkColorFgBg) {
await surface.pressSequentially('echo "CFGBG=$COLORFGBG"\n', { delay: 0 });
await expectTerminalOutput(terminalId, `CFGBG=${scenario.colorFgBg}`);
}
for (const code of [10, 11, 12] as const) {
await surface.pressSequentially(`${process.execPath} palette-probe.cjs osc ${code}\n`, {
delay: 0,
});
await expectTerminalOutput(
terminalId,
`OSC_COLOR_OK:${code}:ESC]${code};${scenario.colors[code]}ESC\\`,
);
}
await surface.pressSequentially(`${process.execPath} palette-probe.cjs dsr996\n`, {
delay: 0,
});
await expectTerminalOutput(terminalId, `DSR996_OK:${scenario.schemeCode}`);
};
// 1. Open workspace once, switch to Light in-app, and create a fresh Light terminal.
await gotoWorkspace(page, harness.workspaceId);
await selectAppThemeInApp(page, "Light");
const lightTerminalId = await createAppTerminal();
let darkTerminalId: string | null = null;
try {
await runPaletteChecks(lightTerminalId, TERMINAL_PALETTE_SCENARIOS.light, {
checkColorFgBg: true,
});
// 2. Start DEC 2031 watcher in that running Light terminal, then toggle Light -> Dark -> Light.
await terminalSurface(page).pressSequentially(
`${process.execPath} palette-probe.cjs watch2031\n`,
{ delay: 0 },
);
await expectTerminalOutput(lightTerminalId, "WATCH2031_READY");
await selectAppThemeInApp(page, "Dark");
await expectTerminalOutput(lightTerminalId, "WATCH2031_EVENT:1");
await selectAppThemeInApp(page, "Light");
await expectTerminalOutput(lightTerminalId, "WATCH2031_EVENT:2");
// Stop watcher, toggle to Dark, and verify live OSC 10/11/12 + DSR 996 update on the same PTY.
await terminalSurface(page).click();
await terminalSurface(page).pressSequentially("Q", { delay: 0 });
await expectTerminalOutput(lightTerminalId, "WATCH2031_DONE");
await selectAppThemeInApp(page, "Dark");
await runPaletteChecks(lightTerminalId, TERMINAL_PALETTE_SCENARIOS.dark, {
checkColorFgBg: false,
});
// 3. Fresh Dark terminal reports Dark OSC 10/11/12, COLORFGBG=15;0, and DSR 996 -> dark (1).
darkTerminalId = await createAppTerminal();
await runPaletteChecks(darkTerminalId, TERMINAL_PALETTE_SCENARIOS.dark, {
checkColorFgBg: true,
});
} finally {
await harness.killTerminal(lightTerminalId);
if (darkTerminalId) {
await harness.killTerminal(darkTerminalId);
}
}
});
async function openFileReceiver(page: Page, name: string) {
const terminal = await harness.createTerminal({
name,
@@ -13,12 +13,8 @@ import { test, expect } from "../support/fixtures";
import { expectComposerVisible } from "../support/helpers/composer";
import { withDirectoryPlugin } from "../support/helpers/plugin-timeline";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import { getE2EDaemonPort } from "../support/helpers/daemon-port";
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
test.use({
e2eInjectPaseoTools: true,
e2eDaemonConfig: {
version: 1,
agents: {
@@ -294,89 +290,6 @@ test("received messages show their sender and open that agent", async ({ page })
}
});
/** Calls a Paseo MCP tool as `callerAgentId`, the way that agent's provider would. */
async function callPaseoToolAs(
callerAgentId: string,
name: string,
args: Record<string, unknown>,
): Promise<Record<string, unknown>> {
const mcp = new Client({ name: "turn-collapse-e2e", version: "1" });
await mcp.connect(
new StreamableHTTPClientTransport(
new URL(`http://127.0.0.1:${getE2EDaemonPort()}/mcp/agents?callerAgentId=${callerAgentId}`),
),
);
try {
const response = await mcp.callTool({ name, arguments: args });
expect(response, name).not.toMatchObject({ isError: true });
return response.structuredContent as Record<string, unknown>;
} finally {
await mcp.close();
}
}
test("a delegated child reports each turn end as a compact tool call until its own delegate is done", async ({
page,
}, testInfo) => {
const frames: string[] = [];
page.on("websocket", (socket) => {
socket.on("framereceived", ({ payload }) => {
if (typeof payload === "string") frames.push(payload);
});
});
const childNoticeFrames = () => frames.filter((frame) => frame.includes('"label":"Child"'));
const parent = await seedMockAgentWorkspace({ repoPrefix: "child-notices-", title: "Lead" });
try {
await openAgentRoute(page, parent);
await expectComposerVisible(page);
const child = await callPaseoToolAs(parent.agentId, "create_agent", {
workspaceId: parent.workspaceId,
title: "Child",
provider: "mock/e2e-fast-stream",
settings: { modeId: "load-test" },
initialPrompt: "Delegate the slow part",
});
const childId = String(child.agentId);
// The child's own delegate outlives the child's first turn.
const grandchild = await callPaseoToolAs(childId, "create_agent", {
workspaceId: parent.workspaceId,
title: "Grandchild",
provider: "mock/ten-second-stream",
settings: { modeId: "load-test" },
initialPrompt: "Take your time",
});
const notices = page.getByRole("button", { name: /^Agent .*Child/ });
const finished = page.getByRole("button", { name: /^Agent finished.*Child/ });
// The child ended its turn while waiting on its delegate: the parent hears it now.
await expect(finished).toHaveCount(1, { timeout: 30_000 });
const delegate = await parent.client.waitForAgentUpsert(String(grandchild.agentId), () => true);
expect(delegate.status, "the delegate must still be running").toBe("running");
expect(
childNoticeFrames().some((frame) => frame.includes("It still has agents it is waiting on.")),
).toBe(true);
// The delegate reports to the child, and the child's settled turn reaches the parent.
await expect(finished).toHaveCount(2, { timeout: 60_000 });
await expect(notices).toHaveCount(2);
await expect(page.getByText(/still working/i)).toHaveCount(0);
await expect(page.getByText(/Sent by/)).toHaveCount(0);
await expect(page.getByText(/<agent-response>/)).toHaveCount(0);
await finished.last().scrollIntoViewIfNeeded();
await page.screenshot({ path: testInfo.outputPath("child-notices.png") });
// Notification events stay on the daemon: clients get only plain tool calls.
expect(frames.filter((frame) => frame.includes('"agentMessage"'))).toEqual([]);
expect(childNoticeFrames().some((frame) => frame.includes('"name":"agent_finished"'))).toBe(
true,
);
expect(childNoticeFrames().filter((frame) => /"name":"agent_(?!finished)/.test(frame))).toEqual(
[],
);
} finally {
await parent.cleanup();
}
});
test("long sender attribution stays on one line in compact chat", async ({ page }, testInfo) => {
await page.setViewportSize({ width: 390, height: 844 });
await page.addInitScript(() =>
@@ -668,186 +668,3 @@ test("sidebar usage falls back to period shorthands before dropping all labels",
await dragSidebarTo(300);
await expectPinnedUsage(page, ["6%", "20%", "100%", "14%", "22%", "97%"]);
});
test("pushed status.usage_report_changed updates sidebar summary and open Usage modal without polling", async ({
page,
}) => {
const [claude] = claudeAndCodexReports();
const initialFetchedAt = new Date(Date.now() - 60_000).toISOString();
const usage = await installUsageReportsFixture(page, {
lists: [
() => [
{
...claude!,
fetchedAt: initialFetchedAt,
successfulAt: initialFetchedAt,
report: {
status: "available",
windows: [
{ id: "five_hour", label: "Session", shortLabel: "5h", summary: true, usedPct: 31 },
{ id: "weekly", label: "Weekly", shortLabel: "wk", summary: true, usedPct: 54 },
],
},
},
],
],
});
await page.setViewportSize(WIDE);
await seedSidebarFooterPreferences(page, [{ key: "usage", visible: true }]);
await gotoAppShell(page);
await expectPinnedUsage(page, ["31% 5h", "54% wk"]);
await usage.waitForUsageReportSubscription();
await openUsageFromItem(page);
const modal = usageModal(page);
await expect(modal.getByText("31% used")).toBeVisible();
const requestsBeforePush = usage.listRequests();
const updatedAt = new Date().toISOString();
usage.pushReportUpdate({
...claude!,
fetchedAt: updatedAt,
successfulAt: updatedAt,
report: {
status: "available",
windows: [
{ id: "five_hour", label: "Session", shortLabel: "5h", summary: true, usedPct: 64 },
{ id: "weekly", label: "Weekly", shortLabel: "wk", summary: true, usedPct: 54 },
],
},
});
await expectPinnedUsage(page, ["64% 5h", "54% wk"]);
await expect(modal.getByText("64% used")).toBeVisible();
expect(usage.listRequests()).toEqual(requestsBeforePush);
});
test("a pushed report for one source does not postpone the five-minute poll of other sources", async ({
page,
}) => {
const [claude, codex] = claudeAndCodexReports();
let codexUsedPct = 7;
let listFetchedAt = "2026-11-28T10:00:00.000Z";
const usage = await installUsageReportsFixture(page, {
lists: [
() => [
{
...claude!,
fetchedAt: listFetchedAt,
report: {
status: "available",
windows: [
{ id: "five_hour", label: "Session", shortLabel: "5h", summary: true, usedPct: 31 },
],
},
},
{
...codex!,
fetchedAt: listFetchedAt,
report: {
status: "available",
windows: [
{
id: "five_hour",
label: "Session",
shortLabel: "5h",
summary: true,
usedPct: codexUsedPct,
},
],
},
},
],
],
});
await page.clock.install();
await page.setViewportSize(WIDE);
await seedSidebarFooterPreferences(page, [{ key: "usage", visible: true }]);
await gotoAppShell(page);
await expectPinnedUsage(page, ["31% 5h", "7% 5h"]);
await usage.waitForUsageReportSubscription();
const initialRequests = usage.listRequests();
// Push a Claude update 2 minutes into the 5-minute poll window.
await page.clock.fastForward(2 * 60_000);
const pushedAt = "2026-11-28T10:02:00.000Z";
usage.pushReportUpdate({
...claude!,
fetchedAt: pushedAt,
successfulAt: pushedAt,
report: {
status: "available",
windows: [
{ id: "five_hour", label: "Session", shortLabel: "5h", summary: true, usedPct: 64 },
],
},
});
await expectPinnedUsage(page, ["64% 5h", "7% 5h"]);
expect(usage.listRequests()).toEqual(initialRequests);
// Only 3 minutes later (t = 5m from initial fetch), the scheduled poll still runs for Codex.
codexUsedPct = 19;
listFetchedAt = "2026-11-28T10:05:00.000Z";
await page.clock.fastForward(3 * 60_000);
await expectPinnedUsage(page, ["31% 5h", "19% 5h"]);
expect(usage.listRequests()).toHaveLength(initialRequests.length + 1);
});
test("hiding and showing the sidebar preserves the five-minute poll schedule and failed reports retry after one minute", async ({
page,
}) => {
const [claude] = claudeAndCodexReports();
let mode: "ok" | "error" = "ok";
let usedPct = 31;
const usage = await installUsageReportsFixture(page, {
lists: [
() => [
{
...claude!,
fetchedAt: new Date().toISOString(),
report:
mode === "error"
? { status: "error", error: "Temporary 503" }
: {
status: "available",
windows: [
{ id: "five_hour", label: "Session", shortLabel: "5h", summary: true, usedPct },
],
},
},
],
],
});
await page.clock.install();
await page.setViewportSize(WIDE);
await seedSidebarFooterPreferences(page, [{ key: "usage", visible: true }]);
await gotoAppShell(page);
await expectPinnedUsage(page, ["31% 5h"]);
const initialRequests = usage.listRequests();
// Hide and reopen the sidebar within the stale window: no extra fetch starts on remount,
// and the original 5-minute poll slot fires on time rather than restarting from zero.
await page.clock.fastForward(20_000);
await page.setViewportSize(COMPACT);
await expect(usageItem(page)).toHaveCount(0);
await page.clock.fastForward(15_000);
await openCompactSidebar(page);
await expectPinnedUsage(page, ["31% 5h"]);
expect(usage.listRequests()).toEqual(initialRequests);
usedPct = 44;
await page.clock.fastForward(4 * 60_000 + 25_000);
await expectPinnedUsage(page, ["44% 5h"]);
expect(usage.listRequests()).toHaveLength(initialRequests.length + 1);
// When a report enters error state, the app retries after 1 minute instead of waiting 5 minutes.
mode = "error";
await page.clock.fastForward(5 * 60_000);
const requestsAfterError = usage.listRequests();
expect(requestsAfterError).toHaveLength(initialRequests.length + 2);
mode = "ok";
usedPct = 58;
await page.clock.fastForward(60_000);
await expectPinnedUsage(page, ["58% 5h"]);
expect(usage.listRequests()).toHaveLength(requestsAfterError.length + 1);
});
@@ -1,34 +0,0 @@
import { BuiltinPluginLoader } from "../../../../server/src/server/plugins/builtin/index.js";
import { createTestPaseoDaemon } from "../../../../server/src/server/test-utils/paseo-daemon.js";
import { DaemonClient } from "../../../../server/src/server/test-utils/daemon-client.js";
import assert from "node:assert/strict";
import pino from "pino";
const [, , root, origin, paseoHomeRoot, daemonVersion] = process.argv;
const daemon = await createTestPaseoDaemon({
corsAllowedOrigins: [origin!],
paseoHomeRoot,
daemonVersion,
logger: pino({ level: "error" }),
builtinPlugins: new BuiltinPluginLoader(root, ["builtin-settings"]),
});
const client = new DaemonClient({
appVersion: daemonVersion,
url: `ws://127.0.0.1:${daemon.port}/ws`,
});
try {
await client.connect();
const plugin = (await client.getPluginCatalog()).find(({ id }) => id === "builtin-settings");
assert.ok(plugin?.clientBundle, JSON.stringify(await client.getPluginLogs("builtin-settings")));
assert.deepEqual(await client.listPlugins(), []);
process.send!({ serverId: client.getLastServerInfoMessage()!.serverId, port: daemon.port });
await new Promise<void>((resolve) => {
process.once("disconnect", resolve);
process.once("SIGTERM", resolve);
});
} finally {
await client.close();
await daemon.close();
}
@@ -1,24 +0,0 @@
# Native SVG preview regression
Copy `../fixtures/native-preview.svg`, `../fixtures/native-preview-viewbox.svg`, and
`../../../assets/images/icon.png` into a workspace on a test daemon. In the Android
or iOS app, connect to that daemon, open the workspace's Files tab, and tap
`native-preview.svg`. The SVG should show a yellow circle on a green rectangle.
With that preview open, run:
```sh
agent-device test packages/app/e2e/mobile/agent-device/native-svg-preview.android.ad \
--metro-port <port> --artifacts-dir .artifacts/svg-preview
```
Run it again with `native-preview-viewbox.svg` open to cover SVG dimensions
inferred from `viewBox`, then with the PNG open to check raster images. Close and
reopen the SVG and rerun to cover cached file previews. Use English app language
for the zoom button selectors. The scripts are discovered by `npm run test:e2e:mobile`; the iOS counterpart is
`native-svg-preview.ios.ad`. They reopen the installed app with its current
preview and leave the daemon connection unchanged.
Before the fix the SVG remains blank and the canvas wait fails. The PNG passes.
The replay checks successful native dimension decoding and zoom/reset controls;
visually verify the circle and rectangle as well.
@@ -1,11 +0,0 @@
context platform=android timeout=60000 retries=0
env APP_ID=sh.paseo.debug
open "${APP_ID}"
wait "id=\"image-file-preview-canvas\"" 10000
wait "role=button label=\"Zoom in\"" 10000
press "role=button label=\"Zoom in\""
wait "role=button label=\"Reset view\" enabled=true" 10000
press "role=button label=\"Reset view\""
wait "role=button label=\"Reset view\" enabled=false" 10000
close
@@ -1,11 +0,0 @@
context platform=ios timeout=60000 retries=0
env APP_ID=sh.paseo.debug
open "${APP_ID}"
wait "id=\"image-file-preview-canvas\"" 10000
wait "role=button label=\"Zoom in\"" 10000
press "role=button label=\"Zoom in\""
wait "role=button label=\"Reset view\" enabled=true" 10000
press "role=button label=\"Reset view\""
wait "role=button label=\"Reset view\" enabled=false" 10000
close
@@ -317,80 +317,6 @@ async function runBoundedPreview() {
await runCase("preview", "files", fileCase);
}
// A finger drifts a few points during a tap, so tap the composer's controls with a
// short drag while the keyboard is open. The model picker must open, and on a wide
// layout its popover must end above the keyboard.
function dragTap(rect) {
ad(
"gesture",
"pan",
String(Math.round(rect.x + rect.width / 2)),
String(Math.round(rect.y + rect.height / 2)),
"0",
"3",
"120",
);
}
// Waits until the keyboard is shown and the node with `id` stops moving.
async function settledWithKeyboard(name, id) {
let previousTop;
return waitFor(name, (snap) => {
const node = nodeById(snap, id);
if (!node || !keyboardShown(snap)) return false;
const stable = node.rect.y === previousTop;
previousTop = node.rect.y;
return stable;
});
}
const keyboardTop = (snap) =>
snap.data.nodes.find((node) => node.type === "Keyboard" && node.rect).rect.y;
async function runControlTaps() {
await clearInput("controls");
const attach = nodeById(
await settledWithKeyboard("controls-attach-before", "message-input-root"),
"message-input-attach-button",
);
dragTap(attach.rect);
// Wide layouts show the attachment menu as a popover and phones as a sheet; both list the items.
await waitFor("controls-attach-menu", (snap) =>
Boolean(nodeById(snap, "message-input-attachment-menu-item-file")),
);
process.stdout.write("PASS drag tap on attach opened the attachment menu\n");
// The open menu hides the composer from accessibility. Its backdrop covers the top-left corner.
ad("press", "20", "120");
await waitFor("controls-attach-closed", (snap) => Boolean(nodeById(snap, "message-input-root")));
await clearInput("controls-model");
const trigger = nodeById(
await settledWithKeyboard("controls-model-before", "message-input-root"),
"combined-model-selector",
);
dragTap(trigger.rect);
const sheetOpen = (snap) =>
snap.data.nodes.some((node) => node.type === "Button" && node.label === "Close");
const opened = await waitFor(
"controls-model-picker",
(snap) => Boolean(nodeById(snap, "combobox-desktop-container")) || sheetOpen(snap),
);
process.stdout.write("PASS drag tap on the model selector opened the picker\n");
if (!nodeById(opened, "combobox-desktop-container")) return;
const settled = await settledWithKeyboard("controls-model-popover", "combobox-desktop-container");
const frame = nodeById(settled, "combobox-desktop-container").rect;
const bottom = frame.y + frame.height;
const covered = frame.y < trigger.rect.y + trigger.rect.height && bottom > trigger.rect.y;
if (covered || bottom > keyboardTop(settled) + 1) {
throw new Error(
`Model popover spans ${Math.round(frame.y)}-${Math.round(bottom)}; it must clear the trigger at ${Math.round(trigger.rect.y)} and the keyboard at ${Math.round(keyboardTop(settled))}`,
);
}
process.stdout.write(
`PASS model popover ${Math.round(frame.y)}-${Math.round(bottom)} clears the trigger and the keyboard\n`,
);
}
if (scenario !== "all") {
ad(
"open",
@@ -402,7 +328,6 @@ if (scenario !== "all") {
await waitFor("draft", (snap) => Boolean(nodeById(snap, "message-input-root")), 60_000);
if (scenario === "growth") await runLiveGrowth();
else if (scenario === "previews") await runBoundedPreview();
else if (scenario === "controls") await runControlTaps();
else throw new Error(`Unknown scenario: ${scenario}`);
process.stdout.write(`Composer ${scenario} regression passed. Artifacts: ${artifactsDir}\n`);
process.exit(0);
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 160"><rect width="240" height="160" fill="#08a040"/><circle cx="120" cy="80" r="50" fill="#ffcc00"/></svg>

Before

Width:  |  Height:  |  Size: 164 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="240" height="160" viewBox="0 0 240 160"><rect width="240" height="160" fill="#08a040"/><circle cx="120" cy="80" r="50" fill="#ffcc00"/></svg>

Before

Width:  |  Height:  |  Size: 188 B

@@ -31,7 +31,7 @@ function keyboardState() {
return {
shown: /^ mInputShown=true$/m.test(state),
// The native object identity survives layout/flag changes but not a remount.
input: view.match(/PaseoTerminalInputView\{(\w+)/)?.[1] ?? null,
input: view.match(/ReactEditText\{(\w+)/)?.[1] ?? null,
};
}
async function waitForKeyboard(shown) {
@@ -257,7 +257,6 @@ export interface AgentProfileDraft {
model?: string;
thinking?: string;
mode?: string;
systemPrompt?: string;
notes?: string;
}
@@ -320,12 +319,7 @@ async function fillAgentProfileForm(page: Page, draft: AgentProfileDraft): Promi
if (draft.name !== undefined) {
await surface.getByRole("textbox", { name: "Name", exact: true }).fill(draft.name);
}
if (
draft.thinking !== undefined ||
draft.mode !== undefined ||
draft.systemPrompt !== undefined ||
draft.notes !== undefined
) {
if (draft.thinking !== undefined || draft.mode !== undefined || draft.notes !== undefined) {
await ensureCustomizeExpanded(surface);
}
if (draft.mode !== undefined) {
@@ -343,11 +337,6 @@ async function fillAgentProfileForm(page: Page, draft: AgentProfileDraft): Promi
await chooseSelectFieldOption(page, { field: "thinking", option: draft.thinking });
}
}
if (draft.systemPrompt !== undefined) {
await surface
.getByRole("textbox", { name: "System prompt", exact: true })
.fill(draft.systemPrompt);
}
if (draft.notes !== undefined) {
await surface.getByRole("textbox", { name: "When to use", exact: true }).fill(draft.notes);
}
@@ -529,20 +518,12 @@ export async function browserHistoryJumpWithConfirm(
export async function expectAgentProfileForm(
page: Page,
name: string,
expected: {
provider?: string;
model?: string;
mode?: string;
systemPrompt?: string;
notes?: string;
},
expected: { provider?: string; model?: string; mode?: string; notes?: string },
): Promise<void> {
await agentProfileRow(page, name).click();
const surface = editSurface(page);
await expect(surface).toBeVisible({ timeout: 30_000 });
await expect(surface.getByRole("textbox", { name: "Name", exact: true })).toHaveValue(name);
const systemPromptHint = surface.getByTestId("agent-profile-system-prompt-field-hint");
await expect(systemPromptHint).toHaveText("Applies to new agents only");
const notesHint = surface.getByTestId("agent-profile-notes-field-hint");
await expect(notesHint).toHaveText("Tells agents when to pick this profile");
expect(await notesHint.evaluate((element) => getComputedStyle(element).webkitLineClamp)).not.toBe(
@@ -561,11 +542,6 @@ export async function expectAgentProfileForm(
if (expected.mode) {
await expect(surface.getByTestId("agent-profile-mode-trigger")).toContainText(expected.mode);
}
if (expected.systemPrompt !== undefined) {
await expect(surface.getByRole("textbox", { name: "System prompt", exact: true })).toHaveValue(
expected.systemPrompt,
);
}
if (expected.notes !== undefined) {
await expect(surface.getByRole("textbox", { name: "When to use", exact: true })).toHaveValue(
expected.notes,
@@ -587,12 +563,7 @@ export async function openModelPicker(page: Page): Promise<void> {
await expect(pickerViewport(page)).toBeVisible({ timeout: 30_000 });
}
/** Escape clears a typed query first; the next Escape closes the picker. */
export async function closeModelPicker(page: Page): Promise<void> {
const search = pickerViewport(page).getByTestId("model-search-input");
if ((await search.count()) > 0 && (await search.inputValue()) !== "") {
await clearModelSearchWithEscape(page);
}
await page.keyboard.press("Escape");
await expect(pickerViewport(page)).toHaveCount(0, { timeout: 30_000 });
}
@@ -603,44 +574,70 @@ export function profilePickerRow(page: Page, name: string): Locator {
.filter({ hasText: name });
}
/** Multi-provider desktop keeps profiles behind the rail; single-pane lists them inline. */
export async function openPickerProfiles(page: Page): Promise<void> {
const rail = pickerViewport(page).getByTestId("model-picker-rail-profiles");
if (await rail.isVisible().catch(() => false)) {
await rail.click();
}
}
export async function expectPickerProfile(
/**
* Profiles are pinned above the provider list, so "pinned" is an ordering claim:
* the profile row's top edge sits above every provider row's.
*/
export async function expectProfilePinnedAboveProviders(
page: Page,
input: { name: string; summary: string },
): Promise<void> {
await openPickerProfiles(page);
const viewport = pickerViewport(page);
await expect(viewport.getByText("Profiles", { exact: true })).toBeVisible({ timeout: 30_000 });
const row = profilePickerRow(page, input.name);
await expect(row).toBeVisible({ timeout: 30_000 });
await expect(row.getByText(input.summary, { exact: true })).toBeVisible();
const profileTop = await boxTop(row);
const providerRows = viewport.locator('[data-testid^="model-provider-"]');
await expect(providerRows.first()).toBeVisible();
const providerCount = await providerRows.count();
for (let index = 0; index < providerCount; index += 1) {
expect(profileTop).toBeLessThan(await boxTop(providerRows.nth(index)));
}
}
export async function expectProfileVisibleForProvider(
page: Page,
input: { name: string; summary: string },
): Promise<void> {
const viewport = pickerViewport(page);
await expect(viewport.getByText("Profiles", { exact: true })).toBeVisible({ timeout: 30_000 });
const row = profilePickerRow(page, input.name);
await expect(row).toBeVisible({ timeout: 30_000 });
await expect(row.getByText(input.summary, { exact: true })).toBeVisible();
}
export async function expectProfilesEditLink(page: Page): Promise<void> {
export async function expectProfileEditIsPencilOnly(page: Page): Promise<void> {
const viewport = pickerViewport(page);
await expect(
viewport.getByRole("button", { name: "Edit agent profiles", exact: true }),
).toBeVisible();
await expect(viewport.getByText("Edit", { exact: true })).toHaveCount(0);
}
export async function expectAgentProfilesEmptyPrompt(page: Page): Promise<void> {
const viewport = pickerViewport(page);
await expect(viewport.getByText("Profiles", { exact: true })).toHaveCount(0);
await expect(
viewport.getByRole("button", { name: "Edit agent profiles", exact: true }),
).toHaveCount(0);
await expect(viewport.getByRole("button", { name: "Create profile", exact: true })).toBeVisible({
timeout: 30_000,
});
}
export async function expectProfileEditTooltip(page: Page): Promise<void> {
const edit = pickerViewport(page).getByRole("button", {
name: "Edit agent profiles",
exact: true,
});
await expect(edit).toBeVisible();
await expect(edit).toHaveText("");
await expect(edit.locator("svg")).toBeVisible();
}
/** With no profiles, the Profiles entry offers to create one instead of listing any. */
export async function expectAgentProfilesEmptyPrompt(page: Page): Promise<void> {
await openPickerProfiles(page);
const viewport = pickerViewport(page);
await expect(viewport.locator('[data-testid^="model-profile-row-"]')).toHaveCount(0);
await expect(viewport.getByTestId("model-profiles-empty")).toBeVisible({ timeout: 30_000 });
await edit.hover();
await expect(page.getByText("Edit agent profiles", { exact: true })).toBeVisible();
}
export async function openAgentProfilesFromEmptyPrompt(page: Page): Promise<void> {
await pickerViewport(page).getByTestId("model-profiles-empty").click();
await pickerViewport(page).getByRole("button", { name: "Create profile", exact: true }).click();
await expect(page.getByTestId("agent-profiles-card")).toBeVisible({ timeout: 30_000 });
}
@@ -688,17 +685,25 @@ export async function expectProfileReachableByScrolling(page: Page, name: string
}
export async function applyProfileFromPicker(page: Page, name: string): Promise<void> {
const row = profilePickerRow(page, name);
if (!(await row.isVisible().catch(() => false))) {
const profilesRail = pickerViewport(page).getByTestId("model-picker-rail-profiles");
if (await profilesRail.isVisible().catch(() => false)) {
await profilesRail.click();
}
}
await row.click();
await profilePickerRow(page, name).click();
await expect(pickerViewport(page)).toHaveCount(0, { timeout: 30_000 });
}
/**
* Applying a profile materializes it and forgets it: nothing in the root view
* claims selection. Model rows do carry `aria-selected`, so a count of zero here
* is the absence of a checkmark, not the absence of the attribute everywhere.
*/
export async function expectNothingSelectedInPickerRoot(page: Page): Promise<void> {
await expect(pickerViewport(page).locator("[aria-selected]")).toHaveCount(0);
}
export async function expectAgentProfilesEditShortcut(page: Page): Promise<void> {
await expect(
pickerViewport(page).getByRole("button", { name: "Edit agent profiles", exact: true }),
).toBeVisible({ timeout: 30_000 });
}
export async function drillIntoProvider(page: Page, providerId: string): Promise<void> {
await pickerViewport(page).getByTestId(`model-provider-${providerId}`).click();
}
@@ -769,13 +774,13 @@ export async function selectModelRow(
*/
export async function clickModelRowWhileProviderOpens(
page: Page,
input: { provider: string; modelLabel: string; otherProvider: string },
input: { provider: string; modelLabel: string },
): Promise<void> {
const viewport = pickerViewport(page);
await drillIntoProvider(page, input.provider);
const rowBox = await viewport.getByText(input.modelLabel, { exact: true }).boundingBox();
if (!rowBox) throw new Error(`Model row ${input.modelLabel} has no box`);
await drillIntoProvider(page, input.otherProvider);
await viewport.getByRole("button", { name: "Back", exact: true }).click();
const cdp = await page.context().newCDPSession(page);
await cdp.send("Emulation.setCPUThrottlingRate", { rate: 10 });
@@ -793,7 +798,7 @@ export async function clickModelRowWhileProviderOpens(
/** Scrolling a provider's model list with the wheel leaves typing and Enter in the search field. */
export async function expectModelListScrollKeepsSearchFocused(page: Page): Promise<void> {
const search = pickerViewport(page).getByTestId("model-search-input");
const list = pickerViewport(page).getByTestId("model-picker-model-list");
const list = pickerViewport(page).getByTestId("compact-model-list");
await expect(search).toBeFocused();
await list.hover();
await page.mouse.wheel(0, 200);
@@ -804,18 +809,11 @@ export async function expectModelListScrollKeepsSearchFocused(page: Page): Promi
// ─── Cross-provider model search ───────────────────────────────────────────
export async function searchAllModels(page: Page, query: string): Promise<void> {
const input = pickerViewport(page).getByTestId("model-search-input");
const input = page.getByTestId("model-search-all-input");
await expect(input).toBeVisible({ timeout: 30_000 });
await input.fill(query);
}
/** Search results open at the top, with the Profiles heading above the first matching profile. */
export async function expectSearchProfilesAtTop(page: Page, profileId: string): Promise<void> {
const list = pickerViewport(page).getByTestId("model-picker-model-list");
await expect(list.getByText("Profiles", { exact: true })).toBeInViewport({ ratio: 1 });
await expect(list.getByTestId(`model-profile-row-${profileId}`)).toBeInViewport({ ratio: 1 });
}
export async function expectModelSearchResult(
page: Page,
expected: { provider: string; modelId: string; providerLabel: string; modelLabel: string },
@@ -834,19 +832,11 @@ function escapeForRegex(value: string): string {
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
/** Search results replace both panes, the Profiles list included. */
/** Search results replace the whole root view, pinned profiles included. */
export async function expectPinnedProfilesHidden(page: Page): Promise<void> {
await expect(pickerViewport(page).locator('[data-testid^="model-profile-row-"]')).toHaveCount(0);
}
export async function clearModelSearchWithEscape(page: Page): Promise<void> {
const search = pickerViewport(page).getByTestId("model-search-input");
await page.keyboard.press("Escape");
await expect(search).toHaveValue("");
await expect(search).toBeFocused();
await expect(pickerViewport(page)).toBeVisible();
}
export async function expectModelSearchEmptyState(page: Page, query: string): Promise<void> {
const empty = page.getByTestId("model-search-empty");
await expect(empty).toBeVisible({ timeout: 30_000 });

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