Compare commits

..
Author SHA1 Message Date
Mohamed Boudra 95542dbfe6 Show the current Claude usage after switching accounts (#10236)
* fix(usage): show the current Claude account after a login switch

Agent usage discovery kept the old account bound to a credential store after an account switch. Refresh those discoveries and have the usage source verify account ownership when it rereads the store.

* test(server): synchronize the provider update check fixture

The Windows runner can finish reading the installed version before the update callback starts. Wait for the callback to start and keep it pending while verifying the independent reads.
2026-11-19 22:10:26 +07:00
paseo-ai[bot] 1a45b46840 fix: update lockfile signatures and Nix hash [skip ci] 2026-11-19 14:40:12 +00:00
Mohamed Boudra 93ff95b20f Reconcile 0.17.0 beta metadata (#10233)
* docs(changelog): prepare 0.17.0 beta

(cherry picked from commit fbbfcf42bc)

* chore(release): cut 0.17.0-beta.1

(cherry picked from commit 6c89950b2e)
2026-11-19 21:31:18 +07:00
Mohamed Boudra d5d385afa7 Show each provider's state in the list and open one provider page everywhere (#9661)
* fix(app): leave providers that are not installed out of the model picker

An agent's own provider stays in its selector, labelled Unavailable.

* feat(app): open a provider's detail as a Settings page or a sheet

Settings → Providers now pushes a provider page, like Projects and Plugins;
the model picker gear and setup keep a sheet. Both frame one body, ordered
error, Enabled, Installation, Models, Troubleshooting, Danger zone, so the
old sheet's sticky footer and Retry button are gone. Refresh lives once, in
the Troubleshooting status row.

The page header (back link, icon, title) moves into the shared settings kit
so projects, plugins and providers line up on the same rails.

* feat(app): show each provider's version, updates and faults in the list

Each row now says how its provider is: version and model count, Update
available, a spinner while an update runs, a red dot with the error, or
Not installed / Disabled. Only a broken provider gets a dot, and a
provider that is not installed has no switch, since the model picker
already leaves it out. The kebab is gone; Remove lives on the detail.

Rows read the same installation and update queries as the detail, so
opening a provider costs no new requests. Hosts without
providerInstallation still get a correct list from the snapshot alone.

Add provider is a "+ Provider" button in the header and a muted last row;
both open one sheet with search and catalog rows, replacing the tile grid.
After Add, the new provider's detail opens.

The row is the settings kit's detail row, which gains a leading icon, a
hint status (spinner, error dot, or a held line) and a control before the
chevron. The Unistyles test stub now applies withUnistyles theme mappings,
so browser tests render components that read colours through the theme.

* feat(app): open setup's provider pages over the setup card

The detail and Add provider sheets take the setup card's frame and a back
arrow, so they read as pages of setup instead of a sheet over it. The step
is renamed "Your providers" to match the list it shows.

* docs: describe the provider list and pages as they are now

* fix(app): keep settings rows one height and on one icon rail on phones

On touch layouts a switch reserves a 44px control, so in the provider list
rows with a switch stood 10px taller than "Not installed" rows without one.
Card rows now reserve a default control's height, the rule nested rows
already follow.

A compact SettingsRow wrapped with a full `gap`, which added 12px on top of
the leading slot's margin: catalog icons sat 24px from their labels instead
of 12px. The wrap only needs space between lines, so it uses `rowGap`.

* fix(app): keep a provider row's error to one line

A long or multi-line error wrapped the hint to two lines with the dot
centred between them. The row cuts it to one line; the provider's page
shows it in full.

* fix(app): title a provider's Settings page like a project's

The page title and the detail header both named the provider. The screen
now titles it "Providers" and the page names the provider once, the way a
project's page does.

* fix(app): keep a settings row's switch out of the row's button

The provider row's switch rendered inside the row's <button>. That is
invalid markup, and keys reached both: Enter on the switch toggled it and
also opened the provider's page, and Space on it opened the page without
toggling.

SettingsRowHeader now lays its press target under the row's content as a
sibling of the control. The content lets presses through to the button and
stays out of the accessibility tree, where the button's label already names
the row. Hover is tracked on the row, so it holds over the switch.

* fix(app): reserve a control's height only on rows that open something

The previous change gave every card row a control's minimum height and
the design doc said so, but rows built directly on settingsStyles.row
(66 uses) never got it: a single-line row was 48px or 64px depending on
which code path built it.

The minimum now belongs to SettingsRowHeader, the row with an optional
control slot, so a list where only some rows carry a switch keeps one
height. SettingsRow and hand-built rows take their content's height again,
as on the base branch, and the doc states the narrower rule.

* test(app): give the Unistyles stub the light theme's full colours

Since the stub started applying withUnistyles theme mappings, a mapping
reading a colour the stub's theme lacked crashed: the markdown styles read
colors.terminal and failed the plan card disclosure tests. The stub's
colours now start from the light theme, with its own values pinned on top.

* test(app): find the provider page's buttons in the compact sheet

On compact layouts AdaptiveModalSheet puts its testID on the header only,
so buttons in the page body cannot be found inside it. The spec looks them
up on the page, as it did before the page moved into the sheet.

* fix(app): let screen readers read a settings row's state line

The row's button carries the row's name as its label, so only the title is hidden from assistive tech now; the hint below it (a provider's version, error or Not installed) is read again.

The Enter-on-switch test now dispatches its key events synchronously inside one act. An awaited keyboard call let the Switch's animation run a frame after the test, which Vitest reported as an unhandled error and failed the run.

* fix(app): don't open a provider's page after its Add sheet was closed

Adding a provider waits for the daemon to probe it. If the user closed the sheet during that wait, the completed add still navigated to the provider's page. The add now remembers which sheet session started it and only opens the page if that session is still current.

* fix(app): say Not installed for a disabled provider that is not installed

A disabled provider's snapshot status is unavailable, so the row said Disabled even when the binary was missing. The installation inspection is checked first, so Not installed wins over Disabled.

* fix(app): keep a saved provider choice visible when it is not installed

The provider picker drops unavailable providers. A schedule or metadata-generation setting saved against such a provider then showed Select model. The picker now keeps the saved provider, labelled Unavailable, so the user sees what is set and can change it.

* test(app): wait for an added catalog provider's probe before continuing

Adding a provider opens its page only after the daemon probes it, which can outlast the default expect timeout on CI.

* refactor(app): name the provider picker's connection and saved-choice options

Callers passed a bare true to reach the saved-choice argument.

* fix(app): show a provider page's loading and not-found states

A provider page opened from its URL (a reload, a cold start, a shared link) rendered its title over nothing until the host's providers arrived, and forever when the id named a provider the host doesn't have. The page body now says Loading..., that the host is offline, that the providers couldn't be read, or that the provider isn't on this host, in the same notice card the provider list uses when it is offline. The page and both sheet frames share the body.

* fix(app): don't call a just-removed provider missing while its page closes

The daemon can publish the provider list without the removed provider before it answers the config patch, so the page said "This provider isn't on this host" until the answer arrived and it navigated away; in a sheet, through the exit animation as well. A page that has shown its provider now shows nothing once it leaves the list. The not-found notice is for a page that never found its provider. The removal e2e holds the config answer so it always sees that order.

* fix(app): show the not-found notice when a provider is removed elsewhere

The page hid the notice for any provider it had shown before, to cover its own Remove. A removal from another client, the CLI or a plugin then left the page blank with no way to tell why. The page now owns its Remove: while that runs and once it succeeds the body shows nothing, and any other absence says the provider isn't on this host.

The removal e2e routes only the e2e daemon's socket, so the fixture's port-6767 guard stays in force.

* fix(app): show progress on the provider page's in-flight buttons

Remove, Add model and the diagnostic re-run now show their work on the
pressed control, like the page's Refresh and Update: a spinner, no
further presses and, on a labelled button, "Removing..." or "Adding...".

Remove kept its label and only disabled itself, and the page went blank
mid-removal: the daemon publishes the provider list without the removed
provider before it answers the config patch, so the body had nothing to
show and each frame's title fell back to the raw id. The removal now
keeps the entry the user confirmed, and one hook feeds the frame's title
and the body, so both keep showing the provider until the page closes.
The in-flight state also starts after confirmation, not while the
dialog is open.

The diagnostic sheet's header icon buttons had lost the base branch's
spinner and dimming; SheetHeaderIconButton now takes loading and
disabled, the way Button does.

* fix(app): don't leave a re-added provider's sheet stuck on Removing...

The setup step and the model picker's gear keep a provider's sheet
mounted after it closes, keyed by provider. A finished removal stayed
set in that sheet, so adding the same provider back reopened it with
Remove spinning and disabled. A finished removal now ends when the host
lists the provider again.

* fix(app): keep the composer's remembered provider in its picker

The picker leaves out providers that aren't installed, except the one
holding the picker's current choice. The schedule form and metadata page
passed that choice; the new-agent composer didn't, so a remembered
provider not installed on this host vanished from the picker and the
trigger read "Select model" with no reason given. The builder now requires
every caller to say what its current choice is, or null.

* fix(app): guide a missing catalog provider's install and keep custom models while one fails

A provider added from the Add provider catalog runs through the generic ACP client, which reports
no installation, so its page said nothing when the CLI was missing. The page now shows the
Installation section's Not installed row with Install opening the catalog's guide. A link the
host supplies still wins.

Custom models live in config, so the page lists them and offers Add model whenever the provider
is enabled and installed, including while it fails. The provider's own models, and the search
over them, still show only while it runs.

* fix(app): make settings rows pressable on iOS and Android

React Native 0.86 no longer exports StyleSheet.absoluteFillObject, and
Unistyles' native StyleSheet copies it from React Native, so the spread
was empty there. The row's press target then had no size: on Android,
tapping a provider row or a Voice row did nothing. Web was unaffected
because Unistyles' web StyleSheet still defines the key. Use
StyleSheet.absoluteFill, as the rest of the app does.

* fix(app): let setup's provider sheets leave out the close button again

The base's sheet header rewrite dropped SheetHeaderView's showCloseButton,
which the provider page and Add provider sheets pass when setup's back
arrow is the only way out. Restore it on the header.

* test(app): prove a refresh clears a failed update from the provider's row

The update-failure journey now also walks the provider list: after Refresh
on the page the row reads its version and model count with no error dot,
and a refresh from another client clears a row that is open in the list.
Without the provider.installation.update.cleared handling both row checks
fail. The helper's Refresh now uses the page's Troubleshooting button,
since Settings opens the provider as a page, not a sheet.

* fix(app): show a catalog provider's install guide on hosts that cannot report installations

A host without providerInstallation returns an unsupported installation,
which the page passed through, so a catalog provider whose CLI is missing
showed no Installation section and no guide anywhere. The guide is the
app's own catalog data, so the page builds the same Not installed row
from it on those hosts.
2026-11-19 21:30:31 +07:00
Mohamed Boudra 86ebdedcbe Apply content width presets to open chats (#10231)
* fix(app): apply content width presets to open chats

Retained rows kept the numeric width in their generated web styles. Use a CSS variable so the timeline, composer, and Markdown previews follow the same preference while mounted. Reserve the outline gutter when the outline is enabled on a wide pane.

* fix(app): keep capped chats centered beside the outline

Reserve the left outline gutter and match it on the right when the selected column fits between both gutters.
2026-11-19 21:12:36 +07:00
Mohamed Boudra 4d29ee415a Show provider versions and run provider updates from provider settings (#9568)
* feat(providers): show installed version and install link in provider settings

Providers can now declare `installation`: install and update links plus an
`inspect` callback that reports installed state and an opaque version string.
Built-in clients and plugin providers share one contract; plugins receive the
daemon-resolved launch with `resolved: false` when the executable is missing,
so they can report not installed instead of failing.

The daemon calls `inspect` only on the new
`provider.installation.inspect.request` RPC, never from availability probing,
discovery or session creation, so a slow version probe cannot delay agents.
Results are cached per client for 30s, deadlined at 20s, and links survive a
failed probe. The app gates the provider sheet's Installation row on
`server_info.features.providerInstallation`, so older hosts show nothing new.

* feat(providers): show available updates in provider settings

Providers can now declare `installation.checkForUpdates`, returning
`current`, `available` with opaque `versions` and `message`, or `unknown`.
The provider decides what counts as newer; Paseo shows its answer as
written and never parses or compares versions.

The check is its own RPC, `provider.installation.check_updates`, so the
installed version never waits on a network lookup. The daemon caches a
conclusive answer for an hour and an inconclusive one for 30s, shares
in-flight calls, and deadlines the call at 25s, below the plugin RPC
timeout. A throw or timeout comes back as `error`, which the app shows as
inconclusive, never as up to date. The sheet's Refresh bypasses the cache.

Codex and Claude Code read the release source their own updaters use:
the Homebrew cask for cask installs, otherwise the GitHub latest release
for Codex and the configured `autoUpdatesChannel` for Claude Code.
`codex doctor --json` reports the same answer but scans local state and
took close to a minute, so it is not used. Muse compares its build with
the launcher's channel manifest, the same rule the launcher updates by.

The install link now shows whenever the provider declares `installUrl`
and is not reported installed: the Install button for `not_installed`, a
quieter "Install instructions" link when the check failed or the
provider only links to a guide.

* feat(providers): run provider updates from provider settings

Providers can declare `update(context)`, and the Installation section shows an Update
button when an update is available. The daemon owns the operation: one per provider,
joined by later requests, kept in memory past client disconnects, streamed to subscribers
through an owned subscription, and aborted only when the daemon stops. The provider's
answer is the outcome; the daemon adds no verification. After success it drops the cached
inspection and update check and refreshes discovery, without restarting agents.

Codex and Claude run their own `update` subcommand and pass the output through. Muse has
no update subcommand, so it does not declare one.

Updater output is capped at 64 KiB per update so a chatty updater cannot grow daemon memory.
Starting an update requires daemon.manage because it runs commands on the host.

* feat(providers): report installation for the remaining providers

Copilot, OpenCode, Pi, Oh My Pi, Antigravity and Hoplite now show an
install link and the installed version in provider settings. Each one
declares only what its CLI offers:

- Update checks ask the source the CLI's own updater reads: Pi's
  latest-version endpoint, `omp update --check`, and Hoplite's
  latest.json. Copilot and OpenCode resolve their release inside the
  binary, so they declare no check.
- Updates run the CLI's own command: `copilot update`, `opencode
  upgrade`, `pi update --self` (leaves Pi packages alone), `omp update`.
  Antigravity and Hoplite document no self-update.

OpenCode's success message asks for a daemon restart, because all
OpenCode agents share one server that keeps running the old version.

* docs(providers): document the provider installation contract

Plugin authors get the contract in the provider guide, with a worked
example that reports a version, checks for an update and runs the CLI's
own updater, and every field, deadline and cache in the reference.
The internal provider and plugin docs record why the three callbacks are
separate, that versions are opaque, that Paseo adds no verification to
an update, and how the plugin bridge carries and cancels each request.

* chore(protocol): mark provider installation as shipping in v0.17.0

main is on the 0.16 beta series, and a promotion ships the tested beta's
content without pulling from main, so this lands in the next minor.

* fix(app): bound update output and show refresh failures in provider settings

The screen appended every progress chunk with no limit while open, so a
noisy updater grew memory and never showed the truncation note that a
reopened screen shows. Progress now folds with the daemon's 64 KiB limit.

A manual refresh stored its result and failure outside the queries the
screen reads, so a failed refresh brought back the old answer with no
warning. Refresh now runs through those queries. It passes staleTime 0
because the app's default staleTime of Infinity would otherwise answer
from the cache.

The not-connected error uses the translated string the i18n check
requires.

* fix(providers): keep update checks in step with the installed version

A conclusive check is cached for an hour and was not tied to the version
it answered for. After a CLI updated outside Paseo, settings showed the
new version and still offered Update to it. When an inspection reports a
different version, the cached check is dropped. Versions are compared
for equality, so they stay opaque.

The release comparison dropped prerelease suffixes, so Codex
0.200.0-alpha.1 looked current against 0.200.0. A prerelease now comes
before the release with the same numbers. Two different prereleases of
the same release are reported as unknown.

* docs(providers): say when Update instructions shows

* fix(providers): reuse a cached update check only for the version it answered

The previous fix dropped the cached check after an inspection settled
with a new version. On reopen the app sends inspect and check together,
so the check answered from the stale entry before the inspection
settled. A cached check now records the installed version it was
computed against and is reused only when the current inspection, shared
if in flight, reports the same version.

* fix(app): refresh provider version after an update settles while disconnected

The installation and update queries were invalidated only by a live
succeeded progress event. A connection dropped mid-update delivered the
settled operation as a snapshot on reconnect, which left the old version
and Update on screen. A success the view saw running now rereads them
whether it arrives as progress or as a snapshot.

* fix(providers): keep update checks within their own deadline

Tying a cached check to its version made every check wait for a fresh
inspection, which could add the 20 s inspect deadline to the 25 s check
deadline. A check now never starts an inspection. It waits on one only
when the inspection is cached or already running and the check would
reuse a cached answer. When it asks the provider, it records the version
afterwards.

* test(app): assert provider installation states are visible

* fix(providers): share one update check when two clients reopen after a version change

* fix(muse): report the build the update check compares

Paseo reuses a cached update check while inspect reports the same
version string. Muse reported 1.4.18 but compared its build
(1.4.18-R8600.1), so a new build of the same release kept the stale
"Update available" for up to an hour. The contract docs now say to
include everything the check compares in the reported version.

* test(app): scroll custom model rows into view before checking them

The provider sheet now shows an Installation section above the model
lists. At 390x1000 the custom model row sits under the sheet footer
until scrolled. The spec checks that a long model id leaves its Remove
button reachable. It had assumed the row needed no vertical scroll.

* test(app): keep the custom model check sensitive to a Remove button pushed off the sheet

scrollIntoViewIfNeeded on the Remove button scrolled the overflow-hidden model
card sideways too, so the check passed with the long-id layout fix undone.
Scroll only the Custom models heading into view, which moves the sheet
vertically and leaves the card at scrollLeft 0. With the layout fix undone the
spec now fails at 1200px and 390px again.

* feat(app): offer provider updates whether or not an update check answers

Update and Update instructions lived inside the row that appeared only after
checkForUpdates answered, so Copilot and OpenCode, which declare update but no
check, never offered either. A check is a convenience: the Updates row now
shows for an installed provider that offers an update, keeps Update or Update
instructions in place in every check state (none, checking, up to date,
available, couldn't check), and shows what the check knows as a hint beside
it. A provider that offers no update still shows the check's answer once it
has one. The daemon already ran update without a check; a test now says so.

* fix(app): let update output scroll inside the provider sheet on Android

The output box is a ScrollView nested in the sheet's scrolling body. Android hands the drag to the outer ScrollView unless the inner one sets nestedScrollEnabled, so only the last 240px of a long update's output was readable. The tool-call detail views set the same flag.

* fix(app): show one progress indicator per provider update and refresh

While an update ran, the Update button and the update's row each showed a spinner. The button's
spinner also widened it, and the row's leading spinner shifted the title when the update settled.
The update's row now owns progress from the tap until the update settles: it shows the update
starting before the host answers, so the indicator never moves, and the Update button only
disables.

Refresh blanked the Installation rows while the provider was asked again, then moved "Checking…"
from the Version row to the Updates row. The rows now keep their last answers until the new ones
arrive, and the Refresh button shows the refresh until both the models and the installation are
read again.

* fix(app): show a provider update's progress on its Update button

The pressed button carries an action's progress everywhere else in Settings: Button's own
loading state with a present-participle label, as Browser data's Clear and Project settings'
Save do. Update now does the same, reading "Updating..." from the tap until the update settles,
and the update's row holds only the output while it runs, then the result. This replaces the
row-owned spinner from the previous commit, which no other surface uses.

The installation's in-flight labels use three dots like their siblings.

* fix(app): keep a running update's progress visible whatever the inspection reads

Update carries the update's progress, but its row rendered only while the inspection read
"installed". An inspection that ran during the update (on reopen or Refresh) could read loading,
not installed or failed while the binary was replaced, and the sheet then showed nothing about the
running update. The Updates row now stays while an update runs.

* fix(server): show and update the provider CLI its agents launch

The installation contract found the CLI on the daemon's PATH, while agents
spawn the bare command with the provider's environment. A provider whose env
sets PATH could launch one copy and show and update another, so an update
succeeded while new agents kept the old version. The CLI is now resolved with
the provider's environment.

The section test's check-state table now always names the text it expects, so
no case can skip its assertion.

* test(server): name the provider PATH test for what it shows

The availability check that gates a Copilot spawn still looks on the daemon's
PATH, so the copy on the provider's PATH is not always the one agents launch.

* test(antigravity-provider): read the version from the CLI, not its acp subcommand

Antigravity now launches `agy acp --disable-telemetry`, so the launch the
installation receives ends with the ACP subcommand. The version read drops it,
since `agy acp --version` starts the ACP server.

* feat(plugin): pass the inspected version to checkForUpdates

checkForUpdates now receives installedVersion, the version inspect reported, and
the daemon keys the cached answer on it. Before, each provider read its version
a second time and the daemon recorded which version a cached check answered
for, so a check could compare a different version than the one shown, and a
plugin had to put everything its check compared into the reported version.

An update check now waits for the provider's inspection (shared with a
concurrent inspect, refreshed with it), answers Not installed or the
inspection's error without asking the provider, and is asked again once the
inspection reports a different version.

* fix(server): clear a failed provider update when the provider is refreshed

The daemon kept a provider's last update for its whole lifetime, so a failed
update stayed the current update until a later update succeeded or the daemon
restarted, and the provider looked broken after the user fixed it. A refresh
of the provider's installation or update check now drops a failed result. A
running update is never dropped.

* docs(server): say which agents look up the provider CLI on its PATH

* fix(server): tell open provider views when a refresh drops a failed update

A refresh deleted the failed update on the daemon but sent nothing, so a view
already observing the provider's updates, in this client or another one, kept
showing the failure until it observed again. The daemon now pushes
provider.installation.update.cleared with the dropped operation's id to every
subscriber, and the app clears the update it shows when the ids match.
2026-11-19 20:56:00 +07:00
paseo-bot[bot] 32218adfec Read a restored worktree again instead of serving its not-git snapshot (#10224)
When a worktree folder disappears, the workspace git service can cache a
not-git snapshot before it notices and suspends the workspace. After the
folder comes back, a plain getSnapshot returned that cached snapshot
before it tried to resume, so checkout status said "not a git repository"
until the 60 s missing-folder probe. The Changes panel of a just-restored
worktree had no repository header during that time.

Resume a suspended workspace first, then serve the cached snapshot.

This made e2e worktree-restore.spec.ts:167 flaky in CI.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-19 12:48:36 +00:00
Matt Pilsbury 4929ed5a0f fix(codex): restore subagent status after reopen and rewind (#10171)
* fix(codex): settle historical collaboration subagents

* fix(codex): reconcile replayed collaboration with child turns
2026-11-19 12:07:48 +00:00
Mohamed Boudra c951de2332 Keep waiting heartbeats out of Running (#10216)
* fix(agents): keep waiting heartbeats out of Running

* fix(protocol): keep the work count default as a wire contract

* test(app): verify heartbeat status before, during, and after its turn
2026-11-19 18:45:40 +07:00
paseo-bot[bot]andClaude Opus 5.5 4fb95106e7 Notify once while an agent's finish is unread, not on each turn it starts on its own (#10200)
* fix(server): notify once while an agent's finish is unread

Since v0.16.0, a turn that an agent starts on its own cleared the
agent's unread "finished" attention. Every such turn that then ended
raised a new "finished" notification. A Claude Code agent that reacts
to each event of a Monitor or a background task starts one turn per
event, so the user got a notification every few seconds.

A turn that the agent starts on its own now clears only error
attention, which is what the earlier change intended. An unread finish
stays unread, so the next finish does not notify again. After the
user reads the agent, the next finish notifies as before. A prompt
from the user still clears all attention.

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

* fix(server): notify a repeat finish the user was not told about

The previous commit kept an unread finish across turns that an agent
starts on its own, and the agent manager then sent no attention for
the later finishes. Suppose the user had the agent on screen for the
first finish. The app keeps that finish unread, and no notification
is sent while the agent is on screen. After the user left, no later
finish notified at all.

The agent manager now reports each finish, and marks a finish that
repeats an unread finish. The websocket server owns delivery, so it
records whether it delivered a notification for the unread finish.
A repeat notifies only when nothing was delivered for it yet.

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

* fix(server): key the notified unread finish by its attention timestamp

The websocket server recorded only that it had notified for some
finish of an agent. Mark as unread starts a new unread finish without
an attention event, so a later repeat used the record of an older
finish that the user had already read, and sent nothing.

The attention callback now carries the timestamp of the agent's
current unread attention, which identifies the unread finish. The
server stores the timestamp it notified for, and suppresses a finish
only when it belongs to that same unread finish. This replaces the
repeatsUnreadFinish flag.

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 11:08:01 +00:00
Mohamed Boudra c4e8c17022 Wait for starting file watchers to close during shutdown (#10208)
* fix(server): drain starting file observations during shutdown

Workspace Git aborts starting watchers on shutdown. The observer only tracked completed subscriptions, so close could return while a startup scan was still releasing its resources.

* test(server): verify watcher release during startup shutdown

Use an internal backend adapter to hold startup open and observe watcher release when close returns.

* fix(server): leave startup scan drainage to watcher backends

Both backends already drain their admitted scans. Preserve cleanup for a failed root lookup after the observer takes ownership up front.
2026-11-19 18:07:00 +07:00
Mohamed Boudra 69c6bd7464 Keep the model tooltip closed when opening the picker
Pressing the model picker shortcut now focuses search without opening the button tooltip. Attach picker hints to the shared trigger button so focus inside the picker stays independent.
2026-11-19 17:26:15 +07:00
ad3c490a52 Keep a file view's scroll position when switching Preview and Source (#10195)
* Keep a file view's scroll offset when switching Preview and Source

A file tab rendered either its Preview or its Source, so each switch
unmounted the view on screen and its scroll offset with it. Coming back
started at the top of the file.

Each view now stays mounted once shown and is hidden with RetainedPanel
while the other view shows. The hidden Preview keeps the text it last
showed, so editing in Source does not render it on every change.

Co-authored-by: apple-ouyang <45086632+apple-ouyang@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Assert what the file pane shows, not that the other view unmounted

The Preview and Source views now stay mounted once shown, so the file
editing spec checks the visible heading and a hidden HTML preview.

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

* Load the HTML preview again in the WebView that shows after a hidden panel

iOS destroys the native WebView of a hidden retained panel and makes a new
one when the panel shows. The navigation guard latched the document per
component mount, so it refused the new WebView's load of the same document
and the preview stayed blank after Source -> Preview. The guard now releases
the latch while its retained panel is hidden.

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

* Name the iOS HTML preview as the view that does not keep its offset

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

* Load a changed HTML document in a new preview frame on web

The Preview stays mounted and hidden while Source shows. When the file
changed meanwhile, the Preview got the new document in the same render
that showed it again. Chromium left the reused iframe blank in that case
until the next Source/Preview switch. Key the iframe by its document so
each document loads in a new frame.

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: apple-ouyang <45086632+apple-ouyang@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 09:53:05 +00:00
Mohamed Boudra 120df507a9 Start a workspace in an existing worktree, and branch off or check out any branch or pull request (#10190)
* feat(server): branch off a pull request and list every git worktree

A workspace.create worktree source with action "branch-off" and a
checkoutSource used to check the pull request out, because core took
any change request as a checkout. Branch-off now fetches the pull
request's head into a remote-tracking ref (origin/<head> for a
same-repo head, paseo-pr-<N>/<head> otherwise) and starts the new
branch there, with no upstream and no remote added. A request with no
action still checks the pull request out, as older clients expect.

checkout.worktrees.list returns all git worktrees of the repository,
not only the ones Paseo created, so the New workspace screen can offer
any of them. Bare and prunable entries are left out.

Hosts advertise both through server_info.features: worktreeRefActions
and checkoutWorktreeList. Older hosts ignore the branch-off action on a
pull request, so the app must gate on the flag.

* feat(app): pick an existing worktree, and branch off or check out a ref

Isolation now offers Project directory (was "Local"), New worktree, and
Existing worktree. Existing worktree is a local workspace at the chosen
worktree's path, not a third isolation value, so plugins, preferences, and
the create request still see "local". The list comes from
checkout.worktrees.list, so it includes worktrees Paseo did not create.

The ref picker gains Branches / Pull requests pills and a Branch off /
Check out toggle with a tooltip per action. Branches default to Branch off
and pull requests to Check out. On a host without worktreeRefActions the
toggle is hidden and the defaults apply.

Git keeps a branch in one worktree at a time. Picking a held branch in
Check out mode moves to the worktree that holds it, and creating from a
held branch that was never picked fails with an explanation. Without
this the server would silently check out a "<branch>-1" copy.

* docs: describe Existing worktree and Branch off / Check out

* fix(server): give a fork pull request branch-off a base the repository has

A branch off a fork's pull request stored the fork's head as its base, under
refs/remotes/paseo-pr-<N>. Create PR then asked for a pull request into a
branch the base repository does not have, and the ref piled up in base branch
pickers because no remote owns it. The new branch now starts at the fetched
head, kept under refs/paseo/change-requests/<N>, and its base is the pull
request's base branch. A same-repository branch-off still stacks on the pull
request's branch.

A routed create_workspace with a prNumber and no mode checks the pull request
out again, as before branch-off could start from a pull request.

The worktree list skips a locked worktree whose directory is gone, since it
cannot be opened.

* fix(app): start an existing worktree's agent in that worktree

Existing worktree created the workspace at the worktree, but the composer and
terminal still used the project directory, so the daemon rejected the first
agent as outside the workspace. The screen now derives one working directory
from the isolation and uses it for the workspace, the composer, and the
terminal. A worktree that left the list is no longer a choice.

The ref picker names change requests the way the project's forge does, so a
GitLab project shows Merge requests. The schedule form uses the isolation
labels Project directory and New worktree.

* fix(server): compare a fork pull request branch-off against the remote base

The base was stored as the bare branch name, which resolves to the local branch
first. A local main behind origin/main put upstream commits in the workspace's
changes for its whole life, and a base branch the clone never fetched failed
creation. The base branch is now fetched from origin and stored as its
remote-tracking ref.

* fix(server): take a pull request's base and a checked-out branch from the remote that has them

A fork branch-off fetched its base from origin. In a clone whose base
repository is upstream, origin is the user's fork or missing, so the base was
stale or the create failed. The base now comes from the remote that served the
pull request, and a failed base fetch falls back to the bare branch name.

Check out of a branch that only a remote other than origin has failed with an
unknown branch. The local branch is now created from the one remote-tracking
ref with that name, tracking it, as git does.

The fork branch-off test passes a git identity to commit-tree, which CI
runners do not have.

* fix(server): branch off a pull request from the remote that serves it

A same-repository pull request's head was fetched into refs/remotes/origin.
In a fork clone, upstream serves the pull request and origin is the fork, so
the base refresh replaced the head with the fork's branch of the same name and
the new branch started from code that is not the pull request. The head now
lands under refs/paseo/change-requests/<N>, the branch starts there, and the
base is fetched from the remote that served the head.

A routed create_workspace that branches off a pull request is refused, as it
is on the local host.

* fix(app): branch off a plugin's base ref whatever the branch action

setBaseRef chose the base but kept the user's Check out switch, so a plugin's base became a checkout or a held-branch error. A base is what a new worktree starts from, so setBaseRef switches branches back to Branch off.
2026-11-19 16:31:38 +07:00
paseo-bot[bot]andClaude Opus 5.5 b76533830a test(terminal): wait for a killed worker's processes before cleanup (#10198)
Four worker-terminal-manager tests SIGKILL a terminal worker whose
terminal program runs in the test's temporary home. On Windows that
program ends only when the dead worker's console closes, a moment
later. afterEach then removed the home with a 0.5 s retry budget, and
Windows refuses to remove a directory that is a live process's working
directory, so cleanup failed with EBUSY.

The tests now kill a worker through crashWorker, which records the
worker and its terminal programs. afterEach waits up to 10 s for them
to end before it removes the temporary dirs.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 09:30:41 +00:00
Mohamed Boudra 68cfad2c8a Add interactive permissions and session history to Antigravity (#10193)
* feat(antigravity): run sessions through the shared ACP provider

Use Antigravity’s ACP server for workspace sessions, mode changes, approvals, and conversation history. Keep existing conversations importable and migrate saved Full access sessions to Default.

* fix(acp): finish delayed history replay before sessions become ready

Keep delayed load updates on the history side of the readiness boundary. Reuse the ACP catalog and configuration mapping to translate legacy Antigravity selections and document the approval requirements for scheduled runs.

* fix(antigravity): preserve Full access in ACP sessions

Keep unattended Antigravity runs working through the shared ACP permission policy. Commit a Full access change only when the session is idle and retire unanswered approvals when a turn ends.

* fix(acp): cancel pending approvals when stopping a turn

Send the approval cancellation when the client asks the agent to stop. Agents that wait for the approval response can then finish the turn, and late replies to closed approvals leave the session usable.
2026-11-19 14:21:12 +07:00
Mohamed Boudra c1f04a8cae Keep Changes available when Git metadata watching fails (#10188)
* fix(server): keep Changes available when Git metadata watching fails

A valid checkout could lose its first comparison when metadata observation exceeded the directory limit. Keep working-tree observation active and share a backing-off metadata sample per Git root so quiet comparisons stay idle.

* fix(server): probe only revisions used by degraded Changes streams

Reuse each comparison's initial Git resolution as the baseline. Batched ref lookups run after subscription setup, stay bounded when the repository has a large ref table, and refresh only comparisons with changed inputs.

* fix(server): report Changes metadata fallback in daemon diagnostics

Log the watcher failure once per root and count comparisons currently using the fallback. Exercise the transition from an active watcher to polling and the release of the last comparison.

* fix(server): keep Changes probes working across Git versions and worktrees

Use line-delimited batch input for older Git versions. Resolve shared refs in the common Git directory so a removed worktree cannot block the remaining comparisons.

* fix(server): isolate invalid revisions in Changes polling

Git aborts a batch when an upstream or reflog expression cannot resolve. Resolve expressions independently so a failed lookup leaves other comparisons current.
2026-11-19 14:17:07 +07:00
Mohamed Boudra 1c479d7b3d Keep finished replies visible across idle notifications (#10135)
* fix(timeline): keep replies visible across idle notifications

Resolve notification membership at the manager's live event boundary. An idle notice gets a display turn without starting a run, and in-flight notices join the open run.

* test(timeline): keep notice paging assertions compatible with async history

* fix(timeline): reuse managed turn assignment for notices

Resolve notices before waiter matching with the same rule used by live persistence. Verify untagged foreground runtime notices through runAgent and idle Pi notices through timeline paging.
2026-11-19 13:15:13 +07:00
Mohamed Boudra 808766ed7f Acknowledge workspace taps promptly and reduce destination mount work (#9887)
* fix(app): acknowledge accepted workspace taps before navigation

Short taps finish before the delayed hold feedback paints, then navigation occupies JS. Paint accepted feedback on the native UI thread while retaining the existing press cancellation and delay rules.

* fix(app): avoid persistent tint on selected docked workspace rows

* perf(app): reduce workspace mount work and narrow panel subscriptions
2026-11-19 13:10:12 +07:00
Christian WuandClaude Fable 5.2 9faa3034f1 fix(app): keep a submenu open when its row is tapped on a touch screen (#10175)
A tap on the web arrives as pointer events: the finger enters the row as it
lands and leaves as it lifts. The submenu row and its flyout read both as
hover, so the leave queued a close just as the press opened the flyout, and
it disappeared about a quarter of a second later. A tap inside an open
flyout closed it the same way.

Hover intent now ignores pointer events whose pointerType is touch. Mouse
and pen behave as before, including on touch screens with a mouse attached.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 06:02:06 +00:00
Mohamed Boudra 157abbbbda Let agents choose which desktop opens a browser tab (#10189)
* fix(browser): let agents choose which desktop opens a tab

Registration order sent new tabs to the wrong desktop window. Let the agent discover and select the intended window by name, and require a choice when several windows can open tabs.

* test(desktop): run browser host selection in a fresh app session

Closing the second window can leave the existing browser journey in a different renderer state. Give both journeys their own windows and daemon so the routing test does not change the old test setup.

* fix(browser): keep window names visible and stable across reconnects

Frameless desktop windows need an in-app place to see and copy their name. Give each window one browser host identity so a reconnect replaces a lingering connection without creating a duplicate choice.

* test(desktop): cover host selection in the browser journey

Open the second window after the existing browser checks finish so their setup remains isolated within one CI run.
2026-11-19 13:01:34 +07:00
Mohamed BoudraandBrandon Elliott 2c22e64644 Keep dictation working after closing another chat (#10185)
* fix(app): keep dictation working after closing another chat

Keep the shared native recorder alive while a client still uses it. Report microphone startup errors at the composer so the user can retry from the same control.

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

* fix(app): explain how to recover from dictation startup failures

Classify known microphone failures at the capture boundary. Keep daemon stream errors available to the composer and clear stale capture feedback on the next attempt.

* fix(app): keep permission guidance when the native request fails

* fix(app): show dictation errors after a terminal prompt shortcut

---------

Co-authored-by: Brandon Elliott <923787+Brandon168@users.noreply.github.com>
2026-11-19 12:06:30 +07:00
paseo-bot[bot]andClaude Opus 5.5 b09b17e6ee fix(opencode): fail the turn when a shared OpenCode service stops (#10187)
When Paseo used an OpenCode v2 service it did not start (a discovered
`opencode serve --service`, or a configured server URL), nothing
reported that service going away. The connection's `exited` signal
resolved only when Paseo itself stopped using it. A turn that was
running when the service died was never failed, the event stream
retried the dead port every 100 ms, and Stop, send and reload were
refused with "active run cancellation was not acknowledged".

The shared connection now treats a refused connection as the service
exiting, the same signal an owned server's process exit gives. The
session fails the turn, stops its stream, and reconnects on the next
operation.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 05:01:50 +00:00
Mohamed Boudra f5d27b7901 Let agents watch a pull request (#10148)
* feat(server): let agents watch pull requests

* fix(server): isolate PR watch test homes

* fix(server): preserve watch delivery during subscription changes

* fix(server): batch co-due PR observations and drain admitted updates

* fix(server): settle combined poll requests with await

* fix(server): deliver overdue PR updates together

* fix(server): include failing check links in PR watch updates

* test(server): verify PR watch check links on live GitHub

* fix(server): deliver PR digests through the shared agent queue

* test(server): verify PR and child updates share the next turn

* fix(server): withdraw queued updates before provider admission

* feat(server): show PR watches as agent background work

Render active watches beside heartbeats so users can see and stop them while the agent is idle. Bind Stop to the original subscription so a delayed request leaves a replacement intact.
2026-11-19 11:51:06 +07:00
Mohamed BoudraandChristoph Leiter 4e78d15bdc Search agent settings in Cmd-K before the first message (#10182)
* fix(app): make agent controls searchable before the first message

New workspace already renders the shared draft controls, but Command Center registration lived in the workspace tab. Register from the draft controls and use the active composer scope so each host gets the same behavior.

Co-authored-by: Christoph Leiter <135764+cleiter@users.noreply.github.com>

* fix(app): keep agent settings searchable in fullscreen

Compact fullscreen editing used to unmount the toolbar and remove the active composer settings from Command Center. Keep the controls registered while fullscreen hides the inline toolbar.

* fix(app): show composer settings from compact sidebar search

The sidebar suspends editor shortcuts while it covers the pane. Give Command Center an explicit target so sidebar search still uses the center composer and Explorer keeps its own scope when open.

* test(app): cover compact Command Center settings for running agents

---------

Co-authored-by: Christoph Leiter <135764+cleiter@users.noreply.github.com>
2026-11-19 11:20:09 +07:00
Qi JiandMohamed Boudra 2327701497 fix(codex): support flex speed (#9809)
* fix(codex): offer the Flex speed and thread it through

Speed choices came from the model list's `serviceTiers`, and Codex never
advertises Flex there: `ModelInfo::supports_service_tier` treats it as an API
request option that is valid whatever the model advertises. So the Speed menu
could never list it, choosing `flex` threw "Codex speed 'flex' is not
available", and a stored `service_tier: "flex"` was rewritten to Normal before
the first turn.

Flex now joins Normal as a tier Paseo knows, on every Codex model. The Speed
control and the tier checks read one list, so what the control offers is what
the session runs: `turn/start` and rewind's `thread/fork` carry
`serviceTier: "flex"`, a saved Flex survives open and model switches, and a
catalog that does advertise Flex keeps its own entry instead of duplicating it.

Ref: #9773

* Verify Codex Flex in the browser Speed menu

* Gate unadvertised Flex on Codex 0.156

Codex 0.155 silently strips Flex from outgoing requests when the catalog omits it. Use the connected app-server version to gate the locally added option and normalize unsupported saved selections. Keep the Speed icon highlight for any explicitly selected tier and verify Flex follows that behavior.

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-11-19 11:14:16 +07:00
paseo-bot[bot]andClaude Opus 5.5 a6da22f86a fix(app): keep a toast that replaces one timing out (#10183)
When a toast replaced another just as the other's timer expired, the
old timer fired before the viewport rescheduled it and dismissed the
new toast. The new toast showed for one frame and faded out. The
timer now dismisses only the toast it was set for.

This made "Reloaded npm-review" vanish in the plugin-management e2e
journey when the reload finished about 2200 ms after the install
toast.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 03:41:06 +00:00
Mohamed Boudra a8456ee63f Rewind the latest turn from Command Center (#10144)
* feat(app): rewind the latest turn from Command Center

Make the latest prompt easy to revise without finding its message menu. Focus the composer when a rewind restores that prompt so editing can resume immediately.

* fix(app): hide rewind for attachment-only prompts

Keep the Command Center and message menu eligibility aligned. Rewinding an attachment-only prompt removes the turn without a prompt the composer can restore.

* fix(app): wait for current history before rewinding the latest turn

Keep cached prompts out of the Command Center rewind target while the active chat catches up. The visible-message menu still targets the specific prompt the user chose.
2026-11-19 10:39:19 +07:00
Mohamed Boudra cf91362af4 Add composer shortcuts for model and effort (#10147)
* feat(app): add composer model and effort shortcuts

* fix(app): route composer shortcuts to the focused input
2026-11-19 10:38:48 +07:00
paseo-bot[bot]andClaude Opus 5.5 4663f3e40f Find a plugin toast in e2e while the previous toast still fades out (#10168)
* test(app): find a plugin toast while the previous one still fades

A toast that times out stays in the page during its 140 ms fade. When the
next toast appears in that window, the plugin helper's locator matched both
and failed in strict mode. Wait for the toast that carries the message.

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

* test(app): match toast text with case so Installed differs from Uninstalled

A string passed to hasText matches part of the text and ignores case, so
"Installed e2e-plugin" also matched the "Uninstalled e2e-plugin" toast that
the spec shows just before it reinstalls. Use a case-sensitive pattern, as
toContainText did before.

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

* test(app): find a plugin toast while a toast with the same text fades

Two "Reloaded e2e-plugin" toasts can share the screen during the 140 ms
fade, and the filtered locator then matched both. Either one shows the
message, so take the first.

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 03:00:38 +00:00
Mohamed Boudraandfivetaku 51baa2beb8 feat(claude): give Ultracode its own toggle (#10150)
Keep Ultracode independent of effort in the Claude composer and retain support for saved Ultra Code choices.

Co-authored-by: fivetaku <zipsanyang.ai@gmail.com>
2026-11-19 09:25:07 +07:00
Mohamed Boudra 31b6c2ebd3 Highlight shell scripts and Dockerfiles (#10178)
Use the existing CodeMirror modes for shell scripts and Dockerfiles. Pass full paths through tool-call highlighting so Dockerfile detection works across source views and diffs.
2026-11-19 09:21:01 +07:00
paseo-bot[bot]andClaude Opus 5.5 3da26f32ab fix(server): say which browser_wait condition expired (#10172)
An expired browser_wait condition reached the agent as "The browser did
not respond before the timeout. Try again or check the browser host."
The host did respond. summarizeBrowserError replaced every
browser_timeout message with that fixed text, so the host's own message
("Timed out waiting for browser text: ...") never reached the agent.

The tool text is now the producer's message for browser_timeout. The
broker's round trip timeout, the one case where the host did not
answer, now says so in its own message.

Closes #10128

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 01:43:45 +00:00
bcf52f93b1 fix(app): draw Mermaid flowcharts whose labels contain an @ (#10165)
Mermaid 11's lexer reads an edge id (`e1@-->`) from any run of
non-space characters ending in "@". In `F[@mention] --> G` that run
starts at the node id and crosses the label's opening bracket, so the
parse fails and the card falls back to the source. Backport the lexer
half of mermaid-js/mermaid#8459, which stops the edge id at the node
shape characters, onto the pinned mermaid 11.16.0 and rebuild the
runtime. Moving to mermaid 12 instead changes the default layout and
look of every diagram and raises the browser floor, so it stays a
separate decision.

Closes #10157

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: monarchmaisuriya <37824914+monarchmaisuriya@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 21:52:18 +00:00
paseo-bot[bot]andClaude Opus 5.5 d8c98400fb fix(server): reopen a plugin agent whose provider closed its session (#10153)
When a plugin provider closed a session with session.closed, the next
prompt went stale and Paseo tried to reopen the agent. The reopen first
closes the old session, and that close sent session.close for a session
the plugin runtime had already forgotten. The send failed with "Unknown
provider session", the reopen stopped, and the prompt was rejected with
"Provider session <id> is stale after its plugin reloaded". Every later
prompt failed the same way.

A session that the provider closed now skips the native close and only
drops its routing, so the reopen continues and the prompt runs.

Closes #10151

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 20:45:55 +00:00
VladimirGVPandVladimirGVP 77392d3c1b perf(workspace-git): retain warm targets across short reconnects (#10142)
Co-authored-by: VladimirGVP <322008768+VladimirGVP@users.noreply.github.com>
2026-11-18 20:18:30 +00:00
paseo-bot[bot] 8edccf0503 test(app): press a fork trigger again when a streamed line moves it (#10156)
"forks a streaming assistant turn without interrupting it" pressed the
in-flight turn's fork trigger once and waited for the menu. While the
chat is shorter than the viewport, each streamed line moves the trigger
down. A line that arrives between the press and the release moves the
trigger out from under the pointer, the press opens nothing, and the
wait for "Fork in a new tab" timed out.

openForkMenu now presses the trigger until its menu shows.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-18 18:51:59 +00:00
Okan YILDIRIM ac633eb096 fix(markdown): wait for the host before reading a chat image (#10111)
When the app opens straight into a chat on a host it hasn't connected to yet,
such as a page reload or a cold start on an agent route, it renders the cached
messages before the host's client exists. useMarkdownSource enabled the image
read anyway, with no client to read through, so it failed with "Image
unavailable". The query's retries cover a host that connects within about
seven seconds. After that the read stays failed and the image collapses to its
alt text. The query key doesn't include the client, so the client's arrival
never starts another read, and the image stays as alt text after the host
connects.

Markdown that belongs to a host, which has a serverId, now waits for that
host's client before it reads. Until the host connects the image keeps its
pending placeholder, and once the client arrives the query runs and reads the
file. Markdown with no host, such as the changelog, has no client to wait for
and still falls back to its alt text.
2026-11-18 15:59:10 +00:00
25ff8adf06 fix(omp): allowing a tool approval approves it when OMP offers session or grant choices (#10126)
* fix(omp): map tool approvals that offer session or grant choices

OMP 18.x adds "Approve <tool> for this session" and directory/file grant
choices to its rpc-ui approval select. The mapper only recognised the exact
["Approve", "Deny"] options, so these prompts fell through to a generic
"OMP select" question; allowing it from the CLI or a notification answered
with no value and OMP treated the call as denied.

Recognise approval selects whose one-call choice is "Approve" or
"Approve Once", whose last choice is "Deny", and whose other choices are
approval labels. Surface the extra choices as allow actions and answer with
the selected label.

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

* fix(omp): allow one call when a grant is labeled Approve

OMP names the one-call choice "Approve Once" whenever it also offers
grants. A grant for a target that is not a file is then labeled
"Approve", so the select arrives as
["Approve", "Always Approve", "Approve Once", "Deny"]. Taking the
first "Approve" as the one-call choice made a plain allow pick the
grant, which remembers more than the call. Prefer "Approve Once" when
it is offered.

Co-authored-by: Dhruv Singal <dhruvsingalabc@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(omp): read the picked approval choice from its action

Each extra approval choice's action label is the select value OMP
offered, so the response reads it from request.actions instead of a
second copy in metadata.

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

---------

Co-authored-by: Dhruv Singal <dhruvsingalabc@gmail.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 15:11:16 +00:00
paseo-ai[bot] 09a15abb06 fix: update lockfile signatures and Nix hash [skip ci] 2026-11-18 15:01:27 +00:00
Mohamed Boudra 81fb9c03f6 chore(release): reconcile main with 0.16.2 (#10132) 2026-11-18 21:51:22 +07:00
Mohamed Boudra 0e67045c4b Keep Hub daemons connected after execution permissions change (#10113)
* Use current Hub permissions when reconnecting a daemon

* Back off when the Hub repeatedly rejects session permissions

* Show the permission recovery commands in Hub status
2026-11-18 19:24:41 +07:00
Mohamed Boudra 50b2c7f9d9 Give every natively supported provider a docs page (#10114)
Supported providers is now an index: one list of natively supported providers and one list of ACP agents from the in-app catalog. Each natively supported provider has a setup page under /docs/supported-providers/, and the docs sidebar shows those pages as one collapsible item. /docs/claude-code, /docs/codex, and /docs/muse-code redirect to the new location.

Also adds landing pages for fx and Hoplite, lists fx in the 0.16.0 changelog highlights, lists every docs page in llms.txt, and gives the plugin sidebar views page its frontmatter.
2026-11-18 19:15:14 +07:00
Mohamed Boudra f346e72691 fix(app): let the sidebar list scroll its last row clear of a toast (#10096)
The sidebar toast floats over the list's end, so at full scroll it covered the
last row. The list now ends with a spacer the height of the toast while one
shows. The spacer sits below every row, so growing it moves nothing. It shrinks
over the toast's fade, so a list scrolled into that space settles back with the
toast instead of snapping.

Unlike the permanent room removed in #9667, the space exists only while a toast
is up, so the list keeps its normal end the rest of the time.
2026-11-18 19:03:10 +07:00
paseo-bot[bot] a030e905e8 test(app): enter a workspace row afresh until its kebab shows (#10103)
The workspace-labels journey hovered a row once and then waited for its
kebab. The kebab mounts only while the row holds hover, and hover only
arrives on pointerenter, so a row that lost hover under a parked pointer
never showed it again and the click waited out the 3-minute test timeout.

openWorkspaceSidebarKebab now moves the pointer off the row and hovers it
again until the kebab is visible, and the labels journey uses it instead
of its own copy.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-18 12:00:38 +00:00
2a10550a02 Paste copied reply text as displayed in plain-text targets (#10079)
* fix(app): preserve literal text in selection copy

* fix(app): keep literal angle brackets in copied selection HTML

Unwrapping a recognized URL left displayed text such as
`<http://localhost:3000>` in the Markdown that feeds text/html. Turndown
does not escape `<`, so the clipboard renderer turned it into an
autolink and dropped the brackets. Escape `<` in the Markdown flavor.

Describe the renderer/copy link contract in docs/markdown-renderer.md
instead of restating the code.

Co-authored-by: Dan Berindei <dan.berindei@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(app): keep recognized web links and table pipes in rich and plain copy

Unwrapping recognized links in the shared copy DOM removed them from
both clipboard flavors, so a copied `#12` lost its forge URL in rich
paste. The renderer now marks recognized links with their own
attribute: text/plain carries them as the text the reply showed, and
text/html keeps them as links when they point to a web page. Workspace
paths stay plain text in both.

text/plain still emits tables as GFM syntax, so keep the cell-pipe
escape in both flavors.

Co-authored-by: Dan Berindei <dan.berindei@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(app): copy recognized Windows drive paths as text in rich paste

The rich-paste link check accepted any URI scheme, so `C:\repo\x.ts`
kept a link with an unopenable `C:` href. Keep recognized links in
text/html only for http and https URLs.

Co-authored-by: Dan Berindei <dan.berindei@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(app): keep split line-start Markdown literal in copied selection HTML

Selecting from the `#` in `**C#**` to the end of the paragraph left `#`
and ` for ...` as separate text nodes after unwrapping, so Turndown did
not escape the heading marker and rich paste showed a heading. Merge the
text nodes before serializing.

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

---------

Co-authored-by: Dan Berindei <dan.berindei@gmail.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 11:56:06 +00:00
Mohamed Boudra 32bdb9e7af Keep a finished reply visible when a notification arrives between turns (#10092)
* Keep a finished reply visible when Claude starts a turn after a background command

When a background command finishes while Claude is idle, Claude Code sends the
task notification first and opens its own turn after it. The notification row
was stored with no turn id. A row with no turn id joins the turn before it to
the turn after it, so under Collapse turns the app showed both turns as one and
folded the finished reply behind the summary row.

The Claude provider now keeps a task notification that arrives between turns
and emits it inside the turn Claude starts for it, so the row carries that
turn's id. A notification no turn follows is emitted as before: when Claude
reports idle (a command the user stopped), before the user's next message, and
on close.

Rows already stored without a turn id are not changed.

Refs #10030.

* Show a stopped background command's notification at once

A stopped background command starts no Claude turn. While a background
subagent is alive Claude also sends no idle, so the held row stayed hidden
until the subagent finished and then took the subagent's wake-up turn id.

Only task notifications Claude reacts to (completed or failed) wait for a
turn now. A stopped one is emitted right away, as before.

Refs #10030.

* Keep a row that belongs to no turn out of the turns around it

A turn starts with the user's message or the provider's own turn start
(Claude's init). A background command's notification that arrives
between turns starts nothing, so the daemon writes it with no turn ID.

The shared turn rule read a missing ID as legacy history and let the
row continue both neighbours. The reply before it and the turn after
it then read as one turn, and Collapse turns folded the first reply.

Now a row with no turn ID never continues a row that has one, so it
cannot join two turns. History with no IDs at all keeps the trigger
rule. The app's fold and the daemon's whole-turn paging share the rule.

This replaces the earlier Claude provider hold, which had to guess from
the notification's status whether Claude would start a turn for it.

Refs #10030

* Give a background task's notification the turn it starts

A background task's notification that arrives while no turn runs starts
a turn. Claude's next run belongs to it unless Claude announces another
start first: a later notification starts the next turn, and a queued
command (the user's message, a scheduled wake-up) starts its own. When
Claude does not respond, the notification is a turn in itself.

So a reply Claude writes for a finished background command shares the
notification's turn, and the reply before it stays in its own turn and
stays visible under Collapse turns. A stopped command's row shows at
once as its own turn, and the agent stays idle.

Claude sends no frame for a Monitor event, so a run it starts for one
belongs to the last notification before it.

This replaces the shared turn-rule change, which drew the notification
as a turn between the two.

Refs #10030

* Keep a subagent's own job notification out of the main session's turns

A background job a subagent started reports to that subagent, and
Claude starts no main-session run for it. Its notification gave the
next main-session run a new turn, so when it arrived between a main
command's notification and Claude's reply to it, the reply was drawn
in a different turn from the notification it answered.

Refs #10030
2026-11-18 18:51:31 +07:00
Dhruv Singalandfactory-droid[bot] a3c41ecc1d fix(omp): follow thinking level changes OMP makes on its own (#9841)
When OMP changed the thinking level itself, for example on `/switch @role`
with a role that carries a level, Paseo dropped the `thinking_level_changed`
event because the OMP runtime schema did not list it. The thinking selector
and `runtimeInfo.thinkingOptionId` kept the old level while OMP ran the new
one.

Parse the event and update the session's level, preferring OMP's
`configured` selector (for example "auto") over the effective level, the
same way the Pi provider handles it (#6741).

Closes #8249

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-11-18 10:48:22 +00:00
Mohamed Boudra 62fc15d77a feat(agents): show and stop heartbeats alongside background tasks (#10097) 2026-11-18 17:10:21 +07:00
Mohamed Boudra 59ca1f5f77 Replace Desktop's own daemon on update after Desktop relaunches (#10067)
An in-app update and the startup version check again use the desktopManaged flag in paseo.pid, while Manage built-in daemon is on. A daemon that an earlier Desktop session launched is now replaced on update. A daemon that the user started through the CLI is still never stopped automatically.

Closes #6385.
2026-11-18 16:05:12 +07:00
Mohamed Boudra 017f0d8b0d feat(cli): include labels and workspace IDs in agent listings (#10076)
Let scripts group a worker’s agents by label and workspace from a single listing.
2026-11-18 16:01:26 +07:00
Mohamed Boudra f1f2509c12 Keep Android composer taps working after zooming a chat image (#10057)
* fix(android): keep composer taps working after pinching an image

React Native counted two touches at the start of a pinch but received a native takeover cancellation for just one. Typing could then claim the responder and consume the first toolbar tap. Cancel the active contacts when the gesture handler takes over.

* docs(android): describe the chat image fixture for the pinch regression
2026-11-18 15:52:41 +07:00
Okan YILDIRIM 4f2fbe18af fix(archive): bound worktree teardown and stream its output (#9852)
Give worktree teardown commands a shared one-minute deadline. Projects can override it with `worktree.teardownTimeoutMs` in `paseo.json`. Drain output so successful teardowns can exceed the old 1 MiB buffer. Bound the output retained for diagnostics.

At the deadline, try to terminate the command, close its output streams, and keep the worktree on disk. An exit status of zero in response to the stop signal still counts as a timeout.

Closes #9857.

Co-authored-by: Okan YILDIRIM <63511519+ragokan@users.noreply.github.com>
2026-11-18 13:10:41 +07:00
paseo-bot[bot]andOkan YILDIRIM f81bc2b5a3 Keep the prompt and whole reply when an empty chat reconnects mid-reply (#9723)
Recover missing timeline rows when a chat was empty before disconnect and live reply rows arrive before history catch-up. Keep the replica cache at schema version 1.

Closes #9650.
Supersedes #9626.

Co-authored-by: Okan YILDIRIM <63511519+ragokan@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-18 12:59:03 +07:00
Monarch MaisuriyaandClaude Opus 5.5 3815e72359 fix(desktop): refuse browser screenshots with no painted pixels (#9807)
Viewport and full-page browser screenshots wait for a frame with non-transparent pixels. When the page does not paint within the existing capture budget, the tool returns screenshot_no_frame.

Fixes #9810.

Co-authored-by: monarchmaisuriya <monarchmaisuriya7600@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 12:47:31 +07:00
paseo-bot[bot]andmgranderath 871c714b46 Create worktrees in large repos without scanning every ignored file (#10020)
List ignored directories as single entries and only search inside them
when a .worktreeinclude pattern matches the directory or names a path
inside it. A bare .env no longer selects node_modules/pkg/.env.

Verified with real Git and isolated daemon workspace creation on Linux.
With 300,000 ignored files, Git trace2 recorded over 6,000 directory
visits before the fix and fewer than five after. The workspace copied
the root .env. The lifecycle test also verified rollback when copying
fails.

Closes #10004

Co-authored-by: mgranderath <22001111+mgranderath@users.noreply.github.com>
2026-11-18 12:26:35 +07:00
Mohamed Boudra f510b3edb7 Tell plugin agents to develop in a directory plugin, never a Git or npm installation (#10061)
* Tell plugin agents to develop in a directory plugin, never a Git or npm installation

paseo plugin update replaces a Git or npm installation and remove deletes it,
so edits and commits made in Paseo's managed copy are lost. The paseo-plugin
skill now says to clone the source outside the daemon home and install that
directory, and to move any work out of a managed copy before update or remove.

Refs #7904

* Rewrite the plugin development guidance as plain steps

* Keep settings, runtime ID, and build output when moving a plugin to a local folder
2026-11-18 12:05:21 +07:00
paseo-bot[bot]andClaude Opus 5.5 a75c2b4635 Keep background workspaces out of the dock badge and favicon (#9983)
* Keep background workspaces out of the dock badge and favicon

A workspace created with `--background` is hidden from the sidebar, but an
agent finishing in it still counted toward the macOS dock badge and turned
the web favicon to attention, pointing at something the user cannot see.

The dock badge now skips background workspaces, and the favicon skips
agents whose workspace is background, the same way both already skipped
background agents. The favicon selector also rescans when the workspace
map changes, so an agent synced before its workspace is dropped once the
workspace arrives.

Closes #9975

* Count background workspaces in the badge while Show background is on

The sidebar shows background workspaces when Show background is on, so
the dock badge and favicon now count them in that case too. They follow
the same setting the sidebar reads.

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 04:55:46 +00:00
Mohamed Boudra 91e7293773 Hide historical PR badges on the default branch (#10053)
Hide closed and merged requests on the origin repository’s default branch. Keep branch-based status matching for feature workspaces.

Closes #9908.
2026-11-18 11:08:44 +07:00
paseo-bot[bot]andClaude Opus 5.5 63a33ac3fd Let plugin screens use the plugin state hooks (#10049)
* Let plugin screens use the plugin state hooks

A plugin screen opened from the Command Center or the sidebar showed
"Plugin failed: Plugin state hooks must run inside a plugin host" as soon
as it called useWorkspaces, useAgents or another state hook. Every plugin
host paired the installation provider with its own state provider, and
the screen host and the plugin settings host did not.

The installation provider now supplies the state source for the
installation's host, so every surface rendered under it can read state,
and the hosts no longer wrap a second provider of their own.

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

* Keep a sidebar view's cross-host state in its hooks

A sidebar view renders once across every connected host and builds an
unscoped state source for that. After the installation provider took
over the state source, the environment provider dropped the view's own
source, so its hooks read state scoped to one host. The installation
provider now takes the surface's source when one is passed and falls
back to the installation's host.

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 04:01:21 +00:00
paseo-bot[bot]andClaude Opus 5.5 a5edd91f91 Delete a stopped terminal worker's copy on Windows (#10039)
* fix(terminal): delete a stopped worker's copy on Windows

Windows keeps a just-exited worker's files open for a moment, so the
single rm in pruneTerminalWorkerRuntimes failed and left the copy until
the next daemon start. Retry the delete for up to 5.5s.

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

* fix(terminal): bound the Windows retry of a worker copy delete

rm's maxRetries repeats at every directory level, so a file that stays
locked deep in node-pty would hold daemon start and stop far past the
intended window. Retry one rm per attempt for up to 3s instead.

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 03:26:42 +00:00
paseo-bot[bot]andClaude Opus 5.5 e44edf5b35 Keep the sidebar's projects when the app renders while restoring hosts (#10042)
* fix(app): publish restored hosts together with their directory sync

A component that rendered while the host registry restored the project
icon cache saw the host but found no directory sync for it, so its
directory demand was dropped and the sidebar stayed on No projects yet
for the session. Hosts are now published in the same step that creates
their runtimes.

Fixes #9996

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

* refactor(app): publish restored hosts through setHostsAndSync

Every host-list change now goes through the one method that assigns the
hosts, creates their runtimes, and notifies listeners in a single step.

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 03:16:36 +00:00
Mohamed BoudraandOkan YILDIRIM 59d6018dac Preserve commits when archiving workspaces (#10009)
* fix(workspaces): preserve commits when archiving worktrees

A removed worktree can be the only reference to its HEAD. Keep that commit before deletion and record the checkout so detached workspaces restore at the same commit.

Co-authored-by: Okan YILDIRIM <63511519+ragokan@users.noreply.github.com>

* fix(workspaces): restore saved checkouts through one git path

Keep existing archive and deletion behavior when Git cannot read a worktree HEAD, and record every readable checkout for a common restore path.

* fix(workspaces): preserve git HEAD identity through restore

Record Git’s full HEAD ref or commit so restore can pass branch and detached checkouts to Git without guessing from a short name.

* fix(workspaces): scope saved HEAD to each archive

An archive with no readable checkout must not retain the HEAD saved by an earlier archive.

* test(workspaces): verify detached checkout after restore

Update the browser journey for detached restore and allow the daemon restart test enough time on Windows runners.

---------

Co-authored-by: Okan YILDIRIM <63511519+ragokan@users.noreply.github.com>
2026-11-18 10:10:45 +07:00
paseo-bot[bot]andClaude Opus 5.5 b24eab785b Reload the desktop window when its renderer exits (#10035)
* Reload the desktop window when its renderer exits

When the renderer process of the main window exits without a clean
shutdown (killed by an out-of-memory killer, crashed, or out of memory),
Electron keeps the window frame but shows nothing until the user presses
Ctrl+R. The main process had no handler for render-process-gone, so it
neither recovered nor logged the exit.

The window now reloads itself and logs the exit reason to main.log. If
the renderer exits three times within a minute, it stops reloading and
logs that, so a page that crashes on load does not restart in a loop.

Fixes #9999

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

* Leave a renderer exit before the first page commits to Chromium

Before the window's first navigation commits, Chromium finishes it in a
new renderer by itself. Reloading at that point aborted the initial
loadURL with ERR_ABORTED, which fails desktop startup. Skip the reload
while the window has no committed URL.

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 02:04:06 +00:00
1821ac3f93 Let a steered message wait out a Claude compaction instead of cancelling it (#10028)
* Let a steer wait out a Claude compaction instead of cancelling it

While Claude compacted, the Claude session answered every steer with
"unavailable". The agent manager reads that as "replace the turn", so
it interrupted the turn and Claude Code printed "Compaction canceled.".
Claude Code already holds a `next`-priority message until compaction
finishes, so the session now accepts the steer during compaction.

Co-authored-by: NightMachinery <36224762+NightMachinery@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Steer only while the compaction is still running in the real Claude test

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: NightMachinery <36224762+NightMachinery@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 01:06:23 +00:00
a1088a787d Report background work from get_agent_status and list_agents (#10022)
The MCP agent tools serialized live agents without the background work
summary that the WebSocket snapshot carries, so a parent agent saw an
idle worker with a running background shell as plain idle. Both tools now
add the same summary the session adds, omitted when the agent has none.

Co-authored-by: Orcun Simsek <1612171+ortschun@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 22:54:59 +00:00
JIHUN LEEandClaude Opus 5.5 576d0320c8 Keep Android text at the window's density on Samsung DeX (#9995)
React Native 0.86 converts between px and dp with the density of the
phone's built-in display, while Fabric lays out at the window's density.
In a DeX window (240 dpi on a 360 dpi phone) every text box came out at
two thirds of the height its text needed, so the text was clipped.

Backport the rule from react/react-native#59087: right after React
Native reads the display (when it creates the root view and on each
configuration change), restore the window's density and keep only the
display's size. Remove once the app runs React Native 0.89 or later
with useWindowDensityForDisplayMetricsAndroid on.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 21:08:05 +00:00
paseo-bot[bot]andClaude Opus 5.5 c8e3d67e29 Wait for each plugin content subscription id before checking its release (#10012)
The plugin-buttons journey reads the details' event subscription id to
check that closing, crashing and disabling the content releases it. The
id arrives with the daemon's subscription response, after the details
render. The first open already waited for it; the reopens read it as
soon as the cached summary showed, so the id could still be empty and
the release poll then waited for an id that never exists.

Every read now waits for a non-empty id.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:01:24 +00:00
95f2c7d16a Keep a Claude agent's process and background work when its effort level changes (#10008)
Changing the thinking level of a running Claude agent marked its query for a
restart. The next turn, mode change or model change then retired the Claude
process, which ended every background shell, workflow and subagent it ran with
"connection lost".

A move between two effort levels now goes to the running query through
applyFlagSettings({ effortLevel }), as Fast mode already does, and marks no
restart. Switching thinking off, to ultracode or back to the default still
restarts, because those change how the query is launched. If the running
process does not take the change, the old restart path runs, so the change is
never lost.


Row: app-built-from-one-set
Paseo: c6210e21-fc13-4dfa-adfc-43a050c7d75a

Co-authored-by: gilad-rubin <6134299+gilad-rubin@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 16:57:22 +00:00
paseo-bot[bot]andClaude Opus 5.5 2c2385f362 Create the workspace in the caller's directory when --path is relative (#10010)
* Create the workspace in the caller's directory when --path is relative

`paseo workspace create --path .` adopted the daemon's working directory
instead of the directory the command ran in. The CLI sent the relative
path unchanged, and the daemon resolved it against its own cwd. The CLI
now resolves a relative --path against the caller's directory before it
sends the request, as it already does when --path is omitted. Absolute
POSIX and Windows paths pass through unchanged so a remote daemon on
another operating system still gets the path as written.

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

* Leave a home-relative --path for the daemon to expand

Resolving every non-absolute --path against the caller's directory turned
`--path=~/repo` (and a quoted "~/repo") into `<cwd>/~/repo`. Before this
change the daemon expanded the leading ~ itself. `~` and `~/…` now pass
through unchanged again.

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

* Send a relative --path to an explicit daemon endpoint as written

The CLI already resolves caller paths only for a local daemon and sends
them unchanged to an explicit --host endpoint (resolveRepositoryDirectory,
project create). workspace create, and paseo run, which builds its
workspace source through it, now follow the same rule instead of turning
a relative path into a path on the caller's machine for a remote daemon.

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 15:51:43 +00:00
paseo-bot[bot]andDominic Anaeto 7f0fe57c48 Settle a stuck agent run after a repeated cancel (#9774)
A force-cancel finalizes turn X in the daemon while the provider keeps
running it, so the next run can be bound to the same X. handleStreamEvent
dropped every terminal for a finalized turn id, including the synthetic
turn_canceled that cancelAgentRunNow dispatches for the tracked run and
the provider's own terminal. The run never settled, cancelAgentRunNow
waited on it forever, and every later cancel, reload and send queued
behind it until the daemon restarted.

A terminal for the tracked run's own turn id is no longer dropped.

Fixes #6355
Supersedes #8405

Co-authored-by: Dominic Anaeto <dominic.anaeto@gmail.com>
2026-11-17 15:08:26 +00:00
paseo-bot[bot]andClaude Opus 5.5 94f2df6263 Keep the Import Session list in place when Load more fetches the next page (#9974)
Tapping Load more emptied the list until the larger page arrived: the sheet
showed "Loading sessions...", unmounted the virtualized list, and brought it
back scrolled to the top. The sessions queries set keepPreviousData, but
useQueries gives a changed key a new observer with no previous data, so the
placeholder was always empty. The placeholder is now the cached page that
Load more grew from, for the same scope, search, and provider.

The compact import-session journey flaked on this in CI: its scroll helper
resolved a row, the list was replaced before the helper ran, and the walk
up from the detached row found no scroller. The helper now scrolls the list
itself, and the journey checks that Load more keeps the reader down the
list.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:00:55 +00:00
paseo-bot[bot]andpanta82 02124454bc Keep failed downloads inside the app on web and desktop (#9937)
On web and desktop, Download over a direct connection now fetches the file and saves it from a blob instead of navigating the window to the host URL. A rejected or unreachable download shows an error in the download toast and the app stays on the workspace. The daemon's HTTP CORS check uses the same origin rule as the WebSocket upgrade.

Closes #9895

Co-authored-by: panta82 <4291324+panta82@users.noreply.github.com>
2026-11-17 08:04:50 +00:00
841 changed files with 32198 additions and 9555 deletions
+74 -1
View File
@@ -1,5 +1,78 @@
# Changelog # Changelog
## 0.17.0-beta.1 - 2026-11-19
- **Use existing worktrees:** Start a workspace in a worktree you already have, or create one from any branch or pull request. ([#10190](https://github.com/getpaseo/paseo/pull/10190))
- **Antigravity approvals and history:** Pick a permission mode, answer tool approvals, import CLI sessions and see your history when you reopen a chat. ([#10193](https://github.com/getpaseo/paseo/pull/10193))
- **Watch pull requests:** Agents can watch a GitHub PR and get notified when checks, reviews or comments change. ([#10148](https://github.com/getpaseo/paseo/pull/10148))
- **Heartbeats in Background work:** See and stop an agent's heartbeats next to its background tasks. ([#10097](https://github.com/getpaseo/paseo/pull/10097), [#10216](https://github.com/getpaseo/paseo/pull/10216))
- **Agent messages wait their turn:** Reports and notifications from other agents arrive when the current turn ends instead of interrupting it. ([#9757](https://github.com/getpaseo/paseo/pull/9757))
- **Plugin agent instructions:** Plugins can add their own instructions to agents. ([#9781](https://github.com/getpaseo/paseo/pull/9781))
### Added
- Added shortcuts to open the model picker and cycle thinking levels with Cmd/Ctrl+/ and Cmd/Ctrl+Shift+/ ([#10147](https://github.com/getpaseo/paseo/pull/10147))
- Added agent settings to Command Center search before the first message ([#10182](https://github.com/getpaseo/paseo/pull/10182) by [@cleiter](https://github.com/cleiter))
- Added Rewind to Command Center for the latest turn ([#10144](https://github.com/getpaseo/paseo/pull/10144))
- Added a separate Ultracode toggle for eligible Claude models ([#10150](https://github.com/getpaseo/paseo/pull/10150) by [@fivetaku](https://github.com/fivetaku))
- Added Flex speed for Codex ([#9809](https://github.com/getpaseo/paseo/pull/9809) by [@qjqqyy](https://github.com/qjqqyy))
- Added syntax highlighting for shell scripts and Dockerfiles ([#10178](https://github.com/getpaseo/paseo/pull/10178))
- Added labels and workspace IDs to `paseo ls --json` ([#10076](https://github.com/getpaseo/paseo/pull/10076))
### Changed
- Changed `browser_new_tab` to ask agents to choose a Desktop when several are connected ([#10189](https://github.com/getpaseo/paseo/pull/10189))
- Changed workspace Git status to reuse its snapshot after a short reconnect when the checkout has not changed ([#10142](https://github.com/getpaseo/paseo/pull/10142) by [@VladimirGVP](https://github.com/VladimirGVP))
- Changed workspace navigation to acknowledge taps promptly and initially load fewer offscreen chat rows on mobile ([#9887](https://github.com/getpaseo/paseo/pull/9887))
- Changed worktree teardown to stop after one minute by default and keep the worktree; set `worktree.teardownTimeoutMs` in `paseo.json` for longer commands ([#9852](https://github.com/getpaseo/paseo/pull/9852) by [@ragokan](https://github.com/ragokan))
### Fixed
- Fixed Collapse turns hiding a finished OMP or Pi reply when an idle provider notice appears ([#10135](https://github.com/getpaseo/paseo/pull/10135))
- Fixed repeated finish notifications while an agent responds to background tasks and its earlier finish is unread ([#10200](https://github.com/getpaseo/paseo/pull/10200))
- Fixed an empty chat losing the prompt and start of a reply after reconnecting mid-reply ([#9723](https://github.com/getpaseo/paseo/pull/9723) by [@ragokan](https://github.com/ragokan))
- Fixed changes between Claude thinking levels stopping its background work ([#10008](https://github.com/getpaseo/paseo/pull/10008) by [@gilad-rubin](https://github.com/gilad-rubin))
- Fixed OpenCode turns staying running after a shared OpenCode service stops ([#10187](https://github.com/getpaseo/paseo/pull/10187))
- Fixed OMP denying an approved tool call when session or grant choices were offered ([#10126](https://github.com/getpaseo/paseo/pull/10126) by [@dsingal0](https://github.com/dsingal0))
- Fixed Changes failing to open when Git metadata watching reaches its limit ([#10188](https://github.com/getpaseo/paseo/pull/10188))
- Fixed copying selected reply text into plain-text targets with unwanted Markdown syntax ([#10079](https://github.com/getpaseo/paseo/pull/10079) by [@danberindei](https://github.com/danberindei))
- Fixed file views losing their scroll position when switching Preview and Source, except HTML previews on iOS ([#10195](https://github.com/getpaseo/paseo/pull/10195) by [@apple-ouyang](https://github.com/apple-ouyang))
- Fixed file tabs in split panes showing or focusing the wrong file ([#9888](https://github.com/getpaseo/paseo/pull/9888) by [@KosmoCHE](https://github.com/KosmoCHE))
- Fixed touch-screen submenus closing as soon as they open ([#10175](https://github.com/getpaseo/paseo/pull/10175) by [@christiantwu](https://github.com/christiantwu))
- Fixed dictation failing after another chat that used the microphone closes ([#10185](https://github.com/getpaseo/paseo/pull/10185) by [@Brandon168](https://github.com/Brandon168))
- Fixed composer taps being lost on Android after zooming a chat image ([#10057](https://github.com/getpaseo/paseo/pull/10057))
- Fixed clipped text on Samsung DeX ([#9995](https://github.com/getpaseo/paseo/pull/9995) by [@easyhunjune](https://github.com/easyhunjune))
- Fixed workspace images in chat failing to load after a slow host connection ([#10111](https://github.com/getpaseo/paseo/pull/10111) by [@ragokan](https://github.com/ragokan))
- Fixed desktop browser screenshots returning fully transparent images ([#9807](https://github.com/getpaseo/paseo/pull/9807) by [@monarchmaisuriya](https://github.com/monarchmaisuriya))
- Fixed Mermaid flowcharts with `@` in labels showing source instead of the diagram ([#10165](https://github.com/getpaseo/paseo/pull/10165) by [@monarchmaisuriya](https://github.com/monarchmaisuriya))
- Fixed hidden background workspaces triggering the dock badge and favicon ([#9983](https://github.com/getpaseo/paseo/pull/9983))
- Fixed desktop sidebar navigation crowding out workspaces ([#9903](https://github.com/getpaseo/paseo/pull/9903) by [@pentatonic-alex](https://github.com/pentatonic-alex))
- Fixed plugin agents failing to reopen after their provider closes the session ([#10153](https://github.com/getpaseo/paseo/pull/10153))
- Fixed plugin screens and settings failing to use plugin state hooks ([#10049](https://github.com/getpaseo/paseo/pull/10049))
- Fixed a Codex message stopped before its turn starts showing an error instead of canceled ([#9931](https://github.com/getpaseo/paseo/pull/9931) by [@3ae3ae](https://github.com/3ae3ae))
- Fixed historical closed PR badges appearing on a repository's default branch ([#10053](https://github.com/getpaseo/paseo/pull/10053))
## 0.16.2 - 2026-11-18
### Fixed
- Fixed Collapse turns hiding a finished reply when Claude answers a later background task notification ([#10092](https://github.com/getpaseo/paseo/pull/10092))
- Fixed detached worktree commits getting lost when archiving a workspace ([#10009](https://github.com/getpaseo/paseo/pull/10009) by [@ragokan](https://github.com/ragokan))
- Fixed Desktop updates leaving an older daemon running when an earlier Desktop session started it ([#10067](https://github.com/getpaseo/paseo/pull/10067))
- Fixed daemons losing their Hub connection after execution permissions changed ([#10113](https://github.com/getpaseo/paseo/pull/10113))
- Fixed saved hosts disappearing when one stored entry could not be read ([#9847](https://github.com/getpaseo/paseo/pull/9847) by [@ragokan](https://github.com/ragokan))
- Fixed worktree creation timing out while scanning large ignored folders that `.worktreeinclude` does not name ([#10020](https://github.com/getpaseo/paseo/pull/10020) by [@mgranderath](https://github.com/mgranderath))
- Fixed Steer cancelling a Claude compaction in progress ([#10028](https://github.com/getpaseo/paseo/pull/10028) by [@NightMachinery](https://github.com/NightMachinery))
- Fixed agents getting stuck after a second Stop when the provider reused the cancelled turn ID ([#9774](https://github.com/getpaseo/paseo/pull/9774) by [@DAnaeto](https://github.com/DAnaeto))
- Fixed Desktop staying blank after its renderer exited unexpectedly ([#10035](https://github.com/getpaseo/paseo/pull/10035))
- Fixed failed file downloads taking over the app window on web and Desktop ([#9937](https://github.com/getpaseo/paseo/pull/9937) by [@panta82](https://github.com/panta82))
- Fixed Import Session losing its scroll position when you select Load more ([#9974](https://github.com/getpaseo/paseo/pull/9974))
- Fixed terminals failing to open when the home filesystem refuses Unix sockets, such as on AFS ([#9214](https://github.com/getpaseo/paseo/pull/9214) by [@bendavid](https://github.com/bendavid))
- Fixed timed-out Git watchers repeatedly rescanning large repositories ([#9828](https://github.com/getpaseo/paseo/pull/9828) by [@Spshulem](https://github.com/Spshulem))
- Fixed `paseo workspace create --path .` using the local daemon's directory instead of the caller's ([#10010](https://github.com/getpaseo/paseo/pull/10010))
- Fixed MCP agent status and list responses omitting background work for idle agents ([#10022](https://github.com/getpaseo/paseo/pull/10022) by [@ortschun](https://github.com/ortschun))
- Fixed the thinking selector showing an old level after OMP changes it ([#9841](https://github.com/getpaseo/paseo/pull/9841) by [@dsingal0](https://github.com/dsingal0))
## 0.16.1 - 2026-11-17 ## 0.16.1 - 2026-11-17
### Fixed ### Fixed
@@ -23,6 +96,7 @@
- **Plugin sidebar views:** Plugins can replace the sidebar with their own workspace and agent layout across connected hosts. Choose a view per device in Settings → Sidebar. ([#8906](https://github.com/getpaseo/paseo/pull/8906)) - **Plugin sidebar views:** Plugins can replace the sidebar with their own workspace and agent layout across connected hosts. Choose a view per device in Settings → Sidebar. ([#8906](https://github.com/getpaseo/paseo/pull/8906))
- **Plugin composer controls:** Plugins can add composer controls, edit drafts and attachments, and change agent settings. They can also add New workspace items and save metadata on agents and workspaces. ([#8744](https://github.com/getpaseo/paseo/pull/8744), [#9209](https://github.com/getpaseo/paseo/pull/9209), [#9207](https://github.com/getpaseo/paseo/pull/9207), [#9734](https://github.com/getpaseo/paseo/pull/9734) by [@michaelmwu](https://github.com/michaelmwu)) - **Plugin composer controls:** Plugins can add composer controls, edit drafts and attachments, and change agent settings. They can also add New workspace items and save metadata on agents and workspaces. ([#8744](https://github.com/getpaseo/paseo/pull/8744), [#9209](https://github.com/getpaseo/paseo/pull/9209), [#9207](https://github.com/getpaseo/paseo/pull/9207), [#9734](https://github.com/getpaseo/paseo/pull/9734) by [@michaelmwu](https://github.com/michaelmwu))
- **Arrange Usage cards:** Drag provider cards into your preferred order and turn off cards you do not want in the sidebar summary. Choose the host from Usage settings. ([#9660](https://github.com/getpaseo/paseo/pull/9660), [#9740](https://github.com/getpaseo/paseo/pull/9740), [#9748](https://github.com/getpaseo/paseo/pull/9748), [#9780](https://github.com/getpaseo/paseo/pull/9780)) - **Arrange Usage cards:** Drag provider cards into your preferred order and turn off cards you do not want in the sidebar summary. Choose the host from Usage settings. ([#9660](https://github.com/getpaseo/paseo/pull/9660), [#9740](https://github.com/getpaseo/paseo/pull/9740), [#9748](https://github.com/getpaseo/paseo/pull/9748), [#9780](https://github.com/getpaseo/paseo/pull/9780))
- **fx provider:** Run [fx](https://paseo.sh/docs/supported-providers/fx), the coding agent from Vercel Labs, in Paseo. Add it from the provider catalog in Settings → Hosts → Providers. ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- **Quieter app reopening:** Returning to an unchanged chat no longer flashes “Updating messages.” Paseo keeps healthy connections open and recovers dropped connections when you return. After reconnecting, an up-to-date chat no longer shows an extra update toast. ([#9242](https://github.com/getpaseo/paseo/pull/9242), [#8651](https://github.com/getpaseo/paseo/pull/8651), [#9086](https://github.com/getpaseo/paseo/pull/9086), [#8855](https://github.com/getpaseo/paseo/pull/8855), [#9116](https://github.com/getpaseo/paseo/pull/9116), [#9558](https://github.com/getpaseo/paseo/pull/9558) by [@adamcstephens](https://github.com/adamcstephens)) - **Quieter app reopening:** Returning to an unchanged chat no longer flashes “Updating messages.” Paseo keeps healthy connections open and recovers dropped connections when you return. After reconnecting, an up-to-date chat no longer shows an extra update toast. ([#9242](https://github.com/getpaseo/paseo/pull/9242), [#8651](https://github.com/getpaseo/paseo/pull/8651), [#9086](https://github.com/getpaseo/paseo/pull/9086), [#8855](https://github.com/getpaseo/paseo/pull/8855), [#9116](https://github.com/getpaseo/paseo/pull/9116), [#9558](https://github.com/getpaseo/paseo/pull/9558) by [@adamcstephens](https://github.com/adamcstephens))
- **Rebuilt mobile chat:** Expanding turn summaries, todo cards and tool groups keeps your reading position on iOS and Android. Sending during a scroll moves to the new prompt. ([#8717](https://github.com/getpaseo/paseo/pull/8717), [#9085](https://github.com/getpaseo/paseo/pull/9085), [#9806](https://github.com/getpaseo/paseo/pull/9806), [#9693](https://github.com/getpaseo/paseo/pull/9693)) - **Rebuilt mobile chat:** Expanding turn summaries, todo cards and tool groups keeps your reading position on iOS and Android. Sending during a scroll moves to the new prompt. ([#8717](https://github.com/getpaseo/paseo/pull/8717), [#9085](https://github.com/getpaseo/paseo/pull/9085), [#9806](https://github.com/getpaseo/paseo/pull/9806), [#9693](https://github.com/getpaseo/paseo/pull/9693))
- **Faster diff loading:** Changes shows the file tree before file contents finish loading. Large diffs load in batches and take priority over background worktree scans. ([#8907](https://github.com/getpaseo/paseo/pull/8907), [#9241](https://github.com/getpaseo/paseo/pull/9241), [#9243](https://github.com/getpaseo/paseo/pull/9243), [#9584](https://github.com/getpaseo/paseo/pull/9584)) - **Faster diff loading:** Changes shows the file tree before file contents finish loading. Large diffs load in batches and take priority over background worktree scans. ([#8907](https://github.com/getpaseo/paseo/pull/8907), [#9241](https://github.com/getpaseo/paseo/pull/9241), [#9243](https://github.com/getpaseo/paseo/pull/9243), [#9584](https://github.com/getpaseo/paseo/pull/9584))
@@ -36,7 +110,6 @@
- Added a Change base picker for worktree diffs, commits and Git actions ([#8642](https://github.com/getpaseo/paseo/pull/8642), [#8934](https://github.com/getpaseo/paseo/pull/8934) by [@Myasuka](https://github.com/Myasuka)) - Added a Change base picker for worktree diffs, commits and Git actions ([#8642](https://github.com/getpaseo/paseo/pull/8642), [#8934](https://github.com/getpaseo/paseo/pull/8934) by [@Myasuka](https://github.com/Myasuka))
- Added issue and pull request links that resolve SSH aliases and fork parent repositories ([#8636](https://github.com/getpaseo/paseo/pull/8636), [#9576](https://github.com/getpaseo/paseo/pull/9576)) - Added issue and pull request links that resolve SSH aliases and fork parent repositories ([#8636](https://github.com/getpaseo/paseo/pull/8636), [#9576](https://github.com/getpaseo/paseo/pull/9576))
- Added an iPhone Duo layout with the sidebar and workspace on opposite sides of the fold ([#8741](https://github.com/getpaseo/paseo/pull/8741), [#8901](https://github.com/getpaseo/paseo/pull/8901) by [@zeyugao](https://github.com/zeyugao)) - Added an iPhone Duo layout with the sidebar and workspace on opposite sides of the fold ([#8741](https://github.com/getpaseo/paseo/pull/8741), [#8901](https://github.com/getpaseo/paseo/pull/8901) by [@zeyugao](https://github.com/zeyugao))
- Added fx as a provider you can add from the provider catalog in Settings → Hosts → Providers ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- Added background agents that stay out of tabs, notifications and default agent lists ([#8683](https://github.com/getpaseo/paseo/pull/8683)) - Added background agents that stay out of tabs, notifications and default agent lists ([#8683](https://github.com/getpaseo/paseo/pull/8683))
- Added syntax highlighting for Terraform and HCL files (`.tf`, `.tfvars`, `.hcl`) ([#9106](https://github.com/getpaseo/paseo/pull/9106)) - Added syntax highlighting for Terraform and HCL files (`.tf`, `.tfvars`, `.hcl`) ([#9106](https://github.com/getpaseo/paseo/pull/9106))
- Added `PASEO_WORKSPACE_ID` to each agent's environment so an agent can identify, rename or archive its own workspace ([#8939](https://github.com/getpaseo/paseo/pull/8939) by [@DTTerastar](https://github.com/DTTerastar)) - Added `PASEO_WORKSPACE_ID` to each agent's environment so an agent can identify, rename or archive its own workspace ([#8939](https://github.com/getpaseo/paseo/pull/8939) by [@DTTerastar](https://github.com/DTTerastar))
+74 -1
View File
@@ -1,5 +1,78 @@
# Changelog # Changelog
## 0.17.0-beta.1 - 2026-11-19
- **使用现有 worktree**:在已有的 worktree 中启动工作区,或从任意分支或 PR 创建 worktree。([#10190](https://github.com/getpaseo/paseo/pull/10190))
- **Antigravity 审批和历史记录**:选择权限模式、回复工具审批、导入 CLI 会话,并在重新打开对话时查看历史记录。([#10193](https://github.com/getpaseo/paseo/pull/10193))
- **监视 PR**:Agent 可以监视 GitHub PR,在检查、审查或评论有变化时收到通知。([#10148](https://github.com/getpaseo/paseo/pull/10148))
- **在后台任务中查看 heartbeat**:在 Agent 的后台任务旁查看和停止 heartbeat。([#10097](https://github.com/getpaseo/paseo/pull/10097), [#10216](https://github.com/getpaseo/paseo/pull/10216))
- **Agent 消息排队等待**:其他 Agent 的报告和通知会在当前轮次结束后到达,不会打断当前轮次。([#9757](https://github.com/getpaseo/paseo/pull/9757))
- **插件 Agent 指令**:插件可以向 Agent 添加自己的指令。([#9781](https://github.com/getpaseo/paseo/pull/9781))
### 新增
- 新增 Cmd/Ctrl+/ 和 Cmd/Ctrl+Shift+/ 快捷键,用于打开模型选择器和切换思考级别 ([#10147](https://github.com/getpaseo/paseo/pull/10147))
- 新增在发送第一条消息前通过命令中心搜索 Agent 设置 ([#10182](https://github.com/getpaseo/paseo/pull/10182),贡献者:[@cleiter](https://github.com/cleiter))
- 新增在命令中心回退最近轮次的操作 ([#10144](https://github.com/getpaseo/paseo/pull/10144))
- 新增符合条件的 Claude 模型的独立 Ultracode 开关 ([#10150](https://github.com/getpaseo/paseo/pull/10150),贡献者:[@fivetaku](https://github.com/fivetaku))
- 新增 Codex Flex 速度选项 ([#9809](https://github.com/getpaseo/paseo/pull/9809),贡献者:[@qjqqyy](https://github.com/qjqqyy))
- 新增 shell 脚本和 Dockerfile 的语法高亮 ([#10178](https://github.com/getpaseo/paseo/pull/10178))
- 新增 `paseo ls --json` 输出的标签和工作区 ID ([#10076](https://github.com/getpaseo/paseo/pull/10076))
### 变更
- 连接多个 Desktop 时,`browser_new_tab` 会让 Agent 选择打开标签页的 Desktop ([#10189](https://github.com/getpaseo/paseo/pull/10189))
- 工作区 Git 状态在短暂重连且检出的内容未更改时复用之前的快照 ([#10142](https://github.com/getpaseo/paseo/pull/10142),贡献者:[@VladimirGVP](https://github.com/VladimirGVP))
- 工作区导航会立即响应点击,并在手机端初始加载时减少屏幕外的对话行数 ([#9887](https://github.com/getpaseo/paseo/pull/9887))
- worktree 清理命令默认在一分钟后停止并保留 worktree;如需更长时间,可在 `paseo.json` 中设置 `worktree.teardownTimeoutMs` ([#9852](https://github.com/getpaseo/paseo/pull/9852),贡献者:[@ragokan](https://github.com/ragokan))
### 修复
- 修复启用“折叠轮次”时,空闲的 Provider 通知导致已完成的 OMP 或 Pi 回复被隐藏的问题 ([#10135](https://github.com/getpaseo/paseo/pull/10135))
- 修复 Agent 响应后台任务时,在之前的完成状态未读的情况下重复发送完成通知的问题 ([#10200](https://github.com/getpaseo/paseo/pull/10200))
- 修复空对话在回复中途重连后丢失提示词和回复开头的问题 ([#9723](https://github.com/getpaseo/paseo/pull/9723),贡献者:[@ragokan](https://github.com/ragokan))
- 修复切换 Claude 思考级别时停止后台任务的问题 ([#10008](https://github.com/getpaseo/paseo/pull/10008),贡献者:[@gilad-rubin](https://github.com/gilad-rubin))
- 修复共享 OpenCode 服务停止后轮次一直显示为运行中的问题 ([#10187](https://github.com/getpaseo/paseo/pull/10187))
- 修复 OMP 提供会话或授权选项时拒绝已批准工具调用的问题 ([#10126](https://github.com/getpaseo/paseo/pull/10126),贡献者:[@dsingal0](https://github.com/dsingal0))
- 修复 Git 元数据监听达到上限时无法打开“更改”的问题 ([#10188](https://github.com/getpaseo/paseo/pull/10188))
- 修复将选中的回复复制到纯文本目标时出现多余 Markdown 语法的问题 ([#10079](https://github.com/getpaseo/paseo/pull/10079),贡献者:[@danberindei](https://github.com/danberindei))
- 修复在预览和源码之间切换时文件视图丢失滚动位置的问题,iOS 的 HTML 预览除外 ([#10195](https://github.com/getpaseo/paseo/pull/10195),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
- 修复拆分窗格中的文件标签页显示或聚焦错误文件的问题 ([#9888](https://github.com/getpaseo/paseo/pull/9888),贡献者:[@KosmoCHE](https://github.com/KosmoCHE))
- 修复触摸屏上的子菜单打开后立即关闭的问题 ([#10175](https://github.com/getpaseo/paseo/pull/10175),贡献者:[@christiantwu](https://github.com/christiantwu))
- 修复关闭另一个使用过麦克风的对话后无法听写的问题 ([#10185](https://github.com/getpaseo/paseo/pull/10185),贡献者:[@Brandon168](https://github.com/Brandon168))
- 修复 Android 缩放对话图片后 Composer 点击失效的问题 ([#10057](https://github.com/getpaseo/paseo/pull/10057))
- 修复 Samsung DeX 上的文字被裁剪的问题 ([#9995](https://github.com/getpaseo/paseo/pull/9995),贡献者:[@easyhunjune](https://github.com/easyhunjune))
- 修复主机连接缓慢后对话中的工作区图片无法加载的问题 ([#10111](https://github.com/getpaseo/paseo/pull/10111),贡献者:[@ragokan](https://github.com/ragokan))
- 修复桌面浏览器截图返回全透明图片的问题 ([#9807](https://github.com/getpaseo/paseo/pull/9807),贡献者:[@monarchmaisuriya](https://github.com/monarchmaisuriya))
- 修复 Mermaid 流程图标签含有 `@` 时显示源码而非图表的问题 ([#10165](https://github.com/getpaseo/paseo/pull/10165),贡献者:[@monarchmaisuriya](https://github.com/monarchmaisuriya))
- 修复隐藏的后台工作区触发程序坞徽标和网站图标状态的问题 ([#9983](https://github.com/getpaseo/paseo/pull/9983))
- 修复桌面侧边栏导航占满工作区列表空间的问题 ([#9903](https://github.com/getpaseo/paseo/pull/9903),贡献者:[@pentatonic-alex](https://github.com/pentatonic-alex))
- 修复 Provider 关闭会话后插件 Agent 无法重新打开的问题 ([#10153](https://github.com/getpaseo/paseo/pull/10153))
- 修复插件页面和设置无法使用插件状态钩子的问题 ([#10049](https://github.com/getpaseo/paseo/pull/10049))
- 修复 Codex 消息在轮次开始前停止时显示错误而非已取消的问题 ([#9931](https://github.com/getpaseo/paseo/pull/9931),贡献者:[@3ae3ae](https://github.com/3ae3ae))
- 修复仓库默认分支显示历史已关闭 PR 徽标的问题 ([#10053](https://github.com/getpaseo/paseo/pull/10053))
## 0.16.2 - 2026-11-18
### 修复
- 修复启用“折叠轮次”时,Claude 回复后续后台任务通知导致上一条已完成的回复被折叠的问题 ([#10092](https://github.com/getpaseo/paseo/pull/10092))
- 修复归档工作区时丢失分离 HEAD 的 worktree 提交的问题 ([#10009](https://github.com/getpaseo/paseo/pull/10009),贡献者:[@ragokan](https://github.com/ragokan))
- 修复 Desktop 更新后,由上一次 Desktop 会话启动的旧版 daemon 仍在运行的问题 ([#10067](https://github.com/getpaseo/paseo/pull/10067))
- 修复更改执行权限后 daemon 与 Hub 断开连接的问题 ([#10113](https://github.com/getpaseo/paseo/pull/10113))
- 修复一条已保存的主机记录无法读取时,其他主机也消失的问题 ([#9847](https://github.com/getpaseo/paseo/pull/9847),贡献者:[@ragokan](https://github.com/ragokan))
- 修复创建 worktree 时,扫描 `.worktreeinclude` 未指定的大型忽略目录导致超时的问题 ([#10020](https://github.com/getpaseo/paseo/pull/10020),贡献者:[@mgranderath](https://github.com/mgranderath))
- 修复发送引导消息时取消 Claude 正在进行的上下文压缩的问题 ([#10028](https://github.com/getpaseo/paseo/pull/10028),贡献者:[@NightMachinery](https://github.com/NightMachinery))
- 修复 Provider 重用已取消的轮次 ID 时,再次停止导致 Agent 卡住的问题 ([#9774](https://github.com/getpaseo/paseo/pull/9774),贡献者:[@DAnaeto](https://github.com/DAnaeto))
- 修复 Desktop 渲染进程意外退出后窗口一直空白的问题 ([#10035](https://github.com/getpaseo/paseo/pull/10035))
- 修复 Web 和 Desktop 上文件下载失败时,错误页面占据应用窗口的问题 ([#9937](https://github.com/getpaseo/paseo/pull/9937),贡献者:[@panta82](https://github.com/panta82))
- 修复在“导入会话”中选择“加载更多”时丢失滚动位置的问题 ([#9974](https://github.com/getpaseo/paseo/pull/9974))
- 修复主目录所在的文件系统拒绝 Unix 套接字时无法打开终端的问题,例如 AFS ([#9214](https://github.com/getpaseo/paseo/pull/9214),贡献者:[@bendavid](https://github.com/bendavid))
- 修复 Git 监视器设置超时后反复扫描大型仓库的问题 ([#9828](https://github.com/getpaseo/paseo/pull/9828),贡献者:[@Spshulem](https://github.com/Spshulem))
- 修复 `paseo workspace create --path .` 使用本地 daemon 的目录而非命令所在目录的问题 ([#10010](https://github.com/getpaseo/paseo/pull/10010))
- 修复针对空闲 Agent 查询 MCP 状态或列表时漏报后台任务的问题 ([#10022](https://github.com/getpaseo/paseo/pull/10022),贡献者:[@ortschun](https://github.com/ortschun))
- 修复 OMP 更改思考级别后,选择器仍显示旧级别的问题 ([#9841](https://github.com/getpaseo/paseo/pull/9841),贡献者:[@dsingal0](https://github.com/dsingal0))
## 0.16.1 - 2026-11-17 ## 0.16.1 - 2026-11-17
### 修复 ### 修复
@@ -23,6 +96,7 @@
- **插件侧边栏视图**:插件可以用自己的布局替换侧边栏,展示已连接主机上的工作区和 Agent。在“设置 → 侧边栏”中为每台设备选择视图。 ([#8906](https://github.com/getpaseo/paseo/pull/8906)) - **插件侧边栏视图**:插件可以用自己的布局替换侧边栏,展示已连接主机上的工作区和 Agent。在“设置 → 侧边栏”中为每台设备选择视图。 ([#8906](https://github.com/getpaseo/paseo/pull/8906))
- **插件 Composer 控件**:插件可以添加 Composer 控件、编辑草稿和附件,以及更改 Agent 设置。插件还可以添加“新建工作区”条目,并在 Agent 和工作区上保存元数据。 ([#8744](https://github.com/getpaseo/paseo/pull/8744), [#9209](https://github.com/getpaseo/paseo/pull/9209), [#9207](https://github.com/getpaseo/paseo/pull/9207), [#9734](https://github.com/getpaseo/paseo/pull/9734),贡献者:[@michaelmwu](https://github.com/michaelmwu)) - **插件 Composer 控件**:插件可以添加 Composer 控件、编辑草稿和附件,以及更改 Agent 设置。插件还可以添加“新建工作区”条目,并在 Agent 和工作区上保存元数据。 ([#8744](https://github.com/getpaseo/paseo/pull/8744), [#9209](https://github.com/getpaseo/paseo/pull/9209), [#9207](https://github.com/getpaseo/paseo/pull/9207), [#9734](https://github.com/getpaseo/paseo/pull/9734),贡献者:[@michaelmwu](https://github.com/michaelmwu))
- **排列用量卡片**:拖动 Provider 卡片来调整顺序,并关闭不想在侧边栏摘要中显示的卡片。在用量设置中选择主机。 ([#9660](https://github.com/getpaseo/paseo/pull/9660), [#9740](https://github.com/getpaseo/paseo/pull/9740), [#9748](https://github.com/getpaseo/paseo/pull/9748), [#9780](https://github.com/getpaseo/paseo/pull/9780)) - **排列用量卡片**:拖动 Provider 卡片来调整顺序,并关闭不想在侧边栏摘要中显示的卡片。在用量设置中选择主机。 ([#9660](https://github.com/getpaseo/paseo/pull/9660), [#9740](https://github.com/getpaseo/paseo/pull/9740), [#9748](https://github.com/getpaseo/paseo/pull/9748), [#9780](https://github.com/getpaseo/paseo/pull/9780))
- **fx Provider**:在 Paseo 中运行 Vercel Labs 的编程 Agent [fx](https://paseo.sh/zh-CN/docs/supported-providers/fx)。在“设置 → Hosts → 提供方”的 Provider 目录中添加。 ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- **返回应用时更少提示**:返回没有变化的聊天时,不再闪现“正在更新消息”。Paseo 会保留可用的连接,并在你返回时恢复断开的连接。重连后,已是最新状态的聊天也不再显示额外的更新提示。 ([#9242](https://github.com/getpaseo/paseo/pull/9242), [#8651](https://github.com/getpaseo/paseo/pull/8651), [#9086](https://github.com/getpaseo/paseo/pull/9086), [#8855](https://github.com/getpaseo/paseo/pull/8855), [#9116](https://github.com/getpaseo/paseo/pull/9116), [#9558](https://github.com/getpaseo/paseo/pull/9558),贡献者:[@adamcstephens](https://github.com/adamcstephens)) - **返回应用时更少提示**:返回没有变化的聊天时,不再闪现“正在更新消息”。Paseo 会保留可用的连接,并在你返回时恢复断开的连接。重连后,已是最新状态的聊天也不再显示额外的更新提示。 ([#9242](https://github.com/getpaseo/paseo/pull/9242), [#8651](https://github.com/getpaseo/paseo/pull/8651), [#9086](https://github.com/getpaseo/paseo/pull/9086), [#8855](https://github.com/getpaseo/paseo/pull/8855), [#9116](https://github.com/getpaseo/paseo/pull/9116), [#9558](https://github.com/getpaseo/paseo/pull/9558),贡献者:[@adamcstephens](https://github.com/adamcstephens))
- **重建移动端聊天**:在 iOS 和 Android 上展开轮次摘要、待办卡片和工具组时,阅读位置保持不变。滚动期间发送消息会移到新提示词处。 ([#8717](https://github.com/getpaseo/paseo/pull/8717), [#9085](https://github.com/getpaseo/paseo/pull/9085), [#9806](https://github.com/getpaseo/paseo/pull/9806), [#9693](https://github.com/getpaseo/paseo/pull/9693)) - **重建移动端聊天**:在 iOS 和 Android 上展开轮次摘要、待办卡片和工具组时,阅读位置保持不变。滚动期间发送消息会移到新提示词处。 ([#8717](https://github.com/getpaseo/paseo/pull/8717), [#9085](https://github.com/getpaseo/paseo/pull/9085), [#9806](https://github.com/getpaseo/paseo/pull/9806), [#9693](https://github.com/getpaseo/paseo/pull/9693))
- **更快的 diff 加载**:“更改”在文件内容加载完成前先显示文件树。大型 diff 分批加载,且优先于后台 worktree 扫描。 ([#8907](https://github.com/getpaseo/paseo/pull/8907), [#9241](https://github.com/getpaseo/paseo/pull/9241), [#9243](https://github.com/getpaseo/paseo/pull/9243), [#9584](https://github.com/getpaseo/paseo/pull/9584)) - **更快的 diff 加载**:“更改”在文件内容加载完成前先显示文件树。大型 diff 分批加载,且优先于后台 worktree 扫描。 ([#8907](https://github.com/getpaseo/paseo/pull/8907), [#9241](https://github.com/getpaseo/paseo/pull/9241), [#9243](https://github.com/getpaseo/paseo/pull/9243), [#9584](https://github.com/getpaseo/paseo/pull/9584))
@@ -36,7 +110,6 @@
- 为 worktree 的 diff、提交和 Git 操作新增基准分支选择器(Change base) ([#8642](https://github.com/getpaseo/paseo/pull/8642), [#8934](https://github.com/getpaseo/paseo/pull/8934),贡献者:[@Myasuka](https://github.com/Myasuka)) - 为 worktree 的 diff、提交和 Git 操作新增基准分支选择器(Change base) ([#8642](https://github.com/getpaseo/paseo/pull/8642), [#8934](https://github.com/getpaseo/paseo/pull/8934),贡献者:[@Myasuka](https://github.com/Myasuka))
- 新增可解析 SSH 别名和 fork 上游仓库的 Issue 和 PR 链接 ([#8636](https://github.com/getpaseo/paseo/pull/8636), [#9576](https://github.com/getpaseo/paseo/pull/9576)) - 新增可解析 SSH 别名和 fork 上游仓库的 Issue 和 PR 链接 ([#8636](https://github.com/getpaseo/paseo/pull/8636), [#9576](https://github.com/getpaseo/paseo/pull/9576))
- 新增 iPhone Duo 布局,侧边栏和工作区分列折痕两侧 ([#8741](https://github.com/getpaseo/paseo/pull/8741), [#8901](https://github.com/getpaseo/paseo/pull/8901),贡献者:[@zeyugao](https://github.com/zeyugao)) - 新增 iPhone Duo 布局,侧边栏和工作区分列折痕两侧 ([#8741](https://github.com/getpaseo/paseo/pull/8741), [#8901](https://github.com/getpaseo/paseo/pull/8901),贡献者:[@zeyugao](https://github.com/zeyugao))
- 新增 fx Provider,可在“设置 → Hosts → 提供方”的 Provider 目录中添加 ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- 新增后台 Agent,不占用标签页、不发送通知,也不出现在默认 Agent 列表中 ([#8683](https://github.com/getpaseo/paseo/pull/8683)) - 新增后台 Agent,不占用标签页、不发送通知,也不出现在默认 Agent 列表中 ([#8683](https://github.com/getpaseo/paseo/pull/8683))
- 新增 Terraform 和 HCL 文件(`.tf`、`.tfvars`、`.hcl`)的语法高亮 ([#9106](https://github.com/getpaseo/paseo/pull/9106)) - 新增 Terraform 和 HCL 文件(`.tf`、`.tfvars`、`.hcl`)的语法高亮 ([#9106](https://github.com/getpaseo/paseo/pull/9106))
- 在每个 Agent 的环境中新增 `PASEO_WORKSPACE_ID`,Agent 可据此识别、重命名或归档自己的工作区 ([#8939](https://github.com/getpaseo/paseo/pull/8939),贡献者:[@DTTerastar](https://github.com/DTTerastar)) - 在每个 Agent 的环境中新增 `PASEO_WORKSPACE_ID`,Agent 可据此识别、重命名或归档自己的工作区 ([#8939](https://github.com/getpaseo/paseo/pull/8939),贡献者:[@DTTerastar](https://github.com/DTTerastar))
+6 -2
View File
@@ -91,8 +91,12 @@ You need at least one agent CLI installed and configured with your credentials:
- [GitHub Copilot](https://github.com/features/copilot/cli/) - [GitHub Copilot](https://github.com/features/copilot/cli/)
- [OpenCode](https://github.com/anomalyco/opencode) - [OpenCode](https://github.com/anomalyco/opencode)
- [Pi](https://pi.dev) - [Pi](https://pi.dev)
- [Antigravity](https://paseo.sh/docs/supported-providers#antigravity) - [Antigravity](https://paseo.sh/docs/supported-providers/antigravity)
- [Muse Code](https://paseo.sh/docs/muse-code) - [Muse Code](https://paseo.sh/docs/supported-providers/muse-code)
- [fx](https://paseo.sh/docs/supported-providers/fx)
- [Hoplite](https://paseo.sh/docs/supported-providers/hoplite)
Paseo also runs Cursor, Gemini CLI, and many other agents. See [Supported providers](https://paseo.sh/docs/supported-providers) for the full list and setup steps.
### Desktop app (recommended) ### Desktop app (recommended)
+12 -5
View File
@@ -163,8 +163,16 @@ override a scroll away because they can arrive after the action that requested t
### Draw distance ### Draw distance
`drawDistance` is 2000 px on each side of the viewport. A fling over rows that were never measured The native timeline starts with one window-height of draw distance, up to 2000 px. This keeps
blanks the viewport until LegendList renders and measures them. Twelve flings over a chat with a nearby rows ready for a fling during placement. Once the chat is placed, history is visible, and
the sidebar has settled, the timeline schedules expansion to 2000 px through two frame callbacks.
The callbacks leave time for the reveal to paint. Verify the actual reveal on the device.
A drag cancels a pending expansion and uses the existing buffer as the window moves. Expansion
resumes when the gesture settles, including momentum. In an Android emulator capture, expanding
the full buffer during the first fling changed the measured content height and returned the chat
to the end mid-fling.
A fling over rows that were never measured blanks the viewport
until LegendList renders and measures them. Twelve flings over a chat with a
15,000 px turn expanded, Android emulator, dev build: 15,000 px turn expanded, Android emulator, dev build:
| List | Blank viewport | Janky frames | p50 / p90 / p99 | | List | Blank viewport | Janky frames | p50 / p90 / p99 |
@@ -179,9 +187,8 @@ With every turn collapsed, flinging from a cold open into history did not blank
### LegendList patch ### LegendList patch
`patches/@legendapp+list+3.7.1.patch` carries twelve changes for the timeline. Its header lists `patches/@legendapp+list+3.7.1.patch` lists its changes by purpose.
them by purpose, and [legend-list #593](https://github.com/LegendApp/legend-list/issues/593) reports the first twelve.
[legend-list #593](https://github.com/LegendApp/legend-list/issues/593) reports each upstream.
Drop a hunk when the installed LegendList ships its fix. Drop a hunk when the installed LegendList ships its fix.
### Scroll view corrections ### Scroll view corrections
+8
View File
@@ -121,6 +121,14 @@ from `packages/app/android`:
These check terminal arrow ownership, held-key repeats and modifiers, and ordinary text-field editing. These check terminal arrow ownership, held-key repeats and modifiers, and ordinary text-field editing.
Run the display density regression tests the same way:
```bash
./gradlew :paseo-display-metrics:connectedDebugAndroidTest --no-daemon --max-workers=2 -Dorg.gradle.parallel=false
```
These check that React Native sizes text at the window's density when the window is on another display, such as Samsung DeX.
### Diagnostic logs without ADB ### Diagnostic logs without ADB
In a dogfood build, open Android's Files app → Downloads → **Paseo diagnostics** and share all In a dogfood build, open Android's Files app → Downloads → **Paseo diagnostics** and share all
+1 -1
View File
@@ -506,5 +506,5 @@ Agent and terminal environments are unchanged. System proxy settings and SOCKS-o
## Deployment models ## Deployment models
1. **Local daemon** (default): `paseo daemon start` on `127.0.0.1:6767` 1. **Local daemon** (default): `paseo daemon start` on `127.0.0.1:6767`
2. **Managed desktop**: Electron uses the server package’s local-instance lifecycle capability for sanitized launch, published readiness, and captured-PID stop. Only a matching `{pid, startedAt}` from a spawn in the current Desktop session authorizes automatic stop or binary replacement. Preexisting instances, including legacy `desktopManaged` records, are attach-only. Keep-running survivors attach in the next session. Explicit attached Stop requires a confirmation naming the captured home/PID. Ordinary Restart uses the worker RPC on every app platform. 2. **Managed desktop**: Electron uses the server package’s local-instance lifecycle capability for sanitized launch, published readiness, and captured-PID stop. Only Desktop's own launch writes `desktopManaged: true` to `paseo.pid`. The CLI launch path removes the flag. While Desktop manages the built-in daemon, an app update or a version mismatch replaces any `desktopManaged` daemon, including one that an earlier Desktop session left running. Bundled CLIs before v0.9.0 exported the flag, so a daemon that one of them started also carries it and is replaced. Quit, Settings, and host removal stop only a daemon that the current session launched, matched by `{pid, startedAt}`. A daemon that the user started through the CLI is attach-only. Explicit attached Stop requires a confirmation naming the captured home/PID. Ordinary Restart uses the worker RPC on every app platform.
3. **Remote + relay**: Daemon behind firewall, relay bridges with E2E encryption 3. **Remote + relay**: Daemon behind firewall, relay bridges with E2E encryption
+4 -1
View File
@@ -117,7 +117,10 @@ There is no renderer prep/restore handshake or lifetime background-throttling ov
Screenshot capture temporarily enables frame production inside the shared serialized queue, Screenshot capture temporarily enables frame production inside the shared serialized queue,
restores the previous throttling policy on success or failure, and retains a 5-second capture budget. restores the previous throttling policy on success or failure, and retains a 5-second capture budget.
The browser tool takes one viewport frame through Electron's frame subscription and releases the The browser tool takes one viewport frame through Electron's frame subscription and releases the
subscription on completion or cancellation. A resized resident guest can produce fresh pixels subscription on completion or cancellation. Guest pages have a transparent base background, so a page
that has painted nothing yet (a dev server hiding `body` until its JS boots) produces frames where
every pixel is transparent. Both screenshot paths skip those frames and return `screenshot_no_frame`
when the capture budget expires without a painted one. A resized resident guest can produce fresh pixels
while `capturePage()` leaves its surface-copy request pending; waiting for animation frames or while `capturePage()` leaves its surface-copy request pending; waiting for animation frames or
retrying the copy does not repair that state. Full-page screenshots retain the CDP path with layout retrying the copy does not repair that state. Full-page screenshots retain the CDP path with layout
metrics and screenshot clip. metrics and screenshot clip.
+6 -6
View File
@@ -134,7 +134,7 @@ A section or group explains itself through the `info` prop on `<SettingsSection>
Cards inside a section sit closer than sections. Rows inside a card touch — only the divider separates them. The rhythm is page → spacious; section → spacious; card → tight. Cards inside a section sit closer than sections. Rows inside a card touch — only the divider separates them. The rhythm is page → spacious; section → spacious; card → tight.
Rows have generous vertical padding: roughly 16px of content plus 16px of vertical padding for settings rows, 8–12px for sidebar list items where many rows must fit. Compressing rows below the established density to fit more on the screen is wrong. Too many rows means more cards or more sections, not smaller rows. Rows have generous vertical padding: roughly 16px of content plus 16px of vertical padding for settings rows, 8–12px for sidebar list items where many rows must fit. A row that opens something (`<SettingsDetailRow>`, a collapsible row's header) is at least as tall as one holding a default control, so a list where only some of those rows carry a switch keeps one row height. Other rows take their content's height. Compressing rows below the established density to fit more on the screen is wrong. Too many rows means more cards or more sections, not smaller rows.
Rows revealed under a `<SettingsCollapsibleRow>` are nested rows, one step smaller than card rows: 8px of vertical padding, `fontSize.sm` text, `sm` controls, and one fixed height so rows with and without a trailing button line up. The collapsible row sets this for everything under it (`packages/app/src/components/settings/row-density.tsx`). Never pass a density to a row, and never pad or resize a nested row by hand. Settings rows that share a menu surface with menu rows, such as Usage's options, go inside `<MenuSettingsRows>`, which puts their labels on the menu rows' label rail (`menuRowContentInset`). Rows revealed under a `<SettingsCollapsibleRow>` are nested rows, one step smaller than card rows: 8px of vertical padding, `fontSize.sm` text, `sm` controls, and one fixed height so rows with and without a trailing button line up. The collapsible row sets this for everything under it (`packages/app/src/components/settings/row-density.tsx`). Never pass a density to a row, and never pad or resize a nested row by hand. Settings rows that share a menu surface with menu rows, such as Usage's options, go inside `<MenuSettingsRows>`, which puts their labels on the menu rows' label rail (`menuRowContentInset`).
@@ -207,11 +207,11 @@ Terminology:
## 11. States ## 11. States
Loading is inline by default. `<LoadingSpinner size={14} color={foregroundMuted} />` sits next to the thing it relates to (`packages/app/src/screens/settings/providers-section.tsx:227-231`). Page-level loading is a centered `<LoadingSpinner size="large">` (`packages/app/src/screens/sessions-screen.tsx:69-72`). Card-level loading is a single short line, not a spinner. In-row dropdown items use `<DropdownMenuItem status="pending" pendingLabel="Removing...">`; the menu item handles its own pending state. Loading is inline by default. `<LoadingSpinner size={14} color={foregroundMuted} />` leads the line it relates to, never trails a label: a settings row's hint takes `hintStatus="busy"` while its work runs, and `hintStatus="pending"` holds the line with a skeleton until its value is read (`packages/app/src/components/settings/row-header.tsx`). Page-level loading is a centered `<LoadingSpinner size="large">` (`packages/app/src/screens/sessions-screen.tsx:69-72`). Card-level loading is a single short line, not a spinner. In-row dropdown items use `<DropdownMenuItem status="pending" pendingLabel="Removing...">`; the menu item handles its own pending state.
Screen-level empty states use a centered, muted noun phrase and at most one ghost button (`packages/app/src/screens/sessions-screen.tsx`). Sidebar list empty states use a quiet bordered card with a left-aligned `sm` title, a muted `sm` description, and `sm` `<Button>` actions. Use `secondary` for the primary action and `outline` for a secondary action (`packages/app/src/components/sidebar/empty-states.tsx`). Keep both forms short and free of illustrations. Screen-level empty states use a centered, muted noun phrase and at most one ghost button (`packages/app/src/screens/sessions-screen.tsx`). Sidebar list empty states use a quiet bordered card with a left-aligned `sm` title, a muted `sm` description, and `sm` `<Button>` actions. Use `secondary` for the primary action and `outline` for a secondary action (`packages/app/src/components/sidebar/empty-states.tsx`). Keep both forms short and free of illustrations.
Inline errors are a single sentence in `palette.red[300]` `xs`, sitting under the field or inside the card it relates to (`packages/app/src/screens/settings/providers-section.tsx:115-119`). Inline errors are a single sentence in `palette.red[300]` `xs`, sitting under the field or inside the card it relates to (`packages/app/src/components/ui/form-field.tsx`). A settings row that is broken says so in its hint with `hintStatus="error"`: a red dot and the error in `statusDanger`.
Page-level alerts — informational notices, success confirmations, warnings, or recoverable errors that need a small visible block on the page — use `<Alert>` (`packages/app/src/components/ui/alert.tsx`). Variants: `default`, `info`, `success`, `warning`, `error`. The chrome is quiet by design: a 1px tinted border, transparent background, a small variant-tinted icon, the title in the variant accent, the description in `foregroundMuted`. Actions go in the `children` slot as `<Button variant="outline">` — recovery actions are low-frequency and outline keeps them quiet alongside the alert's accent (`packages/app/src/screens/project-settings-screen.tsx`). One `<Alert>` at a time per region. Page-level alerts — informational notices, success confirmations, warnings, or recoverable errors that need a small visible block on the page — use `<Alert>` (`packages/app/src/components/ui/alert.tsx`). Variants: `default`, `info`, `success`, `warning`, `error`. The chrome is quiet by design: a 1px tinted border, transparent background, a small variant-tinted icon, the title in the variant accent, the description in `foregroundMuted`. Actions go in the `children` slot as `<Button variant="outline">` — recovery actions are low-frequency and outline keeps them quiet alongside the alert's accent (`packages/app/src/screens/project-settings-screen.tsx`). One `<Alert>` at a time per region.
@@ -233,13 +233,13 @@ Changing state must not move the layout. A row that grows when its badge arrives
The row anatomy is a content column with an optional trailing slot. Inside a card the row is `settingsStyles.row`. Inside a sidebar list the row carries its own padding and `borderRadius.lg` per item (`packages/app/src/components/sidebar-workspace-list.tsx:2614-2625`). The row anatomy is a content column with an optional trailing slot. Inside a card the row is `settingsStyles.row`. Inside a sidebar list the row carries its own padding and `borderRadius.lg` per item (`packages/app/src/components/sidebar-workspace-list.tsx:2614-2625`).
Rows that drill into a detail lead with a chevron in the trailing slot (`ChevronRight`, `iconSize.sm`, `foregroundMuted`). The whole row is the `<Pressable>`. Pair-device row (`packages/app/src/screens/settings/host-page.tsx:644-668`), provider row (`packages/app/src/screens/settings/providers-section.tsx:92-132`), project row in the projects list. A fixed right chevron means navigation. An expandable row uses a trailing right chevron that rotates down when expanded (`SettingsCollapsibleRow`); pressing the row reveals its child rows in place. A trailing chevron opens a detail, as a page or a sheet (`ChevronRight`, `iconSize.sm`, `foregroundMuted`). The whole row is the pressable; use `<SettingsDetailRow>`. Pair-device row (`packages/app/src/screens/settings/host-page.tsx`), provider row (`packages/app/src/provider-settings/internal/provider-row.tsx`), project row in the projects list. A fixed right chevron means navigation. An expandable row uses a trailing right chevron that rotates down when expanded (`SettingsCollapsibleRow`); pressing the row reveals its child rows in place.
Kebab menus (`<DropdownMenu>` with `<MoreVertical size={14} />` trigger) are for actions on the row, not navigation. Trigger style: `padding: 2`, `borderRadius: 4`, hover background `surface2`. Menu position: `align="end"`. Items use `<DropdownMenuItem leading={<Icon size={14} color={foregroundMuted} />} ...>`. Visibility is `isHovered || isTouchPlatform` — hover-revealed on web, always visible on native (`packages/app/src/components/sidebar-workspace-list.tsx:684-770`). Kebab menus (`<DropdownMenu>` with `<MoreVertical size={14} />` trigger) are for actions on the row, not navigation. Trigger style: `padding: 2`, `borderRadius: 4`, hover background `surface2`. Menu position: `align="end"`. Items use `<DropdownMenuItem leading={<Icon size={14} color={foregroundMuted} />} ...>`. Visibility is `isHovered || isTouchPlatform` — hover-revealed on web, always visible on native (`packages/app/src/components/sidebar-workspace-list.tsx:684-770`).
A row may carry both a chevron and a kebab when both navigation and row-level actions apply. Chevron sits at the end; kebab sits before it. A row may carry both a chevron and a kebab when both navigation and row-level actions apply. Chevron sits at the end; kebab sits before it.
Switches and segmented controls also sit in the trailing slot. A row that both navigates and toggles is a `<Pressable>` with a `<Switch>` in the trailing slot — the switch calls `event.stopPropagation()` so the row press does not fire (`packages/app/src/screens/settings/providers-section.tsx:92-132`). Sidebar items that hold a status dot, a count, and a kebab follow the same rule (`packages/app/src/components/sidebar-workspace-list.tsx`). Switches and segmented controls also sit in the trailing slot. A row that both navigates and toggles passes its `<Switch>` as the `control` of `<SettingsDetailRow>`, before the chevron; the switch stops the press from reaching the row (`packages/app/src/provider-settings/internal/provider-row.tsx`). A list the user adds to ends with a muted `<SettingsAddRow>`. Sidebar items that hold a status dot, a count, and a kebab follow the same rule (`packages/app/src/components/sidebar-workspace-list.tsx`).
Selected state on rows in a desktop list+detail uses `surfaceSidebarHover` as the background (`packages/app/src/screens/projects-screen.tsx`). Selected state on rows in the sidebar list uses `surface2` (`packages/app/src/components/agent-list.tsx:563-571`). Selected state on rows in a desktop list+detail uses `surfaceSidebarHover` as the background (`packages/app/src/screens/projects-screen.tsx`). Selected state on rows in the sidebar list uses `surface2` (`packages/app/src/components/agent-list.tsx:563-571`).
@@ -288,7 +288,7 @@ New status pills use `<StatusBadge>`. Identity, shortcut, and interactive link b
| Pattern | Reference | | Pattern | Reference |
| --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| List+detail (compact stack, desktop sidebar+pane) | `packages/app/src/screens/settings-screen.tsx`, `packages/app/src/screens/projects-screen.tsx` | | List+detail (compact stack, desktop sidebar+pane) | `packages/app/src/screens/settings-screen.tsx`, `packages/app/src/screens/projects-screen.tsx` |
| Detail card+row | `packages/app/src/screens/settings/host-page.tsx`, `packages/app/src/screens/settings/providers-section.tsx` | | Detail card+row | `packages/app/src/screens/settings/host-page.tsx`, `packages/app/src/provider-settings/internal/provider-list.tsx` |
| Section grouping inside a card list | `packages/app/src/screens/settings/settings-section.tsx` | | Section grouping inside a card list | `packages/app/src/screens/settings/settings-section.tsx` |
| Form modal (label + input fields, primary + cancel) | `packages/app/src/hosts/add-host/internal/add-host-modal.tsx`, `packages/app/src/hosts/add-host/internal/pair-link-modal.tsx`, `packages/app/src/components/project-picker-modal.tsx` | | Form modal (label + input fields, primary + cancel) | `packages/app/src/hosts/add-host/internal/add-host-modal.tsx`, `packages/app/src/hosts/add-host/internal/pair-link-modal.tsx`, `packages/app/src/components/project-picker-modal.tsx` |
| Destructive confirmation | `confirmDialog` invoked from `packages/app/src/screens/settings/host-page.tsx:541-547` | | Destructive confirmation | `confirmDialog` invoked from `packages/app/src/screens/settings/host-page.tsx:541-547` |
+8
View File
@@ -20,6 +20,14 @@ input focused while its scrollable list lives in a Portal. There is no shared
"floating panel" primitive yet — when a fifth use case shows up we can revisit; "floating panel" primitive yet — when a fifth use case shows up we can revisit;
until then prefer copying the closest file and trimming. until then prefer copying the closest file and trimming.
## Picker trigger tooltips
Keep the picker surface outside `TooltipTrigger`. React focus events bubble
through portals, so putting the surface inside the trigger makes focus in its
search field look like focus on the button when a shortcut opens the picker.
For new `ComboboxTrigger` buttons, pass the hint through the `tooltip` prop. An
explicit `TooltipTrigger` wrapper is also safe when it wraps only the button.
## Popover width contract ## Popover width contract
Combobox desktop popovers are never narrower than their trigger, and they grow Combobox desktop popovers are never narrower than their trigger, and they grow
+4 -2
View File
@@ -99,8 +99,10 @@ Register the adapter in `defaultForgeRegistry` with:
Current change-request lookup matches the branch and repository for both open and Current change-request lookup matches the branch and repository for both open and
terminal requests. Prefer an open request, then a terminal request at the local terminal requests. Prefer an open request, then a terminal request at the local
HEAD, then the most recently updated terminal request. A reused branch can show HEAD, then the most recently updated terminal request. When the forge identifies
its previous request until a new one opens. Auto-archive separately requires an the checkout's branch as the origin repository's default branch, only open
requests are eligible. A reused feature branch can show its previous request
until a new one opens. Auto-archive separately requires an
observed open-to-merged transition and a fresh exact match between checkout HEAD observed open-to-merged transition and a fresh exact match between checkout HEAD
and the PR head, along with the existing workspace safety checks. and the PR head, along with the existing workspace safety checks.
+3 -2
View File
@@ -6,7 +6,7 @@ Authoritative terminology. UI label wins. Don't invent synonyms; use what's here
- **Workspace** — One concrete `cwd` on one daemon, with git state; belongs to exactly one project. Its `id` is opaque workspace identity; its `cwd` is the filesystem directory. UI: "Workspace". Code: `WorkspaceDescriptorPayload` (`packages/protocol/src/messages.ts:2178`). Don't confuse with: Branch (one branch can back many workspaces via worktrees). Forbidden: "Folder", "Directory" as UI label. - **Workspace** — One concrete `cwd` on one daemon, with git state; belongs to exactly one project. Its `id` is opaque workspace identity; its `cwd` is the filesystem directory. UI: "Workspace". Code: `WorkspaceDescriptorPayload` (`packages/protocol/src/messages.ts:2178`). Don't confuse with: Branch (one branch can back many workspaces via worktrees). Forbidden: "Folder", "Directory" as UI label.
- **Archive workspace** — Removes one workspace from active use and archives everything it owns. UI, CLI, and MCP always say "Archive workspace", regardless of backing. The daemon leaves ordinary directories intact and removes a Paseo-owned worktree only when no active workspace still references it. - **Archive workspace** — Removes one workspace from active use and archives everything it owns. UI, CLI, and MCP always say "Archive workspace", regardless of backing. The daemon leaves ordinary directories intact and removes a Paseo-owned worktree only when no active workspace still references it.
- **Workspace kind** — `"directory" | "local_checkout" | "worktree"`. The git-derived, persisted property of a workspace, used across its lifetime (archive safety, sidebar, grouping). Derived from the cwd's git reality by `deriveWorkspaceKind` in `workspace-registry-model.ts`, not stored from a user choice. Don't confuse with **Isolation** (the create-time intent). - **Workspace kind** — `"directory" | "local_checkout" | "worktree"`. The git-derived, persisted property of a workspace, used across its lifetime (archive safety, sidebar, grouping). Derived from the cwd's git reality by `deriveWorkspaceKind` in `workspace-registry-model.ts`, not stored from a user choice. Don't confuse with **Isolation** (the create-time intent).
- **Isolation** — Create-time choice for a new workspace: reuse the existing checkout (**Local**) or cut a dedicated git worktree (**New worktree**). A transient setup input, also remembered as a create-form preference; it is not a workspace property. UI: "Isolation" control on the New Workspace screen. Code: `isolation` (`"local" | "worktree"`), `useWorkspaceIsolation` (`packages/app/src/screens/new-workspace-screen.tsx`); persisted as `FormPreferences.isolation` (`packages/app/src/create-agent-preferences/preferences.ts`). Distinct from **Workspace kind**, which is the git-derived property the intent produces (Local → `local_checkout` or `directory` by git-ness; New worktree → `worktree`). On the wire it is the create request's `source.kind` (`directory | worktree`, `packages/protocol/src/messages.ts:1693`). - **Isolation** — Create-time choice for a new workspace, with three options: work in the project's own directory (**Project directory**), cut a dedicated git worktree (**New worktree**), or work in a git worktree already on disk (**Existing worktree**). A transient setup input; Project directory and New worktree are also remembered as a create-form preference. It is not a workspace property. UI: "Isolation" control on the New Workspace screen. Code: `isolation` (`"local" | "worktree"`), `useWorkspaceIsolation` (`packages/app/src/screens/new-workspace-screen.tsx`); persisted as `FormPreferences.isolation` (`packages/app/src/create-agent-preferences/preferences.ts`). Existing worktree is not a third value: it is `local` with the worktree's path as the source directory (`existingWorktreePath` in `packages/app/src/screens/new-workspace/setup-model.ts`), so plugins, preferences, and the wire see `local`. Distinct from **Workspace kind**, which is the git-derived property the intent produces (Project directory → `local_checkout` or `directory` by git-ness; New worktree and Existing worktree → `worktree`). On the wire it is the create request's `source.kind` (`directory | worktree`, `packages/protocol/src/messages.ts`). Forbidden: "Local" as the UI label.
- **Agent** — See **Agent session**. UI still says "Agent" / "New Agent" in places, but moving toward **Agent session** as the canonical term. Code: `AgentSnapshotPayload` (`packages/protocol/src/messages.ts:608`). Forbidden: "Task", "Job", "Run". - **Agent** — See **Agent session**. UI still says "Agent" / "New Agent" in places, but moving toward **Agent session** as the canonical term. Code: `AgentSnapshotPayload` (`packages/protocol/src/messages.ts:608`). Forbidden: "Task", "Job", "Run".
- **Daemon** — Local Paseo server process; identified by `serverId`. UI: "Daemon" (system contexts only). Code: `serverId` in `ServerInfoStatusPayloadSchema` (`packages/protocol/src/messages.ts:1936`), `DaemonClient` (`packages/client/src/daemon-client.ts`). - **Daemon** — Local Paseo server process; identified by `serverId`. UI: "Daemon" (system contexts only). Code: `serverId` in `ServerInfoStatusPayloadSchema` (`packages/protocol/src/messages.ts:1936`), `DaemonClient` (`packages/client/src/daemon-client.ts`).
- **Host** — Client-side connection profile pointing at a daemon; bundles one or more `HostConnection`s. UI: "Host" / "Add host" / "Switch host". Code: `HostProfile` (`packages/app/src/types/host-connection.ts:37`). Forbidden: "Connection" (means `HostConnection`, not host). - **Host** — Client-side connection profile pointing at a daemon; bundles one or more `HostConnection`s. UI: "Host" / "Add host" / "Switch host". Code: `HostProfile` (`packages/app/src/types/host-connection.ts:37`). Forbidden: "Connection" (means `HostConnection`, not host).
@@ -17,7 +17,8 @@ Authoritative terminology. UI label wins. Don't invent synonyms; use what's here
- **Forge** — Git hosting service behind Paseo's change-request features: GitHub, GitLab, Gitea, Forgejo, or a future registered adapter. Code: `ForgeService`, `forge-registry`, `forge-resolver`. Use `forge` for internal abstraction and registry IDs; use concrete forge names only when a behavior or RPC is forge-specific. - **Forge** — Git hosting service behind Paseo's change-request features: GitHub, GitLab, Gitea, Forgejo, or a future registered adapter. Code: `ForgeService`, `forge-registry`, `forge-resolver`. Use `forge` for internal abstraction and registry IDs; use concrete forge names only when a behavior or RPC is forge-specific.
- **Change request** — Forge-neutral term for a proposed branch-to-branch code change. UI normally renders the forge noun instead: GitHub/Gitea/Forgejo "PR", GitLab "MR". Code: `forge_change_request` attachments, `checkoutSource: { kind: "change_request" }`, and PR/MR status payloads. - **Change request** — Forge-neutral term for a proposed branch-to-branch code change. UI normally renders the forge noun instead: GitHub/Gitea/Forgejo "PR", GitLab "MR". Code: `forge_change_request` attachments, `checkoutSource: { kind: "change_request" }`, and PR/MR status payloads.
- **MR** — GitLab merge request. UI label for GitLab change requests only; do not use MR for GitHub/Gitea/Forgejo. - **MR** — GitLab merge request. UI label for GitLab change requests only; do not use MR for GitHub/Gitea/Forgejo.
- **Worktree** — Paseo-managed git worktree (`~/.paseo/worktrees/{name}`); also a `workspaceKind` value. User-facing creation treats it as the `worktree` workspace isolation choice. Code and `paseo.json` retain worktree terminology for git lifecycle implementation. Forbidden: "Checkout" as a product synonym. - **Worktree** — A git worktree: any working directory that `git worktree list` reports for the repository, whoever created it. Paseo creates its own under `$PASEO_HOME/worktrees/` and owns their setup and removal; worktrees made with `git worktree add` are listed by the Existing worktree picker but never removed by Paseo. Also a `workspaceKind` value. Code: `checkout.worktrees.list` RPC (`listGitWorktrees` in `packages/server/src/utils/worktree.ts`), gated on `server_info.features.checkoutWorktreeList`. Code and `paseo.json` retain worktree terminology for git lifecycle implementation. Don't confuse with: **Workspace** (Paseo's place for a task; several workspaces can work in one worktree, and a worktree with no workspace is still a worktree). Forbidden: "Checkout" as a product synonym.
- **Branch off / Check out** — What a New worktree does with the branch or pull request picked in the ref picker. **Branch off** starts a new branch from it; **Check out** works on that branch itself. Branches default to Branch off and pull requests to Check out; the user can switch either. Branching off a pull request starts the new branch at the pull request's head with no upstream. Git keeps a branch in one worktree at a time, so checking out a branch another worktree holds sends the user to that worktree instead of creating a copy. Code: `RefAction` (`packages/app/src/screens/new-workspace-picker-item.ts`), the worktree source's `action` (`"branch-off" | "checkout"`), gated on `server_info.features.worktreeRefActions`.
- **Repository / Remote** — Internal Git observations. They may produce mutable kind, branch, and project-grouping metadata but never the host-local project ID, root, display name, or workspace membership. No UI label. - **Repository / Remote** — Internal Git observations. They may produce mutable kind, branch, and project-grouping metadata but never the host-local project ID, root, display name, or workspace membership. No UI label.
- **Sidebar items** — The configurable entries of the app sidebar, in two sections. Header: the rows at the head of the sidebar — New workspace, History, Search, Schedules, and plugin header items. Footer: the full-width rows between Add project and the footer icon row — Usage and plugin footer items. Add project and the icon row (Hosts, Help and support, Settings) are fixed and are not sidebar items. A plugin item may render several rows, such as one per bot; it is still one item that moves and hides as a block. Each section's order and visibility is one per-device preference (`AppSettings.sidebarNavItems`, `AppSettings.sidebarFooterItems`); every item may be off. UI: the Header and Footer cards on the Sidebar settings page. Code: `packages/app/src/sidebar-nav/model.ts` resolves a section, and the sidebar (`components/sidebar/sidebar-nav-rows.tsx`, the footer in `components/left-sidebar.tsx`) and the settings page (`screens/settings/sidebar/sidebar-nav-section.tsx`) read it through `useSidebarNavItems(section)`. Never hardcode one of these entries or add a second place that decides which ones show. Don't confuse with **Explorer sidebar**. - **Sidebar items** — The configurable entries of the app sidebar, in two sections. Header: the rows at the head of the sidebar — New workspace, History, Search, Schedules, and plugin header items. Footer: the full-width rows between Add project and the footer icon row — Usage and plugin footer items. Add project and the icon row (Hosts, Help and support, Settings) are fixed and are not sidebar items. A plugin item may render several rows, such as one per bot; it is still one item that moves and hides as a block. Each section's order and visibility is one per-device preference (`AppSettings.sidebarNavItems`, `AppSettings.sidebarFooterItems`); every item may be off. UI: the Header and Footer cards on the Sidebar settings page. Code: `packages/app/src/sidebar-nav/model.ts` resolves a section, and the sidebar (`components/sidebar/sidebar-nav-rows.tsx`, the footer in `components/left-sidebar.tsx`) and the settings page (`screens/settings/sidebar/sidebar-nav-section.tsx`) read it through `useSidebarNavItems(section)`. Never hardcode one of these entries or add a second place that decides which ones show. Don't confuse with **Explorer sidebar**.
- **Explorer sidebar** — The dedicated navigation dock containing the Files and Changes trees. UI: "Explorer sidebar". Code: `packages/app/src/workspace-tabs/explorer-sidebar.ts`; persisted pane identifiers retain the `explorer` spelling. See [explorer-sidebar.md](explorer-sidebar.md). - **Explorer sidebar** — The dedicated navigation dock containing the Files and Changes trees. UI: "Explorer sidebar". Code: `packages/app/src/workspace-tabs/explorer-sidebar.ts`; persisted pane identifiers retain the `explorer` spelling. See [explorer-sidebar.md](explorer-sidebar.md).
+1 -1
View File
@@ -24,7 +24,7 @@ Math and video are disabled. Task lists and admonitions are enabled; task checkb
Mermaid fences use the existing isolated diagram runtime and fullscreen viewer. Web dispatches them through the library’s code-block override. Native has no block-renderer hook, so the renderer extracts only Mermaid fences and places the existing WebView host between library-rendered segments. This is the only block exception; see [native selection limitations](native-text-selection.md) for diagram grouping and leading inline images. Streaming keeps the last valid diagram visible while the next revision renders. Mermaid fences use the existing isolated diagram runtime and fullscreen viewer. Web dispatches them through the library’s code-block override. Native has no block-renderer hook, so the renderer extracts only Mermaid fences and places the existing WebView host between library-rendered segments. This is the only block exception; see [native selection limitations](native-text-selection.md) for diagram grouping and leading inline images. Streaming keeps the last valid diagram visible while the next revision renders.
Native code blocks use the library's copy control and compiled grammars. Web code blocks use `HighlightedCodeBlock` through the library's `renderers.codeBlock` override. The patch also keeps the library's block spacing around the web code block override, preserves web list numbering and link titles, marks pending parses with `aria-busy` so Find waits for rendered text, and carries link syntax through native and web tap events. Web inline code inside a link inherits only the link colour; its code font, size and background stay intact. Keep link variants colour-only: native pills replace text runs and prevent paths from wrapping; Android pills also use the surrounding block’s font size. The package patch is tracked by [upstream PR #997](https://github.com/software-mansion/enriched-markdown/pull/997); remove the patch when the pinned release includes it. Native code blocks use the library's copy control and compiled grammars. Web code blocks use `HighlightedCodeBlock` through the library's `renderers.codeBlock` override. Selection copy has to tell links Paseo recognized in the text (paths, forge references, code spans) from links in the Markdown, so the web link renderer marks the recognized ones. Plain-text paste carries them as the text the reply showed, and rich paste keeps them as links only when they point to an `http` or `https` URL. Authored links and parser autolinks such as a bare `www.example.com` copy as links. The patch also keeps the library's block spacing around the web code block override, preserves web list numbering and link titles, marks pending parses with `aria-busy` so Find waits for rendered text, and carries link syntax through native and web tap events. Web inline code inside a link inherits only the link colour; its code font, size and background stay intact. Keep link variants colour-only: native pills replace text runs and prevent paths from wrapping; Android pills also use the surrounding block’s font size. The package patch is tracked by [upstream PR #997](https://github.com/software-mansion/enriched-markdown/pull/997); remove the patch when the pinned release includes it.
The package patch also keeps overflowing native horizontal blocks in control of their drags: Android claims parent interception at touch-down and releases it for vertical drags so the chat list can scroll; iOS keeps its scroll recognizer active for outward drags at the leading edge. This prevents compact sidebar pans from taking block scrolling without changing sidebar swipes on prose or non-overflowing blocks. Native changes require a client rebuild. The package patch also keeps overflowing native horizontal blocks in control of their drags: Android claims parent interception at touch-down and releases it for vertical drags so the chat list can scroll; iOS keeps its scroll recognizer active for outward drags at the leading edge. This prevents compact sidebar pans from taking block scrolling without changing sidebar swipes on prose or non-overflowing blocks. Native changes require a client rebuild.
+15
View File
@@ -49,6 +49,21 @@ restarting the process. It writes snapshots and native failure state under
production package. This needs a native rebuild when the Unistyles patch changes; a Metro production package. This needs a native rebuild when the Unistyles patch changes; a Metro
reload cannot update it. reload cannot update it.
To check the first Android composer tap after pinch-to-zoom, install the rebuilt
APK and connect it to a chat whose latest assistant message contains a visible
Markdown image. For example, put `picture.png` in the agent workspace and have
the assistant reply with `![Test image](picture.png)`. Set `CHAT_URL` to the
chat's Paseo deep link and run from the repository root:
```bash
agent-device test packages/app/e2e/mobile/composer-keyboard/lightbox-pinch.android.ad \
--platform android --serial emulator-5554 -e APP_ID=sh.paseo -e "CHAT_URL=$CHAT_URL"
```
Use `APP_ID=sh.paseo.debug` for a development build. If the image has different
alt text, pass it with `-e IMAGE_LABEL="..."`. The test pinches the image, closes
it, types in the composer, and checks that a single Attach tap opens Upload file.
For Android keyboard continuity, run the current checkout in the app, open an idle terminal For Android keyboard continuity, run the current checkout in the app, open an idle terminal
with an empty prompt, hide its keyboard, and run: with an empty prompt, hide its keyboard, and run:
+16 -3
View File
@@ -129,7 +129,7 @@ availability and a diagnostic after the daemon resolves the executable. Configur
environment, or enablement overrides under `agents.providers.muse`. Omit `extends` to keep environment, or enablement overrides under `agents.providers.muse`. Omit `extends` to keep
the bundled integration; an entry with `extends` shadows it with a custom provider. See the bundled integration; an entry with `extends` shadows it with a custom provider. See
[provider contributions](#contribute-a-provider) for the contract and [provider contributions](#contribute-a-provider) for the contract and
[Muse Code](../public-docs/muse-code.md) for setup, per-agent options, and version limitations. [Muse Code](../public-docs/supported-providers/muse-code.md) for setup, per-agent options, and version limitations.
## Install from a registry ## Install from a registry
@@ -510,6 +510,18 @@ before calling status; it exposes your diagnostic through the normal provider di
A command-backed provider without status is available when its executable resolves. Providers with A command-backed provider without status is available when its executable resolves. Providers with
neither command nor status retain connection-based availability. neither command nor status retain connection-based availability.
Implement optional `installation` to fill the **Installation** section of provider settings. The
bridge sends each callback as a `provider.installation.*` request carrying the launch `status`
receives plus `resolved`. `resolved: false` means the executable was not found and `command` is
the configured name, so answer `not_installed` instead of spawning it. Inspect and update-check
requests use the 30 s plugin request timeout; the daemon's 25 s update-check deadline sits below
it, so a slow check reports that deadline. `update` has no request timeout and streams output
through `provider.installation.report`. When the daemon stops waiting on any of the three, it
sends `provider.installation.cancel`, which aborts the callback's `signal`.
The rules shared with built-ins are in [providers.md](providers.md#installation-and-updates); the
author contract is in the
[public provider guide](../public-docs/plugins/providers.md#report-installation-and-updates).
A same-ID config entry without `extends` overrides the plugin's `enabled`, `command`, `env`, label, A same-ID config entry without `extends` overrides the plugin's `enabled`, `command`, `env`, label,
description, and model configuration through the normal provider registry. `enabled: false` disables description, and model configuration through the normal provider registry. `enabled: false` disables
selection and discovery. An entry with `extends` defines the user's own provider, shadows the plugin, selection and discovery. An entry with `extends` defines the user's own provider, shadows the plugin,
@@ -788,14 +800,15 @@ is the [New workspace items reference](../public-docs/plugins/reference.md#new-w
The screen's choices that a plugin may change live in one plain store, The screen's choices that a plugin may change live in one plain store,
`createNewWorkspaceSetup` (`packages/app/src/screens/new-workspace/setup-model.ts`): the base `createNewWorkspaceSetup` (`packages/app/src/screens/new-workspace/setup-model.ts`): the base
picker selection, the manual isolation, the branch name and the workspace metadata. The pickers and picker selection, the manual isolation, the chosen existing worktree, the Branch off or Check out
action per ref list, the branch name and the workspace metadata. The pickers and
the plugin commands write to it, so a command sees what an earlier command left. Project and host the plugin commands write to it, so a command sees what an earlier command left. Project and host
stay in the screen's hooks (`useNewWorkspaceHostSelector` reconciles them against each other), and stay in the screen's hooks (`useNewWorkspaceHostSelector` reconciles them against each other), and
they are read-only to plugins; a command that switched them would unmount the item that called it. they are read-only to plugins; a command that switched them would unmount the item that called it.
The store is built in the render that creates the screen, with what the screen derives from its The store is built in the render that creates the screen, with what the screen derives from its
hooks (the lock, the project, whether the project can make worktrees, whether the host supports hooks (the lock, the project, whether the project can make worktrees, whether the host supports
metadata), so a command is valid from a child's first effect, which runs before the screen's own metadata and ref actions, the project's git worktrees), so a command is valid from a child's first effect, which runs before the screen's own
effects. `syncInputs` refreshes those inputs in a layout effect on every commit, and commands read effects. `syncInputs` refreshes those inputs in a layout effect on every commit, and commands read
them when they run, never from the render that built them. The pickers and the commands pick them when they run, never from the render that built them. The pickers and the commands pick
through the same `chooseBase` and `chooseIsolation`, so a plugin command has the effects of a through the same `chooseBase` and `chooseIsolation`, so a plugin command has the effects of a
+51 -4
View File
@@ -19,8 +19,8 @@ provider icon map. You do not need a core manifest entry or provider factory.
| Provider | Transport | Setup and limitations | | Provider | Transport | Setup and limitations |
| ----------- | ------------------------------------------ | ---------------------------------------------------------------- | | ----------- | ------------------------------------------ | ---------------------------------------------------------------- |
| Antigravity | Installed `agy` CLI | [Antigravity](../public-docs/supported-providers.md#antigravity) | | Antigravity | ACP over the installed `agy acp` CLI | [Antigravity](../public-docs/supported-providers/antigravity.md) |
| Muse Code | MSP over one `muse serve` host per session | [Muse Code](../public-docs/muse-code.md) | | Muse Code | MSP over one `muse serve` host per session | [Muse Code](../public-docs/supported-providers/muse-code.md) |
## Provider-native session options ## Provider-native session options
@@ -50,8 +50,8 @@ or without a control.
reject. A key the running session cannot apply (one the provider reads only when it opens) is reject. A key the running session cannot apply (one the provider reads only when it opens) is
rejected too, so a stored option always describes what runs. Claude reads most options when it rejected too, so a stored option always describes what runs. Claude reads most options when it
starts its query, and replacing a started query would end its background work, so after the starts its query, and replacing a started query would end its background work, so after the
first prompt only Fast can change. Codex fixes its approval policy and sandbox when the thread first prompt only Fast and Ultracode can change. Codex fixes its approval policy and sandbox
starts, so it applies only `service_tier` and `plan_mode` live. A session with no when the thread starts, so it applies only `service_tier` and `plan_mode` live. A session with no
`applyOptions` rejects every patch; the daemon enforces this. The provider returns the options `applyOptions` rejects every patch; the daemon enforces this. The provider returns the options
it ended up with when they differ from the request. The daemon stores the patch and that it ended up with when they differ from the request. The daemon stores the patch and that
result in one step after the call resolves. Throwing rejects the whole patch and none of it is result in one step after the call resolves. Throwing rejects the whole patch and none of it is
@@ -263,6 +263,53 @@ promise for completion: equal results, including equal discovery timestamps, emi
--- ---
## Installation and updates
The provider list and the **Installation** section of a provider's page read `AgentClient.installation`. Built-ins set
it on the client; plugins set `ProviderRegistration.installation`, which the plugin bridge maps to
the same interface. `ProviderInstallations` in `packages/server/src/server/agent/provider-installation/`
owns deadlines, caching and the one running update per provider, so a provider only answers.
Declare only what the vendor offers:
- `installUrl` and `updateUrl` link the vendor's own install and update docs.
- `inspect` reports the version the CLI prints. Versions are opaque: Paseo shows them as written
and never parses them.
- `checkForUpdates` receives the version `inspect` reported as `installedVersion` and asks the
source the CLI's own updater reads, such as the vendor's release endpoint or the CLI's
`update --check`. Do not read the version again. Leave it out when that source is inside the binary or
depends on how the CLI was installed, which is why Copilot and OpenCode have no check. Do not
build a release lookup of your own.
- `update` runs the CLI's own update command and passes its output through, using
`runUpdateCommand`. Paseo adds no verification, signature check or rollback, so the update does
exactly what the same command does in a terminal.
The three calls are separate because they cost differently. `inspect` runs for every provider
whenever the provider list shows, because each row states its version; a provider's page shares the
row's request. It has a 20 s deadline and a 30 s cache. `checkForUpdates` usually reaches the
network. Paseo calls it only after `inspect` reports the CLI installed, and keeps a conclusive
answer for an hour while `inspect` reports the same version, so a CLI updated outside Paseo is
checked again once the 30 s inspection expires. `update` runs for minutes, streams output, and is
aborted only when the daemon stops. A failed update stays on the provider until the next refresh
of its installation, which tells every client observing the provider's updates that it is gone; a
running one is never dropped.
The update check only informs. Once `inspect` reports the CLI installed, the app offers **Update**
for a provider that declares `update`, or **Update instructions** for one that declares only
`updateUrl`, whatever the check answers and whether the provider has one. The check's answer shows
beside the action when it has one. Copilot and OpenCode have no check, so they show **Update** alone.
Write the success message for the provider's process model. A CLI that Paseo starts once per agent
uses `updatedForNewAgents()`. OpenCode agents share one server that keeps the old binary running,
so its message asks the user to restart the daemon.
`createCliInstallation()` covers a CLI that prints `--version` and updates with a subcommand. It
resolves the configured command, so a profile that extends a built-in reports and updates the CLI
that profile launches. Clients for `extends: "acp"` providers declare no installation.
Test with fake executables, as `providers/provider-update-checks.test.ts` does. Running a real
updater during development replaces the CLI on your machine.
## Usage sources ## Usage sources
See the [public usage source reference](../public-docs/plugins/reference.md#usage-sources) for the See the [public usage source reference](../public-docs/plugins/reference.md#usage-sources) for the
+11 -3
View File
@@ -49,9 +49,17 @@ Large unbounded timeline responses can exceed relay frame limits, so catch-up us
Page limits are projected-item targets. A tool call lifecycle is one projected item even if it spans many source sequence numbers, and assistant/reasoning chunks are merged before counting. The response carries `seqStart`, `seqEnd`, `sourceSeqRanges`, and `collapsed` so clients can advance sequence cursors without rendering delta rows. Page limits are projected-item targets. A tool call lifecycle is one projected item even if it spans many source sequence numbers, and assistant/reasoning chunks are merged before counting. The response carries `seqStart`, `seqEnd`, `sourceSeqRanges`, and `collapsed` so clients can advance sequence cursors without rendering delta rows.
When live delivery detects a sequence gap, the app fetches `direction: "after"`. If the daemon When live delivery detects a sequence gap, the app fetches `direction: "after"` its end cursor. If
responds with `hasNewer: true`, the app immediately fetches the next page from `endCursor`. Gap the daemon responds with `hasNewer: true`, the app immediately fetches the next page from
recovery is complete only when `hasNewer: false`. `endCursor`. Gap recovery is complete only when `hasNewer: false`.
A chat that was empty when it last caught up has no end cursor to compare a live row against. Such a
row starts coverage only if it is the epoch's first row, seq 1. A later row means the chat missed the
rows before it, such as a prompt sent while the app was offline, so the app drops it and recovers
after seq 0. Coverage started at that later row would make the resume page look already applied, and
the chat and its replica cache would keep only the end of the reply. A recovery that waits behind a
running catch-up starts after whatever that catch-up applied, because the app applies a forward page
row by row and an older cursor repeats rows.
Initialization timeouts guard lack of catch-up progress, not the full multi-page sync. A successful page that queues the next `after` page refreshes the watchdog. Initialization timeouts guard lack of catch-up progress, not the full multi-page sync. A successful page that queues the next `after` page refreshes the watchdog.
@@ -0,0 +1,8 @@
Fixed
- Fixed Collapse turns hiding a finished reply when Claude answers a later background task notification
- Fixed detached worktree commits getting lost when archiving a workspace
- Fixed Desktop updates leaving an older daemon running when an earlier Desktop session started it
- Fixed daemons losing their Hub connection after execution permissions changed
- Fixed saved hosts disappearing when one stored entry could not be read
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,8 @@
Fixed
- Fixed Collapse turns hiding a finished reply when Claude answers a later background task notification
- Fixed detached worktree commits getting lost when archiving a workspace
- Fixed Desktop updates leaving an older daemon running when an earlier Desktop session started it
- Fixed daemons losing their Hub connection after execution permissions changed
- Fixed saved hosts disappearing when one stored entry could not be read
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,8 @@
Fixed
- Fixed Collapse turns hiding a finished reply when Claude answers a later background task notification
- Fixed detached worktree commits getting lost when archiving a workspace
- Fixed Desktop updates leaving an older daemon running when an earlier Desktop session started it
- Fixed daemons losing their Hub connection after execution permissions changed
- Fixed saved hosts disappearing when one stored entry could not be read
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,8 @@
Fixed
- Fixed Collapse turns hiding a finished reply when Claude answers a later background task notification
- Fixed detached worktree commits getting lost when archiving a workspace
- Fixed Desktop updates leaving an older daemon running when an earlier Desktop session started it
- Fixed daemons losing their Hub connection after execution permissions changed
- Fixed saved hosts disappearing when one stored entry could not be read
Full notes: https://paseo.sh/changelog
+1 -1
View File
@@ -1 +1 @@
sha256-k7+5S/4tyAmHdZmUdhpuZ7GOc7hp9cG8wUBFdJI32ng= sha256-T3mbzIj0+IZBS4XA+4Ab6e6LtIi8PX4Rzs4wFEWeClk=
+28 -28
View File
@@ -1,12 +1,12 @@
{ {
"name": "paseo", "name": "paseo",
"version": "0.16.1", "version": "0.17.0-beta.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "paseo", "name": "paseo",
"version": "0.16.1", "version": "0.17.0-beta.1",
"hasInstallScript": true, "hasInstallScript": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"workspaces": [ "workspaces": [
@@ -37468,7 +37468,7 @@
}, },
"packages/app": { "packages/app": {
"name": "@getpaseo/app", "name": "@getpaseo/app",
"version": "0.16.1", "version": "0.17.0-beta.1",
"dependencies": { "dependencies": {
"@codemirror/commands": "6.10.4", "@codemirror/commands": "6.10.4",
"@codemirror/language": "6.12.4", "@codemirror/language": "6.12.4",
@@ -39637,13 +39637,13 @@
}, },
"packages/cli": { "packages/cli": {
"name": "@getpaseo/cli", "name": "@getpaseo/cli",
"version": "0.16.1", "version": "0.17.0-beta.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@clack/prompts": "^1.0.0", "@clack/prompts": "^1.0.0",
"@getpaseo/client": "0.16.1", "@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/protocol": "0.16.1", "@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/server": "0.16.1", "@getpaseo/server": "0.17.0-beta.1",
"chalk": "^5.3.0", "chalk": "^5.3.0",
"commander": "^12.0.0", "commander": "^12.0.0",
"mime-types": "^2.1.35", "mime-types": "^2.1.35",
@@ -39890,11 +39890,11 @@
}, },
"packages/client": { "packages/client": {
"name": "@getpaseo/client", "name": "@getpaseo/client",
"version": "0.16.1", "version": "0.17.0-beta.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@getpaseo/protocol": "0.16.1", "@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/relay": "0.16.1", "@getpaseo/relay": "0.17.0-beta.1",
"ws": "^8.20.0", "ws": "^8.20.0",
"zod": "^4.4.3" "zod": "^4.4.3"
}, },
@@ -39906,7 +39906,7 @@
}, },
"packages/desktop": { "packages/desktop": {
"name": "@getpaseo/desktop", "name": "@getpaseo/desktop",
"version": "0.16.1", "version": "0.17.0-beta.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@getpaseo/cli": "*", "@getpaseo/cli": "*",
@@ -40149,7 +40149,7 @@
}, },
"packages/expo-two-way-audio": { "packages/expo-two-way-audio": {
"name": "@getpaseo/expo-two-way-audio", "name": "@getpaseo/expo-two-way-audio",
"version": "0.16.1", "version": "0.17.0-beta.1",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.14", "@types/jest": "^29.5.14",
@@ -40195,7 +40195,7 @@
}, },
"packages/highlight": { "packages/highlight": {
"name": "@getpaseo/highlight", "name": "@getpaseo/highlight",
"version": "0.16.1", "version": "0.17.0-beta.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@codemirror/language": "6.12.4", "@codemirror/language": "6.12.4",
@@ -40225,7 +40225,7 @@
}, },
"packages/plugin": { "packages/plugin": {
"name": "@getpaseo/plugin", "name": "@getpaseo/plugin",
"version": "0.16.1", "version": "0.17.0-beta.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@agentclientprotocol/sdk": "^1.4.0", "@agentclientprotocol/sdk": "^1.4.0",
@@ -40233,8 +40233,8 @@
"use-sync-external-store": "^1.6.0" "use-sync-external-store": "^1.6.0"
}, },
"devDependencies": { "devDependencies": {
"@getpaseo/client": "0.16.1", "@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/protocol": "0.16.1", "@getpaseo/protocol": "0.17.0-beta.1",
"@types/node": "^20.9.0", "@types/node": "^20.9.0",
"@types/react": "~19.2.0", "@types/react": "~19.2.0",
"react": "19.2.3", "react": "19.2.3",
@@ -40244,8 +40244,8 @@
"zod": "^4.4.3" "zod": "^4.4.3"
}, },
"peerDependencies": { "peerDependencies": {
"@getpaseo/client": "0.16.1", "@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/protocol": "0.16.1", "@getpaseo/protocol": "0.17.0-beta.1",
"react": ">=19.1.0 <20", "react": ">=19.1.0 <20",
"react-native": ">=0.81.5", "react-native": ">=0.81.5",
"zod": "^4.4.3" "zod": "^4.4.3"
@@ -40267,7 +40267,7 @@
}, },
"packages/protocol": { "packages/protocol": {
"name": "@getpaseo/protocol", "name": "@getpaseo/protocol",
"version": "0.16.1", "version": "0.17.0-beta.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"semver": "^7.8.5", "semver": "^7.8.5",
@@ -40295,7 +40295,7 @@
}, },
"packages/relay": { "packages/relay": {
"name": "@getpaseo/relay", "name": "@getpaseo/relay",
"version": "0.16.1", "version": "0.17.0-beta.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@noble/ciphers": "^2.4.0", "@noble/ciphers": "^2.4.0",
@@ -40517,17 +40517,17 @@
}, },
"packages/server": { "packages/server": {
"name": "@getpaseo/server", "name": "@getpaseo/server",
"version": "0.16.1", "version": "0.17.0-beta.1",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@agentclientprotocol/sdk": "^0.17.1", "@agentclientprotocol/sdk": "^0.17.1",
"@anthropic-ai/claude-agent-sdk": "0.3.326", "@anthropic-ai/claude-agent-sdk": "0.3.326",
"@anthropic-ai/sdk": "^0.104.2", "@anthropic-ai/sdk": "^0.104.2",
"@getpaseo/client": "0.16.1", "@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/highlight": "0.16.1", "@getpaseo/highlight": "0.17.0-beta.1",
"@getpaseo/plugin": "0.16.1", "@getpaseo/plugin": "0.17.0-beta.1",
"@getpaseo/protocol": "0.16.1", "@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/relay": "0.16.1", "@getpaseo/relay": "0.17.0-beta.1",
"@isaacs/ttlcache": "^2.1.4", "@isaacs/ttlcache": "^2.1.4",
"@modelcontextprotocol/sdk": "1.29.0", "@modelcontextprotocol/sdk": "1.29.0",
"@opencode-ai/sdk": "1.14.46", "@opencode-ai/sdk": "1.14.46",
@@ -41474,7 +41474,7 @@
}, },
"packages/website": { "packages/website": {
"name": "@getpaseo/website", "name": "@getpaseo/website",
"version": "0.16.1", "version": "0.17.0-beta.1",
"dependencies": { "dependencies": {
"@cloudflare/vite-plugin": "^1.29.1", "@cloudflare/vite-plugin": "^1.29.1",
"@cloudflare/workers-types": "^4.20260317.1", "@cloudflare/workers-types": "^4.20260317.1",
@@ -43084,7 +43084,7 @@
}, },
"plugins": { "plugins": {
"name": "@getpaseo/builtin-plugins", "name": "@getpaseo/builtin-plugins",
"version": "0.16.1", "version": "0.17.0-beta.1",
"dependencies": { "dependencies": {
"@getpaseo/plugin": "*", "@getpaseo/plugin": "*",
"zod": "^4.4.3" "zod": "^4.4.3"
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "paseo", "name": "paseo",
"version": "0.16.1", "version": "0.17.0-beta.1",
"private": true, "private": true,
"description": "Paseo: voice-controlled development environment for local AI coding agents", "description": "Paseo: voice-controlled development environment for local AI coding agents",
"keywords": [ "keywords": [
+2
View File
@@ -7,6 +7,7 @@ const withAndroidProfileable = require("./plugins/with-android-profileable");
const withFdroidAutolinking = require("./plugins/with-fdroid-autolinking"); const withFdroidAutolinking = require("./plugins/with-fdroid-autolinking");
const withPasteInput = require("./plugins/with-paste-input"); const withPasteInput = require("./plugins/with-paste-input");
const withAndroidScroll = require("./modules/paseo-scroll/app.plugin"); const withAndroidScroll = require("./modules/paseo-scroll/app.plugin");
const withAndroidDisplayMetrics = require("./modules/paseo-display-metrics/app.plugin");
const { getNativeReleaseVersion } = require("./native-release-version"); const { getNativeReleaseVersion } = require("./native-release-version");
const appVariant = process.env.APP_VARIANT ?? "production"; const appVariant = process.env.APP_VARIANT ?? "production";
const isFdroidBuild = process.env.PASEO_FDROID_BUILD === "1"; const isFdroidBuild = process.env.PASEO_FDROID_BUILD === "1";
@@ -146,6 +147,7 @@ export default {
"expo-router", "expo-router",
withPasteInput, withPasteInput,
withAndroidScroll, withAndroidScroll,
withAndroidDisplayMetrics,
[withAndroidAsyncStorageSize, 64], [withAndroidAsyncStorageSize, 64],
...buildProfile.cameraPlugins, ...buildProfile.cameraPlugins,
withAndroidOptionalCamera, withAndroidOptionalCamera,
@@ -15,7 +15,8 @@ import {
expectProviderInstalledInSettings, expectProviderInstalledInSettings,
findAcpCatalogProvider, findAcpCatalogProvider,
installAcpCatalogProvider, installAcpCatalogProvider,
openAddProviderArea, openAddProvider,
openProviderDetail,
openSettingsHost, openSettingsHost,
openSettingsHostSection, openSettingsHostSection,
seedSavedSettingsHosts, seedSavedSettingsHosts,
@@ -47,7 +48,7 @@ test.describe("ACP provider catalog", () => {
await openSettings(page); await openSettings(page);
await openSettingsHost(page, getServerId()); await openSettingsHost(page, getServerId());
await openSettingsHostSection(page, getServerId(), "providers"); await openSettingsHostSection(page, getServerId(), "providers");
await openAddProviderArea(page); await openAddProvider(page);
await installAcpCatalogProvider(page, ACP_PROVIDER.name); await installAcpCatalogProvider(page, ACP_PROVIDER.name);
await expectProviderInstalledInSettings(page, ACP_PROVIDER.name); await expectProviderInstalledInSettings(page, ACP_PROVIDER.name);
@@ -69,7 +70,7 @@ test("adds fx from the catalog with only a config entry", async ({ page }, testI
await openSettings(page); await openSettings(page);
await openSettingsHost(page, getServerId()); await openSettingsHost(page, getServerId());
await openSettingsHostSection(page, getServerId(), "providers"); await openSettingsHostSection(page, getServerId(), "providers");
await openAddProviderArea(page); await openAddProvider(page);
await findAcpCatalogProvider(page, "fx"); await findAcpCatalogProvider(page, "fx");
await page.screenshot({ path: testInfo.outputPath("fx-catalog.png") }); await page.screenshot({ path: testInfo.outputPath("fx-catalog.png") });
@@ -104,7 +105,7 @@ for (const theme of ["light", "dark"] as const) {
await expect( await expect(
page.getByRole("button", { name: "Hoplite provider details", exact: true }), page.getByRole("button", { name: "Hoplite provider details", exact: true }),
).toHaveCount(0); ).toHaveCount(0);
await openAddProviderArea(page); await openAddProvider(page);
await findAcpCatalogProvider(page, "Hoplite"); await findAcpCatalogProvider(page, "Hoplite");
await page.screenshot({ path: testInfo.outputPath(`hoplite-catalog-${theme}.png`) }); await page.screenshot({ path: testInfo.outputPath(`hoplite-catalog-${theme}.png`) });
await installAcpCatalogProvider(page, "Hoplite"); await installAcpCatalogProvider(page, "Hoplite");
@@ -127,7 +128,7 @@ for (const theme of ["light", "dark"] as const) {
testInfo.outputPath(`hoplite-removed-${theme}.json`), testInfo.outputPath(`hoplite-removed-${theme}.json`),
JSON.stringify(await client.getProvidersSnapshot(), null, 2), JSON.stringify(await client.getProvidersSnapshot(), null, 2),
); );
await openAddProviderArea(page); await openAddProvider(page);
await findAcpCatalogProvider(page, "Hoplite"); await findAcpCatalogProvider(page, "Hoplite");
await page.screenshot({ path: testInfo.outputPath(`hoplite-removed-${theme}.png`) }); await page.screenshot({ path: testInfo.outputPath(`hoplite-removed-${theme}.png`) });
await installAcpCatalogProvider(page, "Hoplite"); await installAcpCatalogProvider(page, "Hoplite");
@@ -140,11 +141,11 @@ for (const theme of ["light", "dark"] as const) {
} }
async function removeHoplite(page: import("@playwright/test").Page): Promise<void> { async function removeHoplite(page: import("@playwright/test").Page): Promise<void> {
await page.getByTestId("provider-actions-hoplite").click(); await openProviderDetail(page, "Hoplite");
page.once("dialog", (dialog) => { page.once("dialog", (dialog) => {
void dialog.accept(); void dialog.accept();
}); });
await page.getByTestId("provider-remove-hoplite").click(); await page.getByTestId("provider-remove").click();
} }
test("unsupported host asks for an update without writing Hoplite config", async ({ test("unsupported host asks for an update without writing Hoplite config", async ({
@@ -164,7 +165,7 @@ test("unsupported host asks for an update without writing Hoplite config", async
await openSettings(page); await openSettings(page);
await openSettingsHost(page, outdatedDaemon.serverId); await openSettingsHost(page, outdatedDaemon.serverId);
await openSettingsHostSection(page, outdatedDaemon.serverId, "providers"); await openSettingsHostSection(page, outdatedDaemon.serverId, "providers");
await openAddProviderArea(page); await openAddProvider(page);
await page.getByRole("button", { name: "Add Hoplite", exact: true }).click(); await page.getByRole("button", { name: "Add Hoplite", exact: true }).click();
const errorToast = page.getByTestId("app-toast-message"); const errorToast = page.getByTestId("app-toast-message");
await expect(errorToast).toHaveText("Update the host to add Hoplite."); await expect(errorToast).toHaveText("Update the host to add Hoplite.");
@@ -2,9 +2,11 @@ import type { Locator } from "@playwright/test";
import { expect, test, type Page } from "../support/fixtures"; import { expect, test, type Page } from "../support/fixtures";
import { expectAgentIdle, expectAgentReadyToInterrupt } from "../support/helpers/agent-stream"; import { expectAgentIdle, expectAgentReadyToInterrupt } from "../support/helpers/agent-stream";
import { import {
blurComposerInput,
cancelAgent, cancelAgent,
fillComposerDraft, fillComposerDraft,
expectComposerDraft, expectComposerDraft,
expectComposerNotFocused,
expectComposerVisible, expectComposerVisible,
submitMessage, submitMessage,
} from "../support/helpers/composer"; } from "../support/helpers/composer";
@@ -71,6 +73,7 @@ test.describe("Agent message rewind", () => {
minDistanceFromBottom: 300, minDistanceFromBottom: 300,
}); });
await fillComposerDraft(page, preservedDraft); await fillComposerDraft(page, preservedDraft);
await blurComposerInput(page);
rewindCompletion.clearTimelineStreamCount(); rewindCompletion.clearTimelineStreamCount();
const rewind = rewindConversation(page, userMessage, rewoundPrompt); const rewind = rewindConversation(page, userMessage, rewoundPrompt);
@@ -84,6 +87,7 @@ test.describe("Agent message rewind", () => {
0, 0,
); );
await expectComposerDraft(page, preservedDraft); await expectComposerDraft(page, preservedDraft);
await expectComposerNotFocused(page);
await expectNearBottom(page); await expectNearBottom(page);
} finally { } finally {
await agent.cleanup(); await agent.cleanup();
@@ -527,7 +527,17 @@ async function expectHiddenStreamingSubmissionOrderAfterWorkspaceEviction(
expect(gate.getClientRequestCount("agent.timeline.set_subscription.request")).toBe( expect(gate.getClientRequestCount("agent.timeline.set_subscription.request")).toBe(
subscriptionRequests, subscriptionRequests,
); );
const requestsBeforeRelease = rememberTimelineRequestCounts(gate, target.agentId);
gate.releaseHeldAgentStreamEvent("turn_started"); gate.releaseHeldAgentStreamEvent("turn_started");
// The chat never saw the hidden prompt's live row, so the reply's first row is a gap.
// The chat recovers the missing rows once, while its workspace is still evicted.
await expect
.poll(() => gate.getTimelineRequestCount("after", target.agentId))
.toBe(requestsBeforeRelease.after + 1);
await gate.waitForServerMessage(
"fetch_agent_timeline_response",
gate.getClientRequestCount("fetch_agent_timeline_request"),
);
const requestsBeforeReturn = rememberTimelineRequestCounts(gate, target.agentId); const requestsBeforeReturn = rememberTimelineRequestCounts(gate, target.agentId);
await waitForWorkspaceInSidebar(page, { await waitForWorkspaceInSidebar(page, {
serverId: getServerId(), serverId: getServerId(),
@@ -14,6 +14,8 @@ import {
answerFreshnessCheck, answerFreshnessCheck,
commitTimelineTurnsWhileDisconnected, commitTimelineTurnsWhileDisconnected,
disconnectViewedTimeline, disconnectViewedTimeline,
expectEmptyChatSynced,
expectPromptAndWholeReply,
expectResumeAnsweredWithoutFetch, expectResumeAnsweredWithoutFetch,
expectResumeOverflowFallsBackToOneTail, expectResumeOverflowFallsBackToOneTail,
hideTabAndReturn, hideTabAndReturn,
@@ -22,7 +24,11 @@ import {
restoreUnchangedViewedTimeline, restoreUnchangedViewedTimeline,
restoreViewedTimelineHoldingCatchUp, restoreViewedTimelineHoldingCatchUp,
restoreViewedTimelineWithHeldResponse, restoreViewedTimelineWithHeldResponse,
restoreViewedTimelineWithLiveRowsFirst,
reopenWithFreshnessCheckUnanswered, reopenWithFreshnessCheckUnanswered,
seedStreamingReplyAgent,
sendPromptWhileDisconnected,
stopStreamingReply,
waitForResumeAnswer, waitForResumeAnswer,
reopenAppWatchingForUpdatingToast, reopenAppWatchingForUpdatingToast,
watchForUpdatingToast, watchForUpdatingToast,
@@ -147,4 +153,27 @@ test.describe("Agent timeline resume", () => {
await agent.cleanup(); await agent.cleanup();
} }
}); });
test("an empty chat that reconnects mid-reply keeps the prompt and the whole reply", async ({
page,
}) => {
test.setTimeout(120_000);
const gate = await installDaemonWebSocketGate(page);
const agent = await seedStreamingReplyAgent();
try {
await openAgentTimeline(page, agent);
await expectEmptyChatSynced(page, gate);
await disconnectViewedTimeline(page, gate);
await sendPromptWhileDisconnected(agent);
await restoreViewedTimelineWithLiveRowsFirst(gate);
const reply = await stopStreamingReply(agent);
await expectPromptAndWholeReply(page, agent, reply);
await page.reload();
await expectPromptAndWholeReply(page, agent, reply);
} finally {
gate.restore();
await agent.cleanup();
}
});
}); });
@@ -72,13 +72,11 @@ const ASSISTANT_MARKDOWN = [
"| Current \\| active | ~~obsolete~~ | ready |", "| Current \\| active | ~~obsolete~~ | ready |",
].join("\n"); ].join("\n");
const EXPECTED_WHOLE_SELECTION_MARKDOWN = ASSISTANT_MARKDOWN.replace( // text/plain carries the selection as displayed, so an inline code span the renderer
// linked copies without its destination.
const EXPECTED_WHOLE_SELECTION_TEXT = ASSISTANT_MARKDOWN.replace(
"www.example.com stays", "www.example.com stays",
"[www.example.com](http://www.example.com) stays", "[www.example.com](http://www.example.com) stays",
)
.replace(
"`https://example.com/generated` stays",
"[`https://example.com/generated`](https://example.com/generated) stays",
) )
.replace(`${CROSS_STRUCTURE_MARKDOWN}\n\n`, "") .replace(`${CROSS_STRUCTURE_MARKDOWN}\n\n`, "")
.replace( .replace(
@@ -422,7 +420,7 @@ test("copying an assistant selection preserves Markdown structure and links", as
await copySelection(page); await copySelection(page);
const clipboard = await readRichClipboard(page); const clipboard = await readRichClipboard(page);
expect(clipboard.plainText).toBe(EXPECTED_WHOLE_SELECTION_MARKDOWN); expect(clipboard.plainText).toBe(EXPECTED_WHOLE_SELECTION_TEXT);
expect(clipboard.html).not.toContain("<ul>"); expect(clipboard.html).not.toContain("<ul>");
expect(clipboard.html).not.toContain("<li>"); expect(clipboard.html).not.toContain("<li>");
expect(clipboard.html).toContain("<div>- "); expect(clipboard.html).toContain("<div>- ");
@@ -688,6 +686,77 @@ test("copying an assistant selection preserves Markdown structure and links", as
} }
}); });
test("pasting an assistant selection preserves literal underscores and authored links", async ({
context,
page,
}) => {
const agent = await seedMockAgentWorkspace({
repoPrefix: "assistant-selection-paste-",
title: "Assistant selection paste",
initialPrompt: "Render the paste fixture.",
featureValues: {
mockAssistantResponse:
"Keep \\_literal\\_ and `https://example.com/generated` beside [the docs](https://example.com/docs).",
},
});
try {
await allowRichClipboard(context);
await agent.client.waitForAgentUpsert(
agent.agentId,
(snapshot) => snapshot.status === "idle",
30_000,
);
await openAgentRoute(page, agent);
const message = assistantMessageBlocks(page);
await expect(message.locator('a[href="https://example.com/generated"]')).toHaveText(
"https://example.com/generated",
);
await selectAssistantTextRange(page, "Keep _literal_", "the docs.");
await copySelection(page);
await page.evaluate(() => {
const fields = document.createElement("div");
fields.style.cssText =
"position: fixed; bottom: 0; left: 0; z-index: 10000; background: white";
const plainText = document.createElement("textarea");
plainText.setAttribute("aria-label", "Plain text paste");
const richText = document.createElement("div");
richText.contentEditable = "true";
richText.setAttribute("role", "textbox");
richText.setAttribute("aria-label", "Rich text paste");
fields.append(plainText, richText);
document.body.append(fields);
});
const plainText = page.getByRole("textbox", { name: "Plain text paste" });
await plainText.focus();
await page.keyboard.press("ControlOrMeta+v");
await expect(plainText).toHaveValue(
"Keep _literal_ and `https://example.com/generated` beside [the docs](https://example.com/docs).",
);
const richText = page.getByRole("textbox", { name: "Rich text paste" });
await richText.focus();
await page.keyboard.press("ControlOrMeta+v");
await expect(richText).toHaveText(
"Keep _literal_ and https://example.com/generated beside the docs.",
);
await expect(richText.locator("code")).toHaveText("https://example.com/generated");
await expect(richText.getByRole("link")).toHaveCount(2);
await expect(
richText.getByRole("link", { name: "https://example.com/generated" }),
).toHaveAttribute("href", "https://example.com/generated");
await expect(richText.getByRole("link", { name: "the docs" })).toHaveAttribute(
"href",
"https://example.com/docs",
);
} finally {
await agent.cleanup();
}
});
test("copying a selection across an assistant image keeps its Markdown source and alt text", async ({ test("copying a selection across an assistant image keeps its Markdown source and alt text", async ({
context, context,
page, page,
@@ -2,7 +2,7 @@ import { expect, test } from "../support/fixtures";
import { trackPromptJumpRequests } from "../support/helpers/agent-timeline-gate"; import { trackPromptJumpRequests } from "../support/helpers/agent-timeline-gate";
import { import {
clickChatOutlineRowEdge, clickChatOutlineRowEdge,
disableChatOutlineFromAppearance, disableChatOutline,
expectActiveChatOutlinePrompt, expectActiveChatOutlinePrompt,
expectActiveChatOutlinePromptMovedFrom, expectActiveChatOutlinePromptMovedFrom,
expectChatOutlinePreview, expectChatOutlinePreview,
@@ -314,13 +314,13 @@ test.describe("desktop chat outline", () => {
} }
}); });
test("can be disabled from Appearance settings", async ({ page }) => { test("can be disabled from Chat settings", async ({ page }) => {
const agent = await seedLongMockAgentTimeline({ turns: 2 }); const agent = await seedLongMockAgentTimeline({ turns: 2 });
try { try {
await page.setViewportSize(WIDE_VIEWPORT); await page.setViewportSize(WIDE_VIEWPORT);
await openAgentTimeline(page, agent); await openAgentTimeline(page, agent);
await disableChatOutlineFromAppearance(page); await disableChatOutline(page);
await expectNoChatOutline(page); await expectNoChatOutline(page);
} finally { } finally {
+8 -5
View File
@@ -26,7 +26,7 @@ test.use({
}, },
}); });
// Rendered light-theme colors: palette yellow 400 for Fast and Ultrafast, muted foreground for Normal. // The Speed icon highlights any explicit tier other than Normal.
const ACTIVE_SPEED_COLOR = "rgb(251, 191, 36)"; const ACTIVE_SPEED_COLOR = "rgb(251, 191, 36)";
const NORMAL_SPEED_COLOR = "rgb(113, 113, 122)"; const NORMAL_SPEED_COLOR = "rgb(113, 113, 122)";
@@ -63,7 +63,7 @@ async function expectSpeedIconColor(page: Page, color: string): Promise<void> {
} }
async function expectSpeedChoices(page: Page, choices: string[]): Promise<void> { async function expectSpeedChoices(page: Page, choices: string[]): Promise<void> {
for (const choice of ["Normal", "Fast", "Ultrafast"]) { for (const choice of ["Normal", "Flex", "Fast", "Ultrafast"]) {
const option = page.getByText(choice, { exact: true }).last(); const option = page.getByText(choice, { exact: true }).last();
if (choices.includes(choice)) { if (choices.includes(choice)) {
await expect(option).toBeVisible(); await expect(option).toBeVisible();
@@ -115,21 +115,24 @@ for (const viewport of [
await expectSpeedIconColor(page, ACTIVE_SPEED_COLOR); await expectSpeedIconColor(page, ACTIVE_SPEED_COLOR);
await page.screenshot({ path: testInfo.outputPath(`${viewport.name}-fast-selected.png`) }); await page.screenshot({ path: testInfo.outputPath(`${viewport.name}-fast-selected.png`) });
await openSpeedSelector(page); await openSpeedSelector(page);
await expectSpeedChoices(page, ["Normal", "Fast", "Ultrafast"]); await expectSpeedChoices(page, ["Normal", "Flex", "Fast", "Ultrafast"]);
await page.screenshot({ path: testInfo.outputPath(`${viewport.name}-speed-options.png`) }); await page.screenshot({ path: testInfo.outputPath(`${viewport.name}-speed-options.png`) });
await selectSpeed(page, "Ultrafast"); await selectSpeed(page, "Ultrafast");
await expectSpeedIconColor(page, ACTIVE_SPEED_COLOR); await expectSpeedIconColor(page, ACTIVE_SPEED_COLOR);
await openSpeedSelector(page); await openSpeedSelector(page);
await expectSpeedChoices(page, ["Normal", "Fast", "Ultrafast"]); await expectSpeedChoices(page, ["Normal", "Flex", "Fast", "Ultrafast"]);
await page.screenshot({ await page.screenshot({
path: testInfo.outputPath(`${viewport.name}-ultrafast-selected.png`), path: testInfo.outputPath(`${viewport.name}-ultrafast-selected.png`),
}); });
await selectSpeed(page, "Flex");
await expectSpeedIconColor(page, ACTIVE_SPEED_COLOR);
await openSpeedSelector(page);
await selectSpeed(page, "Normal"); await selectSpeed(page, "Normal");
await expectSpeedIconColor(page, NORMAL_SPEED_COLOR); await expectSpeedIconColor(page, NORMAL_SPEED_COLOR);
if (viewport.name === "desktop") { if (viewport.name === "desktop") {
await switchAgentModel(agent.id, "gpt-6-sol"); await switchAgentModel(agent.id, "gpt-6-sol");
await openSpeedSelector(page); await openSpeedSelector(page);
await expectSpeedChoices(page, ["Normal", "Fast"]); await expectSpeedChoices(page, ["Normal", "Flex", "Fast"]);
await page.screenshot({ path: testInfo.outputPath("desktop-fast-only.png") }); await page.screenshot({ path: testInfo.outputPath("desktop-fast-only.png") });
} }
} finally { } finally {
@@ -1,6 +1,17 @@
import { expect, test } from "../support/fixtures"; import { expect, test } from "../support/fixtures";
import type { FormPreferences } from "@/create-agent-preferences/preferences"; import type { FormPreferences } from "@/create-agent-preferences/preferences";
import { closeCommandCenter, openCommandCenter } from "../support/helpers/command-center"; import {
closeCommandCenter,
openCommandCenter,
openCommandCenterWithShortcut,
} from "../support/helpers/command-center";
import {
enterComposerFullscreen,
exitComposerFullscreen,
expectComposerVisible,
fillComposerDraft,
resizeComposerViewport,
} from "../support/helpers/composer";
import { import {
applyCommandCenterAgentControls, applyCommandCenterAgentControls,
chooseCommandCenterAgentControl, chooseCommandCenterAgentControl,
@@ -14,8 +25,18 @@ import {
} from "../support/helpers/command-center-agent-controls"; } from "../support/helpers/command-center-agent-controls";
import { clickNewChat, gotoWorkspace } from "../support/helpers/launcher"; import { clickNewChat, gotoWorkspace } from "../support/helpers/launcher";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent"; import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import {
assertNewWorkspaceSidebarAndHeader,
connectNewWorkspaceDaemonClient,
openGlobalNewWorkspaceComposer,
selectNewWorkspaceProject,
selectWorkspaceIsolation,
submitNewWorkspacePrompt,
} from "../support/helpers/new-workspace";
import { getServerId } from "../support/helpers/server-id";
import { expectAppRoute } from "../support/helpers/route-assertions"; import { expectAppRoute } from "../support/helpers/route-assertions";
import { seedWorkspace } from "../support/helpers/seed-client"; import { seedWorkspace } from "../support/helpers/seed-client";
import { closeMobileAgentSidebar, openMobileAgentSidebar } from "../support/helpers/sidebar";
import { buildSchedulesRoute } from "@/utils/host-routes"; import { buildSchedulesRoute } from "@/utils/host-routes";
const CREATE_AGENT_PREFERENCES_KEY = "@paseo:create-agent-preferences"; const CREATE_AGENT_PREFERENCES_KEY = "@paseo:create-agent-preferences";
@@ -30,7 +51,7 @@ async function seedMockDraftPreferences(page: import("@playwright/test").Page):
providerPreferences: { providerPreferences: {
mock: { mock: {
model: "five-minute-stream", model: "five-minute-stream",
mode: "load-test", mode: "approval-test",
}, },
}, },
} satisfies FormPreferences), } satisfies FormPreferences),
@@ -221,6 +242,94 @@ test.describe("Command Center agent controls", () => {
await workspace.cleanup(); await workspace.cleanup();
} }
}); });
test("applies New workspace model and mode choices before the first message", async ({
page,
}) => {
const workspace = await seedWorkspace({ repoPrefix: "command-center-new-workspace-controls-" });
await seedMockDraftPreferences(page);
const client = await connectNewWorkspaceDaemonClient();
try {
const backgroundAgent = await workspace.client.createAgent({
provider: "mock",
cwd: workspace.repoPath,
workspaceId: workspace.workspaceId,
title: "Background agent",
model: "five-minute-stream",
modeId: "approval-test",
});
await openAgentRoute(page, {
workspaceId: workspace.workspaceId,
agentId: backgroundAgent.id,
});
await openGlobalNewWorkspaceComposer(page);
await selectNewWorkspaceProject(page, workspace);
await selectWorkspaceIsolation(page, "local");
await applyCommandCenterAgentControls(page, DRAFT_AGENT_CONTROL_CHOICES);
await closeCommandCenter(page);
await submitNewWorkspacePrompt(page, "Create with Command Center choices");
const created = await assertNewWorkspaceSidebarAndHeader(page, {
serverId: getServerId(),
client,
previousWorkspaceId: workspace.workspaceId,
projectDisplayName: workspace.projectDisplayName,
});
await expectWorkspaceAgentConfiguration(
{ client: workspace.client, workspaceId: created.workspaceId },
{ provider: "mock", model: "ten-second-stream", modeId: "load-test" },
);
await expectWorkspaceAgentConfiguration(workspace, {
id: backgroundAgent.id,
provider: "mock",
model: "five-minute-stream",
modeId: "approval-test",
});
} finally {
await client.close().catch(() => undefined);
await workspace.cleanup();
}
});
test("keeps draft settings searchable from the compact sidebar and fullscreen editor", async ({
page,
}) => {
const workspace = await seedWorkspace({ repoPrefix: "command-center-fullscreen-draft-" });
await seedMockDraftPreferences(page);
try {
await openDraftComposer(page, workspace.workspaceId);
await resizeComposerViewport(page, "portrait");
await applyCompactComposerSettings(page);
} finally {
await workspace.cleanup();
}
});
test("applies compact sidebar and fullscreen settings to the running agent", async ({ page }) => {
const workspace = await seedMockAgentWorkspace({
repoPrefix: "command-center-fullscreen-agent-",
title: "Compact Command Center settings",
model: "five-minute-stream",
modeId: "approval-test",
});
try {
await resizeComposerViewport(page, "portrait");
await openAgentRoute(page, workspace);
await applyCompactComposerSettings(page);
await expectWorkspaceAgentConfiguration(workspace, {
id: workspace.agentId,
provider: "mock",
model: "ten-second-stream",
modeId: "load-test",
});
} finally {
await workspace.cleanup();
}
});
}); });
const DRAFT_AGENT_CONTROL_CHOICES = [ const DRAFT_AGENT_CONTROL_CHOICES = [
@@ -233,3 +342,22 @@ async function openDraftComposer(page: import("@playwright/test").Page, workspac
await clickNewChat(page); await clickNewChat(page);
await waitForDraftComposer(page); await waitForDraftComposer(page);
} }
async function applyCompactComposerSettings(page: import("@playwright/test").Page): Promise<void> {
const [model, mode] = DRAFT_AGENT_CONTROL_CHOICES;
await expectComposerVisible(page);
await openMobileAgentSidebar(page);
await openCommandCenter(page);
await chooseCommandCenterAgentControl({ page, ...mode });
await closeMobileAgentSidebar(page);
await fillComposerDraft(page, "First line\nSecond line\nThird line");
await enterComposerFullscreen(page);
await openCommandCenterWithShortcut(page);
await chooseCommandCenterAgentControl({ page, ...model });
await exitComposerFullscreen(page);
await openCommandCenterWithShortcut(page);
await expectCommandCenterAgentControlSelected({ page, ...model });
await expectCommandCenterAgentControlSelected({ page, ...mode });
}
@@ -1,4 +1,4 @@
import { test, expect } from "../support/fixtures"; import { test, expect, type Page } from "../support/fixtures";
import { openWorkspaceWithAgents } from "../support/helpers/archive-tab"; import { openWorkspaceWithAgents } from "../support/helpers/archive-tab";
import { import {
composerLocator, composerLocator,
@@ -311,3 +311,88 @@ test.describe("Composer trailing disc on a new chat", () => {
} }
}); });
}); });
const SHORTCUT_MOD = process.platform === "darwin" ? "Meta" : "Control";
async function toggleModelPickerFromComposer(page: Page) {
await composerLocator(page).focus();
await page.keyboard.press(`${SHORTCUT_MOD}+Slash`);
}
async function expectModelPickerClosesFromSearch(page: Page) {
const search = page.getByPlaceholder(/Search (all )?models/);
await expect(search).toBeVisible();
await search.focus();
await page.keyboard.press(`${SHORTCUT_MOD}+Slash`);
await expect(search).toBeHidden();
}
async function cycleComposerEffort(page: Page) {
await composerLocator(page).focus();
await page.keyboard.press(`${SHORTCUT_MOD}+Shift+Slash`);
}
function modelControl(page: Page) {
return page.getByRole("button", { name: "Select model (Ten second stream)", exact: true });
}
function thinkingControl(page: Page, effort: string) {
return page.getByRole("button", { name: `Select thinking option (${effort})`, exact: true });
}
async function expectShortcutHint(
page: Page,
control: ReturnType<typeof modelControl>,
label: string,
) {
await control.hover();
const tooltip = page.getByRole("tooltip").filter({ hasText: label });
await expect(tooltip).toContainText("/");
}
test.describe("Composer model and effort shortcuts", () => {
test("opens and closes the model picker and wraps effort in toolbar order", async ({ page }) => {
const agent = await seedMockAgentWorkspace({
repoPrefix: "composer-shortcuts-",
title: "Composer shortcuts",
model: "ten-second-stream",
thinkingOptionId: "high",
});
try {
await openAgentRoute(page, agent);
await expectComposerVisible(page);
await expect(thinkingControl(page, "High")).toBeVisible();
await test.step("Focus model search without opening its tooltip", async () => {
await toggleModelPickerFromComposer(page);
await expect(page.getByPlaceholder(/Search (all )?models/)).toBeFocused();
await expect(page.getByRole("tooltip").filter({ hasText: "Change model" })).toBeHidden();
await expectModelPickerClosesFromSearch(page);
});
await test.step("Show both shortcuts in the toolbar tooltips", async () => {
await expectShortcutHint(page, modelControl(page), "Change model");
await expectShortcutHint(page, thinkingControl(page, "High"), "Thinking mode");
});
await test.step("Wrap from High to Low and advance to Medium", async () => {
await cycleComposerEffort(page);
await expect(thinkingControl(page, "Low")).toBeVisible();
await cycleComposerEffort(page);
await expect(thinkingControl(page, "Medium")).toBeVisible();
});
await test.step("Toggle the folded picker and cycle effort in a compact window", async () => {
await page.setViewportSize({ width: 480, height: 844 });
const effortLabel = page.getByTestId("combined-model-selector-thinking-label");
await expect(effortLabel).toHaveText("Medium");
await toggleModelPickerFromComposer(page);
await expectModelPickerClosesFromSearch(page);
await cycleComposerEffort(page);
await expect(effortLabel).toHaveText("High");
});
} finally {
await agent.cleanup();
}
});
});
+56 -38
View File
@@ -1,20 +1,27 @@
import { test } from "../support/fixtures"; import { expect, test } from "../support/fixtures";
import { import {
chatOutlineRail,
disableChatOutline,
expectChatOutlinePrompts,
expectNoChatOutline,
} from "../support/helpers/chat-outline";
import {
chooseContentWidth,
expectColumnAtLeftGutter,
expectColumnClearOfOutline,
expectContentColumnWidth, expectContentColumnWidth,
expectCustomContentWidthSetting,
expectDefaultContentWidthSetting,
openAppearanceSettings,
resetContentWidth,
setContentWidth,
} from "../support/helpers/content-width"; } from "../support/helpers/content-width";
import { openFileExplorer, openFileFromExplorer } from "../support/helpers/file-explorer"; import { openFileExplorer, openFileFromExplorer } from "../support/helpers/file-explorer";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent"; import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
const ULTRAWIDE_VIEWPORT = { width: 2560, height: 1080 }; const ULTRAWIDE_VIEWPORT = { width: 2560, height: 1080 };
const DEFAULT_COLUMN = { min: 800, max: 820 };
const WIDE_COLUMN = { min: 1180, max: 1200 };
const FULL_COLUMN = { min: 2000, max: ULTRAWIDE_VIEWPORT.width };
test("widens chat and Markdown files to the chosen content width and resets to the default", async ({ test("resizes mounted chat content and leaves room for the outline at full width", async ({
page, page,
}, testInfo) => { }) => {
test.setTimeout(120_000); test.setTimeout(120_000);
const agent = await seedMockAgentWorkspace({ const agent = await seedMockAgentWorkspace({
repoPrefix: "content-width-", repoPrefix: "content-width-",
@@ -23,47 +30,58 @@ test("widens chat and Markdown files to the chosen content width and resets to t
}); });
try { try {
await agent.client.waitForFinish(agent.agentId, 30_000);
await agent.client.sendAgentMessage(agent.agentId, "Write another paragraph.");
await agent.client.waitForFinish(agent.agentId, 30_000); await agent.client.waitForFinish(agent.agentId, 30_000);
await page.setViewportSize(ULTRAWIDE_VIEWPORT); await page.setViewportSize(ULTRAWIDE_VIEWPORT);
const assistantMessage = page.getByTestId("assistant-message").first();
const markdownPreview = page.getByTestId("markdown-preview-frame").first();
await test.step("chat starts at the default width", async () => {
await openAgentRoute(page, agent); await openAgentRoute(page, agent);
await expectContentColumnWidth(assistantMessage, { max: 820 }); await expectChatOutlinePrompts(page, 2);
}); const reply = page.getByTestId("assistant-message").first();
const composer = page.getByTestId("message-input-root");
await expectContentColumnWidth(reply, DEFAULT_COLUMN);
const originalReply = await reply.elementHandle();
await test.step("settings show the default without a reset", async () => { await chooseContentWidth(page, "Wide");
await openAppearanceSettings(page); await expectContentColumnWidth(reply, WIDE_COLUMN);
await expectDefaultContentWidthSetting(page, 820); await expectContentColumnWidth(composer, WIDE_COLUMN);
});
await test.step("a custom width is saved and offers a reset", async () => { await chooseContentWidth(page, "Full");
await setContentWidth(page, 1600); await expectContentColumnWidth(reply, FULL_COLUMN);
await expectCustomContentWidthSetting(page, 1600); await expectContentColumnWidth(composer, FULL_COLUMN);
await page.screenshot({ path: testInfo.outputPath("settings-custom-width.png") }); await expectColumnClearOfOutline(reply, chatOutlineRail(page));
});
await test.step("chat and Markdown files use the custom width", async () => { await disableChatOutline(page);
await openAgentRoute(page, agent); await expectNoChatOutline(page);
await expectContentColumnWidth(assistantMessage, { min: 1200, max: 1600 }); await expectColumnAtLeftGutter(page, reply);
await page.screenshot({ path: testInfo.outputPath("chat-custom-width.png") });
await chooseContentWidth(page, "Default");
await expectContentColumnWidth(reply, DEFAULT_COLUMN);
await expectContentColumnWidth(composer, DEFAULT_COLUMN);
expect(await originalReply?.evaluate((node) => node.isConnected)).toBe(true);
} finally {
await agent.cleanup();
}
});
test("updates an open Markdown preview when the content width changes", async ({ page }) => {
const agent = await seedMockAgentWorkspace({
repoPrefix: "markdown-content-width-",
title: "Markdown content width",
});
try {
await page.setViewportSize(ULTRAWIDE_VIEWPORT);
await openAgentRoute(page, agent);
await openFileExplorer(page); await openFileExplorer(page);
await openFileFromExplorer(page, "README.md"); await openFileFromExplorer(page, "README.md");
await expectContentColumnWidth(markdownPreview, { min: 1200, max: 1600 }); const preview = page.getByTestId("markdown-preview-frame").first();
await page.screenshot({ path: testInfo.outputPath("markdown-custom-width.png") }); await expectContentColumnWidth(preview, DEFAULT_COLUMN);
});
await test.step("reset returns to the default without storing it", async () => { await chooseContentWidth(page, "Wide");
await openAppearanceSettings(page); await expectContentColumnWidth(preview, WIDE_COLUMN);
await resetContentWidth(page);
await expectDefaultContentWidthSetting(page, 820);
await openAgentRoute(page, agent); await chooseContentWidth(page, "Full");
await expectContentColumnWidth(assistantMessage, { max: 820 }); await expectContentColumnWidth(preview, { min: 1500, max: ULTRAWIDE_VIEWPORT.width });
await page.screenshot({ path: testInfo.outputPath("chat-default-width.png") });
});
} finally { } finally {
await agent.cleanup(); await agent.cleanup();
} }
@@ -1,10 +1,19 @@
import { test } from "../support/fixtures"; import { expect, test } from "../support/fixtures";
import { gotoAppShell, openSettings } from "../support/helpers/app";
import { import {
addCustomModel, addCustomModel,
expectCustomModelRetained, expectCustomModelRetained,
openCustomModels, openCustomModels,
removeCustomModel, removeCustomModel,
removeListedCustomModel,
} from "../support/helpers/custom-models"; } from "../support/helpers/custom-models";
import { connectDaemonClient } from "../support/helpers/daemon-client-loader";
import { getServerId } from "../support/helpers/server-id";
import {
openProviderDetail,
openSettingsHost,
openSettingsHostSection,
} from "../support/helpers/settings";
const longModelId = "custom-model-with-a-long-name-".repeat(6); const longModelId = "custom-model-with-a-long-name-".repeat(6);
const shortModelId = "custom-short"; const shortModelId = "custom-short";
@@ -27,3 +36,52 @@ for (const width of [1200, 390]) {
await removeCustomModel(page, shortModelId); await removeCustomModel(page, shortModelId);
}); });
} }
/** An ACP provider whose command runs but exits before it answers, so the provider fails. */
const FAILING_PROVIDER = { id: "failing-acp", name: "Failing ACP" } as const;
interface ProviderConfigClient {
connect(): Promise<void>;
close(): Promise<void>;
patchDaemonConfig(config: {
providers?: Record<string, { extends: string; label: string; command: string[] }>;
removeProviders?: string[];
}): Promise<unknown>;
}
test("adds and removes a custom model while the provider fails", async ({ page }) => {
test.setTimeout(120_000);
const client = await connectDaemonClient<ProviderConfigClient>({
clientIdPrefix: "custom-model-failing-e2e",
});
try {
await client.patchDaemonConfig({
providers: {
[FAILING_PROVIDER.id]: {
extends: "acp",
label: FAILING_PROVIDER.name,
command: ["node", "-e", "process.exit(1)"],
},
},
});
await gotoAppShell(page);
await openSettings(page);
await openSettingsHost(page, getServerId());
await openSettingsHostSection(page, getServerId(), "providers");
await openProviderDetail(page, FAILING_PROVIDER.name);
await test.step("the page leads with the failure and lists no reported models", async () => {
await expect(page.getByTestId("provider-error")).toBeVisible({ timeout: 30_000 });
await expect(page.getByText("Custom models", { exact: true })).toBeVisible();
await expect(page.getByRole("textbox", { name: "Search models" })).toHaveCount(0);
});
await addCustomModel(page, shortModelId);
await removeListedCustomModel(page, shortModelId);
} finally {
await client
.patchDaemonConfig({ removeProviders: [FAILING_PROVIDER.id] })
.catch(() => undefined);
await client.close().catch(() => undefined);
}
});
@@ -513,3 +513,37 @@ test("compact file sheets cover Explorer and return to its retained file list",
await workspace.cleanup(); await workspace.cleanup();
} }
}); });
async function toggleCommentInMainEditor(page: Parameters<typeof ensureExplorerSidebar>[0]) {
const editor = page.getByLabel("Source editor for comment.cs").getByRole("textbox");
await expect(editor).toBeVisible();
await editor.press(process.platform === "darwin" ? "Meta+Slash" : "Control+Slash");
await expect(editor).toHaveText("// public class Example {}");
}
test("keeps the comment shortcut in the editor beside an Explorer agent", async ({ page }) => {
const workspace = await seedMockAgentWorkspace({
repoPrefix: "explorer-comment-shortcut-",
title: "Chat beside the editor",
model: "ten-second-stream",
});
try {
await writeFile(`${workspace.cwd}/comment.cs`, "public class Example {}");
await openAgentRoute(page, workspace);
await expect(
page.getByRole("button", { name: "Select model (Ten second stream)" }),
).toBeVisible();
await ensureExplorerSidebar(page);
await dragTabIntoExplorer(page, `agent_${workspace.agentId}`);
await expect(
explorerSidebar(page).getByRole("button", { name: "Select model (Ten second stream)" }),
).toBeVisible();
await openFilesPanel(page);
await openFileFromExplorer(page, "comment.cs");
await explorerSidebar(page).getByTestId(`workspace-tab-agent_${workspace.agentId}`).click();
await toggleCommentInMainEditor(page);
await expect(page.getByPlaceholder(/Search (all )?models/)).toBeHidden();
} finally {
await workspace.cleanup();
}
});
+45 -2
View File
@@ -777,7 +777,9 @@ test.describe("CodeMirror workspace file editing", () => {
await replaceEditorText(page, "# Saved from source\n"); await replaceEditorText(page, "# Saved from source\n");
await expect(page.getByTestId("workspace-tab-modified-file_notes.md")).toBeVisible(); await expect(page.getByTestId("workspace-tab-modified-file_notes.md")).toBeVisible();
await selectFileView(page, "Preview"); await selectFileView(page, "Preview");
await expect(visibleFilePane.getByText("Saved from source", { exact: true })).toBeVisible(); await expect(
visibleFilePane.getByRole("heading", { name: "Saved from source", exact: true }),
).toBeVisible();
await expect(toolbar.getByLabel("Line 1, column 1")).toHaveCount(0); await expect(toolbar.getByLabel("Line 1, column 1")).toHaveCount(0);
await expect.poll(() => readFile(markdownPath, "utf8")).toBe("# Saved from source\n"); await expect.poll(() => readFile(markdownPath, "utf8")).toBe("# Saved from source\n");
await expect(page.getByTestId("workspace-tab-modified-file_notes.md")).not.toBeVisible(); await expect(page.getByTestId("workspace-tab-modified-file_notes.md")).not.toBeVisible();
@@ -864,11 +866,52 @@ test.describe("CodeMirror workspace file editing", () => {
await selectFileView(page, "Source"); await selectFileView(page, "Source");
await expect(page.getByTestId("file-source-editor")).toBeVisible(); await expect(page.getByTestId("file-source-editor")).toBeVisible();
await expect(preview.host).toHaveCount(0); await expect(preview.host).toBeHidden();
await selectFileView(page, "Preview"); await selectFileView(page, "Preview");
await expect(preview.host).toBeVisible(); await expect(preview.host).toBeVisible();
}); });
test("shows the changed HTML page after the file changes on disk while Source shows", async ({
page,
withWorkspace,
}) => {
const workspace = await withWorkspace({ prefix: "file-editing-html-hidden-change-" });
const htmlPath = path.join(workspace.repoPath, "plan.html");
await writeFile(htmlPath, "<!doctype html><html><body><h1>First plan</h1></body></html>");
await workspace.navigateTo();
await openWorkspaceFile(page, "plan.html");
const preview = htmlPreview(page);
await expect(preview.document.getByRole("heading", { name: "First plan" })).toBeVisible();
await selectFileView(page, "Source");
await writeFile(htmlPath, "<!doctype html><html><body><h1>Changed on disk</h1></body></html>");
await expect(editor(page)).toContainText("Changed on disk");
await selectFileView(page, "Preview");
await expect(preview.document.getByRole("heading", { name: "Changed on disk" })).toBeVisible();
});
test("shows the HTML page edited in Source when Preview shows again", async ({
page,
withWorkspace,
}) => {
const workspace = await withWorkspace({ prefix: "file-editing-html-hidden-edit-" });
await writeFile(
path.join(workspace.repoPath, "plan.html"),
"<!doctype html><html><body><h1>First plan</h1></body></html>",
);
await workspace.navigateTo();
await openWorkspaceFile(page, "plan.html");
const preview = htmlPreview(page);
await expect(preview.document.getByRole("heading", { name: "First plan" })).toBeVisible();
await selectFileView(page, "Source");
await replaceEditorText(page, "<!doctype html><html><body><h1>Edited plan</h1></body></html>");
await selectFileView(page, "Preview");
await expect(preview.document.getByRole("heading", { name: "Edited plan" })).toBeVisible();
});
test("keeps HTML fragment links in the preview and scrolls to the target", async ({ test("keeps HTML fragment links in the preview and scrolls to the target", async ({
page, page,
withWorkspace, withWorkspace,
@@ -466,12 +466,12 @@ test("downloads a file over direct TCP with its original filename and bytes", as
await gotoWorkspace(page, workspace.workspaceId); await gotoWorkspace(page, workspace.workspaceId);
await openFileExplorer(page); await openFileExplorer(page);
const daemonRequest = page.waitForRequest("**/api/files/download?*");
const downloaded = await downloadFileFromExplorer(page, fileName); const downloaded = await downloadFileFromExplorer(page, fileName);
const url = new URL(downloaded.url()); const requestUrl = new URL((await daemonRequest).url());
expect(url.protocol).toBe("http:"); expect(requestUrl.port).toBe(getE2EDaemonPort());
expect(url.port).toBe(getE2EDaemonPort()); expect(requestUrl.searchParams.get("token")).toBeTruthy();
expect(url.pathname).toBe("/api/files/download"); expect(new URL(downloaded.url()).protocol).toBe("blob:");
expect(url.searchParams.get("token")).toBeTruthy();
expect(downloaded.suggestedFilename()).toBe(fileName); expect(downloaded.suggestedFilename()).toBe(fileName);
const savedFile = testInfo.outputPath(fileName); const savedFile = testInfo.outputPath(fileName);
await downloaded.saveAs(savedFile); await downloaded.saveAs(savedFile);
@@ -479,6 +479,45 @@ test("downloads a file over direct TCP with its original filename and bytes", as
expect(await readFile(savedFile)).toEqual(source); expect(await readFile(savedFile)).toEqual(source);
}); });
test("keeps the app open and shows the error when the host rejects a download", async ({
page,
}, testInfo) => {
const fileName = "removed-during-download.bin";
const filePath = path.join(workspace.workspaceDirectory, fileName);
const source = Buffer.from([0, 1, 2, 255]);
await writeFile(filePath, source);
await gotoWorkspace(page, workspace.workspaceId);
await openFileExplorer(page);
const workspaceUrl = page.url();
// The file disappears after the token is issued, so the real daemon answers 404.
await page.route(
"**/api/files/download?*",
async (route) => {
await rm(filePath);
await route.continue();
},
{ times: 1 },
);
await page
.getByTestId("file-explorer-tree-scroll")
.getByText(fileName, { exact: true })
.click({ button: "right" });
await page.getByRole("menuitem", { name: "Download", exact: true }).click();
await expect(
page.getByText("Failed to download file (HTTP 404).", { exact: true }),
).toBeVisible();
expect(page.url()).toBe(workspaceUrl);
await writeFile(filePath, source);
const downloaded = await downloadFileFromExplorer(page, fileName);
const savedFile = testInfo.outputPath(fileName);
await downloaded.saveAs(savedFile);
expect(await readFile(savedFile)).toEqual(source);
expect(page.url()).toBe(workspaceUrl);
});
test("downloads an unsupported binary from its preview with original filename and bytes", async ({ test("downloads an unsupported binary from its preview with original filename and bytes", async ({
page, page,
}, testInfo) => { }, testInfo) => {
@@ -0,0 +1,130 @@
import { writeFile } from "node:fs/promises";
import path from "node:path";
import { expect, test, type Page } from "../support/fixtures";
import { openFileExplorer, openFileFromExplorer } from "../support/helpers/file-explorer";
// Switching a file tab between Preview and Source returns to where each view was left.
const sections = Array.from({ length: 200 }, (_, index) => index);
const LONG_MARKDOWN = sections.map((i) => `## Section ${i}\n\nParagraph ${i}.\n`).join("\n");
const LONG_HTML = `<!doctype html><html><body>${sections
.map((i) => `<h2>Section ${i}</h2><p>Paragraph ${i}</p>`)
.join("")}</body></html>`;
type FileView = "markdown preview" | "html preview" | "source";
function htmlPreviewFrame(page: Page) {
const frame = page.frames().find((candidate) => candidate.url().startsWith("data:text/html"));
if (!frame) throw new Error("The HTML preview frame is not loaded.");
return frame;
}
/**
* Moves the view's visible scroller to `offset` when given, and returns its offset. The
* scroller is Markdown's scroll view, CodeMirror's scroller, or the HTML page itself.
*/
async function viewScroll(page: Page, view: FileView, offset?: number): Promise<number> {
if (view === "html preview") {
return htmlPreviewFrame(page).evaluate((target) => {
if (target !== undefined) window.scrollTo(0, target);
return window.scrollY;
}, offset);
}
return page.evaluate(
(input) => {
const visible = (element: HTMLElement) => element.offsetParent !== null;
let scroller: HTMLElement | null;
if (input.view === "source") {
scroller =
[...document.querySelectorAll<HTMLElement>(".cm-scroller")].find(visible) ?? null;
} else {
scroller =
[
...document.querySelectorAll<HTMLElement>('[data-testid="markdown-preview-frame"]'),
].find(visible) ?? null;
while (scroller && !(scroller.scrollHeight > scroller.clientHeight + 10)) {
scroller = scroller.parentElement;
}
}
if (!scroller) throw new Error(`No visible scroller for the ${input.view}.`);
if (input.offset !== undefined) scroller.scrollTop = input.offset;
return scroller.scrollTop;
},
{ view, offset },
);
}
async function openLongFile(
page: Page,
withWorkspace: (options?: { prefix?: string }) => Promise<{
repoPath: string;
navigateTo(): Promise<void>;
}>,
name: string,
content: string,
): Promise<void> {
const workspace = await withWorkspace({ prefix: "file-view-scroll-" });
await writeFile(path.join(workspace.repoPath, name), content);
await workspace.navigateTo();
await openFileExplorer(page);
await openFileFromExplorer(page, name);
await expect(page.getByTestId("file-mode-preview")).toBeVisible({ timeout: 30_000 });
}
async function showView(page: Page, view: "preview" | "source"): Promise<void> {
await page.getByTestId(`file-mode-${view}`).click();
}
/** Scrolls the view past the first screen and returns where it settled. */
async function scrollDown(page: Page, view: FileView): Promise<number> {
await expect(async () => {
expect(await viewScroll(page, view, 1200)).toBeGreaterThan(1000);
}).toPass({ timeout: 15_000 });
// CodeMirror can adjust the offset once after a scroll; read it after that settles.
await page.waitForTimeout(300);
return viewScroll(page, view);
}
async function expectOffsetKept(page: Page, view: FileView, offset: number): Promise<void> {
await expect.poll(() => viewScroll(page, view), { timeout: 5_000 }).toBe(offset);
}
test("Markdown preview keeps its scroll offset after showing Source", async ({
page,
withWorkspace,
}) => {
await openLongFile(page, withWorkspace, "long.md", LONG_MARKDOWN);
const offset = await scrollDown(page, "markdown preview");
await showView(page, "source");
await expect(page.getByTestId("file-source-editor")).toBeVisible();
await showView(page, "preview");
await expectOffsetKept(page, "markdown preview", offset);
});
test("HTML preview keeps its scroll offset after showing Source", async ({
page,
withWorkspace,
}) => {
await openLongFile(page, withWorkspace, "long.html", LONG_HTML);
const offset = await scrollDown(page, "html preview");
await showView(page, "source");
await expect(page.getByTestId("file-source-editor")).toBeVisible();
await showView(page, "preview");
await expectOffsetKept(page, "html preview", offset);
});
test("Source keeps its scroll offset after showing Preview", async ({ page, withWorkspace }) => {
await openLongFile(page, withWorkspace, "long.md", LONG_MARKDOWN);
await showView(page, "source");
const offset = await scrollDown(page, "source");
await showView(page, "preview");
await expect(page.getByTestId("markdown-preview-frame")).toBeVisible();
await showView(page, "source");
await expectOffsetKept(page, "source", offset);
});
@@ -16,6 +16,13 @@ import {
expectComposerFullscreenControls, expectComposerFullscreenControls,
} from "../support/helpers/composer"; } from "../support/helpers/composer";
import { waitForSidebarHydration } from "../support/helpers/workspace-ui"; import { waitForSidebarHydration } from "../support/helpers/workspace-ui";
import {
seedTerminalProfiles,
selectLaunchOption,
terminalPromptInput,
} from "../support/helpers/new-workspace-launch";
test.use({ channel: "chromium", launchOptions: { args: ["--use-fake-device-for-media-stream"] } });
type WebSocketMessage = string | Buffer; type WebSocketMessage = string | Buffer;
@@ -254,3 +261,82 @@ test("dictation shortcut leaves retained fullscreen and exposes recording contro
await agent.cleanup(); await agent.cleanup();
} }
}); });
async function controlMicrophonePermission(page: Page) {
const cdp = await page.context().newCDPSession(page);
const { targetInfo } = await cdp.send("Target.getTargetInfo");
const origin = new URL(page.url()).origin;
return async (setting: "denied" | "granted") => {
await cdp.send("Browser.setPermission", {
permission: { name: "microphone" },
setting,
origin,
browserContextId: targetInfo.browserContextId,
});
};
}
function startDictationByMic(page: Page) {
return page.getByRole("button", { name: "Start dictation", exact: true }).click();
}
function expectDictationPermissionError(page: Page) {
return expect(page.getByTestId("message-input-root").getByRole("alert")).toHaveText(
"Allow microphone access and try again.",
);
}
test("keeps the draft and retries from the mic after access is restored", async ({ page }) => {
const agent = await seedMockAgentWorkspace({
repoPrefix: "dictation-permission-",
title: "Dictation permission",
});
const draft = "Keep my draft";
await installDictationFailureHarness(page);
try {
await openAgentRoute(page, agent);
await expectComposerVisible(page);
await fillComposerDraft(page, draft);
const setMicrophonePermission = await controlMicrophonePermission(page);
await setMicrophonePermission("denied");
await startDictationByMic(page);
await expectDictationPermissionError(page);
await expect(composerLocator(page)).toHaveValue(draft);
await setMicrophonePermission("granted");
await startDictationByMic(page);
await expect(page.getByRole("button", { name: "Cancel dictation", exact: true })).toBeVisible();
await expect(page.getByText("Allow microphone access and try again.")).toHaveCount(0);
await page.getByRole("button", { name: "Cancel dictation", exact: true }).click();
await expect(composerLocator(page)).toHaveValue(draft);
} finally {
await agent.cleanup();
}
});
test("shows dictation failure when the terminal prompt starts it by shortcut", async ({ page }) => {
const workspace = await seedWorkspace({ repoPrefix: "terminal-dictation-permission-" });
const profile = {
id: "echo-prompt",
name: "Echo prompt",
command: "echo",
args: ["{{{prompt}}}"],
};
const profiles = await seedTerminalProfiles([profile]);
await installDictationFailureHarness(page);
try {
await gotoAppShell(page);
await waitForSidebarHydration(page);
await openNewWorkspaceComposer(page, workspace);
await selectLaunchOption(page, profile.id);
const setMicrophonePermission = await controlMicrophonePermission(page);
await setMicrophonePermission("denied");
await terminalPromptInput(page).press("Control+d");
await expectDictationPermissionError(page);
} finally {
await profiles.restore();
await workspace.cleanup();
}
});
@@ -1,4 +1,6 @@
import { execSync } from "node:child_process";
import { existsSync } from "node:fs"; import { existsSync } from "node:fs";
import { realpath } from "node:fs/promises";
import path from "node:path"; import path from "node:path";
import { buildHostWorkspaceRoute } from "@/utils/host-routes"; import { buildHostWorkspaceRoute } from "@/utils/host-routes";
import { expect, test } from "../support/fixtures"; import { expect, test } from "../support/fixtures";
@@ -890,6 +892,53 @@ test.describe("New workspace flow", () => {
}); });
}); });
test("existing worktree starts the first agent in the chosen worktree", async ({ page }) => {
const tempRepo = await createTempGitRepo("existing-worktree-");
// Made with git, not Paseo: the list holds every git worktree of the repository.
const worktreePath = path.join(tempRepo.path, "manual-worktree");
execSync(`git worktree add -b e2e/manual ${JSON.stringify(worktreePath)}`, {
cwd: tempRepo.path,
stdio: "ignore",
});
try {
const openedProject = await openProjectViaDaemon(client, tempRepo.path);
localWorkspaceIds.add(openedProject.workspaceId);
localProjectIds.add(openedProject.projectId);
await gotoAppShell(page);
await waitForSidebarHydration(page);
await openNewWorkspaceComposer(page, {
projectKey: openedProject.projectKey,
projectDisplayName: openedProject.projectDisplayName,
});
await selectWorkspaceIsolation(page, "existing");
await expect(page.getByTestId("new-workspace-worktree-picker-trigger")).toContainText(
"e2e/manual",
);
await submitNewWorkspacePrompt(page);
const createdWorkspace = await assertNewWorkspaceSidebarAndHeader(page, {
serverId: getServerId(),
client,
previousWorkspaceId: openedProject.workspaceId,
projectDisplayName: openedProject.projectDisplayName,
});
localWorkspaceIds.add(createdWorkspace.workspaceId);
expect(await realpath(createdWorkspace.workspaceDirectory)).toBe(
await realpath(worktreePath),
);
const agentTabs = page
.getByTestId(`workspace-deck-entry-${getServerId()}:${createdWorkspace.workspaceId}`)
.filter({ visible: true })
.locator('[data-testid^="workspace-tab-agent_"]');
await expect(agentTabs).toHaveCount(1, { timeout: 30_000 });
} finally {
await tempRepo.cleanup();
}
});
test("branch picker opens via keyboard and selects the filtered option on Enter", async ({ test("branch picker opens via keyboard and selects the filtered option on Enter", async ({
page, page,
}) => { }) => {
+54 -4
View File
@@ -6,6 +6,7 @@ import {
addProjectFromSetup, addProjectFromSetup,
continueSetup, continueSetup,
expectSetupStep, expectSetupStep,
expectSheetCoversSetupCard,
finishSetup, finishSetup,
goToSetupStep, goToSetupStep,
hostGivesAgentsPaseoTools, hostGivesAgentsPaseoTools,
@@ -23,6 +24,7 @@ import {
recordFirstLaunch, recordFirstLaunch,
setupModal, setupModal,
setupPrimaryButton, setupPrimaryButton,
setupSheet,
showSetupAgainFromSettings, showSetupAgainFromSettings,
skipSetup, skipSetup,
startSetupHost, startSetupHost,
@@ -35,7 +37,11 @@ import {
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate"; import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
import { enableRelayAndExpectOffer } from "../support/helpers/pair-device"; import { enableRelayAndExpectOffer } from "../support/helpers/pair-device";
import { seedWorkspace } from "../support/helpers/seed-client"; import { seedWorkspace } from "../support/helpers/seed-client";
import { openSettingsHostSection } from "../support/helpers/settings"; import {
installAcpCatalogProvider,
openAddProvider,
openSettingsHostSection,
} from "../support/helpers/settings";
import { createTempDirectory, createTempGitRepo } from "../support/helpers/workspace"; import { createTempDirectory, createTempGitRepo } from "../support/helpers/workspace";
// Midnight's muted foreground (#9a9db0), which the step description is drawn in. // Midnight's muted foreground (#9a9db0), which the step description is drawn in.
@@ -59,11 +65,28 @@ test("a new user is walked through setup once", async ({ page }, testInfo) => {
await test.step("Providers shows the same provider list as Settings", async () => { await test.step("Providers shows the same provider list as Settings", async () => {
await continueSetup(page); await continueSetup(page);
await expectSetupStep(page, "Your agents"); await expectSetupStep(page, "Your providers");
await expect(setupModal(page).getByTestId("host-page-providers-card")).toBeVisible(); await expect(setupModal(page).getByTestId("host-page-providers-card")).toBeVisible();
await page.screenshot({ path: testInfo.outputPath("2-providers.png") }); await page.screenshot({ path: testInfo.outputPath("2-providers.png") });
}); });
await test.step("a provider's detail and Add provider cover the setup card and lead back to it", async () => {
await setupModal(page)
.getByRole("button", { name: "Claude provider details", exact: true })
.click();
const detail = setupSheet(page, "provider-settings-sheet");
await expectSheetCoversSetupCard(page, detail);
await detail.getByRole("button", { name: "Back to providers", exact: true }).click();
await expect(detail).toHaveCount(0);
await setupModal(page).getByTestId("provider-list-add").click();
const add = setupSheet(page, "add-provider-sheet");
await expectSheetCoversSetupCard(page, add);
await page.keyboard.press("Escape");
await expect(add).toHaveCount(0);
await expectSetupStep(page, "Your providers");
});
await test.step("with no agent history, Add project opens the regular flow and the folder shows as added", async () => { await test.step("with no agent history, Add project opens the regular flow and the folder shows as added", async () => {
await continueSetup(page); await continueSetup(page);
await expectSetupStep(page, "Add your projects"); await expectSetupStep(page, "Add your projects");
@@ -103,6 +126,33 @@ test("a new user is walked through setup once", async ({ page }, testInfo) => {
} }
}); });
test("a provider removed in setup can be added back and removed again", async ({ page }) => {
test.setTimeout(180_000);
const host = await startSetupHost("re-add");
const detail = setupSheet(page, "provider-settings-sheet");
const remove = detail.getByTestId("provider-remove");
page.on("dialog", (dialog) => void dialog.accept());
try {
await openAppAsNewUser(page, host);
await continueSetup(page);
await expectSetupStep(page, "Your providers");
await openAddProvider(page);
await installAcpCatalogProvider(page, "Junie");
await remove.click();
await expect(detail).toHaveCount(0);
// Adding it back opens the same provider's sheet, which must not still be removing it.
await openAddProvider(page);
await installAcpCatalogProvider(page, "Junie");
await expect(remove).toHaveText("Remove");
await expect(remove).toBeEnabled();
} finally {
await host.close();
}
});
test("a new user goes from the loading screen straight into setup", async ({ page }) => { test("a new user goes from the loading screen straight into setup", async ({ page }) => {
const host = await startSetupHost("first-launch"); const host = await startSetupHost("first-launch");
@@ -145,7 +195,7 @@ test("changing the theme keeps the setup window in place on every step", async (
for (const title of [ for (const title of [
"Welcome to Paseo", "Welcome to Paseo",
"Your agents", "Your providers",
"Add your projects", "Add your projects",
"Let agents use Paseo", "Let agents use Paseo",
"Take your agents with you", "Take your agents with you",
@@ -418,7 +468,7 @@ test("in the compact layout, Finish on Orchestration applies its switches", asyn
await openAppAsNewUser(page, host); await openAppAsNewUser(page, host);
await step("Welcome to Paseo"); await step("Welcome to Paseo");
await primary("Continue").click(); await primary("Continue").click();
await step("Your agents"); await step("Your providers");
await primary("Continue").click(); await primary("Continue").click();
await step("Add your projects"); await step("Add your projects");
await primary("Continue").click(); await primary("Continue").click();
@@ -362,6 +362,16 @@ 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 expect(headerRow(page, SHOWCASE_PLUGIN_ID, "deploys")).toBeVisible({ timeout: 30_000 });
await runCommand(page, "Open plugin workspaces");
await expect(screenTitle(page)).toHaveText("Workspaces");
await expect(page.getByText(`Workspace ${workspaceId}`, { exact: true })).toBeVisible();
await expect(page.getByText("Plugin failed", { exact: false })).toHaveCount(0);
});
test("a header row's shortcut hint presses the row", async ({ page }) => { test("a header row's shortcut hint presses the row", async ({ page }) => {
await page.setViewportSize(WIDE); await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId); await gotoWorkspace(page, workspaceId);
@@ -1,21 +1,22 @@
import { ACP_PROVIDER_ICON_SVGS } from "../../src/assets/acp-provider-icons"; import { ACP_PROVIDER_ICON_SVGS } from "../../src/assets/acp-provider-icons";
import { expect, test, type Page } from "../support/fixtures"; import { expect, test, type Page } from "../support/fixtures";
import type { TestInfo } from "@playwright/test"; import type { Locator, TestInfo } from "@playwright/test";
import { gotoAppShell, openSettings } from "../support/helpers/app"; import { gotoAppShell, openSettings } from "../support/helpers/app";
import { getServerId } from "../support/helpers/server-id"; import { getServerId } from "../support/helpers/server-id";
import { import {
findAcpCatalogProvider, findAcpCatalogProvider,
openAddProviderArea, openAddProvider,
openSettingsHost, openSettingsHost,
openSettingsHostSection, openSettingsHostSection,
} from "../support/helpers/settings"; } from "../support/helpers/settings";
async function openProviderCatalog(page: Page) { async function openProviderCatalog(page: Page, viewport?: { width: number; height: number }) {
await gotoAppShell(page); await gotoAppShell(page);
await openSettings(page); await openSettings(page);
await openSettingsHost(page, getServerId()); await openSettingsHost(page, getServerId());
await openSettingsHostSection(page, getServerId(), "providers"); await openSettingsHostSection(page, getServerId(), "providers");
await openAddProviderArea(page); if (viewport) await page.setViewportSize(viewport);
await openAddProvider(page);
} }
async function expectProviderArtwork( async function expectProviderArtwork(
@@ -25,11 +26,11 @@ async function expectProviderArtwork(
name: string, name: string,
) { ) {
await findAcpCatalogProvider(page, name); await findAcpCatalogProvider(page, name);
// Catalog tiles have no semantic role; scope artwork to the named provider's tile. // Catalog rows have no semantic role of their own; scope artwork to the named provider's row.
const icon = page.getByTestId(`provider-catalog-tile-${id}`).locator("svg").first(); const icon = page.getByTestId(`provider-catalog-row-${id}`).locator("svg").first();
await expect(icon).toBeVisible(); await expect(icon).toBeVisible();
// Provider artwork is 24px; the generic PackagePlus fallback is 20px. // Artwork draws at the provider list's icon size, so the catalog and the list share a rail.
await expect.soft(icon).toHaveAttribute("width", "24"); await expect.soft(icon).toHaveAttribute("width", "16");
const expectedPaths = await page.evaluate((xml) => { const expectedPaths = await page.evaluate((xml) => {
const document = new DOMParser().parseFromString(xml, "image/svg+xml"); const document = new DOMParser().parseFromString(xml, "image/svg+xml");
return Array.from(document.querySelectorAll("path"), (path) => path.getAttribute("d")!); return Array.from(document.querySelectorAll("path"), (path) => path.getAttribute("d")!);
@@ -49,3 +50,20 @@ test("#7087: the provider catalog shows Devin, Hermes, and Kiro artwork", async
await expectProviderArtwork(page, testInfo, "hermes", "Hermes"); await expectProviderArtwork(page, testInfo, "hermes", "Hermes");
await expectProviderArtwork(page, testInfo, "kiro", "Kiro CLI"); await expectProviderArtwork(page, testInfo, "kiro", "Kiro CLI");
}); });
/** The space between a row's icon and its label, as drawn. */
async function gapAfterIcon(row: Locator, label: string): Promise<number> {
const icon = await row.locator("svg").first().boundingBox();
const text = await row.getByText(label, { exact: true }).boundingBox();
if (!icon || !text) throw new Error(`${label} has no icon or label on screen`);
return text.x - (icon.x + icon.width);
}
test("catalog rows keep the provider list's icon rail on a phone", async ({ page }) => {
await openProviderCatalog(page, { width: 390, height: 844 });
await findAcpCatalogProvider(page, "Kiro CLI");
const listGap = await gapAfterIcon(page.getByTestId("provider-row-claude"), "Claude");
const catalogGap = await gapAfterIcon(page.getByTestId("provider-catalog-row-kiro"), "Kiro CLI");
expect(catalogGap).toBe(listGap);
});
@@ -0,0 +1,54 @@
import { expect, test } from "../support/fixtures";
import { openCustomModels, removeCustomModel } from "../support/helpers/custom-models";
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
// A pressed control shows its own progress while the daemon answers, the way Button's `loading`
// does: a spinner in place of its icon, no further presses and, on a labelled button, a
// present-participle label.
const MODEL_ID = "in-flight-model";
test.describe("provider page work in flight", () => {
test("says Adding... on the Add button while a custom model is saved", async ({ page }) => {
const gate = await installDaemonWebSocketGate(page);
await openCustomModels(page);
await page.getByRole("button", { name: "Add model", exact: true }).click();
const sheet = page.getByTestId("add-custom-model-sheet");
await page.getByPlaceholder("e.g. openai/gpt-5").fill(MODEL_ID);
gate.holdNextServerMessage("set_daemon_config_response");
await sheet.getByRole("button", { name: "Add", exact: true }).click();
await gate.waitForHeldServerMessage("set_daemon_config_response");
const adding = sheet.getByRole("button", { name: "Adding...", exact: true });
await expect(adding.getByRole("progressbar")).toBeVisible();
await expect(adding).toBeDisabled();
gate.releaseHeldServerMessage("set_daemon_config_response");
await expect(sheet).toBeHidden({ timeout: 30_000 });
await removeCustomModel(page, MODEL_ID);
});
test("shows the diagnostic report running again on its re-run button", async ({ page }) => {
const gate = await installDaemonWebSocketGate(page);
await openCustomModels(page);
await page.getByRole("button", { name: "Diagnostic report", exact: true }).click();
const sheet = page.getByTestId("provider-diagnostic-sheet");
const rerun = sheet.getByRole("button", { name: "Refresh diagnostic", exact: true });
await expect(rerun).toBeEnabled({ timeout: 30_000 });
// Copy has a report to copy once the first run is in.
await expect(sheet.getByRole("button", { name: "Copy diagnostic" })).toBeEnabled();
gate.holdNextServerMessage("provider_diagnostic_response");
await rerun.click();
await gate.waitForHeldServerMessage("provider_diagnostic_response");
const running = sheet.getByRole("button", { name: "Refreshing diagnostic", exact: true });
await expect(running.getByRole("progressbar")).toBeVisible();
await expect(running).toBeDisabled();
gate.releaseHeldServerMessage("provider_diagnostic_response");
await expect(rerun).toBeEnabled({ timeout: 30_000 });
});
});
@@ -2,11 +2,16 @@ import type { Dialog } from "@playwright/test";
import { expect, test, type Page } from "../support/fixtures"; import { expect, test, type Page } from "../support/fixtures";
import { gotoAppShell, openSettings } from "../support/helpers/app"; import { gotoAppShell, openSettings } from "../support/helpers/app";
import { connectDaemonClient } from "../support/helpers/daemon-client-loader"; import { connectDaemonClient } from "../support/helpers/daemon-client-loader";
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
import { getServerId } from "../support/helpers/server-id"; import { getServerId } from "../support/helpers/server-id";
import { import {
expectInstallOpensGuide,
expectProviderInstalledInSettings, expectProviderInstalledInSettings,
expectProviderNotOnHost,
installAcpCatalogProvider, installAcpCatalogProvider,
openAddProviderArea, leaveProviderDetail,
openAddProvider,
openProviderDetail,
openSettingsHost, openSettingsHost,
openSettingsHostSection, openSettingsHostSection,
} from "../support/helpers/settings"; } from "../support/helpers/settings";
@@ -15,6 +20,8 @@ import { copyPluginExample } from "../support/helpers/plugin-fixture";
const CUSTOM_PROVIDER = { const CUSTOM_PROVIDER = {
id: "junie", id: "junie",
name: "Junie", name: "Junie",
// The Add provider catalog's guide. The CLI is not installed where these tests run.
installGuide: "https://junie.jetbrains.com/docs/junie-cli-acp.html",
} as const; } as const;
const PLUGIN_PROVIDER = { const PLUGIN_PROVIDER = {
@@ -62,13 +69,39 @@ async function clickRemoveProviderAndAcceptWarning(page: Page): Promise<Dialog>
expect(dialog.message()).toContain("This deletes the provider entry from config.json."); expect(dialog.message()).toContain("This deletes the provider entry from config.json.");
void dialog.accept(); void dialog.accept();
}); });
await page.getByTestId(`provider-remove-${CUSTOM_PROVIDER.id}`).click(); await page.getByTestId("provider-remove").click();
if (!warning) { if (!warning) {
throw new Error("Expected a provider removal confirmation dialog, but none was shown."); throw new Error("Expected a provider removal confirmation dialog, but none was shown.");
} }
return warning; return warning;
} }
const MISSING_NOTICE = '[data-testid="provider-detail-missing"]';
/** Records whether the page ever says its provider isn't on the host, however briefly. */
async function watchForMissingNotice(page: Page): Promise<void> {
await page.evaluate((selector) => {
const flags = window as unknown as { sawMissingNotice?: boolean };
flags.sawMissingNotice = false;
new MutationObserver(() => {
if (document.querySelector(selector)) flags.sawMissingNotice = true;
}).observe(document.body, { childList: true, subtree: true });
}, MISSING_NOTICE);
}
async function expectMissingNoticeNeverShown(page: Page): Promise<void> {
const saw = await page.evaluate(
() => (window as unknown as { sawMissingNotice?: boolean }).sawMissingNotice,
);
expect(saw).toBe(false);
}
/**
* The daemon publishes the provider list without the removed provider before it answers the config
* patch. Holding the answer keeps the page in that window.
*/
const CONFIG_RESPONSE = "set_daemon_config_response";
test.describe("provider removal", () => { test.describe("provider removal", () => {
test("removes a custom provider from Settings", async ({ page }) => { test("removes a custom provider from Settings", async ({ page }) => {
test.setTimeout(120_000); test.setTimeout(120_000);
@@ -79,20 +112,42 @@ test.describe("provider removal", () => {
try { try {
await removeCustomProvider(client); await removeCustomProvider(client);
const gate = await installDaemonWebSocketGate(page);
await gotoAppShell(page); await gotoAppShell(page);
await openSettings(page); await openSettings(page);
await openSettingsHost(page, getServerId()); await openSettingsHost(page, getServerId());
await openSettingsHostSection(page, getServerId(), "providers"); await openSettingsHostSection(page, getServerId(), "providers");
await expect(page.getByTestId("provider-actions-claude")).toHaveCount(0); // A built-in provider has no Danger zone.
await openAddProviderArea(page); await openProviderDetail(page, "Claude");
await expect(page.getByTestId("provider-remove")).toHaveCount(0);
await leaveProviderDetail(page);
await openAddProvider(page);
await installAcpCatalogProvider(page, CUSTOM_PROVIDER.name); await installAcpCatalogProvider(page, CUSTOM_PROVIDER.name);
await expectProviderInstalledInSettings(page, CUSTOM_PROVIDER.name); await expectProviderInstalledInSettings(page, CUSTOM_PROVIDER.name);
await expectProviderSource(client, "custom"); await expectProviderSource(client, "custom");
await page.getByTestId(`provider-actions-${CUSTOM_PROVIDER.id}`).click(); await openProviderDetail(page, CUSTOM_PROVIDER.name);
await expect(page.getByTestId(`provider-remove-${CUSTOM_PROVIDER.id}`)).toBeVisible(); await test.step("the page points at the catalog's install guide", async () => {
await expectInstallOpensGuide(page, CUSTOM_PROVIDER.installGuide);
});
await expect(page.getByTestId("provider-remove")).toBeVisible();
await watchForMissingNotice(page);
gate.holdNextServerMessage(CONFIG_RESPONSE);
await clickRemoveProviderAndAcceptWarning(page); await clickRemoveProviderAndAcceptWarning(page);
await gate.waitForHeldServerMessage(CONFIG_RESPONSE);
await expectProviderSource(client, undefined);
// Until the removal is answered, the page keeps the provider and the pressed button says so.
const removeButton = page.getByTestId("provider-remove");
await expect(removeButton).toHaveText("Removing...");
await expect(removeButton.getByRole("progressbar")).toBeVisible();
await expect(removeButton).toBeDisabled();
await expect(page.getByTestId("provider-detail-title")).toHaveText(CUSTOM_PROVIDER.name);
gate.releaseHeldServerMessage(CONFIG_RESPONSE);
// Removing leaves the provider's page for the list, without first calling it missing.
await expect(page.getByTestId("provider-list")).toBeVisible();
await expectMissingNoticeNeverShown(page);
await expect( await expect(
page.getByRole("button", { page.getByRole("button", {
@@ -100,7 +155,33 @@ test.describe("provider removal", () => {
exact: true, exact: true,
}), }),
).toHaveCount(0); ).toHaveCount(0);
await expectProviderSource(client, undefined); } finally {
await removeCustomProvider(client).catch(() => undefined);
await client.close().catch(() => undefined);
}
});
test("says a provider removed elsewhere while its page is open isn't on this host", async ({
page,
}) => {
test.setTimeout(120_000);
const client = await connectDaemonClient<ProviderRemovalDaemonClient>({
clientIdPrefix: "provider-removal-e2e",
});
try {
await removeCustomProvider(client);
await gotoAppShell(page);
await openSettings(page);
await openSettingsHost(page, getServerId());
await openSettingsHostSection(page, getServerId(), "providers");
await openAddProvider(page);
await installAcpCatalogProvider(page, CUSTOM_PROVIDER.name);
await expectProviderInstalledInSettings(page, CUSTOM_PROVIDER.name);
await openProviderDetail(page, CUSTOM_PROVIDER.name);
await removeCustomProvider(client);
await expectProviderNotOnHost(page);
} finally { } finally {
await removeCustomProvider(client).catch(() => undefined); await removeCustomProvider(client).catch(() => undefined);
await client.close().catch(() => undefined); await client.close().catch(() => undefined);
@@ -130,7 +211,9 @@ test.describe("provider removal", () => {
exact: true, exact: true,
}); });
await expect(pluginProviderRow).toBeVisible(); await expect(pluginProviderRow).toBeVisible();
await expect(page.getByTestId(`provider-actions-${PLUGIN_PROVIDER.id}`)).toHaveCount(0); await openProviderDetail(page, PLUGIN_PROVIDER.name);
await expect(page.getByTestId("provider-remove")).toHaveCount(0);
await leaveProviderDetail(page);
// The provider survives a removeProviders patch pointed at it: the // The provider survives a removeProviders patch pointed at it: the
// plugin, not config.json, owns the definition. // plugin, not config.json, owns the definition.
@@ -97,7 +97,7 @@ async function hasFocusWithin(locator: Locator): Promise<boolean> {
async function expectProviderSettingsVisible(page: Page) { async function expectProviderSettingsVisible(page: Page) {
await expect(page.getByTestId("provider-settings-sheet")).toBeVisible({ timeout: 10_000 }); await expect(page.getByTestId("provider-settings-sheet")).toBeVisible({ timeout: 10_000 });
await expect(page.getByRole("button", { name: "Add model" })).toBeVisible(); await expect(page.getByRole("button", { name: "Add model" })).toBeVisible();
await expect(page.getByRole("button", { name: "Diagnostic", exact: true })).toBeVisible(); await expect(page.getByRole("button", { name: "Diagnostic report" })).toBeVisible();
} }
async function exerciseProviderSettingsStack(page: Page) { async function exerciseProviderSettingsStack(page: Page) {
@@ -109,7 +109,7 @@ async function exerciseProviderSettingsStack(page: Page) {
await expect(page.getByPlaceholder("e.g. openai/gpt-5")).not.toBeVisible({ timeout: 10_000 }); await expect(page.getByPlaceholder("e.g. openai/gpt-5")).not.toBeVisible({ timeout: 10_000 });
await expectProviderSettingsVisible(page); await expectProviderSettingsVisible(page);
await page.getByRole("button", { name: "Diagnostic", exact: true }).click(); await page.getByRole("button", { name: "Diagnostic report" }).click();
await expect(page.getByTestId("provider-diagnostic-sheet")).toBeVisible({ timeout: 10_000 }); await expect(page.getByTestId("provider-diagnostic-sheet")).toBeVisible({ timeout: 10_000 });
await page.getByRole("button", { name: /Refresh diagnostic/ }).click(); await page.getByRole("button", { name: /Refresh diagnostic/ }).click();
await expect(page.getByTestId("provider-diagnostic-sheet")).toBeVisible({ timeout: 10_000 }); await expect(page.getByTestId("provider-diagnostic-sheet")).toBeVisible({ timeout: 10_000 });
@@ -118,7 +118,7 @@ async function exerciseProviderSettingsStack(page: Page) {
await page.getByRole("button", { name: "Refresh", exact: true }).click(); await page.getByRole("button", { name: "Refresh", exact: true }).click();
await expectProviderSettingsVisible(page); await expectProviderSettingsVisible(page);
await expect(page.getByText("Updated just now", { exact: true })).toBeVisible({ await expect(page.getByText("Checked just now", { exact: true })).toBeVisible({
timeout: 30_000, timeout: 30_000,
}); });
} }
@@ -0,0 +1,44 @@
import {
backToProviderList,
expectNoUpdateFailure,
expectRowReadsVersionAndModels,
expectRowReportsUpdateFailure,
openProviderInstallation,
refreshFromOtherClient,
refreshProviderDetails,
runFailingUpdate,
test,
} from "../support/helpers/provider-update-failure";
test("a refresh clears a failed update from the provider's page and its row", async ({
providerUpdateFailure: { page, otherClient },
}) => {
await openProviderInstallation(page);
await test.step("Refresh on the page clears the failure", async () => {
await runFailingUpdate(page);
await refreshProviderDetails(page);
await expectNoUpdateFailure(page);
});
await test.step("the row in the list reads the version and models again", async () => {
await backToProviderList(page);
await expectRowReadsVersionAndModels(page);
});
await test.step("a refresh from another client clears the page", async () => {
await openProviderInstallation(page);
await runFailingUpdate(page);
await refreshFromOtherClient(otherClient);
await expectNoUpdateFailure(page);
});
await test.step("a refresh from another client clears the row on the open list", async () => {
await runFailingUpdate(page);
await backToProviderList(page);
// Without a refresh, the row still reports the failure.
await expectRowReportsUpdateFailure(page);
await refreshFromOtherClient(otherClient);
await expectRowReadsVersionAndModels(page);
});
});
@@ -1,16 +1,29 @@
import type { Locator } from "@playwright/test"; import type { Locator } from "@playwright/test";
import { expect, test, type Page } from "../support/fixtures"; import { expect, test, type Page } from "../support/fixtures";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent"; import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
import { scrollChatAwayFromBottom } from "../support/helpers/agent-bottom-anchor";
import { import {
closeCommandCenter,
openCommandCenter,
selectCommandCenterTab,
} from "../support/helpers/command-center";
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
import {
attachComposerTestImage,
composerLocator, composerLocator,
expectComposerDraft, expectComposerDraft,
expectComposerFocused,
expectComposerNotFocused,
expectComposerVisible, expectComposerVisible,
fillComposerDraft, fillComposerDraft,
submitMessage, submitMessage,
submitMessageWithButton,
} from "../support/helpers/composer"; } from "../support/helpers/composer";
import { readReplicaCache, writeReplicaCache } from "../support/helpers/replica-cache-storage"; import { readReplicaCache, writeReplicaCache } from "../support/helpers/replica-cache-storage";
import {
disconnectViewedTimeline,
releaseHeldCatchUp,
restoreViewedTimelineHoldingCatchUp,
} from "../support/helpers/timeline-resume";
// UI plumbing contract against the dev mock provider. Real-provider behavior is tested in `daemon-e2e/*-rewind.real.e2e.test.ts`. // UI plumbing contract against the dev mock provider. Real-provider behavior is tested in `daemon-e2e/*-rewind.real.e2e.test.ts`.
@@ -33,6 +46,17 @@ async function selectRewindOption(page: Page, name: string): Promise<void> {
await option.click(); await option.click();
} }
async function searchRewindActions(page: Page): Promise<Locator> {
const palette = await openCommandCenter(page);
await selectCommandCenterTab(palette, "Actions");
await palette.getByRole("textbox").fill("rewind last turn");
return palette;
}
function rewindAction(palette: Locator, name: string): Locator {
return palette.getByRole("button", { name: `${name} This action cannot be undone`, exact: true });
}
async function rewriteCachedMessageAsLegacyRow( async function rewriteCachedMessageAsLegacyRow(
page: Page, page: Page,
input: { prompt: string; agentId: string; workspaceId: string }, input: { prompt: string; agentId: string; workspaceId: string },
@@ -199,10 +223,6 @@ test.describe("Rewind sheet", () => {
await expectUserMessageCount(page, 2); await expectUserMessageCount(page, 2);
await session.client.waitForFinish(session.agentId); await session.client.waitForFinish(session.agentId);
await scrollChatAwayFromBottom(page, {
deltaY: -900,
minDistanceFromBottom: 300,
});
await userMessage(page, firstPrompt).hover(); await userMessage(page, firstPrompt).hover();
await page.getByTestId("rewind-menu-trigger").first().click(); await page.getByTestId("rewind-menu-trigger").first().click();
const rewindSheet = page.getByTestId("rewind-menu-content"); const rewindSheet = page.getByTestId("rewind-menu-content");
@@ -217,6 +237,7 @@ test.describe("Rewind sheet", () => {
await expect(page.getByText("Cycle 1", { exact: true })).toHaveCount(0); await expect(page.getByText("Cycle 1", { exact: true })).toHaveCount(0);
await expectUserMessageCount(page, 1); await expectUserMessageCount(page, 1);
await expectComposerDraft(page, firstPrompt); await expectComposerDraft(page, firstPrompt);
await expectComposerFocused(page);
await submitMessage(page, replacementPrompt); await submitMessage(page, replacementPrompt);
await expectUserMessageVisible(page, replacementPrompt); await expectUserMessageVisible(page, replacementPrompt);
@@ -232,17 +253,7 @@ test.describe("Rewind sheet", () => {
await selectRewindOption(page, "Rewind files"); await selectRewindOption(page, "Rewind files");
await expect(page.getByTestId("rewind-menu-content")).toHaveCount(0); await expect(page.getByTestId("rewind-menu-content")).toHaveCount(0);
await expectComposerDraft(page, ""); await expectComposerDraft(page, "");
await expectUserMessageCount(page, 2); await expectComposerNotFocused(page);
const preservedDraft = "Keep this human draft after rewind.";
await fillComposerDraft(page, preservedDraft);
await composerLocator(page).evaluate((element) => element.blur());
await userMessage(page, replacementPrompt).hover();
await page.getByTestId("rewind-menu-trigger").last().click();
await expect(page.getByTestId("rewind-menu-content")).toBeVisible();
await selectRewindOption(page, "Rewind files");
await expect(page.getByTestId("rewind-menu-content")).toHaveCount(0);
await expectComposerDraft(page, preservedDraft);
await expectUserMessageCount(page, 2); await expectUserMessageCount(page, 2);
await fillComposerDraft(page, ""); await fillComposerDraft(page, "");
@@ -253,12 +264,109 @@ test.describe("Rewind sheet", () => {
await selectRewindOption(page, "Rewind conversation and files"); await selectRewindOption(page, "Rewind conversation and files");
await expect(page.getByTestId("rewind-menu-content")).toHaveCount(0); await expect(page.getByTestId("rewind-menu-content")).toHaveCount(0);
await expectComposerDraft(page, replacementPrompt); await expectComposerDraft(page, replacementPrompt);
await expectComposerFocused(page);
await expectUserMessageCount(page, 1); await expectUserMessageCount(page, 1);
} finally { } finally {
await session.cleanup(); await session.cleanup();
} }
}); });
test("rewinds the latest turn from the Command Center", async ({ page }) => {
const firstPrompt = "Keep this earlier turn.";
const latestPrompt = "Edit this latest turn.";
const session = await seedMockAgentWorkspace({
repoPrefix: "rewind-command-center-e2e-",
title: "Command Center rewind",
initialPrompt: firstPrompt,
});
try {
await openAgentRoute(page, session);
await expectComposerVisible(page);
await submitMessage(page, latestPrompt);
await expectUserMessageVisible(page, latestPrompt);
await session.client.waitForFinish(session.agentId);
const palette = await searchRewindActions(page);
await expect(rewindAction(palette, "Rewind files")).toBeVisible();
await expect(rewindAction(palette, "Rewind conversation and files")).toBeVisible();
await rewindAction(palette, "Rewind conversation").click();
await expectUserMessageVisible(page, firstPrompt);
await expect(userMessage(page, latestPrompt)).toHaveCount(0);
await expectComposerDraft(page, latestPrompt);
await expectComposerFocused(page);
} finally {
await session.cleanup();
}
});
test("waits for the latest prompt before offering Command Center rewind after reconnect", async ({
page,
}) => {
const cachedPrompt = "Keep the prompt that was visible before reconnect.";
const latestPrompt = "Rewind the prompt sent while the app was disconnected.";
const gate = await installDaemonWebSocketGate(page);
const session = await seedMockAgentWorkspace({
repoPrefix: "rewind-reconnect-e2e-",
title: "Rewind after reconnect",
initialPrompt: cachedPrompt,
});
try {
await openAgentRoute(page, session);
await expectUserMessageVisible(page, cachedPrompt);
const initialPalette = await searchRewindActions(page);
await expect(rewindAction(initialPalette, "Rewind conversation")).toBeVisible();
await closeCommandCenter(page);
await disconnectViewedTimeline(page, gate);
await session.client.sendAgentMessage(session.agentId, latestPrompt);
await session.client.waitForFinish(session.agentId);
await restoreViewedTimelineHoldingCatchUp(page, gate);
const palette = await searchRewindActions(page);
await expect(palette.getByText("No matches", { exact: true })).toBeVisible();
await releaseHeldCatchUp(page, gate);
await rewindAction(palette, "Rewind conversation").click();
await expectUserMessageVisible(page, cachedPrompt);
await expectComposerDraft(page, latestPrompt);
} finally {
gate.restore();
await session.cleanup();
}
});
test("hides rewind when the latest prompt only contains an attachment", async ({ page }) => {
const session = await seedMockAgentWorkspace({
repoPrefix: "rewind-image-only-e2e-",
title: "Rewind image-only prompt",
initialPrompt: "Earlier text prompt.",
});
try {
await openAgentRoute(page, session);
await expectComposerVisible(page);
const palette = await searchRewindActions(page);
await expect(rewindAction(palette, "Rewind conversation")).toBeVisible();
await closeCommandCenter(page);
await attachComposerTestImage(page);
await submitMessageWithButton(page, "");
const imagePrompt = page.getByTestId("user-message").filter({
has: page.getByRole("button", { name: "Open image attachment" }),
});
await expect(imagePrompt).toHaveAttribute("aria-busy", "false");
await session.client.waitForFinish(session.agentId);
const reopened = await searchRewindActions(page);
await expect(reopened.getByText("No matches", { exact: true })).toBeVisible();
} finally {
await session.cleanup();
}
});
test("surfaces rewind failures without crashing the page", async ({ page }) => { test("surfaces rewind failures without crashing the page", async ({ page }) => {
const firstPrompt = "emit 1 coalesced agent stream updates for failed rewind turn."; const firstPrompt = "emit 1 coalesced agent stream updates for failed rewind turn.";
const rewindError = "No file checkpoint found for message rewind-failure-e2e."; const rewindError = "No file checkpoint found for message rewind-failure-e2e.";
@@ -277,6 +385,10 @@ test.describe("Rewind sheet", () => {
await expectUserMessageVisible(page, firstPrompt); await expectUserMessageVisible(page, firstPrompt);
const palette = await searchRewindActions(page);
await rewindAction(palette, "Rewind conversation").click();
await expect(page.getByTestId("app-toast-message")).toHaveText(rewindError);
await userMessage(page, firstPrompt).hover(); await userMessage(page, firstPrompt).hover();
await page.getByTestId("rewind-menu-trigger").first().click(); await page.getByTestId("rewind-menu-trigger").first().click();
const rewindSheet = page.getByTestId("rewind-menu-content"); const rewindSheet = page.getByTestId("rewind-menu-content");
@@ -362,7 +362,7 @@ test.describe("Schedules project target", () => {
).toHaveCount(0); ).toHaveCount(0);
await page.getByTestId("schedule-isolation-trigger").click(); await page.getByTestId("schedule-isolation-trigger").click();
await page.getByTestId("schedule-isolation-worktree").click(); await page.getByTestId("schedule-isolation-worktree").click();
await expect(page.getByTestId("schedule-isolation-trigger")).toContainText("Worktree"); await expect(page.getByTestId("schedule-isolation-trigger")).toContainText("New worktree");
await page.getByTestId("schedule-archive-on-finish-switch").click(); await page.getByTestId("schedule-archive-on-finish-switch").click();
await page.getByLabel("Schedule name").fill(scheduleName); await page.getByLabel("Schedule name").fill(scheduleName);
await page.getByLabel("Prompt").fill("Run with custom workspace cleanup."); await page.getByLabel("Prompt").fill("Run with custom workspace cleanup.");
@@ -383,7 +383,7 @@ test.describe("Schedules project target", () => {
const formSheet = page.getByTestId("schedule-form-sheet"); const formSheet = page.getByTestId("schedule-form-sheet");
await expect(formSheet).toBeVisible({ timeout: 10_000 }); await expect(formSheet).toBeVisible({ timeout: 10_000 });
await expectStableHeight(formSheet); await expectStableHeight(formSheet);
await expect(page.getByTestId("schedule-isolation-trigger")).toContainText("Worktree"); await expect(page.getByTestId("schedule-isolation-trigger")).toContainText("New worktree");
await expect(page.getByTestId("schedule-archive-on-finish-switch")).toHaveAttribute( await expect(page.getByTestId("schedule-archive-on-finish-switch")).toHaveAttribute(
"aria-checked", "aria-checked",
"false", "false",
@@ -15,6 +15,9 @@ import { startIsolatedHostDaemon } from "../support/helpers/isolated-host-daemon
import { getServerId } from "../support/helpers/server-id"; import { getServerId } from "../support/helpers/server-id";
import { import {
expectSettingsHeader, expectSettingsHeader,
expectProviderNotOnHost,
expectProviderPageLoaded,
gotoProviderPage,
openSettingsHost, openSettingsHost,
openHostSection, openHostSection,
expectHostLabelDisplayed, expectHostLabelDisplayed,
@@ -264,6 +267,20 @@ test.describe("Settings host page", () => {
}); });
}); });
test.describe("provider page from its URL", () => {
test("loads a provider's page on a cold visit", async ({ page }) => {
await gotoAppShell(page);
await gotoProviderPage(page, getServerId(), "claude");
await expectProviderPageLoaded(page, "Claude");
});
test("says a provider the host doesn't have isn't on this host", async ({ page }) => {
await gotoAppShell(page);
await gotoProviderPage(page, getServerId(), "not-a-provider");
await expectProviderNotOnHost(page);
});
});
test("restart recovery defaults off and persists opt-in and custom prompt", async ({ page }) => { test("restart recovery defaults off and persists opt-in and custom prompt", async ({ page }) => {
const serverId = getServerId(); const serverId = getServerId();
await gotoAppShell(page); await gotoAppShell(page);
+21 -3
View File
@@ -705,7 +705,7 @@ test("a scheduled heartbeat opens a separate turn without reopening the previous
}); });
const schedules = agent.client as unknown as Pick< const schedules = agent.client as unknown as Pick<
DaemonClient, DaemonClient,
"scheduleCreate" | "scheduleRunOnce" | "scheduleDelete" "scheduleCreate" | "scheduleRunOnce" | "scheduleDelete" | "scheduleList"
>; >;
let scheduleId: string | undefined; let scheduleId: string | undefined;
try { try {
@@ -728,7 +728,15 @@ test("a scheduled heartbeat opens a separate turn without reopening the previous
}); });
expect(created.error).toBeNull(); expect(created.error).toBeNull();
scheduleId = created.schedule!.id; scheduleId = created.schedule!.id;
const fired = await schedules.scheduleRunOnce({ id: scheduleId }); const running = page.getByTestId("workspace-status-indicator-running");
const tasks = page.getByRole("button", { name: "1 background task", exact: true });
await expect(tasks).toBeVisible();
await expect(running).toHaveCount(0);
const [fired] = await Promise.all([
schedules.scheduleRunOnce({ id: scheduleId }),
expect(running.first()).toBeVisible(),
]);
expect(fired.error).toBeNull(); expect(fired.error).toBeNull();
await expect( await expect(
page.getByTestId("tool-call-badge").filter({ hasText: /^Heartbeat/ }), page.getByTestId("tool-call-badge").filter({ hasText: /^Heartbeat/ }),
@@ -743,7 +751,17 @@ test("a scheduled heartbeat opens a separate turn without reopening the previous
await expect(summaries).toHaveCount(2); await expect(summaries).toHaveCount(2);
await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(0); await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(0);
await expect(page.getByRole("button", { name: /^Worked for/ })).toHaveCount(2); await expect(page.getByRole("button", { name: /^Worked for/ })).toHaveCount(2);
await page.screenshot({ path: "/tmp/heartbeat-turn-footer.png" }); await expect(running).toHaveCount(0);
await expect(page.getByRole("button", { name: "Stop agent", exact: true })).toHaveCount(0);
await tasks.click();
const panel = page.getByTestId("background-work-panel");
await expect(panel).toContainText("Heartbeat");
await panel.getByRole("button", { name: "Stop Check the completed work" }).click();
await expect(tasks).toHaveCount(0);
await expect(running).toHaveCount(0);
const remaining = await schedules.scheduleList();
expect(remaining.error).toBeNull();
expect(remaining.schedules.map((schedule) => schedule.id)).not.toContain(scheduleId);
} finally { } finally {
if (scheduleId) await schedules.scheduleDelete({ id: scheduleId }); if (scheduleId) await schedules.scheduleDelete({ id: scheduleId });
await agent.cleanup(); await agent.cleanup();
@@ -23,6 +23,8 @@ import {
outlastUndoWindow, outlastUndoWindow,
pressArchiveShortcut, pressArchiveShortcut,
pressUndoShortcut, pressUndoShortcut,
readSidebarListLayout,
recordLastRowBottomPerFrame,
resizeSidebarToMinimum, resizeSidebarToMinimum,
rowArchiveButton, rowArchiveButton,
rowKebab, rowKebab,
@@ -121,7 +123,7 @@ test.describe("Workspace archive undo", () => {
expect(shortcutBox.x - (labelBox.x + labelBox.width)).toBeLessThanOrEqual(8.5); expect(shortcutBox.x - (labelBox.x + labelBox.width)).toBeLessThanOrEqual(8.5);
}); });
test("a long list ends just below its last row, and the toast over it moves no row", async ({ test("a long list scrolls its last row clear of the toast, and settles back smoothly after it", async ({
page, page,
}) => { }) => {
await page.clock.install({ time: Date.now() }); await page.clock.install({ time: Date.now() });
@@ -136,18 +138,35 @@ test.describe("Workspace archive undo", () => {
const worktree = await seedWorktree(page, "archive-toast-long-list"); const worktree = await seedWorktree(page, "archive-toast-long-list");
const resting = await scrollSidebarListToEnd(page); const resting = await scrollSidebarListToEnd(page);
expect(resting.listBottom - resting.rowBottoms.at(-1)!).toBeLessThan(resting.rowHeight); const restingEndGap = resting.listBottom - resting.rowBottoms.at(-1)!;
expect(restingEndGap).toBeLessThan(resting.rowHeight);
await archiveFromRowButton(page, worktree.workspaceId); await archiveFromRowButton(page, worktree.workspaceId);
await page.mouse.move(0, 0); await page.mouse.move(0, 0);
const withToast = await scrollSidebarListToEnd(page);
const toastBox = await archivedToast(page).boundingBox(); const toastBox = await archivedToast(page).boundingBox();
if (!toastBox) throw new Error("Toast is not laid out"); if (!toastBox) throw new Error("Toast is not laid out");
expect(toastBox.y + toastBox.height).toBeLessThanOrEqual(withToast.listBottom); // The list keeps its usual end gap, measured from the toast's top instead of its own bottom.
await expect
.poll(async () => {
const layout = await scrollSidebarListToEnd(page);
return Math.round(toastBox.y - layout.rowBottoms.at(-1)!);
})
.toBe(Math.round(restingEndGap));
const frames = recordLastRowBottomPerFrame(page, 40);
await outlastUndoWindow(page); await outlastUndoWindow(page);
const bottoms = await frames;
await expect(archivedToast(page)).toHaveCount(0); await expect(archivedToast(page)).toHaveCount(0);
expect(await scrollSidebarListToEnd(page)).toEqual(withToast);
// Without scrolling again, the list ends just below its last row once more.
const settled = await readSidebarListLayout(page);
expect(settled.listBottom - settled.rowBottoms.at(-1)!).toBeCloseTo(restingEndGap, 0);
// The rows travel down by the toast's height over several frames, never in one jump.
const travel = bottoms.at(-1)! - bottoms[0]!;
expect(travel).toBeGreaterThan(toastBox.height);
const steps = bottoms.slice(1).map((bottom, index) => bottom - bottoms[index]!);
expect(Math.min(...steps)).toBeGreaterThanOrEqual(0);
expect(Math.max(...steps)).toBeLessThan(travel / 2);
} finally { } finally {
for (const projectId of fillerProjectIds) { for (const projectId of fillerProjectIds) {
await client.removeProject(projectId).catch(() => undefined); await client.removeProject(projectId).catch(() => undefined);
@@ -3,6 +3,7 @@ import { gotoAppShell } from "../support/helpers/app";
import { getServerId } from "../support/helpers/server-id"; import { getServerId } from "../support/helpers/server-id";
import { seedWorkspace } from "../support/helpers/seed-client"; import { seedWorkspace } from "../support/helpers/seed-client";
import { waitForSidebarHydration } from "../support/helpers/workspace-ui"; import { waitForSidebarHydration } from "../support/helpers/workspace-ui";
import { openWorkspaceSidebarKebab } from "../support/helpers/sidebar";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port"; import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
interface SessionEnvelope { interface SessionEnvelope {
@@ -114,11 +115,7 @@ async function expectAssigned(
} }
async function openWorkspaceLabels(page: import("@playwright/test").Page, workspaceId: string) { async function openWorkspaceLabels(page: import("@playwright/test").Page, workspaceId: string) {
const serverId = getServerId(); const serverId = await openWorkspaceSidebarKebab(page, workspaceId);
const row = page.getByTestId(`sidebar-workspace-row-${serverId}:${workspaceId}`).first();
await expect(row).toBeVisible({ timeout: 30_000 });
await row.hover();
await page.getByTestId(`sidebar-workspace-kebab-${serverId}:${workspaceId}`).first().click();
await page.getByTestId(`sidebar-workspace-menu-labels-${serverId}:${workspaceId}`).click(); await page.getByTestId(`sidebar-workspace-menu-labels-${serverId}:${workspaceId}`).click();
await expect(page.getByTestId("workspace-label-picker-create")).toBeVisible(); await expect(page.getByTestId("workspace-label-picker-create")).toBeVisible();
} }
@@ -361,6 +361,10 @@ test.describe("Worktree restore", () => {
cwd: backingWorktree.workspaceDirectory, cwd: backingWorktree.workspaceDirectory,
stdio: "pipe", stdio: "pipe",
}); });
const originalHead = execFileSync("git", ["rev-parse", "HEAD"], {
cwd: backingWorktree.workspaceDirectory,
encoding: "utf8",
}).trim();
const created = await worktreeClient.createWorkspace({ const created = await worktreeClient.createWorkspace({
source: { kind: "directory", path: backingWorktree.workspaceDirectory }, source: { kind: "directory", path: backingWorktree.workspaceDirectory },
title: "Sample workspace", title: "Sample workspace",
@@ -389,10 +393,7 @@ test.describe("Worktree restore", () => {
await page.getByTestId(`agent-row-${getServerId()}-${agent.id}`).click(); await page.getByTestId(`agent-row-${getServerId()}-${agent.id}`).click();
await expect(page.getByText("Workspace archived", { exact: true })).toBeVisible(); await expect(page.getByText("Workspace archived", { exact: true })).toBeVisible();
await expect( await expect(
page.getByText( page.getByText("Restore Sample workspace to return to its agents.", { exact: true }),
"Restore Sample workspace to return to its agents. A new branch will start from the saved base or the repository default.",
{ exact: true },
),
).toBeVisible(); ).toBeVisible();
await captureBranchlessRestoreStep(page, "01-restore-workspace.png"); await captureBranchlessRestoreStep(page, "01-restore-workspace.png");
@@ -409,17 +410,13 @@ test.describe("Worktree restore", () => {
cwd: backingWorktree.workspaceDirectory, cwd: backingWorktree.workspaceDirectory,
encoding: "utf8", encoding: "utf8",
}).trim(); }).trim();
const defaultHead = execFileSync("git", ["rev-parse", "main"], { expect(restoredHead).toBe(originalHead);
cwd: tempRepo.path,
encoding: "utf8",
}).trim();
expect(restoredHead).toBe(defaultHead);
expect( expect(
execFileSync("git", ["branch", "--show-current"], { execFileSync("git", ["branch", "--show-current"], {
cwd: backingWorktree.workspaceDirectory, cwd: backingWorktree.workspaceDirectory,
encoding: "utf8", encoding: "utf8",
}).trim(), }).trim(),
).toMatch(/^restored\//); ).toBe("");
}); });
test("restore failure stays visible and permits a successful retry", async ({ page }) => { test("restore failure stays visible and permits a successful retry", async ({ page }) => {
+1 -1
View File
@@ -24,7 +24,7 @@ function send(message) {
function respond(method, params) { function respond(method, params) {
switch (method) { switch (method) {
case "initialize": case "initialize":
return {}; return { userAgent: "codex/0.159.0" };
case "model/list": case "model/list":
return { data: models }; return { data: models };
case "config/read": case "config/read":
@@ -583,7 +583,7 @@ run_host_scroll() {
prepare_composer closed prepare_composer closed
if [[ "${host}" == new-workspace ]]; then if [[ "${host}" == new-workspace ]]; then
ad press 'id="workspace-create-isolation-trigger"' --settle ad press 'id="workspace-create-isolation-trigger"' --settle
ad press 'text="Local"' --settle ad press 'text="Project directory"' --settle
fi fi
# Submit through each real host; draft/workspace creation then mounts its chat. # Submit through each real host; draft/workspace creation then mounts its chat.
# A selectable mock model keeps this test independent of provider credentials. # A selectable mock model keeps this test independent of provider credentials.
@@ -0,0 +1,15 @@
# CHAT_URL opens a connected chat containing a visible Markdown image with alt text IMAGE_LABEL.
context platform=android timeout=120000 retries=0
env APP_ID=sh.paseo.debug
env IMAGE_LABEL="Test image"
open "${APP_ID}" "${CHAT_URL}"
wait "label=\"${IMAGE_LABEL}\"" 30000
press "label=\"${IMAGE_LABEL}\""
wait "label=\"Close image\"" 5000
gesture pinch 1.7
press "label=\"Close image\""
press "editable=true"
type "pinch regression"
press "role=\"button\" label=\"Add attachment\""
wait "label=\"Upload file\"" 3000
@@ -56,11 +56,20 @@ function inFlightTurn(page: Page) {
return page.getByTestId("turn-working-indicator"); return page.getByTestId("turn-working-indicator");
} }
/**
* Presses a fork trigger until its menu shows.
*
* The in-flight turn's trigger sits below text that is still streaming in. While the chat is
* shorter than the viewport, each new line moves the trigger down. A line that arrives between
* the press and the release moves the trigger away from the pointer, so the press opens nothing,
* and the next press lands on the trigger where it is now.
*/
async function openForkMenu(page: Page, trigger: ReturnType<Page["getByRole"]>): Promise<void> { async function openForkMenu(page: Page, trigger: ReturnType<Page["getByRole"]>): Promise<void> {
await trigger.click(); const forkInNewTab = page.getByRole("menuitem", { name: "Fork in a new tab" });
await expect(page.getByRole("menuitem", { name: "Fork in a new tab" })).toBeVisible({ await expect(async () => {
timeout: 10_000, await trigger.click({ timeout: 5_000 });
}); await expect(forkInNewTab).toBeVisible({ timeout: 5_000 });
}).toPass({ timeout: 30_000 });
} }
export async function openMostRecentAssistantForkMenu(page: Page): Promise<void> { export async function openMostRecentAssistantForkMenu(page: Page): Promise<void> {
@@ -1,6 +1,6 @@
import { expect, type Locator, type Page } from "@playwright/test"; import { expect, type Locator, type Page } from "@playwright/test";
import { openSettings } from "./app"; import { openSettings } from "./app";
import { openSettingsSection } from "./settings"; import { clickSettingsBackToWorkspace, openSettingsSection } from "./settings";
import { runWorkspaceActionFromCommandCenter } from "./command-center-workspace-actions"; import { runWorkspaceActionFromCommandCenter } from "./command-center-workspace-actions";
import { seedMockAgentWorkspace, type MockAgentWorkspace } from "./mock-agent"; import { seedMockAgentWorkspace, type MockAgentWorkspace } from "./mock-agent";
import { loadSessionMessageReaders } from "./new-workspace"; import { loadSessionMessageReaders } from "./new-workspace";
@@ -81,12 +81,13 @@ export async function splitCurrentPanelRight(page: Page): Promise<void> {
await runWorkspaceActionFromCommandCenter(page, "Split pane right"); await runWorkspaceActionFromCommandCenter(page, "Split pane right");
} }
export async function disableChatOutlineFromAppearance(page: Page): Promise<void> { export async function disableChatOutline(page: Page): Promise<void> {
const timelineUrl = page.url();
await openSettings(page); await openSettings(page);
await openSettingsSection(page, "chat"); await openSettingsSection(page, "chat");
await page.getByRole("switch", { name: "Chat outline" }).click(); const outlineSwitch = page.getByRole("switch", { name: "Chat outline" });
await page.goto(timelineUrl); await outlineSwitch.click();
await expect(outlineSwitch).not.toBeChecked();
await clickSettingsBackToWorkspace(page);
} }
/** Parks the pointer in the middle of the transcript, clear of the rail. */ /** Parks the pointer in the middle of the transcript, clear of the rail. */
@@ -23,6 +23,11 @@ export async function openCommandCenter(page: Page): Promise<Locator> {
return panel; return panel;
} }
export async function openCommandCenterWithShortcut(page: Page): Promise<void> {
await page.keyboard.press("ControlOrMeta+k");
await expect(page.getByTestId("command-center-panel")).toBeVisible();
}
export async function closeCommandCenter(page: Page): Promise<void> { export async function closeCommandCenter(page: Page): Promise<void> {
await page.keyboard.press("Escape"); await page.keyboard.press("Escape");
await expect(page.getByTestId("command-center-panel")).not.toBeVisible(); await expect(page.getByTestId("command-center-panel")).not.toBeVisible();
@@ -1,63 +1,53 @@
import { expect, type Locator, type Page } from "@playwright/test"; import { expect, type Locator, type Page } from "@playwright/test";
import { openSettings } from "./app"; import { openSettings } from "./app";
import { openSettingsSection } from "./settings"; import { clickSettingsBackToWorkspace, openSettingsSection } from "./settings";
const APP_SETTINGS_KEY = "@paseo:app-settings"; type ContentWidthOption = "Default" | "Wide" | "Full";
function contentWidthInput(page: Page): Locator { function contentWidthOption(page: Page, option: ContentWidthOption): Locator {
return page.getByLabel("Content width in pixels", { exact: true }); return page
.getByTestId("content-width-options")
.getByRole("button", { name: option, exact: true });
} }
function resetContentWidthButton(page: Page): Locator { export async function chooseContentWidth(page: Page, option: ContentWidthOption): Promise<void> {
return page.getByRole("button", { name: "Reset content width to default", exact: true });
}
export async function openAppearanceSettings(page: Page): Promise<void> {
await openSettings(page); await openSettings(page);
await openSettingsSection(page, "appearance"); await openSettingsSection(page, "appearance");
const button = contentWidthOption(page, option);
await button.click();
await expect(button).toHaveAttribute("aria-selected", "true");
await clickSettingsBackToWorkspace(page);
} }
export async function setContentWidth(page: Page, width: number): Promise<void> { /** Checks the rendered content width, allowing for padding inside the column. */
const input = contentWidthInput(page);
await input.fill(String(width));
await input.press("Tab");
}
export async function resetContentWidth(page: Page): Promise<void> {
await resetContentWidthButton(page).click();
}
export async function expectDefaultContentWidthSetting(page: Page, width: number): Promise<void> {
await expect(contentWidthInput(page)).toHaveValue(String(width));
await expect(resetContentWidthButton(page)).toHaveCount(0);
await expect.poll(() => readStoredContentWidth(page)).toBeNull();
}
export async function expectCustomContentWidthSetting(page: Page, width: number): Promise<void> {
await expect(contentWidthInput(page)).toHaveValue(String(width));
await expect(resetContentWidthButton(page)).toBeVisible();
await expect.poll(() => readStoredContentWidth(page)).toBe(width);
}
/** Asserts the rendered width of a content-column element stays within `max` and above `min`. */
export async function expectContentColumnWidth( export async function expectContentColumnWidth(
element: Locator, element: Locator,
bounds: { min?: number; max: number }, bounds: { min: number; max: number },
): Promise<void> { ): Promise<void> {
await expect(element).toBeVisible({ timeout: 30_000 }); await expect(element).toBeVisible({ timeout: 30_000 });
await expect await expect
.poll(async () => (await element.boundingBox())?.width ?? 0) .poll(async () => (await element.boundingBox())?.width ?? 0)
.toBeLessThanOrEqual(bounds.max); .toBeGreaterThanOrEqual(bounds.min);
await expect await expect
.poll(async () => (await element.boundingBox())?.width ?? 0) .poll(async () => (await element.boundingBox())?.width ?? Infinity)
.toBeGreaterThan(bounds.min ?? 0); .toBeLessThanOrEqual(bounds.max);
} }
async function readStoredContentWidth(page: Page): Promise<unknown> { export async function expectColumnClearOfOutline(column: Locator, outline: Locator): Promise<void> {
return page.evaluate((key) => { await expect
const raw = localStorage.getItem(key); .poll(async () => {
return raw === null const [content, rail] = await Promise.all([column.boundingBox(), outline.boundingBox()]);
? undefined return content && rail ? content.x - (rail.x + rail.width) : -1;
: (JSON.parse(raw) as { contentMaxWidth?: unknown }).contentMaxWidth; })
}, APP_SETTINGS_KEY); .toBeGreaterThanOrEqual(8);
}
export async function expectColumnAtLeftGutter(page: Page, column: Locator): Promise<void> {
const viewport = page.getByTestId("agent-chat-scroll");
await expect
.poll(async () => {
const [content, scroll] = await Promise.all([column.boundingBox(), viewport.boundingBox()]);
return content && scroll ? content.x - scroll.x : Infinity;
})
.toBeLessThanOrEqual(24);
} }
@@ -25,7 +25,12 @@ export async function addCustomModel(page: Page, id: string): Promise<void> {
} }
export async function removeCustomModel(page: Page, id: string): Promise<void> { export async function removeCustomModel(page: Page, id: string): Promise<void> {
await page.getByRole("textbox", { name: "Search models" }).fill(id); await searchModels(page, id);
await removeListedCustomModel(page, id);
}
/** Removes a custom model shown on the page without searching for it first. */
export async function removeListedCustomModel(page: Page, id: string): Promise<void> {
const remove = page.getByRole("button", { name: `Remove ${id}`, exact: true }); const remove = page.getByRole("button", { name: `Remove ${id}`, exact: true });
await expect(remove).toBeInViewport({ ratio: 1 }); await expect(remove).toBeInViewport({ ratio: 1 });
await remove.click(); await remove.click();
@@ -33,8 +38,20 @@ export async function removeCustomModel(page: Page, id: string): Promise<void> {
} }
export async function expectCustomModelRetained(page: Page, id: string): Promise<void> { export async function expectCustomModelRetained(page: Page, id: string): Promise<void> {
await page.getByRole("textbox", { name: "Search models" }).fill(id); await searchModels(page, id);
await expect(page.getByRole("button", { name: `Remove ${id}`, exact: true })).toBeInViewport({ await expect(page.getByRole("button", { name: `Remove ${id}`, exact: true })).toBeInViewport({
ratio: 1, ratio: 1,
}); });
} }
/**
* Filters the model list and scrolls the sheet down to the custom models, since other sections push
* them below the fold at phone width. Only the section heading is scrolled into view: scrolling the
* row itself would also slide its card sideways and hide a Remove button pushed past the right edge.
*/
async function searchModels(page: Page, id: string): Promise<void> {
await page.getByRole("textbox", { name: "Search models" }).fill(id);
await page
.getByText("Custom models", { exact: true })
.evaluate((heading) => heading.scrollIntoView({ block: "start" }));
}
@@ -97,17 +97,14 @@ export class ImportSessionFlow {
await target.scrollIntoViewIfNeeded(); await target.scrollIntoViewIfNeeded();
await expect(target).toBeInViewport(); await expect(target).toBeInViewport();
} }
/**
* Scrolls the virtualized list, the only one that leaves rows unmounted. A row handle is no way
* in: the list unmounts rows as it scrolls, and a detached row has no scroller above it.
*/
private async scrollList(forward: boolean) { private async scrollList(forward: boolean) {
await this.page await this.page.getByTestId("import-session-list").evaluate((list, advance) => {
.locator('[data-testid^="import-session-session-"]') list.scrollTop = advance ? list.scrollTop + list.clientHeight * 0.8 : 0;
.first() list.dispatchEvent(new Event("scroll"));
.evaluate((row, advance) => {
let element = row.parentElement;
while (element && !["auto", "scroll"].includes(getComputedStyle(element).overflowY))
element = element.parentElement;
if (!element) throw new Error("Import list has no scroll owner");
element.scrollTop = advance ? element.scrollTop + element.clientHeight * 0.8 : 0;
element.dispatchEvent(new Event("scroll"));
}, forward); }, forward);
} }
async search(query: string) { async search(query: string) {
@@ -120,11 +117,18 @@ export class ImportSessionFlow {
await this.page.getByTestId("import-session-search").fill(""); await this.page.getByTestId("import-session-search").fill("");
await expect(this.page.getByTestId("import-session-load-more")).toBeVisible(); await expect(this.page.getByTestId("import-session-load-more")).toBeVisible();
} }
/** Load more keeps the reader down the list instead of sending them back to the top. */
async loadMore() { async loadMore() {
await this.page.getByTestId("import-session-load-more").click(); const loadMore = this.page.getByTestId("import-session-load-more");
const topRow = this.page.getByTestId((await this.rowIds())[0]!);
await expect(topRow).toBeInViewport();
await loadMore.click();
// The next page is the last and short, so the button leaves once it lands.
await expect(loadMore).toHaveCount(0);
await expect(this.page.getByText("Loading sessions...", { exact: true })).toHaveCount(0);
await expect(topRow).not.toBeInViewport();
await this.revealSession("fixture-root-20"); await this.revealSession("fixture-root-20");
await expect(this.page.getByText("Root session 20", { exact: true })).toBeInViewport(); await expect(this.page.getByText("Root session 20", { exact: true })).toBeInViewport();
await expect(this.page.getByTestId("import-session-load-more")).toHaveCount(0);
} }
async retryProvider(provider: string, label: string) { async retryProvider(provider: string, label: string) {
await this.expectProviderError(label); await this.expectProviderError(label);
@@ -334,16 +334,19 @@ export async function selectNewWorkspaceProject(
await expectNewWorkspaceProjectSelected(page, input.projectDisplayName); await expectNewWorkspaceProjectSelected(page, input.projectDisplayName);
} }
// The isolation trigger renders the active isolation's label ("Local" / "New type IsolationChoice = "local" | "worktree" | "existing";
// worktree"), so asserting its text proves what the screen currently remembers.
const ISOLATION_TRIGGER_LABEL: Record<"local" | "worktree", string> = { // The isolation trigger renders the active isolation's label ("Project directory" / "New
local: "Local", // worktree" / "Existing worktree"), so asserting its text proves what the screen remembers.
const ISOLATION_TRIGGER_LABEL: Record<IsolationChoice, string> = {
local: "Project directory",
worktree: "New worktree", worktree: "New worktree",
existing: "Existing worktree",
}; };
export async function expectWorkspaceIsolationSelected( export async function expectWorkspaceIsolationSelected(
page: Page, page: Page,
isolation: "local" | "worktree", isolation: IsolationChoice,
): Promise<void> { ): Promise<void> {
const trigger = page.getByRole("button", { name: "Workspace isolation" }); const trigger = page.getByRole("button", { name: "Workspace isolation" });
await expect(trigger).toBeVisible({ timeout: 30_000 }); await expect(trigger).toBeVisible({ timeout: 30_000 });
@@ -352,7 +355,7 @@ export async function expectWorkspaceIsolationSelected(
export async function selectWorkspaceIsolation( export async function selectWorkspaceIsolation(
page: Page, page: Page,
isolation: "local" | "worktree", isolation: IsolationChoice,
): Promise<void> { ): Promise<void> {
const trigger = page.getByTestId("workspace-create-isolation-trigger"); const trigger = page.getByTestId("workspace-create-isolation-trigger");
await expect(trigger).toBeVisible({ timeout: 30_000 }); await expect(trigger).toBeVisible({ timeout: 30_000 });
@@ -385,8 +388,16 @@ export async function selectBranchInPicker(page: Page, name: string): Promise<vo
await branchRow.click(); await branchRow.click();
} }
// The ref picker lists branches and pull requests separately.
async function showRefList(page: Page, list: "branches" | "pull-requests"): Promise<void> {
const tab = page.getByTestId(`new-workspace-ref-picker-tab-${list}`);
await expect(tab).toBeVisible({ timeout: 30_000 });
await tab.click();
}
export async function searchAndSelectBranchInPicker(page: Page, name: string): Promise<void> { export async function searchAndSelectBranchInPicker(page: Page, name: string): Promise<void> {
const searchInput = page.getByPlaceholder("Search branches and PRs"); await showRefList(page, "branches");
const searchInput = page.getByPlaceholder("Search branches");
await expect(searchInput).toBeVisible({ timeout: 30_000 }); await expect(searchInput).toBeVisible({ timeout: 30_000 });
await searchInput.fill(name); await searchInput.fill(name);
await selectBranchInPicker(page, name); await selectBranchInPicker(page, name);
@@ -410,6 +421,7 @@ export async function captureStartingRefPicker(page: Page, screenshotPath: strin
} }
export async function selectGitHubPrInPicker(page: Page, number: number): Promise<void> { export async function selectGitHubPrInPicker(page: Page, number: number): Promise<void> {
await showRefList(page, "pull-requests");
const prRow = page.getByTestId(`new-workspace-ref-picker-pr-${number}`); const prRow = page.getByTestId(`new-workspace-ref-picker-pr-${number}`);
await expect(prRow).toBeVisible({ timeout: 30_000 }); await expect(prRow).toBeVisible({ timeout: 30_000 });
await prRow.click(); await prRow.click();
@@ -432,7 +444,7 @@ export async function openBranchPicker(page: Page): Promise<void> {
} }
export async function selectPickerOptionByKeyboard(page: Page, label: string): Promise<void> { export async function selectPickerOptionByKeyboard(page: Page, label: string): Promise<void> {
const searchInput = page.getByPlaceholder("Search branches and PRs"); const searchInput = page.getByPlaceholder("Search branches");
await expect(searchInput).toBeVisible({ timeout: 30_000 }); await expect(searchInput).toBeVisible({ timeout: 30_000 });
await page.keyboard.type(label); await page.keyboard.type(label);
await expect(page.getByTestId(`new-workspace-ref-picker-branch-${label}`)).toBeVisible({ await expect(page.getByTestId(`new-workspace-ref-picker-branch-${label}`)).toBeVisible({
@@ -86,6 +86,17 @@ export function setupModal(page: Page): Locator {
return page.getByTestId("onboarding-modal").getByRole("dialog"); return page.getByTestId("onboarding-modal").getByRole("dialog");
} }
/** A sheet opened from a setup step, which should sit exactly on the setup card. */
export function setupSheet(page: Page, testID: "provider-settings-sheet" | "add-provider-sheet") {
return page.getByTestId(testID).getByRole("dialog");
}
export async function expectSheetCoversSetupCard(page: Page, sheet: Locator): Promise<void> {
await expect(sheet).toBeVisible();
const card = await setupModal(page).boundingBox();
await expect.poll(() => sheet.boundingBox()).toEqual(card);
}
export async function expectSetupStep(page: Page, title: string): Promise<void> { export async function expectSetupStep(page: Page, title: string): Promise<void> {
await expect(setupModal(page).getByRole("heading", { name: title, exact: true })).toBeVisible({ await expect(setupModal(page).getByRole("heading", { name: title, exact: true })).toBeVisible({
timeout: 60_000, timeout: 60_000,
@@ -198,6 +198,14 @@ async function expectDetails(page: Page) {
await expect(page.getByText("All systems operational", { exact: true })).toBeInViewport(); await expect(page.getByText("All systems operational", { exact: true })).toBeInViewport();
} }
// 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> {
const observation = page.getByLabel("Content observation", { exact: true });
await expect(observation).not.toHaveText("");
return (await observation.textContent())!;
}
function workspaceMenuRow(page: Page, title: string): Locator { function workspaceMenuRow(page: Page, title: string): Locator {
return compactWorkspaceMenu(page).getByRole("menuitem", { name: title, exact: true }); return compactWorkspaceMenu(page).getByRole("menuitem", { name: title, exact: true });
} }
@@ -354,14 +362,12 @@ export async function withButtonShowcase(
test.step("closing and crashing content release its owner while sibling buttons and app remain live", async () => { test.step("closing and crashing content release its owner while sibling buttons and app remain live", async () => {
await press(page, "Header status"); await press(page, "Header status");
await expectDetails(page); await expectDetails(page);
const observation = page.getByLabel("Content observation", { exact: true }); const first = await readContentObservation(page);
await expect(observation).not.toHaveText("");
const first = (await observation.textContent())!;
await press(page, "Close deployment details"); await press(page, "Close deployment details");
await expect.poll(() => released.has(first)).toBe(true); await expect.poll(() => released.has(first)).toBe(true);
await press(page, "Composer status"); await press(page, "Composer status");
await expectDetails(page); await expectDetails(page);
const second = (await observation.textContent())!; const second = await readContentObservation(page);
expect(second).not.toBe(first); expect(second).not.toBe(first);
await workspace.client.renameProject(workspace.projectId, "Observer control"); await workspace.client.renameProject(workspace.projectId, "Observer control");
await expect(page.getByText("Observed updates: 1", { exact: true })).toBeVisible(); await expect(page.getByText("Observed updates: 1", { exact: true })).toBeVisible();
@@ -373,7 +379,7 @@ export async function withButtonShowcase(
await page.keyboard.press("Escape"); await page.keyboard.press("Escape");
await press(page, "Header status"); await press(page, "Header status");
await expectDetails(page); await expectDetails(page);
const recovered = (await observation.textContent())!; const recovered = await readContentObservation(page);
expect([first, second]).not.toContain(recovered); expect([first, second]).not.toContain(recovered);
await showcase.setTitle("Healthy app after button failure"); await showcase.setTitle("Healthy app after button failure");
await expect(page.getByTestId("workspace-header-title")).toHaveText( await expect(page.getByTestId("workspace-header-title")).toHaveText(
@@ -687,9 +693,7 @@ export async function withButtonShowcase(
page, page,
page.getByRole("button", { name: "Close deployment details", exact: true }), page.getByRole("button", { name: "Close deployment details", exact: true }),
); );
const observation = page.getByLabel("Content observation", { exact: true }); const owner = await readContentObservation(page);
await expect(observation).not.toHaveText("");
const owner = (await observation.textContent())!;
await showcase.disable(); await showcase.disable();
await expect.poll(() => released.has(owner)).toBe(true); await expect.poll(() => released.has(owner)).toBe(true);
await expect( await expect(
@@ -2,6 +2,7 @@ import { buildSettingsHostSectionRoute } from "@/utils/host-routes";
import { expect, type Page } from "../fixtures"; import { expect, type Page } from "../fixtures";
import { getServerId } from "./server-id"; import { getServerId } from "./server-id";
import { expectAppRoute } from "./route-assertions"; import { expectAppRoute } from "./route-assertions";
import { escapeRegex } from "./regex";
/** /**
* Settings → Host → Plugins: the Installed and Browse tabs, the page menu, the install sheet and a * Settings → Host → Plugins: the Installed and Browse tabs, the page menu, the install sheet and a
@@ -28,8 +29,17 @@ function pluginSwitch(page: Page, name: string, action: "Disable" | "Enable") {
}); });
} }
/**
* A toast that times out stays in the page while it fades, so the next toast can share the screen
* with it, even when both have the same text. The pattern matches case, so "Installed x" does not
* match "Uninstalled x".
*/
export async function expectToast(page: Page, message: string): Promise<void> { export async function expectToast(page: Page, message: string): Promise<void> {
await expect(page.getByTestId("app-toast-message")).toContainText(message); const toast = page
.getByTestId("app-toast-message")
.filter({ hasText: new RegExp(escapeRegex(message)) })
.first();
await expect(toast).toBeVisible();
} }
// Tabs and search // Tabs and search
@@ -106,10 +106,12 @@ export async function verifyProviderSettings({
await test.step("provider settings render the registered icon", async () => { await test.step("provider settings render the registered icon", async () => {
await openSettings(page); await openSettings(page);
await openSettingsHostSection(page, getServerId(), "providers"); await openSettingsHostSection(page, getServerId(), "providers");
await expectProviderIcon( // The row's button lies under its content, so the icon is in the row, beside the button.
page.getByRole("button", { name: "Direct provider example provider details", exact: true }), const opener = page.getByRole("button", {
iconPaths, name: "Direct provider example provider details",
); exact: true,
});
await expectProviderIcon(page.getByTestId(/^provider-row-/).filter({ has: opener }), iconPaths);
await capture(page, testInfo, "provider-settings"); await capture(page, testInfo, "provider-settings");
await page.getByTestId("settings-back-to-workspace").click(); await page.getByTestId("settings-back-to-workspace").click();
}); });
@@ -15,8 +15,18 @@ export const COMPACT = { width: 390, height: 844 };
/** A plugin written against the current API: a screen, header and footer items, a command. */ /** A plugin written against the current API: a screen, header and footer items, a command. */
const SHOWCASE_SOURCE = `import React from "react"; const SHOWCASE_SOURCE = `import React from "react";
import { Pressable, Text, View } from "react-native"; import { Pressable, Text, View } from "react-native";
import { useWorkspaces } from "@getpaseo/plugin/client";
import { SidebarRow } from "@getpaseo/plugin/client/ui"; import { SidebarRow } from "@getpaseo/plugin/client/ui";
function WorkspacesScreen({ theme }) {
const workspaces = useWorkspaces();
return (
<View style={{ flex: 1, padding: 24, gap: 8 }}>
{workspaces.map((ref) => <Text key={ref.id} style={{ color: theme.colors.foreground }}>{"Workspace " + ref.id}</Text>)}
</View>
);
}
function DeploysScreen({ theme }) { function DeploysScreen({ theme }) {
return <View style={{ flex: 1, padding: 24 }}><Text style={{ color: theme.colors.foreground }}>Deploys screen body</Text></View>; return <View style={{ flex: 1, padding: 24 }}><Text style={{ color: theme.colors.foreground }}>Deploys screen body</Text></View>;
} }
@@ -63,11 +73,13 @@ function Broken() {
export default function contribute(client) { export default function contribute(client) {
client.addScreen({ id: "deploys", title: "Deploys", Component: DeploysScreen }); client.addScreen({ id: "deploys", title: "Deploys", Component: DeploysScreen });
client.addScreen({ id: "workspaces", title: "Workspaces", Component: WorkspacesScreen });
client.addSidebarHeaderItem({ id: "deploys", title: "Deploys", Component: DeploysItem }); client.addSidebarHeaderItem({ id: "deploys", title: "Deploys", Component: DeploysItem });
client.addSidebarHeaderItem({ id: "broken", title: "Broken header", Component: Broken }); client.addSidebarHeaderItem({ id: "broken", title: "Broken header", Component: Broken });
client.addSidebarFooterItem({ id: "sync", title: "Sync", Component: SyncItem }); client.addSidebarFooterItem({ id: "sync", title: "Sync", Component: SyncItem });
client.addSidebarFooterItem({ id: "broken", title: "Broken footer", Component: Broken }); client.addSidebarFooterItem({ id: "broken", title: "Broken footer", Component: Broken });
client.addCommandCenterItem({ id: "open-deploys", title: "Open deploys", icon: "Rocket", context: "global", onSelect: (ctx) => ctx.openScreen({ screenId: "deploys" }) }); client.addCommandCenterItem({ id: "open-deploys", title: "Open deploys", icon: "Rocket", context: "global", onSelect: (ctx) => ctx.openScreen({ screenId: "deploys" }) });
client.addCommandCenterItem({ id: "open-workspaces", title: "Open plugin workspaces", icon: "List", context: "global", onSelect: (ctx) => ctx.openScreen({ screenId: "workspaces" }) });
return () => {}; return () => {};
} }
`; `;
@@ -0,0 +1,138 @@
import { writeFile } from "node:fs/promises";
import path from "node:path";
import type { DaemonClient as InternalDaemonClient } from "@getpaseo/client/internal/daemon-client";
import { expect, test as base, type Page } from "../fixtures";
import { gotoAppShell, openSettings } from "./app";
import { connectDaemonClient } from "./daemon-client-loader";
import { copyPluginExample, pluginRequirements } from "./plugin-fixture";
import { getServerId } from "./server-id";
import { leaveProviderDetail, openSettingsHostSection } from "./settings";
const PLUGIN_ID = "provider-update-failure";
const PROVIDER_ID = "update-failure";
const PROVIDER_NAME = "Update failure";
const FAILURE = "The updater could not write to the install directory";
/** The direct provider example with an installation whose updater always fails. */
const SERVER_SOURCE = `import type { PluginServerContext } from "@getpaseo/plugin/server";
import { createDirectExampleProvider } from "./server/provider";
export default function contribute(server: PluginServerContext) {
server.registerProvider({
...createDirectExampleProvider(),
id: ${JSON.stringify(PROVIDER_ID)},
label: ${JSON.stringify(PROVIDER_NAME)},
installation: {
async inspect() {
return { status: "installed", version: "1.0.0" };
},
async update({ report }) {
report({ type: "stderr", text: "EACCES\\n" });
return { status: "failed", message: ${JSON.stringify(FAILURE)} };
},
},
});
return () => {};
}
`;
type ObserverClient = Pick<
InternalDaemonClient,
| "close"
| "connect"
| "getDaemonConfig"
| "inspectProviderInstallation"
| "installDirectoryPlugin"
| "patchDaemonConfig"
| "removePlugin"
>;
interface ProviderUpdateFailure {
page: Page;
/** A second client of the same host. */
otherClient: ObserverClient;
}
export const test = base.extend<{ providerUpdateFailure: ProviderUpdateFailure }>({
providerUpdateFailure: async ({ page }, provide) => {
const client = await connectDaemonClient<ObserverClient>({
clientIdPrefix: "app-e2e-provider-update-failure",
});
const plugin = await copyPluginExample("provider-direct");
try {
const previous = await client.getDaemonConfig();
await writeFile(
path.join(plugin.directory, "paseo-plugin.json"),
JSON.stringify({ id: PLUGIN_ID, requirements: pluginRequirements }),
);
await writeFile(path.join(plugin.directory, "index.server.ts"), SERVER_SOURCE);
try {
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(plugin.directory);
await provide({ page, otherClient: client });
} finally {
try {
await client.removePlugin(PLUGIN_ID);
} finally {
await client.patchDaemonConfig({ pluginsEnabled: previous.config.pluginsEnabled });
}
}
} finally {
await plugin.cleanup();
await client.close();
}
},
});
export async function openProviderInstallation(page: Page): Promise<void> {
await gotoAppShell(page);
await openSettings(page);
await openSettingsHostSection(page, getServerId(), "providers");
await page
.getByRole("button", { name: `${PROVIDER_NAME} provider details`, exact: true })
.click();
await expect(page.getByTestId("provider-installation-version")).toHaveText("1.0.0");
}
export async function runFailingUpdate(page: Page): Promise<void> {
await page.getByTestId("provider-update-start").click();
await expect(page.getByTestId("provider-update-status")).toHaveText("Update failed");
await expect(page.getByTestId("provider-update-message")).toHaveText(FAILURE);
}
export async function refreshProviderDetails(page: Page): Promise<void> {
await page.getByTestId("provider-refresh").click();
}
export async function backToProviderList(page: Page): Promise<void> {
await leaveProviderDetail(page);
}
function providerRow(page: Page) {
return page.getByTestId(`provider-row-${PROVIDER_ID}`);
}
/** The provider's row in the list reports the failed update, with the error dot. */
export async function expectRowReportsUpdateFailure(page: Page): Promise<void> {
const row = providerRow(page);
await expect(row).toContainText(FAILURE);
await expect(row.getByTestId("settings-row-error-dot")).toHaveCount(1);
}
/** The provider's row reads its version and model count again, with no error dot. */
export async function expectRowReadsVersionAndModels(page: Page): Promise<void> {
const row = providerRow(page);
await expect(row).toContainText("1.0.0 · 1 model");
await expect(row).not.toContainText(FAILURE);
await expect(row.getByTestId("settings-row-error-dot")).toHaveCount(0);
}
export async function refreshFromOtherClient(client: ObserverClient): Promise<void> {
const result = await client.inspectProviderInstallation(PROVIDER_ID, { refresh: true });
expect(result.error).toBeNull();
}
export async function expectNoUpdateFailure(page: Page): Promise<void> {
await expect(page.getByTestId("provider-update-run")).toHaveCount(0);
await expect(page.getByTestId("provider-installation-version")).toHaveText("1.0.0");
}
+67 -2
View File
@@ -515,8 +515,8 @@ export async function serveJson(page: Page, url: string, body: unknown): Promise
}); });
} }
export async function openAddProviderArea(page: Page): Promise<void> { export async function openAddProvider(page: Page): Promise<void> {
await page.getByTestId("host-page-add-provider-card").scrollIntoViewIfNeeded(); await page.getByTestId("provider-list-add").click();
await expect(page.getByRole("textbox", { name: "Search providers" })).toBeVisible(); await expect(page.getByRole("textbox", { name: "Search providers" })).toBeVisible();
} }
@@ -528,17 +528,82 @@ export async function findAcpCatalogProvider(page: Page, providerName: string):
export async function installAcpCatalogProvider(page: Page, providerName: string): Promise<void> { export async function installAcpCatalogProvider(page: Page, providerName: string): Promise<void> {
await findAcpCatalogProvider(page, providerName); await findAcpCatalogProvider(page, providerName);
await page.getByRole("button", { name: `Add ${providerName}`, exact: true }).click(); await page.getByRole("button", { name: `Add ${providerName}`, exact: true }).click();
// The sheet closes once the add is done. Adding probes the new provider, which can outlast an
// assertion's default wait.
await expect(page.getByRole("textbox", { name: "Search providers" })).toHaveCount(0, {
timeout: 60_000,
});
} }
/** Adding opens the new provider's page; its row waits in the list behind it. */
export async function expectProviderInstalledInSettings( export async function expectProviderInstalledInSettings(
page: Page, page: Page,
providerName: string, providerName: string,
): Promise<void> { ): Promise<void> {
await expect(page.getByTestId("provider-detail-title")).toHaveText(providerName);
await page.getByTestId("provider-detail-back").click();
await expect( await expect(
page.getByRole("button", { name: `${providerName} provider details`, exact: true }), page.getByRole("button", { name: `${providerName} provider details`, exact: true }),
).toBeVisible(); ).toBeVisible();
} }
export async function openProviderDetail(page: Page, providerName: string): Promise<void> {
await page.getByRole("button", { name: `${providerName} provider details`, exact: true }).click();
await expect(page.getByTestId("provider-detail-title")).toHaveText(providerName);
}
/** Load a provider's Settings page from its URL, as a reload or a shared link does. */
export async function gotoProviderPage(
page: Page,
serverId: string,
providerId: string,
): Promise<void> {
await page.goto(
`/settings/hosts/${encodeURIComponent(serverId)}/providers/${encodeURIComponent(providerId)}`,
);
}
export async function expectProviderPageLoaded(page: Page, providerName: string): Promise<void> {
await expect(page.getByTestId("provider-detail-title")).toHaveText(providerName, {
timeout: 30_000,
});
await expect(page.getByText("Provider status")).toBeVisible({ timeout: 30_000 });
}
export async function expectProviderNotOnHost(page: Page): Promise<void> {
await expect(page.getByText("This provider isn't on this host")).toBeVisible({
timeout: 30_000,
});
}
/**
* The provider page says the provider's CLI is missing, and Install opens the given guide. The
* guide is served locally so the test never reaches the network.
*/
export async function expectInstallOpensGuide(page: Page, guideUrl: string): Promise<void> {
const installation = page.getByTestId("provider-installation");
await expect(installation.getByText("Not installed", { exact: true })).toBeVisible({
timeout: 30_000,
});
await page.context().route(guideUrl, (route) =>
route.fulfill({
status: 200,
contentType: "text/html",
body: "<title>Install guide</title>",
}),
);
const guide = page.waitForEvent("popup");
await installation.getByRole("button", { name: "Install", exact: true }).click();
const opened = await guide;
expect(opened.url()).toBe(guideUrl);
await opened.close();
}
export async function leaveProviderDetail(page: Page): Promise<void> {
await page.getByTestId("provider-detail-back").click();
await expect(page.getByTestId("provider-list")).toBeVisible();
}
export async function expectHostNoDaemonLifecycleRow(page: Page): Promise<void> { export async function expectHostNoDaemonLifecycleRow(page: Page): Promise<void> {
await expect(page.getByTestId("host-page-daemon-lifecycle-card")).toHaveCount(0); await expect(page.getByTestId("host-page-daemon-lifecycle-card")).toHaveCount(0);
} }
+16 -5
View File
@@ -190,14 +190,25 @@ export async function selectWorkspaceInSidebar(page: Page, workspaceId: string):
await row.click(); await row.click();
} }
async function openWorkspaceSidebarKebab(page: Page, workspaceId: string) { /**
* Opens a workspace row's kebab menu the way a pointer does: enter the row, then press the kebab
* it reveals.
*
* The kebab only mounts while the row holds hover, and hover only arrives on pointerenter. A row
* that re-renders or shifts under a parked pointer drops that hover with no new pointerenter to
* restore it, so each attempt leaves the row and enters it again instead of waiting on a kebab
* that a still pointer cannot bring back.
*/
export async function openWorkspaceSidebarKebab(page: Page, workspaceId: string) {
const serverId = getServerId(); const serverId = getServerId();
const row = page.getByTestId(`sidebar-workspace-row-${serverId}:${workspaceId}`); const row = page.getByTestId(`sidebar-workspace-row-${serverId}:${workspaceId}`);
await expect(row).toBeVisible({ timeout: 30_000 });
await row.hover();
const kebab = page.getByTestId(`sidebar-workspace-kebab-${serverId}:${workspaceId}`); const kebab = page.getByTestId(`sidebar-workspace-kebab-${serverId}:${workspaceId}`);
await expect(kebab).toBeVisible({ timeout: 10_000 }); await expect(row).toBeVisible({ timeout: 30_000 });
await expect(async () => {
await page.mouse.move(0, 0);
await row.hover();
await expect(kebab).toBeVisible({ timeout: 2_000 });
}).toPass({ timeout: 15_000 });
await kebab.click(); await kebab.click();
return serverId; return serverId;
@@ -1,5 +1,6 @@
import { expect, type Page } from "@playwright/test"; import { expect, type Page } from "@playwright/test";
import type { installDaemonWebSocketGate } from "./daemon-websocket-gate"; import type { installDaemonWebSocketGate } from "./daemon-websocket-gate";
import { seedMockAgentWorkspace, type MockAgentWorkspace } from "./mock-agent";
import { readReplicaCache } from "./replica-cache-storage"; import { readReplicaCache } from "./replica-cache-storage";
import type { LongTimelineAgent } from "./timeline-pagination"; import type { LongTimelineAgent } from "./timeline-pagination";
import { import {
@@ -241,3 +242,100 @@ export async function restoreUnchangedViewedTimeline(
gate.restore(); gate.restore();
await expectReconnectingToastGone(page); await expectReconnectingToastGone(page);
} }
export interface StreamingReplyAgent extends MockAgentWorkspace {
prompt: string;
}
/**
* A mock agent with no history whose reply streams one word every 100 ms. At 2,000 words the
* reply outlasts the test's timeout, so it is still streaming however long the app takes to
* reconnect. The test ends the turn with {@link stopStreamingReply}.
*/
export async function seedStreamingReplyAgent(): Promise<StreamingReplyAgent> {
const reply = Array.from({ length: 2_000 }, (_unused, index) => `word${index}`).join(" ");
const agent = await seedMockAgentWorkspace({
repoPrefix: "reply-reconnect-",
title: "Reply through reconnect",
featureValues: {
mockStreamingAssistantResponse: reply,
mockStreamingAssistantIntervalMs: 100,
},
});
return {
...agent,
prompt: "stream through a reconnect",
cleanup: async () => {
await agent.client.cancelAgent(agent.agentId).catch(() => undefined);
await agent.cleanup();
},
};
}
interface TimelineReader {
fetchAgentTimeline(
agentId: string,
request: { direction: "tail"; limit: number },
): Promise<{ entries: Array<{ item: { type: string; text?: string } }> }>;
}
async function readDaemonReply(agent: StreamingReplyAgent): Promise<string> {
const timeline = await (agent.client as unknown as TimelineReader).fetchAgentTimeline(
agent.agentId,
{ direction: "tail", limit: 0 },
);
return timeline.entries
.map(({ item }) => (item.type === "assistant_message" ? (item.text ?? "") : ""))
.join("");
}
/** Waits for the empty chat's first catch-up, so the chat is synced with no range. */
export async function expectEmptyChatSynced(page: Page, gate: DaemonWebSocketGate): Promise<void> {
await gate.waitForServerMessage(TIMELINE_RESPONSE);
await expect(page.getByTestId("agent-chat-scroll").filter({ visible: true })).toHaveCount(1, {
timeout: 30_000,
});
}
/** Another client sends the prompt, and the reply starts, while the chat is away. */
export async function sendPromptWhileDisconnected(agent: StreamingReplyAgent): Promise<void> {
await agent.client.sendAgentMessage(agent.agentId, agent.prompt);
await expect.poll(() => readDaemonReply(agent), { timeout: 30_000 }).toContain("word10");
}
/** Reconnects with live reply chunks reaching the chat before the catch-up page that holds them. */
export async function restoreViewedTimelineWithLiveRowsFirst(
gate: DaemonWebSocketGate,
): Promise<void> {
gate.holdNextClientRequest(TIMELINE_REQUEST);
const chunksBeforeReconnect = gate.getAgentStreamItemCount("assistant_message");
gate.restore();
await gate.waitForHeldClientRequest();
await gate.waitForAgentStreamItem("assistant_message", chunksBeforeReconnect + 5);
gate.releaseHeldClientRequest();
}
/** Stops the turn and returns the reply as the daemon recorded it. */
export async function stopStreamingReply(agent: StreamingReplyAgent): Promise<string> {
await agent.client.cancelAgent(agent.agentId);
await agent.client.waitForFinish(agent.agentId, 30_000);
const reply = (await readDaemonReply(agent)).trim();
expect(reply).toMatch(/^word0 word1 word2 .* word10 /);
return reply;
}
export async function expectPromptAndWholeReply(
page: Page,
agent: StreamingReplyAgent,
reply: string,
): Promise<void> {
const chat = page.getByTestId("agent-chat-scroll").filter({ visible: true }).first();
await expect(chat.getByText(agent.prompt, { exact: true })).toBeVisible({ timeout: 30_000 });
await expect
.poll(
async () =>
(await chat.getByTestId("assistant-message").allInnerTexts()).map((text) => text.trim()),
{ timeout: 30_000 },
)
.toEqual([reply]);
}
@@ -175,13 +175,19 @@ export interface SidebarListLayout {
rowHeight: number; rowHeight: number;
} }
const SIDEBAR_LIST = "sidebar-project-workspace-list-scroll";
/** Scrolls the sidebar's workspace list to its end and reads where its rows sit. */ /** Scrolls the sidebar's workspace list to its end and reads where its rows sit. */
export async function scrollSidebarListToEnd(page: Page): Promise<SidebarListLayout> { export async function scrollSidebarListToEnd(page: Page): Promise<SidebarListLayout> {
const list = page.getByTestId("sidebar-project-workspace-list-scroll"); await page.getByTestId(SIDEBAR_LIST).evaluate((element) => {
await list.evaluate((element) => {
element.scrollTop = element.scrollHeight; element.scrollTop = element.scrollHeight;
}); });
return list.evaluate((element) => { return readSidebarListLayout(page);
}
/** Reads where the sidebar list's rows sit, without scrolling it. */
export async function readSidebarListLayout(page: Page): Promise<SidebarListLayout> {
return page.getByTestId(SIDEBAR_LIST).evaluate((element) => {
const visible = element.getBoundingClientRect(); const visible = element.getBoundingClientRect();
const rows = Array.from( const rows = Array.from(
element.querySelectorAll<HTMLElement>( element.querySelectorAll<HTMLElement>(
@@ -197,3 +203,26 @@ export async function scrollSidebarListToEnd(page: Page): Promise<SidebarListLay
}; };
}); });
} }
/**
* Starts recording the bottom edge of the sidebar list's last row once per painted frame.
* Resolves with one value per frame after `frameCount` frames.
*/
export function recordLastRowBottomPerFrame(page: Page, frameCount: number): Promise<number[]> {
return page.getByTestId(SIDEBAR_LIST).evaluate(
(element, count) =>
new Promise<number[]>((resolve) => {
const bottoms: number[] = [];
const sample = () => {
const rows = element.querySelectorAll<HTMLElement>(
'[data-testid^="sidebar-workspace-row-"],[data-testid^="sidebar-project-row-"]',
);
bottoms.push(Math.max(...Array.from(rows, (row) => row.getBoundingClientRect().bottom)));
if (bottoms.length >= count) resolve(bottoms);
else requestAnimationFrame(sample);
};
requestAnimationFrame(sample);
}),
frameCount,
);
}
@@ -0,0 +1,2 @@
/android/.cxx/
/android/build/
@@ -0,0 +1,23 @@
apply plugin: 'com.android.library'
group = 'sh.paseo.displaymetrics'
version = '0.1.0'
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
apply from: expoModulesCorePlugin
applyKotlinExpoModulesCorePlugin()
useCoreDependencies()
useDefaultAndroidSdkVersions()
android {
namespace "sh.paseo.displaymetrics"
defaultConfig {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
}
dependencies {
implementation "com.facebook.react:react-android"
androidTestImplementation 'androidx.test:runner:1.6.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
}
@@ -0,0 +1,86 @@
package sh.paseo.displaymetrics
import android.util.DisplayMetrics
import android.util.TypedValue
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.facebook.react.uimanager.DisplayMetricsHolder
import com.facebook.react.uimanager.PixelUtil
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertSame
import org.junit.Assert.assertThrows
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class PaseoDisplayMetricsTest {
private lateinit var display: DisplayMetrics
@Before
fun readDisplayLikeReactNative() {
DisplayMetricsHolder.initDisplayMetrics(InstrumentationRegistry.getInstrumentation().targetContext)
display = DisplayMetricsHolder.getScreenDisplayMetrics()
}
@After
fun forgetDisplay() {
DisplayMetricsHolder.setScreenDisplayMetrics(null)
}
@Test
fun reservesRoomForTextAtTheWindowDensity() {
// A DeX window at two thirds of the phone's density (240 dpi on a 360 dpi phone). React Native
// reads the font scale from the window but the density from the phone's display.
val window = windowAt(display.densityDpi * 2 / 3)
DisplayMetricsHolder.setScreenDisplayMetrics(
DisplayMetrics().apply {
setTo(display)
scaledDensity = window.scaledDensity
},
)
assertTrue(reservedTextPx(window) < drawnTextPx())
PaseoDisplayMetrics.syncWithWindow(window)
assertEquals(drawnTextPx(), reservedTextPx(window), 0.01f)
assertEquals(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 16f, window), drawnTextPx(), 0.01f)
val synced = DisplayMetricsHolder.getScreenDisplayMetrics()
assertEquals(window.densityDpi, synced.densityDpi)
assertEquals(display.widthPixels, synced.widthPixels)
assertEquals(display.heightPixels, synced.heightPixels)
}
@Test
fun leavesTheBuiltInDisplayAlone() {
PaseoDisplayMetrics.syncWithWindow(windowAt(display.densityDpi))
assertSame(display, DisplayMetricsHolder.getScreenDisplayMetrics())
}
@Test
fun waitsForReactNativeToReadTheDisplay() {
DisplayMetricsHolder.setScreenDisplayMetrics(null)
PaseoDisplayMetrics.syncWithWindow(windowAt(display.densityDpi / 2))
assertThrows(IllegalStateException::class.java) { DisplayMetricsHolder.getScreenDisplayMetrics() }
}
private fun windowAt(densityDpi: Int): DisplayMetrics =
DisplayMetrics().apply {
setTo(display)
this.densityDpi = densityDpi
density = densityDpi.toFloat() / DisplayMetrics.DENSITY_DEFAULT
scaledDensity = density * display.scaledDensity / display.density
}
/** A 16sp font as React Native draws it, in pixels. */
private fun drawnTextPx(): Float = PixelUtil.toPixelFromSP(16f)
/** The box React Native lays out for that font, once the window renders it in pixels. */
private fun reservedTextPx(window: DisplayMetrics): Float =
PixelUtil.toDIPFromPixel(drawnTextPx()) * window.density
}
@@ -0,0 +1,43 @@
package sh.paseo.displaymetrics
import android.app.Activity
import android.util.DisplayMetrics
import com.facebook.react.uimanager.DisplayMetricsHolder
/**
* React Native 0.86 converts between px and dp, and so sizes text, with the density of the
* device's built-in display, because `DisplayMetricsHolder` reads `Display.getRealMetrics()`.
* Fabric lays out at the window's density. On a display with another density, such as a Samsung
* DeX monitor, text boxes come out too small and clip their text.
*
* Backports react/react-native#59087 (`useWindowDensityForDisplayMetricsAndroid`): keep the
* window's density and take only the size from the display. Remove once the app runs React Native
* 0.89 or later with that flag on.
*/
object PaseoDisplayMetrics {
/** Call right after React Native reads the display, which it does again on each configuration change. */
@JvmStatic
fun syncWithWindow(activity: Activity) {
syncWithWindow(activity.resources.displayMetrics)
}
@JvmStatic
fun syncWithWindow(window: DisplayMetrics) {
val screen =
try {
DisplayMetricsHolder.getScreenDisplayMetrics()
} catch (_: IllegalStateException) {
// React Native hasn't read the display yet, so there is nothing to correct.
return
}
if (screen.densityDpi == window.densityDpi) return
DisplayMetricsHolder.setScreenDisplayMetrics(
DisplayMetrics().apply {
setTo(screen)
density = window.density
densityDpi = window.densityDpi
},
)
}
}
@@ -0,0 +1,35 @@
const { withMainActivity } = require("expo/config-plugins");
const ACTIVITY_CLASS = "class MainActivity : ReactActivity() {";
const SYNC = "sh.paseo.displaymetrics.PaseoDisplayMetrics.syncWithWindow(this)";
// React Native re-reads the built-in display's density when it creates the root view and on every
// configuration change, so the window's density has to be restored right after each `super` call.
const OVERRIDES = `
override fun onContentChanged() {
super.onContentChanged()
${SYNC}
}
override fun onConfigurationChanged(newConfig: android.content.res.Configuration) {
super.onConfigurationChanged(newConfig)
${SYNC}
}
`;
function configureDisplayMetricsActivity(contents) {
if (contents.includes(SYNC)) return contents;
if (
!contents.includes(ACTIVITY_CLASS) ||
/override fun on(ContentChanged|ConfigurationChanged)\(/.test(contents)
) {
throw new Error("Could not keep React Native text at the window's density in MainActivity");
}
return contents.replace(ACTIVITY_CLASS, `${ACTIVITY_CLASS}${OVERRIDES}`);
}
module.exports = (config) =>
withMainActivity(config, (mod) => {
mod.modResults.contents = configureDisplayMetricsActivity(mod.modResults.contents);
return mod;
});
module.exports.configureDisplayMetricsActivity = configureDisplayMetricsActivity;
@@ -0,0 +1,29 @@
import { describe, expect, it } from "vitest";
const { configureDisplayMetricsActivity } = require("./app.plugin");
const SYNC = "sh.paseo.displaymetrics.PaseoDisplayMetrics.syncWithWindow(this)";
describe("Android display metrics", () => {
it("restores the window's density after React Native reads the display", () => {
const source = "class MainActivity : ReactActivity() {\n}";
const result = configureDisplayMetricsActivity(source);
expect(result).toContain(`super.onContentChanged()\n ${SYNC}`);
expect(result).toContain(`super.onConfigurationChanged(newConfig)\n ${SYNC}`);
expect(configureDisplayMetricsActivity(result)).toBe(result);
});
it("fails prebuild when the template no longer has a place for the overrides", () => {
expect(() => configureDisplayMetricsActivity("changed template")).toThrow(
"Could not keep React Native text at the window's density",
);
});
it("fails prebuild rather than replace another plugin's configuration handler", () => {
const source =
"class MainActivity : ReactActivity() {\n override fun onConfigurationChanged(newConfig: Configuration) {}\n}";
expect(() => configureDisplayMetricsActivity(source)).toThrow(
"Could not keep React Native text at the window's density",
);
});
});
@@ -0,0 +1,6 @@
{
"platforms": ["android"],
"android": {
"modules": []
}
}
@@ -0,0 +1,5 @@
{
"name": "paseo-display-metrics",
"version": "0.1.0",
"private": true
}
@@ -0,0 +1,19 @@
apply plugin: 'com.android.library'
group = 'sh.paseo.pressfeedback'
version = '0.1.0'
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
apply from: expoModulesCorePlugin
applyKotlinExpoModulesCorePlugin()
useCoreDependencies()
useExpoPublishing()
useDefaultAndroidSdkVersions()
android {
namespace "sh.paseo.pressfeedback"
defaultConfig {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
}
@@ -0,0 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
@@ -0,0 +1,39 @@
package sh.paseo.pressfeedback
import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import expo.modules.kotlin.AppContext
import expo.modules.kotlin.modules.Module
import expo.modules.kotlin.modules.ModuleDefinition
import expo.modules.kotlin.types.ColorCompat
import expo.modules.kotlin.views.ExpoView
class PaseoPressFeedbackModule : Module() {
override fun definition() = ModuleDefinition {
Name("PaseoPressFeedback")
View(PaseoPressFeedbackView::class) {
Prop("tint") { view: PaseoPressFeedbackView, color: Color -> view.paint.color = ColorCompat.toArgb(color) }
Prop("radius") { view: PaseoPressFeedbackView, radius: Double -> view.radius = radius.toFloat() * view.resources.displayMetrics.density }
Prop("resetKey") { view: PaseoPressFeedbackView, key: String -> view.reset(key) }
AsyncFunction("acknowledge") { view: PaseoPressFeedbackView -> view.acknowledge() }
}
}
}
class PaseoPressFeedbackView(context: Context, appContext: AppContext) : ExpoView(context, appContext) {
val paint = Paint(Paint.ANTI_ALIAS_FLAG)
var radius = 0f
private var acknowledged = false
private var resetKey = ""
init { setWillNotDraw(false); importantForAccessibility = IMPORTANT_FOR_ACCESSIBILITY_NO }
fun acknowledge() { acknowledged = true; invalidate() }
fun reset(key: String) {
if (key != resetKey) { resetKey = key; acknowledged = false; invalidate() }
}
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)
if (acknowledged) canvas.drawRoundRect(0f, 0f, width.toFloat(), height.toFloat(), radius, radius, paint)
}
}
@@ -0,0 +1,5 @@
{
"platforms": ["android", "ios"],
"android": { "modules": ["sh.paseo.pressfeedback.PaseoPressFeedbackModule"] },
"ios": { "modules": ["PaseoPressFeedbackModule"] }
}
@@ -0,0 +1 @@
export { useWorkspaceRowPress } from "./src/ui";
@@ -0,0 +1,22 @@
Pod::Spec.new do |s|
s.name = 'PaseoPressFeedback'
s.version = '0.1.0'
s.summary = 'Native accepted press feedback for Paseo'
s.description = 'Paints accepted press feedback independently of React commits'
s.license = 'Apache-2.0'
s.author = 'Paseo'
s.homepage = 'https://paseo.sh'
s.platforms = { :ios => '15.1' }
s.swift_version = '5.4'
s.source = { :path => '.' }
s.static_framework = true
s.dependency 'ExpoModulesCore'
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
'SWIFT_COMPILATION_MODE' => 'wholemodule'
}
s.source_files = "**/*.{h,m,swift}"
end
@@ -0,0 +1,33 @@
import ExpoModulesCore
import UIKit
public class PaseoPressFeedbackModule: Module {
public func definition() -> ModuleDefinition {
Name("PaseoPressFeedback")
View(PaseoPressFeedbackView.self) {
Prop("tint") { (view: PaseoPressFeedbackView, color: UIColor) in view.tint = color }
Prop("radius") { (view: PaseoPressFeedbackView, radius: Double) in view.radius = radius }
Prop("resetKey") { (view: PaseoPressFeedbackView, key: String) in view.reset(key) }
AsyncFunction("acknowledge") { (view: PaseoPressFeedbackView) in view.acknowledge() }
}
}
}
final class PaseoPressFeedbackView: ExpoView {
var tint = UIColor.clear
var radius: Double = 0
private var acknowledged = false
private var resetKey = ""
required init(appContext: AppContext? = nil) {
super.init(appContext: appContext)
isOpaque = false
isUserInteractionEnabled = false
}
func acknowledge() { acknowledged = true; setNeedsDisplay() }
func reset(_ key: String) {
if key != resetKey { resetKey = key; acknowledged = false; setNeedsDisplay() }
}
override func draw(_ rect: CGRect) {
if acknowledged { tint.setFill(); UIBezierPath(roundedRect: bounds, cornerRadius: radius).fill() }
}
}
@@ -0,0 +1,5 @@
{
"name": "paseo-press-feedback",
"version": "0.1.0",
"private": true
}
@@ -0,0 +1,104 @@
import { expect, it } from "vitest";
import { acceptWorkspaceRowPress, type WorkspaceRowPress } from "./accept";
function rowPress(overrides: Partial<WorkspaceRowPress> = {}) {
const visible: string[] = [];
const press: WorkspaceRowPress = {
cancelled: false,
native: true,
selected: false,
sidebar: "overlay",
target: "agent-list",
acknowledge: () => visible.push("row"),
navigate: () => visible.push("workspace"),
...overrides,
};
return { press, visible };
}
it("acknowledges an accepted row before navigation starts", () => {
const { press, visible } = rowPress();
expect(acceptWorkspaceRowPress(press)).toBe(true);
expect(visible).toEqual(["row", "workspace"]);
});
it("does not acknowledge or navigate after scrolling or a long press claims the touch", () => {
const { press, visible } = rowPress({ cancelled: true });
expect(acceptWorkspaceRowPress(press)).toBe(false);
expect(visible).toEqual([]);
});
it("accepts only the first row while its selection closes the sidebar", () => {
const { press, visible } = rowPress();
press.navigate = () => {
press.target = "agent";
visible.push("workspace B");
};
expect(acceptWorkspaceRowPress(press)).toBe(true);
expect(acceptWorkspaceRowPress(press)).toBe(false);
expect(visible).toEqual(["row", "workspace B"]);
});
it.each([
{
name: "open phone or tablet overlay",
sidebar: "overlay",
target: "agent-list",
native: true,
accepted: true,
},
{ name: "closing overlay", sidebar: "overlay", target: "agent", native: true, accepted: false },
{
name: "explorer covering an overlay",
sidebar: "overlay",
target: "file-explorer",
native: true,
accepted: false,
},
{ name: "docked sidebar", sidebar: "dock", target: "agent", native: true, accepted: true },
{
name: "docked sidebar beside explorer",
sidebar: "dock",
target: "file-explorer",
native: true,
accepted: true,
},
{ name: "hidden sidebar", sidebar: "hidden", target: "agent", native: true, accepted: false },
{
name: "suspended open overlay",
sidebar: "suspended",
target: "agent-list",
native: true,
accepted: true,
},
{
name: "suspended closed overlay",
sidebar: "suspended",
target: "agent",
native: true,
accepted: false,
},
{
name: "web sidebar independent of native panel target",
sidebar: "overlay",
target: "agent",
native: false,
accepted: true,
},
] as const)("uses the panel state for $name", ({ accepted, name: _, ...state }) => {
const { press, visible } = rowPress(state);
expect(acceptWorkspaceRowPress(press)).toBe(accepted);
expect(visible).toEqual(accepted ? ["row", "workspace"] : []);
});
it("does not leave an acknowledgement over an already selected docked row", () => {
const { press, visible } = rowPress({ selected: true, sidebar: "dock", target: "agent" });
expect(acceptWorkspaceRowPress(press)).toBe(true);
expect(visible).toEqual(["workspace"]);
});
it("still acknowledges a selected overlay row before the sidebar leaves", () => {
const { press, visible } = rowPress({ selected: true });
expect(acceptWorkspaceRowPress(press)).toBe(true);
expect(visible).toEqual(["row", "workspace"]);
});
@@ -0,0 +1,20 @@
import type { LeftSidebarPresentation, MobilePanelView } from "@/stores/panel-store";
export interface WorkspaceRowPress {
cancelled: boolean;
native: boolean;
selected: boolean;
sidebar: LeftSidebarPresentation;
target: MobilePanelView;
acknowledge(): void;
navigate(): void;
}
export function acceptWorkspaceRowPress(press: WorkspaceRowPress): boolean {
if (press.cancelled) return false;
if (press.native && press.sidebar !== "dock" && press.target !== "agent-list") return false;
// A selected docked row neither changes selection nor leaves the screen to clear the fill.
if (!press.selected || press.sidebar !== "dock") press.acknowledge();
press.navigate();
return true;
}
@@ -0,0 +1,47 @@
import { requireNativeView } from "expo";
import { type Ref } from "react";
import { usePanelStore } from "@/stores/panel-store";
import { withUnistyles } from "react-native-unistyles";
import { View, StyleSheet, type ViewProps } from "react-native";
export interface RowFeedbackHandle {
acknowledge(): Promise<void>;
}
interface FeedbackProps extends ViewProps {
ref?: Ref<RowFeedbackHandle>;
resetKey: string;
tint?: string;
radius?: number;
}
const NativeFeedback = withUnistyles(requireNativeView<FeedbackProps>("PaseoPressFeedback"));
const mapTheme = (theme: import("@/styles/theme").Theme) => ({
tint: theme.colors.interactionHighlight,
radius: theme.borderRadius.lg,
});
export function RowFeedback({
ref,
selected,
}: {
ref?: Ref<RowFeedbackHandle>;
selected: boolean;
}) {
const revision = usePanelStore((state) => state.mobilePanel.revision);
// Selection takes over the fill; a new panel transition clears it before reopening.
const resetKey = `${selected}:${revision}`;
return (
<View pointerEvents="none" style={styles.overlay}>
<NativeFeedback
ref={ref}
resetKey={resetKey}
pointerEvents="none"
style={styles.fill}
uniProps={mapTheme}
/>
</View>
);
}
const styles = StyleSheet.create({
overlay: { position: "absolute", top: 0, right: 0, bottom: 0, left: 0 },
fill: { flex: 1 },
});
@@ -0,0 +1,7 @@
import type { Ref } from "react";
export interface RowFeedbackHandle {
acknowledge(): Promise<void>;
}
export function RowFeedback(_props: { ref?: Ref<RowFeedbackHandle>; selected: boolean }) {
return null;
}
@@ -0,0 +1,38 @@
import { useCallback, useRef, type RefObject } from "react";
import { isNative } from "@/constants/platform";
import { usePanelStore } from "@/stores/panel-store";
import { acceptWorkspaceRowPress } from "../accept";
import { RowFeedback, type RowFeedbackHandle } from "./feedback";
export function useWorkspaceRowPress({
didLongPressRef,
onPress,
selected,
}: {
didLongPressRef?: RefObject<boolean>;
onPress(): void;
selected: boolean;
}) {
const feedback = useRef<RowFeedbackHandle>(null);
const handlePress = useCallback(() => {
const cancelled = didLongPressRef?.current ?? false;
if (didLongPressRef) didLongPressRef.current = false;
const panel = usePanelStore.getState();
acceptWorkspaceRowPress({
cancelled,
native: isNative,
selected,
sidebar: panel.layout.leftSidebar,
target: panel.mobilePanel.target,
// Paint on the native UI thread before navigation occupies JS; never wait for paint.
acknowledge: () => {
void feedback.current?.acknowledge();
},
navigate: onPress,
});
}, [didLongPressRef, onPress, selected]);
return {
onPress: handlePress,
feedback: <RowFeedback ref={feedback} selected={selected} />,
};
}
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@getpaseo/app", "name": "@getpaseo/app",
"version": "0.16.1", "version": "0.17.0-beta.1",
"private": true, "private": true,
"main": "index.ts", "main": "index.ts",
"scripts": { "scripts": {
@@ -30,6 +30,25 @@ function answer(
} }
describe("draft options model", () => { describe("draft options model", () => {
it("retains an Ultracode option only after the current host advertises it", () => {
const model = openDraftOptions({ provider: "claude" });
const legacy = { provider: "claude", cwd: "/repo", thinkingOptionId: "ultracode" };
model.applyResolved(answer("claude", "old-host", {}, []));
expect(model.retainResolvedOption("ultracode", "old-host")).toBeUndefined();
expect(draftControlsRequest(model.getState(), legacy)).toEqual(legacy);
model.applyResolved(
answer("claude", "new-host", { ultracode: true }, [
{ type: "toggle", key: "ultracode", label: "Ultracode" },
]),
);
expect(model.retainResolvedOption("ultracode", "old-host")).toBeUndefined();
expect(model.retainResolvedOption("ultracode", "new-host")).toEqual({ ultracode: true });
expect(
draftControlsRequest(model.getState(), { ...legacy, thinkingOptionId: "high" }),
).toMatchObject({ thinkingOptionId: "high", providerOptions: { ultracode: true } });
});
it("draws a legacy Fast profile as the Fast tier the daemon resolved", () => { it("draws a legacy Fast profile as the Fast tier the daemon resolved", () => {
const model = openDraftOptions({ provider: "codex", seed: { service_tier: "fast" } }); const model = openDraftOptions({ provider: "codex", seed: { service_tier: "fast" } });
model.applyResolved(answer("codex", "k1", { service_tier: "priority" })); model.applyResolved(answer("codex", "k1", { service_tier: "priority" }));
@@ -47,6 +47,7 @@ export interface DraftOptionsModel {
applyProfile: (profile: { provider: string; options: ProviderOptions }) => void; applyProfile: (profile: { provider: string; options: ProviderOptions }) => void;
setRemembered: (remembered: ProviderOptions) => void; setRemembered: (remembered: ProviderOptions) => void;
setOption: (key: string, value: unknown) => void; setOption: (key: string, value: unknown) => void;
retainResolvedOption: (key: string, requestKey: string) => ProviderOptions | undefined;
applyResolved: (resolved: ResolvedDraftOptions) => void; applyResolved: (resolved: ResolvedDraftOptions) => void;
} }
@@ -112,6 +113,17 @@ export function openDraftOptions(input: {
: { ...current, edits: { ...current.edits, [key]: value } }, : { ...current, edits: { ...current.edits, [key]: value } },
); );
}, },
retainResolvedOption: (key, requestKey) => {
const resolved = state.resolved;
if (resolved?.requestKey !== requestKey || key in state.edits) return undefined;
const value = resolved.options[key];
if (value === undefined || !resolved.controls.some((control) => control.key === key)) {
return undefined;
}
const patch = { [key]: value };
publish((current) => ({ ...current, edits: { ...current.edits, ...patch } }));
return patch;
},
applyResolved: (resolved) => applyResolved: (resolved) =>
publish((current) => ({ publish((current) => ({
...current, ...current,
@@ -11,3 +11,7 @@ export interface ChatOutlineRailProps {
export function ChatOutlineRail(_props: ChatOutlineRailProps): null { export function ChatOutlineRail(_props: ChatOutlineRailProps): null {
return null; return null;
} }
export function useChatOutlineRailLayout(_enabled: boolean) {
return { onLayout: undefined, inset: 0 };
}

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