mirror of
https://github.com/getpaseo/paseo.git
synced 2026-12-03 05:36:08 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
282cbae1c1 |
-144
@@ -1,149 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## 0.19.0-beta.1 - 2026-12-02
|
||||
|
||||
- **Switch providers mid-chat:** Switch a chat to another provider and keep the conversation, with chat history now stored on the host. ([#11410](https://github.com/getpaseo/paseo/pull/11410))
|
||||
- **Queue survives restarts:** Queued messages now live on the host, so they survive app reloads, device switches and daemon restarts. ([#11424](https://github.com/getpaseo/paseo/pull/11424), [#11566](https://github.com/getpaseo/paseo/pull/11566), [#11740](https://github.com/getpaseo/paseo/pull/11740))
|
||||
- **One switch for agent tools:** Agent tools now sit behind one Enable tools setting with orchestration, schedules, PR watching and browser groups, and are on by default. ([#11189](https://github.com/getpaseo/paseo/pull/11189))
|
||||
- **Connected devices list:** Settings → Devices now shows which clients and hosts are connected and what each one can access. ([#11209](https://github.com/getpaseo/paseo/pull/11209))
|
||||
- **Plugin scorecards:** Plugin pages in the app and on paseo.sh show a scorecard, update history, related plugins and sponsor links. ([#11563](https://github.com/getpaseo/paseo/pull/11563), [#11674](https://github.com/getpaseo/paseo/pull/11674), [#11691](https://github.com/getpaseo/paseo/pull/11691))
|
||||
- **Share services through tunnels:** Share a running workspace service at a public URL from the Scripts menu, and dev servers keep their live-reload connections. Services now open at `localhost:<port>`, and `*.localhost` service URLs are removed. ([#11490](https://github.com/getpaseo/paseo/pull/11490))
|
||||
- **Lower CPU while agents run:** Running agents use far less CPU, GPU and battery, with lighter status rings, loaders and tool-call animations. ([#11456](https://github.com/getpaseo/paseo/pull/11456), [#11474](https://github.com/getpaseo/paseo/pull/11474), [#11564](https://github.com/getpaseo/paseo/pull/11564), [#11586](https://github.com/getpaseo/paseo/pull/11586), [#11591](https://github.com/getpaseo/paseo/pull/11591) by [@djbclark](https://github.com/djbclark), [@luoph](https://github.com/luoph), [@mariotaku](https://github.com/mariotaku))
|
||||
- **Steadier streaming replies:** Streaming replies show their final formatting as they arrive, and long replies no longer get slower to render as they grow. ([#11572](https://github.com/getpaseo/paseo/pull/11572), [#11582](https://github.com/getpaseo/paseo/pull/11582) by [@luoph](https://github.com/luoph))
|
||||
- **Faster mobile launch:** The mobile app shows your last workspace sooner after a cold launch, about 0.7 seconds on Android. ([#11390](https://github.com/getpaseo/paseo/pull/11390) by [@luoph](https://github.com/luoph), [@maci0](https://github.com/maci0))
|
||||
- **Desktop browser profiles:** Desktop browser tabs can use separate colored profiles, so you can stay signed in to two accounts on one site. ([#10357](https://github.com/getpaseo/paseo/pull/10357) by [@clkao](https://github.com/clkao))
|
||||
- **Swipe away the iOS keyboard:** Drag the chat down to hide the iOS keyboard, and chat controls now work on the first tap while it is open. ([#11625](https://github.com/getpaseo/paseo/pull/11625))
|
||||
|
||||
### Breaking
|
||||
|
||||
- Paseo CLI and daemon now require Node.js 22.16.0 or later ([#11410](https://github.com/getpaseo/paseo/pull/11410))
|
||||
|
||||
### Added
|
||||
|
||||
- Added Antigravity quota to Usage, refreshed only when you select Refresh ([#11585](https://github.com/getpaseo/paseo/pull/11585))
|
||||
- Added conversation-only rewind for OpenCode v2 agents ([#11675](https://github.com/getpaseo/paseo/pull/11675))
|
||||
- Added desktop browser tabs for workspaces on hosts connected through another host ([#11561](https://github.com/getpaseo/paseo/pull/11561))
|
||||
- Added `paseo hub run` to start Hub manual triggers from the terminal ([#11408](https://github.com/getpaseo/paseo/pull/11408))
|
||||
- Added Claude Enterprise monthly spend to the Usage card and sidebar summary ([#11514](https://github.com/getpaseo/paseo/pull/11514) by [@vivekkalyan](https://github.com/vivekkalyan))
|
||||
- Added Spend credits amounts for Codex individual spend limits ([#11702](https://github.com/getpaseo/paseo/pull/11702) by [@vivekkalyan](https://github.com/vivekkalyan))
|
||||
|
||||
### Improved
|
||||
|
||||
- Opened chats faster by skipping Markdown preparation for replies without workspace links ([#11327](https://github.com/getpaseo/paseo/pull/11327))
|
||||
- Reduced work on each workspace switch by updating Git actions only for the visible workspace ([#11332](https://github.com/getpaseo/paseo/pull/11332))
|
||||
- Stopped the sidebar re-rendering on agent updates that change only token usage ([#11565](https://github.com/getpaseo/paseo/pull/11565) by [@jl97mcad](https://github.com/jl97mcad))
|
||||
- Released hidden workspace composers after ten minutes during repeated workspace switches ([#11613](https://github.com/getpaseo/paseo/pull/11613) by [@js2me](https://github.com/js2me))
|
||||
- Kept typing responsive in long multiline drafts ([#11418](https://github.com/getpaseo/paseo/pull/11418))
|
||||
- Served the desktop app's web UI with Brotli and gzip compression instead of an uncompressed 25 MB bundle ([#10635](https://github.com/getpaseo/paseo/pull/10635) by [@djbclark](https://github.com/djbclark))
|
||||
- Changed chat loading to one steady spinner that reveals the chat and composer together, without an Updating messages flash ([#11575](https://github.com/getpaseo/paseo/pull/11575))
|
||||
- Kept the Restoring screen up until a restored workspace is ready ([#11486](https://github.com/getpaseo/paseo/pull/11486))
|
||||
- Showed a spinner on a worktree row while archive checks for uncommitted changes ([#11519](https://github.com/getpaseo/paseo/pull/11519), [#11574](https://github.com/getpaseo/paseo/pull/11574) by [@cxroop](https://github.com/cxroop))
|
||||
- Showed each host's icon with a status dot on host selectors ([#11568](https://github.com/getpaseo/paseo/pull/11568))
|
||||
- Sent the prompt with hardware-keyboard Return on iPhone, as on iPad ([#11537](https://github.com/getpaseo/paseo/pull/11537))
|
||||
- Replaced the Direct connection Advanced field with a Form and URI switch, so a pasted `tcp://` URI connects in one tap ([#11402](https://github.com/getpaseo/paseo/pull/11402) by [@thecardcheat](https://github.com/thecardcheat))
|
||||
|
||||
### Changed
|
||||
|
||||
- Changed archiving to keep a worktree that has uncommitted changes unless you confirm removal ([#11430](https://github.com/getpaseo/paseo/pull/11430))
|
||||
- Changed closing a New Agent tab with an unsent draft to ask before discarding it ([#11660](https://github.com/getpaseo/paseo/pull/11660))
|
||||
- Changed Cmd/Ctrl+click on a sidebar workspace to open it instead of entering select mode ([#11472](https://github.com/getpaseo/paseo/pull/11472))
|
||||
- Changed agents that already reported to their caller with `send_agent_prompt` to skip the extra finished notice ([#11583](https://github.com/getpaseo/paseo/pull/11583))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed an attached image over 2000 px breaking every later turn in its chat ([#5119](https://github.com/getpaseo/paseo/pull/5119) by [@RUIIIOVO](https://github.com/RUIIIOVO))
|
||||
- Fixed voice mode agents never speaking back when Paseo tools were off ([#11161](https://github.com/getpaseo/paseo/pull/11161))
|
||||
- Fixed turning off voice mode without a daemon connection leaving the microphone on ([#11587](https://github.com/getpaseo/paseo/pull/11587) by [@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
|
||||
- Fixed the app taking up to a minute to reconnect after returning from the background ([#10348](https://github.com/getpaseo/paseo/pull/10348) by [@dongsun1](https://github.com/dongsun1))
|
||||
- Fixed one failed WebSocket handshake doubling the reconnect delay ([#11428](https://github.com/getpaseo/paseo/pull/11428) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed chats staying on Reconnecting after the app switched to a faster connection ([#11029](https://github.com/getpaseo/paseo/pull/11029) by [@tmhaha](https://github.com/tmhaha))
|
||||
- Fixed Updating messages staying visible after reopening a cached chat ([#11464](https://github.com/getpaseo/paseo/pull/11464) by [@oyzh888](https://github.com/oyzh888))
|
||||
- Fixed terminal output stopping after a reconnect reused its subscription ([#10433](https://github.com/getpaseo/paseo/pull/10433) by [@chirag127](https://github.com/chirag127))
|
||||
- Fixed Files showing Host is not connected when the app launched before the host connected ([#11679](https://github.com/getpaseo/paseo/pull/11679))
|
||||
- Fixed Created and Last prompt sorting disappearing while a host is offline ([#11728](https://github.com/getpaseo/paseo/pull/11728))
|
||||
- Fixed iOS header taps scrolling the chat, Explorer or workspace list to the top ([#11262](https://github.com/getpaseo/paseo/pull/11262) by [@yzim](https://github.com/yzim))
|
||||
- Fixed a file sheet dismissed while opening leaving an invisible backdrop that blocked taps ([#11317](https://github.com/getpaseo/paseo/pull/11317) by [@LiebeLee](https://github.com/LiebeLee))
|
||||
- Fixed bottom sheets staying open when dismissed before their open animation started ([#11632](https://github.com/getpaseo/paseo/pull/11632))
|
||||
- Fixed Android attaching nothing when the app was recreated during image selection ([#7734](https://github.com/getpaseo/paseo/pull/7734))
|
||||
- Fixed pasting a file into the web composer inserting its path instead of attaching it ([#11718](https://github.com/getpaseo/paseo/pull/11718))
|
||||
- Fixed Content font size not applying to existing user messages in web chat ([#11469](https://github.com/getpaseo/paseo/pull/11469) by [@bearyjd](https://github.com/bearyjd))
|
||||
- Fixed `<br>` in a Markdown table cell splitting the table row ([#9587](https://github.com/getpaseo/paseo/pull/9587) by [@apple-ouyang](https://github.com/apple-ouyang))
|
||||
- Fixed hidden chat rows shifting the reading position on web ([#11538](https://github.com/getpaseo/paseo/pull/11538) by [@kogekiplay](https://github.com/kogekiplay))
|
||||
- Fixed a plugin slash command with an attachment being sent to the agent as a message ([#11483](https://github.com/getpaseo/paseo/pull/11483) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed Archive finished subagents skipping closed subagents ([#10865](https://github.com/getpaseo/paseo/pull/10865) by [@sbhas2k](https://github.com/sbhas2k))
|
||||
- Fixed Import Session missing the newest ACP sessions ([#10675](https://github.com/getpaseo/paseo/pull/10675))
|
||||
- Fixed Import Session hiding the provider error while Retry runs ([#11654](https://github.com/getpaseo/paseo/pull/11654))
|
||||
- Fixed setup dropping project suggestions from providers that answer after 60 seconds ([#11438](https://github.com/getpaseo/paseo/pull/11438) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed Open in file manager showing for workspaces on remote hosts ([#11463](https://github.com/getpaseo/paseo/pull/11463) by [@sleroq](https://github.com/sleroq))
|
||||
- Fixed Reveal in Finder for workspaces rooted at `/` ([#11206](https://github.com/getpaseo/paseo/pull/11206) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed large HTML files previewing as a blank pane on desktop ([#11504](https://github.com/getpaseo/paseo/pull/11504))
|
||||
- Fixed the Paseo RPM failing to install alongside other Electron RPMs ([#11354](https://github.com/getpaseo/paseo/pull/11354))
|
||||
- Fixed Restart and close terminals leaving terminal programs running on Windows ([#11398](https://github.com/getpaseo/paseo/pull/11398))
|
||||
- Fixed agent creation hanging behind provider checks for deleted worktrees ([#11646](https://github.com/getpaseo/paseo/pull/11646) by [@ralston](https://github.com/ralston))
|
||||
- Fixed finished Claude subagents showing as running or canceled after reopening a chat or restarting the daemon ([#10848](https://github.com/getpaseo/paseo/pull/10848), [#11594](https://github.com/getpaseo/paseo/pull/11594), [#11602](https://github.com/getpaseo/paseo/pull/11602) by [@monarchmaisuriya](https://github.com/monarchmaisuriya), [@desmond-rai](https://github.com/desmond-rai))
|
||||
- Fixed Claude agents started by Paseo missing Claude Code's chat titles ([#11057](https://github.com/getpaseo/paseo/pull/11057) by [@Zayooo00](https://github.com/Zayooo00))
|
||||
- Fixed turns Claude starts on its own staying hidden in reopened chats until Reload ([#11405](https://github.com/getpaseo/paseo/pull/11405))
|
||||
- Fixed Claude Code system notices being dropped from the chat ([#11419](https://github.com/getpaseo/paseo/pull/11419) by [@minamorl](https://github.com/minamorl))
|
||||
- Fixed Claude Code's Goal set reply missing from imported chats ([#11733](https://github.com/getpaseo/paseo/pull/11733))
|
||||
- Fixed listing commands in an archived Claude chat starting Claude Code ([#11521](https://github.com/getpaseo/paseo/pull/11521) by [@RawSalmon69](https://github.com/RawSalmon69))
|
||||
- Fixed Stop failing on unresponsive Pi and OMP agents ([#11618](https://github.com/getpaseo/paseo/pull/11618) by [@LouisDeconinck](https://github.com/LouisDeconinck))
|
||||
- Fixed Pi turns never finishing when an extension handles the prompt ([#10572](https://github.com/getpaseo/paseo/pull/10572) by [@jsilhan](https://github.com/jsilhan))
|
||||
- Fixed Pi prompts timing out during extension preflight and then running anyway ([#11525](https://github.com/getpaseo/paseo/pull/11525) by [@Stelath](https://github.com/Stelath))
|
||||
- Fixed Pi showing the prompt twice when an extension sends context before the reply ([#11533](https://github.com/getpaseo/paseo/pull/11533) by [@Stelath](https://github.com/Stelath))
|
||||
- Fixed Pi chats skipping project skills and settings in trusted workspaces ([#11527](https://github.com/getpaseo/paseo/pull/11527) by [@patrick-motard](https://github.com/patrick-motard))
|
||||
- Fixed new Pi agents failing with an old extension error after the conflict was fixed ([#11642](https://github.com/getpaseo/paseo/pull/11642))
|
||||
- Fixed the OMP Fast toggle missing before the first prompt ([#11553](https://github.com/getpaseo/paseo/pull/11553))
|
||||
- Fixed finished OMP form questions losing the question and chosen answer ([#11697](https://github.com/getpaseo/paseo/pull/11697), [#11706](https://github.com/getpaseo/paseo/pull/11706) by [@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
|
||||
- Fixed Codex sends reporting failure after 60 seconds while Codex was still starting ([#11547](https://github.com/getpaseo/paseo/pull/11547) by [@nonononull](https://github.com/nonononull))
|
||||
- Fixed Codex features staying hidden behind a wrapper command such as `env codex` ([#11221](https://github.com/getpaseo/paseo/pull/11221) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed answers to Codex async questions being rejected ([#11225](https://github.com/getpaseo/paseo/pull/11225) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed reopening a Codex chat resetting its last-activity time ([#10760](https://github.com/getpaseo/paseo/pull/10760) by [@Juns-g](https://github.com/Juns-g))
|
||||
- Fixed Antigravity subagent tool calls splitting streamed replies mid-word ([#11535](https://github.com/getpaseo/paseo/pull/11535) by [@Suhail](https://github.com/Suhail))
|
||||
- Fixed Antigravity turns ending as completed after an internal executor error ([#10885](https://github.com/getpaseo/paseo/pull/10885) by [@vecyang1](https://github.com/vecyang1), [@luoph](https://github.com/luoph))
|
||||
- Fixed ACP chats failing to reopen when the provider rejects the saved thinking level ([#10333](https://github.com/getpaseo/paseo/pull/10333))
|
||||
- Fixed the ACP thinking picker keeping the old level after a mode change ([#11478](https://github.com/getpaseo/paseo/pull/11478) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed ACP setting errors leaving out the provider's explanation ([#11431](https://github.com/getpaseo/paseo/pull/11431) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed Muse usage losing token totals after a context update ([#11389](https://github.com/getpaseo/paseo/pull/11389) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed the Claude Usage card staying rate limited for hours ([#11597](https://github.com/getpaseo/paseo/pull/11597))
|
||||
- Fixed Claude Usage showing the old plan after a subscription change ([#11685](https://github.com/getpaseo/paseo/pull/11685) by [@matchy233](https://github.com/matchy233))
|
||||
- Fixed Codex Usage showing 0 credits for accounts without a credit balance ([#11515](https://github.com/getpaseo/paseo/pull/11515) by [@vivekkalyan](https://github.com/vivekkalyan))
|
||||
- Fixed Copilot Usage failing when the premium request quota is exceeded ([#11006](https://github.com/getpaseo/paseo/pull/11006) by [@nathanmcnulty](https://github.com/nathanmcnulty))
|
||||
- Fixed Copilot Usage reading the token of another host or account from GitHub CLI ([#11689](https://github.com/getpaseo/paseo/pull/11689))
|
||||
- Fixed Create PR from a fork opening the pull request on the fork instead of its parent ([#11436](https://github.com/getpaseo/paseo/pull/11436) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed a fork pull request disappearing from its worktree workspace after the first push ([#11441](https://github.com/getpaseo/paseo/pull/11441) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed Create PR returning the API URL instead of the pull request page ([#11439](https://github.com/getpaseo/paseo/pull/11439) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed GitHub check details failing to load annotations ([#11476](https://github.com/getpaseo/paseo/pull/11476) by [@suniceman](https://github.com/suniceman))
|
||||
- Fixed GitHub check details dropping annotations when a job log is unavailable ([#11509](https://github.com/getpaseo/paseo/pull/11509))
|
||||
- Fixed Gitea and Forgejo draft pull requests showing as open and conflicting ([#11545](https://github.com/getpaseo/paseo/pull/11545) by [@goodideal](https://github.com/goodideal))
|
||||
- Fixed workspaces with an IPv6 Git remote not detecting their Gitea or Forgejo forge ([#11692](https://github.com/getpaseo/paseo/pull/11692) by [@jamescordrey-ops](https://github.com/jamescordrey-ops))
|
||||
- Fixed workspace refreshes stalling when a `gh` or `glab` command ignores its timeout ([#11252](https://github.com/getpaseo/paseo/pull/11252), [#11411](https://github.com/getpaseo/paseo/pull/11411))
|
||||
- Fixed scheduled runs in a Paseo worktree creating a duplicate project ([#10378](https://github.com/getpaseo/paseo/pull/10378) by [@kotusenka](https://github.com/kotusenka))
|
||||
- Fixed archiving an agent failing with Unknown agent while another archive or close runs ([#10590](https://github.com/getpaseo/paseo/pull/10590) by [@apple-ouyang](https://github.com/apple-ouyang))
|
||||
- Fixed an agent's last reply being cut off when a notification arrived mid-reply ([#11578](https://github.com/getpaseo/paseo/pull/11578) by [@KiritoXDone](https://github.com/KiritoXDone))
|
||||
- Fixed a queued message running in the mode of a prompt sent after it ([#11722](https://github.com/getpaseo/paseo/pull/11722))
|
||||
- Fixed `paseo ls --json` dropping timestamps and background work ([#11423](https://github.com/getpaseo/paseo/pull/11423) by [@KiritoXDone](https://github.com/KiritoXDone))
|
||||
- Fixed `paseo inspect` and `paseo ls` hiding the model for Cursor Auto ([#11693](https://github.com/getpaseo/paseo/pull/11693))
|
||||
- Fixed `paseo workspace ls` reporting a wrong password as a stopped daemon ([#11676](https://github.com/getpaseo/paseo/pull/11676) by [@chirag127](https://github.com/chirag127))
|
||||
- Fixed `paseo daemon status` leaving out unconfirmed terminal cleanup ([#11658](https://github.com/getpaseo/paseo/pull/11658) by [@chirag127](https://github.com/chirag127))
|
||||
- Fixed CLI archive, detach and reload scanning all agent history for a full agent ID ([#11617](https://github.com/getpaseo/paseo/pull/11617) by [@maci0](https://github.com/maci0))
|
||||
|
||||
### Security
|
||||
|
||||
- Blocked client file access to the daemon's own state in the Paseo home directory, and warned when a saved host's daemon key changes ([#11452](https://github.com/getpaseo/paseo/pull/11452))
|
||||
- Restricted loopback origin matching to `localhost`, `127.0.0.1` and `::1` for daemon WebSocket and HTTP requests ([#11686](https://github.com/getpaseo/paseo/pull/11686))
|
||||
- Stopped images in pull request comments and reviews from loading files from the host ([#11699](https://github.com/getpaseo/paseo/pull/11699))
|
||||
- Stopped `.worktreeinclude` from copying local files into worktrees from fork pull requests ([#11709](https://github.com/getpaseo/paseo/pull/11709))
|
||||
- Rejected schedule IDs that point outside the schedules directory ([#11727](https://github.com/getpaseo/paseo/pull/11727))
|
||||
|
||||
### Plugins
|
||||
|
||||
- Added a workspace layout API so plugins can open, move and close panes and tabs ([#11328](https://github.com/getpaseo/paseo/pull/11328))
|
||||
- Added `requirements.app` to set a separate minimum app version from the daemon's ([#11494](https://github.com/getpaseo/paseo/pull/11494) by [@mcowger](https://github.com/mcowger))
|
||||
- Fixed a plugin error in a press handler or timer closing the iOS and Android app ([#11412](https://github.com/getpaseo/paseo/pull/11412))
|
||||
- Fixed plugin operations deleting plugin entries added to `config.json` by hand ([#11501](https://github.com/getpaseo/paseo/pull/11501) by [@matchy233](https://github.com/matchy233))
|
||||
- Fixed registry plugin installs failing with Missing npm artifact when npm leaves registry URLs out of lockfiles ([#11656](https://github.com/getpaseo/paseo/pull/11656) by [@Brandon168](https://github.com/Brandon168))
|
||||
- Fixed local plugin reloads taking 12 to 21 seconds when the daemon runs under a large directory ([#11653](https://github.com/getpaseo/paseo/pull/11653))
|
||||
|
||||
## 0.18.2 - 2026-11-30
|
||||
|
||||
- **Redesigned model picker:** Pick models from a two-pane desktop view with cross-provider search, an in-place phone drawer with a thinking slider, and per-provider model lists in settings. ([#11186](https://github.com/getpaseo/paseo/pull/11186), [#11280](https://github.com/getpaseo/paseo/pull/11280), [#11295](https://github.com/getpaseo/paseo/pull/11295), [#11371](https://github.com/getpaseo/paseo/pull/11371), [#11313](https://github.com/getpaseo/paseo/pull/11313))
|
||||
|
||||
@@ -1,149 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## 0.19.0-beta.1 - 2026-12-02
|
||||
|
||||
- **对话中切换 Provider**:可将对话切换到其他 Provider 并保留对话内容,对话记录现在存储在主机上。([#11410](https://github.com/getpaseo/paseo/pull/11410))
|
||||
- **排队消息重启不丢失**:排队消息现在保存在主机上,应用重新加载、切换设备或 daemon 重启后都不会丢失。([#11424](https://github.com/getpaseo/paseo/pull/11424), [#11566](https://github.com/getpaseo/paseo/pull/11566), [#11740](https://github.com/getpaseo/paseo/pull/11740))
|
||||
- **一键开关 Agent 工具**:Agent 工具现在由一个 **启用工具** 设置统一控制,包含编排、定时任务、PR 监控和浏览器分组,并默认开启。([#11189](https://github.com/getpaseo/paseo/pull/11189))
|
||||
- **已连接设备列表**:**设置 → 设备** 现在会显示哪些客户端和主机已连接,以及各自可以访问的内容。([#11209](https://github.com/getpaseo/paseo/pull/11209))
|
||||
- **插件评分卡**:应用和 paseo.sh 上的插件页面现在会显示评分卡、更新历史、相关插件和赞助链接。([#11563](https://github.com/getpaseo/paseo/pull/11563), [#11674](https://github.com/getpaseo/paseo/pull/11674), [#11691](https://github.com/getpaseo/paseo/pull/11691))
|
||||
- **通过隧道共享服务**:可从 Scripts 菜单将正在运行的工作区服务共享到公网地址,开发服务器也会保留实时重载连接。服务现在通过 `localhost:<port>` 打开,`*.localhost` 服务地址已移除。([#11490](https://github.com/getpaseo/paseo/pull/11490))
|
||||
- **Agent 运行时更省资源**:运行中的 Agent 占用的 CPU、GPU 和电量大幅减少,状态环、加载指示器和工具调用动画也更轻量。([#11456](https://github.com/getpaseo/paseo/pull/11456), [#11474](https://github.com/getpaseo/paseo/pull/11474), [#11564](https://github.com/getpaseo/paseo/pull/11564), [#11586](https://github.com/getpaseo/paseo/pull/11586), [#11591](https://github.com/getpaseo/paseo/pull/11591),贡献者:[@djbclark](https://github.com/djbclark), [@luoph](https://github.com/luoph), [@mariotaku](https://github.com/mariotaku))
|
||||
- **更稳定的流式回复**:流式回复在到达时即显示最终格式,长回复的渲染也不再随长度增长而变慢。([#11572](https://github.com/getpaseo/paseo/pull/11572), [#11582](https://github.com/getpaseo/paseo/pull/11582),贡献者:[@luoph](https://github.com/luoph))
|
||||
- **更快的移动端启动**:移动端冷启动后会更快显示上次的工作区,在 Android 上约快 0.7 秒。([#11390](https://github.com/getpaseo/paseo/pull/11390),贡献者:[@luoph](https://github.com/luoph), [@maci0](https://github.com/maci0))
|
||||
- **桌面端浏览器配置文件**:桌面端浏览器标签页可以使用不同颜色的独立配置文件,便于在同一网站上同时登录两个账号。([#10357](https://github.com/getpaseo/paseo/pull/10357),贡献者:[@clkao](https://github.com/clkao))
|
||||
- **下滑收起 iOS 键盘**:向下拖动对话即可收起 iOS 键盘,键盘打开时对话控件首次点击即可生效。([#11625](https://github.com/getpaseo/paseo/pull/11625))
|
||||
|
||||
### 破坏性变更
|
||||
|
||||
- Paseo CLI 和 daemon 现在需要 Node.js 22.16.0 或更高版本 ([#11410](https://github.com/getpaseo/paseo/pull/11410))
|
||||
|
||||
### 新增
|
||||
|
||||
- 在用量中新增 Antigravity 配额,仅在选择 **刷新** 时更新 ([#11585](https://github.com/getpaseo/paseo/pull/11585))
|
||||
- 为 OpenCode v2 Agent 新增仅回退对话的功能 ([#11675](https://github.com/getpaseo/paseo/pull/11675))
|
||||
- 为通过其他主机连接的主机上的工作区新增桌面端浏览器标签页 ([#11561](https://github.com/getpaseo/paseo/pull/11561))
|
||||
- 新增 `paseo hub run`,可从终端启动 Hub 手动触发器 ([#11408](https://github.com/getpaseo/paseo/pull/11408))
|
||||
- 在用量卡片和侧边栏摘要中新增 Claude Enterprise 月度支出 ([#11514](https://github.com/getpaseo/paseo/pull/11514),贡献者:[@vivekkalyan](https://github.com/vivekkalyan))
|
||||
- 为 Codex 个人支出限额新增 Spend credits 金额显示 ([#11702](https://github.com/getpaseo/paseo/pull/11702),贡献者:[@vivekkalyan](https://github.com/vivekkalyan))
|
||||
|
||||
### 改进
|
||||
|
||||
- 对不含工作区链接的回复跳过 Markdown 预处理,加快对话打开速度 ([#11327](https://github.com/getpaseo/paseo/pull/11327))
|
||||
- 仅为可见工作区更新 Git 操作,减少每次切换工作区的开销 ([#11332](https://github.com/getpaseo/paseo/pull/11332))
|
||||
- 仅改变 token 用量的 Agent 更新不再触发侧边栏重新渲染 ([#11565](https://github.com/getpaseo/paseo/pull/11565),贡献者:[@jl97mcad](https://github.com/jl97mcad))
|
||||
- 反复切换工作区时,隐藏的工作区 Composer 会在十分钟后释放 ([#11613](https://github.com/getpaseo/paseo/pull/11613),贡献者:[@js2me](https://github.com/js2me))
|
||||
- 在较长的多行草稿中保持输入流畅 ([#11418](https://github.com/getpaseo/paseo/pull/11418))
|
||||
- 桌面应用的网页界面改用 Brotli 和 gzip 压缩传输,不再发送未压缩的 25 MB 包 ([#10635](https://github.com/getpaseo/paseo/pull/10635),贡献者:[@djbclark](https://github.com/djbclark))
|
||||
- 对话加载改为显示一个稳定的加载指示器,并同时显示对话和 Composer,不再闪现 **正在更新消息** ([#11575](https://github.com/getpaseo/paseo/pull/11575))
|
||||
- 恢复工作区时保持 Restoring 界面,直到工作区就绪 ([#11486](https://github.com/getpaseo/paseo/pull/11486))
|
||||
- 归档检查未提交的更改时,在 worktree 行上显示加载指示器 ([#11519](https://github.com/getpaseo/paseo/pull/11519), [#11574](https://github.com/getpaseo/paseo/pull/11574),贡献者:[@cxroop](https://github.com/cxroop))
|
||||
- 在主机选择器上显示各主机的图标和状态圆点 ([#11568](https://github.com/getpaseo/paseo/pull/11568))
|
||||
- iPhone 上按硬件键盘的 Return 键即可发送提示词,与 iPad 一致 ([#11537](https://github.com/getpaseo/paseo/pull/11537))
|
||||
- 将 **直接连接** 的 Advanced 字段替换为 **表单** 与 URI 切换,粘贴 `tcp://` URI 后一次点击即可连接 ([#11402](https://github.com/getpaseo/paseo/pull/11402),贡献者:[@thecardcheat](https://github.com/thecardcheat))
|
||||
|
||||
### 变更
|
||||
|
||||
- 归档时如果 worktree 有未提交的更改,除非确认删除,否则保留该 worktree ([#11430](https://github.com/getpaseo/paseo/pull/11430))
|
||||
- 关闭带有未发送草稿的 **新建 Agent** 标签页时,会先询问是否丢弃草稿 ([#11660](https://github.com/getpaseo/paseo/pull/11660))
|
||||
- 在侧边栏中 Cmd/Ctrl+点击工作区改为打开该工作区,而不再进入选择模式 ([#11472](https://github.com/getpaseo/paseo/pull/11472))
|
||||
- 已通过 `send_agent_prompt` 向调用方汇报的 Agent 不再额外发送完成通知 ([#11583](https://github.com/getpaseo/paseo/pull/11583))
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复附加超过 2000 px 的图片后,该对话之后的每一轮都失败的问题 ([#5119](https://github.com/getpaseo/paseo/pull/5119),贡献者:[@RUIIIOVO](https://github.com/RUIIIOVO))
|
||||
- 修复关闭 Paseo 工具时语音模式 Agent 始终不回话的问题 ([#11161](https://github.com/getpaseo/paseo/pull/11161))
|
||||
- 修复在没有 daemon 连接时关闭语音模式后麦克风仍保持开启的问题 ([#11587](https://github.com/getpaseo/paseo/pull/11587),贡献者:[@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
|
||||
- 修复应用从后台返回后需要长达一分钟才能重新连接的问题 ([#10348](https://github.com/getpaseo/paseo/pull/10348),贡献者:[@dongsun1](https://github.com/dongsun1))
|
||||
- 修复一次 WebSocket 握手失败就使重连延迟翻倍的问题 ([#11428](https://github.com/getpaseo/paseo/pull/11428),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复应用切换到更快的连接后,对话仍停留在 **正在重新连接** 的问题 ([#11029](https://github.com/getpaseo/paseo/pull/11029),贡献者:[@tmhaha](https://github.com/tmhaha))
|
||||
- 修复重新打开已缓存的对话后 **正在更新消息** 一直显示的问题 ([#11464](https://github.com/getpaseo/paseo/pull/11464),贡献者:[@oyzh888](https://github.com/oyzh888))
|
||||
- 修复重连复用订阅后终端输出停止的问题 ([#10433](https://github.com/getpaseo/paseo/pull/10433),贡献者:[@chirag127](https://github.com/chirag127))
|
||||
- 修复应用在主机连接前启动时 **文件** 显示 **Host 未连接** 的问题 ([#11679](https://github.com/getpaseo/paseo/pull/11679))
|
||||
- 修复主机离线时 **创建时间** 和 **最近提示词** 排序选项消失的问题 ([#11728](https://github.com/getpaseo/paseo/pull/11728))
|
||||
- 修复在 iOS 上点击标题栏会将对话、Explorer 或工作区列表滚动到顶部的问题 ([#11262](https://github.com/getpaseo/paseo/pull/11262),贡献者:[@yzim](https://github.com/yzim))
|
||||
- 修复文件面板在打开过程中被关闭后,留下阻挡点击的不可见遮罩的问题 ([#11317](https://github.com/getpaseo/paseo/pull/11317),贡献者:[@LiebeLee](https://github.com/LiebeLee))
|
||||
- 修复底部面板在打开动画开始前被关闭后仍保持打开的问题 ([#11632](https://github.com/getpaseo/paseo/pull/11632))
|
||||
- 修复 Android 在选择图片期间重建应用后未附加任何内容的问题 ([#7734](https://github.com/getpaseo/paseo/pull/7734))
|
||||
- 修复在网页版 Composer 中粘贴文件时插入文件路径而不是添加附件的问题 ([#11718](https://github.com/getpaseo/paseo/pull/11718))
|
||||
- 修复 **内容字体大小** 未应用到网页端对话中已有用户消息的问题 ([#11469](https://github.com/getpaseo/paseo/pull/11469),贡献者:[@bearyjd](https://github.com/bearyjd))
|
||||
- 修复 Markdown 表格单元格中的 `<br>` 拆分表格行的问题 ([#9587](https://github.com/getpaseo/paseo/pull/9587),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
|
||||
- 修复网页端隐藏的对话行导致阅读位置偏移的问题 ([#11538](https://github.com/getpaseo/paseo/pull/11538),贡献者:[@kogekiplay](https://github.com/kogekiplay))
|
||||
- 修复带附件的插件斜杠命令被当作消息发送给 Agent 的问题 ([#11483](https://github.com/getpaseo/paseo/pull/11483),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复 **归档已完成的 subagent** 跳过已关闭子 Agent 的问题 ([#10865](https://github.com/getpaseo/paseo/pull/10865),贡献者:[@sbhas2k](https://github.com/sbhas2k))
|
||||
- 修复 **导入会话** 遗漏最新 ACP 会话的问题 ([#10675](https://github.com/getpaseo/paseo/pull/10675))
|
||||
- 修复 **导入会话** 在 **重试** 期间隐藏 Provider 错误的问题 ([#11654](https://github.com/getpaseo/paseo/pull/11654))
|
||||
- 修复设置时丢弃 60 秒后才响应的 Provider 所给出的项目建议的问题 ([#11438](https://github.com/getpaseo/paseo/pull/11438),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复远程主机上的工作区显示 Open in file manager 的问题 ([#11463](https://github.com/getpaseo/paseo/pull/11463),贡献者:[@sleroq](https://github.com/sleroq))
|
||||
- 修复根目录为 `/` 的工作区无法使用 Reveal in Finder 的问题 ([#11206](https://github.com/getpaseo/paseo/pull/11206),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复桌面端预览大型 HTML 文件时显示空白面板的问题 ([#11504](https://github.com/getpaseo/paseo/pull/11504))
|
||||
- 修复 Paseo RPM 无法与其他 Electron RPM 同时安装的问题 ([#11354](https://github.com/getpaseo/paseo/pull/11354))
|
||||
- 修复 Windows 上 Restart and close 终端后终端程序仍在运行的问题 ([#11398](https://github.com/getpaseo/paseo/pull/11398))
|
||||
- 修复已删除 worktree 的 Provider 检查导致 Agent 创建卡住的问题 ([#11646](https://github.com/getpaseo/paseo/pull/11646),贡献者:[@ralston](https://github.com/ralston))
|
||||
- 修复重新打开对话或重启 daemon 后,已完成的 Claude 子 Agent 显示为运行中或已取消的问题 ([#10848](https://github.com/getpaseo/paseo/pull/10848), [#11594](https://github.com/getpaseo/paseo/pull/11594), [#11602](https://github.com/getpaseo/paseo/pull/11602),贡献者:[@monarchmaisuriya](https://github.com/monarchmaisuriya), [@desmond-rai](https://github.com/desmond-rai))
|
||||
- 修复由 Paseo 启动的 Claude Agent 缺少 Claude Code 对话标题的问题 ([#11057](https://github.com/getpaseo/paseo/pull/11057),贡献者:[@Zayooo00](https://github.com/Zayooo00))
|
||||
- 修复 Claude 自行开始的轮次在重新打开的对话中被隐藏、直到 **重新加载** 才显示的问题 ([#11405](https://github.com/getpaseo/paseo/pull/11405))
|
||||
- 修复 Claude Code 系统通知从对话中丢失的问题 ([#11419](https://github.com/getpaseo/paseo/pull/11419),贡献者:[@minamorl](https://github.com/minamorl))
|
||||
- 修复导入的 Claude Code 对话中缺少 Goal set 回复的问题 ([#11733](https://github.com/getpaseo/paseo/pull/11733))
|
||||
- 修复在已归档的 Claude 对话中列出命令时启动 Claude Code 的问题 ([#11521](https://github.com/getpaseo/paseo/pull/11521),贡献者:[@RawSalmon69](https://github.com/RawSalmon69))
|
||||
- 修复 **停止** 对无响应的 Pi 和 OMP Agent 无效的问题 ([#11618](https://github.com/getpaseo/paseo/pull/11618),贡献者:[@LouisDeconinck](https://github.com/LouisDeconinck))
|
||||
- 修复扩展处理提示词时 Pi 轮次永远无法结束的问题 ([#10572](https://github.com/getpaseo/paseo/pull/10572),贡献者:[@jsilhan](https://github.com/jsilhan))
|
||||
- 修复 Pi 提示词在扩展预检期间超时后仍继续执行的问题 ([#11525](https://github.com/getpaseo/paseo/pull/11525),贡献者:[@Stelath](https://github.com/Stelath))
|
||||
- 修复扩展在回复前发送上下文时 Pi 重复显示提示词的问题 ([#11533](https://github.com/getpaseo/paseo/pull/11533),贡献者:[@Stelath](https://github.com/Stelath))
|
||||
- 修复在受信任的工作区中 Pi 对话跳过项目技能和设置的问题 ([#11527](https://github.com/getpaseo/paseo/pull/11527),贡献者:[@patrick-motard](https://github.com/patrick-motard))
|
||||
- 修复冲突解决后新建 Pi Agent 仍报旧扩展错误的问题 ([#11642](https://github.com/getpaseo/paseo/pull/11642))
|
||||
- 修复首次发送提示词前缺少 OMP **快速** 开关的问题 ([#11553](https://github.com/getpaseo/paseo/pull/11553))
|
||||
- 修复已完成的 OMP 表单提问不再显示提问内容和所选答案的问题 ([#11697](https://github.com/getpaseo/paseo/pull/11697), [#11706](https://github.com/getpaseo/paseo/pull/11706),贡献者:[@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
|
||||
- 修复 Codex 仍在启动时发送消息于 60 秒后报告失败的问题 ([#11547](https://github.com/getpaseo/paseo/pull/11547),贡献者:[@nonononull](https://github.com/nonononull))
|
||||
- 修复通过 `env codex` 等包装命令启动时 Codex 功能被隐藏的问题 ([#11221](https://github.com/getpaseo/paseo/pull/11221),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复 Codex 异步提问的回答被拒绝的问题 ([#11225](https://github.com/getpaseo/paseo/pull/11225),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复重新打开 Codex 对话时重置其最近活动时间的问题 ([#10760](https://github.com/getpaseo/paseo/pull/10760),贡献者:[@Juns-g](https://github.com/Juns-g))
|
||||
- 修复 Antigravity 子 Agent 工具调用将流式回复从单词中间截断的问题 ([#11535](https://github.com/getpaseo/paseo/pull/11535),贡献者:[@Suhail](https://github.com/Suhail))
|
||||
- 修复 Antigravity 轮次在内部执行器出错后仍以完成状态结束的问题 ([#10885](https://github.com/getpaseo/paseo/pull/10885),贡献者:[@vecyang1](https://github.com/vecyang1), [@luoph](https://github.com/luoph))
|
||||
- 修复 Provider 拒绝已保存的思考强度时 ACP 对话无法重新打开的问题 ([#10333](https://github.com/getpaseo/paseo/pull/10333))
|
||||
- 修复切换模式后 ACP 思考强度选择器仍保留旧级别的问题 ([#11478](https://github.com/getpaseo/paseo/pull/11478),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复 ACP 设置错误中缺少 Provider 说明的问题 ([#11431](https://github.com/getpaseo/paseo/pull/11431),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复上下文更新后 Muse 用量丢失 token 总数的问题 ([#11389](https://github.com/getpaseo/paseo/pull/11389),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复 Claude 用量卡片持续数小时显示受速率限制的问题 ([#11597](https://github.com/getpaseo/paseo/pull/11597))
|
||||
- 修复订阅变更后 Claude 用量仍显示旧套餐的问题 ([#11685](https://github.com/getpaseo/paseo/pull/11685),贡献者:[@matchy233](https://github.com/matchy233))
|
||||
- 修复没有额度余额的账号 Codex 用量显示 0 额度的问题 ([#11515](https://github.com/getpaseo/paseo/pull/11515),贡献者:[@vivekkalyan](https://github.com/vivekkalyan))
|
||||
- 修复超出高级请求配额时 Copilot 用量获取失败的问题 ([#11006](https://github.com/getpaseo/paseo/pull/11006),贡献者:[@nathanmcnulty](https://github.com/nathanmcnulty))
|
||||
- 修复 Copilot 用量从 GitHub CLI 读取其他 GitHub 主机或账号 token 的问题 ([#11689](https://github.com/getpaseo/paseo/pull/11689))
|
||||
- 修复从 fork 执行 **创建 PR** 时将 PR 创建在 fork 而非其上游仓库的问题 ([#11436](https://github.com/getpaseo/paseo/pull/11436),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复 fork PR 在首次推送后从其 worktree 工作区中消失的问题 ([#11441](https://github.com/getpaseo/paseo/pull/11441),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复 **创建 PR** 返回 API 地址而非 PR 页面的问题 ([#11439](https://github.com/getpaseo/paseo/pull/11439),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复 GitHub 检查详情无法加载注释的问题 ([#11476](https://github.com/getpaseo/paseo/pull/11476),贡献者:[@suniceman](https://github.com/suniceman))
|
||||
- 修复作业日志不可用时 GitHub 检查详情丢失注释的问题 ([#11509](https://github.com/getpaseo/paseo/pull/11509))
|
||||
- 修复 Gitea 和 Forgejo 的草稿 PR 显示为已打开且存在冲突的问题 ([#11545](https://github.com/getpaseo/paseo/pull/11545),贡献者:[@goodideal](https://github.com/goodideal))
|
||||
- 修复 Git 远程地址为 IPv6 的工作区无法识别其 Gitea 或 Forgejo forge 的问题 ([#11692](https://github.com/getpaseo/paseo/pull/11692),贡献者:[@jamescordrey-ops](https://github.com/jamescordrey-ops))
|
||||
- 修复 `gh` 或 `glab` 命令忽略超时导致工作区刷新卡住的问题 ([#11252](https://github.com/getpaseo/paseo/pull/11252), [#11411](https://github.com/getpaseo/paseo/pull/11411))
|
||||
- 修复在 Paseo worktree 中运行定时任务时创建重复项目的问题 ([#10378](https://github.com/getpaseo/paseo/pull/10378),贡献者:[@kotusenka](https://github.com/kotusenka))
|
||||
- 修复在其他归档或关闭操作进行时归档 Agent 报 Unknown agent 错误的问题 ([#10590](https://github.com/getpaseo/paseo/pull/10590),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
|
||||
- 修复 Agent 回复过程中收到通知导致最后一条回复被截断的问题 ([#11578](https://github.com/getpaseo/paseo/pull/11578),贡献者:[@KiritoXDone](https://github.com/KiritoXDone))
|
||||
- 修复排队消息以之后发送的提示词的模式运行的问题 ([#11722](https://github.com/getpaseo/paseo/pull/11722))
|
||||
- 修复 `paseo ls --json` 丢失时间戳和后台任务的问题 ([#11423](https://github.com/getpaseo/paseo/pull/11423),贡献者:[@KiritoXDone](https://github.com/KiritoXDone))
|
||||
- 修复 `paseo inspect` 和 `paseo ls` 隐藏 Cursor Auto 模型的问题 ([#11693](https://github.com/getpaseo/paseo/pull/11693))
|
||||
- 修复 `paseo workspace ls` 将密码错误报告为 daemon 已停止的问题 ([#11676](https://github.com/getpaseo/paseo/pull/11676),贡献者:[@chirag127](https://github.com/chirag127))
|
||||
- 修复 `paseo daemon status` 遗漏未确认的终端清理的问题 ([#11658](https://github.com/getpaseo/paseo/pull/11658),贡献者:[@chirag127](https://github.com/chirag127))
|
||||
- 修复 CLI 归档、分离和重新加载时为匹配完整 Agent ID 而扫描全部 Agent 历史记录的问题 ([#11617](https://github.com/getpaseo/paseo/pull/11617),贡献者:[@maci0](https://github.com/maci0))
|
||||
|
||||
### 安全
|
||||
|
||||
- 阻止客户端访问 Paseo 主目录中 daemon 自身的状态文件,并在已保存主机的 daemon 密钥变化时发出警告 ([#11452](https://github.com/getpaseo/paseo/pull/11452))
|
||||
- 将 daemon WebSocket 和 HTTP 请求的回环来源匹配限制为 `localhost`、`127.0.0.1` 和 `::1` ([#11686](https://github.com/getpaseo/paseo/pull/11686))
|
||||
- 禁止 PR 评论和审查中的图片读取主机上的文件 ([#11699](https://github.com/getpaseo/paseo/pull/11699))
|
||||
- 禁止 `.worktreeinclude` 将本地文件复制到来自 fork PR 的 worktree 中 ([#11709](https://github.com/getpaseo/paseo/pull/11709))
|
||||
- 拒绝指向定时任务目录之外的定时任务 ID ([#11727](https://github.com/getpaseo/paseo/pull/11727))
|
||||
|
||||
### 插件
|
||||
|
||||
- 新增工作区布局 API,插件可以打开、移动和关闭面板与标签页 ([#11328](https://github.com/getpaseo/paseo/pull/11328))
|
||||
- 新增 `requirements.app`,可单独设置与 daemon 不同的最低应用版本 ([#11494](https://github.com/getpaseo/paseo/pull/11494),贡献者:[@mcowger](https://github.com/mcowger))
|
||||
- 修复插件在按下处理函数或定时器中出错导致 iOS 和 Android 应用关闭的问题 ([#11412](https://github.com/getpaseo/paseo/pull/11412))
|
||||
- 修复插件操作删除手动添加到 `config.json` 中插件条目的问题 ([#11501](https://github.com/getpaseo/paseo/pull/11501),贡献者:[@matchy233](https://github.com/matchy233))
|
||||
- 修复 npm 在锁文件中省略 registry 地址时,注册表插件安装报 Missing npm artifact 错误的问题 ([#11656](https://github.com/getpaseo/paseo/pull/11656),贡献者:[@Brandon168](https://github.com/Brandon168))
|
||||
- 修复 daemon 运行在大型目录下时,本地插件重新加载耗时 12 至 21 秒的问题 ([#11653](https://github.com/getpaseo/paseo/pull/11653))
|
||||
|
||||
## 0.18.2 - 2026-11-30
|
||||
|
||||
- **重新设计的模型选择器**:桌面端采用支持跨 Provider 搜索的双栏视图,手机端合并为带思考强度滑块的单层抽屉,并支持在设置中按 Provider 筛选常用模型。([#11186](https://github.com/getpaseo/paseo/pull/11186), [#11280](https://github.com/getpaseo/paseo/pull/11280), [#11295](https://github.com/getpaseo/paseo/pull/11295), [#11371](https://github.com/getpaseo/paseo/pull/11371), [#11313](https://github.com/getpaseo/paseo/pull/11313))
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@
|
||||
<tr valign="top">
|
||||
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="40"></picture></a><br><sub>Hoplite runs swarms of coding agents in the cloud.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://encore.dev/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/encore-on-dark.svg"><img src="packages/website/public/sponsors/encore-on-light.svg" alt="Encore" height="40"></picture></a><br><sub>Encore lets AI agents ship to production safely, at scale, in your own cloud.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://logits.com/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/logits-on-dark.svg"><img src="packages/website/public/sponsors/logits-on-light.svg" alt="Logits" height="40"></picture></a><br><sub>Optimized intelligence per token, second, dollar.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Paseo のスポンサーになる</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@
|
||||
<tr valign="top">
|
||||
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="40"></picture></a><br><sub>Hoplite runs swarms of coding agents in the cloud.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://encore.dev/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/encore-on-dark.svg"><img src="packages/website/public/sponsors/encore-on-light.svg" alt="Encore" height="40"></picture></a><br><sub>Encore lets AI agents ship to production safely, at scale, in your own cloud.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://logits.com/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/logits-on-dark.svg"><img src="packages/website/public/sponsors/logits-on-light.svg" alt="Logits" height="40"></picture></a><br><sub>Optimized intelligence per token, second, dollar.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Paseo 스폰서 되기</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ Paseo is an open source agentic development environment for desktop, mobile, web
|
||||
<tr valign="top">
|
||||
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="56"></picture></a><br><sub>Hoplite runs swarms of coding agents in the cloud.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://encore.dev/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/encore-on-dark.svg"><img src="packages/website/public/sponsors/encore-on-light.svg" alt="Encore" height="56"></picture></a><br><sub>Encore lets AI agents ship to production safely, at scale, in your own cloud.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://logits.com/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/logits-on-dark.svg"><img src="packages/website/public/sponsors/logits-on-light.svg" alt="Logits" height="56"></picture></a><br><sub>Optimized intelligence per token, second, dollar.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://paseo.sh/sponsor">Become a sponsor</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@
|
||||
<tr valign="top">
|
||||
<td align="center" width="33%"><a href="https://hoplite.sh/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/hoplite-on-dark.svg"><img src="packages/website/public/sponsors/hoplite-on-light.svg" alt="Hoplite" height="40"></picture></a><br><sub>Hoplite runs swarms of coding agents in the cloud.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://encore.dev/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/encore-on-dark.svg"><img src="packages/website/public/sponsors/encore-on-light.svg" alt="Encore" height="40"></picture></a><br><sub>Encore lets AI agents ship to production safely, at scale, in your own cloud.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://logits.com/?utm_source=paseo&utm_medium=readme&utm_campaign=sponsor"><picture><source media="(prefers-color-scheme: dark)" srcset="packages/website/public/sponsors/logits-on-dark.svg"><img src="packages/website/public/sponsors/logits-on-light.svg" alt="Logits" height="40"></picture></a><br><sub>Optimized intelligence per token, second, dollar.</sub></td>
|
||||
<td align="center" width="33%"><a href="https://paseo.sh/zh-CN/sponsor">成为 Paseo 赞助商</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -178,9 +178,9 @@ the switch. Promoting the switch cuts the running turn once the target is known
|
||||
already on the target takes the message and its settings as a plain prompt. A switch that fails keeps
|
||||
the message and holds the queue; the reason is in the daemon log.
|
||||
|
||||
The queue is saved in `$PASEO_HOME/paseo.db` ([data model](data-model.md#agent-message-queues)),
|
||||
The queue is saved in `$PASEO_HOME/agent-queues/` ([data model](data-model.md#directory-layout)),
|
||||
and a message is saved before its receipt is sent. Inline images are first saved as uploads, so the
|
||||
queue holds references. An empty message is refused, and a recipient holds at most 100
|
||||
queue file holds references. An empty message is refused, and a recipient holds at most 100
|
||||
messages.
|
||||
|
||||
A message is marked `dispatching` before the provider can receive it and removed when the provider
|
||||
@@ -450,7 +450,7 @@ the message is queued, so any device can open a row's attachments.
|
||||
|
||||
Rows take these commands:
|
||||
|
||||
- **Send now** promotes the row as `interrupt` when your send behavior setting is `interrupt`, and as `steer` otherwise (including `queue`, where the row is already waiting and Send now should not cancel the turn).
|
||||
- **Send now** promotes the row with your send behavior setting: `steer`, otherwise `interrupt`.
|
||||
- **Edit** is offered on your own messages only. It withdraws the row, then replaces the composer
|
||||
draft with its text and attachments, and stages the row's provider switch again. If the host
|
||||
already started sending the row, the draft stays as it is.
|
||||
|
||||
@@ -219,14 +219,7 @@ file after the daemon confirms persistence.
|
||||
|
||||
> **Window-state v1 limitation:** only the _first_ window of a session restores and persists saved geometry (size/position/maximized). Windows opened via ⌘⇧N / second-instance / "Open in new window" open at the default size, OS-cascaded, and do not persist — this avoids every window stacking on the same restored bounds and fighting over the single window-state store. Lifting this needs per-window state keys.
|
||||
>
|
||||
> **In-app browser profiles.** A browser tab's Electron partition is the pair (route, profile). The route is local, or a host's browser proxy. The profile is **Default** or a named profile. Electron sets the proxy per session (`session.setProxy`), not per `<webview>`, so the route is part of the partition name. Partition names are the identity, and `packages/desktop/src/features/browser-partition.ts` owns them:
|
||||
>
|
||||
> | Route | Default | Named profile |
|
||||
> | ----- | ------------------------------------ | --------------------------------------------------- |
|
||||
> | Local | `persist:paseo-browser` | `persist:paseo-profile-<slug>` |
|
||||
> | Host | `persist:paseo-browser-host-<16hex>` | `persist:paseo-browser-host-<16hex>-profile-<slug>` |
|
||||
>
|
||||
> `persist:paseo-browser` keeps cookies from before profiles, and the host Default name predates profiles; do not rename either. A host runs one loopback SOCKS5 server and one tunnel. Every profile session on that host points `setProxy` at the same port, so a new profile never opens a second tunnel. Main binds a host profile's session when the renderer calls `ensureHostProxy` with its slug, and verifies it with `resolveProxy`. The status snapshot lists bound sessions in `profilePartitions`, and the tab mounts only after its profile appears there. A tab can switch profile and route at any time: the `<webview>` is replaced under the new partition and reloads the current URL. Display names and colors live in the main-owned catalog `<userData>/browser-profiles.json`, so editing a name or color keeps sign-ins intact and updates open tabs live. At `will-attach-webview`, main admits local partitions and only those host partitions whose session it bound. The tab's chosen profile slug lives in its `workspace-browser-store` record. After every `did-attach`, the renderer registers its browser id, workspace id, partition, and current guest `WebContents` id. Main accepts it only when that guest belongs to the calling renderer and its session matches the partition, and for a host partition, only when the session is bound to the proxy. Registration is repeated on purpose, because reparenting a retained `<webview>` can replace its guest without replacing the DOM element. Settings > Chat & panes manages profiles on every route: clearing a profile clears its storage and cache on the local route and on each host, then reloads its open tabs. Removing a named profile closes its open tabs, removes it from the catalog, clears its sessions, and deletes each of its `Partitions/` directories. Startup deletes the directories of profiles that are no longer in the catalog. Default cannot be removed.
|
||||
> **In-app browser profiles.** Each local browser tab runs in a persistent Electron partition and can switch profiles at any time; switching replaces the `<webview>` under the new partition and reloads the current URL in that profile's session. Partition names are the identity: `persist:paseo-browser` is **Default** and preserves cookies from before profiles; `persist:paseo-profile-<slug>` is a named profile. Display names and colors live in the main-owned catalog `<userData>/browser-profiles.json`, so editing a profile's name or color keeps sign-ins intact and updates open tabs live. Main admits only `persist:paseo-browser`, `persist:paseo-profile-<slug>`, and active host-proxy partitions (`persist:paseo-browser-host-<16hex>`) at `will-attach-webview`. The tab's chosen profile slug lives in its `workspace-browser-store` record. After every `did-attach`, the renderer registers its browser id, workspace id, partition, and current guest `WebContents` id, and main accepts it only when that guest belongs to the calling renderer and its session matches the partition. Registration is intentionally repeated because reparenting a retained `<webview>` can replace its guest without replacing the DOM element. Settings > Chat & panes manages profiles: clearing a profile clears its storage/cache and reloads its open tabs; removing a named profile closes its open tabs, removes it from the catalog, clears its session, and deletes its `Partitions/paseo-profile-<slug>` directory from disk. Default cannot be removed.
|
||||
>
|
||||
> **In-app browser window opens.** Ordinary link opens, including Shift-clicked links, become Paseo workspace tabs and inherit the opener tab's browser profile. Script-created opens with popup features or a named window target and POST-backed opens remain secured Electron child windows in the opener’s browser profile, preserving `window.opener`, `postMessage`, named-window reuse, request bodies, and `window.close()` for OAuth, payment, and similar popup protocols. Unsupported URL schemes are denied before either path.
|
||||
>
|
||||
|
||||
+5
-9
@@ -34,7 +34,7 @@ Workspace archive runs lifecycle teardown from the exact `cwd` but removes only
|
||||
`worktreeRoot` after its last active reference disappears. Worktree recovery recreates that backing
|
||||
checkout from `mainRepoRoot`, then restores the relative path from `worktreeRoot` to `cwd`.
|
||||
|
||||
Paseo persists most stores as JSON files, and agent timelines and agent message queues in the [daemon database](#daemon-database). JSON data is validated at runtime with Zod schemas. Most JSON stores write atomically (write to temp file, then rename); a few still use plain `writeFile` — see each section. JSON stores have no schema-versioning/migration framework — schemas rely on optional fields with defaults for forward compatibility, with a small amount of inline normalization in `persisted-config.ts` for legacy provider/speech entries.
|
||||
Paseo persists most stores as JSON files, and agent timelines in the [daemon database](#daemon-database). JSON data is validated at runtime with Zod schemas. Most JSON stores write atomically (write to temp file, then rename); a few still use plain `writeFile` — see each section. JSON stores have no schema-versioning/migration framework — schemas rely on optional fields with defaults for forward compatibility, with a small amount of inline normalization in `persisted-config.ts` for legacy provider/speech entries.
|
||||
|
||||
All server-side stores live under `$PASEO_HOME` (defaults to `~/.paseo`).
|
||||
|
||||
@@ -60,6 +60,9 @@ $PASEO_HOME/
|
||||
│ └── {agentId}.json # One file per agent
|
||||
├── schedules/
|
||||
│ └── {scheduleId}.json # One file per schedule
|
||||
├── agent-queues/
|
||||
│ ├── {agentId}.json # Undelivered messages for one agent; removed when empty
|
||||
│ └── {agentId}.json.corrupt.{ms} # Unreadable queue file, set aside at startup
|
||||
├── projects/
|
||||
│ ├── projects.json # Project registry
|
||||
│ ├── workspaces.json # Workspace registry
|
||||
@@ -185,7 +188,7 @@ Terminal activity contributes to the workspace status bucket **per `workspaceId`
|
||||
## Daemon database
|
||||
|
||||
`$PASEO_HOME/paseo.db` is one SQLite file that the daemon opens at startup with `node:sqlite`
|
||||
(`packages/server/src/server/database/`). Agent timelines and agent message queues live here. Each store is a
|
||||
(`packages/server/src/server/database/`). Agent timelines are its only store today. Each store is a
|
||||
`SchemaModule`: its own table-name prefix and an append-only list of migrations.
|
||||
|
||||
- **Migrations.** Startup runs every module's pending migrations in one transaction, so a failed
|
||||
@@ -219,13 +222,6 @@ of a streamed assistant or reasoning message is stored as one chunk per source e
|
||||
row, so a chunk never rewrites the message. An earlier file store rewrote the whole transcript on
|
||||
every update. See [owned history](timeline-sync.md#owned-history).
|
||||
|
||||
### Agent message queues
|
||||
|
||||
`AgentMessageQueueStore` stores undelivered per-recipient messages in `agent_message_queue_items`
|
||||
and monotonic per-recipient sequence counters in `agent_message_queue_recipients`. Message text and
|
||||
structured payloads are stored as JSON strings so NUL bytes and lone surrogates round-trip through
|
||||
`node:sqlite`. See [agent-lifecycle.md](agent-lifecycle.md).
|
||||
|
||||
---
|
||||
|
||||
## 2. Daemon Configuration
|
||||
|
||||
+3
-5
@@ -216,11 +216,9 @@ its own.
|
||||
grew once its data arrived left the menu clipped, or hanging over its anchor, until it moved
|
||||
again. `AnchoredSurface` plays the same keyframes through the Web Animations API on web, which
|
||||
leaves no inline style; native keeps the Reanimated `Keyframe`.
|
||||
- **Animate only once placed.** The entering animation must run at the final position, not end
|
||||
unseen at the off-screen measuring position. Native remounts the surface when its position
|
||||
resolves, because Reanimated's `entering` runs only on mount. Web keeps the surface mounted and
|
||||
starts its Web Animations entering animation on placement, so a popover's content mounts once
|
||||
per open.
|
||||
- **Animate only once placed.** `AnchoredSurface` remounts the surface when its position resolves,
|
||||
so the entering animation runs at the final position rather than ending unseen at the
|
||||
off-screen measuring position.
|
||||
- **Sheets size to content.** `enableDynamicSizing`, not fixed snap points. A pushed page is
|
||||
rarely the height of the page before it. A fill page is the one exception.
|
||||
- **The sheet's content is teleported out of the menu's subtree**, so `MenuSheetSurface` rebuilds
|
||||
|
||||
@@ -104,14 +104,7 @@ definition, no longer eligible to begin.
|
||||
## Integration rules
|
||||
|
||||
- Callers request semantic targets through `panel-store`; they never write shared values.
|
||||
- Gesture behavior comes from the explicit hooks in `mobile-panels/gestures.ts`.
|
||||
- A horizontal scroller keeps the touches that start on it: no panel opens or closes under it. Use
|
||||
`ScrollView` or `FlatList` from `components/ui/scroll-view` with `horizontal`; plugins get the same
|
||||
components from `@getpaseo/plugin/client/ui`. An `Animated.ScrollView` puts
|
||||
`usePanelAwareHorizontalScrollGesture` on its own `GestureDetector`. The gesture blocks the
|
||||
provider's pans and the nearest explorer close pan. Browsers scroll an overflow container
|
||||
themselves and cancel the page's pointer stream, so the web `ScrollView` needs no gesture. The diff
|
||||
document's scroller differs on purpose: at its leading edge it waits for the explorer close pan.
|
||||
- Gesture behavior comes from the four explicit hooks in `mobile-panels/gestures.ts`.
|
||||
- Navigation gestures accept touch pointers only. Mouse and pen fail at touch-down, so dragging a
|
||||
mouse to select text on a hybrid laptop never moves a panel. Browsers without a touch screen
|
||||
(`hooks/pointer-capabilities`) never enable them.
|
||||
|
||||
+3
-7
@@ -257,13 +257,9 @@ Do not put any other code modules in the plugin root.
|
||||
|
||||
Shared files import contract helpers and types from `@getpaseo/plugin`. Server handler files import
|
||||
`PluginHandlerContext` from `@getpaseo/plugin/server`. Client files import Paseo UI from
|
||||
`@getpaseo/plugin/client/ui`. The module provides host-rendered `Icon` and `ProviderIcon`
|
||||
components. `Icon` draws a Lucide name from the client's installed icon set, or any `PluginIcon`
|
||||
through its `icon` prop; an unknown name or unsafe SVG renders nothing so it cannot break the
|
||||
plugin surface. `ProviderIcon` resolves a built-in, catalog, or host-scoped plugin provider icon,
|
||||
defaulting to the installation's host when `hostId` is omitted; unknown providers render the
|
||||
standard provider fallback. `PluginCatalogSync` hydrates the host's provider snapshot before
|
||||
installing client contributions so `ProviderIcon` resolves plugin SVGs on initial render.
|
||||
`@getpaseo/plugin/client/ui`. Its `Icon` draws a Lucide name from the client's installed
|
||||
icon set, or any `PluginIcon` through its `icon` prop; an unknown name or unsafe SVG renders nothing
|
||||
so it cannot break the plugin surface.
|
||||
Its controlled modal keeps presentation metadata on `<Modal title="…" icon={…}>` and body UI in
|
||||
`<Modal.Content>`. Body layout, sheet-aware scrolling, and clipboard actions follow the
|
||||
[host UI contract](../public-docs/plugins/reference.md#host-ui).
|
||||
|
||||
+25
-36
@@ -16,9 +16,8 @@ Preparation is reversible and runs on the release branch before the user authori
|
||||
4. Run the [pre-release sanity check](#pre-release-sanity-check) for stable releases, and report any findings to the user.
|
||||
5. Commit the approved changelog and any requested ACP update, then run `npm run format`, `npm run lint`, and `npm run typecheck`.
|
||||
6. Run `npm run release:prep:<mode>` to create the `chore(release): cut <version>` commit without a tag.
|
||||
7. Push `release/vX.Y.Z` or `release/vX.Y.Z-beta.N`.
|
||||
8. Right after the push, open the unmerged [reconcile `main`](#reconcile-main) PR from `reconcile/vX.Y.Z` or `reconcile/vX.Y.Z-beta.N`, so its CI runs in parallel with the release branch's `CI` and `Desktop Packages`. Do not merge it during Preparation.
|
||||
9. Wait for `CI` and `Desktop Packages` on the release branch to pass (never wait on `main` CI), and run the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit.
|
||||
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.
|
||||
|
||||
### Ship
|
||||
|
||||
@@ -26,7 +25,7 @@ Ship starts after the user says "go ahead". All tag-triggered GitHub Actions wor
|
||||
|
||||
1. Run `npm run release:push` first to verify the clean release branch and push `vX.Y.Z` or `vX.Y.Z-beta.N`. Pushing the tag takes a few seconds and starts `Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and (for stable tags) `Deploy App` on GitHub Actions, plus `Release Mobile` (stable) or `Release iOS Beta` (beta) on EAS. (`Deploy Website` runs later on the `release: published` event when `Desktop Release` publishes the stable GitHub Release.)
|
||||
2. Run `npm run release:publish` (stable) or `npm run release:publish:beta` (beta) in parallel with the remote builds. `scripts/publish-release-packages.mjs` publishes the seven `@getpaseo/*` packages in dependency waves and polls npm visibility between packages to avoid `E409` or `E404` propagation races.
|
||||
3. Check the green [reconcile `main`](#reconcile-main) PR against the pushed tag, then merge it right after `npm run release:push` finishes, in parallel with npm publication and the release builds. Wait for its checks only if the tag check produced changes.
|
||||
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
|
||||
@@ -121,7 +120,6 @@ An explicit user instruction can select another base.
|
||||
`CI` (all 21 jobs) and `Desktop Packages` (Linux user-namespace smoke) in their own concurrency
|
||||
groups, isolated from `main` traffic. Never wait on `main` CI, because `main` runs queue behind
|
||||
each other and a newer merge replaces the pending one.
|
||||
Open the [reconcile `main`](#reconcile-main) PR now so its CI runs in parallel with these two.
|
||||
Wait for both runs on the release branch commit to pass before shipping.
|
||||
Complete the [pre-release dependency checks](#pre-release-dependency-checks) on that commit.
|
||||
Pushing a `release/**` branch without a `v*` tag triggers no publish workflows.
|
||||
@@ -129,8 +127,9 @@ An explicit user instruction can select another base.
|
||||
Because the release branch is already pushed at `HEAD`, no second branch CI run starts, and only
|
||||
the tag release workflows run.
|
||||
7. Immediately in parallel after `npm run release:push` finishes: publish npm packages with
|
||||
`npm run release:publish` (stable) or `npm run release:publish:beta` (beta), merge the
|
||||
already-green [reconcile `main`](#reconcile-main) PR, and create the release heartbeat. (`npm run release:ship` and `npm run release:ship:beta` also run
|
||||
`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.)
|
||||
|
||||
When promoting or branching from a tag created before `release:prep:*`, `release:ship`, and the
|
||||
@@ -175,35 +174,27 @@ For a promotion, every item defaults to defer.
|
||||
|
||||
## Reconcile main
|
||||
|
||||
Open the reconcile PR during Preparation, right after pushing `release/vX.Y.Z` or `release/vX.Y.Z-beta.N`. Its CI takes about 30 minutes and npm publication takes about 5, so opening it at Ship would leave Ship waiting on CI. An unmerged PR changes nothing on `main`. Reconcile reads only the release branch commit, so it does not wait for the release branch's `CI` or `Desktop Packages`:
|
||||
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:
|
||||
|
||||
```bash
|
||||
git fetch origin
|
||||
git fetch origin --tags
|
||||
git checkout -b reconcile/vX.Y.Z origin/main
|
||||
npm run release:reconcile -- --ref origin/release/vX.Y.Z
|
||||
npm run release:reconcile -- --tag vX.Y.Z
|
||||
```
|
||||
|
||||
Use `release/vX.Y.Z-beta.N` and `reconcile/vX.Y.Z-beta.N` for a beta. `--tag vX.Y.Z` reads a published tag instead, for a release that is already tagged.
|
||||
|
||||
`scripts/reconcile-release.mjs` updates the working tree without cherry-picking stale lockfile
|
||||
hunks from the release base:
|
||||
|
||||
- Copies the release branch's `CHANGELOG.md` and `CHANGELOG.zh-CN.md` entries verbatim. A beta or promotion
|
||||
- Copies the tagged `CHANGELOG.md` and `CHANGELOG.zh-CN.md` entries verbatim. A beta or promotion
|
||||
entry replaces the series beta entry on `main`. A stable hotfix on an older line is placed below
|
||||
any newer entries.
|
||||
- Copies the generated F-Droid changelog files from the release branch for stable releases.
|
||||
- Copies the generated F-Droid changelog files from the tag for stable releases.
|
||||
- Updates every `package.json` version and regenerates `package-lock.json` on top of current `main`
|
||||
only when the shipped version is newer than `main`'s version.
|
||||
- Leaves unshipped work on `main` untouched and makes no claims about unshipped work in the
|
||||
changelog entry.
|
||||
|
||||
Commit and open the PR into `main`, but do not merge it during Preparation:
|
||||
|
||||
- If the release is cancelled, close the PR. `main` is untouched.
|
||||
- If the release branch changes during Preparation, re-run `npm run release:reconcile -- --ref origin/release/vX.Y.Z` on the same branch and push to the same PR.
|
||||
- At Ship, right after `npm run release:push` pushes the tag, run `npm run release:reconcile -- --tag vX.Y.Z` on the reconcile branch. A clean `git status` means the PR already matches the tag, so merge it in parallel with `npm run release:publish` and the tag builds. If it shows changes, push them and wait for the PR checks before merging.
|
||||
|
||||
Delete the remote release branch
|
||||
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`.
|
||||
@@ -259,16 +250,16 @@ npm run release:prep:patch
|
||||
# or:
|
||||
npm run release:prep:minor
|
||||
|
||||
# 2. Push the release branch, then open the reconcile/vX.Y.Z PR into main (do not merge it).
|
||||
# 2. Push the release branch and wait for CI + Desktop Packages on this commit.
|
||||
git push -u origin HEAD
|
||||
# Wait for CI + Desktop Packages on this commit and complete the pre-release dependency checks.
|
||||
# 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 merge the green reconcile/vX.Y.Z PR and create the release heartbeat.
|
||||
# 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.)
|
||||
```
|
||||
|
||||
@@ -303,13 +294,12 @@ npm run release:check # Typecheck, build, dry-run pack
|
||||
npm run version:all:patch
|
||||
npm run version:all:minor
|
||||
git push -u origin HEAD # Trigger CI + Desktop Packages on release/vX.Y.Z
|
||||
# Open the reconcile/vX.Y.Z PR into main now (do not merge it).
|
||||
# Wait for CI and Desktop Packages and complete the pre-release dependency checks.
|
||||
# After go-ahead:
|
||||
npm run release:push # Create tag vX.Y.Z on HEAD and push (starts release builds)
|
||||
# In parallel right after release:push:
|
||||
npm run release:publish # Publish to npm (idempotent, with propagation + beta dist-tag sync)
|
||||
# Merge the green reconcile/vX.Y.Z PR and create the release heartbeat.
|
||||
# Open reconcile/vX.Y.Z PR into main and create the release heartbeat.
|
||||
```
|
||||
|
||||
## Beta flow
|
||||
@@ -322,24 +312,23 @@ npm run release:prep:beta:minor # Start the next minor beta line
|
||||
# or for follow-up betas:
|
||||
npm run release:prep:beta:next # Cut X.Y.Z-beta.2, beta.3, ...
|
||||
|
||||
# 2. Push the release branch and open the reconcile/vX.Y.Z-beta.N PR into main (do not merge it):
|
||||
# 2. Push the release branch and wait for CI + Desktop Packages to pass:
|
||||
git push -u origin HEAD
|
||||
# Wait for CI + Desktop Packages to pass and complete the pre-release dependency checks.
|
||||
# Complete the pre-release dependency checks on this commit.
|
||||
|
||||
# 3. After go-ahead: push the tag first, then run npm publish, merge the reconcile PR, and heartbeat in parallel:
|
||||
# 3. After go-ahead: push the tag 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 merging reconcile/vX.Y.Z-beta.N.)
|
||||
# (Or run `npm run release:ship:beta` in one shell while opening reconcile/vX.Y.Z-beta.N.)
|
||||
|
||||
# Later, after soak, promote on release/vX.Y.Z:
|
||||
npm run release:prep:promote
|
||||
git push -u origin HEAD
|
||||
# Open the reconcile/vX.Y.Z PR into main (do not merge it).
|
||||
# Wait for CI + Desktop Packages and complete the pre-release dependency checks.
|
||||
# After go-ahead:
|
||||
npm run release:push
|
||||
npm run release:publish
|
||||
# Merge the green reconcile/vX.Y.Z PR and create the release heartbeat in parallel.
|
||||
# Open reconcile/vX.Y.Z PR into main and create the release heartbeat in parallel.
|
||||
```
|
||||
|
||||
- Beta tags are published GitHub prereleases like `v0.1.41-beta.1`
|
||||
@@ -1015,9 +1004,9 @@ Every entry covers `previous stable release → release source`: first beta, lat
|
||||
- [ ] Every PR in the release range has been opened, and its full description and every linked issue have been read before drafting the changelog
|
||||
- [ ] Fold this beta into the series' single `CHANGELOG.md` entry (heading `## X.Y.Z-beta.N - YYYY-MM-DD`, previous stable → release source), review it against the changelog policy, get approval, and commit it with its [`CHANGELOG.zh-CN.md` translation](#changelog-translations) before running `release:prep:*`
|
||||
- [ ] The diff from the previous stable to the resolved release source is classified as patch or minor, with the target version and rationale approved
|
||||
- [ ] `npm run release:prep:beta:patch`, `release:prep:beta:minor`, or `release:prep:beta:next` created the version commit on `release/vX.Y.Z-beta.N` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI), with the unmerged reconcile PR opened right after the branch push
|
||||
- [ ] `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 merge of the green `reconcile/vX.Y.Z-beta.N` PR, and the release heartbeat started in parallel
|
||||
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z-beta.N` tag without triggering a second CI run, while `npm 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`
|
||||
- [ ] 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
|
||||
@@ -1039,9 +1028,9 @@ Every entry covers `previous stable release → release source`: first beta, lat
|
||||
- [ ] Update `CHANGELOG.md` with user-facing release notes (features, fixes, not refactors). Promotion renames the series' `## X.Y.Z-beta.N` entry to `## X.Y.Z - YYYY-MM-DD` and re-checks it covers the full release. Commit the matching [`CHANGELOG.zh-CN.md` entry](#changelog-translations) with it
|
||||
- [ ] Verify the changelog heading follows strict `## X.Y.Z - YYYY-MM-DD` format
|
||||
- [ ] Ensure local format, lint, and typecheck pass and the working tree is clean before running `release:prep:*`
|
||||
- [ ] `npm run release:prep:patch`, `release:prep:minor`, or `release:prep:promote` created the version commit on `release/vX.Y.Z` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI), with the unmerged reconcile PR opened right after the branch push
|
||||
- [ ] `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 merge of the green `reconcile/vX.Y.Z` PR, and the release heartbeat started in parallel
|
||||
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z` tag without triggering a second CI run, while `npm 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`
|
||||
- [ ] 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
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
sha256-oBd6CQ8+BhzMHhrpRIwzojuFPUwqXpgc3ZAPqKPs5QQ=
|
||||
sha256-x6E6SY98/8pUNLomlPzSNedZ+ZKJPzsQeS9L455i+n0=
|
||||
|
||||
Generated
+29
-29
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "paseo",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "paseo",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"workspaces": [
|
||||
@@ -37552,7 +37552,7 @@
|
||||
},
|
||||
"packages/app": {
|
||||
"name": "@getpaseo/app",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"dependencies": {
|
||||
"@codemirror/commands": "6.10.4",
|
||||
"@codemirror/language": "6.12.4",
|
||||
@@ -39705,13 +39705,13 @@
|
||||
},
|
||||
"packages/cli": {
|
||||
"name": "@getpaseo/cli",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@clack/prompts": "^1.0.0",
|
||||
"@getpaseo/client": "0.19.0-beta.1",
|
||||
"@getpaseo/protocol": "0.19.0-beta.1",
|
||||
"@getpaseo/server": "0.19.0-beta.1",
|
||||
"@getpaseo/client": "0.18.2",
|
||||
"@getpaseo/protocol": "0.18.2",
|
||||
"@getpaseo/server": "0.18.2",
|
||||
"chalk": "^5.3.0",
|
||||
"commander": "^12.0.0",
|
||||
"mime-types": "^2.1.35",
|
||||
@@ -39961,11 +39961,11 @@
|
||||
},
|
||||
"packages/client": {
|
||||
"name": "@getpaseo/client",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@getpaseo/protocol": "0.19.0-beta.1",
|
||||
"@getpaseo/relay": "0.19.0-beta.1",
|
||||
"@getpaseo/protocol": "0.18.2",
|
||||
"@getpaseo/relay": "0.18.2",
|
||||
"ws": "^8.20.0",
|
||||
"zod": "^4.4.3"
|
||||
},
|
||||
@@ -39977,7 +39977,7 @@
|
||||
},
|
||||
"packages/desktop": {
|
||||
"name": "@getpaseo/desktop",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@getpaseo/cli": "*",
|
||||
@@ -40221,7 +40221,7 @@
|
||||
},
|
||||
"packages/expo-two-way-audio": {
|
||||
"name": "@getpaseo/expo-two-way-audio",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.14",
|
||||
@@ -40267,7 +40267,7 @@
|
||||
},
|
||||
"packages/highlight": {
|
||||
"name": "@getpaseo/highlight",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@codemirror/language": "6.12.4",
|
||||
@@ -40297,7 +40297,7 @@
|
||||
},
|
||||
"packages/plugin": {
|
||||
"name": "@getpaseo/plugin",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@agentclientprotocol/sdk": "^1.4.0",
|
||||
@@ -40305,8 +40305,8 @@
|
||||
"use-sync-external-store": "^1.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@getpaseo/client": "0.19.0-beta.1",
|
||||
"@getpaseo/protocol": "0.19.0-beta.1",
|
||||
"@getpaseo/client": "0.18.2",
|
||||
"@getpaseo/protocol": "0.18.2",
|
||||
"@types/node": "^20.9.0",
|
||||
"@types/react": "~19.2.0",
|
||||
"react": "19.2.3",
|
||||
@@ -40316,8 +40316,8 @@
|
||||
"zod": "^4.4.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@getpaseo/client": "0.19.0-beta.1",
|
||||
"@getpaseo/protocol": "0.19.0-beta.1",
|
||||
"@getpaseo/client": "0.18.2",
|
||||
"@getpaseo/protocol": "0.18.2",
|
||||
"react": ">=19.1.0 <20",
|
||||
"react-native": ">=0.81.5",
|
||||
"zod": "^4.4.3"
|
||||
@@ -40339,7 +40339,7 @@
|
||||
},
|
||||
"packages/protocol": {
|
||||
"name": "@getpaseo/protocol",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"semver": "^7.8.5",
|
||||
@@ -40366,7 +40366,7 @@
|
||||
}
|
||||
},
|
||||
"packages/react-native-enriched-markdown": {
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
@@ -40382,7 +40382,7 @@
|
||||
},
|
||||
"packages/relay": {
|
||||
"name": "@getpaseo/relay",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@noble/ciphers": "^2.4.0",
|
||||
@@ -40604,17 +40604,17 @@
|
||||
},
|
||||
"packages/server": {
|
||||
"name": "@getpaseo/server",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"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.19.0-beta.1",
|
||||
"@getpaseo/highlight": "0.19.0-beta.1",
|
||||
"@getpaseo/plugin": "0.19.0-beta.1",
|
||||
"@getpaseo/protocol": "0.19.0-beta.1",
|
||||
"@getpaseo/relay": "0.19.0-beta.1",
|
||||
"@getpaseo/client": "0.18.2",
|
||||
"@getpaseo/highlight": "0.18.2",
|
||||
"@getpaseo/plugin": "0.18.2",
|
||||
"@getpaseo/protocol": "0.18.2",
|
||||
"@getpaseo/relay": "0.18.2",
|
||||
"@isaacs/ttlcache": "^2.1.4",
|
||||
"@modelcontextprotocol/node": "2.1.2",
|
||||
"@modelcontextprotocol/sdk": "1.29.0",
|
||||
@@ -41579,7 +41579,7 @@
|
||||
},
|
||||
"packages/website": {
|
||||
"name": "@getpaseo/website",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"dependencies": {
|
||||
"@cloudflare/vite-plugin": "^1.29.1",
|
||||
"@cloudflare/workers-types": "^4.20260317.1",
|
||||
@@ -43205,7 +43205,7 @@
|
||||
},
|
||||
"plugins": {
|
||||
"name": "@getpaseo/builtin-plugins",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"dependencies": {
|
||||
"@getpaseo/plugin": "*",
|
||||
"zod": "^4.4.3"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "paseo",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"private": true,
|
||||
"description": "Paseo: voice-controlled development environment for local AI coding agents",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { mkdir, writeFile } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { gateNextAgentMessage } from "../support/helpers/agent-message-gate";
|
||||
import { expectComposerDraft, submitMessage } from "../support/helpers/composer";
|
||||
import { expectAgentIdle } from "../support/helpers/agent-stream";
|
||||
import { test, expect, type Page } from "../support/fixtures";
|
||||
import { seedMockAgentWorkspace, openAgentRoute } from "../support/helpers/mock-agent";
|
||||
import { openChangesPanel, openChangesTreePanel } from "../support/helpers/workspace-tabs";
|
||||
@@ -58,45 +55,3 @@ for (const width of [1400, 390]) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function addChangedFileToChat(page: Page) {
|
||||
await openChangesPanel(page);
|
||||
await page.getByTestId("diff-file-0-toggle").click({ button: "right" });
|
||||
await page.getByTestId("diff-file-0-add-to-chat").click();
|
||||
}
|
||||
|
||||
async function expectFollowUpAttachment(page: Page) {
|
||||
await expect(page.getByTestId("composer-workspace-file-attachment-pill")).toContainText(
|
||||
"follow-up.ts",
|
||||
);
|
||||
}
|
||||
|
||||
test("keeps a file added from Changes when an earlier send fails", async ({ page }) => {
|
||||
const gate = await gateNextAgentMessage(page);
|
||||
const workspace = await seedMockAgentWorkspace({
|
||||
repoPrefix: "attachment-during-send-",
|
||||
title: "Target chat",
|
||||
featureValues: { mockPromptRejections: 1 },
|
||||
});
|
||||
|
||||
try {
|
||||
await writeFile(path.join(workspace.cwd, "follow-up.ts"), "export const followUp = true;\n");
|
||||
await workspace.client.checkoutRefresh(workspace.cwd);
|
||||
await openAgentRoute(page, workspace);
|
||||
await expectAgentIdle(page);
|
||||
await submitMessage(page, "Send this first.");
|
||||
await gate.waitForRequest();
|
||||
|
||||
await addChangedFileToChat(page);
|
||||
await expectFollowUpAttachment(page);
|
||||
|
||||
gate.accept();
|
||||
await expect(
|
||||
page.getByRole("alert").filter({ hasText: "Requested mock prompt rejection" }),
|
||||
).toBeVisible();
|
||||
await expectFollowUpAttachment(page);
|
||||
await expectComposerDraft(page, "");
|
||||
} finally {
|
||||
await workspace.cleanup();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1219,30 +1219,6 @@ test.describe("Agent message submission", () => {
|
||||
await retryRestoredSubmission(page, prompt);
|
||||
});
|
||||
|
||||
test("keeps a follow-up draft after the earlier send is rejected", async ({ page }, testInfo) => {
|
||||
const gate = await gateNextAgentMessage(page);
|
||||
const agent = await seedMockAgentWorkspace({
|
||||
repoPrefix: `pending-rejection-${testInfo.workerIndex}-`,
|
||||
title: "Pending rejection",
|
||||
model: "ten-second-stream",
|
||||
featureValues: { mockPromptRejections: 1 },
|
||||
});
|
||||
try {
|
||||
await openAgentRoute(page, { workspaceId: agent.workspaceId, agentId: agent.agentId });
|
||||
await expectAgentIdle(page);
|
||||
await submitMessage(page, "Send this first.");
|
||||
await gate.waitForRequest();
|
||||
await fillComposerDraft(page, "Keep this follow-up.");
|
||||
gate.accept();
|
||||
await expect(
|
||||
page.getByRole("alert").filter({ hasText: "Requested mock prompt rejection" }),
|
||||
).toBeVisible();
|
||||
await expectComposerDraft(page, "Keep this follow-up.");
|
||||
} finally {
|
||||
await agent.cleanup();
|
||||
}
|
||||
});
|
||||
|
||||
test("restores an ambiguous Steer failure without retrying or interrupting", async ({
|
||||
page,
|
||||
}, testInfo) => {
|
||||
|
||||
@@ -20,9 +20,7 @@ import {
|
||||
} from "../support/helpers/composer";
|
||||
|
||||
import { openCommandCenter, closeCommandCenter } from "../support/helpers/command-center";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import {
|
||||
PROMPT_PLUGIN_ID,
|
||||
expectPromptsDrawnByPlugin,
|
||||
withPromptTimelinePlugin,
|
||||
} from "../support/helpers/plugin-timeline";
|
||||
@@ -281,7 +279,6 @@ test("finds text in a prompt a timeline plugin draws", async ({ page }, testInfo
|
||||
await agent.client.waitForFinish(agent.agentId, 15_000);
|
||||
await withPromptTimelinePlugin(async () => {
|
||||
await openAgentRoute(page, agent);
|
||||
await approveClientPluginsInUi(page, [PROMPT_PLUGIN_ID]);
|
||||
await expectPromptsDrawnByPlugin(page);
|
||||
await openChatFind(page);
|
||||
await query(page).fill("scope-needle");
|
||||
@@ -609,35 +606,6 @@ async function refocusFindAndReplaceQuery(page: Page, shortcut: string) {
|
||||
await page.keyboard.type("a.b");
|
||||
await expect(query(page)).toHaveValue("a.b");
|
||||
await expectHighlight(page, "a.b");
|
||||
await typeInTheSameTaskAsShortcut(page, shortcut, "x");
|
||||
await page.keyboard.type(".y");
|
||||
await expect(query(page)).toHaveValue("x.y");
|
||||
}
|
||||
|
||||
/**
|
||||
* A fast typist's first key can land before the browser runs any timer queued
|
||||
* by the shortcut. Pressing the shortcut and typing in one task makes that
|
||||
* ordering certain instead of left to CI speed.
|
||||
*/
|
||||
async function typeInTheSameTaskAsShortcut(page: Page, shortcut: string, text: string) {
|
||||
await composerLocator(page).click();
|
||||
await expectComposerFocused(page);
|
||||
await composerLocator(page).evaluate(
|
||||
(element, { metaKey, typed }) => {
|
||||
element.dispatchEvent(
|
||||
new KeyboardEvent("keydown", {
|
||||
key: "f",
|
||||
metaKey,
|
||||
ctrlKey: !metaKey,
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
}),
|
||||
);
|
||||
document.execCommand("insertText", false, typed);
|
||||
},
|
||||
{ metaKey: shortcut.startsWith("Meta"), typed: text },
|
||||
);
|
||||
await expect(query(page)).toBeFocused();
|
||||
}
|
||||
|
||||
async function expectCommandCenterOwnsFindShortcut(page: Page, shortcut: string) {
|
||||
|
||||
@@ -25,9 +25,7 @@ import {
|
||||
expectReadingStreamedMarkdown,
|
||||
} from "../support/helpers/chat-outline";
|
||||
import { createCreationScenario } from "../support/helpers/creation";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import {
|
||||
PROMPT_PLUGIN_ID,
|
||||
attachPromptTimelineEvidence,
|
||||
expectPromptsDrawnByPlugin,
|
||||
expectVirtualizedPluginPromptVisible,
|
||||
@@ -120,7 +118,6 @@ test.describe("desktop chat outline", () => {
|
||||
await withPromptTimelinePlugin(async () => {
|
||||
await page.setViewportSize(WIDE_VIEWPORT);
|
||||
await openAgentTimeline(page, agent);
|
||||
await approveClientPluginsInUi(page, [PROMPT_PLUGIN_ID]);
|
||||
await expectChatOutlinePrompts(page, 80);
|
||||
await expectPromptsDrawnByPlugin(page);
|
||||
await expectTimelinePromptNotMounted(page, agent.prompts[39]);
|
||||
@@ -151,7 +148,6 @@ test.describe("desktop chat outline", () => {
|
||||
const history = await holdOlderHistoryPages(page, agent);
|
||||
await page.setViewportSize(WIDE_VIEWPORT);
|
||||
await openAgentTimeline(page, agent);
|
||||
await approveClientPluginsInUi(page, [PROMPT_PLUGIN_ID]);
|
||||
await expectChatOutlinePrompts(page, 80);
|
||||
await scrollThroughOlderHistoryPages(page, 2, history);
|
||||
await scrollTimelineToNewestLoadedEdge(page);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { expect, test, type Page } from "../support/fixtures";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { withDirectoryPlugin } from "../support/helpers/plugin-timeline";
|
||||
import {
|
||||
attachImageFromMenu,
|
||||
@@ -159,7 +158,6 @@ test.describe("Client slash commands", () => {
|
||||
}`,
|
||||
run: async () => {
|
||||
await withOpenReadyMockAgent(page, { title: "Attached slash command" }, async () => {
|
||||
await approveClientPluginsInUi(page, ["attachment-slash-e2e"]);
|
||||
const input = composerLocator(page);
|
||||
await input.fill("/pict");
|
||||
await expect(
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
attachComposerTestImage,
|
||||
cancelAgent,
|
||||
composerLocator,
|
||||
configureComposerQueueSend,
|
||||
expectAttachmentPill,
|
||||
expectComposerDraft,
|
||||
expectComposerVisible,
|
||||
@@ -103,27 +102,6 @@ test.describe("Composer queue", () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("Send now with the queue send behavior steers instead of interrupting", async ({ page }) => {
|
||||
const prompt = "Fold this into the running turn.";
|
||||
await configureComposerQueueSend(page);
|
||||
const agent = await seedAgentWithOpenTurn({ repoPrefix: "queue-steer-", title: "Queue steer" });
|
||||
try {
|
||||
await openAgentRoute(page, agent);
|
||||
await expectComposerVisible(page);
|
||||
await queueMessage(page, prompt);
|
||||
|
||||
await sendQueuedMessageNow(page, prompt);
|
||||
|
||||
await expectDeliveredOnce(page, prompt);
|
||||
// Steering keeps the open turn, so its plan approval is still waiting. An interrupt
|
||||
// would have replaced the turn and dropped it.
|
||||
const fetched = await agent.client.fetchAgent({ agentId: agent.agentId });
|
||||
expect(fetched?.agent.pendingPermissions).toHaveLength(1);
|
||||
} finally {
|
||||
await agent.cleanup();
|
||||
}
|
||||
});
|
||||
|
||||
test("the host delivers a queued prompt with every client closed", async ({ page }) => {
|
||||
const prompt = "Continue while I am away.";
|
||||
const agent = await seedAgentWithOpenTurn({
|
||||
|
||||
@@ -172,7 +172,7 @@ test("retrying failed agent initialization keeps the plugin metadata set on New
|
||||
startup,
|
||||
composerMetadata,
|
||||
}) => {
|
||||
await creation.openWorkspaceForm("local", { approvePlugins: ["composer-metadata"] });
|
||||
await creation.openWorkspaceForm("local");
|
||||
await composerMetadata.set({ "composer-metadata.tag": "kept" });
|
||||
await creation.submitPrompt("Start the tagged task.", "Create");
|
||||
await creation.expectAgentStillStarting();
|
||||
|
||||
@@ -294,22 +294,6 @@ test("Import Session keeps listings tied to their host during a switch and a pen
|
||||
}
|
||||
});
|
||||
|
||||
test("New workspace imports a session into a new workspace beside the one open at its directory", async ({
|
||||
page,
|
||||
}, testInfo) => {
|
||||
const flow = new ImportSessionFlow(page);
|
||||
await flow.openWorkspace(scenario.project.workspaceId, { width: 1280, height: 844 });
|
||||
|
||||
await flow.openGlobally();
|
||||
await flow.importSession("fixture-root-07");
|
||||
|
||||
await flow.expectImportedIntoNewWorkspace({
|
||||
existingWorkspaceId: scenario.project.workspaceId,
|
||||
userText: "Review fixture item 7",
|
||||
});
|
||||
await page.screenshot({ path: testInfo.outputPath("new-workspace-import.png") });
|
||||
});
|
||||
|
||||
test("captures the compact import-session journey", async ({ page }, testInfo) => {
|
||||
const flow = new ImportSessionFlow(page);
|
||||
await flow.openWorkspace(scenario.project.workspaceId, { width: 390, height: 844 });
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
setNotificationSwitch,
|
||||
setPluginNotificationSwitch,
|
||||
} from "../support/helpers/notification-settings";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { copyPluginExample } from "../support/helpers/plugin-fixture";
|
||||
import { seedWorkspace, type SeedDaemonClient } from "../support/helpers/seed-client";
|
||||
|
||||
@@ -174,7 +173,6 @@ test.describe("Settings → Notifications and OS notification filtering", () =>
|
||||
await seeded.client.patchDaemonConfig({ pluginsEnabled: true });
|
||||
await seeded.client.installDirectoryPlugin(pluginExample.directory);
|
||||
installedPlugin = true;
|
||||
await approveClientPluginsInUi(page, ["notifications-example"]);
|
||||
|
||||
const pluginToggle = page.getByRole("switch", { name: "Build alerts", exact: true });
|
||||
await expect(pluginToggle).toBeVisible();
|
||||
|
||||
@@ -1,279 +0,0 @@
|
||||
import path from "node:path";
|
||||
import { expect, test } from "../support/fixtures";
|
||||
import { gotoAppShell, openSettings } from "../support/helpers/app";
|
||||
import { openHostSection } from "../support/helpers/settings";
|
||||
import { getServerId } from "../support/helpers/server-id";
|
||||
import { waitForSettledPosition } from "../support/helpers/sheet-layout";
|
||||
import { openPluginPage, openPluginPageActions } from "../support/helpers/plugin-gallery";
|
||||
import {
|
||||
allowPluginExecution,
|
||||
cancelPluginExecutionBypassConfirm,
|
||||
confirmPluginExecutionBypass,
|
||||
declinePluginExecution,
|
||||
ensureArtifactsDir,
|
||||
expectExecutedPluginMarkers,
|
||||
expectExecutedPluginMarkersContain,
|
||||
expectPluginApprovalPrompt,
|
||||
expectPluginExecutionBypass,
|
||||
getExecutedPluginMarkers,
|
||||
openPluginExecutionBypassConfirm,
|
||||
pluginApprovalSheet,
|
||||
pluginExecutionBypassConfirmModal,
|
||||
pluginExecutionBypassSwitch,
|
||||
reloadKeepingPersistedState,
|
||||
setPluginExecutionBypass,
|
||||
withInstalledClientPlugins,
|
||||
type ClientProbePluginSpec,
|
||||
} from "../support/helpers/plugin-execution-approval";
|
||||
|
||||
const REPO_ROOT = path.resolve(__dirname, "../../../..");
|
||||
|
||||
const ALPHA: ClientProbePluginSpec = {
|
||||
id: "alpha-probe",
|
||||
name: "Alpha Probe",
|
||||
sidebarTitle: "Alpha Probe",
|
||||
markerKey: "alpha-probe",
|
||||
};
|
||||
|
||||
const BETA: ClientProbePluginSpec = {
|
||||
id: "beta-probe",
|
||||
name: "Beta Probe",
|
||||
sidebarTitle: "Beta Probe",
|
||||
markerKey: "beta-probe",
|
||||
};
|
||||
|
||||
const GAMMA: ClientProbePluginSpec = {
|
||||
id: "gamma-probe",
|
||||
name: "Gamma Probe",
|
||||
sidebarTitle: "Gamma Probe",
|
||||
markerKey: "gamma-probe",
|
||||
};
|
||||
|
||||
test("prompts sequentially before evaluating stacked client plugins, holds layout steady, persists decisions, and lets settings allow or block them", async ({
|
||||
page,
|
||||
}) => {
|
||||
test.setTimeout(120_000);
|
||||
await page.setViewportSize({ width: 1440, height: 900 });
|
||||
const artifacts = await ensureArtifactsDir(REPO_ROOT);
|
||||
|
||||
await withInstalledClientPlugins([ALPHA, BETA, GAMMA], async () => {
|
||||
await gotoAppShell(page);
|
||||
|
||||
await test.step("no client plugin executes before user approval", async () => {
|
||||
await expectPluginApprovalPrompt(page, { pluginId: ALPHA.id, progress: "1 of 3" });
|
||||
expect(await getExecutedPluginMarkers(page)).toEqual([]);
|
||||
await expect(page.getByText(ALPHA.sidebarTitle, { exact: true })).toHaveCount(0);
|
||||
await expect(page.getByText(BETA.sidebarTitle, { exact: true })).toHaveCount(0);
|
||||
await expect(page.getByText(GAMMA.sidebarTitle, { exact: true })).toHaveCount(0);
|
||||
await page.screenshot({ path: path.join(artifacts, "02-after-prompt-1-of-3.png") });
|
||||
});
|
||||
|
||||
await test.step("approving the first advances in place with steady button geometry", async () => {
|
||||
const sheet = pluginApprovalSheet(page);
|
||||
const allowButton = sheet.getByRole("button", { name: "Allow", exact: true });
|
||||
const declineButton = sheet.getByRole("button", { name: "Don't allow", exact: true });
|
||||
const beforeAllow = await allowButton.boundingBox();
|
||||
const beforeDecline = await declineButton.boundingBox();
|
||||
expect(beforeAllow).not.toBeNull();
|
||||
expect(beforeDecline).not.toBeNull();
|
||||
|
||||
await allowPluginExecution(page);
|
||||
await expectPluginApprovalPrompt(page, { pluginId: BETA.id, progress: "2 of 3" });
|
||||
await expectExecutedPluginMarkers(page, [ALPHA.markerKey]);
|
||||
await expect(page.getByText(ALPHA.sidebarTitle, { exact: true })).toBeVisible();
|
||||
await expect(page.getByText(BETA.sidebarTitle, { exact: true })).toHaveCount(0);
|
||||
|
||||
const afterAllow = await allowButton.boundingBox();
|
||||
const afterDecline = await declineButton.boundingBox();
|
||||
expect(afterAllow).toEqual(beforeAllow);
|
||||
expect(afterDecline).toEqual(beforeDecline);
|
||||
await page.screenshot({ path: path.join(artifacts, "03-after-prompt-2-of-3.png") });
|
||||
});
|
||||
|
||||
await test.step("declining the second and approving the third settles cleanly", async () => {
|
||||
await declinePluginExecution(page);
|
||||
await expectPluginApprovalPrompt(page, { pluginId: GAMMA.id, progress: "3 of 3" });
|
||||
expect(await getExecutedPluginMarkers(page)).toEqual([ALPHA.markerKey]);
|
||||
|
||||
await allowPluginExecution(page);
|
||||
await expect(pluginApprovalSheet(page)).toHaveCount(0);
|
||||
await expectExecutedPluginMarkers(page, [ALPHA.markerKey, GAMMA.markerKey]);
|
||||
await expect(page.getByText(ALPHA.sidebarTitle, { exact: true })).toBeVisible();
|
||||
await expect(page.getByText(GAMMA.sidebarTitle, { exact: true })).toBeVisible();
|
||||
await expect(page.getByText(BETA.sidebarTitle, { exact: true })).toHaveCount(0);
|
||||
await page.screenshot({
|
||||
path: path.join(artifacts, "04-after-settled-approved-and-declined.png"),
|
||||
});
|
||||
});
|
||||
|
||||
await test.step("reloading keeps approved plugins active and declined blocked without re-prompting", async () => {
|
||||
await reloadKeepingPersistedState(page);
|
||||
await expect(page.getByText(ALPHA.sidebarTitle, { exact: true })).toBeVisible({
|
||||
timeout: 30_000,
|
||||
});
|
||||
await expect(page.getByText(GAMMA.sidebarTitle, { exact: true })).toBeVisible();
|
||||
await expect(pluginApprovalSheet(page)).toHaveCount(0);
|
||||
expect(await getExecutedPluginMarkers(page)).toEqual([ALPHA.markerKey, GAMMA.markerKey]);
|
||||
await expect(page.getByText(BETA.sidebarTitle, { exact: true })).toHaveCount(0);
|
||||
});
|
||||
|
||||
await test.step("settings surfaces the declined plugin and lets the user allow or block it", async () => {
|
||||
await openSettings(page);
|
||||
await openHostSection(page, getServerId(), "plugins");
|
||||
await expect(page.getByTestId(`plugin-row-${BETA.id}`)).toContainText("blocked");
|
||||
await openPluginPage(page, BETA.name, BETA.id);
|
||||
await expect(page.getByTestId("plugin-client-blocked-alert")).toBeVisible();
|
||||
await page.screenshot({ path: path.join(artifacts, "05-after-settings-blocked-plugin.png") });
|
||||
|
||||
await page.getByTestId("plugin-client-execution-allow").click();
|
||||
await expect(page.getByTestId("plugin-client-blocked-alert")).toHaveCount(0);
|
||||
await expectExecutedPluginMarkersContain(page, BETA.markerKey);
|
||||
|
||||
await openPluginPageActions(page, BETA.name);
|
||||
await page.getByRole("menuitem", { name: "Block on this device", exact: true }).click();
|
||||
await expect(page.getByTestId("plugin-client-blocked-alert")).toBeVisible();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test("presents the queued approval bottom sheet cleanly on compact viewports and closes cleanly on dismiss", async ({
|
||||
page,
|
||||
}) => {
|
||||
test.setTimeout(120_000);
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
const artifacts = await ensureArtifactsDir(REPO_ROOT);
|
||||
|
||||
await withInstalledClientPlugins([ALPHA, BETA], async () => {
|
||||
await gotoAppShell(page);
|
||||
|
||||
await test.step("shows the first prompt in a compact bottom sheet", async () => {
|
||||
await expectPluginApprovalPrompt(page, { pluginId: ALPHA.id, progress: "1 of 2" });
|
||||
await waitForSettledPosition(pluginApprovalSheet(page));
|
||||
expect(await getExecutedPluginMarkers(page)).toEqual([]);
|
||||
await page.screenshot({ path: path.join(artifacts, "06-after-compact-sheet-1-of-2.png") });
|
||||
});
|
||||
|
||||
await test.step("approves the first and dismisses the remaining queue cleanly", async () => {
|
||||
await allowPluginExecution(page);
|
||||
await expectPluginApprovalPrompt(page, { pluginId: BETA.id, progress: "2 of 2" });
|
||||
await expectExecutedPluginMarkers(page, [ALPHA.markerKey]);
|
||||
|
||||
await page.getByRole("button", { name: "Close", exact: true }).click();
|
||||
await expect(pluginApprovalSheet(page)).toHaveCount(0);
|
||||
expect(await getExecutedPluginMarkers(page)).toEqual([ALPHA.markerKey]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test("lets Settings -> General toggle bypass client plugin approval, persists across reload, and restores prompting when turned off", async ({
|
||||
page,
|
||||
}) => {
|
||||
test.setTimeout(120_000);
|
||||
await page.setViewportSize({ width: 1440, height: 900 });
|
||||
const artifacts = await ensureArtifactsDir(REPO_ROOT);
|
||||
|
||||
await withInstalledClientPlugins([ALPHA, BETA], async ({ install }) => {
|
||||
await gotoAppShell(page);
|
||||
|
||||
await test.step("approve one plugin and decline the other before opening Settings -> General", async () => {
|
||||
await expectPluginApprovalPrompt(page, { pluginId: ALPHA.id, progress: "1 of 2" });
|
||||
await allowPluginExecution(page);
|
||||
await expectPluginApprovalPrompt(page, { pluginId: BETA.id, progress: "2 of 2" });
|
||||
await declinePluginExecution(page);
|
||||
await expect(pluginApprovalSheet(page)).toHaveCount(0);
|
||||
await expectExecutedPluginMarkers(page, [ALPHA.markerKey]);
|
||||
});
|
||||
|
||||
await test.step("General settings shows the minimal bypass toggle off by default", async () => {
|
||||
await openSettings(page);
|
||||
const row = page.getByTestId("settings-plugin-execution-bypass-row");
|
||||
await expect(row).toBeVisible();
|
||||
await expect(row).toContainText("Run plugins without asking");
|
||||
await expect(row).not.toContainText("Unsafe");
|
||||
await expect(row).toContainText(
|
||||
"Any connected host can run plugin code inside Paseo and reach your other hosts",
|
||||
);
|
||||
await expectPluginExecutionBypass(page, false);
|
||||
await page.screenshot({
|
||||
path: path.join(artifacts, "settings-general-plugin-bypass-off-desktop.png"),
|
||||
});
|
||||
});
|
||||
|
||||
await test.step("turning bypass on requires confirmation and canceling keeps it off", async () => {
|
||||
await openPluginExecutionBypassConfirm(page);
|
||||
const modal = pluginExecutionBypassConfirmModal(page);
|
||||
await expect(modal).toContainText("Run plugins without asking?");
|
||||
await expect(modal).toContainText(
|
||||
"Any connected host can run plugin code inside Paseo and reach your other connected hosts.",
|
||||
);
|
||||
await expectPluginExecutionBypass(page, false);
|
||||
await expect(modal.getByRole("dialog")).toHaveCSS("opacity", "1");
|
||||
await page.screenshot({
|
||||
path: path.join(artifacts, "settings-general-plugin-bypass-confirm-desktop.png"),
|
||||
});
|
||||
|
||||
await cancelPluginExecutionBypassConfirm(page);
|
||||
expect(await getExecutedPluginMarkers(page)).toEqual([ALPHA.markerKey]);
|
||||
});
|
||||
|
||||
await test.step("confirming turns bypass on and runs declined and newly installed plugins without prompting", async () => {
|
||||
await openPluginExecutionBypassConfirm(page);
|
||||
await confirmPluginExecutionBypass(page);
|
||||
await expectExecutedPluginMarkersContain(page, BETA.markerKey);
|
||||
await expect(pluginApprovalSheet(page)).toHaveCount(0);
|
||||
|
||||
await install(GAMMA);
|
||||
await expectExecutedPluginMarkersContain(page, GAMMA.markerKey);
|
||||
await expect(pluginApprovalSheet(page)).toHaveCount(0);
|
||||
// Let the 180ms switch track animation settle before capturing the ON screenshot.
|
||||
await page.waitForTimeout(300);
|
||||
await page.screenshot({
|
||||
path: path.join(artifacts, "settings-general-plugin-bypass-on-desktop.png"),
|
||||
});
|
||||
});
|
||||
|
||||
await test.step("reloading preserves bypass on and runs all plugins without prompting", async () => {
|
||||
await reloadKeepingPersistedState(page);
|
||||
await expectPluginExecutionBypass(page, true);
|
||||
await expectExecutedPluginMarkersContain(page, ALPHA.markerKey);
|
||||
await expectExecutedPluginMarkersContain(page, BETA.markerKey);
|
||||
await expectExecutedPluginMarkersContain(page, GAMMA.markerKey);
|
||||
await expect(pluginApprovalSheet(page)).toHaveCount(0);
|
||||
});
|
||||
|
||||
await test.step("turning bypass off needs no confirmation, restores prompting for unreviewed plugins, and persists across reload", async () => {
|
||||
await setPluginExecutionBypass(page, false);
|
||||
await expectPluginApprovalPrompt(page, { pluginId: GAMMA.id });
|
||||
await declinePluginExecution(page);
|
||||
await expect(pluginApprovalSheet(page)).toHaveCount(0);
|
||||
|
||||
await reloadKeepingPersistedState(page);
|
||||
await expectPluginExecutionBypass(page, false);
|
||||
await expect(pluginApprovalSheet(page)).toHaveCount(0);
|
||||
await expectExecutedPluginMarkers(page, [ALPHA.markerKey]);
|
||||
});
|
||||
|
||||
await test.step("compact mobile viewport renders the General toggle and confirm sheet cleanly", async () => {
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
const row = page.getByTestId("settings-plugin-execution-bypass-row");
|
||||
const toggle = pluginExecutionBypassSwitch(page);
|
||||
await expect(row).toBeVisible();
|
||||
await expect(toggle).toBeVisible();
|
||||
const rowBox = await row.boundingBox();
|
||||
const toggleBox = await toggle.boundingBox();
|
||||
expect(rowBox).not.toBeNull();
|
||||
expect(toggleBox).not.toBeNull();
|
||||
expect(toggleBox!.x + toggleBox!.width).toBeLessThanOrEqual(390);
|
||||
await page.screenshot({
|
||||
path: path.join(artifacts, "settings-general-plugin-bypass-compact.png"),
|
||||
});
|
||||
|
||||
await openPluginExecutionBypassConfirm(page);
|
||||
await waitForSettledPosition(pluginExecutionBypassConfirmModal(page));
|
||||
await page.screenshot({
|
||||
path: path.join(artifacts, "settings-general-plugin-bypass-confirm-compact.png"),
|
||||
});
|
||||
await cancelPluginExecutionBypassConfirm(page);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -3,7 +3,6 @@ import { readFile, writeFile } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import type { Frame, TestInfo } from "@playwright/test";
|
||||
import { expect, test, type Page } from "../support/fixtures";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { copyPluginExample } from "../support/helpers/plugin-fixture";
|
||||
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
|
||||
import { seedWorkspace } from "../support/helpers/seed-client";
|
||||
@@ -173,7 +172,6 @@ test("directory examples mount the PDF frame and write Markdown through the file
|
||||
await page.setViewportSize(WIDE);
|
||||
const gate = await installDaemonWebSocketGate(page);
|
||||
await gotoWorkspace(page, workspace.workspaceId);
|
||||
await approveClientPluginsInUi(page, ["pdf-panel", "markdown-panel"]);
|
||||
await openFileExplorer(page);
|
||||
await openFile(page, "report.pdf");
|
||||
await expect(page.getByTitle("Document preview", { exact: true })).toHaveAttribute(
|
||||
|
||||
@@ -6,7 +6,6 @@ import { expectFileTabOpen, openFileExplorer } from "../support/helpers/file-exp
|
||||
import {
|
||||
BUILTIN_MARKDOWN_OPTION,
|
||||
MARKDOWN_PANEL_ID,
|
||||
MARKDOWN_PANEL_PLUGIN_ID,
|
||||
PLUGIN_MARKDOWN_OPTION,
|
||||
expectBuiltinMarkdown,
|
||||
expectPluginMarkdown,
|
||||
@@ -15,7 +14,6 @@ import {
|
||||
openMarkdown,
|
||||
storedFilePanelAssociations,
|
||||
} from "../support/helpers/markdown-file-panel-plugin";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
|
||||
async function choosePanel(page: Page, option: string, options: { remember: boolean }) {
|
||||
await page.getByRole("radio", { name: option, exact: true }).click();
|
||||
@@ -112,7 +110,6 @@ test("asks once which panel opens Markdown and remembers it when told to", async
|
||||
try {
|
||||
await page.setViewportSize({ width: 1280, height: 900 });
|
||||
await gotoWorkspace(page, workspace.workspaceId);
|
||||
await approveClientPluginsInUi(page, [MARKDOWN_PANEL_PLUGIN_ID]);
|
||||
await openFileExplorer(page);
|
||||
|
||||
// First open: the built-in renders under the picker.
|
||||
|
||||
@@ -6,7 +6,6 @@ import { gotoWorkspace } from "../support/helpers/launcher";
|
||||
import {
|
||||
BUILTIN_MARKDOWN_OPTION,
|
||||
MARKDOWN_PANEL_ID,
|
||||
MARKDOWN_PANEL_PLUGIN_ID,
|
||||
PLUGIN_MARKDOWN_OPTION,
|
||||
expectPluginMarkdown,
|
||||
filePanelPicker,
|
||||
@@ -14,7 +13,6 @@ import {
|
||||
openMarkdown,
|
||||
storedFilePanelAssociations,
|
||||
} from "../support/helpers/markdown-file-panel-plugin";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { seedWorkspace } from "../support/helpers/seed-client";
|
||||
import { openSettingsSection } from "../support/helpers/settings";
|
||||
|
||||
@@ -61,7 +59,6 @@ test("Settings > Files chooses which panel opens .md and asks again on request",
|
||||
try {
|
||||
await page.setViewportSize({ width: 1280, height: 900 });
|
||||
await gotoWorkspace(page, workspace.workspaceId);
|
||||
await approveClientPluginsInUi(page, [MARKDOWN_PANEL_PLUGIN_ID]);
|
||||
await openFilesSettings(page);
|
||||
|
||||
// Nothing remembered: the row asks every time and has nothing to forget.
|
||||
|
||||
@@ -3,7 +3,6 @@ import { tmpdir } from "node:os";
|
||||
import path from "node:path";
|
||||
import { expect, test, type Page } from "../support/fixtures";
|
||||
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { pluginRequirements } from "../support/helpers/plugin-fixture";
|
||||
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
|
||||
import { seedWorkspace } from "../support/helpers/seed-client";
|
||||
@@ -132,7 +131,6 @@ test("directory plugins render PDF bytes and write Markdown through the file han
|
||||
await page.setViewportSize({ width: 1280, height: 900 });
|
||||
const gate = await installDaemonWebSocketGate(page);
|
||||
await gotoWorkspace(page, workspace.workspaceId);
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
await openFileExplorer(page);
|
||||
await openWorkspaceFile(page, "report.pdf");
|
||||
await expect(page.getByText("PDF plugin: report.pdf", { exact: true })).toBeVisible();
|
||||
|
||||
@@ -9,9 +9,7 @@ import {
|
||||
expectRemovedPlugin,
|
||||
} from "../support/helpers/plugin-reconnect";
|
||||
import { verifyPluginTranslations } from "../support/helpers/plugin-translations";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { copyPluginExample, pluginRequirements } from "../support/helpers/plugin-fixture";
|
||||
import { expectProviderIcon, readIconPaths } from "../support/helpers/plugin-provider-icons";
|
||||
import { 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";
|
||||
@@ -28,7 +26,7 @@ const TINY_PNG = Buffer.from(
|
||||
);
|
||||
|
||||
const PLUGIN_SOURCE = `import { usePaseo } from "@getpaseo/plugin/client";
|
||||
import { Icon, Modal, ProviderIcon, useToast, Markdown } from "@getpaseo/plugin/client/ui";
|
||||
import { Icon, Modal, useToast, Markdown } from "@getpaseo/plugin/client/ui";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import React, { useState } from "react";
|
||||
import { Pressable, Text, View } from "react-native";
|
||||
@@ -55,7 +53,7 @@ function ModalBody({ onSaved }) {
|
||||
</View>;
|
||||
}
|
||||
|
||||
function Surface({ host, theme, playAudio }) {
|
||||
function Surface({ playAudio }) {
|
||||
const [audioStatus, setAudioStatus] = useState("Audio ready");
|
||||
async function play(base64) {
|
||||
setAudioStatus("Playing audio");
|
||||
@@ -64,18 +62,6 @@ function Surface({ host, theme, playAudio }) {
|
||||
}
|
||||
const [open, setOpen] = useState(false);
|
||||
return <View>
|
||||
<View testID="plugin-provider-icon-builtin">
|
||||
<ProviderIcon provider="codex" size={18} color={theme.colors.foreground} />
|
||||
</View>
|
||||
<View testID="plugin-provider-icon-plugin">
|
||||
<ProviderIcon provider="direct-example" hostId={host.id} size={18} color={theme.colors.foreground} />
|
||||
</View>
|
||||
<View testID="plugin-provider-icon-fallback">
|
||||
<ProviderIcon provider="unknown-provider-e2e" size={18} color={theme.colors.foreground} />
|
||||
</View>
|
||||
<View testID="plugin-provider-icon-bot-ref">
|
||||
<Icon name="Bot" size={18} color={theme.colors.foreground} />
|
||||
</View>
|
||||
<Text>{audioStatus}</Text>
|
||||
<Markdown>{"\\n\\n"}</Markdown>
|
||||
<Pressable accessibilityRole="button" onPress={() => play(AUDIO_BASE64)}><Text>Play plugin audio</Text></Pressable>
|
||||
@@ -100,7 +86,7 @@ function Surface({ host, theme, playAudio }) {
|
||||
}
|
||||
|
||||
export default function contribute(plugin) {
|
||||
plugin.addSurface("main", (props) => <Surface {...props} playAudio={plugin.playAudio} />);
|
||||
plugin.addSurface("main", () => <Surface playAudio={plugin.playAudio} />);
|
||||
plugin.addSidebarItem({
|
||||
id: "main",
|
||||
title: "Host UI",
|
||||
@@ -112,7 +98,6 @@ export default function contribute(plugin) {
|
||||
|
||||
async function openHostUiPlugin(page: Page): Promise<void> {
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID, "provider-direct-example"]);
|
||||
await page.getByRole("button", { name: "Host UI", exact: true }).click();
|
||||
}
|
||||
|
||||
@@ -181,9 +166,8 @@ async function savePluginIssue(page: Page): Promise<void> {
|
||||
await expect(page.getByText("Plugin modal contexts ready", { exact: true })).not.toBeVisible();
|
||||
}
|
||||
|
||||
test("plugin host UI renders provider icons and preserves modal contexts", async ({ page }) => {
|
||||
test("plugin modal adapts its presentation and preserves host contexts", async ({ page }) => {
|
||||
const directory = await mkdtemp(path.join(tmpdir(), "paseo-plugin-host-ui-e2e-"));
|
||||
const providerPlugin = await copyPluginExample("provider-direct");
|
||||
const client = await connectNewWorkspaceDaemonClient({ ownProjects: false });
|
||||
const previousConfig = await client.getDaemonConfig();
|
||||
await writeFile(
|
||||
@@ -203,29 +187,10 @@ test("plugin host UI renders provider icons and preserves modal contexts", async
|
||||
|
||||
try {
|
||||
await client.patchDaemonConfig({ pluginsEnabled: true });
|
||||
await client.installDirectoryPlugin(providerPlugin.directory);
|
||||
await client.installDirectoryPlugin(directory);
|
||||
await useNonCompactLayout(page);
|
||||
await openHostUiPlugin(page);
|
||||
|
||||
await test.step("ProviderIcon renders built-in, daemon plugin SVG, and fallback icons", async () => {
|
||||
const providerIconPaths = await readIconPaths(page, providerPlugin.directory);
|
||||
await expectProviderIcon(page.getByTestId("plugin-provider-icon-plugin"), providerIconPaths);
|
||||
|
||||
const builtinSvg = page.getByTestId("plugin-provider-icon-builtin").locator("svg");
|
||||
const fallbackSvg = page.getByTestId("plugin-provider-icon-fallback").locator("svg");
|
||||
const botRefSvg = page.getByTestId("plugin-provider-icon-bot-ref").locator("svg");
|
||||
await expect(builtinSvg).toBeVisible();
|
||||
await expect(fallbackSvg).toBeVisible();
|
||||
await expect(botRefSvg).toBeVisible();
|
||||
|
||||
const fallbackMarkup = await fallbackSvg.innerHTML();
|
||||
const botRefMarkup = await botRefSvg.innerHTML();
|
||||
const builtinMarkup = await builtinSvg.innerHTML();
|
||||
expect(fallbackMarkup).toBe(botRefMarkup);
|
||||
expect(builtinMarkup).not.toBe(botRefMarkup);
|
||||
});
|
||||
|
||||
await test.step("plugin screen Markdown renders local absolute and file:// PNG images inline", async () => {
|
||||
await expectLoadedMarkdownImage(page, "Before");
|
||||
await expectLoadedMarkdownImage(page, "After");
|
||||
@@ -252,13 +217,11 @@ test("plugin host UI renders provider icons and preserves modal contexts", async
|
||||
});
|
||||
} finally {
|
||||
await client.removePlugin(PLUGIN_ID).catch(() => undefined);
|
||||
await client.removePlugin("provider-direct-example").catch(() => undefined);
|
||||
await client
|
||||
.patchDaemonConfig({ pluginsEnabled: previousConfig.config.pluginsEnabled ?? false })
|
||||
.catch(() => undefined);
|
||||
await client.close().catch(() => undefined);
|
||||
await rm(directory, { recursive: true, force: true });
|
||||
await providerPlugin.cleanup();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import { expect, test, type Page } from "../support/fixtures";
|
||||
import { openCommandCenter } from "../support/helpers/command-center";
|
||||
import { gotoAppShell } from "../support/helpers/app";
|
||||
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { pluginRequirements } from "../support/helpers/plugin-fixture";
|
||||
import { seedWorkspace } from "../support/helpers/seed-client";
|
||||
import { getServerId } from "../support/helpers/server-id";
|
||||
@@ -88,7 +87,6 @@ test.describe("plugin icons", () => {
|
||||
await client.installDirectoryPlugin(directory);
|
||||
await page.setViewportSize({ width: 1280, height: 800 });
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
const target = { serverId: getServerId(), workspaceId: workspace.workspaceId };
|
||||
await waitForWorkspaceInSidebar(page, target);
|
||||
await switchWorkspaceViaSidebar({ page, ...target });
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { existsSync } from "node:fs";
|
||||
import overviewCorpus from "../../../protocol/tests/fixtures/plugin-overview.json";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { pluginRequirements } from "../support/helpers/plugin-fixture";
|
||||
import { execFileSync } from "node:child_process";
|
||||
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
||||
@@ -501,7 +500,6 @@ async function installLocalPluginWithStatusExamples(
|
||||
|
||||
const catalog = observePluginCatalog(page);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["failed-preview-plugin"]);
|
||||
await openPluginSettings(page);
|
||||
await catalog.waitForInitialFetch();
|
||||
await expectPluginFailed(page, "failed-preview-plugin");
|
||||
@@ -516,7 +514,6 @@ async function installLocalPluginWithStatusExamples(
|
||||
await openSourceInstall(page);
|
||||
await expectPluginSourceDocsOpen(page);
|
||||
await submitSourceInstall(page, directory);
|
||||
await approveClientPluginsInUi(page, ["e2e-plugin"]);
|
||||
await expectSourceInstalled(page, "e2e-plugin");
|
||||
await expectPluginOn(page, "e2e-plugin");
|
||||
await expectPluginHealthy(page, "e2e-plugin");
|
||||
@@ -608,7 +605,6 @@ async function toggleRemoveAndReinstallLocalPlugin(page: Page, directory: string
|
||||
await expectPluginRemoved(page, "e2e-plugin");
|
||||
|
||||
await installFromSource(page, directory, "e2e-plugin");
|
||||
await approveClientPluginsInUi(page, ["e2e-plugin"]);
|
||||
await expectPluginOn(page, "e2e-plugin");
|
||||
await gotoAppShell(page);
|
||||
await openContribution(page, "Plugin v3", "Plugin v3 cleanup 7");
|
||||
@@ -663,10 +659,6 @@ async function retryGitInstallAndInspectRows(
|
||||
await capturePluginInstallForm(page, testInfo, "compact-error");
|
||||
|
||||
await submitSourceInstall(page, pathToFileURL(repository).href);
|
||||
await approveClientPluginsInUi(page, [
|
||||
"compact-plugin-with-a-realistically-long-name",
|
||||
"git-e2e-plugin",
|
||||
]);
|
||||
await expectSourceInstalled(page, "git-e2e-plugin");
|
||||
await expectPluginsOn(page);
|
||||
await expectPluginOn(page, "git-e2e-plugin");
|
||||
@@ -732,7 +724,6 @@ async function prepareLegacyPluginHost(
|
||||
pluginGitManagement: true,
|
||||
});
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["legacy-source-plugin"]);
|
||||
await openPluginSettings(page);
|
||||
|
||||
return directory;
|
||||
@@ -915,7 +906,6 @@ test("keeps Reload pending past a minute while the plugin queue is busy", async
|
||||
// Plugins on is a precondition here, not the subject: set it through the daemon.
|
||||
await client.patchDaemonConfig({ pluginsEnabled: true });
|
||||
await client.installPluginSource({ source: pluginDirectory });
|
||||
await approveClientPluginsInUi(page, ["e2e-plugin"]);
|
||||
// Installed before Plugins opens, so it opens on the Installed tab.
|
||||
await openPluginSettings(page);
|
||||
await expectPluginOn(page, "e2e-plugin");
|
||||
@@ -938,7 +928,6 @@ test("keeps Reload pending past a minute while the plugin queue is busy", async
|
||||
await capturePluginSurface(page, testInfo, "plugin-reload-past-deadline.png");
|
||||
|
||||
await queue.release();
|
||||
await approveClientPluginsInUi(page, ["gated-build-plugin"]);
|
||||
// The daemon's answer only arrives once the plugin really started again.
|
||||
await reload.waitForResponse();
|
||||
expect(reload.requestCount()).toBe(1);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { copyPluginExample } from "../support/helpers/plugin-fixture";
|
||||
import { expect, test as base, type Page } from "../support/fixtures";
|
||||
import { gotoAppShell } from "../support/helpers/app";
|
||||
@@ -120,7 +119,6 @@ const test = base.extend<{ modalExample: Page }>({
|
||||
async function openWideExamples(page: Page) {
|
||||
await page.setViewportSize({ width: 1100, height: 800 });
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["modal-ui-example"]);
|
||||
await page.getByRole("button", { name: "Modal examples", exact: true }).click();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { expect, test, type Page } from "../support/fixtures";
|
||||
import { composerLocator, submitMessageWithButton } from "../support/helpers/composer";
|
||||
import { seedMockAgentWorkspace, openAgentRoute } from "../support/helpers/mock-agent";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { POPOVER_PLUGIN_ID, withPopoverTimelinePlugin } from "../support/helpers/plugin-timeline";
|
||||
import { withPopoverTimelinePlugin } from "../support/helpers/plugin-timeline";
|
||||
|
||||
async function openPreviewWhileTyping(page: Page): Promise<void> {
|
||||
await composerLocator(page).focus();
|
||||
@@ -26,7 +25,6 @@ test("Escape dismisses a plugin preview before interrupting the agent", async ({
|
||||
try {
|
||||
await withPopoverTimelinePlugin(async () => {
|
||||
await openAgentRoute(page, agent);
|
||||
await approveClientPluginsInUi(page, [POPOVER_PLUGIN_ID]);
|
||||
await submitMessageWithButton(page, "Show the plugin preview.");
|
||||
await agent.client.waitForFinish(agent.agentId, 30_000);
|
||||
await expect(page.getByRole("button", { name: "Hover plugin preview" })).toBeVisible();
|
||||
|
||||
@@ -12,7 +12,7 @@ test("shows which runtime is incompatible and recovers after the requirement is
|
||||
}) => {
|
||||
await openRequirementHost(page, requirementHost);
|
||||
await expectAppMismatch(page);
|
||||
await correctRequirementAndReload(page, requirementHost.directory, { approvePrompt: true });
|
||||
await correctRequirementAndReload(page, requirementHost.directory);
|
||||
await rejectDaemonMismatch(page, requirementHost.directory);
|
||||
await correctRequirementAndReload(page, requirementHost.directory);
|
||||
});
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
LEGACY_PLUGIN_ID,
|
||||
SHOWCASE_PLUGIN_ID,
|
||||
WIDE,
|
||||
approveSidebarPluginsInUi,
|
||||
closeScreen,
|
||||
expectRowActive,
|
||||
footerItem,
|
||||
@@ -183,7 +182,6 @@ test.describe("Plugin sidebar items", () => {
|
||||
}) => {
|
||||
await page.setViewportSize({ width: 390, height: 600 });
|
||||
await gotoAppShell(page);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
await page.getByRole("button", { name: "Open menu", exact: true }).first().click();
|
||||
await expect(botRow(page, "status")).toBeAttached();
|
||||
const workspace = visibleTestId(page, `sidebar-workspace-row-${getServerId()}:${workspaceId}`);
|
||||
@@ -215,7 +213,6 @@ test.describe("Plugin sidebar items", () => {
|
||||
}) => {
|
||||
await page.setViewportSize({ width: 1280, height: 480 });
|
||||
await gotoAppShell(page);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
await expect(botRow(page, "status")).toBeAttached();
|
||||
const workspace = visibleTestId(page, `sidebar-workspace-row-${getServerId()}:${workspaceId}`);
|
||||
await expect(workspace).toBeInViewport({ ratio: 1 });
|
||||
@@ -243,7 +240,6 @@ test.describe("Plugin sidebar items", () => {
|
||||
test("a restored plugin screen waits for its catalog before rendering", async ({ page }) => {
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoWorkspace(page, workspaceId);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
const row = headerRow(page, SHOWCASE_PLUGIN_ID, "deploys");
|
||||
await expect(row).toBeVisible({ timeout: 30_000 });
|
||||
await row.click();
|
||||
@@ -282,7 +278,6 @@ test.describe("Plugin sidebar items", () => {
|
||||
await seedSidebarFooterPreferences(page, [{ key: "usage", visible: true }]);
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoWorkspace(page, workspaceId);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
const row = headerRow(page, SHOWCASE_PLUGIN_ID, "deploys");
|
||||
const sync = footerItem(page, SHOWCASE_PLUGIN_ID, "sync");
|
||||
await expect(row).toBeVisible({ timeout: 30_000 });
|
||||
@@ -370,7 +365,6 @@ test.describe("Plugin sidebar items", () => {
|
||||
test("a plugin screen reads workspaces through the state hooks", async ({ page }) => {
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoWorkspace(page, workspaceId);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
await expect(headerRow(page, SHOWCASE_PLUGIN_ID, "deploys")).toBeVisible({ timeout: 30_000 });
|
||||
await runCommand(page, "Open plugin workspaces");
|
||||
await expect(screenTitle(page)).toHaveText("Workspaces");
|
||||
@@ -381,7 +375,6 @@ test.describe("Plugin sidebar items", () => {
|
||||
test("a plugin screen keeps the sidebar toggle before its title", async ({ page }) => {
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoWorkspace(page, workspaceId);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
await expect(headerRow(page, SHOWCASE_PLUGIN_ID, "deploys")).toBeVisible({ timeout: 30_000 });
|
||||
await runCommand(page, "Open plugin workspaces");
|
||||
await expect(screenTitle(page)).toHaveText("Workspaces");
|
||||
@@ -401,7 +394,6 @@ test.describe("Plugin sidebar items", () => {
|
||||
test("a header row's shortcut hint presses the row", async ({ page }) => {
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoWorkspace(page, workspaceId);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
const newWorkspace = visibleTestId(page, "sidebar-global-new-workspace");
|
||||
await expect(newWorkspace).toBeVisible({ timeout: 30_000 });
|
||||
await newWorkspace.hover();
|
||||
@@ -427,7 +419,6 @@ test.describe("Plugin sidebar items", () => {
|
||||
);
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoWorkspace(page, workspaceId);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
const entry = headerRow(page, LEGACY_PLUGIN_ID, "entry");
|
||||
await expect(entry).toBeVisible({ timeout: 30_000 });
|
||||
let entryIcon = "";
|
||||
@@ -512,7 +503,6 @@ test.describe("Plugin sidebar items", () => {
|
||||
test.setTimeout(180_000);
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoWorkspace(page, workspaceId);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
const bot1 = botRow(page, "bot-1");
|
||||
const bot2 = botRow(page, "bot-2");
|
||||
const status = botRow(page, "status");
|
||||
@@ -597,7 +587,6 @@ test.describe("Plugin sidebar items", () => {
|
||||
test.setTimeout(120_000);
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoWorkspace(page, workspaceId);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
await expect(botRow(page, "bot-1")).toBeVisible({ timeout: 30_000 });
|
||||
const alerts = footerItem(page, BOTS_PLUGIN_ID, "alerts");
|
||||
await expect(alerts).toHaveCount(0);
|
||||
@@ -617,7 +606,6 @@ test.describe("Plugin sidebar items", () => {
|
||||
const alerts = footerItem(page, BOTS_PLUGIN_ID, "alerts");
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoWorkspace(page, workspaceId);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
await expect(botRow(page, "bot-1")).toBeVisible({ timeout: 30_000 });
|
||||
|
||||
await runCommand(page, "Add bot alerts");
|
||||
|
||||
@@ -4,7 +4,6 @@ import { expect, test, type Page } from "../support/fixtures";
|
||||
import { gotoAppShell } from "../support/helpers/app";
|
||||
import { openCommandCenter } from "../support/helpers/command-center";
|
||||
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { copyPluginExample } from "../support/helpers/plugin-fixture";
|
||||
import { seedWorkspace, type SeededWorkspace } from "../support/helpers/seed-client";
|
||||
import { getServerId } from "../support/helpers/server-id";
|
||||
@@ -35,7 +34,6 @@ async function withExample(
|
||||
await client.installDirectoryPlugin(copy.directory);
|
||||
await page.setViewportSize({ width: 1280, height: 800 });
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [example.id]);
|
||||
const target = { serverId: getServerId(), workspaceId: workspace.workspaceId };
|
||||
await waitForWorkspaceInSidebar(page, target);
|
||||
await switchWorkspaceViaSidebar({ page, ...target });
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { pluginRequirements } from "../support/helpers/plugin-fixture";
|
||||
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
@@ -64,11 +63,8 @@ const MOCHA_MUTED_FOREGROUND = "rgb(166, 173, 200)";
|
||||
const LATTE_MUTED_FOREGROUND = "rgb(108, 111, 133)";
|
||||
const LATTE_RING = "rgb(156, 160, 176)";
|
||||
|
||||
async function selectTheme(page: Page, name: string, approvePluginId?: string) {
|
||||
async function selectTheme(page: Page, name: string) {
|
||||
await page.goto("/settings");
|
||||
if (approvePluginId) {
|
||||
await approveClientPluginsInUi(page, [approvePluginId]);
|
||||
}
|
||||
await openSettingsSection(page, "appearance");
|
||||
const theme = page.getByRole("radio", { name, exact: true });
|
||||
await expect(theme).toBeVisible({ timeout: 30_000 });
|
||||
@@ -112,7 +108,7 @@ test("keeps plugin workspace timestamps readable on state surfaces and honors ov
|
||||
try {
|
||||
await client.patchDaemonConfig({ pluginsEnabled: true });
|
||||
await client.installDirectoryPlugin(directory);
|
||||
await selectTheme(page, "Solarized Dark", PLUGIN_ID);
|
||||
await selectTheme(page, "Solarized Dark");
|
||||
await openAgentRoute(page, selected);
|
||||
const selectedRow = page.getByTestId(
|
||||
`sidebar-workspace-row-${getServerId()}:${selected.workspaceId}`,
|
||||
@@ -164,7 +160,6 @@ test("applies a contributed theme and falls back when its plugin is gone", async
|
||||
await client.patchDaemonConfig({ pluginsEnabled: true });
|
||||
await client.installDirectoryPlugin(directory);
|
||||
await page.goto("/settings");
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
await expect(page.getByTestId("settings-sidebar")).toBeVisible();
|
||||
await openSettingsSection(page, "appearance");
|
||||
|
||||
@@ -268,7 +263,6 @@ test("reaches the last theme when a plugin contributes more themes than fit", as
|
||||
await client.installDirectoryPlugin(directory);
|
||||
await page.setViewportSize({ width: 1280, height: 720 });
|
||||
await page.goto("/settings");
|
||||
await approveClientPluginsInUi(page, [MANY_THEMES_PLUGIN_ID]);
|
||||
await expect(page.getByTestId("settings-sidebar")).toBeVisible();
|
||||
await openSettingsSection(page, "appearance");
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import { submitMessageWithButton } from "../support/helpers/composer";
|
||||
import { openFileExplorer, openFileFromExplorer } from "../support/helpers/file-explorer";
|
||||
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
|
||||
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { copyPluginExample } from "../support/helpers/plugin-fixture";
|
||||
import { runCommand } from "../support/helpers/plugin-sidebar-items";
|
||||
import {
|
||||
@@ -215,7 +214,6 @@ test("the workspace layout example arranges a wide workspace", async ({ page })
|
||||
await withLayoutExample(undefined, async ({ agentId, workspaceId }) => {
|
||||
await page.setViewportSize(WIDE);
|
||||
await openAgentRoute(page, { workspaceId, agentId });
|
||||
await approveClientPluginsInUi(page, ["workspace-layout"]);
|
||||
|
||||
await test.step("/aside opens the child agent's chat in the Explorer", async () => {
|
||||
await sendToMainChat(page, "/aside hey");
|
||||
@@ -266,7 +264,6 @@ test("the workspace layout example opens over a phone's chat", async ({ page })
|
||||
await withLayoutExample(promptMentioning(FILE_LINK), async ({ agentId, workspaceId }) => {
|
||||
await page.setViewportSize(COMPACT);
|
||||
await openAgentRoute(page, { workspaceId, agentId });
|
||||
await approveClientPluginsInUi(page, ["workspace-layout"]);
|
||||
|
||||
await test.step("/aside opens the Explorer over the chat", async () => {
|
||||
await submitMessageWithButton(page, "/aside hey");
|
||||
@@ -305,7 +302,6 @@ test("a file a plugin opens in another workspace waits there on a phone", async
|
||||
await page.setViewportSize(COMPACT);
|
||||
// Visiting the first workspace leaves its screen mounted behind the second.
|
||||
await openAgentRoute(page, first);
|
||||
await approveClientPluginsInUi(page, ["workspace-layout"]);
|
||||
await expect(composerIn(page.locator("body"))).toBeEditable({ timeout: 30_000 });
|
||||
await switchToWorkspace(page, second.workspaceId);
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { pluginRequirements } from "../support/helpers/plugin-fixture";
|
||||
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
@@ -298,7 +297,6 @@ test.describe("plugin workspace panels and Command Center", () => {
|
||||
await primaryClient.installDirectoryPlugin(directory);
|
||||
await page.setViewportSize(WIDE_VIEWPORT);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
await addConnectedHostAndReload(page, {
|
||||
serverId: secondaryDaemon.serverId,
|
||||
label: "Secondary plugin host",
|
||||
|
||||
@@ -5,7 +5,6 @@ import type { Page } from "@playwright/test";
|
||||
import { expect, test } from "../support/fixtures";
|
||||
import { gotoAppShell } from "../support/helpers/app";
|
||||
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { pluginRequirements } from "../support/helpers/plugin-fixture";
|
||||
import { seedWorkspace } from "../support/helpers/seed-client";
|
||||
import {
|
||||
@@ -96,7 +95,6 @@ test("a plugin badge shows on workspace rows, hides quietly, and follows its Sho
|
||||
|
||||
await page.setViewportSize({ width: 1280, height: 900 });
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
|
||||
await test.step("the badge draws on the row; a null item and a throwing item draw nothing", async () => {
|
||||
await expect(badge(page, "review")).toBeVisible();
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
openSettingsHost,
|
||||
openSettingsHostSection,
|
||||
} from "../support/helpers/settings";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { copyPluginExample } from "../support/helpers/plugin-fixture";
|
||||
|
||||
const CUSTOM_PROVIDER = {
|
||||
@@ -203,7 +202,6 @@ test.describe("provider removal", () => {
|
||||
await client.installDirectoryPlugin(plugin.directory);
|
||||
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [PLUGIN_PROVIDER.pluginId]);
|
||||
await openSettings(page);
|
||||
await openSettingsHost(page, getServerId());
|
||||
await openSettingsHostSection(page, getServerId(), "providers");
|
||||
|
||||
@@ -19,7 +19,6 @@ import {
|
||||
} from "../support/helpers/composer";
|
||||
import { connectDaemonClient } from "../support/helpers/daemon-client-loader";
|
||||
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { copyPluginExample } from "../support/helpers/plugin-fixture";
|
||||
import { userScrollsTimelineToHistoryStart } from "../support/helpers/timeline-pagination";
|
||||
|
||||
@@ -267,7 +266,6 @@ test.describe.serial("Provider switching in chat", () => {
|
||||
|
||||
try {
|
||||
await openAgentRoute(page, workspace);
|
||||
await approveClientPluginsInUi(page, [DIRECT_PROVIDER.pluginId]);
|
||||
await expectComposerVisible(page);
|
||||
await expectComposerMode(page, "Load test");
|
||||
|
||||
@@ -463,7 +461,6 @@ test.describe.serial("Provider switching in chat", () => {
|
||||
|
||||
try {
|
||||
await openAgentRoute(page, workspace);
|
||||
await approveClientPluginsInUi(page, [DIRECT_PROVIDER.pluginId]);
|
||||
await expectComposerVisible(page);
|
||||
|
||||
await submitMessage(page, runningPrompt);
|
||||
@@ -516,7 +513,6 @@ test.describe.serial("Provider switching in chat", () => {
|
||||
|
||||
try {
|
||||
await openAgentRoute(page, workspace);
|
||||
await approveClientPluginsInUi(page, [DIRECT_PROVIDER.pluginId]);
|
||||
await expectComposerVisible(page);
|
||||
await submitMessage(page, "Run a one-minute mock turn first.");
|
||||
await expectAgentReadyToInterrupt(page);
|
||||
@@ -571,7 +567,6 @@ test.describe.serial("Provider switching in chat", () => {
|
||||
|
||||
try {
|
||||
await openAgentRoute(page, workspace);
|
||||
await approveClientPluginsInUi(page, [DIRECT_PROVIDER.pluginId]);
|
||||
await expectComposerVisible(page);
|
||||
|
||||
await submitMessageWithButton(page, preSwitchPrompt);
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
test("a refresh clears a failed update from the provider's page and its row", async ({
|
||||
providerUpdateFailure: { page, otherClient },
|
||||
}) => {
|
||||
await openProviderInstallation(page, { approvePlugin: true });
|
||||
await openProviderInstallation(page);
|
||||
|
||||
await test.step("Refresh on the page clears the failure", async () => {
|
||||
await runFailingUpdate(page);
|
||||
|
||||
@@ -9,11 +9,7 @@ import {
|
||||
expectCompactSidebarOpen,
|
||||
} from "../support/helpers/usage-sidebar-item";
|
||||
import { gotoAppShell } from "../support/helpers/app";
|
||||
import {
|
||||
SHOWCASE_PLUGIN_ID,
|
||||
approveSidebarPluginsInUi,
|
||||
installSidebarPlugins,
|
||||
} from "../support/helpers/plugin-sidebar-items";
|
||||
import { SHOWCASE_PLUGIN_ID, installSidebarPlugins } from "../support/helpers/plugin-sidebar-items";
|
||||
import {
|
||||
expectFooterIconRow,
|
||||
expectFooterSeparator,
|
||||
@@ -231,7 +227,6 @@ test.describe("Sidebar footer rows in Appearance settings", () => {
|
||||
{ key: "import", visible: false },
|
||||
]);
|
||||
await gotoAppShell(page);
|
||||
await approveSidebarPluginsInUi(page);
|
||||
|
||||
await test.step("the Footer card lists only the footer rows", async () => {
|
||||
await openSidebarNavSettings(page);
|
||||
|
||||
@@ -18,8 +18,7 @@ function finish() {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Raw mode before the query: a reply that arrives while the tty still echoes
|
||||
// would be printed on the capture line as a second "]11;rgb:".
|
||||
process.stdout.write("\\x1b]11;?\\x07");
|
||||
if (process.stdin.isTTY) {
|
||||
process.stdin.setRawMode(true);
|
||||
}
|
||||
@@ -27,7 +26,6 @@ process.stdin.resume();
|
||||
process.stdin.on("data", (chunk) => {
|
||||
captured = Buffer.concat([captured, chunk]);
|
||||
});
|
||||
process.stdout.write("\\x1b]11;?\\x07");
|
||||
setTimeout(finish, 700);
|
||||
`;
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import { getActiveTabTestId } from "../support/helpers/launcher";
|
||||
import type { Page, Locator } from "@playwright/test";
|
||||
import { test, expect } from "../support/fixtures";
|
||||
import { expectComposerVisible } from "../support/helpers/composer";
|
||||
import { approveClientPluginsInUi } from "../support/helpers/plugin-execution-approval";
|
||||
import { withDirectoryPlugin } from "../support/helpers/plugin-timeline";
|
||||
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
|
||||
import { getE2EDaemonPort } from "../support/helpers/daemon-port";
|
||||
@@ -189,7 +188,6 @@ export default function contribute(client) {
|
||||
run: async () => {
|
||||
await page.setViewportSize({ width: 1280, height: 1000 });
|
||||
await openAgentRoute(page, agent);
|
||||
await approveClientPluginsInUi(page, ["reply-fold-e2e"]);
|
||||
await expectComposerVisible(page);
|
||||
for (const width of [1280, 390]) {
|
||||
await page.setViewportSize({ width, height: 1000 });
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import type { Locator, Page } from "@playwright/test";
|
||||
import { expect, test } from "../support/fixtures";
|
||||
import {
|
||||
clickNewTerminal,
|
||||
gotoWorkspace,
|
||||
openNewTabMenuWithShortcut,
|
||||
} from "../support/helpers/launcher";
|
||||
import { clickNewTerminal, gotoWorkspace } from "../support/helpers/launcher";
|
||||
import { seedWorkspace } from "../support/helpers/seed-client";
|
||||
import { waitForWorkspaceTabsVisible } from "../support/helpers/workspace-tabs";
|
||||
|
||||
@@ -35,44 +30,3 @@ test("web switches to the previous and next tab with Alt+Shift+[ and ]", async (
|
||||
await workspace.cleanup();
|
||||
}
|
||||
});
|
||||
|
||||
async function openBlankTabAfterTerminal(page: Page) {
|
||||
await clickNewTerminal(page);
|
||||
await page.getByRole("button", { name: "Terminal 1", exact: true }).focus();
|
||||
await openNewTabMenuWithShortcut(page);
|
||||
return page
|
||||
.getByRole("button", { name: "New tab", exact: true })
|
||||
.and(page.locator('[aria-selected="true"]'));
|
||||
}
|
||||
|
||||
async function middleClickWithoutDefaultMouseUp(tab: Locator) {
|
||||
const release = await tab.evaluateHandle((element) => {
|
||||
const result = { event: null as Event | null };
|
||||
element.addEventListener(
|
||||
"mouseup",
|
||||
(event) => {
|
||||
result.event = event;
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
return result;
|
||||
});
|
||||
await tab.click({ button: "middle" });
|
||||
await expect(tab).toHaveCount(0);
|
||||
// Chromium uses the mouseup default action to paste the X11 selection.
|
||||
expect(await release.evaluate(({ event }) => event?.defaultPrevented)).toBe(true);
|
||||
}
|
||||
|
||||
test("middle-clicking a tab cancels the mouse release before returning to a terminal", async ({
|
||||
page,
|
||||
withWorkspace,
|
||||
}) => {
|
||||
const workspace = await withWorkspace({ prefix: "tab-middle-click-" });
|
||||
await workspace.navigateTo();
|
||||
const tab = await openBlankTabAfterTerminal(page);
|
||||
|
||||
await test.step("close the blank tab without the browser's default middle-button action", async () => {
|
||||
await middleClickWithoutDefaultMouseUp(tab);
|
||||
await expect(page.getByRole("textbox", { name: "Terminal input" })).toBeFocused();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,7 +6,6 @@ import appPackage from "../../../package.json";
|
||||
import { expect, test as base, type Page } from "../fixtures";
|
||||
import { gotoAppShell } from "./app";
|
||||
import { addConnectedHostAndReload } from "./hosts";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { pluginRequirements } from "./plugin-fixture";
|
||||
|
||||
const pluginId = "builtin-settings";
|
||||
@@ -70,7 +69,6 @@ export async function openBuiltinPluginSettings(
|
||||
label: "Built-in settings host",
|
||||
destination: `/settings/hosts/${host.serverId}/plugins/${pluginId}/${screenId}`,
|
||||
});
|
||||
await approveClientPluginsInUi(page, [pluginId]);
|
||||
}
|
||||
|
||||
export async function expectBuiltinPluginSettings(page: Page) {
|
||||
|
||||
@@ -2,7 +2,6 @@ import type { WorkspaceCreateRequest } from "@getpaseo/protocol/messages";
|
||||
import { expect, type Page } from "@playwright/test";
|
||||
import { daemonWsRoutePattern } from "./daemon-port";
|
||||
import { gotoAppShell } from "./app";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { gotoWorkspace } from "./launcher";
|
||||
import { fillComposerDraft } from "./composer";
|
||||
import { createAgentTabFromMenu } from "./workspace-tabs";
|
||||
@@ -147,14 +146,8 @@ export async function createCreationScenario(page: Page) {
|
||||
const evictionWorkspaceIds = new Set<string>();
|
||||
return {
|
||||
cleanup: project.cleanup,
|
||||
async openWorkspaceForm(
|
||||
isolation: "local" | "worktree",
|
||||
options?: { approvePlugins?: readonly string[] },
|
||||
) {
|
||||
async openWorkspaceForm(isolation: "local" | "worktree") {
|
||||
await gotoAppShell(page);
|
||||
if (options?.approvePlugins?.length) {
|
||||
await approveClientPluginsInUi(page, options.approvePlugins);
|
||||
}
|
||||
await waitForSidebarHydration(page);
|
||||
await openNewWorkspaceComposer(page, project);
|
||||
await selectWorkspaceIsolation(page, isolation);
|
||||
|
||||
@@ -5,7 +5,6 @@ import { expect, type Page, type TestInfo } from "@playwright/test";
|
||||
import { gotoWorkspace } from "./launcher";
|
||||
import { buildAgentRoute } from "./mock-agent";
|
||||
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { pluginRequirements } from "./plugin-fixture";
|
||||
import { seedWorkspace } from "./seed-client";
|
||||
import { ensureExplorerSidebar } from "./workspace-tabs";
|
||||
@@ -64,7 +63,6 @@ export async function withExplorerPanelPlugins(
|
||||
await client.installDirectoryPlugin(second);
|
||||
await page.setViewportSize({ width: 1280, height: 900 });
|
||||
await gotoWorkspace(page, workspace.workspaceId);
|
||||
await approveClientPluginsInUi(page, ["explorer-review", "explorer-other"]);
|
||||
|
||||
await run(workspace);
|
||||
} finally {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { expect, type Page } from "@playwright/test";
|
||||
import { buildHostWorkspaceRoute, parseHostWorkspaceRouteFromPathname } from "@/utils/host-routes";
|
||||
import { buildHostWorkspaceRoute } from "@/utils/host-routes";
|
||||
import { gotoAppShell } from "./app";
|
||||
import { openCommandCenter } from "./command-center";
|
||||
import { openGlobalNewWorkspaceComposer } from "./new-workspace";
|
||||
@@ -194,30 +194,6 @@ export class ImportSessionFlow {
|
||||
userText,
|
||||
);
|
||||
}
|
||||
/** The import opened in a workspace of its own, listed in the sidebar beside `existingWorkspaceId`. */
|
||||
async expectImportedIntoNewWorkspace(input: {
|
||||
existingWorkspaceId: string;
|
||||
userText: string;
|
||||
}): Promise<string> {
|
||||
await expect
|
||||
.poll(
|
||||
() => {
|
||||
const workspaceId = this.currentWorkspaceId();
|
||||
return workspaceId !== null && workspaceId !== input.existingWorkspaceId;
|
||||
},
|
||||
{ timeout: 30_000 },
|
||||
)
|
||||
.toBe(true);
|
||||
const importedWorkspaceId = this.currentWorkspaceId();
|
||||
if (!importedWorkspaceId) throw new Error("The import left the workspace route");
|
||||
await this.expectImportedIntoWorkspace(importedWorkspaceId, input.userText);
|
||||
for (const id of [input.existingWorkspaceId, importedWorkspaceId]) {
|
||||
await expect(
|
||||
this.page.getByTestId(`sidebar-workspace-row-${getServerId()}:${id}`),
|
||||
).toBeVisible();
|
||||
}
|
||||
return importedWorkspaceId;
|
||||
}
|
||||
async close() {
|
||||
await this.page.getByRole("button", { name: "Close", exact: true }).last().click();
|
||||
await expect(this.page.getByTestId("import-session-sheet")).toHaveCount(0);
|
||||
@@ -242,11 +218,6 @@ export class ImportSessionFlow {
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
private currentWorkspaceId(): string | null {
|
||||
return (
|
||||
parseHostWorkspaceRouteFromPathname(new URL(this.page.url()).pathname)?.workspaceId ?? null
|
||||
);
|
||||
}
|
||||
private async rowIds() {
|
||||
return await this.page
|
||||
.locator('[data-testid^="import-session-session-claude-"]')
|
||||
|
||||
@@ -134,7 +134,7 @@ export async function addProjectFromSetup(page: Page, projectPath: string): Prom
|
||||
|
||||
export async function showSetupAgainFromSettings(page: Page): Promise<void> {
|
||||
await page.locator('[data-testid="sidebar-settings"]:visible').first().click();
|
||||
await page.getByRole("button", { name: "Show", exact: true }).click();
|
||||
await page.getByRole("button", { name: "Show setup again", exact: true }).click();
|
||||
}
|
||||
|
||||
export async function goToSetupStep(page: Page, label: string): Promise<void> {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { Locator, TestInfo } from "@playwright/test";
|
||||
import { test, expect, type Page } from "@playwright/test";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { copyPluginExample } from "./plugin-fixture";
|
||||
import { gotoAppShell } from "./app";
|
||||
import { buildAgentRoute } from "./mock-agent";
|
||||
@@ -74,7 +73,6 @@ export async function withButtonAuthorExample(
|
||||
await client.installDirectoryPlugin(example.directory);
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["button-examples"]);
|
||||
await page.goto(buildAgentRoute(workspace.workspaceId, agent.id));
|
||||
|
||||
await run({
|
||||
|
||||
@@ -17,7 +17,6 @@ import {
|
||||
} from "./compact-workspace-scripts";
|
||||
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
|
||||
import { seedWorkspace } from "./seed-client";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { pluginRequirements } from "./plugin-fixture";
|
||||
|
||||
const PLUGIN_ID = "button-showcase";
|
||||
@@ -46,9 +45,6 @@ function Details({ workspaceId, theme, layout, close }) {
|
||||
owner.subscribe({ snapshot(value) { setOwnerId(value.subscriptionId); }, update() { setUpdates((n) => n + 1); } });
|
||||
return () => { void owner.release(); };
|
||||
}, [paseo]);
|
||||
React.useEffect(() => {
|
||||
globalThis.__buttonContentMounts = (globalThis.__buttonContentMounts ?? 0) + 1;
|
||||
}, []);
|
||||
const rpc = useRpc(summary);
|
||||
const query = useQuery({ queryKey: ["summary"], queryFn: () => rpc({}) });
|
||||
if (failed) throw new Error("Button content failed");
|
||||
@@ -202,13 +198,6 @@ async function expectDetails(page: Page) {
|
||||
await expect(page.getByText("All systems operational", { exact: true })).toBeInViewport();
|
||||
}
|
||||
|
||||
/** How many times button content has mounted on the page, counted by the content itself. */
|
||||
async function contentMounts(page: Page): Promise<number> {
|
||||
return page.evaluate(
|
||||
() => (globalThis as { __buttonContentMounts?: number }).__buttonContentMounts ?? 0,
|
||||
);
|
||||
}
|
||||
|
||||
// The details render before the daemon answers their event subscription, and reopened
|
||||
// details show the cached summary at once, so wait for the subscription id to arrive.
|
||||
async function readContentObservation(page: Page): Promise<string> {
|
||||
@@ -242,17 +231,14 @@ async function expectCompactDetails(page: Page) {
|
||||
await expect(menu.getByText("Presentation: compact", { exact: true })).toBeVisible();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves once `subject` renders the same pixels twice in a row: entering animations are done.
|
||||
* A remount detaches the element mid-screenshot; that is not still yet, so the poll starts over.
|
||||
*/
|
||||
/** Resolves once `subject` renders the same pixels twice in a row: entering animations are done. */
|
||||
async function expectStill(subject: Locator) {
|
||||
let previous: Buffer | null = null;
|
||||
await expect
|
||||
.poll(
|
||||
async () => {
|
||||
const current = await screenshotAttached(subject);
|
||||
const still = previous !== null && current !== null && current.equals(previous);
|
||||
const current = await subject.screenshot();
|
||||
const still = previous !== null && current.equals(previous);
|
||||
previous = current;
|
||||
return still;
|
||||
},
|
||||
@@ -261,17 +247,6 @@ async function expectStill(subject: Locator) {
|
||||
.toBe(true);
|
||||
}
|
||||
|
||||
async function screenshotAttached(subject: Locator): Promise<Buffer | null> {
|
||||
try {
|
||||
return await subject.screenshot();
|
||||
} catch (error) {
|
||||
if (error instanceof Error && error.message.includes("Element is not attached to the DOM")) {
|
||||
return null;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/** Attaches the screen once per colour scheme, for review alongside the run. */
|
||||
async function captureSchemes(page: Page, info: TestInfo, name: string, subject: Locator) {
|
||||
for (const colorScheme of ["light", "dark"] as const) {
|
||||
@@ -379,25 +354,21 @@ export async function withButtonShowcase(
|
||||
try {
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
await page.goto(buildAgentRoute(workspace.workspaceId, agent.id));
|
||||
await expect(page.getByRole("button", { name: "Run review", exact: true })).toBeVisible();
|
||||
|
||||
await run({
|
||||
verifyObservationLifetime: () =>
|
||||
test.step("closing and crashing content release its owner while sibling buttons and app remain live", async () => {
|
||||
const mountsBefore = await contentMounts(page);
|
||||
await press(page, "Header status");
|
||||
await expectDetails(page);
|
||||
const first = await readContentObservation(page);
|
||||
expect(await contentMounts(page)).toBe(mountsBefore + 1);
|
||||
await press(page, "Close deployment details");
|
||||
await expect.poll(() => released.has(first)).toBe(true);
|
||||
await press(page, "Composer status");
|
||||
await expectDetails(page);
|
||||
const second = await readContentObservation(page);
|
||||
expect(second).not.toBe(first);
|
||||
expect(await contentMounts(page)).toBe(mountsBefore + 2);
|
||||
await workspace.client.renameProject(workspace.projectId, "Observer control");
|
||||
await expect(page.getByText("Observed updates: 1", { exact: true })).toBeVisible();
|
||||
await press(page, "Fail button content");
|
||||
|
||||
@@ -5,7 +5,6 @@ import { expect, test, type Page } from "@playwright/test";
|
||||
import { gotoAppShell } from "./app";
|
||||
import { openAgentRoute } from "./mock-agent";
|
||||
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
|
||||
import { seedWorkspace } from "./seed-client";
|
||||
|
||||
@@ -40,7 +39,6 @@ export async function withComposerControlsExample(
|
||||
await client.patchDaemonConfig({ pluginsEnabled: true });
|
||||
await client.installDirectoryPlugin(example.directory);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
await openAgentRoute(page, { workspaceId: workspace.workspaceId, agentId: agent.id });
|
||||
await run({
|
||||
narrowTheWindow: () =>
|
||||
@@ -219,7 +217,6 @@ async function withToolbarPlugin(
|
||||
await client.patchDaemonConfig({ pluginsEnabled: true });
|
||||
await client.installDirectoryPlugin(directory);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [ONE_TOGGLE_PLUGIN_ID]);
|
||||
await openAgentRoute(page, { workspaceId: workspace.workspaceId, agentId: agent.id });
|
||||
await expect(toolbar(page)).toBeVisible({ timeout: 30_000 });
|
||||
await run({
|
||||
|
||||
@@ -13,7 +13,6 @@ import { gotoWorkspace } from "./launcher";
|
||||
import { openCommandCenter } from "./command-center";
|
||||
import { openAgentRoute, seedMockAgentWorkspace } from "./mock-agent";
|
||||
import { connectNewWorkspaceDaemonClient, openGlobalNewWorkspaceComposer } from "./new-workspace";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
|
||||
import { seedWorkspace } from "./seed-client";
|
||||
import {
|
||||
@@ -87,7 +86,6 @@ export async function withComposerToolsExample(
|
||||
await client.installDirectoryPlugin(example.directory);
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["composer-controls-example"]);
|
||||
await openAgentRoute(page, { workspaceId: workspace.workspaceId, agentId: agent.id });
|
||||
await run({
|
||||
openComposerToolsInExplorer: () =>
|
||||
@@ -215,7 +213,6 @@ export async function withPluginWritingToAnotherWorkspace(
|
||||
await client.installDirectoryPlugin(directory);
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["composer-ref"]);
|
||||
await run({
|
||||
openTargetAgent: () =>
|
||||
test.step("open the agent the plugin will write to", async () => {
|
||||
@@ -359,7 +356,6 @@ export default function contribute(client) {
|
||||
await client.installDirectoryPlugin(directory);
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["composer-focus"]);
|
||||
await run({
|
||||
openOtherAgent: () =>
|
||||
test.step("open another agent, so the target's tab is not showing", async () => {
|
||||
@@ -483,7 +479,6 @@ export default function contribute(client) {
|
||||
await client.installDirectoryPlugin(directory);
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["held-composer"]);
|
||||
await run({
|
||||
openNewWorkspace: () =>
|
||||
test.step("open the New workspace composer", async () => {
|
||||
@@ -601,7 +596,6 @@ export async function withPluginFocusingASubagent(
|
||||
try {
|
||||
await page.setViewportSize(COMPACT);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["focus-agent"]);
|
||||
await run({
|
||||
keepParentInExplorerOnCompactScreen: () =>
|
||||
test.step("move the parent into the Explorer, then narrow the window", async () => {
|
||||
@@ -746,7 +740,6 @@ export async function withPluginFocusingAnAgentWithContextUsage(
|
||||
try {
|
||||
await page.setViewportSize(COMPACT);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["focus-agent"]);
|
||||
await run({
|
||||
openContextUsageOnPhone: () =>
|
||||
test.step("open the agent's context usage on a phone", async () => {
|
||||
|
||||
@@ -8,7 +8,6 @@ import { expect, test as base, type Page } from "../fixtures";
|
||||
import appPackage from "../../../package.json";
|
||||
import { gotoAppShell, openSettings } from "./app";
|
||||
import { addConnectedHostAndReload } from "./hosts";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { pluginRequirements } from "./plugin-fixture";
|
||||
import {
|
||||
expectToast,
|
||||
@@ -397,7 +396,6 @@ export async function installListingFromRow(page: Page) {
|
||||
const sheet = page.getByTestId("plugin-install-sheet");
|
||||
await expect(sheet).toContainText("Acme");
|
||||
await sheet.getByTestId("plugin-install-confirm").click();
|
||||
await approveClientPluginsInUi(page, ["directory-example"]);
|
||||
await expect(listingRow(page).getByTestId(`plugin-uninstall-${LISTING.id}`)).toBeVisible({
|
||||
timeout: 60_000,
|
||||
});
|
||||
@@ -432,7 +430,6 @@ export async function uninstallFromPage(page: Page) {
|
||||
export async function installFromPage(page: Page) {
|
||||
await page.getByTestId(`plugin-install-${LISTING.id}`).filter({ visible: true }).click();
|
||||
await page.getByTestId("plugin-install-confirm").click();
|
||||
await approveClientPluginsInUi(page, ["directory-example"]);
|
||||
await expect(
|
||||
page.getByRole("button", { name: `Actions for ${LISTING.name}`, exact: true }),
|
||||
).toBeVisible({ timeout: 60_000 });
|
||||
|
||||
@@ -1,284 +0,0 @@
|
||||
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import path from "node:path";
|
||||
import { expect, type Locator, type Page } from "@playwright/test";
|
||||
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
|
||||
import { pluginRequirements } from "./plugin-fixture";
|
||||
|
||||
export interface ClientProbePluginSpec {
|
||||
id: string;
|
||||
name: string;
|
||||
sidebarTitle: string;
|
||||
markerKey: string;
|
||||
}
|
||||
|
||||
export async function createClientProbePlugin(spec: ClientProbePluginSpec): Promise<{
|
||||
directory: string;
|
||||
cleanup: () => Promise<void>;
|
||||
}> {
|
||||
const directory = await mkdtemp(path.join(tmpdir(), `paseo-plugin-approval-${spec.id}-`));
|
||||
await writeFile(
|
||||
path.join(directory, "paseo-plugin.json"),
|
||||
JSON.stringify({
|
||||
id: spec.id,
|
||||
name: spec.name,
|
||||
requirements: pluginRequirements,
|
||||
}),
|
||||
);
|
||||
await writeFile(
|
||||
path.join(directory, "index.server.ts"),
|
||||
`export default function contribute() { return () => {}; }\n`,
|
||||
);
|
||||
await writeFile(
|
||||
path.join(directory, "index.client.tsx"),
|
||||
`import React from "react";
|
||||
import { Text, View } from "react-native";
|
||||
import { SidebarRow } from "@getpaseo/plugin/client/ui";
|
||||
|
||||
const executed = (globalThis.__paseoPluginExecutions = globalThis.__paseoPluginExecutions || []);
|
||||
executed.push(${JSON.stringify(spec.markerKey)});
|
||||
|
||||
function ProbeScreen({ theme }) {
|
||||
return (
|
||||
<View style={{ flex: 1, padding: 24 }}>
|
||||
<Text style={{ color: theme.colors.foreground }}>${spec.name} screen</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ProbeItem({ currentScreen, openScreen }) {
|
||||
return (
|
||||
<SidebarRow
|
||||
icon="Puzzle"
|
||||
active={currentScreen?.screenId === "main"}
|
||||
onPress={() => openScreen({ screenId: "main" })}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default function contribute(client) {
|
||||
client.addScreen({ id: "main", title: ${JSON.stringify(spec.sidebarTitle)}, Component: ProbeScreen });
|
||||
client.addSidebarHeaderItem({
|
||||
id: "main",
|
||||
title: ${JSON.stringify(spec.sidebarTitle)},
|
||||
Component: ProbeItem,
|
||||
});
|
||||
return () => {};
|
||||
}
|
||||
`,
|
||||
);
|
||||
return {
|
||||
directory,
|
||||
cleanup: () => rm(directory, { recursive: true, force: true }),
|
||||
};
|
||||
}
|
||||
|
||||
export interface InstalledClientPluginsContext {
|
||||
install: (spec: ClientProbePluginSpec) => Promise<void>;
|
||||
}
|
||||
|
||||
export async function withInstalledClientPlugins<T>(
|
||||
specs: readonly ClientProbePluginSpec[],
|
||||
run: (ctx: InstalledClientPluginsContext) => Promise<T>,
|
||||
): Promise<T> {
|
||||
const client = await connectNewWorkspaceDaemonClient({ ownProjects: false });
|
||||
const previous = await client.getDaemonConfig();
|
||||
const created: Array<{ id: string; cleanup: () => Promise<void> }> = [];
|
||||
const install = async (spec: ClientProbePluginSpec) => {
|
||||
const fixture = await createClientProbePlugin(spec);
|
||||
created.push({ id: spec.id, cleanup: fixture.cleanup });
|
||||
await client.installDirectoryPlugin(fixture.directory);
|
||||
};
|
||||
try {
|
||||
await client.patchDaemonConfig({ pluginsEnabled: true });
|
||||
for (const spec of specs) {
|
||||
await install(spec);
|
||||
}
|
||||
return await run({ install });
|
||||
} finally {
|
||||
for (const item of created.toReversed()) {
|
||||
await client.removePlugin(item.id).catch(() => undefined);
|
||||
}
|
||||
await client
|
||||
.patchDaemonConfig({ pluginsEnabled: previous.config.pluginsEnabled ?? false })
|
||||
.catch(() => undefined);
|
||||
await client.close().catch(() => undefined);
|
||||
for (const item of created) {
|
||||
await item.cleanup().catch(() => undefined);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function pluginExecutionBypassSwitch(page: Page): Locator {
|
||||
return page.getByRole("switch", { name: "Run plugins without asking", exact: true });
|
||||
}
|
||||
|
||||
export function pluginExecutionBypassConfirmModal(page: Page): Locator {
|
||||
return page.getByTestId("plugin-execution-bypass-confirm-modal");
|
||||
}
|
||||
|
||||
export async function expectPluginExecutionBypass(page: Page, enabled: boolean): Promise<void> {
|
||||
const toggle = pluginExecutionBypassSwitch(page);
|
||||
await expect(toggle).toBeVisible({ timeout: 30_000 });
|
||||
await expect(toggle).toHaveAttribute("aria-checked", String(enabled));
|
||||
}
|
||||
|
||||
export async function openPluginExecutionBypassConfirm(page: Page): Promise<void> {
|
||||
const toggle = pluginExecutionBypassSwitch(page);
|
||||
await expect(toggle).toHaveAttribute("aria-checked", "false");
|
||||
await toggle.click();
|
||||
await expect(pluginExecutionBypassConfirmModal(page)).toBeVisible();
|
||||
}
|
||||
|
||||
export async function cancelPluginExecutionBypassConfirm(page: Page): Promise<void> {
|
||||
const modal = pluginExecutionBypassConfirmModal(page);
|
||||
await expect(modal).toBeVisible();
|
||||
await page.getByRole("button", { name: "Cancel", exact: true }).click();
|
||||
await expect(modal).toHaveCount(0);
|
||||
await expectPluginExecutionBypass(page, false);
|
||||
}
|
||||
|
||||
export async function confirmPluginExecutionBypass(page: Page): Promise<void> {
|
||||
const modal = pluginExecutionBypassConfirmModal(page);
|
||||
await expect(modal).toBeVisible();
|
||||
await page.getByRole("button", { name: "Turn on", exact: true }).click();
|
||||
await expect(modal).toHaveCount(0);
|
||||
await expectPluginExecutionBypass(page, true);
|
||||
}
|
||||
|
||||
export async function setPluginExecutionBypass(page: Page, enabled: boolean): Promise<void> {
|
||||
if (enabled) {
|
||||
await openPluginExecutionBypassConfirm(page);
|
||||
await confirmPluginExecutionBypass(page);
|
||||
return;
|
||||
}
|
||||
const toggle = pluginExecutionBypassSwitch(page);
|
||||
await expect(toggle).toHaveAttribute("aria-checked", "true");
|
||||
await toggle.click();
|
||||
await expect(pluginExecutionBypassConfirmModal(page)).toHaveCount(0);
|
||||
await expectPluginExecutionBypass(page, false);
|
||||
}
|
||||
|
||||
export function pluginApprovalSheet(page: Page): Locator {
|
||||
return page.getByTestId("plugin-execution-approval");
|
||||
}
|
||||
|
||||
export async function expectPluginApprovalPrompt(
|
||||
page: Page,
|
||||
expected: { pluginId: string; progress?: string },
|
||||
): Promise<void> {
|
||||
await expect(pluginApprovalSheet(page)).toBeVisible({ timeout: 30_000 });
|
||||
await expect(page.getByTestId("plugin-execution-approval-plugin")).toContainText(
|
||||
expected.pluginId,
|
||||
);
|
||||
if (expected.progress) {
|
||||
await expect(page.getByTestId("plugin-execution-approval-progress")).toHaveText(
|
||||
expected.progress,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export async function allowPluginExecution(page: Page): Promise<void> {
|
||||
await page.getByRole("button", { name: "Allow", exact: true }).click();
|
||||
}
|
||||
|
||||
export async function declinePluginExecution(page: Page): Promise<void> {
|
||||
await page.getByRole("button", { name: "Don't allow", exact: true }).click();
|
||||
}
|
||||
|
||||
async function readPromptIdentity(
|
||||
page: Page,
|
||||
): Promise<{ pluginText: string; hostText: string; key: string } | null> {
|
||||
const pluginLocator = page.getByTestId("plugin-execution-approval-plugin");
|
||||
const hostLocator = page.getByTestId("plugin-execution-approval-host");
|
||||
if (!(await pluginLocator.isVisible().catch(() => false))) return null;
|
||||
if (!(await hostLocator.isVisible().catch(() => false))) return null;
|
||||
const pluginText = (await pluginLocator.textContent().catch(() => ""))?.trim() ?? "";
|
||||
const hostText = (await hostLocator.textContent().catch(() => ""))?.trim() ?? "";
|
||||
if (!pluginText || !hostText) return null;
|
||||
return { pluginText, hostText, key: `${pluginText}\0${hostText}` };
|
||||
}
|
||||
|
||||
async function waitForNextApprovalTarget(
|
||||
page: Page,
|
||||
previousKey: string | null,
|
||||
): Promise<{ pluginText: string; hostText: string; key: string }> {
|
||||
let matched: { pluginText: string; hostText: string; key: string } | null = null;
|
||||
await expect
|
||||
.poll(
|
||||
async () => {
|
||||
const current = await readPromptIdentity(page);
|
||||
if (!current || current.key === previousKey) return false;
|
||||
matched = current;
|
||||
return true;
|
||||
},
|
||||
{ timeout: 30_000, message: "Expected next plugin execution approval prompt" },
|
||||
)
|
||||
.toBe(true);
|
||||
if (!matched) {
|
||||
throw new Error("Expected next plugin execution approval prompt");
|
||||
}
|
||||
return matched;
|
||||
}
|
||||
|
||||
/**
|
||||
* Approves every expected client plugin through the real confirmation sheet UI.
|
||||
* Handles stacked plugins and multi-host arrivals in any order, then waits for the sheet to close.
|
||||
*/
|
||||
export async function approveClientPluginsInUi(
|
||||
page: Page,
|
||||
pluginIds: readonly string[],
|
||||
): Promise<void> {
|
||||
const remaining = [...pluginIds];
|
||||
let previousKey: string | null = null;
|
||||
while (remaining.length > 0) {
|
||||
await expect(pluginApprovalSheet(page)).toBeVisible({ timeout: 30_000 });
|
||||
const target = await waitForNextApprovalTarget(page, previousKey);
|
||||
const matchedIndex = remaining.findIndex((id) => target.pluginText.includes(id));
|
||||
if (matchedIndex === -1) {
|
||||
throw new Error(
|
||||
`Unexpected plugin execution prompt "${target.pluginText}" on "${target.hostText}"; expected one of: ${remaining.join(", ")}`,
|
||||
);
|
||||
}
|
||||
remaining.splice(matchedIndex, 1);
|
||||
previousKey = target.key;
|
||||
await allowPluginExecution(page);
|
||||
}
|
||||
await expect(pluginApprovalSheet(page)).toHaveCount(0);
|
||||
}
|
||||
|
||||
export async function getExecutedPluginMarkers(page: Page): Promise<string[]> {
|
||||
return page.evaluate(() => {
|
||||
const raw = (globalThis as { __paseoPluginExecutions?: unknown }).__paseoPluginExecutions;
|
||||
return Array.isArray(raw) ? raw.filter((item): item is string => typeof item === "string") : [];
|
||||
});
|
||||
}
|
||||
|
||||
export async function expectExecutedPluginMarkers(
|
||||
page: Page,
|
||||
expected: readonly string[],
|
||||
): Promise<void> {
|
||||
await expect.poll(() => getExecutedPluginMarkers(page)).toEqual(expected);
|
||||
}
|
||||
|
||||
export async function expectExecutedPluginMarkersContain(
|
||||
page: Page,
|
||||
marker: string,
|
||||
): Promise<void> {
|
||||
await expect.poll(() => getExecutedPluginMarkers(page)).toContain(marker);
|
||||
}
|
||||
|
||||
export async function reloadKeepingPersistedState(page: Page): Promise<void> {
|
||||
await page.evaluate(() => {
|
||||
const nonce = localStorage.getItem("@paseo:e2e-seed-nonce");
|
||||
if (!nonce) throw new Error("Expected e2e seed nonce before reload");
|
||||
localStorage.setItem("@paseo:e2e-disable-default-seed-once", nonce);
|
||||
});
|
||||
await page.reload();
|
||||
}
|
||||
|
||||
export async function ensureArtifactsDir(repoRoot: string): Promise<string> {
|
||||
const dir = path.join(repoRoot, ".artifacts");
|
||||
await mkdir(dir, { recursive: true });
|
||||
return dir;
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import { gotoAppShell } from "./app";
|
||||
import { addConnectedHostAndReload } from "./hosts";
|
||||
import { startIsolatedHostDaemon } from "./isolated-host-daemon";
|
||||
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { pluginRequirements } from "./plugin-fixture";
|
||||
|
||||
const id = "host-clients";
|
||||
@@ -99,7 +98,6 @@ export async function installHostClientsScenario(page: Page) {
|
||||
await primary.patchDaemonConfig({ pluginsEnabled: true });
|
||||
await primary.installDirectoryPlugin(directory);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [id]);
|
||||
await openHostClients(page);
|
||||
await addConnectedHostAndReload(page, {
|
||||
serverId: secondary.serverId,
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
openProjectViaDaemon,
|
||||
submitNewWorkspacePrompt,
|
||||
} from "./new-workspace";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { copyPluginExample } from "./plugin-fixture";
|
||||
import { getServerId } from "./server-id";
|
||||
import { createTempGitRepo } from "./workspace";
|
||||
@@ -148,7 +147,6 @@ export async function withNewWorkspaceIssuesExample(
|
||||
const other = otherRepo ? await openProjectViaDaemon(client, otherRepo.path) : null;
|
||||
let target = project;
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
await waitForSidebarHydration(page);
|
||||
await openNewWorkspaceComposer(page, project);
|
||||
// The sidebar rows used to reach the screen exist only at desktop width.
|
||||
|
||||
@@ -6,7 +6,6 @@ import { gotoAppShell, openSettings } from "./app";
|
||||
import { openModelPicker } from "./agent-profiles";
|
||||
import { openAgentRoute } from "./mock-agent";
|
||||
import { connectNewWorkspaceDaemonClient, openGlobalNewWorkspaceComposer } from "./new-workspace";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { copyPluginExample } from "./plugin-fixture";
|
||||
import { seedWorkspace, type SeededWorkspace } from "./seed-client";
|
||||
import { getServerId } from "./server-id";
|
||||
@@ -16,7 +15,7 @@ const MODEL_LABEL = "Select model (Example 1)";
|
||||
const WIDE = { width: 1400, height: 950 };
|
||||
const COMPACT = { width: 390, height: 844 };
|
||||
|
||||
export async function readIconPaths(page: Page, pluginDirectory: string): Promise<string[]> {
|
||||
async function readIconPaths(page: Page, pluginDirectory: string): Promise<string[]> {
|
||||
const svg = await readFile(path.join(pluginDirectory, "icon.svg"), "utf8");
|
||||
return page.evaluate(
|
||||
(source) =>
|
||||
@@ -34,7 +33,7 @@ function readIconDrawings(icons: SVGElement[]): string[][] {
|
||||
);
|
||||
}
|
||||
|
||||
export async function expectProviderIcon(surface: Locator, paths: string[]): Promise<void> {
|
||||
async function expectProviderIcon(surface: Locator, paths: string[]): Promise<void> {
|
||||
await expect(surface).toBeVisible();
|
||||
// Provider icons are decorative SVGs without accessible names. Compare the
|
||||
// plugin asset's drawing, allowing surface-specific size and theme colours.
|
||||
@@ -77,7 +76,6 @@ export const test = base.extend<{ providerIcons: ProviderIconJourney }>({
|
||||
try {
|
||||
await page.setViewportSize(WIDE);
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["provider-direct-example"]);
|
||||
const iconPaths = await readIconPaths(page, plugin.directory);
|
||||
await provide({ page, testInfo, iconPaths, workspace });
|
||||
} finally {
|
||||
|
||||
@@ -7,7 +7,6 @@ import { expect, type Page } from "../fixtures";
|
||||
import { gotoAppShell } from "./app";
|
||||
import { installDaemonWebSocketGate } from "./daemon-websocket-gate";
|
||||
import { connectDaemonClient } from "./daemon-client-loader";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
|
||||
|
||||
const PLUGIN_ID = "retained-plugin-e2e";
|
||||
@@ -77,7 +76,6 @@ async function createProbe(page: Page) {
|
||||
async open() {
|
||||
await page.setViewportSize({ width: 1100, height: 800 });
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
await page.getByRole("button", { name: "Reconnect probe", exact: true }).click();
|
||||
await expect(page.getByText("Stored title: Agent monitor", { exact: true })).toBeVisible();
|
||||
},
|
||||
|
||||
@@ -8,7 +8,6 @@ import { connectDaemonClient } from "./daemon-client-loader";
|
||||
import { addConnectedHostAndReload } from "./hosts";
|
||||
import { gotoAppShell, openSettings } from "./app";
|
||||
import { openHostSection, selectSettingsHost } from "./settings";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { pluginRequirements } from "./plugin-fixture";
|
||||
import {
|
||||
backToPlugins,
|
||||
@@ -109,16 +108,9 @@ export async function expectAppMismatch(page: Page) {
|
||||
).toBeVisible();
|
||||
}
|
||||
|
||||
export async function correctRequirementAndReload(
|
||||
page: Page,
|
||||
directory: string,
|
||||
options?: { approvePrompt?: boolean },
|
||||
) {
|
||||
export async function correctRequirementAndReload(page: Page, directory: string) {
|
||||
await writeRequirements(directory, pluginRequirements.paseo);
|
||||
await reloadRequirementsPlugin(page);
|
||||
if (options?.approvePrompt) {
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
}
|
||||
await backToPlugins(page, PLUGIN_ID);
|
||||
await expectPluginHealthy(page, PLUGIN_ID);
|
||||
await expect(page.getByText(/Your app is/)).toHaveCount(0);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import path from "node:path";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
|
||||
import { expect, test as base, type Page } from "../fixtures";
|
||||
import { gotoAppShell, openSettings } from "./app";
|
||||
@@ -100,13 +99,11 @@ export const test = base.extend<{ settingsPlugin: SettingsClient }>({
|
||||
|
||||
export async function openDisplaySettings(page: Page) {
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["settings-example", TABBED_PLUGIN_ID]);
|
||||
await openSettings(page);
|
||||
await openSettingsExamplePage(page);
|
||||
}
|
||||
export async function openCompactDisplaySettings(page: Page) {
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["settings-example", TABBED_PLUGIN_ID]);
|
||||
await openCompactSettings(page, new URL(page.url()).pathname);
|
||||
await openSettingsExamplePage(page);
|
||||
}
|
||||
@@ -123,7 +120,6 @@ async function expectSettingsExampleScreen(page: Page) {
|
||||
}
|
||||
export async function openPluginsPage(page: Page) {
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["settings-example", TABBED_PLUGIN_ID]);
|
||||
await openSettings(page);
|
||||
await openHostSection(page, getServerId(), "plugins");
|
||||
}
|
||||
@@ -187,7 +183,6 @@ export async function expectSettingsTab(page: Page, title: "General" | "Advanced
|
||||
}
|
||||
export async function openTabbedSettingsLink(page: Page, title: "General" | "Advanced") {
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["settings-example", TABBED_PLUGIN_ID]);
|
||||
await page.goto(`${pluginPageRoute(TABBED_PLUGIN_ID)}/${title.toLowerCase()}`);
|
||||
await expectSettingsTab(page, title);
|
||||
}
|
||||
|
||||
@@ -4,16 +4,11 @@ import path from "node:path";
|
||||
import { expect, type Locator, type Page } from "@playwright/test";
|
||||
import { openCommandCenter } from "./command-center";
|
||||
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { pluginRequirements } from "./plugin-fixture";
|
||||
|
||||
export const SHOWCASE_PLUGIN_ID = "sidebar-showcase";
|
||||
export const LEGACY_PLUGIN_ID = "legacy-sidebar";
|
||||
export const BOTS_PLUGIN_ID = "sidebar-bots";
|
||||
|
||||
export async function approveSidebarPluginsInUi(page: Page): Promise<void> {
|
||||
await approveClientPluginsInUi(page, [SHOWCASE_PLUGIN_ID, LEGACY_PLUGIN_ID, BOTS_PLUGIN_ID]);
|
||||
}
|
||||
export const WIDE = { width: 1440, height: 900 };
|
||||
export const COMPACT = { width: 390, height: 844 };
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import path from "node:path";
|
||||
import { expect, type Page, type TestInfo } from "@playwright/test";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
|
||||
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
|
||||
import { openAgentRoute, seedMockAgentWorkspace, type MockAgentWorkspace } from "./mock-agent";
|
||||
@@ -111,8 +110,7 @@ export default function contribute(client) {
|
||||
return () => {};
|
||||
}`;
|
||||
|
||||
export const PROMPT_PLUGIN_ID = "timeline-prompt-e2e";
|
||||
export const POPOVER_PLUGIN_ID = "timeline-popover-e2e";
|
||||
const PROMPT_PLUGIN_ID = "timeline-prompt-e2e";
|
||||
|
||||
function promptClientSource(prompts?: readonly string[]): string {
|
||||
return `import React from "react";
|
||||
@@ -203,7 +201,6 @@ export async function withTimelinePlugin(
|
||||
run: async () => {
|
||||
try {
|
||||
await openAgentRoute(page, agent);
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
await expect(
|
||||
page.getByRole("textbox", { name: "Message agent..." }).first(),
|
||||
).toBeVisible();
|
||||
@@ -359,7 +356,6 @@ export async function viewInlineThinkingExample(page: Page, info: TestInfo): Pro
|
||||
await client.patchDaemonConfig({ pluginsEnabled: true });
|
||||
await client.installDirectoryPlugin(example.directory);
|
||||
await openAgentRoute(page, agent);
|
||||
await approveClientPluginsInUi(page, ["inline-thinking"]);
|
||||
await expect(page.getByRole("textbox", { name: "Message agent..." }).first()).toBeVisible();
|
||||
await requestPluginTimeline(agent);
|
||||
const thought = page.getByText(/^Need to find the scroll container/);
|
||||
@@ -427,7 +423,6 @@ export default function contribute(client) {
|
||||
}`,
|
||||
run: async () => {
|
||||
await openAgentRoute(page, agent);
|
||||
await approveClientPluginsInUi(page, ["timeline-local-ids"]);
|
||||
await expect(page.getByRole("textbox", { name: "Message agent..." }).first()).toBeVisible();
|
||||
await run();
|
||||
},
|
||||
|
||||
@@ -6,7 +6,6 @@ import type { TestInfo, BrowserContext } from "@playwright/test";
|
||||
import { expect, type Page } from "../fixtures";
|
||||
import { gotoAppShell, openSettings } from "./app";
|
||||
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { copyPluginExample } from "./plugin-fixture";
|
||||
|
||||
async function chooseChinese(page: Page) {
|
||||
@@ -41,7 +40,6 @@ export async function verifyPluginTranslations(page: Page, info: TestInfo) {
|
||||
await client.installDirectoryPlugin(example.directory);
|
||||
await page.setViewportSize({ width: 1440, height: 1000 });
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["translation-notes"]);
|
||||
await page.getByRole("button", { name: "Workspace notes", exact: true }).click();
|
||||
await expect(page.getByText("App language: en", { exact: true })).toBeVisible();
|
||||
await page
|
||||
@@ -127,7 +125,6 @@ export async function verifyPluginToolTranslations(page: Page, info: TestInfo) {
|
||||
await client.installDirectoryPlugin(example.directory);
|
||||
await page.setViewportSize({ width: 1440, height: 1000 });
|
||||
await gotoAppShell(page);
|
||||
await approveClientPluginsInUi(page, ["translation-notes"]);
|
||||
await page.goto(buildAgentRoute(workspace.workspaceId, agent.id));
|
||||
const commandCenter = await openCommandCenter(page);
|
||||
await commandCenter.getByTestId("command-center-input").fill("Show notes tools");
|
||||
|
||||
@@ -4,7 +4,6 @@ import type { DaemonClient as InternalDaemonClient } from "@getpaseo/client/inte
|
||||
import { expect, test as base, type Page } from "../fixtures";
|
||||
import { gotoAppShell, openSettings } from "./app";
|
||||
import { connectDaemonClient } from "./daemon-client-loader";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
|
||||
import { getServerId } from "./server-id";
|
||||
import { leaveProviderDetail, openSettingsHostSection } from "./settings";
|
||||
@@ -85,14 +84,8 @@ export const test = base.extend<{ providerUpdateFailure: ProviderUpdateFailure }
|
||||
},
|
||||
});
|
||||
|
||||
export async function openProviderInstallation(
|
||||
page: Page,
|
||||
options?: { approvePlugin?: boolean },
|
||||
): Promise<void> {
|
||||
export async function openProviderInstallation(page: Page): Promise<void> {
|
||||
await gotoAppShell(page);
|
||||
if (options?.approvePlugin) {
|
||||
await approveClientPluginsInUi(page, [PLUGIN_ID]);
|
||||
}
|
||||
await openSettings(page);
|
||||
await openSettingsHostSection(page, getServerId(), "providers");
|
||||
await page
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { readFile, writeFile } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { expect, type Page } from "@playwright/test";
|
||||
import { approveClientPluginsInUi } from "./plugin-execution-approval";
|
||||
import { copyPluginExample } from "./plugin-fixture";
|
||||
import { connectNewWorkspaceDaemonClient } from "./new-workspace";
|
||||
import { seedWorkspace } from "./seed-client";
|
||||
@@ -34,7 +33,6 @@ export async function withSidebarViews(
|
||||
await client.installDirectoryPlugin(example.directory);
|
||||
await page.setViewportSize({ width: 1280, height: 900 });
|
||||
await gotoWorkspace(page, workspace.workspaceId);
|
||||
await approveClientPluginsInUi(page, ["sidebar-views"]);
|
||||
await run(sidebarViews(page, workspace.workspaceId, client));
|
||||
} finally {
|
||||
await client.removePlugin("sidebar-views");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@getpaseo/app",
|
||||
"version": "0.19.0-beta.1",
|
||||
"version": "0.18.2",
|
||||
"private": true,
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
|
||||
@@ -242,28 +242,6 @@ const longEditDetail = {
|
||||
newString: "new line\n".repeat(80),
|
||||
};
|
||||
|
||||
describe("tool detail empty state", () => {
|
||||
it("insets the empty-state text from the disclosure edge", () => {
|
||||
act(() =>
|
||||
root.render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<ToolCallDetailsContent maxHeight={200} />
|
||||
</QueryClientProvider>,
|
||||
),
|
||||
);
|
||||
const text = view().getByText("No additional details available");
|
||||
const style = getComputedStyle(text);
|
||||
expect(style.paddingTop).toBe("12px");
|
||||
expect(style.paddingRight).toBe("12px");
|
||||
expect(style.paddingBottom).toBe("12px");
|
||||
expect(style.paddingLeft).toBe("12px");
|
||||
const textBox = text.getBoundingClientRect();
|
||||
const containerBox = container.getBoundingClientRect();
|
||||
expect(textBox.left).toBeGreaterThanOrEqual(containerBox.left);
|
||||
expect(textBox.right).toBeLessThanOrEqual(containerBox.right);
|
||||
});
|
||||
});
|
||||
|
||||
describe("capped tool scrolling", () => {
|
||||
it.each([longShellDetail, longEditDetail])(
|
||||
"gives a capped $type detail one vertical scroll owner",
|
||||
|
||||
@@ -65,7 +65,6 @@ import { WorkspaceShortcutTargetsSubscriber } from "@/components/workspace-short
|
||||
import { FloatingPanelPortalHost } from "@/components/ui/floating-panel-portal";
|
||||
import { HostChooserModal, useHostChooser } from "@/hosts/host-chooser";
|
||||
import { HostConfirmationSheet } from "@/hosts/host-confirmation-sheet";
|
||||
import { PluginExecutionApprovalSheet } from "@/plugins/execution-approval/sheet";
|
||||
import { HEADER_INNER_HEIGHT, useIsCompactFormFactor } from "@/constants/layout";
|
||||
import {
|
||||
canDesktopAppSidebarShare,
|
||||
@@ -569,7 +568,6 @@ function AppContainer({ children, chromeEnabled: chromeEnabledOverride }: AppCon
|
||||
<AddProjectFlowHost />
|
||||
<HostChooserModal />
|
||||
<HostConfirmationSheet />
|
||||
<PluginExecutionApprovalSheet />
|
||||
<ProviderSettingsHost />
|
||||
<WorkspaceSetupDialog />
|
||||
<KeyboardShortcutsDialog />
|
||||
|
||||
@@ -55,47 +55,6 @@ it("keeps unavailable probes and external paths on the existing file-open path",
|
||||
}
|
||||
});
|
||||
|
||||
it("opens an existing absolute folder outside the workspace without a trailing slash", async () => {
|
||||
const root = await mkdtemp(path.join(tmpdir(), "outside-folder-link-"));
|
||||
roots.push(root);
|
||||
const workspaceRoot = path.join(root, "workspace");
|
||||
const folder = path.join(root, "reports").split(path.sep).join("/");
|
||||
const file = path.join(root, "notes.txt").split(path.sep).join("/");
|
||||
await mkdir(workspaceRoot);
|
||||
await mkdir(folder);
|
||||
await writeFile(file, "notes");
|
||||
|
||||
const { classifyForResolution } = await import("./resolver");
|
||||
const { resolveInlinePathDestination } = await import("./path-open");
|
||||
const client = {
|
||||
listDirectory: (cwd: string, requestedPath: string) => {
|
||||
const absolute = path.resolve(cwd, requestedPath);
|
||||
if (path.relative(cwd, absolute).split(path.sep)[0] === "..") {
|
||||
throw new Error("Access outside of workspace is not allowed");
|
||||
}
|
||||
return readdir(absolute);
|
||||
},
|
||||
getDirectorySuggestions: async () => ({ entries: [], error: null }),
|
||||
};
|
||||
const destination = async (href: string) => {
|
||||
const resolution = classifyForResolution({ href, text: "Open path" }, { workspaceRoot });
|
||||
if (resolution.kind !== "resolved" || resolution.value.kind !== "file") {
|
||||
throw new Error("Expected an explicit path link");
|
||||
}
|
||||
return resolveInlinePathDestination({ target: resolution.value.target, workspaceRoot, client });
|
||||
};
|
||||
|
||||
await expect(destination(file)).resolves.toMatchObject({
|
||||
kind: "file",
|
||||
location: { path: file },
|
||||
});
|
||||
await expect(destination(folder + "/")).resolves.toEqual({
|
||||
kind: "outsideDirectory",
|
||||
path: folder,
|
||||
});
|
||||
await expect(destination(folder)).resolves.toEqual({ kind: "outsideDirectory", path: folder });
|
||||
});
|
||||
|
||||
it("ignores an older probe after a newer file link opens", async () => {
|
||||
const { createInlinePathOpener } = await import("./path-open");
|
||||
let rejectProbe!: (error: Error) => void;
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
type WorkspaceFileLocation,
|
||||
type OpenFileDisposition,
|
||||
} from "@/workspace/file-open";
|
||||
import { resolveFilePreviewReadTarget } from "@/file-explorer/preview-target";
|
||||
import { isAbsolutePath } from "@/utils/path";
|
||||
import { resolveMissingNestedRelativeFile, type GetDirectorySuggestions } from "./resolver";
|
||||
|
||||
@@ -27,30 +26,27 @@ function isOutsideWorkspacePath(pathValue: string): boolean {
|
||||
return isAbsolutePath(pathValue) || pathValue === "~" || pathValue.startsWith("~/");
|
||||
}
|
||||
|
||||
/** Resolve folders from filesystem facts, including names that contain dots. */
|
||||
/** Resolve workspace folders from filesystem facts, including names that contain dots. */
|
||||
export async function resolveInlinePathOpen(input: PathOpenInput): Promise<PathOpenTarget> {
|
||||
if (!input.file) {
|
||||
return isOutsideWorkspacePath(input.directory)
|
||||
? { kind: "outsideDirectory", directoryPath: input.directory }
|
||||
: { kind: "directory", directoryPath: input.directory };
|
||||
}
|
||||
if (input.lineStart !== undefined || !input.workspaceRoot.trim() || !input.client) {
|
||||
if (
|
||||
input.lineStart !== undefined ||
|
||||
isAbsolutePath(input.file) ||
|
||||
!input.workspaceRoot.trim() ||
|
||||
!input.client
|
||||
) {
|
||||
return { kind: "file" };
|
||||
}
|
||||
const outside = isOutsideWorkspacePath(input.file);
|
||||
const probe = outside
|
||||
? resolveFilePreviewReadTarget({ path: input.file, workspaceRoot: input.workspaceRoot })
|
||||
: { cwd: input.workspaceRoot, path: input.file };
|
||||
if (!probe) return { kind: "file" };
|
||||
try {
|
||||
await input.client.listDirectory(probe.cwd, probe.path);
|
||||
await input.client.listDirectory(input.workspaceRoot, input.file);
|
||||
} catch {
|
||||
return { kind: "file" };
|
||||
}
|
||||
return {
|
||||
kind: outside ? "outsideDirectory" : "directory",
|
||||
directoryPath: input.file,
|
||||
};
|
||||
return { kind: "directory", directoryPath: input.file };
|
||||
}
|
||||
|
||||
export type InlinePathDestination =
|
||||
|
||||
@@ -2,6 +2,7 @@ import { useOverlayRegistration, type KeyboardInputEvent } from "@/keyboard";
|
||||
import { Modal } from "@/components/ui/modal";
|
||||
import { type ReactNode, useCallback, useEffect, useMemo, useState } from "react";
|
||||
import { Pressable, Text, View } from "react-native";
|
||||
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
||||
import { StyleSheet } from "react-native-unistyles";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
import { X } from "lucide-react-native";
|
||||
@@ -11,6 +12,7 @@ import {
|
||||
type AttachmentPreviewUrl,
|
||||
useAttachmentPreviewUrl,
|
||||
} from "@/attachments/use-attachment-preview-url";
|
||||
import { isNative } from "@/constants/platform";
|
||||
import { useRetainedPanelActive } from "@/components/retained-panel";
|
||||
import { SPACING } from "@/styles/theme";
|
||||
import { WindowChromeRootRegion } from "@/utils/desktop-window";
|
||||
@@ -28,6 +30,7 @@ interface AttachmentLightboxProps {
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
const ModalRoot = isNative ? GestureHandlerRootView : View;
|
||||
const LIGHTBOX_FIT = { padding: SPACING[4], maxWidth: 960, maxHeight: 640 };
|
||||
|
||||
export function AttachmentLightbox({ source, onClose }: AttachmentLightboxProps) {
|
||||
@@ -92,7 +95,7 @@ export function AttachmentLightbox({ source, onClose }: AttachmentLightboxProps)
|
||||
|
||||
return (
|
||||
<Modal transparent animationType="fade" statusBarTranslucent visible onRequestClose={onClose}>
|
||||
<View style={styles.root}>
|
||||
<ModalRoot style={styles.root}>
|
||||
{/* The modal draws over the whole window: its insets are the window's, not the ones left
|
||||
where the image was opened (inside a sheet tab, the bottom one is already spent). */}
|
||||
<WindowSafeArea>
|
||||
@@ -126,7 +129,7 @@ export function AttachmentLightbox({ source, onClose }: AttachmentLightboxProps)
|
||||
</View>
|
||||
</WindowChromeRootRegion>
|
||||
</WindowSafeArea>
|
||||
</View>
|
||||
</ModalRoot>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,11 +10,8 @@ import { inlineUnistylesStyle } from "@/styles/unistyles-inline-style";
|
||||
import { getCodeInsets } from "./code-insets";
|
||||
import { CODE_SURFACE_DATASET } from "@/styles/code-surface";
|
||||
import { isWeb } from "@/constants/platform";
|
||||
import { ScrollView } from "@/components/ui/scroll-view";
|
||||
|
||||
// Horizontal code scrolls through the shared ScrollView, which keeps its swipes from the mobile
|
||||
// panels. Vertical section scrolling keeps its own scroller.
|
||||
const SectionScrollView = isWeb ? RNScrollView : GHScrollView;
|
||||
const ScrollView = isWeb ? RNScrollView : GHScrollView;
|
||||
|
||||
interface DiffViewerProps {
|
||||
diffLines: DiffLine[];
|
||||
@@ -185,14 +182,14 @@ export function DiffViewer({
|
||||
if (!fillAvailableHeight) return horizontalScroll;
|
||||
|
||||
const content = (
|
||||
<SectionScrollView
|
||||
<ScrollView
|
||||
style={outerScrollStyle}
|
||||
contentContainerStyle={webVerticalContentStyle}
|
||||
nestedScrollEnabled
|
||||
showsVerticalScrollIndicator
|
||||
>
|
||||
{horizontalScroll}
|
||||
</SectionScrollView>
|
||||
</ScrollView>
|
||||
);
|
||||
|
||||
return content;
|
||||
|
||||
@@ -371,12 +371,6 @@ describe("resolveImportTarget", () => {
|
||||
).toEqual({ crossWorkspace: true });
|
||||
});
|
||||
|
||||
it("asks for a new workspace when the sheet was opened to create one", () => {
|
||||
expect(
|
||||
resolveImportTarget({ entryCwd: "/repo/paseo", isScopedListing: false, newWorkspace: true }),
|
||||
).toEqual({ newWorkspace: true, crossWorkspace: true });
|
||||
});
|
||||
|
||||
it("treats a sheet with no workspace as cross-workspace", () => {
|
||||
expect(resolveImportTarget({ entryCwd: "/repo/paseo", isScopedListing: false })).toEqual({
|
||||
crossWorkspace: true,
|
||||
|
||||
@@ -215,8 +215,6 @@ export interface ImportTarget {
|
||||
* rejects an import whose cwd does not match the requested workspace.
|
||||
*/
|
||||
workspaceId?: string;
|
||||
/** The host creates a fresh workspace for the row's directory. */
|
||||
newWorkspace?: true;
|
||||
/**
|
||||
* The agent lands in a workspace other than the one the sheet was opened from,
|
||||
* so the caller has to open that workspace instead of adding a tab here.
|
||||
@@ -231,12 +229,7 @@ export function resolveImportTarget(input: {
|
||||
workspaceId?: string | null;
|
||||
/** The listed rows came from a fetch scoped to `workspaceCwd`. */
|
||||
isScopedListing: boolean;
|
||||
/** The sheet was opened to create a workspace, so every import gets its own. */
|
||||
newWorkspace?: boolean;
|
||||
}): ImportTarget {
|
||||
if (input.newWorkspace) {
|
||||
return { newWorkspace: true, crossWorkspace: true };
|
||||
}
|
||||
if (!input.workspaceId || !input.workspaceCwd) {
|
||||
return { crossWorkspace: true };
|
||||
}
|
||||
|
||||
@@ -73,8 +73,6 @@ interface ImportSessionSheetProps {
|
||||
serverId: string | null;
|
||||
cwd?: string | null;
|
||||
workspaceId?: string | null;
|
||||
/** Each import gets a fresh workspace instead of joining the one open at its directory. */
|
||||
newWorkspace?: boolean;
|
||||
onClose: () => void;
|
||||
/** The agent belongs to the workspace the sheet was opened from; open it here. */
|
||||
onImportedAgent?: (agentId: string) => void;
|
||||
@@ -509,7 +507,6 @@ export function ImportSessionSheet({
|
||||
serverId,
|
||||
cwd,
|
||||
workspaceId,
|
||||
newWorkspace = false,
|
||||
onClose,
|
||||
onImportedAgent,
|
||||
onImported,
|
||||
@@ -713,14 +710,12 @@ export function ImportSessionSheet({
|
||||
workspaceCwd: cwd,
|
||||
workspaceId,
|
||||
isScopedListing: scopeCwd !== null,
|
||||
newWorkspace,
|
||||
});
|
||||
const agent = await client.importAgent({
|
||||
providerId: entry.providerId,
|
||||
providerHandleId: entry.providerHandleId,
|
||||
cwd: entry.cwd,
|
||||
...(target.workspaceId ? { workspaceId: target.workspaceId } : {}),
|
||||
...(target.newWorkspace ? { newWorkspace: true } : {}),
|
||||
});
|
||||
// A pending import keeps the listing and navigation from the host it was sent to.
|
||||
void queryClient.invalidateQueries({
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import React, { Component, type ErrorInfo, type ReactNode } from "react";
|
||||
import { Text, View } from "react-native";
|
||||
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
import { StyleSheet } from "react-native-unistyles";
|
||||
@@ -64,10 +63,8 @@ export function RootErrorFallback({ error, onReload }: RootErrorFallbackProps) {
|
||||
</Button>
|
||||
);
|
||||
|
||||
// The fallback replaces the app tree, so it sits above the app's gesture root and needs its own:
|
||||
// the details scroll sideways under a gesture detector on native.
|
||||
return (
|
||||
<GestureHandlerRootView
|
||||
<View
|
||||
style={[
|
||||
styles.container,
|
||||
{
|
||||
@@ -98,7 +95,7 @@ export function RootErrorFallback({ error, onReload }: RootErrorFallbackProps) {
|
||||
{isCompact ? null : reload}
|
||||
</View>
|
||||
{isCompact ? <View style={styles.footer}>{reload}</View> : null}
|
||||
</GestureHandlerRootView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,11 +26,8 @@ import { HighlightedLines } from "./highlighted-content";
|
||||
import { DiffViewer } from "./diff-viewer";
|
||||
import { getCodeInsets } from "./code-insets";
|
||||
import { isWeb } from "@/constants/platform";
|
||||
import { ScrollView } from "@/components/ui/scroll-view";
|
||||
|
||||
// Horizontal code scrolls through the shared ScrollView, which keeps its swipes from the mobile
|
||||
// panels. Vertical section scrolling keeps its own scroller.
|
||||
const SectionScrollView = isWeb ? RNScrollView : GHScrollView;
|
||||
const ScrollView = isWeb ? RNScrollView : GHScrollView;
|
||||
|
||||
// A capped detail scrolls as a whole. Only full-height sheets need section scrollers.
|
||||
function DetailSectionBody({
|
||||
@@ -43,13 +40,9 @@ function DetailSectionBody({
|
||||
const bodyStyle = useMemo(() => [style, contentContainerStyle], [style, contentContainerStyle]);
|
||||
if (fillAvailableHeight) {
|
||||
return (
|
||||
<SectionScrollView
|
||||
{...scrollProps}
|
||||
style={style}
|
||||
contentContainerStyle={contentContainerStyle}
|
||||
>
|
||||
<ScrollView {...scrollProps} style={style} contentContainerStyle={contentContainerStyle}>
|
||||
{children}
|
||||
</SectionScrollView>
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
return <View style={bodyStyle}>{children}</View>;
|
||||
@@ -583,13 +576,13 @@ export function ToolCallDetailsContent({
|
||||
|
||||
if (resolvedMaxHeight !== undefined) {
|
||||
return (
|
||||
<SectionScrollView
|
||||
<ScrollView
|
||||
style={inlineUnistylesStyle({ maxHeight: resolvedMaxHeight })}
|
||||
contentContainerStyle={ds.fullBleedContainerStyle}
|
||||
nestedScrollEnabled
|
||||
>
|
||||
{sections}
|
||||
</SectionScrollView>
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
return <View style={ds.fullBleedContainerStyle}>{sections}</View>;
|
||||
@@ -754,7 +747,6 @@ const styles = StyleSheet.create((theme) => {
|
||||
color: theme.colors.destructive,
|
||||
},
|
||||
emptyStateText: {
|
||||
padding: insets.padding,
|
||||
color: theme.colors.foregroundMuted,
|
||||
fontSize: theme.fontSize.base,
|
||||
fontStyle: "italic",
|
||||
|
||||
@@ -32,6 +32,7 @@ import { useIsCompactFormFactor } from "@/constants/layout";
|
||||
import { useRetainedPanelActive } from "@/components/retained-panel";
|
||||
import { BottomSheetScrollView, type BottomSheetBackgroundProps } from "@gorhom/bottom-sheet";
|
||||
import Animated, { FadeIn, FadeOut } from "react-native-reanimated";
|
||||
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
||||
import { Check, File, Folder, Search } from "lucide-react-native";
|
||||
import {
|
||||
flip,
|
||||
@@ -1409,7 +1410,8 @@ function DesktopComboboxBody(props: DesktopBodyProps): ReactElement | null {
|
||||
visible={props.isOpen}
|
||||
onRequestClose={props.handleClose}
|
||||
>
|
||||
{overlay}
|
||||
{/* Android Modal opens a separate window outside the app's gesture root. */}
|
||||
<GestureHandlerRootView style={styles.desktopOverlay}>{overlay}</GestureHandlerRootView>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -120,27 +120,6 @@ describe("anchored menu surface on web", () => {
|
||||
},
|
||||
);
|
||||
|
||||
it("mounts its content once per open", async () => {
|
||||
const lifecycle: string[] = [];
|
||||
function RecordsMounts() {
|
||||
useEffect(() => {
|
||||
lifecycle.push("mount");
|
||||
return () => {
|
||||
lifecycle.push("unmount");
|
||||
};
|
||||
}, []);
|
||||
return <View testID="body" style={SHORT} />;
|
||||
}
|
||||
mountMenuAbovePill(<RecordsMounts />);
|
||||
|
||||
await wait(SETTLE_MS);
|
||||
|
||||
expect(element("panel").getBoundingClientRect().bottom).toBeLessThanOrEqual(
|
||||
element("pill").getBoundingClientRect().top,
|
||||
);
|
||||
expect(lifecycle).toEqual(["mount"]);
|
||||
});
|
||||
|
||||
it("widens when its content widens after the entering animation", async () => {
|
||||
mountMenuAbovePill(<GrowsAfterOpen afterMs={GROWS_BEFORE_CLEANUP_MS} from={SHORT} to={WIDE} />);
|
||||
|
||||
|
||||
@@ -284,12 +284,9 @@ export function AnchoredSurface({
|
||||
|
||||
// The surface is placed once both measurements land. Until then it sits off-screen so it can
|
||||
// be measured, and it must not animate: an entering animation that ran there would be over
|
||||
// before anyone saw the menu. Native remounts the surface on placement so Reanimated's
|
||||
// `entering` starts from the final position. Web keeps it mounted and starts its own animation
|
||||
// on placement: a remount would mount the content twice per open, running its effects and
|
||||
// requests again and dropping its first state.
|
||||
// before anyone saw the menu. Remounting on placement starts the native animation from the
|
||||
// final position; web starts its own animation on placement.
|
||||
const placed = position !== null;
|
||||
const surfaceKey = isWeb || placed ? "placed" : "measuring";
|
||||
|
||||
useWebContentEntering({ placed, surfaceNativeID });
|
||||
|
||||
@@ -368,7 +365,7 @@ export function AnchoredSurface({
|
||||
) : null}
|
||||
<View pointerEvents="box-none" style={frame.holder}>
|
||||
<FloatingSurface
|
||||
key={surfaceKey}
|
||||
key={placed ? "placed" : "measuring"}
|
||||
collapsable={false}
|
||||
tabIndex={-1}
|
||||
nativeID={surfaceNativeID}
|
||||
|
||||
@@ -3,12 +3,9 @@ import {
|
||||
Modal as NativeModal,
|
||||
Platform,
|
||||
useWindowDimensions,
|
||||
StyleSheet,
|
||||
type ModalProps as NativeModalProps,
|
||||
} from "react-native";
|
||||
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
||||
import { useDismissibleOverlay } from "@/components/ui/overlay-dismissal";
|
||||
import { isNative } from "@/constants/platform";
|
||||
|
||||
// React Native defaults iPhone modals to portrait even when the app supports rotation.
|
||||
const orientations: NonNullable<NativeModalProps["supportedOrientations"]> = [
|
||||
@@ -25,26 +22,14 @@ type ModalProps = Omit<NativeModalProps, "onRequestClose"> & {
|
||||
|
||||
function noClose() {}
|
||||
|
||||
export function Modal({ children, ...props }: ModalProps) {
|
||||
export function Modal(props: ModalProps) {
|
||||
const { visible = true, onRequestClose, style } = props;
|
||||
useDismissibleOverlay(visible && onRequestClose !== undefined, onRequestClose ?? noClose);
|
||||
const windowFrame = useAndroidWindowFrame();
|
||||
const containerStyle = useMemo(() => [windowFrame, style], [windowFrame, style]);
|
||||
return (
|
||||
<NativeModal supportedOrientations={orientations} {...props} style={containerStyle}>
|
||||
{isNative ? (
|
||||
<GestureHandlerRootView style={styles.gestureRoot}>{children}</GestureHandlerRootView>
|
||||
) : (
|
||||
children
|
||||
)}
|
||||
</NativeModal>
|
||||
);
|
||||
return <NativeModal supportedOrientations={orientations} {...props} style={containerStyle} />;
|
||||
}
|
||||
|
||||
// A native modal is a separate window above the app's gesture root. Its content gets its own, so
|
||||
// gestures recognize there and gesture detectors (a horizontal ScrollView) can mount.
|
||||
const styles = StyleSheet.create({ gestureRoot: { flex: 1 } });
|
||||
|
||||
/**
|
||||
* On Android, React Native lays out a modal's first frames at the screen size minus the status and
|
||||
* navigation bars, then grows it to the full window once the dialog reports its size. The app draws
|
||||
|
||||
@@ -1,229 +0,0 @@
|
||||
import React, { act, createRef, type ReactNode } from "react";
|
||||
import { createRoot, type Root } from "react-dom/client";
|
||||
import {
|
||||
ScrollView as ReactNativeScrollView,
|
||||
View,
|
||||
type FlatList as ReactNativeFlatList,
|
||||
} from "react-native";
|
||||
import { GestureDetector } from "react-native-gesture-handler";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { cdp } from "vitest/browser";
|
||||
import {
|
||||
FileExplorerCloseGestureContext,
|
||||
useCloseFileExplorerGesture,
|
||||
useOpenFileExplorerGesture,
|
||||
} from "@/mobile-panels/gestures";
|
||||
import { MobilePanelsProvider } from "@/mobile-panels/provider";
|
||||
import { usePanelStore } from "@/stores/panel-store";
|
||||
import { FlatList, ScrollView } from "./scroll-view.native";
|
||||
import { ScrollView as WebScrollView } from "./scroll-view.web";
|
||||
|
||||
Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
|
||||
|
||||
const initialPanelState = usePanelStore.getState();
|
||||
let root: Root | null = null;
|
||||
let host: HTMLDivElement | null = null;
|
||||
let explorerOpens = 0;
|
||||
|
||||
function recordExplorerOpen(): void {
|
||||
explorerOpens += 1;
|
||||
}
|
||||
|
||||
afterEach(async () => {
|
||||
await act(async () => root?.unmount());
|
||||
host?.remove();
|
||||
root = null;
|
||||
host = null;
|
||||
usePanelStore.setState(initialPanelState, true);
|
||||
explorerOpens = 0;
|
||||
});
|
||||
|
||||
const FILL = { position: "absolute", top: 0, right: 0, bottom: 0, left: 0 } as const;
|
||||
const ROW = { height: 120 } as const;
|
||||
const WIDE_CONTENT = { width: 2000, height: 120 } as const;
|
||||
const ITEMS = ["one", "two", "three"];
|
||||
const WIDE_ITEM = { width: 800, height: 120 } as const;
|
||||
|
||||
async function mount(node: ReactNode): Promise<void> {
|
||||
host = document.createElement("div");
|
||||
host.style.cssText = "position: fixed; inset: 0;";
|
||||
document.body.appendChild(host);
|
||||
const created = createRoot(host);
|
||||
root = created;
|
||||
await act(async () => created.render(<MobilePanelsProvider>{node}</MobilePanelsProvider>));
|
||||
}
|
||||
|
||||
function byTestID(testID: string): HTMLElement {
|
||||
const element = document.querySelector(`[data-testid="${testID}"]`);
|
||||
if (!(element instanceof HTMLElement)) throw new Error(`${testID} did not render`);
|
||||
return element;
|
||||
}
|
||||
|
||||
/** Converts a point in the test frame to the top page, which draws the frame scaled to fit. */
|
||||
function toPage(x: number, y: number): { x: number; y: number } {
|
||||
const frame = window.frameElement?.getBoundingClientRect();
|
||||
const scale = frame ? frame.width / window.innerWidth : 1;
|
||||
return { x: x * scale, y: y * scale };
|
||||
}
|
||||
|
||||
function horizontalPath(direction: "left" | "right"): [number, number] {
|
||||
const width = window.innerWidth;
|
||||
return direction === "left" ? [width - 8, 20] : [20, width - 8];
|
||||
}
|
||||
|
||||
/**
|
||||
* A drag across the row with real pointer input. A browser does not scroll an overflow container
|
||||
* for a mouse drag, so the row reports only what the gesture handlers decide between themselves:
|
||||
* the arbitration iOS and Android run for a touch.
|
||||
*/
|
||||
async function dragAcross(row: HTMLElement, direction: "left" | "right"): Promise<void> {
|
||||
const session = cdp();
|
||||
const y = row.getBoundingClientRect().top + 60;
|
||||
const [fromX, toX] = horizontalPath(direction);
|
||||
const mouse = (type: "mousePressed" | "mouseMoved" | "mouseReleased", x: number) =>
|
||||
session.send("Input.dispatchMouseEvent", {
|
||||
type,
|
||||
...toPage(x, y),
|
||||
button: "left",
|
||||
buttons: type === "mouseReleased" ? 0 : 1,
|
||||
clickCount: 1,
|
||||
});
|
||||
await mouse("mousePressed", fromX);
|
||||
const steps = 12;
|
||||
for (let step = 1; step <= steps; step += 1) {
|
||||
await mouse("mouseMoved", fromX + ((toX - fromX) * step) / steps);
|
||||
}
|
||||
await mouse("mouseReleased", toX);
|
||||
await new Promise((resolve) => setTimeout(resolve, 100));
|
||||
}
|
||||
|
||||
function ExplorerOpenSurface({ children }: { children: ReactNode }) {
|
||||
const gesture = useOpenFileExplorerGesture({ enabled: true, onOpen: recordExplorerOpen });
|
||||
return (
|
||||
<GestureDetector gesture={gesture} touchAction="pan-y">
|
||||
<View style={FILL}>{children}</View>
|
||||
</GestureDetector>
|
||||
);
|
||||
}
|
||||
|
||||
function ExplorerCloseSurface({ children }: { children: ReactNode }) {
|
||||
const { gesture, gestureRef } = useCloseFileExplorerGesture(true);
|
||||
return (
|
||||
<FileExplorerCloseGestureContext value={gestureRef}>
|
||||
<GestureDetector gesture={gesture} touchAction="pan-y">
|
||||
<View style={FILL}>{children}</View>
|
||||
</GestureDetector>
|
||||
</FileExplorerCloseGestureContext>
|
||||
);
|
||||
}
|
||||
|
||||
function wideItem() {
|
||||
return <View style={WIDE_ITEM} />;
|
||||
}
|
||||
|
||||
const rows = {
|
||||
plain: () => <View testID="row" style={ROW} />,
|
||||
verticalScrollView: () => (
|
||||
<ScrollView testID="row" style={ROW}>
|
||||
<View style={WIDE_CONTENT} />
|
||||
</ScrollView>
|
||||
),
|
||||
horizontalScrollView: () => (
|
||||
<ScrollView testID="row" style={ROW} horizontal>
|
||||
<View style={WIDE_CONTENT} />
|
||||
</ScrollView>
|
||||
),
|
||||
horizontalFlatList: () => (
|
||||
<FlatList testID="row" style={ROW} horizontal data={ITEMS} renderItem={wideItem} />
|
||||
),
|
||||
};
|
||||
|
||||
describe("native ScrollView and FlatList beside the mobile panels", () => {
|
||||
async function swipeToOpenExplorer(row: () => ReactNode): Promise<number> {
|
||||
await mount(<ExplorerOpenSurface>{row()}</ExplorerOpenSurface>);
|
||||
await dragAcross(byTestID("row"), "left");
|
||||
return explorerOpens;
|
||||
}
|
||||
|
||||
it("opens a panel from a swipe on content that does not scroll sideways", async () => {
|
||||
expect(await swipeToOpenExplorer(rows.plain)).toBe(1);
|
||||
});
|
||||
|
||||
it("leaves a sideways swipe on a vertical ScrollView to the panel", async () => {
|
||||
expect(await swipeToOpenExplorer(rows.verticalScrollView)).toBe(1);
|
||||
});
|
||||
|
||||
it("keeps a sideways swipe on a horizontal ScrollView from opening a panel", async () => {
|
||||
expect(await swipeToOpenExplorer(rows.horizontalScrollView)).toBe(0);
|
||||
});
|
||||
|
||||
it("keeps a sideways swipe on a horizontal FlatList from opening a panel", async () => {
|
||||
expect(await swipeToOpenExplorer(rows.horizontalFlatList)).toBe(0);
|
||||
});
|
||||
|
||||
async function swipeToCloseExplorer(row: () => ReactNode): Promise<string> {
|
||||
usePanelStore.setState({ mobilePanel: { target: "file-explorer", revision: 1 } });
|
||||
await mount(<ExplorerCloseSurface>{row()}</ExplorerCloseSurface>);
|
||||
await dragAcross(byTestID("row"), "right");
|
||||
return usePanelStore.getState().mobilePanel.target;
|
||||
}
|
||||
|
||||
it("closes an open panel from a swipe on content that does not scroll sideways", async () => {
|
||||
expect(await swipeToCloseExplorer(rows.plain)).toBe("agent");
|
||||
});
|
||||
|
||||
it("keeps a sideways swipe on a horizontal ScrollView from closing the panel it is in", async () => {
|
||||
expect(await swipeToCloseExplorer(rows.horizontalScrollView)).toBe("file-explorer");
|
||||
});
|
||||
|
||||
it("forwards refs to the React Native scroll view and list", async () => {
|
||||
const scrollRef = createRef<ReactNativeScrollView>();
|
||||
const listRef = createRef<ReactNativeFlatList<string>>();
|
||||
await mount(
|
||||
<>
|
||||
<ScrollView ref={scrollRef} horizontal>
|
||||
<View style={WIDE_CONTENT} />
|
||||
</ScrollView>
|
||||
<FlatList ref={listRef} horizontal data={ITEMS} renderItem={wideItem} />
|
||||
</>,
|
||||
);
|
||||
expect(typeof scrollRef.current?.scrollTo).toBe("function");
|
||||
expect(typeof listRef.current?.scrollToOffset).toBe("function");
|
||||
});
|
||||
});
|
||||
|
||||
/** A one-finger swipe with real touch input; the browser scrolls overflow containers for it. */
|
||||
async function touchSwipeAcross(row: HTMLElement, direction: "left" | "right"): Promise<void> {
|
||||
const session = cdp();
|
||||
await session.send("Emulation.setTouchEmulationEnabled", { enabled: true, maxTouchPoints: 1 });
|
||||
const y = row.getBoundingClientRect().top + 60;
|
||||
const [fromX, toX] = horizontalPath(direction);
|
||||
const touch = (type: "touchStart" | "touchMove", x: number) =>
|
||||
session.send("Input.dispatchTouchEvent", { type, touchPoints: [toPage(x, y)] });
|
||||
await touch("touchStart", fromX);
|
||||
const steps = 12;
|
||||
for (let step = 1; step <= steps; step += 1) {
|
||||
await touch("touchMove", fromX + ((toX - fromX) * step) / steps);
|
||||
await new Promise((resolve) => setTimeout(resolve, 16));
|
||||
}
|
||||
await session.send("Input.dispatchTouchEvent", { type: "touchEnd", touchPoints: [] });
|
||||
await new Promise((resolve) => setTimeout(resolve, 200));
|
||||
}
|
||||
|
||||
describe("web ScrollView beside the mobile panels", () => {
|
||||
// The browser scrolls a horizontal overflow container itself and cancels the page's pointer
|
||||
// stream, so the plain React Native ScrollView already keeps the swipe on web.
|
||||
it("scrolls a horizontal ScrollView under a real touch swipe instead of opening a panel", async () => {
|
||||
await mount(
|
||||
<ExplorerOpenSurface>
|
||||
<WebScrollView testID="row" style={ROW} horizontal>
|
||||
<View style={WIDE_CONTENT} />
|
||||
</WebScrollView>
|
||||
</ExplorerOpenSurface>,
|
||||
);
|
||||
await touchSwipeAcross(byTestID("row"), "left");
|
||||
|
||||
expect(byTestID("row").scrollLeft).toBeGreaterThan(0);
|
||||
expect(explorerOpens).toBe(0);
|
||||
});
|
||||
});
|
||||
@@ -1,64 +0,0 @@
|
||||
import { forwardRef, type ReactElement, type Ref } from "react";
|
||||
import {
|
||||
ScrollView as NativeScrollView,
|
||||
FlatList as NativeFlatList,
|
||||
type ScrollViewProps,
|
||||
type FlatListProps,
|
||||
} from "react-native";
|
||||
import { BottomSheetScrollView, BottomSheetFlatList } from "@gorhom/bottom-sheet";
|
||||
import { GestureDetector } from "react-native-gesture-handler";
|
||||
import { usePanelAwareHorizontalScrollGesture } from "@/mobile-panels/gestures";
|
||||
import { useAttachSheetContentDrag, useIsInsideBottomSheet } from "./bottom-sheet-scope";
|
||||
import { withContentDrag } from "./content-drag";
|
||||
|
||||
// Gorhom forwards to the RN FlatList and ScrollView instances. Its published ref types disagree
|
||||
// about getScrollResponder; keep that type discrepancy at this boundary.
|
||||
const SheetScroll = BottomSheetScrollView as unknown as typeof NativeScrollView;
|
||||
const SheetFlatList = BottomSheetFlatList as unknown as typeof NativeFlatList;
|
||||
|
||||
/** The presentation owns gesture integration; callers keep the React Native API. */
|
||||
export const ScrollView = forwardRef<NativeScrollView, ScrollViewProps>(
|
||||
function ScrollView(props, ref) {
|
||||
const inSheet = useIsInsideBottomSheet();
|
||||
if (props.horizontal) {
|
||||
return (
|
||||
<HorizontalScrollGesture>
|
||||
<NativeScrollView {...props} ref={ref} />
|
||||
</HorizontalScrollGesture>
|
||||
);
|
||||
}
|
||||
if (inSheet) return <SheetScrollView {...props} ref={ref} />;
|
||||
return <PageScrollView {...props} ref={ref} />;
|
||||
},
|
||||
);
|
||||
|
||||
/** Sideways scrolling looks the same in a sheet and on a page: the scroller keeps its touches. */
|
||||
function HorizontalScrollGesture({ children }: { children: ReactElement }) {
|
||||
const gesture = usePanelAwareHorizontalScrollGesture();
|
||||
return <GestureDetector gesture={gesture}>{children}</GestureDetector>;
|
||||
}
|
||||
|
||||
const PageScrollView = withContentDrag<ScrollViewProps, NativeScrollView>(NativeScrollView);
|
||||
|
||||
const SheetScrollView = withContentDrag<ScrollViewProps, NativeScrollView>(
|
||||
SheetScroll,
|
||||
useAttachSheetContentDrag,
|
||||
);
|
||||
|
||||
function PresentationFlatList<Item>(props: FlatListProps<Item>, ref: Ref<NativeFlatList<Item>>) {
|
||||
const inSheet = useIsInsideBottomSheet();
|
||||
if (props.horizontal) {
|
||||
return (
|
||||
<HorizontalScrollGesture>
|
||||
<NativeFlatList {...props} ref={ref} />
|
||||
</HorizontalScrollGesture>
|
||||
);
|
||||
}
|
||||
if (inSheet) return <SheetFlatList {...props} ref={ref} />;
|
||||
return <NativeFlatList {...props} ref={ref} />;
|
||||
}
|
||||
|
||||
// forwardRef erases the item generic. Both implementations expose the RN list methods.
|
||||
export const FlatList = forwardRef(PresentationFlatList) as <Item>(
|
||||
props: FlatListProps<Item> & { ref?: Ref<NativeFlatList<Item>> },
|
||||
) => ReactElement;
|
||||
@@ -1,2 +1,66 @@
|
||||
// Metro loads scroll-view.native.tsx or scroll-view.web.tsx; TypeScript checks callers against native.
|
||||
export { ScrollView, FlatList } from "./scroll-view.native";
|
||||
import { forwardRef, type Ref } from "react";
|
||||
import {
|
||||
ScrollView as NativeScrollView,
|
||||
FlatList as NativeFlatList,
|
||||
type ScrollViewProps,
|
||||
type FlatListProps,
|
||||
} from "react-native";
|
||||
import { BottomSheetScrollView, BottomSheetFlatList } from "@gorhom/bottom-sheet";
|
||||
import {
|
||||
ScrollView as GestureScrollView,
|
||||
FlatList as GestureFlatList,
|
||||
type NativeViewGestureHandlerProps,
|
||||
} from "react-native-gesture-handler";
|
||||
import { isNative } from "@/constants/platform";
|
||||
import { useAttachSheetContentDrag, useIsInsideBottomSheet } from "./bottom-sheet-scope";
|
||||
import { withContentDrag } from "./content-drag";
|
||||
|
||||
// Both libraries forward to the RN FlatList and ScrollView instances. Their published ref types
|
||||
// disagree about getScrollResponder (Gorhom) and include the component function
|
||||
// in the instance intersection (RNGH); keep that type discrepancy at this boundary.
|
||||
const SheetScroll = BottomSheetScrollView as unknown as typeof NativeScrollView;
|
||||
const SheetFlatList = BottomSheetFlatList as unknown as typeof NativeFlatList;
|
||||
const HorizontalFlatList = GestureFlatList as unknown as <Item>(
|
||||
props: FlatListProps<Item> & NativeViewGestureHandlerProps & { ref?: Ref<NativeFlatList<Item>> },
|
||||
) => React.ReactElement;
|
||||
|
||||
/** The presentation owns gesture integration; callers keep the React Native API. */
|
||||
export const ScrollView = forwardRef<NativeScrollView, ScrollViewProps>(
|
||||
function ScrollView(props, ref) {
|
||||
const inSheet = useIsInsideBottomSheet();
|
||||
if (!inSheet) return <PageScrollView {...props} ref={ref} />;
|
||||
if (props.horizontal) {
|
||||
return isNative ? (
|
||||
<GestureScrollView {...props} ref={ref} disallowInterruption />
|
||||
) : (
|
||||
<NativeScrollView {...props} ref={ref} />
|
||||
);
|
||||
}
|
||||
return <SheetScrollView {...props} ref={ref} />;
|
||||
},
|
||||
);
|
||||
|
||||
const PageScrollView = withContentDrag<ScrollViewProps, NativeScrollView>(NativeScrollView);
|
||||
|
||||
const SheetScrollView = withContentDrag<ScrollViewProps, NativeScrollView>(
|
||||
SheetScroll,
|
||||
useAttachSheetContentDrag,
|
||||
);
|
||||
|
||||
function SheetAwareFlatList<Item>(props: FlatListProps<Item>, ref: Ref<NativeFlatList<Item>>) {
|
||||
const inSheet = useIsInsideBottomSheet();
|
||||
if (!inSheet) return <NativeFlatList {...props} ref={ref} />;
|
||||
if (props.horizontal) {
|
||||
return isNative ? (
|
||||
<HorizontalFlatList {...props} ref={ref} disallowInterruption />
|
||||
) : (
|
||||
<NativeFlatList {...props} ref={ref} />
|
||||
);
|
||||
}
|
||||
return <SheetFlatList {...props} ref={ref} />;
|
||||
}
|
||||
|
||||
// forwardRef erases the item generic. All three implementations expose the RN list methods.
|
||||
export const FlatList = forwardRef(SheetAwareFlatList) as <Item>(
|
||||
props: FlatListProps<Item> & { ref?: Ref<NativeFlatList<Item>> },
|
||||
) => React.ReactElement;
|
||||
|
||||
@@ -467,7 +467,6 @@ export function WorkspaceSetupDialog() {
|
||||
attachments={chatDraft.attachments}
|
||||
onChangeAttachments={chatDraft.setAttachments}
|
||||
cwd={sourceDirectory}
|
||||
getDraftRevision={chatDraft.getRevision}
|
||||
clearDraft={chatDraft.clear}
|
||||
autoFocus
|
||||
commandDraft={composerState?.commandDraft}
|
||||
|
||||
@@ -68,7 +68,6 @@ export interface AgentInputDraft {
|
||||
textReplacement: TextReplacement;
|
||||
attachments: UserComposerAttachment[];
|
||||
setAttachments: (updater: AttachmentUpdater) => void;
|
||||
getRevision: () => number;
|
||||
clear: (lifecycle: "sent" | "abandoned") => void;
|
||||
isHydrated: boolean;
|
||||
attachmentFocusRequestId: number;
|
||||
@@ -196,11 +195,6 @@ export function useAgentInputDraft(input: UseAgentInputDraftInput): AgentInputDr
|
||||
[draftKey],
|
||||
);
|
||||
|
||||
const getRevision = useCallback(
|
||||
() => useDraftStore.getState().getDraftRevision(draftKey),
|
||||
[draftKey],
|
||||
);
|
||||
|
||||
const clear = useCallback(
|
||||
(lifecycle: "sent" | "abandoned") => {
|
||||
useDraftStore.getState().clearDraftInput({ draftKey, lifecycle });
|
||||
@@ -387,7 +381,6 @@ export function useAgentInputDraft(input: UseAgentInputDraftInput): AgentInputDr
|
||||
textReplacement,
|
||||
attachments,
|
||||
setAttachments,
|
||||
getRevision,
|
||||
clear,
|
||||
isHydrated,
|
||||
attachmentFocusRequestId,
|
||||
|
||||
@@ -587,7 +587,6 @@ export function WorkspaceDraftComposer({
|
||||
onOpenWorkspaceAttachment={handleOpenWorkspaceAttachment}
|
||||
onChangeAttachments={draftInput.setAttachments}
|
||||
cwd={composerState.workingDir}
|
||||
getDraftRevision={draftInput.getRevision}
|
||||
clearDraft={draftInput.clear}
|
||||
editingSession={editingSession}
|
||||
autoFocus={shouldAutoFocusWorkspaceDraftComposer({ isPaneFocused, isSubmitting })}
|
||||
|
||||
@@ -952,7 +952,6 @@ interface ComposerProps {
|
||||
onForgeChangeRequestDetected?: () => void;
|
||||
onForgeChangeRequestAutoAttach?: (item: ForgeSearchItem) => void;
|
||||
cwd: string;
|
||||
getDraftRevision: () => number;
|
||||
clearDraft: (lifecycle: "sent" | "abandoned") => void;
|
||||
/** When true, auto-focuses the text input on web. */
|
||||
autoFocus?: boolean;
|
||||
@@ -1281,7 +1280,6 @@ function ComposerContentImpl({
|
||||
onForgeChangeRequestDetected,
|
||||
onForgeChangeRequestAutoAttach,
|
||||
cwd,
|
||||
getDraftRevision,
|
||||
clearDraft,
|
||||
autoFocus = false,
|
||||
autoFocusKey,
|
||||
@@ -1884,7 +1882,6 @@ function ComposerContentImpl({
|
||||
await submitMessage(submitText, submitAttachments);
|
||||
},
|
||||
clearDraft,
|
||||
getDraftRevision,
|
||||
setUserInput: replaceUserInput,
|
||||
setAttachments: (nextAttachments) => {
|
||||
setSelectedAttachments(composerWorkspaceAttachment.userAttachmentsOnly(nextAttachments));
|
||||
@@ -1907,7 +1904,6 @@ function ComposerContentImpl({
|
||||
clearDraft,
|
||||
completeSubmit,
|
||||
enqueueMessage,
|
||||
getDraftRevision,
|
||||
hasExternalContent,
|
||||
isAgentRunning,
|
||||
supportsQueue,
|
||||
|
||||
@@ -133,7 +133,7 @@ describe("sendQueuedMessageNow", () => {
|
||||
it.each([
|
||||
["steer", "a:steer"],
|
||||
["interrupt", "a:interrupt"],
|
||||
["queue", "a:steer"],
|
||||
["queue", "a:interrupt"],
|
||||
] as const)("with the %s send behavior promotes as %s", async (sendBehavior, expected) => {
|
||||
const queue = await queueHolding(queued);
|
||||
|
||||
|
||||
@@ -51,6 +51,6 @@ export async function sendQueuedMessageNow(input: {
|
||||
}): Promise<void> {
|
||||
await input.model.promote(
|
||||
input.messageId,
|
||||
input.sendBehavior === "interrupt" ? "interrupt" : "steer",
|
||||
input.sendBehavior === "steer" ? "steer" : "interrupt",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ const QUEUE_MAX_HEIGHT_COMPACT = 140;
|
||||
interface ComposerQueueTrackProps {
|
||||
serverId: string;
|
||||
agentId: string;
|
||||
/** The user's send behavior setting. Send now interrupts only when it is `interrupt`; otherwise it steers. */
|
||||
/** The user's send behavior setting. Send now steers or interrupts accordingly. */
|
||||
sendBehavior: SendBehavior;
|
||||
providerLabel: (provider: string) => string;
|
||||
onRestore: (message: RestoredQueuedMessage) => void;
|
||||
|
||||
@@ -35,7 +35,6 @@ describe("submitAgentInput", () => {
|
||||
canSubmit: true,
|
||||
queueMessage,
|
||||
submitMessage,
|
||||
getDraftRevision: () => 0,
|
||||
clearDraft,
|
||||
setUserInput,
|
||||
setAttachments,
|
||||
@@ -60,53 +59,6 @@ describe("submitAgentInput", () => {
|
||||
expect(clearDraft).toHaveBeenCalledWith("sent");
|
||||
});
|
||||
|
||||
it.each([
|
||||
{ delivery: "send", outcome: "failed" },
|
||||
{ delivery: "send", outcome: "submitted" },
|
||||
{ delivery: "queue", outcome: "failed" },
|
||||
{ delivery: "queue", outcome: "queued" },
|
||||
] as const)(
|
||||
"preserves edits made while a $delivery is pending ($outcome)",
|
||||
async ({ delivery, outcome }) => {
|
||||
let revision = 0;
|
||||
let text = "first message";
|
||||
let attachments = ["first.txt"];
|
||||
const setUserInput = (next: string) => {
|
||||
text = next;
|
||||
revision++;
|
||||
};
|
||||
const setAttachments = (next: string[]) => {
|
||||
attachments = next;
|
||||
revision++;
|
||||
};
|
||||
const deferred = createDeferredPromise<void>();
|
||||
const result = submitAgentInput({
|
||||
message: text,
|
||||
attachments,
|
||||
isAgentRunning: delivery === "queue",
|
||||
canSubmit: true,
|
||||
queueMessage: () => deferred.promise,
|
||||
submitMessage: () => deferred.promise,
|
||||
clearDraft: () => {
|
||||
setUserInput("");
|
||||
setAttachments([]);
|
||||
},
|
||||
setUserInput,
|
||||
setAttachments,
|
||||
getDraftRevision: () => revision,
|
||||
setSendError: vi.fn(),
|
||||
setIsProcessing: vi.fn(),
|
||||
});
|
||||
setUserInput("follow-up");
|
||||
setAttachments(["second.txt"]);
|
||||
if (outcome === "failed") deferred.reject(new Error("offline"));
|
||||
else deferred.resolve();
|
||||
expect(await result).toBe(outcome);
|
||||
expect(text).toBe("follow-up");
|
||||
expect(attachments).toEqual(["second.txt"]);
|
||||
},
|
||||
);
|
||||
|
||||
it("preserves the composer before an in-flight submit resolves when requested", async () => {
|
||||
const deferred = createDeferredPromise<void>();
|
||||
const attachments = [{ id: "img-1" }];
|
||||
@@ -128,7 +80,6 @@ describe("submitAgentInput", () => {
|
||||
canSubmit: true,
|
||||
queueMessage,
|
||||
submitMessage,
|
||||
getDraftRevision: () => 0,
|
||||
clearDraft,
|
||||
setUserInput,
|
||||
setAttachments,
|
||||
@@ -172,7 +123,6 @@ describe("submitAgentInput", () => {
|
||||
submitMessage: async ({ message }) => {
|
||||
sent.push(message);
|
||||
},
|
||||
getDraftRevision: () => 0,
|
||||
clearDraft: (lifecycle) => {
|
||||
composer.draft = lifecycle;
|
||||
},
|
||||
@@ -243,7 +193,6 @@ describe("submitAgentInput", () => {
|
||||
canSubmit: true,
|
||||
queueMessage,
|
||||
submitMessage,
|
||||
getDraftRevision: () => 0,
|
||||
clearDraft,
|
||||
setUserInput,
|
||||
setAttachments,
|
||||
@@ -283,7 +232,6 @@ describe("submitAgentInput", () => {
|
||||
submitMessage: async () => {
|
||||
throw error;
|
||||
},
|
||||
getDraftRevision: () => 0,
|
||||
clearDraft: vi.fn(),
|
||||
setUserInput,
|
||||
setAttachments,
|
||||
@@ -317,7 +265,6 @@ describe("submitAgentInput", () => {
|
||||
canSubmit: true,
|
||||
queueMessage,
|
||||
submitMessage,
|
||||
getDraftRevision: () => 0,
|
||||
clearDraft,
|
||||
setUserInput,
|
||||
setAttachments,
|
||||
|
||||
@@ -17,7 +17,6 @@ export interface AgentInputSubmitActionInput<TAttachment> {
|
||||
clearDraft: (lifecycle: "sent" | "abandoned") => void;
|
||||
setUserInput: (text: string) => void;
|
||||
setAttachments: (attachments: TAttachment[]) => void;
|
||||
getDraftRevision: () => number;
|
||||
setSendError: (message: string | null) => void;
|
||||
setIsProcessing: (isProcessing: boolean) => void;
|
||||
onSubmitError?: (error: unknown) => void;
|
||||
@@ -51,21 +50,18 @@ export async function submitAgentInput<TAttachment>(
|
||||
input.setUserInput("");
|
||||
input.setAttachments([]);
|
||||
}
|
||||
const submittedRevision = shouldClearOnSubmit ? input.getDraftRevision() : null;
|
||||
input.setSendError(null);
|
||||
input.setIsProcessing(true);
|
||||
|
||||
try {
|
||||
const deliver = shouldQueue ? input.queueMessage : input.submitMessage;
|
||||
await deliver({ message: trimmedMessage, attachments });
|
||||
if (!shouldClearOnSubmit || input.getDraftRevision() === submittedRevision) {
|
||||
input.clearDraft("sent");
|
||||
}
|
||||
input.clearDraft("sent");
|
||||
input.setIsProcessing(false);
|
||||
return shouldQueue ? "queued" : "submitted";
|
||||
} catch (error) {
|
||||
input.onSubmitError?.(error);
|
||||
if (shouldClearOnSubmit && input.getDraftRevision() === submittedRevision) {
|
||||
if (shouldClearOnSubmit) {
|
||||
input.setUserInput(trimmedMessage);
|
||||
input.setAttachments(attachments);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import { DEFAULT_BROWSER_PROFILE_SLUG, useBrowserProfileCatalog } from "../profiles";
|
||||
import {
|
||||
DEFAULT_BROWSER_PROFILE_SLUG,
|
||||
getBrowserProfilePartition,
|
||||
useBrowserProfileCatalog,
|
||||
} from "../profiles";
|
||||
import { ProfileSelector } from "./profile-selector.electron";
|
||||
import {
|
||||
useCallback,
|
||||
@@ -827,12 +831,16 @@ export function BrowserPane({
|
||||
const updateBrowser = useBrowserStore((state) => state.updateBrowser);
|
||||
const setBrowserViewport = useBrowserStore((state) => state.setBrowserViewport);
|
||||
const setBrowserRoutingMode = useBrowserStore((state) => state.setBrowserRoutingMode);
|
||||
const proxyState = useHostBrowserProxy({
|
||||
serverId,
|
||||
routingMode: browser?.routingMode,
|
||||
profileSlug,
|
||||
});
|
||||
const activePartition = proxyState.kind === "ready" ? proxyState.partition : null;
|
||||
const proxyState = useHostBrowserProxy({ serverId, routingMode: browser?.routingMode });
|
||||
const isLocalProfileMode =
|
||||
proxyState.kind === "ready" && proxyState.effectiveRoutingMode === "local";
|
||||
let activePartition: string | null = null;
|
||||
if (proxyState.kind === "ready") {
|
||||
activePartition =
|
||||
proxyState.effectiveRoutingMode === "host"
|
||||
? proxyState.partition
|
||||
: getBrowserProfilePartition(profileSlug);
|
||||
}
|
||||
const browserViewport = browser?.viewport ?? RESPONSIVE_BROWSER_VIEWPORT;
|
||||
const browserViewportRef = useRef(browserViewport);
|
||||
browserViewportRef.current = browserViewport;
|
||||
@@ -1805,13 +1813,15 @@ export function BrowserPane({
|
||||
initialValue={draftUrl}
|
||||
/>
|
||||
</View>
|
||||
<ProfileSelector
|
||||
selectedSlug={profileSlug}
|
||||
catalog={catalog.data ?? []}
|
||||
triggerStyle={profileTriggerStyle}
|
||||
onSelect={selectProfile}
|
||||
refresh={refreshProfiles}
|
||||
/>
|
||||
{isLocalProfileMode ? (
|
||||
<ProfileSelector
|
||||
selectedSlug={profileSlug}
|
||||
catalog={catalog.data ?? []}
|
||||
triggerStyle={profileTriggerStyle}
|
||||
onSelect={selectProfile}
|
||||
refresh={refreshProfiles}
|
||||
/>
|
||||
) : null}
|
||||
<View style={styles.chromeRight}>
|
||||
<DeviceSizeMenu
|
||||
selectedId={selectedDeviceSizeId}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user