Compare commits

..
Author SHA1 Message Date
Mohamed Boudra a9856f12b6 test(server): give the terminal workspace test's cleanup longer on Windows
On Windows the stopped `sleeper` script's process can still hold the project
directory as its working directory when the test removes it, failing cleanup
with EBUSY. rm's retries now wait up to about 5 s for the handle to go.
2026-11-25 16:46:41 +01:00
Mohamed Boudra 1c378330bc fix(timeline): serve an empty older page before a retired first turn in SQLite
The SQLite backend's `before` selection had the same gap as the memory
projection fixed on the base branch: with no active row by the cursor it
returned the first later row as the start of an empty page. It now serves the
empty page, matching the memory backend in the contract and differential tests.
2026-11-25 16:31:25 +01:00
Mohamed Boudra beccad5ede feat(timeline): record the provider that wrote each row
An agent's history can span providers once it switches, so a row served with
the agent's current provider would be rendered as the wrong one. Live writes,
provider history imports, opening notices and subagent rows now store their
provider in the row; the timeline page and replay serve it, falling back to
the agent's provider for rows written before this change. SQLite keeps it in
the row JSON, so the schema is unchanged.
2026-11-25 16:31:25 +01:00
Mohamed Boudra 573e46cf20 fix(daemon): close paseo.db when startup or shutdown fails
A throw while the daemon assembled itself after opening paseo.db, or from a
shutdown step before the timeline close, left the connection and its WAL open
for the next daemon. `createPaseoDaemon` now owns the database and closes it
when assembly throws, and `stop()` closes it in `finally`.
2026-11-25 16:31:25 +01:00
Mohamed Boudra 793ccc5516 fix(timeline): reset an after cursor that is ahead of the history
A client whose cursor is past the stored history (commits lost in a crash, a
restored paseo.db) kept its cursor on an empty page, then dropped the rows
whose seqs it believed it already had. `fetchTimelinePage` now treats it as a
gap, so the client replaces its history with the tail.
2026-11-25 16:31:25 +01:00
Mohamed Boudra 31716f33af test(server): retry removing the restart test's directories on Windows
Windows reported EBUSY removing the agent directory right after the
second daemon closed. Retry the removal as the test daemon's own
cleanup does.
2026-11-25 16:31:25 +01:00
Mohamed Boudra 9b9fef944a perf(timeline): read the chat outline's cursor from the head, not a tail page
The prompt index fetched a one-row tail page only for its epoch and
retirement count. A tool call updated after other rows makes that page
cover every row in between, so the outline still decoded tool output.
AgentTimeline.readPrompts returns the prompt rows with the head they
belong to, in one timeline operation.
2026-11-25 16:31:25 +01:00
Mohamed Boudra a3c1ca6dba fix(agents): let an agent keep saving its record after a failed delete
The delete RPC fences the record against writes before closing the agent.
Since a failed history delete now leaves the record in place, the fence
stayed up for the rest of the process, so a later rename reported success
and never reached disk. The fence now ends when the delete aborts.
2026-11-25 16:31:25 +01:00
Mohamed Boudra 49715f0eae fix(timeline): keep history on reopen, fail deletes that leave it, read only prompts for the outline
- Opening a stored agent with no provider session ran the fresh-create
  cleanup, which deleted its saved timeline. Now that history survives a
  restart, that open erased it; the record-based open now clears only the
  previous session's runtime state.
- The delete RPC removed the registry record first and swallowed a failed
  history delete, replying agent_deleted while the transcript stayed on
  disk with no record to retry from. History now goes first and a failure
  reaches the client as rpc_error with the agent still listed.
- The chat outline built its prompt index from every active row, which on
  SQLite decodes all replies and tool output. Backends now return the
  active prompt rows, which the rewind and import paths already read.
2026-11-25 16:31:25 +01:00
Mohamed Boudra f44f6990a7 chore(nix): update npm dependency hash for the Node 22.16 types 2026-11-25 16:31:25 +01:00
Mohamed Boudra 7e61452dd4 fix(timeline): keep stored history private, exact, and off the turn's path
- paseo.db and its WAL files are set to mode 0600 on every open. They
  hold every prompt and reply.
- Internal agents keep their history in memory. Before this change it
  went to paseo.db and outlived a crash, which broke the rule that
  nothing about an internal agent is on disk.
- Text chunks are stored as JSON strings. node:sqlite reads a TEXT
  value only up to its first NUL, and a chunk can end inside a
  surrogate pair.
- A turn's handler now changes the agent's state before any timeline
  write. Before, a failed metrics stamp skipped the turn_completed
  handler, so a turn the provider started stayed running.
- Node 22.13, which has node:sqlite but not isTransaction, is refused
  at open.
- If the checkpoint worker cannot start, the daemon logs it and falls
  back to SQLite's auto-checkpoint. Before, the error reported an
  already committed write as failed.
2026-11-25 16:31:25 +01:00
Mohamed Boudra cf9683f066 test(cli): reopen the idle agent explicitly after a supervisor restart
Fetching an agent's timeline now reads stored history without loading the agent, so the agent stays closed until it is reopened.
2026-11-25 16:31:25 +01:00
Mohamed Boudra 88bc3ee42b test(agents): prove a run's caller hears a turn whose record failed 2026-11-25 16:31:25 +01:00
Mohamed Boudra a5f4cd06a6 feat(timeline): store agent timelines in paseo.db
Agent history now survives a daemon restart, and closed or archived
agents hold no timeline in memory. A history fetch reads paseo.db and
starts no provider.

The daemon opens one SQLite database at $PASEO_HOME/paseo.db with
node:sqlite. Each schema module owns its tables and migrations, and
records a min_reader_version, so an older daemon refuses a database
it cannot read instead of corrupting it. Node 22.16 is the floor,
because DatabaseSync needs it.

A worker thread runs the WAL checkpoints. A checkpoint syncs the
file, and on the daemon thread it stalled the event loop for up to
119 ms on whichever write crossed the auto-checkpoint threshold. If
the worker exits, the daemon returns to SQLite's auto-checkpoint.

A turn's final event now ends the run even when the timeline fails
to write it. Before this change the error escaped handleStreamEvent
before settleTerminalRun, so the agent stayed running and its waiters
hung. The durable store makes that write fallible, and shutdown made
it fail: settled() rejected after close.
2026-11-25 16:31:24 +01:00
Mohamed Boudra c228a3acac test(website): wait for hydration before submitting a plugin search
`openPlugins` waits only for the server-rendered heading. On WebKit, Enter
could land before hydration attached the search form's handler, so nothing
navigated and the page stayed on /plugins. The two tests that submit right
after opening the directory now wait for hydration first; `openPlugins` itself
stays as it is because a no-JavaScript test uses it.
2026-11-25 16:31:17 +01:00
Mohamed Boudra 1b6308502f fix(timeline): serve an empty older page before a retired first turn
After a rewind of the first prompt and a new turn, a `before` page whose
cursor fell in the retired prefix found no active row before the cursor. The
whole-turn loop then read the row at index -1 and threw, and ordinary paging
returned the first later row's seq as the start, past the page's end.
2026-11-25 16:20:34 +01:00
Mohamed Boudra 9e3107fcb7 test(opencode): read v2 children through the timeline-backed store
The child tests merged from main build a `ProviderSubagentStore` with no
timeline and read `list()` synchronously. On this branch the store keeps
children in the agent's timeline, so it takes one and its reads resolve
asynchronously. Each `apply` queues on the parent's timeline before its first
await, so an awaited `list` observes every event emitted before it.
2026-11-25 16:20:34 +01:00
Mohamed Boudra 5033ad0249 Merge origin/main into plan-provider-switch-sqlite-timelines
Conflicts resolved by keeping both intents:
- turn-boundary: main reads the reply through getAssistantReply (plugin
  cards); this branch narrows the fork cursor to epoch and seq.
- codex rewind: this branch's fork-and-verify flow, with main's
  threadDeveloperInstructions() for the developer instructions.
- agent-manager: this branch's ProviderHistoryReconcile type next to
  main's Omit<..., "signal"> query options.
Main's new plugin-card tests gain the anchorSeq this branch's cursors carry.
2026-11-25 16:00:06 +01:00
Mohamed Boudra 307f65d8f7 Stabilize website scene and keyboard language checks (#10808)
* fix(website): stabilize scene and keyboard language checks

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* fix(opencode): reconcile skipped subagent descendants

* fix(opencode): restore live subagents after reconnect

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

* fix(opencode): clear deleted subagents after reconnect

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

---------

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

No plugin SDK changes.

Closes #10438

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

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

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

Refs #10438

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

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

Refs #10438

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

Refs #10438

---------

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

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

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

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

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

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

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

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

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

Supersedes #10605.

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

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

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

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

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

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

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

* fix: show import provider errors and retry progress

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

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

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

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

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

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

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

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

* Keep pending session imports tied to their original host

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

---------

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---------

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fixes #9669

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

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

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

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

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

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

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

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

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

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

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

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

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

* Verify older history appears before rechecking turn expansion

---------

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

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

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

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

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

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

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

* test(claude): name replay notification fixture options

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

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

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

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

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

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

---------

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

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

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

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

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

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

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

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

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

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

---------

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

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

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

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

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

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

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

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

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

---------

Co-authored-by: Brandon Elliott <923787+Brandon168@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-24 15:51:30 +00:00
Mohamed BoudraandTaras Kornichuk e06bfbb94c Redesign host picker with configurable auto-detected icons, connection type, and latency (#10702)
Supersedes #5787.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* fix(server): fail setup approval before clearing records when worktree metadata write fails
2026-11-24 17:46:23 +07:00
Mohamed Boudra b7af3da71f fix(timeline): commit confirmed plugin rewind cuts and stream reload turn metrics
Preserve the confirmed at_target cut via RewindAppliedError when plugin session replay fails after session.revert succeeds, so reloading recovers even a first-message rewind. Carry turnMetrics on live timeline events appended by Reload agent so open chats match fresh timeline pages. Fix three async-timeline timing expectations in mcp-server and codex-async-questions tests.
2026-11-24 09:18:19 +01:00
Mohamed Boudra 2789421fbd Merge remote-tracking branch 'origin/main' into plan-provider-switch-sqlite-timelines
# Conflicts:
#	packages/app/e2e/browser/agent-message-rewind.spec.ts
#	packages/app/e2e/browser/rewind-menu.ui-contract.spec.ts
#	packages/app/src/runtime/host-runtime.ts
#	packages/app/src/timeline/session-stream-reducers.test.ts
#	packages/server/src/server/agent/agent-manager.test.ts
#	packages/server/src/server/agent/agent-manager.ts
#	packages/server/src/server/agent/agent-timeline-store-types.ts
#	packages/server/src/server/agent/agent-timeline-store.test.ts
#	packages/server/src/server/agent/agent-timeline-store.ts
#	packages/server/src/server/agent/plugin-provider.ts
#	packages/server/src/server/agent/providers/claude/agent.ts
2026-11-24 09:02:33 +01:00
Mohamed Boudra b7b5acf086 fix(timeline): resolve plugin rewind, id reuse, and startup notice findings
Define plugin session.revert completion as an exact rewind to the supplied token (at_target), allow plugin timeline items to reuse stable ids after a rewind, append session.initialTimeline only when creating a new timeline, and centralize provider-history prompt acknowledgement inside AgentTimeline.
2026-11-24 08:50:13 +01:00
Mohamed Boudra 8b2e14f3d2 Run resolved forge CLI executables directly (#10685)
* fix(server): run resolved forge CLI executables directly

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

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

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

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

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

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

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

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

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

firstPushRemote stays on the wire for apps that predate pushRemote.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-24 00:01:37 +00:00
Mohamed Boudra ff27da07bf chore(release): reconcile v0.17.4 (#10645) 2026-11-24 06:16:30 +07:00
Mohamed Boudra 1fea66215d Show Push for a branch that was never pushed (#10631)
* fix(git): offer Push for never-pushed branches and non-origin remotes

The Changes pane decided whether to offer Push from two daemon fields that
answered a different question. `aheadOfOrigin` is null both when a branch has
no upstream and when its upstream was deleted, so the app could only treat
null as a first push inside Paseo worktrees; a never-pushed branch in a
regular checkout got no Push. `hasRemote` is true only for a remote named
origin, so a branch tracking any other remote got "not connected to a remote"
while the daemon's push would have used the tracked remote.

The daemon now reports the two facts the decision needs: `upstreamState`
(tracked, none, gone, unknown) and `pushRemote`, resolved by the same
function `pushCurrentBranch` uses, so the button and the push cannot
disagree. A deleted upstream stays out of first-push in regular checkouts
so Paseo does not silently re-publish a branch whose remote copy was removed;
Paseo worktrees keep re-publishing, as before.

Both fields are optional on the wire. Against an older daemon the app keeps
the previous rule, tagged COMPAT(checkoutPushTarget).

* fix(git): keep a published branch out of first push in single-branch clones

A `--single-branch` or `--depth` clone keeps no remote-tracking ref for a
feature branch, so git reports a blank upstream even after `push -u` set
`branch.<name>.remote` and `.merge`. The daemon read that blank as "never
pushed", and a regular checkout then offered Push, which re-created the
branch after it was deleted on the remote.

A blank upstream is now "none" only when no upstream is configured. A
configured upstream git cannot resolve is "unknown". Paseo worktrees keep
publishing in that state, as they did before upstreamState existed.

* fix(git): do not push to the upstream when git pushes the branch elsewhere

With `branch.<name>.pushRemote` or `remote.pushDefault` naming a fork, git
pushes a branch that tracks `upstream/main` to the fork. The daemon ignored a
push remote that has no HEAD push refspec and pushed HEAD to the tracked
branch instead, which is the shared base. Offering Push for remotes not named
origin made that reachable in checkouts that have no origin.

The push target is now empty when git's push remote differs from the remote
the daemon would use, so status reports no push remote and the push refuses
with a message that names git's push remote. Push remotes Paseo configures
itself carry a HEAD push refspec and are unaffected.

* fix(git): withhold Pull and push when Push has no remote to send to

Pull and push checked only that origin exists, so it stayed available when the daemon reports no push remote. It then pulled, which can create a merge commit, and failed at the push. It now uses the same push remote check as Push.

* fix(git): do not extend pushes to a differently named upstream branch

The daemon pushes a tracked branch to its upstream branch whatever that
branch is called, so `feature` tracking `main` pushes to `main`. The app
offered Push only in checkouts that have origin. Reporting a push remote for
any tracked remote made the same push reachable without origin, for example
`feature` tracking `upstream/main`.

Without origin, the upstream is now a push target only when its branch has
the same name as the local branch, which is the push git itself makes by
default. Checkouts that have origin behave as before.

* fix(git): limit the Push fix to never-pushed branches

Push for branches that track a remote other than origin is removed from
this change. Supporting it means following Git's push settings
(branch.<name>.pushRemote, remote.pushDefault, push.default) for every
remote, and each review round found another setup where the push would
have gone to the wrong place.

The daemon's push is the same as before this branch again. What stays is
upstreamState on the checkout status, which lets the app tell a
never-pushed branch from one whose remote copy was deleted, and the app
rule that offers a first push in a regular checkout.

* fix(git): withhold first Push when git pushes the branch to another remote

The daemon publishes a branch with no upstream to origin. Git picks the
remote for a push from branch.<name>.pushRemote, then remote.pushDefault,
so in a fork setup `git push` sends a new branch to the fork while Push
sent it to origin. Offering a first push in regular checkouts made that
reachable there.

The checkout status now reports firstPushRemote: origin when git would
push the branch to origin too, null otherwise. A regular checkout offers
a first push only when it is set. Paseo worktrees and the daemon's push
are unchanged.

The never-pushed browser test read the branch's upstream as soon as the
remote had the branch. Git writes the upstream after that, so the test
now waits for it.

* fix(git): check the first push destination again before pushing

The app offers a first push from a checkout status that can be older
than the git configuration. If remote.pushDefault or
branch.<name>.pushRemote changed after the status loaded, Push still
published the branch to origin.

The daemon now makes the same check when it pushes: in a regular
checkout, a branch with no upstream is published to origin only when git
would push it there too. Otherwise the push is refused with a message
that names git's remote. Paseo worktrees, and branches whose upstream is
a local branch, push as before.

* fix(git): describe a missing upstream without blaming the remote

A branch can track a local branch. When that branch is deleted, git reports the upstream as gone, and the Push menu said the branch was deleted on the remote, which never happened. The message now says the tracked branch no longer exists, which is true for a local and a remote upstream.

* test(server): expect the Paseo home in the session push call

The checkout session now gives pushCurrentBranch the Paseo home, so the push can tell a Paseo worktree from a regular checkout. The session test still asserted the old single argument.

* fix(git): read a branch's Git settings under its real name when a tag shares it

With a tag of the same name, git spells the current branch heads/<name>. The daemon used that spelling to read branch.<name>.* settings and the branch ref, so it found none of them. A never-pushed branch set to push to a fork was reported as publishable to origin and was pushed there, a branch whose remote copy was deleted was reported as never pushed, and a branch tracking a fork was pushed to origin.

The status and push paths now read those settings and the ref under the name from the symbolic HEAD ref. getCurrentBranch, the branch name sent to clients, and the refspec of the first push keep git's short spelling, which is the right one for a revision.
2026-11-24 04:11:09 +07:00
Mohamed Boudra ecb2501458 Show the full command of Hermes terminal calls (#10614)
* fix(hermes): show the full command of Hermes terminal calls

Hermes titles a terminal call with its own summary ("terminal: echo ... + 5
commands") and sends the full command only as "$ <command>" start content,
which the completion update replaces. It sends no rawInput, so the generic
ACP adapter fell back to the title and the full command was never stored.

Hermes now runs as a bundled runAcpProvider plugin. Its terminal transformer
lifts the start text into input.command and carries it across the
completion through context.previous; any other shape passes through, so an
upstream format change shows the title again instead of breaking.

The plugin ACP shim now builds the standard row for each ACP tool kind, so
read/search/fetch rows keep their shape after the move. Transformers still
see raw input, output and content, and a detail they set wins.

Moving Hermes surfaced two regressions, both fixed:
- The activity curator printed "[Shell] null" for typed rows whose name
  looks namespaced (Hermes titles contain ":"); the raw-input fallback now
  applies only to unknown rows.
- Agents saved by the generic adapter stored Hermes session-mode IDs, but
  the shim uses Hermes's edit_approval_policy config option as ACP prefers,
  so resume failed with invalid_params. legacyModes translates them.

Legacy extends:"acp" Hermes configs migrate on load, keeping a custom
command, gated on server_info.features.hermesProvider.

* fix(acp): keep Hermes approvals, Auto Accept, and session import after bundling

Moving Hermes from the generic ACP adapter to the plugin ACP shim dropped
behavior the adapter had:

- Approvals were built without a detail, so the approval card had no diff.
  Approvals with no rawInput also failed with "Invalid params".
- The shim had no unattended mode, and agents that saved the adapter's
  `auto_accept` toggle sent it back to Hermes as an unknown config option.
  Hermes now offers a Full access mode, and a saved `auto_accept: true`
  resumes in it.
- Session listing read only the first page of `session/list`, so the import
  picker lost sessions past the first 50.
- Edit rows whose result is text lost that text instead of showing it as
  the diff, unlike the generic adapter.

* fix(acp): keep a mode chosen after a saved Auto Accept toggle

The generic ACP adapter's `auto_accept` setting stays in the agent's saved
options after the move to a bundled ACP provider. It put the agent back in
the unattended mode on every reopen, even after the user chose another
mode, so approvals stopped asking again after a reload. The toggle now
counts only while the saved mode is one the generic adapter wrote, which
the agent no longer offers.

* fix(acp): keep whitespace-only text in Edit rows

The standard Edit row read old and new text with the same helper as
titles and paths, which skips blank strings. An edit that replaces text
with spaces lost its new text, so the app drew it as a deletion. File
text is now kept as written, as the previous formatter did.
2026-11-23 23:24:12 +07:00
Mohamed Boudra 065e4a95b1 Show OpenCode Go usage for the credential OpenCode serves Go with (#10612)
* fix(usage): follow the OpenCode credential that serves Go

OpenCode 2 serves OpenCode Go with the active credential on the
opencode integration when that Console workspace has Go, and uses the
opencode-go key only otherwise. The usage card now reads the same
credential: a Console sign-in (with its organization) first, then a key
on opencode, then the opencode-go key. Keys read the Console Go status
before the usage API, which floors each percent.

Refs #6428

* fix(usage): keep OpenCode Go usage on the sign-in through outages

A Console outage no longer shows the fallback key's usage, and a slow
Console probe no longer uses up the refresh deadline for a working key.

* fix(usage): skip OpenCode keys saved for another Console

A key on the opencode integration can name its own Console server.
Usage now leaves it alone instead of sending it to opencode.ai.
2026-11-23 23:07:16 +07:00
paseo-bot[bot]andThomas Van 309a44c480 Deliver urgent messages to archived agents (#10611)
* fix(server): deliver urgent messages to archived agents

An out-of-band probe rejected urgent messages before normal dispatch could restore the archived recipient. Decline the probe so the existing dispatch path restores the recipient and delivers the prompt.

Co-authored-by: Thomas Van <9481872+thomasvan@users.noreply.github.com>

* fix(server): deliver urgent messages during agent restore

When restore closes the history session, the stored agent still exists. Let normal dispatch reopen it instead of treating the missing session as a dispatch failure.

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Thomas Van <9481872+thomasvan@users.noreply.github.com>
2026-11-23 15:58:52 +00:00
paseo-bot[bot]andIvan Pantic 5f424e2e94 Show OpenCode Go usage for database-stored logins (#8729)
OpenCode 2 keeps logins in opencode.db and never updates auth.json, so the Go usage card was missing or sent a stale key (HTTP 401). The card now reads the selected opencode-go credential from the v2 database, read-only, and keeps auth.json for OpenCode 1. A login OpenCode 2 imports keeps its account identity.

Closes #6428

Co-authored-by: Ivan Pantic <panta@talentkit.io>
2026-11-23 21:54:04 +07:00
paseo-bot[bot] 4d472c2804 test(server): verify image hashing yields to the event loop (#10574)
Observe a loop turn before the first filesystem request. Timer gaps also count CPU work that belongs to other callbacks.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-23 12:43:23 +00:00
Mohamed Boudra 182c1aa192 Keep git commands from adopting bare-repository-shaped directories (#10587)
* fix(server): keep git from adopting bare-repository-shaped directories

Git discovery treats any directory holding `HEAD`, `config`, `objects/` and
`refs/` as a bare repository, at the working directory or in a parent. Daemon
git commands then ran with that directory's config. They now pass
`-c safe.bareRepository=explicit`. The flag is left off only when the working
directory is a bare repository that a linked worktree's `.git` file points back
to, so the bare + linked-worktree layout keeps working.

The diff reader ran `git status` inside every submodule path. An uninitialized
submodule has no `.git`, so git walked up to whatever repository sat above it.
The reader now skips submodules without `.git` and pins `GIT_DIR=.git` for
initialized ones.

The worktree-include plugin spawns git directly and gets the same flags.

* fix(server): stop bare-repository discovery on Git before 2.38

Git releases before 2.38 ignore `safe.bareRepository`, so the runner's flag
did nothing there. On those releases the runner now follows git's discovery
order from `cwd` itself. If it reaches a directory that looks like a bare
repository before any `.git`, it pins `GIT_DIR` to the missing `<cwd>/.git`
and git reports that no repository was found, which matches what newer
releases do with the flag. The git version is read once per process.

The worktree-include plugin needs no fallback: it runs git at a checkout
root, where discovery stops at that checkout's own `.git`.

* test(server): keep fixtures independent of git discovery timing

The fetch fixture ran `update-server-info` from inside a plain bare remote.
With `safe.bareRepository=explicit`, git now refuses that unless the
repository is named, so the fixture passes `--git-dir`.

The slow-cadence poll test let the service read `remote.origin.url` through
real git while timers were faked. The runner now checks the working directory
before it spawns, and fake timers do not wait for that file-system work. The
test now injects the repository host and slug like its neighbors do.

* fix(server): refresh live diffs when an uninitialized submodule's commit changes

Skipping `git status` for an uninitialized submodule left its worktree
identity empty, so staging a different commit kept the same identity. Open
diffs then reused the previous patch. The identity is now the commit that the
comparison's index records for that path.

* fix(server): read an uninitialized submodule's commit at stage 0 explicitly

A path such as `0:sub` made `:<path>` read as stage 0 of `sub`. Naming stage 0 keeps the rest of the argument as the full path.

* test(server): supply repository identity to fake-timer poll tests

The poll tests advance a fake clock, but their repository host and slug
lookups ran real git. Git launches now read the filesystem before
spawning, so that real work could finish after the clock had already
advanced, and the expected reads were missed intermittently.

* fix(server): name a recorded bare repository root explicitly for git

Git commands at a bare repository root used to run only while a linked
worktree pointed back to it. After the last checkout of a bare repository
was archived, that link was gone, so Restore failed with "cannot use bare
repository". A bare repository with no checkouts has the same files on disk
as a bare-repository-shaped directory, so the files cannot tell them apart.

Git now never discovers a bare repository by its directory. Worktree
creation, archive, and Restore receive their repository root from Paseo's
records, and they run inside runWithRepositoryRoot. That scope names a bare
root through GIT_DIR, for commands at that exact root only. It is read when
a command is submitted, because the git scheduler can start the process
from another async context.

* fix(server): list worktrees of a bare repository that only Paseo checkouts use

Archiving by slug or branch lists worktrees at the recorded repository root.
When that root is a bare repository with no `.git`, explicit bare-repository
handling made `git worktree list` fail there. Listing, branch-off preparation
and ref fetching now name the recorded root the same way creating and
removing worktrees already do.

* test(server): give the bare-repository restore fixture a commit identity

A bare clone does not copy the source checkout's local user.name and user.email, so the fixture commit failed on runners without a global identity.

* test(server): make bare-repository tests hold on Windows runners

The tests compared 8.3 short temp paths with the long paths that git and
async realpath report, compared git's forward-slash paths as raw strings, and
read files that the runner's core.autocrlf had converted to CRLF. Temp
directories now resolve through realpathSync.native, git paths go through
path.resolve, and the bare fixtures set their config on the bare repository,
because a bare clone does not copy the source checkout's local config.
2026-11-23 17:50:47 +07:00
paseo-bot[bot] 8fa709532c fix(claude): allow Auto mode on hosted providers (#6904)
Claude Code supports Auto mode on Bedrock and Vertex, but Paseo removed it from the catalog and rejected explicit selections before reaching Claude Code. Remove that obsolete eligibility gate while preserving the existing default modes and SDK error handling.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-23 17:01:22 +07:00
Mohamed Boudra 6e4f2ef8da fix(app): keep Android terminal input out of keyboard learning (#10586)
Passwords typed at a terminal prompt (sudo, SSH passphrases) were learned
by Gboard and offered as suggestions in other apps. The hidden terminal
input turned off suggestions and autofill, but nothing set
IME_FLAG_NO_PERSONALIZED_LEARNING, the flag keyboards read as "incognito".

React Native's TextInput has no prop for it, and its view is prebuilt, so
PaseoTerminal adds the flag when React Native applies the terminal input's
nativeID, before the input can take focus. Input type and layout are
unchanged, so typing, composition and the language switch keep working.
2026-11-23 16:04:37 +07:00
Mohamed Boudra 34abe8f08f Keep the daemon running when a plugin session closes after its plugin process dies (#10585)
* fix(server): keep the daemon alive when a plugin session closes after its process dies

PluginSessionSocket.close() sent paseo_close to the plugin child without a
callback. Node does not throw when that send fails: it emits "error" on the
ChildProcess, and the runtime has no error listener, so the failure became an
uncaught exception. The try/catch around the send never ran.

When a plugin process dies, a frame write to its session fails with EPIPE, the
websocket server's outbound transport closes the socket, and the close's own
send then crashed the daemon with "write EPIPE" (or ERR_IPC_CHANNEL_CLOSED once
Node has seen the disconnect). Passing a callback makes the failed send a
handled result.

* test(server): skip the POSIX-only plugin EPIPE test on Windows
2026-11-23 16:03:20 +07:00
Mohamed Boudra 3389138eb7 fix(hub): validate agents against the workspace catalog (#10582)
Trigger save validation used the host-wide provider catalog, so it rejected models offered by the workspace catalog. Pass the optional working directory through to provider discovery.
2026-11-23 15:11:09 +07:00
Mohamed Boudra eedb6ff675 fix(server): log MCP startup failures at warning level (#10566)
MCP startup failures previously reached only the unhandled trace log. Keep a diagnostic summary at warning level and omit raw error text from tracing because it can contain credentials and response bodies.
2026-11-23 11:40:10 +07:00
Mohamed BoudraandShalokShalom cd66d8fd18 Open sidebar host settings with one click (#10562)
* Keep the host settings action out of the host row's pressable

The gear sat in the row's trailing slot, which ComboboxItem renders inside its
own pressable, so the row was a button containing a button. HTML forbids that:
React aborts the press handling, which is why the first click on the host
picker produced a hydration error and only the second one opened anything.

ComboboxItem gains a trailingAction slot that renders beside the row's
pressable instead of inside it. The split row carries the hover and active
background, the pressable keeps the row's padding, and the action column sits
outside the click target, so the gear reaches host settings on the first click.

(cherry picked from commit ccff20dae7)

* fix(sidebar): let Enter activate the focused host gear

Combobox Enter handling was taking precedence over the focused trailing button. Leave Enter to that control so keyboard and pointer input open the same host Overview. Cover both paths through the desktop sidebar in Playwright.

* fix(sidebar): give the host gear priority over Enter shortcuts

Let the browser activate a focused host gear while the combobox keeps Enter out of the app shortcut dispatcher. Make the gear button fill its column so the highlighted edge opens settings too.

---------

Co-authored-by: ShalokShalom <shalokshalom@protonmail.ch>
2026-11-23 11:40:02 +07:00
paseo-ai[bot] a48e9edce5 fix: update lockfile signatures and Nix hash [skip ci] 2026-11-23 03:53:34 +00:00
Mohamed BoudraandOuyang Xingyuan df9886b2f1 fix(server): serve agent MCP to 2026-07-28 clients (#10558)
* fix(server): serve agent MCP over the 2026-07-28 protocol

Reasoning:
- The bundled `@modelcontextprotocol/sdk@1.29.0` only speaks up to protocol `2025-11-25`, while current MCP clients (Claude Code, Codex, Grok CLI, ACP harnesses) send `mcp-protocol-version: 2026-07-28` and get `400 Bad Request: Unsupported protocol version` on the first request after `initialize`. The agent then runs without any Paseo tool, so `list_agents`, `create_agent`, and the rest silently disappear from the tool surface (#3009).
- Widening the accepted version list (the approach in #4570 / #4375) hides the rejection but leaves the server implementing 2025 semantics while telling the client it speaks 2026-07-28.

Changes:
- Replace the v1 `StreamableHTTPServerTransport` wiring in `bootstrap.ts` with the v2 dual-era `createMcpHandler(..., { legacy: "stateless" })` plus `toNodeHandler` from `@modelcontextprotocol/node`. Modern 2026-07-28 requests and 2025-era clients are served by the same handler; per-request stateless serving is unchanged.
- Move `agent/mcp-server.ts` to `@modelcontextprotocol/server` (`McpServer`, `ServerContext`, `context.mcpReq.signal`).
- Keep `@modelcontextprotocol/sdk` for the existing client-side integrations (e.g. the OMP MCP bridge).
- Assert the JSON-RPC `-32602` rejection in `mcp-server.test.ts`: a call to an unregistered tool is a protocol error, which the v1 server folded into an `isError` result.

Verification:
- `npx tsc -p packages/server/tsconfig.server.json` clean; `npm run typecheck` clean; `oxfmt`/`oxlint` clean on the touched files.
- `npm ci --dry-run` accepts the lockfile.
- `packages/server`: `mcp-server.test.ts` 194/194, `agent-mcp.e2e.test.ts` 8/8, `mcp-parity.e2e.test.ts` 38/38.
- Manual check on macOS against a real daemon: a `dsh` agent (sends 2026-07-28) lists Paseo tools (`create_workspace`, `list_workspaces`, `create_agent`) and the daemon logs zero `MCP transport error` / `Unsupported protocol version` entries.

* test(server): cover the modern MCP envelope on the agent endpoint

Reasoning:
- Greptile flagged that the tool registration used a `registerTool` re-cast, which defeats the SDK's type check on a path every agent tool call goes through.
- The modern (2026-07-28) path had no regression coverage, so a looser "accept the version header" implementation would also pass the existing tests.

Changes:
- Narrow only the schema at the registration boundary (`inputSchema as StandardSchemaWithJSON`) and document why: Paseo declares schemas through the `zod` root entry, the SDK types them through `zod/v4` core; same runtime, distinct type identities.
- Add a modern-protocol test that drives `createMcpHandler` with a per-request envelope (`_meta` protocol version + `mcp-method` header) and asserts the catalog tools come back.

Verification:
- `npx vitest run src/server/agent/mcp-server.test.ts` 195/195.
- `npx tsc -p packages/server/tsconfig.server.json` clean; `oxfmt` / `oxlint` clean.

* test(server): expect the agent MCP handler's own rejection

The stateless MCP handler answers a body-less POST with 415 (unsupported
media type) instead of the old transport's 406. The smoke test only needs the
route to be live before the reload and gone after it, so assert that answer and
say why the code changed.

* fix(server): give native host tools the schema the agent MCP serves

The agent MCP endpoint now registers tools with @modelcontextprotocol/server,
which converts input schemas with zod at the draft 2020-12 target. The OpenCode
bridge and OMP host tools still serialized through the v1 SDK internals as
draft-07, so the plugin parity test (native schema equals advertised schema)
failed. Serialize with the same zod conversion so one schema reaches both paths,
and drop the dependency on unexported v1 SDK internals.

OpenCode reads both dialects and defaults to 2020-12. OMP rewrites draft-07 to
2020-12 before sending to a model.

* test(server): negotiate the agent MCP with pinned, auto and legacy clients

Drive a real daemon's /mcp/agents with @modelcontextprotocol/client 2.4.0:
- pinned to 2026-07-28: fails on the v1 transport ("server did not offer
  pinned protocol version 2026-07-28").
- auto: falls back to 2025-11-25 on the v1 transport. The test also asserts
  that the daemon logs no transport errors.
- legacy: the 2025-era compatibility guard.

Run the block in test:integration so CI keeps it, and translate the modern
envelope test comment to English.

* test(ci): route the agent MCP negotiation block through server integration

The block shares the existing name-filtered vitest invocation, so it adds no extra vitest start to the Windows integration job.

* test(website): play the orchestration scene on a held page clock

The scene player advances at most 64ms per animation frame, so on a CI
runner where headless WebKit paints a few frames a second the scene ran
in slow motion and missed the 20s wait for the subagents pill. The test
now pauses Playwright's page clock after hydration, checks the empty
chat, then runs the clock past the scene before asserting the roster.

---------

Co-authored-by: Ouyang Xingyuan <galaxyroaming@qq.com>
2026-11-23 10:43:23 +07:00
paseo-ai[bot] 8fa22b39eb fix: update lockfile signatures and Nix hash [skip ci] 2026-11-23 03:22:51 +00:00
Mohamed Boudra 80c44321cc Move the Markdown engine into the repository and fix two Android list layouts (#10499)
* chore(app): vendor react-native-enriched-markdown with the Paseo patch applied

Copy react-native-enriched-markdown@1.2.0-nightly-20261014-766fc0e67 (upstream
software-mansion/enriched-markdown 766fc0e67) into
packages/react-native-enriched-markdown, with
patches/react-native-enriched-markdown+1.2.0-nightly-20261014-766fc0e67.patch
applied. Nothing else changes in this commit; the package is not a workspace yet.

Reproduce:

  npm pack react-native-enriched-markdown@1.2.0-nightly-20261014-766fc0e67
  tar xzf react-native-enriched-markdown-*.tgz
  mkdir -p t/node_modules && mv package t/node_modules/react-native-enriched-markdown
  (cd t && git init -q && git apply ../patches/react-native-enriched-markdown+*.patch)
  diff -r t/node_modules/react-native-enriched-markdown packages/react-native-enriched-markdown

The diff is empty.

* chore(app): consume react-native-enriched-markdown from its workspace

Make packages/react-native-enriched-markdown a private workspace and point the
app at it, then remove the patch-package patch it replaces.

- package.json: private, version follows the root like every workspace, only the
  postinstall script that downloads tree-sitter grammars. Upstream's
  devDependencies would install a second react-native, so they are gone.
- The package keeps its name, so autolinking, the Gradle project
  :react-native-enriched-markdown, the CocoaPods spec and imports are unchanged.
- Lockfile: drop the nested registry copy under packages/app/node_modules; npm
  links node_modules/react-native-enriched-markdown to the workspace.
- Formatting, lint and knip skip the vendored code. CI routes changes to it
  through the app and browser suites.
- The codegen test checks the vendored package's generated props.
- docs/markdown-renderer.md describes the fork and how to edit it.

* fix(app): keep numbered sub-list markers off their text on Android

From #9964, moved from the package patch into the vendored package.

On Android, a numbered list nested in a bulleted item drew "1." over
the first letters of each item. A nested item's text indent summed the
root list's narrow bullet column with a fixed marginLeft, while its
marker was right-aligned to its own wider "99." column, so the number
landed on the text. iOS already indents from the item's own column.

Backport the Android hunks of upstream enriched-markdown #1015 (size
the number column to the widest marker) and #1023 (nested items start
their text from their own marker column).

test:android now also runs the backported ListRenderingTest and
TaskListInteractionTest suites. docs/markdown-renderer.md lists the
fork's backports, this one and #924, which the removed postinstall
comment used to track.

The vendored tree equals the #9964 patch applied to the pristine
package.

* fix(app): keep Android assistant replies inside their turns

From #10380, moved from the package patch into the vendored package.

On Android, an assistant reply with blockquotes nested inside a list
could overlap its "Worked for ..." footer and the next user message:
the displayed text and the layout measurement applied spans in
different orders, and the list-wide line height inflated the blockquote
spacers when it ran after them.

Use the same span order for Android Markdown measurement and display.
Apply list line height before blockquote spacers so nested quotes keep
their configured padding and the reply fits above the turn footer.

test:android now also runs ListBlockquoteMeasurementTest.

Applied on top of #9964; the two changes share only ListRenderer.kt,
where #10380's import and line-height call sit beside #9964's marker
width code. Every other file equals the #10380 patch applied to the
pristine package.

* chore(app): match the vendored Markdown web block renderer source to its build

The package patch changed lib/module/web/renderers/BlockRenderers.js (the
renderers.codeBlock override and the zoom-in cursor on images) but not
src/web/renderers/BlockRenderers.tsx. The app runs lib, so behavior does
not change. Port both changes into src so src stays the source of lib.
2026-11-23 10:15:43 +07:00
Mohamed Boudraandyz 576b9b552b Preserve conversations when directory capitalization differs (#10555)
* Use the filesystem’s capitalization in directory suggestions

* fix(server): preserve conversations across path casing changes

A case-insensitive volume can resolve the old and new record paths to the file installed by the same atomic write. Check file identity before removing the old entry so startup recovery preserves both the record and its workspace.

* fix(server): keep case-only symlink names in directory suggestions

A case-sensitive volume can store a symlink whose name differs from its target only by capitalization. Inspect the changed components before using the resolved spelling so Add Project receives the visible path.

* fix(server): preserve symlinks under case-distinct parents

A symlink can point into a parent whose name differs only in case while keeping the same basename. Inspect each changed path component before choosing the resolved spelling.

---------

Co-authored-by: yz <43207690+yzim@users.noreply.github.com>
2026-11-23 10:15:35 +07:00
paseo-bot[bot] 175d858e05 test(server): stop terminal fixtures that outlive a crashed worker (#10540)
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-23 00:22:43 +00:00
112c4b78e1 Reopen OpenCode sessions after tool definitions change (#10533)
* fix(opencode): replace stale bridge tool definitions instead of failing the bind

The shared bridge plugin keeps tool definitions in an in-memory cache
(state.mjs) that survives OpenCode's plugin reloads. When the Paseo daemon
upgrades and ships a changed tool definition (e.g. the description or input
schema changes), the next bind finds a signature mismatch and throws
"Conflicting Paseo tool definition", leaving every existing session in that
location unable to rebind. This is the upgrade path: the bridge changed, not
a second live bridge.

Treat a changed definition as a refresh, not a conflict: dispose the stale
registration and re-register the new one. Track the whole installed manifest
per location and reconcile on each bind so removed tools also disappear,
instead of letting the first per-tool difference fail the bind.

Add tests covering a definition upgrade (bind succeeds, tool reflects the
new schema) and a manifest drift (a removed tool leaves the registry).

* fix(opencode): resume sessions after bridge tool definitions change

A retired bridge can leave tool definitions cached in a shared OpenCode location. Replace a conflicting definition once the bound sessions confirm that it is unused. Preserve tools that other live sessions still use.

Co-authored-by: Peanut-HZM <34237301+Peanut-HZM@users.noreply.github.com>

* test(server): wait for the worktree manager ready marker

The marker confirms that the plugin entered the create hook. Give the hook the same deadline as the other worktree fixture handshakes, and observe the pending request if teardown closes the client.

---------

Co-authored-by: huazhongmin <peanut_hzm@163.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Peanut-HZM <34237301+Peanut-HZM@users.noreply.github.com>
2026-11-22 19:49:03 +00:00
Mohamed Boudra 8d287e5f56 chore(release): reconcile v0.17.3 (#10535) 2026-11-23 00:50:37 +07:00
Mohamed Boudra ec22b82659 Let iPhone sheets expand and collapse from their body, so every workspace tab is reachable (#10525)
* fix(app): let iOS sheet bodies expand and collapse their sheet

PaseoScrollViewComponentView defined a private helper named contentView,
which overrode RCTViewComponentView's contentView getter. Gesture-handler
reads that getter to choose the view a gesture binds to, so a bottom
sheet scroll view's native gesture bound to its content child. Its pairing
with the UIScrollView pan failed, and below the top detent the sheet
locked scrolling while body drags no longer moved the sheet: the
workspace tab picker, Usage and tool detail sheets stayed stuck at their
first height. Renaming the helper restores the inherited getter.

* test(app): cover dragging the iPhone tab switcher sheet by its list

The sheet exposes its rows to XCUITest as one element, so the flow taps
fixed points that hit a row only at the expected sheet height and asserts
which tab opens. It fails at the expansion step without the scroll view fix,
and at the final step when the collapse swipe is removed.
2026-11-22 22:32:58 +07:00
Mohamed Boudra 02e7b10648 fix(antigravity): offer each model its own thinking levels (#10524)
agy lists `thought_level` choices only for the selected model, and drops
the option entirely for Orchestrator and GPT-OSS. ACP catalog discovery
read one session/new and copied the startup model's levels onto every
model, so the composer offered and defaulted to a thinking level for
Orchestrator. Opening the draft session then set the model, found no
`thought_level`, and failed with "ACP session does not expose thinking
configuration".

The new `acpOptions.perModelThinkingOptions` makes discovery select each
model in the throwaway catalog session and record the levels the agent
lists for it, or none; Antigravity turns it on. It is opt-in because
selecting a model can reset other options in some agents. The server
also stops giving a model the catalog's default when the model brings
its own options, since that default came from another model's list.

Closes #10468
2026-11-22 22:12:11 +07:00
Mohamed Boudra 3e4f67d88f chore(release): reconcile v0.17.2 (#10513) 2026-11-22 20:22:26 +07:00
paseo-bot[bot] e886aebff3 test(server): stabilize plugin shutdown coverage (#10512)
Release the fixture connection from plugin cleanup so the parent test runner does not have to write a file before the runtime shutdown deadline.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-22 12:51:39 +00:00
paseo-bot[bot]andlikaixuan f596e3f7aa Keep slash and file pickers available after window navigation (#8954)
Keep every live floating-panel host registered under its name. When one host unmounts, the surviving workspace can still position the slash and file pickers.

Closes #8945.

Co-authored-by: likaixuan <likaixuan@mucang.cn>
2026-11-22 11:51:23 +00:00
Mohamed Boudra 884adbcc2f Archive the open workspace from the mobile workspace actions menu (#10507)
* feat(app): add Archive workspace to the mobile workspace actions menu

The compact header's actions menu had no way to archive the open workspace; it
was only reachable from the sidebar row or the keyboard shortcut. The route-keyed
archive logic behind the shortcut now lives in useActiveWorkspaceArchive so the
menu and the shortcut share one path (confirmation, undo toast, redirect).

* fix(app): redirect after archive from where you are now, not where the header was

The archive starts after the host check and confirmation. The header that began
it can be gone by then, and its last-rendered route would still match the
archived workspace, replacing the workspace you had since opened. Read the
current selection from the navigation owner when the archive starts.

* fix(app): skip the post-archive redirect when you have left workspace routes

The last-remembered workspace selection survives opening Settings, so an archive
that finished while Settings was open still redirected away from it. Read the
focused route instead, which is null on any non-workspace screen.
2026-11-22 18:25:55 +07:00
Mohamed Boudra 91247c8218 fix(app): keep turn timing inside the footer (#10510)
The Turn stats button narrows the timing column. On web, preserved spaces at soft wraps extend the timing text range past the button. Collapse wrapping spaces for the timing labels and include Turn stats in the existing hover stability check.
2026-11-22 18:01:18 +07:00
Mohamed Boudra 2d09c47672 Show provider session and turn metrics (#10496)
* feat(providers): let providers report session and turn metrics

Providers know things about a session and a turn that Paseo cannot derive:
timing, token flow, cache use, cost, the model that answered. They can now
report them as label/value rows that Paseo carries to clients unchanged, so
each provider decides which metrics make sense and how they read.

Session metrics live on the agent record and snapshot. Turn metrics are
stamped on the turn's footer row (last assistant message, else last tool
call) so they survive reload, pagination and a daemon restart, and so the
live turn_completed event and a later timeline fetch agree. Provider history
replay restores both.

Metrics are sanitized once where they enter the agent manager. The wire
schemas validate whole messages, so one malformed row from a provider would
otherwise make clients drop an entire snapshot, turn event or timeline page.

A live completed turn with no Model metric gets the agent's model, so every
provider shows model attribution before it is instrumented. Replayed turns do
not: they may have run on a different model than the agent has now.

Plugin providers publish session metrics behind a negotiated
`session.metrics` capability because an older daemon closes a connection
that sends an event type it does not know. Turn metrics ride an existing
event that older daemons strip, so they need no gate.

The wire additions are optional fields on existing schemas only.

* feat(providers): report session and turn metrics from OpenCode, OMP, Pi and Claude

Each provider now attaches metrics to turn_completed and emits
session_metrics_updated, live and when history is replayed.

- Live turns end on the adapter's clock. A provider's message timestamps
  can come from another clock.
- Tool time merges overlapping runs, so parallel tools count once.
- A total that is missing any part is hidden, so a partial total is
  never shown.
- Replayed history reports metrics only for turns that finished, which
  matches live, where failed and interrupted turns report none.
- Claude reports cost as a running total for each query(). A resumed
  query starts that total from a saved one, so a turn's cost is the
  change since the previous result of the same query. The first turn of
  a query shows no cost.
- Claude transcripts do not record result messages, so replayed Claude
  history has no turn metrics.
- Session metrics come from each provider's own cumulative counters. The
  cache hit is the last reply's or the last turn's, because a session-wide
  figure blends prompts from before and after compactions.

* feat(app): show provider session and turn metrics

Session metrics appear in the context window details, between the context summary and the
account usage cards. A provider-reported Cost row replaces the app's own session cost line.

Each completed turn with metrics gets a stats button in its footer: a hover card on web, a
press-opened tooltip on native wide screens, and a sheet on compact screens. The context window
sheet becomes a shared DetailsSheet so both use the same content-sized sheet.

Metrics ride on the row that hosts the turn's footer (the turn's last assistant message, else its
last tool call), the same row the daemon stamps. Live turn_completed events and timeline pages
both stamp that row, so a refetch agrees with what the live event showed.

The daemon updates session metrics without bumping updatedAt, like usage, so a stale buffered
upsert may still carry the newest metrics and is accepted for that field.

* fix(app): keep a turn's stats after the cached timeline reloads

The local timeline cache dropped turnMetrics when it saved a turn's footer row. After a page
reload the cached rows painted without the stats icon, and the catch-up fetch had no new
entries to stamp them from.

* fix(providers): keep imported session stats and never count a steered turn short

Importing a Pi, Oh My Pi or OpenCode v2 session dropped the stats the provider returned with its
history, so imported chats showed none until a forced replay. Import now carries them the way
replay does.

Replaying a Pi or Oh My Pi transcript read a prompt that steered a running turn as the start of a
new turn, so the steered turn's stats counted only the steps after the steer. A turn that follows
one ending on tools now reports no total, because the transcript reads the same as a stop and a
new prompt.

* fix(providers): keep stats through merged messages and plugin imports, start Pi first-token timing at the request

A message the timeline merges from several chunks keeps the stats stamped on its last chunk. Plugin session imports carry the stats the plugin replayed, through the same history reader the other providers use. Steers queued together after an unclear turn stay unclear instead of attributing the final reply to the wrong turn. Pi measures time to first token from the request, not the first reply header.

* fix(providers): carry a turn's stats onto the message the timeline merges from text chunks

The previous change put the carry-over in the reasoning merge. The assistant message merge dropped the stats of its last chunk, so an imported reply of two text blocks lost its Turn stats button.

* fix(providers): carry a turn's stats onto the tool card the timeline merges from updates

An imported turn that ends on a tool call stamps the stats on the tool's last update. The tool merge kept the first update's fields, so the stats were lost.

* fix(opencode): replay no session stats for a session that has none

An empty OpenCode session replayed a session stats event with no metrics, which broke the empty-history check in the versioned runtime test.
2026-11-22 16:43:56 +07:00
Mohamed Boudra 52377f595a Enable sidebar usage summary by default and move source toggles to a dedicated Sources list (#10491)
* feat(usage): enable sidebar usage summary by default and add dedicated Sources list

Show the sidebar Usage summary by default instead of requiring opt-in in
Appearance settings, while honoring explicit off preferences and continuing
to hide the row when no enabled source has pinned windows.

Let usage sources declare optional provider hints (`providers` on the
registration and `provider` on discovered accounts) so the daemon can mark
reports `defaultEnabled: false` when their hinted providers are neither
enabled nor installed, keeping usage sources decoupled from agent providers
while avoiding clutter from leftover credentials.

Move per-source show/hide controls out of individual card headers into a
dedicated `Sources` submenu inside Usage Settings (with tri-state
`cardVisibility` preferences migrating legacy `cardsOff`) so disabled
sources stay out of the main card list.

* fix(usage): resolve provider hints per report, refresh on forceRefresh, and clarify inactive copy

Resolve each usage report's provider activity hint in parallel with its
fetch and enforce a real timeout deadline in `isProviderActiveForUsage` so
a slow provider probe never holds back unrelated reports or hangs past the
deadline on non-abortable plugin RPCs.

Give the availability hint a 5-minute freshness TTL and re-probe when
`forceRefresh` is requested, retaining the fresher probe result across
subsequent normal reads until a newer snapshot or TTL expiry supersedes it.

Rename the default-off Sources sublabel from "Provider not installed" to
"Provider inactive" across all locales so it accurately covers both
disabled and unavailable providers.

* fix(usage): share provider availability reading across snapshot publishes and usage probes

Record both `ready` and `unavailable` global snapshot publications into
`usageActivityCache` so `isProviderActiveForUsage` reads one timestamped
availability cache instead of relying on `fetchedAt` (which unavailable
snapshot entries do not carry).

* fix(app): add MenuCheckboxItem so Usage Sources toggles expose checked state to screen readers

Introduce `MenuCheckboxItem` / `DropdownMenuCheckboxItem` backed by
`accessibilityRole="checkbox"` so toggleable menu rows expose their checked
state in Chromium's accessibility tree and native screen readers while
leaving existing `MenuItem` roles unchanged.

* fix(app): keep compact menu sheet rows in Tab order and activate on Space

Use `tabIndex={0}` for `MenuRow` in `sheet` presentation (leaving
popover roving arrow-key navigation at `tabIndex={-1}`) and handle Space
in web sheet rows since React Native Web only activates Space for
`role="button"`, not `menuitem` or `checkbox`.

* test(usage): include provider hint in claude-usage-source keychain and stores assertions
2026-11-22 16:43:11 +07:00
Mohamed Boudra 9cb521dda2 perf(ci): speed up server tests, Playwright shards, desktop/website E2E, and apt cache (#10504)
* perf(ci): cut PR CI wall-clock time across server tests, Playwright shards, and workflow setup

* fix(ci): guard empty apt cache copy, use 100% Vitest workers in CI, revert Playwright to 2 workers with built supervisor
2026-11-22 16:42:52 +07:00
Mohamed Boudra 234ddf8dd7 Simplify setup across supported provider docs (#10502)
* docs(providers): simplify setup across supported provider pages

Lead each supported provider page with the official CLI/protocol Paseo uses and the simplest default setup path, removing config.json snippets from Getting started on Antigravity and Oh My Pi. Fixes the outdated Settings path on Codex and keeps all Chinese translations in sync.

* docs(providers): address review feedback on Antigravity, Codex, Muse, and Pi
2026-11-22 15:22:12 +07:00
Mohamed Boudra 3914893aa1 Troubleshoot providers from their settings page, and tidy provider settings (#10487)
* feat(providers): add docs links, sign-in facts and a tidier provider page

A user whose Antigravity models looked stale had no way to find out why
without asking in chat. agy 1.5.14 picks its sign-in from the
environment: with SSH_CONNECTION, SSH_CLIENT or SSH_TTY set it reads a
token file, otherwise the OS keyring
(google-antigravity/antigravity-cli#1336). The daemon is often started
outside SSH while the user tests agy over SSH, so the two can be signed
in to different accounts and list different models.

- The Antigravity status reports whether agy runs in an SSH session, and
  the diagnostic report for plugin providers now includes the resolved
  command, path and version like built-in providers do.
- Providers carry an optional docsUrl (protocol field, plugin SDK
  registration, built-in definitions). The provider page links it from
  Troubleshooting, and the Antigravity page documents the sign-in
  mismatch.
- Provider and project settings get a breadcrumb title. Refresh moves to
  the Models header, the model list scrolls inside a fixed height with a
  full-width search, and section headers keep one spacing whether or not
  they hold an action.
- A switch no longer makes its row taller than the track, and every
  settings row is at least as tall as one with a switch, so a switch row
  and a text row line up.

* fix(providers): report Antigravity's sign-in when ACP does not start

A sign-in problem can be what stops agy's ACP server from starting, so
the diagnostic report now shows the SSH session rows in that case too.

The plugin provider diagnostic test no longer compares the daemon PATH
and shell rows, which differ per host (Windows reports ComSpec).

* fix(server): show the same provider version in the report and Installation

The plugin diagnostic read the version by calling the provider's
inspect itself with a 10s deadline, while the Installation row reads it
through the installation service with a 20s deadline and a cache. A
version check between 10 and 20 seconds showed in Installation and as
an error in the report.

The snapshot manager now hands getDiagnostic an inspectInstallation
that reads through the installation service, so both show one answer
and agy --version runs once for both.

* feat(app): give rows that open something the same height as other rows

Detail rows and collapsible row headers reserved a button's height so a
list where only some rows held a switch kept one height. Now that every
settings row is at least as tall as a switch row, that reserve only made
rows like Diagnostic report and Docs taller than their neighbours.

* test(app): compare rows that open something with text and switch rows

* feat(app): size the provider icon to the page title

* fix(app): scale the provider title icon with the interface size
2026-11-22 15:13:31 +07:00
Mohamed BoudraandClaude ede181d39a Refresh enabled provider catalogues in the background every 30 minutes (#10481)
* Refresh enabled provider catalogues in the background every 30 minutes

A long-running daemon cached discovered models until a manual Refresh or a
restart, so a server-side model rollout stayed invisible. The daemon now
refreshes each enabled provider about every 30 minutes, one provider per
staggered slot. A recent refresh pushes the next one back. Background
refreshes join discovery already in flight, publish only changed
catalogues, and keep a ready catalogue when a probe fails.

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

* Keep background refresh slots independent and its probes soft

Ticks no longer wait for a refresh to settle, so one slow provider cannot
delay the others. A provider with a background refresh still running is
skipped. The due check uses a fixed one-second timer slack instead of half
a slot, so a manual refresh always pushes the next probe a full interval.
Background probes pass force: false so OpenCode keeps its shared server.
A result that is not ready keeps a ready catalogue, which covers plugin
status probes that report a failed startup as unavailable.

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

* Keep a ready catalogue when a background refresh returns a partial one

Claude falls back to its curated list without discovery-gated models when
model discovery fails or times out. That result is ready, so a background
refresh published it and Mythos left the picker. Providers now mark such a
catalogue incomplete, and a background refresh keeps the ready catalogue it
would have replaced. A manual refresh still publishes it.

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

* Kill OpenCode servers whose startup is pending at shutdown

A probe still allocating its port when the daemon stopped spawned its
OpenCode server after shutdown returned, and the process outlived the
daemon. Background refresh makes that overlap likelier. Shutdown now waits
for pending startups and kills the generations they produce.

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

* Stop running probes before provider shutdown

A probe checking availability when the daemon stopped could still go on to
discovery and start an OpenCode server after provider cleanup returned.
The manager now aborts every running probe through its refresh signal when
it stops, and shutdown waits up to ten seconds for them to settle before it
shuts down provider clients.

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

* Refuse OpenCode spawns from operations begun before shutdown

A rotation accepted before shutdown waited for the old server to stop and
then started a replacement after cleanup returned. The server manager now
counts shutdowns; every operation that can start a server records the
epoch it began in, and the spawn step refuses once a shutdown has passed.
Operations begun after shutdown still start, since the manager is a
process-wide singleton.

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

* Keep manual refresh precedence over concurrent background refreshes

* Avoid eager provider snapshot downloads for unobserved directories

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-22 14:50:02 +07:00
Mohamed Boudra c28aa2570c docs(website): refresh sponsor page visitor and Discord member counts (#10498)
Homepage and docs visitors use the site-wide Plausible figure for the 30 complete days to 2026-11-21 (107,693), rounded down to 100,000. Discord members come from the live guild count (2,678). The README figure is unchanged because GitHub only exposes 14 days of traffic.
2026-11-22 14:29:02 +07:00
Mohamed Boudra 08ad7c7271 Let agents steer or interrupt another agent's running turn, and tell them how their message was delivered (#10483)
* feat(server): let agents queue, steer, or interrupt messages to other agents

An agent sender's `steer` used to mean "wait for the turn to end", unlike a
person's steer. Agents now get the same three choices a person has, plus a
named default: `queue` waits for the turn end, `steer` joins the running turn
(interrupting when the provider cannot steer), and `interrupt` replaces it.
A steer or interrupt carries the messages queued ahead of it, so delivery
order still equals admission order.

The receipt returns the applied behavior and guidance built from whether the
recipient is running and whether its provider can steer. A queued message's
guidance tells the sender to follow up with a short steer or interrupt
instead of resending, because a resent message is read twice.

Older clients send `steer` for every default agent send, so the daemon maps
their agent `steer` to `queue` when the client lacks the
`agent_active_turn_behaviors` capability. New clients talking to an older
daemon refuse `steer` rather than silently queueing it.

* fix(server): keep a steer's carried messages when the turn ends first

A steer that reached the provider after the turn ended made the manager
throw a plain error, and delivery failed the whole batch, including the
queued messages the steer carried. The manager now throws
AgentTurnChangedError, and delivery sends the batch again, into the next
turn or as a new one.

Also report the applied activeTurnBehavior in `paseo send --no-wait`
output, and expect the new hello capability in the client test.

* docs(skills): warn that an unread steer loses the messages it carried

* docs(skills): shorten the send_agent_prompt guidance

Keep what a sender acts on: leave activeTurnBehavior out, the three
values, read the guidance, follow up instead of resending, and the
steer loss case. Drop delivery facts the sender cannot act on.

* fix(server): stop the send_agent_prompt description promising an unread steer survives
2026-11-22 14:01:15 +07:00
Mohamed Boudra b2ecec8719 fix(opencode): stop adding a "This chat uses OpenCode v2" row to chats (#10490)
The notice flagged chats moved to the then-new v2 runtime. v2 has been
stable, so the row is noise. Previously saved openCodeRuntimeNotices
metadata is left in place and no longer read.
2026-11-22 13:44:56 +07:00
paseo-bot[bot] fa37fd20ca Make the recursive watcher inventory test deterministic (#10462)
* test(server): make recursive watcher inventory test deterministic

Deliver the file creation notification explicitly so the inventory check does not depend on the native watcher becoming ready. Hold scheduled scans until the test checks the inventory and require reconciliation to report the deletion.

* test(server): wait for the watcher callback without advancing audits

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-22 06:07:40 +00:00
ff5a83bc5a Keep stale slash menu choices from archiving agents (#10484)
* fix(app): ignore slash menu picks made before the menu filters

On web the cursor reaches the autocomplete after paint. A Tab or Enter
pressed right after typing could pick from the unfiltered list, where
/exit is the default highlight, and archive the agent. Skip the pick when
the typed command no longer matches the query the menu was built for.

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

* fix(app): limit the stale slash menu guard to key presses

Clicks also pass the live input snapshot, so the guard could drop a
click on a visible option while the cursor update was still pending.
A click picks what the user sees. Check for a stale menu only when Tab
or Enter selects.

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

---------

Co-authored-by: 3ae3ae <ogyshjsm@naver.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Bae Seongmin <83870598+3ae3ae@users.noreply.github.com>
2026-11-22 05:50:48 +00:00
Mohamed Boudra 9cb0625cf5 Start an edited New workspace after a failed creation, and unify composer errors (#10482)
* fix(app): allow edited New workspace retries and unify composer errors

New workspace and the workspace setup dialog reused the mount's raw draft
or creation ID as the workspace.create idempotencyKey. When workspace
provisioning failed before readiness, the daemon kept that key's request
fingerprint on disk, so editing isolation, project, branch, prompt, or
model on the same screen failed with workspace_request_key_conflict.

Deriving the workspace idempotencyKey with draftCreationKey(id, request)
matches #9534 for agent drafts: unchanged retries (double-click,
reconnect, or resending as-is) keep one key, while edited retries start a
new workspace creation without requiring daemon or protocol changes.

Also move composer submission errors into one <Alert variant="error"
size="sm" /> slot owned by <Composer> (directly above the input, and in
ComposerFullscreenFooter when fullscreen) so New workspace, Workspace
draft tab, Workspace setup dialog, and active chat share the composer's
outer and inner rails without duplicate error toasts.

* fix(app): include launch target in creation key and toast background failures

Include launchTarget when deriving the New workspace creation key so
switching between blank Chat and a promptless terminal profile after a
pre-ready failure starts a fresh creation instead of replaying the failed
receipt.

Also show toast.error when workspace creation fails after the user has
left New workspace or closed WorkspaceSetupDialog, while keeping the
single composer alert with no duplicate toast when the form is still
visible.

* fix(app): avoid duplicate toast when handed-off agent startup fails

Once New workspace hands a ready workspace to its draft tab, the draft
tab awaits agentCreation.result and displays startup errors in its own
composer alert. Returning early after handoff prevents New workspace's
catch handler from firing a duplicate app-wide toast.
2026-11-22 12:28:10 +07:00
Mohamed Boudra 03adc4d4ba Keep working host connections from flapping on busy heartbeats and back off background probes (#10395)
* fix(app): stop busy-heartbeat adaptive switches and back off online probes

Hosts with multiple saved connections still replaced healthy relay links
during active use: every 120 seconds the runtime compared an idle alternate
probe against the single latest heartbeat RTT on the busy active socket
using a fixed 40 ms threshold, then tore down the live socket before
connecting the replacement (leaving the host in connecting for ~2 s).

Use the 60-second rolling minimum of active heartbeats as the baseline,
require at least max(40 ms, 35% of baseline RTT) improvement to switch,
exponentially back off inactive online probes from 2m to 30m while the
active connection keeps winning (resetting on candidate win, reconnect,
connection list changes, or foreground verify), and connect the replacement
before disposing the live client on adaptive switches.

Closes #9149

* fix(app): preserve active listener, recheck candidate, and refresh caches on make-before-break upgrade

Keep installed active-client status listeners bound to `this.activeClient`
rather than `switchRequestVersion` so a pending or failed speculative
upgrade never mutes disconnect events on the active socket. Recheck that
the target connection still exists and matches before and after disposing
the old client so removing or editing an endpoint during handshake aborts
the upgrade. Track the last online `connectionEpoch` in `HostRuntimeStore`
so make-before-break upgrades that stay `online` still trigger reconnect
cache invalidation and history sync generation bumps.
2026-11-22 11:27:27 +07:00
Mohamed Boudra 4b429c0030 Prevent zombie processes after plugin startup and reload (#10470)
* fix(server): prevent zombie children after plugin builds

Retiring a compiler thread closed its libuv loop while esbuild still owned a native child. Run the compiler in a subprocess so the daemon can reap it when the idle compiler disconnects.

* test(ci): check plugin compiler reaping on macOS
2026-11-22 11:11:59 +07:00
Mohamed Boudra 20f217b8cb fix(acp): finish Antigravity turns after recurring schedules (#10469)
Antigravity returns end_turn while a recurring schedule stays in progress. Exclude cron registration from the provider's deferred-turn blockers so waiting for a tool completion cannot strand the foreground turn.
2026-11-22 11:11:55 +07:00
Mohamed Boudra 984e2ea5e7 Lead the 0.17.1 changelog with Antigravity and keep instructions out of release notes (#10466)
* docs(changelog): lead 0.17.1 with Antigravity and cut instructions from the entry

The 0.17.1 entry ranked Antigravity seventh and carried setup steps, click
paths, migration notes, and edge-case qualifiers. Each highlight is now one
sentence that announces the change, and Antigravity leads. Two details that
left their highlight keep their own bullet: plugin worktree management moves
to Plugins and green quota bars move to Changed.

docs/release.md allowed highlights up to three sentences and exempted them
from the conciseness rules, which is how the instructions got in. The rules
now cover highlights too, permit a second sentence only for a breaking
requirement, and put the headline change first whatever its ordering group.

* docs(changelog): keep shortened 0.17.1 bullets within what shipped

Three bullets lost a clause that limited their claim: provider updates exist
only for CLIs with an update command, the scroll fix leaves out HTML previews
on iOS, and Git status reloads when files changed during the disconnect. Each
bullet now names what it covers instead of carrying an exception clause, and
the release guide says to shorten that way.

The Antigravity requirement links the setup page, which has the `acp`
argument a custom command needs.

* docs(changelog): scope the agent message and quota forecast highlights

An explicit interrupt from another agent still replaces the running turn, and
Usage shows a run-out time only for a quota on pace to run out before it
resets. Both highlights now say so in one sentence, and the release guide uses
the agent message highlight as its example of keeping that distinction.

Rewind in Command Center applies to the latest turn, so the bullet names it
again.

* docs(antigravity): explain the Hub model error after the CLI upgrade

The 0.17.1 highlight used to carry this recovery step. The highlight now links
the setup page, so the step lives there in both languages.
2026-11-22 10:14:31 +07:00
paseo-ai[bot] 133b078ac4 fix: update lockfile signatures and Nix hash [skip ci] 2026-11-21 22:46:04 +00:00
Mohamed Boudra 6ea095cb49 chore(release): reconcile v0.17.1 (#10457) 2026-11-22 05:36:59 +07:00
Mohamed Boudra bf83a03ce9 fix(timeline): acknowledge replayed prompts with client IDs 2026-11-18 15:21:47 +01:00
Mohamed Boudra 80240eb851 test(timeline): reload a whole turn after restoring retired children 2026-11-18 15:00:49 +01:00
Mohamed Boudra 0c11263d4d fix(timeline): sync provider history at whole turn boundaries 2026-11-18 14:45:23 +01:00
Mohamed Boudra 28c9806da8 fix(timeline): exclude session status from history comparison 2026-11-18 14:11:13 +01:00
Mohamed Boudra a0add767c0 fix(timeline): reconcile live reconnect notices after updating from main 2026-11-18 13:51:34 +01:00
Mohamed Boudra 25f637e57c Merge remote-tracking branch 'origin/main' into plan-provider-switch-sqlite-timelines
# Conflicts:
#	packages/server/src/server/agent/agent-manager.test.ts
#	packages/server/src/server/agent/agent-manager.ts
#	packages/server/src/server/agent/providers/codex-app-server-agent.ts
#	packages/server/src/server/agent/tools/paseo-tools.ts
2026-11-18 13:35:20 +01:00
Mohamed Boudra 53fa9524cf fix(app): keep rewind invalidation for find results after Next and Previous
The rewind marker of the result set was cleared in cancel(), which also
stops navigation work. Next and Previous call cancel() while keeping the
results, so after one step a remote rewind no longer invalidated them and
the selection could stay on a retired message. The marker now shares the
result set's lifetime and is cleared only when a new query discards it.
2026-11-11 08:51:28 +01:00
Mohamed Boudra 5a8383d237 fix(app): end chat find results when a rewind retires messages
Find validated its results against the timeline epoch only. Capable hosts
rewind in place, so the epoch stays the same and a remote rewind left the
count and selection pointing at retired messages; Next could reveal one.

The replica now records the latest rewind seq per agent, from live rewind
events and from fetched pages carrying retirements. Find treats epoch plus
that seq as the history identity, so a rewind during or after a search
reports the history as changed.
2026-11-11 08:41:00 +01:00
Mohamed Boudra cf3caefa14 fix(server): retire the turns a steered Codex rewind actually removed
Codex rewinds whole native turns. A steered prompt shares its turn with the prompt it joined, so forking before that turn also removes the earlier prompt, and a rollback counted per prompt can remove earlier turns. The session reported at_target, so Paseo kept prompts the provider no longer had. It now reports the cut from the turn index taken before the fork, and an unreported outcome when the fork switched threads but did not finish.
2026-11-11 08:36:58 +01:00
Mohamed Boudra c747a58871 test(app): expect a rewound first prompt to leave the chat in the rewind sheet spec
On main the mock provider's rewind kept the first user message whatever the target, and the chat was rebuilt from that history, so the spec expected the rewound first prompt to stay. The mock now rewinds at the target and the chat retires the rewound turns in place, so rewinding the first prompt empties the chat and returns the prompt to the composer.
2026-11-11 08:26:19 +01:00
Mohamed Boudra c36d398829 perf(server): read the subscription freshness head without fetching the transcript
The freshness check read the head by fetching every row of the agent's history on each subscribe. The timeline head now carries its last committed sequence number, so the check reads only the head.
2026-11-11 04:00:27 +01:00
Mohamed Boudra 183bc736ec test(server): await provider child reads in the replay and pi child tests
These tests came in with the main merge. The child store reads are asynchronous now, so the tests compared a promise with the expected child.
2026-11-11 04:00:11 +01:00
Mohamed Boudra c4ce21a237 test(client): expect the rewind capability in the client hello
The client advertises timeline_rewind_operations since the rewind operations landed, but the hello expectation was never updated.
2026-11-11 03:59:55 +01:00
Mohamed Boudra 9a2236dac3 test(server): give the test session the interface's persistence signature
TestAgentSession.describePersistence had no return type, so TypeScript
inferred a codex-only handle with a UUID session id. The restarted-child test
from 80879eaf7 assigns the resumed AgentPersistenceHandle to it and failed to
typecheck (TS2322). The test double now declares the AgentSession signature,
which also clears the older plugin-provider sites with the same error.
2026-11-10 13:54:12 +01:00
Mohamed Boudra ecd0dd083e fix(server): let an aborted wait end while the provider is starting the turn
10c443a32 made waitForAgentEvent wait for a starting run before reading its
state, but that wait came before the abort listener. A provider start has no
deadline of its own, so a stalled startTurn kept every timed wait (MCP wait,
CLI wait, schedules, finish subscriptions) past its timeout. The start wait
now rejects as soon as the caller's signal aborts.
2026-11-10 13:53:50 +01:00
Mohamed Boudra 10c443a32b fix(server): wait for a starting run to settle before steering or waiting on it
A run's start now awaits the timeline before the provider is called, and a
failed start awaits its timeline writes before the run is cleared. Two
readers raced those windows:

- waitForForegroundStart returned as soon as a start failed, while the failed
  run was still tracked, so a steer send in that window replaced it and
  interrupted the session instead of starting its own turn.
- waitForAgentEvent replayed the idle state from before a starting run and
  finished immediately, so `wait` after a dispatch could return before the
  turn ran.

waitForForegroundStart now resolves only once the turn started or the run is
cleared, as documented, and waitForAgentEvent waits for it before reading the
agent's state. The OMP restored-history test previously finished only through
that early return; its fake now starts the turn it later ends.
2026-11-10 13:47:49 +01:00
Mohamed Boudra 457d8d6ec5 Merge origin/main into plan-provider-switch-sqlite-timelines
Adapts main's changes to the single asynchronous timeline owner:

- The subscribe freshness check (#9175) awaits the loaded timeline head and
  compares the client's cursor against the epoch that client sees, so legacy
  clients compare against their derived epoch after a rewind.
- History reads (#8737) pass purpose "history" when an agent with no stored
  timeline must be loaded; stored history is still read without the provider.
- Background work clears on reload, close and parent delete next to the
  async provider-child cancellation.
- Claude steered-message rewinds (#8372) report an at-target cut. Codex keeps
  main's saved thread id alongside the reported cut.
- Plugin rewinds (#8368) return an unreported outcome; a failed replay after
  the native revert leaves the rewind for the reload to settle rather than a
  retry. Manager-level rewinds target the timeline row's message id.
- Main's tests read the timeline asynchronously, and wait for the provider to
  receive a prompt instead of assuming it arrives in the dispatch tick.
2026-11-10 13:47:17 +01:00
Mohamed Boudra 80879eaf7c fix(timeline): retain child state and recover rewinds on resume
Provider children now live in the parent's timeline next to its history,
so their descriptors, rows and retirements survive close, archive and a
manager rebuilt over the same backend, and deleting the agent removes
them all. Resuming settles a rewind that was still open when the runtime
stopped instead of leaving its rows half-retired.

A stored child's status is only the last report, possibly from provider
history or an earlier runtime. Workspace activity and idle cleanup now
read the children the current runtime reported running, and closing a
runtime cancels only those, so a child stored as running from an earlier
runtime no longer keeps the agent busy or blocks cleanup.
2026-11-10 13:09:38 +01:00
Mohamed Boudra dc85c2bfbc feat(timeline): preserve history across reload and archive
Reload agent used to delete the timeline and replay the provider's
history under a new epoch. That brought back turns the user had rewound
and dropped anything the provider no longer had. Archive deleted the
timeline too.

Paseo's timeline is now the owner of the conversation. Reload agent
keeps it and reconciles the provider's history append-only: turns are
aligned by provider prompt id and compared exactly (prompt text,
assistant and reasoning text, tool calls). When the owned conversation
is a whole-segment prefix of the provider's, the rows after it are
appended as new live rows. Any other difference changes nothing and
agent_refreshed reports historyDiverged, which the app shows as a
warning on Reload agent and Unarchive.

Divergence is deliberately conservative:
- An answer or tool call Paseo saw only partly can never be completed by
  a reload. History rows carry no turn id to update a live row in place.
- A prompt sent with attachments diverges on every reload. Providers
  store the rendered attachment text, and the owned row keeps only the
  typed text. Recording the sent prompt is left to provider handoff work.

Archive now only closes the runtime. Stored history, including provider
children, is read without resuming or even requiring the provider.
Forced provider replacement is removed.

Tradeoff: an archived chat's history stays in memory until the daemon
exits, measured at about 1.1-1.2x its JSON size (about 0.5 MB for a
typical session, about 16 MB for a heavy tool session). Moving
retained history to disk belongs to the persisted backend, not eviction,
which would drop the rewinds this change keeps.
2026-11-10 11:43:10 +01:00
Mohamed Boudra 5ed1f8d108 feat(timeline): apply conversation rewinds without replacing history
Rewinding a prompt used to rotate the timeline epoch, so every open
client refetched and remounted the whole chat. A rewind is now a
retirement: the daemon keeps the rewound turn stored but outside the
conversation, and capable clients remove the rows that started in
[retireFromSeq, seq) in place. Catch-up pages carry the retirements in
their span. Clients without the timeline_rewind_operations capability
get the old replacement shape.

The daemon retires only what the provider actually removed. Providers
report the boundary they kept. A failure known to change nothing keeps
the conversation. Any other failure leaves the rewind open and refuses
prompts until reloading the agent proves the outcome from the
provider's replayed prompts. A recorded cut whose save failed is
committed by the next prompt or the reload, which resumes the rewound
session.

Plugin providers complete session.revert without saying what they
removed. Paseo then reloads the session itself and judges the outcome
from the replay, so a no-op completion is not taken as a cut.

The app anchors each row at the seq it started at, because a late
update moves a row's latest seq into the rewound range. The app also
refuses pages served before the newest retirement it has seen, then
refetches them.

Known limits:
- The automatic plugin settle shows the agent as restoring briefly.
- An empty or mismatched plugin replay leaves the rewind unresolved.
  Fork the chat to recover.
- A plugin's failed revert still needs a manual reload.
- An open rewind lives in memory, so a daemon restart drops it.
2026-11-10 10:16:13 +01:00
Mohamed Boudra 4178497d3d refactor(server): give agent timeline history a single awaitable owner
Agent timeline history had several writers that appended and published
independently, so a persistent backend could not be swapped in without
reordering or losing items. AgentTimeline now owns each agent's history:
one FIFO queue per agent (child agents share the parent's queue) commits
each item and then publishes it, so subscribers never see an item before it
is recorded. Backends may be async, which prepares the SQLite swap.

Terminal turn events wait for queued writes so a finished turn never races
its own last chunks. A subscriber that throws after commit leaves the item
in history. A failed commit surfaces as an agent error ("Conversation
history could not be saved") via the existing lastError/attention path; it
survives the turn's terminal transition and clears on the next run.
2026-11-10 08:11:00 +01:00
1683 changed files with 180541 additions and 15451 deletions
+3
View File
@@ -50,11 +50,13 @@ desktop:
app:
- "packages/app/**"
- "packages/expo-two-way-audio/**"
- "packages/react-native-enriched-markdown/**"
sdk:
- "packages/plugin/**"
- "plugin-examples/**"
- "public-docs/plugins/**"
- "skills/paseo-plugin/**"
- "packages/client/**"
- "packages/highlight/**"
- "packages/protocol/**"
@@ -80,6 +82,7 @@ browser:
- "packages/app/index.ts"
- "packages/app/*config.{cjs,js,ts}"
- "packages/app/package.json"
- "packages/react-native-enriched-markdown/**"
relay:
- "packages/relay/**"
+47 -13
View File
@@ -20,6 +20,8 @@ env:
# CI does not use the CUDA execution provider, and the onnxruntime-node
# postinstall download from NuGet is large enough to make npm ci flaky.
ONNXRUNTIME_NODE_INSTALL: skip
NPM_CONFIG_AUDIT: "false"
NPM_CONFIG_FUND: "false"
jobs:
changes:
@@ -85,10 +87,6 @@ jobs:
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.quality != 'false') }}
run: npx --yes lockfile-lint --path package-lock.json --type npm --allowed-hosts npm --validate-https --validate-integrity
- name: Verify dependency signatures
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.quality != 'false') }}
run: npm audit signatures
- name: Lint
if: ${{ !cancelled() && steps.install.outcome == 'success' && (needs.changes.outputs.full != 'false' || needs.changes.outputs.quality != 'false') }}
run: npm run lint
@@ -165,8 +163,29 @@ jobs:
- name: Run website tests
run: npx vitest run packages/website/src --bail=1
# WebKit needs about 180 system packages (125 MB) from the Ubuntu mirror. The mirror
# sometimes serves them at under 100 kB/s, which turns a 1-minute step into 25 minutes.
# Keep the downloaded .deb files in the Actions cache so apt installs them without the mirror.
- name: Restore website browser system packages
uses: actions/cache@v4
with:
path: ~/website-browser-debs
key: website-browser-debs-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: website-browser-debs-${{ runner.os }}-
- name: Install website test browsers
run: npx playwright install --with-deps chromium webkit
run: |
mkdir -p ~/website-browser-debs
shopt -s nullglob
cached_debs=(~/website-browser-debs/*.deb)
if (( ${#cached_debs[@]} > 0 )); then
sudo cp "${cached_debs[@]}" /var/cache/apt/archives/
fi
npx playwright install --with-deps chromium webkit
archive_debs=(/var/cache/apt/archives/*.deb)
if (( ${#archive_debs[@]} > 0 )); then
cp "${archive_debs[@]}" ~/website-browser-debs/
fi
- name: Verify website mockups
run: npm run test:e2e --workspace=@getpaseo/website
@@ -276,10 +295,7 @@ jobs:
run: npm run test:integration --workspace=@getpaseo/server
env: *server_test_env
# native-recursive.ts serves darwin and win32, but windows-latest above is the only
# runner that exercises it. macOS — the platform the reported watcher bug was on —
# otherwise has no server-test coverage. Scoped to the observer/watcher suites to
# bound runtime.
# Keep this job scoped to regressions reported on macOS.
server-tests-macos:
name: server-tests (macos-latest, file observation)
needs: changes
@@ -307,6 +323,24 @@ jobs:
src/server/workspace-git-service.observation.integration.test.ts \
--bail=1
- name: Verify path casing on macOS
run: |
npm run test:unit --workspace=@getpaseo/server -- \
src/server/agent/agent-storage.test.ts \
src/utils/directory-suggestions.test.ts \
--bail=1
- name: Verify plugin compiler children are reaped
run: |
npm run test:unit --workspace=@getpaseo/server -- \
src/server/plugins/index.posix.test.ts \
-t "reaps compiler children" --bail=1
- name: Verify plugin session sockets survive a dead plugin child
run: |
npm run test:unit --workspace=@getpaseo/server -- \
src/server/plugins/session-socket.posix.test.ts --bail=1
desktop-tests-ubuntu:
name: desktop-tests (ubuntu-latest)
needs: changes
@@ -460,9 +494,9 @@ jobs:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
E2E_WORKERS: "2"
# File groups are weighted by observed reporter durations.
# Share of the test list per shard, rebalanced from the Playwright step
# minutes of five eight-shard runs so the slowest and fastest shards meet.
PWTEST_SHARD_WEIGHTS: "85:94:117:128:91:103:127:85"
# Share of the test list per shard, rebalanced from main and PR eight-shard
# durations so the slowest and fastest shards meet.
PWTEST_SHARD_WEIGHTS: "90:114:100:104:108:112:112:90"
- name: Upload test artifacts
uses: actions/upload-artifact@v4
@@ -576,7 +610,7 @@ jobs:
# Source tests do not read PASEO_CLI_TEST_SHARD. Run them once, on the
# shortest E2E shard, after its runner has built the server stack.
- name: Run CLI source tests
if: ${{ env.PASEO_CLI_TEST_SHARD == '3' }}
if: ${{ env.PASEO_CLI_TEST_SHARD == '2' }}
run: npm run test:unit --workspace=@getpaseo/cli
# The dependency watchers write build outputs, so run them after the parallel CLI tests.
+6 -1
View File
@@ -11,5 +11,10 @@
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"ignorePatterns": ["*.lock", "**/*.gen.ts", "**/*.gen.tsx"]
"ignorePatterns": [
"*.lock",
"**/*.gen.ts",
"**/*.gen.tsx",
"packages/react-native-enriched-markdown/**"
]
}
+1 -4
View File
@@ -3,7 +3,7 @@
"options": {
"typeAware": false
},
"ignorePatterns": [".dev/**"],
"ignorePatterns": [".dev/**", "packages/react-native-enriched-markdown/**"],
"plugins": ["react", "react-perf", "unicorn", "typescript", "oxc", "import", "promise"],
"jsPlugins": ["./scripts/oxlint/paseo-plugin.mjs"],
"categories": {
@@ -422,7 +422,6 @@
"packages/app/src/components/headers/back-header.tsx",
"packages/app/src/components/headers/screen-header.tsx",
"packages/app/src/components/host-status-dot.tsx",
"packages/app/src/components/hosts/host-picker.tsx",
"packages/app/src/components/icons/paseo-logo.tsx",
"packages/app/src/components/left-sidebar.tsx",
"packages/app/src/components/plan-card.tsx",
@@ -552,9 +551,7 @@
"packages/app/src/components/download-toast.tsx",
"packages/app/src/components/file-explorer-pane.tsx",
"packages/app/src/components/headers/back-header.tsx",
"packages/app/src/components/highlighted-code-block.tsx",
"packages/app/src/components/hosts/host-filter.tsx",
"packages/app/src/components/hosts/host-picker.tsx",
"packages/app/src/components/import-session-sheet.tsx",
"packages/app/src/components/left-sidebar.tsx",
"packages/app/src/components/markdown/fence/mermaid/host.native.tsx",
+85 -31
View File
@@ -1,76 +1,129 @@
# Changelog
## 0.17.4 - 2026-11-23
### Fixed
- Fixed numbered sublists overlapping their text and quotes inside lists overlapping later messages on Android ([#10499](https://github.com/getpaseo/paseo/pull/10499))
- Fixed Android terminal input so it asks the keyboard to exclude typed text from personalized learning ([#10586](https://github.com/getpaseo/paseo/pull/10586))
- Fixed conversations disappearing when directory capitalization differs on a case-insensitive file system ([#10555](https://github.com/getpaseo/paseo/pull/10555) by [@yzim](https://github.com/yzim))
- Fixed interrupt and steer messages to archived agents being queued without starting a turn ([#10611](https://github.com/getpaseo/paseo/pull/10611) by [@thomasvan](https://github.com/thomasvan))
- Fixed Hermes Shell rows omitting part of the command ([#10614](https://github.com/getpaseo/paseo/pull/10614))
- Fixed OpenCode Go usage for logins stored in the OpenCode 2 database, including Console sign-ins and API keys ([#8729](https://github.com/getpaseo/paseo/pull/8729), [#10612](https://github.com/getpaseo/paseo/pull/10612))
- Fixed existing OpenCode sessions failing to reopen after Paseo tool definitions change ([#10533](https://github.com/getpaseo/paseo/pull/10533) by [@Peanut-HZM](https://github.com/Peanut-HZM))
- Fixed Paseo tools missing from agents that use MCP protocol version `2026-07-28` ([#10558](https://github.com/getpaseo/paseo/pull/10558) by [@apple-ouyang](https://github.com/apple-ouyang))
- Fixed Codex MCP startup failures missing from daemon warning logs ([#10566](https://github.com/getpaseo/paseo/pull/10566))
- Fixed the daemon exiting when it closes a session after the plugin process has stopped ([#10585](https://github.com/getpaseo/paseo/pull/10585))
- Fixed Git commands selecting the wrong repository when a directory has the layout of a bare repository ([#10587](https://github.com/getpaseo/paseo/pull/10587))
- Fixed Claude Auto permission mode being unavailable on Bedrock and Vertex ([#6904](https://github.com/getpaseo/paseo/pull/6904))
- Fixed the sidebar host settings button requiring two clicks to open settings ([#10562](https://github.com/getpaseo/paseo/pull/10562) by [@ShalokShalom](https://github.com/ShalokShalom))
- Fixed the Changes pane not offering Push for a new branch that was never pushed in a regular checkout ([#10631](https://github.com/getpaseo/paseo/pull/10631))
- Fixed the daemon using the wrong model catalog when Hub sends a workspace directory for trigger validation ([#10582](https://github.com/getpaseo/paseo/pull/10582))
## 0.17.3 - 2026-11-22
### Fixed
- Fixed iPhone sheets such as Workspace tabs ignoring body swipes to expand, scroll, or collapse ([#10525](https://github.com/getpaseo/paseo/pull/10525))
- Fixed Antigravity applying the default model's thinking levels to every model, which blocked Orchestrator chats from opening ([#10524](https://github.com/getpaseo/paseo/pull/10524))
- Fixed `/` and `@` pickers disappearing until reload after returning to a workspace through window history ([#8954](https://github.com/getpaseo/paseo/pull/8954) by [@viking1201](https://github.com/viking1201))
## 0.17.2 - 2026-11-22
- **Turn and session stats:** View per-turn and session timing, token, cache, and cost metrics for Claude, OpenCode v2, Pi, Oh My Pi, and plugin providers. ([#10496](https://github.com/getpaseo/paseo/pull/10496), [#10510](https://github.com/getpaseo/paseo/pull/10510))
- **Automatic model list refresh:** Enabled providers refresh their model lists in the background every 30 minutes. ([#10481](https://github.com/getpaseo/paseo/pull/10481))
- **Sidebar usage by default:** The sidebar usage summary is enabled by default, sources for inactive providers start hidden, and source toggles move to a Sources list. ([#10491](https://github.com/getpaseo/paseo/pull/10491))
- **Agents can steer turns:** Agents can steer another agent's running turn alongside queueing or interrupting it, and receive delivery guidance in the response. ([#10483](https://github.com/getpaseo/paseo/pull/10483))
### Added
- Added Archive workspace to the mobile workspace actions menu ([#10507](https://github.com/getpaseo/paseo/pull/10507))
- Added provider docs links, fuller diagnostic reports, and a scrollable Models list with inline refresh to provider settings ([#10487](https://github.com/getpaseo/paseo/pull/10487))
### Changed
- Removed the "This chat uses OpenCode v2." info row from OpenCode v2 chats ([#10490](https://github.com/getpaseo/paseo/pull/10490))
### Fixed
- Fixed pressing Tab or Enter in the slash menu running a stale `/exit` choice and archiving the agent ([#10484](https://github.com/getpaseo/paseo/pull/10484) by [@3ae3ae](https://github.com/3ae3ae))
- Fixed busy host connections dropping to reconnect when multiple connections are saved ([#10395](https://github.com/getpaseo/paseo/pull/10395))
- Fixed retrying an edited New workspace form hitting a conflict error after a failed start, and unified composer error alerts ([#10482](https://github.com/getpaseo/paseo/pull/10482))
- Fixed Antigravity turns staying running after creating a recurring schedule ([#10469](https://github.com/getpaseo/paseo/pull/10469))
- Fixed daemon startup and plugin reloads leaving zombie child processes for local directory plugins ([#10470](https://github.com/getpaseo/paseo/pull/10470))
## 0.17.1 - 2026-11-21
- **Use existing worktrees:** Start a workspace in a worktree you already have, or create one from a branch or pull request. Plugins can manage worktree creation, removal, and restoration. When you branch off a fork PR or MR, choose Run setup to approve workspace automation. ([#10190](https://github.com/getpaseo/paseo/pull/10190), [#10278](https://github.com/getpaseo/paseo/pull/10278))
- **Update providers in Paseo:** See each provider's status, installed version, and available updates in the provider list. Open a provider's settings from Settings, setup, or the model picker to update supported CLIs and watch their output. ([#9568](https://github.com/getpaseo/paseo/pull/9568), [#9661](https://github.com/getpaseo/paseo/pull/9661))
- **Provider quota forecasts:** Usage estimates when a quota will run out before reset based on your current pace, shown inline with the reset time. Healthy quota bars now show in green, and reset and exhaustion times include the weekday and calendar date when needed. ([#10289](https://github.com/getpaseo/paseo/pull/10289), [#10385](https://github.com/getpaseo/paseo/pull/10385), [#10397](https://github.com/getpaseo/paseo/pull/10397))
- **Watch PRs and MRs:** Ask an agent to watch a GitHub, GitLab, Gitea, Forgejo, or Codeberg change request for updates to checks, reviews, or comments. Stop a watch from Background work. ([#10148](https://github.com/getpaseo/paseo/pull/10148), [#10279](https://github.com/getpaseo/paseo/pull/10279), [#10280](https://github.com/getpaseo/paseo/pull/10280))
- **Antigravity approvals and history:** Choose a permission mode, answer tool approvals, and import or reopen sessions. Requires [Antigravity CLI 1.5.0 or later](https://paseo.sh/docs/supported-providers/antigravity). ([#10193](https://github.com/getpaseo/paseo/pull/10193))
- **Use existing worktrees:** Start a workspace in a worktree you already have, or create one from a branch or pull request. ([#10190](https://github.com/getpaseo/paseo/pull/10190))
- **Update providers in Paseo:** See each provider's status and installed version, and update supported CLIs from the app. ([#9568](https://github.com/getpaseo/paseo/pull/9568), [#9661](https://github.com/getpaseo/paseo/pull/9661))
- **Provider quota forecasts:** Usage shows when your current pace will use up a quota before it resets. ([#10289](https://github.com/getpaseo/paseo/pull/10289), [#10385](https://github.com/getpaseo/paseo/pull/10385))
- **Watch PRs and MRs:** Ask an agent to watch a pull or merge request for new checks, reviews, and comments. ([#10148](https://github.com/getpaseo/paseo/pull/10148), [#10279](https://github.com/getpaseo/paseo/pull/10279), [#10280](https://github.com/getpaseo/paseo/pull/10280))
- **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 in order when the current turn ends instead of interrupting it. An interrupt or your own prompt carries earlier queued messages in the same turn, and Stop holds queued messages until the next prompt instead of starting a new turn. ([#9757](https://github.com/getpaseo/paseo/pull/9757), [#10404](https://github.com/getpaseo/paseo/pull/10404))
- **Antigravity approvals and history:** Choose a permission mode, respond to tool approvals, and import or reopen sessions. Use Antigravity CLI 1.5.0 or later on the daemon host, and include `acp` if you override its command. In Hub, reselect the model and thinking level if a saved model ID includes an old effort suffix. ([#10193](https://github.com/getpaseo/paseo/pull/10193))
- **More goose models:** Select models from all providers configured in goose. Existing goose settings and sessions carry over to the bundled plugin. ([#9719](https://github.com/getpaseo/paseo/pull/9719) by [@i386](https://github.com/i386))
- **Agent messages wait their turn:** By default, messages from other agents wait for the current turn to end. ([#9757](https://github.com/getpaseo/paseo/pull/9757), [#10404](https://github.com/getpaseo/paseo/pull/10404))
- **More goose models:** Select models from every provider configured in goose. ([#9719](https://github.com/getpaseo/paseo/pull/9719) by [@i386](https://github.com/i386))
- **Plugin agent instructions:** Plugins can add their own instructions to agents. ([#9781](https://github.com/getpaseo/paseo/pull/9781))
### Added
- Added OpenRouter credit balances and API key spending to Usage and `paseo usage` ([#10269](https://github.com/getpaseo/paseo/pull/10269))
- Added Antigravity account quotas to Usage ([#10232](https://github.com/getpaseo/paseo/pull/10232) by [@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- Added Antigravity skill suggestions when you type `/` inside a prompt ([#10383](https://github.com/getpaseo/paseo/pull/10383))
- Added bundled orchestration skills to Antigravity on hosts where Paseo skills are installed ([#10273](https://github.com/getpaseo/paseo/pull/10273))
- Added Antigravity skills to `/` suggestions ([#10383](https://github.com/getpaseo/paseo/pull/10383))
- Added bundled orchestration skills to Antigravity ([#10273](https://github.com/getpaseo/paseo/pull/10273))
- 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 a separate Ultracode toggle for Claude ([#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 project listing on connected daemons for Hub sessions with `hub.execute` ([#10392](https://github.com/getpaseo/paseo/pull/10392))
- Added project listing on connected daemons for Hub sessions ([#10392](https://github.com/getpaseo/paseo/pull/10392))
- Added labels and workspace IDs to `paseo ls --json` ([#10076](https://github.com/getpaseo/paseo/pull/10076))
### Changed
- Changed Appearance content width to Default (820 px), Wide (1,200 px), and Full presets that resize open chats, the composer, and Markdown previews together ([#10231](https://github.com/getpaseo/paseo/pull/10231))
- Changed Antigravity tool cards to show shell commands and output, file diffs, and Paseo tool details ([#10379](https://github.com/getpaseo/paseo/pull/10379))
- Changed content width to Default, Wide, and Full presets that also resize open chats and Markdown previews ([#10231](https://github.com/getpaseo/paseo/pull/10231))
- Changed Antigravity tool cards to show shell commands, output, and file diffs ([#10379](https://github.com/getpaseo/paseo/pull/10379))
- Changed Clone from GitHub to show matching private repositories first ([#10264](https://github.com/getpaseo/paseo/pull/10264))
- Changed worktree teardown to keep the worktree when the command exceeds one minute or the `worktree.teardownTimeoutMs` limit in `paseo.json` ([#9852](https://github.com/getpaseo/paseo/pull/9852) by [@ragokan](https://github.com/ragokan))
- 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 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 healthy quota bars in Usage to green ([#10397](https://github.com/getpaseo/paseo/pull/10397))
- Changed worktree teardown to keep the worktree when the command times out ([#9852](https://github.com/getpaseo/paseo/pull/9852) by [@ragokan](https://github.com/ragokan))
- Changed workspace navigation on mobile to acknowledge taps sooner ([#9887](https://github.com/getpaseo/paseo/pull/9887))
- Changed workspace Git status to skip its reload after a short reconnect with no file changes ([#10142](https://github.com/getpaseo/paseo/pull/10142) by [@VladimirGVP](https://github.com/VladimirGVP))
- Changed `browser_new_tab` to ask agents to choose a Desktop when several are connected ([#10189](https://github.com/getpaseo/paseo/pull/10189))
### Fixed
- Fixed an online host's workspaces staying missing after the app evicts its cached directory ([#10318](https://github.com/getpaseo/paseo/pull/10318))
- Fixed chat history timing out when many open chats refresh at once after reconnecting ([#10368](https://github.com/getpaseo/paseo/pull/10368))
- Fixed an online host's workspaces going missing ([#10318](https://github.com/getpaseo/paseo/pull/10318))
- Fixed chat history timing out when many open chats refresh after reconnecting ([#10368](https://github.com/getpaseo/paseo/pull/10368))
- Fixed slow reopening of long Claude chats while the daemon is busy ([#10369](https://github.com/getpaseo/paseo/pull/10369))
- Fixed images from a live reply waiting for images in another chat's history to load ([#10371](https://github.com/getpaseo/paseo/pull/10371))
- Fixed agent recovery failing and idle agents showing errors after stopping a foreground daemon with Ctrl+C on macOS or Linux ([#10381](https://github.com/getpaseo/paseo/pull/10381))
- Fixed reopening a long Antigravity chat after a daemon restart losing the end of its history ([#10428](https://github.com/getpaseo/paseo/pull/10428))
- Fixed agents failing to recover after stopping a foreground daemon with Ctrl+C ([#10381](https://github.com/getpaseo/paseo/pull/10381))
- Fixed long Antigravity chats losing the end of their history after a daemon restart ([#10428](https://github.com/getpaseo/paseo/pull/10428))
- Fixed Antigravity turns ending while a background command is still running ([#10310](https://github.com/getpaseo/paseo/pull/10310))
- Fixed the Add model sheet staying open after saving a custom model when provider discovery is slow or fails ([#10432](https://github.com/getpaseo/paseo/pull/10432))
- Fixed the Add model sheet staying open after saving a custom model ([#10432](https://github.com/getpaseo/paseo/pull/10432))
- Fixed slash suggestions failing when a provider reports duplicate command names ([#10275](https://github.com/getpaseo/paseo/pull/10275))
- Fixed resumed Codex sessions keeping their previous working directory for configuration and MCP servers when opened in a different directory ([#10390](https://github.com/getpaseo/paseo/pull/10390) by [@tabulius-ux](https://github.com/tabulius-ux))
- Fixed resumed Codex sessions using their previous working directory for configuration and MCP servers ([#10390](https://github.com/getpaseo/paseo/pull/10390) by [@tabulius-ux](https://github.com/tabulius-ux))
- Fixed stale Codex subagent statuses after reopening or rewinding the parent chat ([#10171](https://github.com/getpaseo/paseo/pull/10171) by [@AnalyticETH](https://github.com/AnalyticETH))
- Fixed Usage showing the previous Claude account's quota after switching accounts ([#10236](https://github.com/getpaseo/paseo/pull/10236))
- Fixed the sidebar usage row dropping period labels such as `5h` and `wk` when multiple usage windows are pinned ([#10274](https://github.com/getpaseo/paseo/pull/10274))
- Fixed the sidebar usage row dropping period labels when several usage windows are pinned ([#10274](https://github.com/getpaseo/paseo/pull/10274))
- Fixed Changes failing to recognize a checkout immediately after restoring its worktree ([#10224](https://github.com/getpaseo/paseo/pull/10224), [#10304](https://github.com/getpaseo/paseo/pull/10304), [#10406](https://github.com/getpaseo/paseo/pull/10406))
- Fixed split-pane dividers stopping or lagging during drags after adding panes to a previously resized row ([#5996](https://github.com/getpaseo/paseo/pull/5996))
- Fixed split-pane dividers stopping or lagging during drags ([#5996](https://github.com/getpaseo/paseo/pull/5996))
- Fixed double-click word selection and triple-click line selection in diffs ([#10252](https://github.com/getpaseo/paseo/pull/10252) by [@pedrovieira](https://github.com/pedrovieira))
- Fixed the composer and chat column losing alignment when Chat outline is enabled ([#10277](https://github.com/getpaseo/paseo/pull/10277))
- Fixed the web composer focus shortcut hint overlapping the placeholder text at narrow widths or in longer translations ([#6200](https://github.com/getpaseo/paseo/pull/6200))
- Fixed the web composer's focus shortcut hint overlapping the placeholder ([#6200](https://github.com/getpaseo/paseo/pull/6200))
- Fixed the archive shortcut failing when the active workspace's sidebar group is collapsed ([#10356](https://github.com/getpaseo/paseo/pull/10356) by [@hiennd-ctrl](https://github.com/hiennd-ctrl), [@neihyud](https://github.com/neihyud))
- Fixed other sessions and plugins seeing a workspace as active while another session is archiving it ([#10391](https://github.com/getpaseo/paseo/pull/10391) by [@tabulius-ux](https://github.com/tabulius-ux))
- Fixed Android composer buttons requiring a second tap after typing or zooming a chat image ([#10057](https://github.com/getpaseo/paseo/pull/10057), [#10308](https://github.com/getpaseo/paseo/pull/10308))
- Fixed swiping a terminal in an Android browser opening the keyboard when it was closed ([#10225](https://github.com/getpaseo/paseo/pull/10225) by [@tonylt](https://github.com/tonylt))
- Fixed swiping a terminal in an Android browser opening the keyboard ([#10225](https://github.com/getpaseo/paseo/pull/10225) by [@tonylt](https://github.com/tonylt))
- 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 repeated finish notifications while an agent responds to background tasks ([#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 changing the Claude thinking level 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 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 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 Markdown previews and source views losing their scroll position when switching between them ([#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))
@@ -80,13 +133,14 @@
- 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 historical closed PR badges appearing on a repository's default branch ([#10053](https://github.com/getpaseo/paseo/pull/10053))
- Fixed closed PR badges appearing on a repository's default branch ([#10053](https://github.com/getpaseo/paseo/pull/10053))
- 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))
### Plugins
- Added a `focusHost` navigation option for plugins to select the destination host in the sidebar when opening a workspace or agent ([#5574](https://github.com/getpaseo/paseo/pull/5574) by [@discwl](https://github.com/discwl))
- Added plugin control of worktree creation, removal, and restoration ([#10278](https://github.com/getpaseo/paseo/pull/10278))
- Added a `focusHost` navigation option that selects the destination host in the sidebar ([#5574](https://github.com/getpaseo/paseo/pull/5574) by [@discwl](https://github.com/discwl))
## 0.16.2 - 2026-11-18
+83 -29
View File
@@ -1,68 +1,121 @@
# Changelog
## 0.17.4 - 2026-11-23
### 修复
- 修复 Android 上嵌套编号列表的编号与正文重叠,以及列表中的引用与后续消息重叠的问题 ([#10499](https://github.com/getpaseo/paseo/pull/10499))
- 修复 Android 终端输入,要求键盘不将输入内容用于个性化学习 ([#10586](https://github.com/getpaseo/paseo/pull/10586))
- 修复在不区分大小写的文件系统上,目录路径大小写不一致导致对话消失的问题 ([#10555](https://github.com/getpaseo/paseo/pull/10555),贡献者:[@yzim](https://github.com/yzim))
- 修复发给已归档 Agent 的中断和引导消息进入队列后未启动新轮次的问题 ([#10611](https://github.com/getpaseo/paseo/pull/10611),贡献者:[@thomasvan](https://github.com/thomasvan))
- 修复 Hermes 的 Shell 工具行只显示命令摘要的问题,现在会显示完整命令 ([#10614](https://github.com/getpaseo/paseo/pull/10614))
- 修复使用 OpenCode 2 数据库中保存的登录凭据时的 Go 用量显示,涵盖 Console 登录和 API 密钥 ([#8729](https://github.com/getpaseo/paseo/pull/8729), [#10612](https://github.com/getpaseo/paseo/pull/10612))
- 修复 Paseo 工具定义变更后无法重新打开已有 OpenCode 会话的问题 ([#10533](https://github.com/getpaseo/paseo/pull/10533),贡献者:[@Peanut-HZM](https://github.com/Peanut-HZM))
- 修复使用 MCP 协议版本 `2026-07-28` 的 Agent 缺少 Paseo 工具的问题 ([#10558](https://github.com/getpaseo/paseo/pull/10558),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
- 修复 Codex MCP 启动失败时 daemon 未记录警告的问题 ([#10566](https://github.com/getpaseo/paseo/pull/10566))
- 修复插件进程停止后 daemon 在关闭会话时退出的问题 ([#10585](https://github.com/getpaseo/paseo/pull/10585))
- 修复目录结构与裸仓库相同时 Git 命令选错仓库的问题 ([#10587](https://github.com/getpaseo/paseo/pull/10587))
- 修复在 Bedrock 和 Vertex 上无法选择 Claude Auto 权限模式的问题 ([#6904](https://github.com/getpaseo/paseo/pull/6904))
- 修复侧边栏的主机设置按钮需要点击两次才能打开设置的问题 ([#10562](https://github.com/getpaseo/paseo/pull/10562),贡献者:[@ShalokShalom](https://github.com/ShalokShalom))
- 修复普通检出中从未推送过的新分支在“变更”面板中不显示“推送”的问题 ([#10631](https://github.com/getpaseo/paseo/pull/10631))
- 修复 Hub 在验证触发器时传入工作区目录后,daemon 使用错误模型目录的问题 ([#10582](https://github.com/getpaseo/paseo/pull/10582))
## 0.17.3 - 2026-11-22
### 修复
- 修复 iPhone 上“Workspace 标签”等弹窗忽略主体滑动、无法展开、滚动或收起的问题 ([#10525](https://github.com/getpaseo/paseo/pull/10525))
- 修复 Antigravity 将默认模型的思考级别套用到所有模型,导致无法打开 Orchestrator 对话的问题 ([#10524](https://github.com/getpaseo/paseo/pull/10524))
- 修复通过窗口历史记录返回工作区后,`/` 和 `@` 选择器在刷新前一直消失的问题 ([#8954](https://github.com/getpaseo/paseo/pull/8954),贡献者:[@viking1201](https://github.com/viking1201))
## 0.17.2 - 2026-11-22
- **回合和会话统计**:查看 Claude、OpenCode v2、Pi、Oh My Pi 和插件 Provider 的单轮及会话耗时、token、缓存和费用指标。([#10496](https://github.com/getpaseo/paseo/pull/10496), [#10510](https://github.com/getpaseo/paseo/pull/10510))
- **自动刷新模型列表**:已启用的 Provider 每 30 分钟在后台刷新一次模型列表。([#10481](https://github.com/getpaseo/paseo/pull/10481))
- **默认显示侧边栏用量**:侧边栏用量摘要现在默认开启,未启用 Provider 的用量来源默认隐藏,来源开关移至“来源”列表。([#10491](https://github.com/getpaseo/paseo/pull/10491))
- **Agent 可引导进行中的轮次**:Agent 除了排队或中断外,现在可以引导另一个 Agent 正在运行的轮次,并在响应中收到投递指引。([#10483](https://github.com/getpaseo/paseo/pull/10483))
### 新增
- 在移动端工作区操作菜单中新增“归档工作区” ([#10507](https://github.com/getpaseo/paseo/pull/10507))
- 在 Provider 设置中新增文档链接、更完整的诊断报告,以及带内联刷新按钮的可滚动 Models 列表 ([#10487](https://github.com/getpaseo/paseo/pull/10487))
### 变更
- 移除 OpenCode v2 对话中的“This chat uses OpenCode v2.”提示行 ([#10490](https://github.com/getpaseo/paseo/pull/10490))
### 修复
- 修复在斜杠菜单中按 Tab 或 Enter 时误触发过期的 `/exit` 选项并归档 Agent 的问题 ([#10484](https://github.com/getpaseo/paseo/pull/10484),贡献者:[@3ae3ae](https://github.com/3ae3ae))
- 修复保存了多个主机连接时,繁忙的正常连接会断开重连的问题 ([#10395](https://github.com/getpaseo/paseo/pull/10395))
- 修复新建工作区启动失败后,修改表单再重试时出现冲突错误的问题,并统一了 Composer 错误提示 ([#10482](https://github.com/getpaseo/paseo/pull/10482))
- 修复 Antigravity 创建循环定时任务后轮次一直停留在运行状态的问题 ([#10469](https://github.com/getpaseo/paseo/pull/10469))
- 修复启动 daemon 和重载本地目录插件后遗留僵尸子进程的问题 ([#10470](https://github.com/getpaseo/paseo/pull/10470))
## 0.17.1 - 2026-11-21
- **使用现有 worktree**:在已有的 worktree 中启动工作区,或从分支或 PR 创建 worktree。插件可以管理 worktree 的创建、移除和恢复。从 fork 的 PR 或 MR 创建分支时,选择“运行设置”以批准工作区自动化。([#10190](https://github.com/getpaseo/paseo/pull/10190), [#10278](https://github.com/getpaseo/paseo/pull/10278))
- **在 Paseo 中更新 Provider**:在 Provider 列表中查看各 Provider 的状态、已安装版本和可用更新。从设置、初次配置或模型选择器打开 Provider 设置,即可更新受支持的 CLI 并查看输出。([#9568](https://github.com/getpaseo/paseo/pull/9568), [#9661](https://github.com/getpaseo/paseo/pull/9661))
- **Provider 配额预测**:“使用情况”页面会根据当前使用速度估算配额在重置前何时用完,并显示在重置时间同一行中。健康的配额进度条现已改为绿色,重置与用尽时间也会在需要时显示星期和具体日期。([#10289](https://github.com/getpaseo/paseo/pull/10289), [#10385](https://github.com/getpaseo/paseo/pull/10385), [#10397](https://github.com/getpaseo/paseo/pull/10397))
- **监视 PR 和 MR**:让 Agent 监视 GitHub、GitLab、Gitea、Forgejo 或 Codeberg 上的 PR 或 MR,跟踪检查、审查或评论的变化。你可以在后台任务中停止监视。([#10148](https://github.com/getpaseo/paseo/pull/10148), [#10279](https://github.com/getpaseo/paseo/pull/10279), [#10280](https://github.com/getpaseo/paseo/pull/10280))
- **Antigravity 审批和历史记录**:选择权限模式、回复工具审批,以及导入或重新打开会话。需要 [Antigravity CLI 1.5.0 或更高版本](https://paseo.sh/zh-CN/docs/supported-providers/antigravity)。([#10193](https://github.com/getpaseo/paseo/pull/10193))
- **使用现有 worktree**:在已有的 worktree 中启动工作区,或从分支或 PR 创建 worktree。([#10190](https://github.com/getpaseo/paseo/pull/10190))
- **在 Paseo 中更新 Provider**:查看各 Provider 的状态和已安装版本,并在应用内更新受支持的 CLI。([#9568](https://github.com/getpaseo/paseo/pull/9568), [#9661](https://github.com/getpaseo/paseo/pull/9661))
- **Provider 配额预测**:“使用情况”页面会显示配额按当前使用速度将在重置前何时用完。([#10289](https://github.com/getpaseo/paseo/pull/10289), [#10385](https://github.com/getpaseo/paseo/pull/10385))
- **监视 PR 和 MR**:让 Agent 监视 PR 或 MR 的检查、审查和评论更新。([#10148](https://github.com/getpaseo/paseo/pull/10148), [#10279](https://github.com/getpaseo/paseo/pull/10279), [#10280](https://github.com/getpaseo/paseo/pull/10280))
- **在后台任务中查看 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), [#10404](https://github.com/getpaseo/paseo/pull/10404))
- **Antigravity 审批和历史记录**:选择权限模式、回复工具审批,以及导入或重新打开会话。请在 daemon 主机上使用 Antigravity CLI 1.5.0 或更新版本,如果覆盖了启动命令请包含 `acp`。如果 Hub 中保存的模型 ID 含有旧的推理强度后缀,请重新选择模型和思考级别。([#10193](https://github.com/getpaseo/paseo/pull/10193))
- **更多 goose 模型**:从 goose 中已配置的所有 Provider 选择模型。现有 goose 设置和会话会迁移到内置插件。([#9719](https://github.com/getpaseo/paseo/pull/9719),贡献者:[@i386](https://github.com/i386))
- **Agent 消息排队等待**:默认情况下,其他 Agent 的消息会等当前轮次结束后再送达。([#9757](https://github.com/getpaseo/paseo/pull/9757), [#10404](https://github.com/getpaseo/paseo/pull/10404))
- **更多 goose 模型**:从 goose 中已配置的所有 Provider 选择模型。([#9719](https://github.com/getpaseo/paseo/pull/9719),贡献者:[@i386](https://github.com/i386))
- **插件 Agent 指令**:插件可以向 Agent 添加自己的指令。([#9781](https://github.com/getpaseo/paseo/pull/9781))
### 新增
- 在“使用情况”页面和 `paseo usage` 中新增 OpenRouter 余额和 API 密钥支出 ([#10269](https://github.com/getpaseo/paseo/pull/10269))
- 在“使用情况”页面新增 Antigravity 账号配额 ([#10232](https://github.com/getpaseo/paseo/pull/10232),贡献者:[@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- 在提示词中输入 `/` 时,新增 Antigravity 技能建议 ([#10383](https://github.com/getpaseo/paseo/pull/10383))
- 在已安装 Paseo 技能的主机上,为 Antigravity 新增内置编排技能 ([#10273](https://github.com/getpaseo/paseo/pull/10273))
- 在 `/` 建议中新增 Antigravity 技能 ([#10383](https://github.com/getpaseo/paseo/pull/10383))
- 为 Antigravity 新增内置编排技能 ([#10273](https://github.com/getpaseo/paseo/pull/10273))
- 新增 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))
- 新增 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))
- 为具有 `hub.execute` 权限的 Hub 会话新增列出已连接 daemon 活跃项目的能力 ([#10392](https://github.com/getpaseo/paseo/pull/10392))
- 为 Hub 会话新增列出已连接 daemon 项目的能力 ([#10392](https://github.com/getpaseo/paseo/pull/10392))
- 新增 `paseo ls --json` 输出的标签和工作区 ID ([#10076](https://github.com/getpaseo/paseo/pull/10076))
### 变更
- 将“外观”中的内容宽度改为默认(820 px)、宽版(1,200 px)和全宽预设,同时调整已打开对话、Composer 和 Markdown 预览的宽度 ([#10231](https://github.com/getpaseo/paseo/pull/10231))
- Antigravity 工具卡片现在显示 shell 命令及输出、文件 diff 和 Paseo 工具详情 ([#10379](https://github.com/getpaseo/paseo/pull/10379))
- 将内容宽度改为默认、宽版和全宽预设,并同时调整已打开对话和 Markdown 预览的宽度 ([#10231](https://github.com/getpaseo/paseo/pull/10231))
- Antigravity 工具卡片现在显示 shell 命令、输出和文件 diff ([#10379](https://github.com/getpaseo/paseo/pull/10379))
- 从 GitHub 克隆时,优先显示匹配的私有仓库 ([#10264](https://github.com/getpaseo/paseo/pull/10264))
- worktree 清理命令在超过默认的一分钟或 `paseo.json` 中 `worktree.teardownTimeoutMs` 限制时保留 worktree ([#9852](https://github.com/getpaseo/paseo/pull/9852),贡献者:[@ragokan](https://github.com/ragokan))
- 工作区导航会立即响应点击,并在手机端初始加载时减少屏幕外的对话行数 ([#9887](https://github.com/getpaseo/paseo/pull/9887))
- 工作区 Git 状态在短暂重连且检出的内容未更改时复用之前的快照 ([#10142](https://github.com/getpaseo/paseo/pull/10142),贡献者:[@VladimirGVP](https://github.com/VladimirGVP))
- “使用情况”页面中健康的配额进度条改为绿色 ([#10397](https://github.com/getpaseo/paseo/pull/10397))
- worktree 清理命令超时时保留 worktree ([#9852](https://github.com/getpaseo/paseo/pull/9852),贡献者:[@ragokan](https://github.com/ragokan))
- 手机端工作区导航更快响应点击 ([#9887](https://github.com/getpaseo/paseo/pull/9887))
- 短暂重连且文件未更改时,工作区 Git 状态不再重新加载 ([#10142](https://github.com/getpaseo/paseo/pull/10142),贡献者:[@VladimirGVP](https://github.com/VladimirGVP))
- 连接多个 Desktop 时,`browser_new_tab` 会让 Agent 选择打开标签页的 Desktop ([#10189](https://github.com/getpaseo/paseo/pull/10189))
### 修复
- 修复应用清除主机目录缓存后,在线主机的工作区一直不显示的问题 ([#10318](https://github.com/getpaseo/paseo/pull/10318))
- 修复在线主机的工作区不显示的问题 ([#10318](https://github.com/getpaseo/paseo/pull/10318))
- 修复重新连接后多个已打开的对话同时刷新时,历史记录加载超时的问题 ([#10368](https://github.com/getpaseo/paseo/pull/10368))
- 修复 daemon 繁忙时,重新打开较长的 Claude 对话速度慢的问题 ([#10369](https://github.com/getpaseo/paseo/pull/10369))
- 修复当前回复中的图片等待另一个对话的历史图片加载的问题 ([#10371](https://github.com/getpaseo/paseo/pull/10371))
- 修复在 macOS 或 Linux 上用 Ctrl+C 停止前台 daemon 后,Agent 恢复失败且空闲 Agent 显示错误的问题 ([#10381](https://github.com/getpaseo/paseo/pull/10381))
- 修复 daemon 重启后重新打开较长的 Antigravity 对话时丢失末尾历史记录的问题 ([#10428](https://github.com/getpaseo/paseo/pull/10428))
- 修复用 Ctrl+C 停止前台 daemon 后 Agent 恢复失败的问题 ([#10381](https://github.com/getpaseo/paseo/pull/10381))
- 修复 daemon 重启后较长的 Antigravity 对话丢失末尾历史记录的问题 ([#10428](https://github.com/getpaseo/paseo/pull/10428))
- 修复 Antigravity 后台命令仍在运行时轮次就已结束的问题 ([#10310](https://github.com/getpaseo/paseo/pull/10310))
- 修复保存自定义模型后,在 Provider 发现较慢或失败时“添加模型”弹窗一直保持打开的问题 ([#10432](https://github.com/getpaseo/paseo/pull/10432))
- 修复保存自定义模型后“添加模型”弹窗一直保持打开的问题 ([#10432](https://github.com/getpaseo/paseo/pull/10432))
- 修复 Provider 返回重复命令名称时,斜杠建议列表出错的问题 ([#10275](https://github.com/getpaseo/paseo/pull/10275))
- 修复在不同目录中恢复 Codex 会话时,配置和 MCP 服务器仍沿用旧工作目录的问题 ([#10390](https://github.com/getpaseo/paseo/pull/10390),贡献者:[@tabulius-ux](https://github.com/tabulius-ux))
- 修复恢复的 Codex 会话的配置和 MCP 服务器仍沿用旧工作目录的问题 ([#10390](https://github.com/getpaseo/paseo/pull/10390),贡献者:[@tabulius-ux](https://github.com/tabulius-ux))
- 修复重新打开或回退父对话后,Codex 子 Agent 状态未更新的问题 ([#10171](https://github.com/getpaseo/paseo/pull/10171),贡献者:[@AnalyticETH](https://github.com/AnalyticETH))
- 修复切换 Claude 账号后,“使用情况”页面仍显示上一个账号配额的问题 ([#10236](https://github.com/getpaseo/paseo/pull/10236))
- 修复固定多个用量窗口时,侧边栏用量行隐藏 `5h` 和 `wk` 等周期标签的问题 ([#10274](https://github.com/getpaseo/paseo/pull/10274))
- 修复固定多个用量窗口时,侧边栏用量行隐藏周期标签的问题 ([#10274](https://github.com/getpaseo/paseo/pull/10274))
- 修复恢复 worktree 后,“更改”无法立即识别检出目录的问题 ([#10224](https://github.com/getpaseo/paseo/pull/10224), [#10304](https://github.com/getpaseo/paseo/pull/10304), [#10406](https://github.com/getpaseo/paseo/pull/10406))
- 修复向调整过宽度的分屏行添加新窗格后,分隔条无法拖动或跟手缓慢的问题 ([#5996](https://github.com/getpaseo/paseo/pull/5996))
- 修复拖动分屏分隔条时卡住或跟手缓慢的问题 ([#5996](https://github.com/getpaseo/paseo/pull/5996))
- 修复 diff 中双击选词和三击选行的问题 ([#10252](https://github.com/getpaseo/paseo/pull/10252),贡献者:[@pedrovieira](https://github.com/pedrovieira))
- 修复启用聊天大纲时,Composer 与对话栏对不齐的问题 ([#10277](https://github.com/getpaseo/paseo/pull/10277))
- 修复网页版 Composer 在较窄宽度或较长译文下聚焦快捷键提示遮挡占位符文字的问题 ([#6200](https://github.com/getpaseo/paseo/pull/6200))
- 修复网页版 Composer 的聚焦快捷键提示遮挡占位符文字的问题 ([#6200](https://github.com/getpaseo/paseo/pull/6200))
- 修复当前工作区所在的侧边栏分组折叠时,归档快捷键失效的问题 ([#10356](https://github.com/getpaseo/paseo/pull/10356),贡献者:[@hiennd-ctrl](https://github.com/hiennd-ctrl), [@neihyud](https://github.com/neihyud))
- 修复一个会话正在归档工作区时,其他会话和插件仍将其显示为活跃状态的问题 ([#10391](https://github.com/getpaseo/paseo/pull/10391),贡献者:[@tabulius-ux](https://github.com/tabulius-ux))
- 修复在 Android 上输入文字或缩放对话图片后,首次点击 Composer 按钮无效的问题 ([#10057](https://github.com/getpaseo/paseo/pull/10057), [#10308](https://github.com/getpaseo/paseo/pull/10308))
- 修复在 Android 浏览器中滑动终端时弹出已关闭的键盘的问题 ([#10225](https://github.com/getpaseo/paseo/pull/10225),贡献者:[@tonylt](https://github.com/tonylt))
- 修复在 Android 浏览器中滑动终端时弹出键盘的问题 ([#10225](https://github.com/getpaseo/paseo/pull/10225),贡献者:[@tonylt](https://github.com/tonylt))
- 修复启用“折叠轮次”时,空闲的 Provider 通知导致已完成的 OMP 或 Pi 回复被隐藏的问题 ([#10135](https://github.com/getpaseo/paseo/pull/10135))
- 修复 Agent 响应后台任务时,在之前的完成状态未读的情况下重复发送完成通知的问题 ([#10200](https://github.com/getpaseo/paseo/pull/10200))
- 修复 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))
@@ -70,7 +123,7 @@
- 修复 Codex 消息在轮次开始前停止时显示错误而非已取消的问题 ([#9931](https://github.com/getpaseo/paseo/pull/9931),贡献者:[@3ae3ae](https://github.com/3ae3ae))
- 修复 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))
- 修复在预览和源码之间切换时 Markdown 预览和源码视图丢失滚动位置的问题 ([#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))
@@ -80,13 +133,14 @@
- 修复 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))
- 修复仓库默认分支显示历史已关闭 PR 徽标的问题 ([#10053](https://github.com/getpaseo/paseo/pull/10053))
- 修复仓库默认分支显示已关闭 PR 徽标的问题 ([#10053](https://github.com/getpaseo/paseo/pull/10053))
- 修复 Provider 关闭会话后插件 Agent 无法重新打开的问题 ([#10153](https://github.com/getpaseo/paseo/pull/10153))
- 修复插件页面和设置无法使用插件状态钩子的问题 ([#10049](https://github.com/getpaseo/paseo/pull/10049))
### 插件
- 新增插件导航 `focusHost` 选项,打开工作区或 Agent 时在侧边栏选中目标主机 ([#5574](https://github.com/getpaseo/paseo/pull/5574),贡献者:[@discwl](https://github.com/discwl))
- 新增插件对 worktree 创建、移除和恢复的管理能力 ([#10278](https://github.com/getpaseo/paseo/pull/10278))
- 新增插件导航 `focusHost` 选项,用于在侧边栏选中目标主机 ([#5574](https://github.com/getpaseo/paseo/pull/5574),贡献者:[@discwl](https://github.com/discwl))
## 0.16.2 - 2026-11-18
+2 -1
View File
@@ -54,9 +54,10 @@ At the start of non-trivial work, list `docs/` and skim anything relevant to the
| [docs/permissions.md](docs/permissions.md) | Semantic daemon permissions, principals, credentials, pairing invitations, and Hub authority |
| [docs/terminal-performance.md](docs/terminal-performance.md) | Terminal latency pipeline, coalescing/backpressure invariants, benchmark + perf spec usage |
| [docs/terminal-rendering.md](docs/terminal-rendering.md) | Native terminal view: xterm owns the grid, cluster placement, emoji widths, mixed-direction limits, render regression |
| [docs/timeline-sync.md](docs/timeline-sync.md) | Owned agent history, rewind retirements, live stream vs authoritative fetch, paged catch-up, client replica |
| [docs/agent-stream-performance.md](docs/agent-stream-performance.md) | Assistant text pipeline — coalescing window, paced reveal, why arrival lumps are smoothed at render |
| [docs/agent-stream-disclosure.md](docs/agent-stream-disclosure.md) | Expand/collapse in the chat timeline — hold contract, native anchor sequence, frame spacing, render-window cost |
| [docs/markdown-renderer.md](docs/markdown-renderer.md) | Shared Markdown engine, native selection, links, images and library constraints |
| [docs/markdown-renderer.md](docs/markdown-renderer.md) | Shared Markdown engine, the vendored library fork, native selection, links, images and library constraints |
| [docs/native-text-selection.md](docs/native-text-selection.md) | Native diagram grouping, selection boundaries and leading inline image limitations |
| [docs/file-observation.md](docs/file-observation.md) | Recursive watcher ownership, Linux constraints, teardown invariants, and Parcel comparison |
| [docs/testing.md](docs/testing.md) | TDD workflow, determinism, real dependencies over mocks, test organization |
+1 -1
View File
@@ -48,7 +48,7 @@ Paseo is an open source agentic development environment for desktop, mobile, web
- **Multi-provider:** Claude Code, Codex, Copilot, OpenCode, Pi, Antigravity, and Muse Code through the same interface. Pick the right model for each job.
- **Voice control:** Dictate tasks or talk through problems in voice mode. Hands-free when you need it.
- **Cross-device:** iOS, Android, desktop, web, and CLI. Start work at your desk, check in from your phone, script it from the terminal.
- **Privacy-first:** Paseo doesn't have any telemetry, tracking, or forced log-ins.
- **Privacy-first:** No telemetry, tracking, or forced login. Remote access uses an optional end-to-end encrypted relay.
[Run parallel tasks in Paseo](https://paseo.sh/docs/parallel-development): start agents in separate worktrees, review their diffs, run each app, and check it in the built-in browser.
+3 -3
View File
@@ -51,7 +51,7 @@
- **多提供商:** 通过同一个界面使用 Claude Code、Codex、Copilot、OpenCode 和 Pi。为每个任务选择合适的模型。
- **语音控制:** 在语音模式下口述任务或讨论问题。需要免手操作时很方便。
- **跨设备:** 支持 iOS、Android、桌面端、Web 和 CLI。在桌前开始工作,用手机查看进度,也可以从终端脚本化操作。
- **隐私优先:** Paseo 没有遥测、追踪,也不会强制登录。
- **隐私优先**:无遥测、无追踪、不强制登录。远程访问可使用可选的端到端加密中继。
## 赞助商
@@ -93,7 +93,7 @@ npm install -g @getpaseo/cli
paseo
```
终端中会显示一个二维码。你可以从任意客户端连接。这个方式适合服务器和远程机器。
Paseo 启动后会询问是否启用端到端加密中继以进行设备配对。如果拒绝,可以通过 TCP、Tailscale 或其他 VPN 直接连接。这个方式适合服务器和远程机器。
完整安装和配置见:
@@ -140,7 +140,7 @@ Monorepo 包结构速览:
- `packages/app`:Expo 客户端(iOS、Android、Web)
- `packages/cli`:用于 daemon 和 agent 工作流的 `paseo` CLI
- `packages/desktop`:Electron 桌面 app
- `packages/relay`:用于远程连接的 relay 包
- `packages/relay`:daemon 和客户端使用的中继传输与端到端加密包
- `packages/website`:营销站点和文档(`paseo.sh`)
常用命令:
+1 -1
View File
@@ -33,7 +33,7 @@ The relay sees only: IP addresses, timing, message sizes, session IDs, and the p
The daemon requires a valid cryptographic handshake before processing any commands. A compromised relay cannot:
- **Impersonate the daemon to your phone** — Without the daemon's secret key, it cannot derive the shared key, so any traffic it injects fails authenticated decryption on the phone
- **Send commands as you** — The daemon only accepts traffic that decrypts and authenticates under a shared key derived with its own secret key. The phone's keypair is ephemeral per connection, so there is no persistent phone-side secret to steal; protection comes from the daemon's secret key never leaving the daemon.
- **Open a session without pairing** — The daemon's public key is carried only in the pairing offer and is never sent to the relay. With a daemon password configured, the daemon also rejects any relay client that does not send the right password inside the encrypted channel.
- **Read your traffic** — After the handshake every message is encrypted: ChaCha20-Poly1305 in protected mode, XSalsa20-Poly1305 (NaCl box) in legacy mode
- **Forge messages** — Both constructions are authenticated encryption; a tampered message is rejected in either mode
- **Replay old messages** — In protected mode the daemon contributes a fresh ephemeral key to every session and every record carries a strictly increasing counter, so a recorded session cannot be replayed into a new one and a duplicated, reordered, or reflected record closes the session. Legacy mode has neither property: it uses random nonces, and a daemon that still admits legacy clients accepts a recorded legacy transcript (hello, credentials, commands) as a new session. Set `daemon.relay.requireProtectedSecurity: true` to refuse legacy clients once every client you use has updated.
+18 -8
View File
@@ -39,8 +39,8 @@ An unarchived agent may be `closed` without being deleted or archived. Closing r
processes and subscriptions while retaining its Paseo identity, persistence handle, timeline,
workspace, labels, title, usage, attention, timestamps, and parent relationship. Opening or prompting
the agent runs through `ensureAgentLoaded()`, which resumes the durable provider session under the
same Paseo agent ID. Provider history is not appended again when the canonical timeline is already
primed.
same Paseo agent ID. Resume does not read provider history when the agent already has a timeline;
see [owned history](timeline-sync.md#owned-history).
Reload releases the old runtime before resuming its durable session: an idle provider process can
still own an exclusive writer. A close failure retains that runtime for cleanup and blocks the
@@ -152,14 +152,21 @@ Users can also detach an existing subagent from the subagents track. Detach is d
Agent-originated messages and automatic notifications share a recipient-daemon delivery module. A queued receipt acknowledges admission before provider dispatch. The module keeps one ordered queue per recipient, and the recipient reads its prompts in the order the daemon admitted them. Nothing overtakes an older queued message. A prompt takes its place when the daemon admits it, even while the provider is still starting an earlier turn, and a message stays in the queue until the turn that carries it starts. The turn has started when the agent manager acknowledges the run start; a turn that fails after that point is not delivered again.
- **`steer`** (the agent default) waits. An idle recipient gets the queue after two quiet seconds; steady arrivals cannot hold that window open past ten seconds. While the recipient has a running or starting turn (including compaction), the queue waits and is delivered together when that turn ends on its own or fails. The daemon releases it when it observes the recipient settle; a two-second timer also retries.
- **`interrupt`** waits for neither the quiet window nor the turn. It is dispatched at admission as one prompt that replaces the running turn: the messages queued before it, then the interrupt. An older `steer` cannot start a turn after the newer `interrupt` that countermands it.
An agent sender picks `queue`, `steer`, or `interrupt` with `activeTurnBehavior`. `steer` and `interrupt` mean what they mean for a person. A person's send has no `queue`. Each kind of prompt is released this way:
- **`queue`** (the agent default) waits. An idle recipient gets the queue after two quiet seconds; steady arrivals cannot hold that window open past ten seconds. While the recipient has a running or starting turn (including compaction), the queue waits and is delivered together when that turn ends on its own or fails. The daemon releases it when it observes the recipient settle; a two-second timer also retries. Finish notifications and change-request updates always queue.
- **`steer`** waits for neither the quiet window nor the turn. It is dispatched at admission as one prompt that enters the running turn: the messages queued before it, then the steer. A provider that cannot steer, or that refuses this steer, gets the prompt as a replacing turn instead, the same as a person's steer.
- **`interrupt`** is dispatched at admission the same way, as one prompt that replaces the running turn. An older queued message cannot start a turn after the newer `interrupt` that countermands it.
- **A person's prompt** (app, CLI, top-level MCP) is dispatched directly with its existing steer or interrupt behavior and takes the queue along the same way: the messages admitted before it first, then the person's text, in one provider prompt. Messages admitted after it follow it. The person's text keeps its own transcript row. When the turn does not start, the messages return to the queue in their place. That covers a start the provider rejects and a start that is not acknowledged within 60 seconds; a provider that starts the turn after those 60 seconds receives the messages twice.
- **Stop** (the stop button, Escape, `cancel_agent`, a Hub interrupt) starts nothing. Messages admitted before the Stop are held, not dropped, including an interrupt whose turn had not started yet. They go ahead of the recipient's next prompt, in that prompt's turn: a person's prompt, or an agent message or notification admitted after the Stop. A held interrupt no longer interrupts; it waits like a `steer`. A queue step or dispatch decided before the Stop is void, and the queue is held again when the message that reopened it is withdrawn. A replacing prompt, a reload, and a rewind are not a Stop. Neither is `cancel_agent` on a recipient with no running or starting turn: it stops nothing, reports that it canceled no run, and a queued `steer` keeps its quiet window.
- **Stop** (the stop button, Escape, `cancel_agent`, a Hub interrupt) starts nothing. Messages admitted before the Stop are held, not dropped, including an interrupt whose turn had not started yet. They go ahead of the recipient's next prompt, in that prompt's turn: a person's prompt, or an agent message or notification admitted after the Stop. A held steer or interrupt no longer enters the turn; it waits like a queued message. A queue step or dispatch decided before the Stop is void, and the queue is held again when the message that reopened it is withdrawn. A replacing prompt, a reload, and a rewind are not a Stop. Neither is `cancel_agent` on a recipient with no running or starting turn: it stops nothing, reports that it canceled no run, and a queued message keeps its quiet window.
A command the provider accepts out of band is the one exception to admission order: it runs alone without ending the turn. A queued command runs ahead of older messages, and an `interrupt` that runs this way takes no queued message along. A person's command leaves the queue where it is. A prompt is a command when it starts with a slash and a name that has no second slash, so `/compact` is one and `/tmp/build.log is stale` is plain text.
The queued receipt carries the applied behavior and guidance text for the sender. The text comes from two facts known at admission: whether the recipient has a running turn, and whether its provider can steer (`AgentManager.canSteer`, which is true when the session offers `steerActiveTurn`). It does not wait for the outcome. Guidance for a message queued behind a running turn tells the sender to send a short `steer` or `interrupt` follow-up instead of resending, because the follow-up carries the queued message ahead of it and a resend would be read twice. The MCP tool, the WebSocket `send_agent_message_response`, the CLI, and the connected-host path all relay this one text.
One provider prompt has one session mode. A batch released by an interrupt or a person's prompt uses the latest explicit choice in it, the person's own first. Steers with conflicting choices keep separate ordered dispatches.
Older CLIs and connected hosts send an explicit `steer` for every default agent send. The daemon reads an agent sender's `steer` as `queue` unless the client advertises the `agent_active_turn_behaviors` capability. A new client talking to a daemon without `server_info.features.agentActiveTurnBehaviors` sends no behavior for `queue` and refuses a `steer`.
A command the provider accepts out of band is the one exception to admission order: it runs alone without ending the turn. A queued command runs ahead of older messages, and a `steer` or `interrupt` that runs this way takes no queued message along. A person's command leaves the queue where it is. A prompt is a command when it starts with a slash and a name that has no second slash, so `/compact` is one and `/tmp/build.log is stale` is plain text.
One provider prompt has one session mode. A batch released by a steer, an interrupt, or a person's prompt uses the latest explicit choice in it, the person's own first. Queued messages with conflicting choices keep separate ordered dispatches.
The pending message window is in memory. Clean shutdown flushes it, held messages included, before
closing agents; an abrupt crash can lose queued prompts. A durable send receipt remains pending until actual dispatch
@@ -249,7 +256,8 @@ lifecycle is separate from public workspace visibility and is not a public creat
Archive is a **soft delete**: the agent record stays on disk with `archivedAt` set, the runtime is closed, and the agent disappears from active lists. Archive is **global** — it lives on the server and propagates to every connected client.
Archive sets `archivedAt`, invokes the provider's native archive hook, and cascades to managed
children.
children. The timeline and the provider children stay, so an archived chat reads them without its
provider; deleting the agent removes them.
`create_agent_request` can opt an agent into `autoArchive`. In that mode the daemon archives the agent after the first terminal turn event (`turn_completed`, `turn_failed`, or `turn_canceled`). When the agent owns an isolated workspace, auto-archive archives that workspace too; the managed worktree is removed when its final workspace reference is gone.
@@ -345,6 +353,8 @@ Workspace status is an aggregate activity signal computed **per `workspaceId`**.
Running provider-native subagents contribute `running` to the workspace owned by their parent agent. Their completed, failed, and canceled states stay in the parent's subagents track.
Only the parent's current runtime makes a provider child running. A child's stored status is the last report about it, and that report can come from provider history or from a runtime an earlier daemon ran, so a stored `running` child does not make the workspace running or keep the parent's runtime alive. It counts again once the live session reports it running. Closing a runtime cancels the children that runtime reported running; children it never reported keep their stored status.
A finished or failed workspace can be marked unread after it has been reviewed. The daemon restores
attention on its newest eligible workspace-root agent, `error` for an agent whose lifecycle is
`error` and `finished` otherwise, without sending a new notification. Opening a workspace restores
+6
View File
@@ -121,6 +121,12 @@ from `packages/app/android`:
These check terminal arrow ownership, held-key repeats and modifiers, and ordinary text-field editing.
Run the terminal module's tests the same way with `:paseo-terminal:connectedDebugAndroidTest`. Besides
row layout, they check that the terminal input asks the keyboard not to learn what is typed
(`IME_FLAG_NO_PERSONALIZED_LEARNING`), so passwords typed at a prompt stay out of Gboard's
suggestions in other apps. React Native's TextInput has no prop for that flag, and it replaces
`imeOptions` when `returnKeyType` or `disableFullscreenUI` is set, so the terminal input sets neither.
Run the display density regression tests the same way:
```bash
+3 -1
View File
@@ -94,6 +94,7 @@ workspace for a directory clears it. The store lives in memory and resets on dae
| `server/directory-sync/` | Daemon-global latest-state sequences for projects, workspaces, and agents |
| `server/workspace-labels/` | Host-local label catalog, assignment mutations, and explicit subscriptions |
| `server/agent/agent-manager.ts` | Agent lifecycle state machine, timeline tracking, subscriber management |
| `server/agent/timeline/` | Owned agent history, provider children, rewind retirements, behind a backend |
| `server/agent/agent-storage.ts` | File-backed JSON persistence at `$PASEO_HOME/agents/` |
| `server/agent/tools/` | Transport-neutral catalog for workspaces, agents, permissions, and automation |
| `server/agent/mcp-server.ts` | Thin MCP adapter that registers the Paseo tool catalog with the MCP SDK |
@@ -402,7 +403,7 @@ initializing → idle ⇄ running
client-side dedup; the default fetch page is 200 items.
- Timeline row `timestamp` values are canonical daemon-owned timestamps. Providers may supply original replay timestamps, but clients must not guess timestamp trust or hide time UI based on local clock heuristics.
- Events stream to connected clients in real time; correctness is backed by authoritative timeline fetches and paged-to-completion catch-up.
- Agent state persists to `$PASEO_HOME/agents/{cwd-with-dashes}/{agent-id}.json`. Timeline rows are runtime memory; provider history is the durable transcript authority and resumed agents rebuild from it. That storage path is derived from `cwd`, not from workspace id.
- Agent state persists to `$PASEO_HOME/agents/{cwd-with-dashes}/{agent-id}.json`. That storage path is derived from `cwd`, not from workspace id. Timeline rows persist in the daemon database, `$PASEO_HOME/paseo.db`. They are the transcript authority after the first import of provider history. See [owned history](timeline-sync.md#owned-history).
## Right-sidebar boundary: directory-backed vs workspace-owned
@@ -478,6 +479,7 @@ Providers that can accept native tool definitions should set `supportsNativePase
```
$PASEO_HOME/
├── agents/{cwd-with-dashes}/{agent-id}.json # Agent record
├── paseo.db # Daemon database (SQLite): agent timelines
├── projects/projects.json # Project registry
├── projects/workspaces.json # Workspace registry
├── projects/icons/ # Custom project icon images
+4 -34
View File
@@ -133,7 +133,9 @@ A configured URL takes precedence even when unreachable; Paseo reports the conne
An explicitly configured server needs the bridge installed separately. Connect once and start a session: the setup error gives the local package directory. Copy that directory to the server's OpenCode global `plugins` directory, then retry. For a server on another machine, set `PASEO_OPENCODE_BRIDGE_PORT` in the Paseo OpenCode provider environment before starting Paseo, and set `PASEO_OPENCODE_BRIDGE_URL` to the URL the OpenCode server can use to reach that port. For example, an SSH reverse tunnel can expose the Paseo loopback port on the OpenCode host. The bridge token is exchanged through the OpenCode connection and is not written into the plugin package.
OpenCode's custom MCP registrations are shared by all sessions in a location. Paseo rejects custom MCP servers and per-agent process environment overrides on a reused server rather than applying them to other sessions or ignoring them. Session identity is applied to each session's shell environment. A Paseo-owned helper supports custom process and MCP settings; it is selected when there is no explicit URL or healthy registered service.
Agent MCP servers and per-agent environment work on a reused server with OpenCode 2.0.29 or newer. Paseo connects each agent's MCP servers itself and shows their tools only to that agent and its subagents. Other agents in the same directory and your own OpenCode sessions do not see them. The agent's environment applies to its shell commands, its subagents, and its stdio MCP servers.
The provider `env` configures the OpenCode process. When it sets variables other than the connection variables above and `XDG_CONFIG_HOME`, `XDG_STATE_HOME`, or `OPENCODE_CONFIG_DIR`, Paseo ignores a registered service and starts its own helper. With an explicit URL, Paseo reports those variables as an error.
---
@@ -514,7 +516,7 @@ The [Agent Client Protocol (ACP)](https://agentclientprotocol.com) is an open st
ACP agents communicate over JSON-RPC 2.0 on stdio. Paseo spawns the agent process and talks to it through stdin/stdout.
Paseo also ships an in-app ACP provider catalog for common agents, including CodeWhale, Cursor, DeepAgents, DimCode, Gemini CLI, Hermes, Qwen Code, and Kimi Code. Most catalog entries create the same `extends: "acp"` provider config shown below. Hoplite activates its [bundled provider](plugins.md#built-in-plugins) instead.
Paseo also ships an in-app ACP provider catalog for common agents, including CodeWhale, Cursor, DeepAgents, DimCode, Gemini CLI, Hermes, Qwen Code, and Kimi Code. Most catalog entries create the same `extends: "acp"` provider config shown below. Goose, Hermes, and Hoplite activate their [bundled providers](plugins.md#built-in-plugins) instead. An existing `extends: "acp"` entry for goose or Hermes migrates to the bundled provider on load and keeps a custom command. Hermes agents saved with the old adapter resume with their mode translated (`plugins/hermes-provider/server/legacy-modes.ts`).
### Adding a generic ACP provider
@@ -627,32 +629,6 @@ ACP probes use short timeouts and browser-suppression environment variables so a
Ref: [Gemini CLI ACP mode docs](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/acp-mode.md)
### Example: Hermes (Nous Research)
[Hermes](https://github.com/NousResearch/hermes-agent) is an open-source coding agent by Nous Research with persistent memory and multi-provider LLM support. It supports ACP via the `acp` subcommand.
1. Install: `curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash`
2. Install ACP support: `pip install -e '.[acp]'`
3. Configure Hermes credentials in `~/.hermes/`
4. Add to config.json:
```json
{
"agents": {
"providers": {
"hermes": {
"extends": "acp",
"label": "Hermes",
"description": "Nous Research self-improving AI agent",
"command": ["hermes", "acp"]
}
}
}
}
```
Ref: [Hermes ACP docs](https://hermes-agent.nousresearch.com/docs/user-guide/features/acp)
### How ACP providers work in Paseo
When you launch an agent with an ACP provider:
@@ -853,12 +829,6 @@ A config.json with multiple custom providers:
"extends": "acp",
"label": "Google Gemini",
"command": ["gemini", "--acp"]
},
"hermes": {
"extends": "acp",
"label": "Hermes",
"command": ["hermes", "acp"]
}
}
}
+42 -1
View File
@@ -34,7 +34,7 @@ Workspace archive runs lifecycle teardown from the exact `cwd` but removes only
`worktreeRoot` after its last active reference disappears. Worktree recovery recreates that backing
checkout from `mainRepoRoot`, then restores the relative path from `worktreeRoot` to `cwd`.
Paseo uses **file-based JSON persistence** instead of a traditional database. All data is validated at runtime with Zod schemas. Most stores write atomically (write to temp file, then rename); a few still use plain `writeFile` — see each section. There is no schema-versioning/migration framework — schemas rely on optional fields with defaults for forward compatibility, with a small amount of inline normalization in `persisted-config.ts` for legacy provider/speech entries.
Paseo persists most stores as JSON files, and agent timelines in the [daemon database](#daemon-database). JSON data is validated at runtime with Zod schemas. Most JSON stores write atomically (write to temp file, then rename); a few still use plain `writeFile` — see each section. JSON stores have no schema-versioning/migration framework — schemas rely on optional fields with defaults for forward compatibility, with a small amount of inline normalization in `persisted-config.ts` for legacy provider/speech entries.
All server-side stores live under `$PASEO_HOME` (defaults to `~/.paseo`).
@@ -53,6 +53,7 @@ $PASEO_HOME/
├── daemon-keypair.json # E2EE keypair for relay (mode 0600)
├── paseo.pid # Daemon PID lock file
├── local-credential # Per-run local client credential (mode 0600)
├── paseo.db # Daemon database (SQLite, with -wal and -shm files)
├── daemon.log # Default log file (path configurable)
├── agents/
│ └── {sanitized-cwd}/
@@ -102,6 +103,7 @@ Each agent is stored as a separate JSON file, grouped by project directory.
| `config` | `SerializableConfig?` | Agent session configuration (see below) |
| `runtimeInfo` | `RuntimeInfo?` | Live runtime state (see below) |
| `features` | `AgentFeature[]?` | Provider-reported features (toggles/selects) |
| `sessionMetrics` | `AgentMetric[]?` | Provider-reported session metrics, already formatted for display; the latest report replaces the list |
| `persistence` | `PersistenceHandle?` | Handle for resuming sessions |
| `lastError` | `string?` (nullable) | Last error message, if any |
| `requiresAttention` | `boolean?` | Whether the agent needs user attention |
@@ -180,6 +182,45 @@ Terminal activity contributes to the workspace status bucket **per `workspaceId`
---
## Daemon database
`$PASEO_HOME/paseo.db` is one SQLite file that the daemon opens at startup with `node:sqlite`
(`packages/server/src/server/database/`). Agent timelines are its only store today. Each store is a
`SchemaModule`: its own table-name prefix and an append-only list of migrations.
- **Migrations.** Startup runs every module's pending migrations in one transaction, so a failed
migration leaves the file as it was. `schema_versions` records each module's version and
`min_reader_version`. Mark a migration `breaking` when an older daemon cannot read the result,
for example a dropped or renamed column. An older daemon then refuses to start with
`DatabaseSchemaTooNewError`. Additive migrations leave older daemons working, and they ignore
modules they do not know. This matters because the app and the daemon update separately, and a
user can run an older daemon on the same `$PASEO_HOME`.
- **Failure.** A file that SQLite cannot open stops the daemon with `DatabaseOpenError`, which
names the path. The daemon does not delete or recreate the file.
- **Access.** The file holds every prompt and reply, so the daemon sets it and its `-wal` and `-shm`
files to mode `0600` on every open. SQLite gives the WAL files it creates the mode of the database
file.
- **Durability.** The database uses WAL with `synchronous = NORMAL`. A power loss can drop the
last commits but does not corrupt the file.
- **Checkpoints.** A checkpoint syncs the file to disk and takes up to 100 ms. SQLite's
auto-checkpoint runs it on the committing thread, which stalled the event loop during streaming.
The daemon turns it off and checkpoints from a worker thread with its own connection. If the
worker exits, the daemon turns auto-checkpoint back on.
- **Transactions.** `write` and `read` callbacks are synchronous, so a transaction never spans an
`await` and transactions never interleave.
- **Node.** `node:sqlite` needs Node 22.16 or later. Node 22 prints an experimental warning once,
when the daemon opens the database.
### Agent timelines
`AgentTimeline` owns each agent's history, and its SQLite backend stores the projected rows, the
source ranges, retirements, the open rewind, and provider children in `timeline_*` tables. The text
of a streamed assistant or reasoning message is stored as one chunk per source event, beside its
row, so a chunk never rewrites the message. An earlier file store rewrote the whole transcript on
every update. See [owned history](timeline-sync.md#owned-history).
---
## 2. Daemon Configuration
**Path:** `$PASEO_HOME/config.json`
+2 -2
View File
@@ -78,7 +78,7 @@ In the composer, the first glyph's ink starts on the text column's edge, and the
One gate, `resolveControlSizing`, picks touch or pointer sizing: touch when the layout is compact or touch is the primary input. An iPad with the sidebar docked is wide and touch-sized; a desktop is pointer-sized; a phone is both compact and touch. The primary input comes from `(pointer: coarse)` (`hasTouchPrimaryPointer` in `hooks/pointer-capabilities.ts`), not from whether a touch screen exists: WebKit keeps touch primary on an iPad with a trackpad attached, and Chromium reports a fine primary pointer for a laptop with a touch screen that its trackpad drives. The fact is read once at startup: attaching a pointer to a tablet does not shrink its controls, and a 2-in-1 launched with a pointer keeps pointer sizes after it switches to tablet mode until the app reloads. Stylesheets take sizes from `bySizing({ touch, pointer })`, which resolves to a breakpoint value, so a caller never sees which sizing it got. Rows, icon buttons and icon slots take theirs from `styles/density.ts`, which uses the same gate. An `{ xs, md }` literal for a hit target or glyph is wrong: on an iPad it yields the pointer size.
Buttons are pills (`borderRadius.full`) with medium-weight labels; an icon-only button is a circle. `<Switch>` follows the same two sizes: a 34×20 track by default and in `sm`, 44×26 where controls are touch-sized, and it reserves its size's control height so a row holding one lines up with a row holding a button. Buttons, text fields, dropdown triggers, and `<SegmentedControl>` (`packages/app/src/components/ui/segmented-control.tsx`) share the size contract — the same size name means the same height and label size on every control kind, so controls in one row line up. Segments run tighter than a button, because the gap between segments already reads as padding. The selected segment is a `surface3` fill with `foreground` text, not an inverted one — inverting it inside thin chrome puts a white slab in the toolbar. A settings row sizes the controls in its trailing slot itself, default in a card and `sm` when nested (`packages/app/src/components/ui/control-size.tsx`), so don't pass a size to a button, dropdown or field placed in a row. Code that computes with a control's height outside a stylesheet uses `controlHeightForLayout`. Never shrink a control's font or padding locally to fit a context — if the context needs a smaller control, the size tier is missing or the wrong one is in use.
Buttons are pills (`borderRadius.full`) with medium-weight labels; an icon-only button is a circle. `<Switch>` follows the same two sizes: a 34×20 track by default and in `sm`, 44×26 where controls are touch-sized, and it takes presses over its size's control height without adding that height to its row. Buttons, text fields, dropdown triggers, and `<SegmentedControl>` (`packages/app/src/components/ui/segmented-control.tsx`) share the size contract — the same size name means the same height and label size on every control kind, so controls in one row line up. Segments run tighter than a button, because the gap between segments already reads as padding. The selected segment is a `surface3` fill with `foreground` text, not an inverted one — inverting it inside thin chrome puts a white slab in the toolbar. A settings row sizes the controls in its trailing slot itself, default in a card and `sm` when nested (`packages/app/src/components/ui/control-size.tsx`), so don't pass a size to a button, dropdown or field placed in a row. Code that computes with a control's height outside a stylesheet uses `controlHeightForLayout`. Never shrink a control's font or padding locally to fit a context — if the context needs a smaller control, the size tier is missing or the wrong one is in use.
A `<Pressable>` wrapping a `<Text>` is a sixth variant. It is wrong. `<Button>` accepts `style`, `textStyle`, `leftIcon`, `disabled`, `size`, and `variant`.
@@ -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.
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 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. Every row is at least as tall as one holding a switch, so text rows, switch rows and rows that open something (`<SettingsDetailRow>`, a collapsible row's header) line up. A row holding a button or a select is taller. 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`).
+6 -6
View File
@@ -575,8 +575,9 @@ where the overrides apply; workspace scripts still find the binary through the r
## Dependency signature audit
The `quality` CI job runs `npm audit signatures`. It verifies every lockfile package's registry
signature and, for packages published with provenance, fetches
The [pre-release dependency checks](release.md#pre-release-dependency-checks) include
`npm audit signatures`. The command verifies registry signatures and, for packages published
with provenance, fetches
`/-/npm/v1/attestations/<name>@<version>` from the registry. Cloudflare caches that document
for a year. An edge that cached it in the seconds before the registry attached the publish
attestation keeps serving a document with only the provenance bundle, and npm fails with:
@@ -587,11 +588,10 @@ npm error <name>@<version> has attestations but no corresponding public key(s) c
```
The same package's registry signature verified a moment earlier with the same keys, so the
key list is intact. The failure names one package, repeats only for that package, and depends
on the Azure region the runner landed in, because each region maps to one Cloudflare colo. A
rerun passes only by landing elsewhere.
key list is intact. The failure names one package and depends on which Cloudflare edge serves
the cached attestation.
To confirm, fetch the URL from several runners and compare `content-length`, the `cf-ray` colo
To confirm, fetch the URL from several regions and compare `content-length`, the `cf-ray` colo
suffix, and the number of `attestations` entries (#7730 has the probe). To fix, remove or
replace that version in the lockfile. If the dependent’s range cannot be changed, pin a clean
version in root `overrides`. Report the URL to npm so they purge it.
+16
View File
@@ -146,6 +146,22 @@ quietly relying on:
The fix for transforms is Gotcha 3. The fix for context is Gotcha 7.
### The portal patch
`patches/@gorhom+portal+1.0.14.patch` moves portal state out of the provider's
context value and into a store each `PortalHost` subscribes to. Upstream keeps
every host's portals in one context value at the app root, so each portal mount,
update and unmount changed that value and React searched every mounted fiber
for consumers. That cost grows with the retained panels: a hover card took
about 3 ms of it in a fresh window and 16 ms after a few hours. With the store,
a portal change renders only its own host.
Do not put per-overlay state in a context that wraps the app for the same
reason. Give the consumers a store to subscribe to.
The patch also keys each portal in its host (upstream PR #62). Without the key,
closing one overlay remounted every later overlay in the same host.
## Gotcha 3 — Keyboard layout and portal anchors
`composer/dock` owns the stationary viewport, bottom-anchored surface, composer
+1 -1
View File
@@ -57,7 +57,7 @@ Authoritative terminology. UI label wins. Don't invent synonyms; use what's here
- **Agent controls** — Provider, model, mode, thinking, and provider-feature controls for an agent or draft agent. Code: `AgentControls` / `DraftAgentControls` (`packages/app/src/composer/agent-controls/index.tsx`). Forbidden: "Agent status bar".
- **Composer footer** — Optional area rendered below the composer input but still inside the keyboard-shifted composer layout. Code: `Composer.footer` (`packages/app/src/composer/index.tsx`).
- **Composer track** — A contextual lane at the foot of a pane, by the composer input. Specific tracks use the `<thing> track` form: **Queue track**, **Subagents track**, **Tasks track**. The subagents and tasks tracks are pills floating over the transcript, each opening a panel with its rows; the queue track is a lane inside the composer itself. Code: queue track inside `Composer` (`packages/app/src/composer/index.tsx`), pill and panel frame in `packages/app/src/composer/tracks.tsx`, `SubagentsTrack` (`packages/app/src/subagents/track.tsx`), `AgentTaskList` (`packages/app/src/composer/task-list/index.tsx`).
- **Steer** — A follow-up admitted into an agent's already-running turn instead of interrupting it. Interrupting the turn discards steers the provider has not read yet; there is no take-back short of that, and no provider offers one. The stop button and Escape both interrupt. A steer the provider never read keeps its transcript row, matching Codex. Sending while the agent waits on a permission denies that request first, so the message reaches the same turn instead of stalling behind it. UI: "Send and steer". Code: `steerActiveTurn` (`packages/server/src/server/agent/agent-sdk-types.ts`). Don't confuse with **Queue track**, which holds messages client-side until the turn ends and never enters the running turn. Forbidden: "Delivery", "Queued prompt".
- **Steer** — A follow-up admitted into an agent's already-running turn instead of interrupting it. Interrupting the turn discards steers the provider has not read yet; there is no take-back short of that, and no provider offers one. The stop button and Escape both interrupt. A steer the provider never read keeps its transcript row, matching Codex. Sending while the agent waits on a permission denies that request first, so the message reaches the same turn instead of stalling behind it. UI: "Send and steer". Code: `steerActiveTurn` (`packages/server/src/server/agent/agent-sdk-types.ts`). Don't confuse with **Queue track**, which holds messages client-side until the turn ends and never enters the running turn. An agent sender's `activeTurnBehavior: "steer"` (CLI `--behavior steer`) means the same as a person's steer. Agent senders default to `queue` instead: the daemon holds the message until the running turn ends, as the queue track does for a person. Forbidden: "Delivery", "Queued prompt".
- **Subagent** — User-facing term for an agent session related to a parent agent session. Use **subagents** in UI copy and docs. Internal daemon/provider plumbing may say "child agent" or `child_session`, especially for provider-managed imports; do not surface "child agent" as a product term.
- **Attachment tray** — The selected-attachments row inside the composer input, above the text input. Code: `renderAttachmentTray` (`packages/app/src/composer/index.tsx`). Forbidden: "Attachment bar".
- **Fork** — Starting a NEW agent session seeded with a copy of another session's curated chat history. The history rides along as a `chat_history` composer attachment on a draft; the fork does **not** resume or branch the provider-side session, and the source session keeps running untouched. Two targets, one surface, one RPC (`agent.fork_context`, gated on the `agentForkContext` host feature). UI: the fork menu lives in the assistant turn footer and offers "Fork in a new tab" / "Fork in a new workspace". On a **completed** turn it sits beside the copy button and pins a boundary to that turn, so the fork stops where the turn ended. On the **in-flight** turn it sits beside the progress loader and elapsed timer, and omits the boundary entirely — `selectForkContextRows` projects the whole timeline when no boundary is given, so the fork captures everything **up to now**, including the response still streaming. That omission is what makes mid-run forking work; pinning a boundary there would silently drop the live response. Forbidden on provider-subagent (read-only) panes. Code: `useForkAgent` (`packages/app/src/hooks/use-fork-agent.ts`), `selectForkContextRows` (`packages/server/src/server/agent/activity-curator.ts`). Don't confuse with: git fork (unrelated; Paseo has no such concept), **Worktree** (filesystem isolation, not history copying).
+3 -2
View File
@@ -72,8 +72,9 @@ hashes, never prompts, environment values, or credentials.
Before messaging an archived workspace, call `workspace.recovery.inspect.request`, then
`workspace.recovery.restore.request` and await success. The native message handler unarchives the
agent and loads its persisted provider session. `activeTurnBehavior: "steer"` uses the provider's
native steering behavior, including Paseo's existing behavior when that provider cannot steer.
agent and loads its persisted provider session. A Hub message is a direct send (no `sourceAgentId`), so
`activeTurnBehavior: "steer"` uses the provider's native steering and interrupts the running turn
when that provider cannot steer. The daemon rejects `queue` on a direct send.
Execution completion and arrival-specific output authority remain Hub responsibilities.
The older `hub.execution.*` RPCs remain accepted for existing clients. Their execution ownership
+29 -6
View File
@@ -14,19 +14,42 @@ Workspace file links use the shared file-link resolver. The workspace supplies i
Pass `external` for author-controlled Markdown from outside the host, such as a plugin README. It follows the registry's overview contract in `packages/protocol/src/plugin-overview.ts`, which the website also uses: only absolute https links and images work, and any other destination renders as its label or alt text. The parser still autolinks bare `http://`, `www.` and email text, so a link press checks the URL again and opens only https. None of the workspace recognition above applies, so `Node.js` is prose, not a file. The lines of a paragraph join, as they do on the README's forge.
Resolve workspace image paths over the existing session RPC, then give the library a cached native file URL or web blob URL. HTTP(S) images pass through unchanged. This preserves relay, SSH and local socket connections, which do not expose a daemon HTTP endpoint. Each mounted renderer owns its image acquisition identity, so a later reply reads a rewritten path again while the earlier mounted reply retains its snapshot. Image taps open the attachment lightbox. File previews resolve relative images against the Markdown file's directory. An image alone on its line becomes its own paragraph before the library sees it, so it renders as a block on every platform; the library only treats sole-child paragraph images as blocks, and with hard soft breaks every newline is a break node, which left own-line images inline on iOS and web. Images that share a line with text stay inline at line height and keep their aspect ratio. A linked image counts as an image, so review-bot badges such as `[![Retrigger](badge.svg)](url) Confidence` stay inline on web; the library's web renderer only checked direct paragraph children, so it rendered them as full-width block images (local patch in `patches/react-native-enriched-markdown+*.patch`).
Resolve workspace image paths over the existing session RPC, then give the library a cached native file URL or web blob URL. HTTP(S) images pass through unchanged. This preserves relay, SSH and local socket connections, which do not expose a daemon HTTP endpoint. Each mounted renderer owns its image acquisition identity, so a later reply reads a rewritten path again while the earlier mounted reply retains its snapshot. Image taps open the attachment lightbox. File previews resolve relative images against the Markdown file's directory. An image alone on its line becomes its own paragraph before the library sees it, so it renders as a block on every platform; the library only treats sole-child paragraph images as blocks, and with hard soft breaks every newline is a break node, which left own-line images inline on iOS and web. Images that share a line with text stay inline at line height and keep their aspect ratio. A linked image counts as an image, so review-bot badges such as `[![Retrigger](badge.svg)](url) Confidence` stay inline on web; the library's web renderer only checked direct paragraph children, so it rendered them as full-width block images (fixed in the fork).
## The fork
The library is a private workspace, `packages/react-native-enriched-markdown`. It is upstream [enriched-markdown](https://github.com/software-mansion/enriched-markdown) at npm `1.2.0-nightly-20261014-766fc0e67` (upstream commit `766fc0e67`) plus Paseo's changes, which lived in a `patch-package` patch until the package moved into the repository. It is never published. Keep the name `react-native-enriched-markdown`: autolinking, the Gradle project `:react-native-enriched-markdown`, the CocoaPods spec and app imports all use it.
The package keeps the npm tarball's layout, including its build output:
- Metro, Vitest and TypeScript load `lib/`, not `src/`. A JavaScript change edits `src/` and the matching `lib/module` and `lib/typescript` files.
- `android/generated` and `ios/generated` are checked-in codegen output (`includesGeneratedCode`). A change to a native component spec regenerates both; `scripts/postinstall-patches.test.mjs` compares them against the specs.
- `src/web/wasm/md4c.js` and `lib/module/web/wasm/md4c.js` are an Emscripten build of `cpp/md4c`. A parser change rebuilds them with upstream's `packages/core/cpp/wasm/build.sh`.
- Upstream's Gradle, CMake and CocoaPods scripts detect upstream's own monorepo by the paths `packages/core` and a root `vendor/`. Do not add either path to this repository.
- `postinstall.mjs` downloads the tree-sitter grammars into the ignored `cpp/highlight/vendor/grammars` and `vendor/tree-sitter`. The `enriched-markdown` block in `packages/app/package.json` chooses the languages.
CI does not build native code or run the fork's Robolectric suites. Run `npm run test:android --workspace=@getpaseo/app` for Android changes. Native changes require a client rebuild; JavaScript refresh cannot enable compiled grammars.
Some fork changes are backports. A sync past the upstream version drops them in favour of upstream's code:
| Fork change | Upstream | Released in |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- |
| Android measurements survive parent clones | [#924](https://github.com/software-mansion/enriched-markdown/pull/924) | after `1.2.0-nightly-20261019-926ef06f0` |
| Android nested list items start their text after their own marker | [#1015](https://github.com/software-mansion/enriched-markdown/pull/1015), [#1023](https://github.com/software-mansion/enriched-markdown/pull/1023) (Android) | `1.2.0` |
## Engine constraints
The pinned nightly has the same React Native package and core source trees as upstream commit `73ac5085eb1fdc743973b3473d4dba65abad5261`. Compatibility was checked with React Native 0.81.5. Native dependencies must be rebuilt when changing the highlighting configuration; JavaScript refresh cannot enable compiled grammars.
Math and video are disabled. Task lists and admonitions are enabled; task checkboxes are read-only. Source adaptation spaces adjacent empty GFM table delimiters before escaping prose spoiler delimiters and decodes entity text before the engine can discard it. Code spans and fences keep their literal source. Comment HTML is normalized to Markdown before parsing; details show their summary and body expanded.
Mermaid fences use the existing isolated diagram runtime and fullscreen viewer. Web dispatches them through the library’s code-block override. Native has no block-renderer hook, so the renderer extracts only Mermaid fences and places the existing WebView host between library-rendered segments. This is the only block exception; see [native selection limitations](native-text-selection.md) for diagram grouping and leading inline images. Streaming keeps the last valid diagram visible while the next revision renders.
Native code blocks use the library's copy control and compiled grammars. Web code blocks use `HighlightedCodeBlock` through the library's `renderers.codeBlock` override. Selection copy has to tell links Paseo recognized in the text (paths, forge references, code spans) from links in the Markdown, so the web link renderer marks the recognized ones. Plain-text paste carries them as the text the reply showed, and rich paste keeps them as links only when they point to an `http` or `https` URL. Authored links and parser autolinks such as a bare `www.example.com` copy as links. The 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.
Code blocks and plain quotes have a copy control in their top trailing corner. Native code blocks use the library's compiled grammars. On native, the code block and quote container views share one control (`HeaderCopyButton` on Android, `ENRMHeaderCopyButton` on iOS). A quote reserves the code block's header band above its body, so the control never covers quote text at any font size. On web, code blocks use `HighlightedCodeBlock` through the library's `renderers.codeBlock` override, and quotes use `WebBlockquote` through `renderers.blockquote`. Both use `BlockCopyButton`. On compact layouts the control is always visible, so the web quote reserves a band above its body, as native does. On wide layouts the control appears on hover or focus, so the quote keeps a right gutter instead; a band there would leave an empty strip above every quote.
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.
A quote copies its body without the `>` markers, with its nested Markdown, and reads the content at the time of the press, so a streaming quote copies what it shows. A nested quote or code block keeps its own control. Web quote copy uses the same two clipboard flavors as selection copy: `text/plain` is unescaped Markdown and `text/html` is rendered from escaped Markdown. A rendered Mermaid diagram copies as its fence because its wrapper carries the fence source. Native quote copy serializes the quote's parsed Markdown, so a workspace image copies as its cached file URL, as native selection copy does; native has no map back to the workspace path. A native Mermaid diagram in a quote renders outside it (see [native selection limitations](native-text-selection.md)), so each quote fragment copies only its own text. Admonitions get no control: web renders them with a separate library renderer. On web an admonition inside a copied quote copies as its `> [!TYPE]` source; the fork marks the box and its generated title for this. Selection copy keeps the text it shows, because the cloned range cannot tell a whole callout from part of one. On native, quotes inside list items get no control, because they render as text spans in the item. Web renders them as blocks, so they get one.
Selection copy has to tell links Paseo recognized in the text (paths, forge references, code spans) from links in the Markdown, so the web link renderer marks the recognized ones. Plain-text paste carries them as the text the reply showed, and rich paste keeps them as links only when they point to an `http` or `https` URL. Authored links and parser autolinks such as a bare `www.example.com` copy as links. The fork also keeps the library's block spacing around the web code block override, preserves web list numbering and link titles, marks pending parses with `aria-busy` so Find waits for rendered text, and carries link syntax through native and web tap events. Web inline code inside a link inherits only the link colour; its code font, size and background stay intact. Keep link variants colour-only: native pills replace text runs and prevent paths from wrapping; Android pills also use the surrounding block’s font size. [Upstream PR #997](https://github.com/software-mansion/enriched-markdown/pull/997) tracks these changes.
The fork also keeps overflowing native horizontal blocks in control of their drags: Android claims parent interception at touch-down and releases it for vertical drags so the chat list can scroll; iOS keeps its scroll recognizer active for outward drags at the leading edge. This prevents compact sidebar pans from taking block scrolling without changing sidebar swipes on prose or non-overflowing blocks. Native changes require a client rebuild.
On iOS a newly mounted Markdown view paints empty for a frame or more after it is laid out at its measured height: the library parses even a view's first content on a background queue and applies it in a later main-queue turn. Expanding a turn in chat therefore shows its rows in place with the text arriving a frame later (165 ms when the mount keeps the main thread busy). Android paints the text in the first frame. Rendering a view's first content synchronously fixes the frame but costs frame time when a fling mounts history rows, so the app keeps the library's behavior until [enriched-markdown #1131](https://github.com/software-mansion/enriched-markdown/issues/1131) is resolved.
@@ -36,4 +59,4 @@ The library determines how incomplete Markdown appears during streaming. Complet
## Verification
Follow [QA](qa.md) and [mobile testing](mobile-testing.md). Exercise chat, file preview, plan and PR content on all three platforms. Include cross-paragraph selection, progressive streaming, a file-link tap, code copy/highlighting, a table and a workspace image. On iPad, repeat preview selection after opening and closing Explorer and after rotation. Check web find, selection-copy and source-message navigation after DOM changes.
Follow [QA](qa.md) and [mobile testing](mobile-testing.md). Exercise chat, file preview, plan and PR content on all three platforms. Include cross-paragraph selection, progressive streaming, a file-link tap, code copy/highlighting, quote copy (nested quote, code block in a quote, admonition, large font on native), a table and a workspace image. On iPad, repeat preview selection after opening and closing Explorer and after rotation. Check web find, selection-copy and source-message navigation after DOM changes.
+14 -3
View File
@@ -118,7 +118,7 @@ appear in the plugin catalog. Editing one in development requires a daemon resta
Directory, Git, and npm installs cannot use a built-in ID.
A provider registration with `requiresConfiguration: true` participates only while its ID exists
under `agents.providers`. Hoplite and fx use this for catalog opt-in. Add writes `{ "enabled": true }`
under `agents.providers`. Hoplite, fx, goose, and Hermes use this for catalog opt-in. Add writes `{ "enabled": true }`
without `extends`, so it selects the bundled adapter. Remove deletes the config entry; setting
`enabled: false` keeps the entry. The bundled JavaScript still loads at startup, but an absent
provider does not enter executable resolution or catalog discovery.
@@ -583,8 +583,12 @@ daemon launch from `connect` and the per-session env and MCP servers from `sessi
no provider reload input.
For an ACP command, register `runAcpProvider({ id, label, command })` from
`@getpaseo/plugin/server/acp`. Its transformer hooks cover narrow vendor differences; do not translate the
whole provider event stream. The shim uses the resolved launch for every probe and session, overlaying
`@getpaseo/plugin/server/acp`. The shim builds the standard row for each ACP tool `kind`
(`acp-internal/tool-call-detail.ts`). Its transformer hooks cover narrow vendor differences; do not translate the
whole provider event stream. A `toolCall` transformer sees the raw `input`, `output` and `content`, and a
`detail` it sets replaces the standard row. Parse vendor display text defensively and return the call
unchanged when the shape does not match, so an upstream format change falls back to the standard row
(`plugins/hermes-provider/server/terminal-command.ts`). The shim uses the resolved launch for every probe and session, overlaying
only the supplied per-session env for sessions. The direct and ACP examples live in
`plugin-examples/provider-direct`
and `plugin-examples/provider-acp-transformer`.
@@ -879,6 +883,13 @@ its Zod schema, and mounts the component inside the normal plugin runtime and er
optional output `id` distinguishes several stable replacements from the same source item; its output
index is the default.
Each replacement keeps a reference to the source row (`source` on the projected stream item), and
turn logic reads a replaced reply through it. A reply split into several cards stays one reply: turn
folding keeps every card visible, and the turn footer hangs under the last card, copies the original
reply text once, forks at its message, and shows its duration and stats. Read the reply with
`getAssistantReply` (`packages/app/src/types/stream.ts`) instead of checking `kind ===
"assistant_message"`.
Transformers run synchronously and must be deterministic. When several transformers match, the
first one that returns a result owns that source item. Plugin and registration ordering is stable.
See `plugin-examples/timeline-items` for the complete contract.
+24 -3
View File
@@ -171,7 +171,7 @@ V2.0.4 also removed the activation endpoint that gated a cold location, and a co
Paseo installs its OpenCode tool bridge through `OPENCODE_CONFIG_CONTENT`. V1 accepts a plugin file; v2 silently skips configured files and requires a package directory with a server entry point. Both versions use the daemon's private loopback bridge for caller-scoped tools. The global manifest must use agent-scoped schemas before a session is bound, because every bridge call executes in an agent session. V2 discovers definitions from each bound session's catalog: plugin-contributed tools can be absent from the global manifest, and an allowlist cannot register a missing definition. Registration is location-wide, so session filtering and caller-scoped execution must remain in place. Bridge context lives only in daemon memory and is removed when the Paseo session closes. The content-addressed plugin artifacts contain no session data or secrets. V2 also needs this plugin when native Paseo tools are disabled: its prompt API has no structured-output format, so the plugin supplies a schema-validated final-answer tool.
An agent with custom environment variables or user-configured MCP servers gets a dedicated OpenCode server. V2 supports session environment, but its MCP configuration remains location-scoped, so separate servers still prevent one agent from changing another agent's MCP setup. Configure custom MCP with `mcp.add`; do not follow it with `mcp.connect`, which only toggles config-backed servers.
No v2 agent gets a dedicated OpenCode server, because a reused server cannot provide one. OpenCode's MCP configuration is location-scoped, so Paseo never calls `mcp.add` for an agent. The daemon connects the agent's MCP servers itself (`v2/session-mcp.ts`), and the v2 plugin exposes their tools under OpenCode's native `<server>_<tool>` names. Each name registers once per location. The plugin's `context` hook gives each session its own definition and removes the tool from other sessions. If the user's own OpenCode configuration registered a tool with the same name first, other sessions keep that tool and its execution. Execution routes to the calling session's root binding. The hook also adds the servers' instructions to each request. OpenCode loads instruction entries before the hook runs, so an entry written when a child is adopted would miss the child's first request. The plugin calls OpenCode's `permission.assert` before each call, so `toolPolicy.preapproved` grants still apply. That API exists from OpenCode 2.0.29. Bind reports `features.mcpTools`, so an older server or a stale plugin fails the session at creation instead of hiding its tools. Per-agent `launch.env` reaches shells through `session.environment`, which child sessions do not inherit. The plugin asks the daemon to adopt each descendant in its first `context` hook, before its first model request.
OpenCode owns user message IDs. Do not pass Paseo-generated IDs to OpenCode prompt APIs; let OpenCode create `msg*` IDs and record the user timeline item from the `message.updated` event.
@@ -221,11 +221,32 @@ Plugin callbacks follow the same contract; see [plugin providers](plugins.md#con
`ProviderSnapshotManager` owns one refresh deadline per provider. The deadline starts before the
availability check and covers that check plus the complete catalog probe. Providers that make
multiple catalog requests must not apply this deadline separately to each request. The manager
aborts the shared refresh signal at the deadline. Providers name active catalog operations and
aborts the shared refresh signal at the deadline, and when it stops. Shutdown waits for running
probes to settle before it shuts down provider clients, so a probe cannot start provider work,
such as an OpenCode server, after its client has cleaned up. Providers name active catalog operations and
finish subprocess, server, or session cleanup before rejecting. Timeout errors list the operations
that were still active when the deadline expired.
Catalogue results stay cached by identity until explicit refresh or a change to that provider's configuration.
Catalogue results stay cached by identity until a refresh or a change to that provider's configuration.
Providers change their model lists on the server without a CLI update, so the daemon refreshes
each enabled provider about every 30 minutes (`ProviderRefreshSchedule`). One timer ticks
`30 min / enabled providers` apart, and each tick starts at most one refresh: the provider refreshed
longest ago, if that was a full interval ago. Ticks do not wait for refreshes, so a provider that
probes many workspace targets does not delay the others, and provider CLIs never start in a burst.
Any forced refresh, configuration change, or newly enabled provider counts as a refresh and pushes
that provider's next one back a full interval.
The background refresh takes the settings refresh path for one provider, with these differences:
- It joins discovery already in flight.
- It passes `force: false`, because providers treat `force` as a requested hard refresh. OpenCode
rotates its shared server on it.
- An unchanged catalogue keeps the published record and its `fetchedAt`, so idle clients receive
no update.
- A result that is not ready, or a catalogue the provider marks `incomplete`, keeps a ready
catalogue. Plugin status probes report a failed startup as unavailable, so that counts as
transient. Set `ProviderCatalog.incomplete` when discovery fails and you fall back to a partial
list, as Claude does when model discovery times out. A manual refresh still publishes all three.
Keys are resolved on each read so project configuration can select a different cached catalogue.
Selector opening may read a loading or stale query, but does not force provider probing.
+71 -27
View File
@@ -17,6 +17,7 @@ A release has exactly two steps. The agent does the first, the user authorizes t
run `npm run release:prep:<mode>` to create the `chore(release): cut <version>` commit without a tag
- push the `release/vX.Y.Z` or `release/vX.Y.Z-beta.N` branch and confirm its `CI` and
`Desktop Packages` runs pass (never wait on `main` CI)
- run the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
**Go-ahead** (user says "go ahead"):
@@ -107,6 +108,7 @@ An explicit user instruction can select another base.
`CI` (all 21 jobs) and `Desktop Packages` (Linux user-namespace smoke) in their own concurrency
groups, isolated from `main` traffic. Never wait on `main` CI, because `main` cancels in-progress
runs on every merge. Wait for both runs on the release branch commit to pass before shipping.
Complete the [pre-release dependency checks](#pre-release-dependency-checks) on that commit.
Pushing a `release/**` branch without a `v*` tag triggers no publish workflows.
6. After go-ahead, run `npm run release:ship` (stable) or `npm run release:ship:beta` (beta). This
publishes to npm and pushes the `v*` tag on the already-verified commit. Because the release
@@ -126,7 +128,9 @@ shipping while `0.13.3-beta.2` soaks. Never republish or reuse a shipped version
as the next unused patch beta, `0.13.4-beta.1`, from the tested beta tag. No `version:all:*` mode
computes that from a prerelease, so run `npm run release:check`, bump with
`npm version 0.13.4-beta.1 --include-workspace-root --no-git-tag-version && git commit -m "chore(release): cut 0.13.4-beta.1"`,
push the release branch for `CI` and `Desktop Packages`, then ship with `npm run release:ship:beta`.
push the release branch for `CI` and `Desktop Packages`, and complete the
[pre-release dependency checks](#pre-release-dependency-checks) before shipping with
`npm run release:ship:beta`.
Record the tested beta tag as its source so its soak still counts for the unchanged content.
## Release inventory
@@ -234,6 +238,7 @@ npm run release:prep:minor
# 2. Push the release branch and wait for CI + Desktop Packages on this commit.
git push -u origin HEAD
# Complete the pre-release dependency checks on this commit.
# 3. After go-ahead and green release-branch checks: publish npm and push the tag.
npm run release:ship
@@ -269,7 +274,8 @@ npm run release:check # Typecheck, build, dry-run pack
npm run version:all:patch
npm run version:all:minor
git push -u origin HEAD # Trigger CI + Desktop Packages on release/vX.Y.Z
# Wait for CI and Desktop Packages on this branch to pass, then after go-ahead:
# Wait for CI and Desktop Packages and complete the pre-release dependency checks.
# After go-ahead:
npm run release:publish # Publish to npm (idempotent, with propagation + beta dist-tag sync)
npm run release:push # Create tag vX.Y.Z on HEAD and push (triggers release workflows)
```
@@ -286,6 +292,7 @@ npm run release:prep:beta:next # Cut X.Y.Z-beta.2, beta.3, ...
# 2. Push the release branch and wait for CI + Desktop Packages to pass:
git push -u origin HEAD
# Complete the pre-release dependency checks on this commit.
# 3. After go-ahead:
npm run release:ship:beta
@@ -293,7 +300,8 @@ npm run release:ship:beta
# Later, after soak, promote on release/vX.Y.Z:
npm run release:prep:promote
git push -u origin HEAD
# Wait for CI + Desktop Packages to pass, then after go-ahead:
# Wait for CI + Desktop Packages and complete the pre-release dependency checks.
# After go-ahead:
npm run release:ship
```
@@ -329,22 +337,21 @@ Drafts do not appear in GitHub's releases feed. Updater clients continue to see
### Default behavior
`npm run release:prep:patch` or `npm run release:prep:minor` → push release branch → green checks → `npm run release:ship` → tag push → 36h ramp. No extra action needed.
Follow the [standard stable release procedure](#standard-release-stable). The tag push starts
the desktop release workflow, which sets a 36-hour rollout when it publishes the release.
The `rollout_hours` input on `desktop-release.yml` is **only read on `workflow_dispatch`** — tag-push runs always default to 36. To get any other rollout duration on a fresh release, use the post-publish flip below.
### Instant-admit release (rollout_hours=0)
Tag-push runs from `npm run release:ship` always stamp 36 hours. To admit everyone immediately (hotfix, doc-only change, a release you want out fast), ship the release normally, wait for it to publish, then flip the manifests:
Follow the [standard stable release procedure](#standard-release-stable). Wait for Desktop
Release to publish, then update the manifests to admit everyone immediately.
```bash
# 1. Ship the verified release branch (36h ramp from tag push).
npm run release:ship
# 2. Wait for Desktop Release to publish the GitHub Release.
# 1. Wait for Desktop Release to publish the GitHub Release.
gh run watch <desktop-release-run-id> --exit-status
# 3. Flip the published manifests to instant admit.
# 2. Flip the published manifests to instant admit.
gh workflow run desktop-rollout.yml \
-f tag=v0.1.64 \
-f rollout_hours=0
@@ -390,7 +397,8 @@ gh workflow run desktop-release.yml \
-f rollout_hours=6
```
This does **not** apply to fresh releases shipped via `npm run release:ship` — tag-push runs always stamp 36. For a fresh release with a custom ramp, ship normally and then dispatch `desktop-rollout.yml` (same pattern as the instant-admit flow above, with your chosen `rollout_hours`).
For a fresh release with a custom ramp, follow the [instant-admit procedure](#instant-admit-release-rollout_hours0)
and set `rollout_hours` to your chosen duration.
### Releasing during an active rollout
@@ -659,6 +667,7 @@ No prefix (`v`), no extra text. `Release Notes Sync` matches the `## X.Y.Z` (or
- `CHANGELOG.md` holds stable releases and at most one entry for the current beta series.
- The first beta of a version inserts a top entry like `## 0.1.60-beta.1 - YYYY-MM-DD`.
- Each subsequent beta rewrites that entry in place: the heading becomes the new beta number and date, and the body describes the full change from the previous stable release to this beta. Never add a second beta entry.
- The entry announces changes and leaves setup steps, click paths, migration notes, configuration keys, hedges and edge cases to product docs. The headline change is the first highlight. [Changelog conciseness](#changelog-conciseness) and [Changelog ordering](#changelog-ordering) hold the rules.
- The entry is a list of changes, not of PRs. When a later beta reverts, reworks, or follows up on something an earlier beta added, rewrite the bullet to the current behavior or delete it. A stable user never saw the earlier beta behavior, so fixes to it are not "Fixed" bullets.
- Anything that already shipped to stable through a patch release on an older line stays out of the beta entry.
- Stable promotion renames the entry to `## 0.1.60 - YYYY-MM-DD` after a final review.
@@ -714,14 +723,30 @@ claims a general improvement, rewrite it with the concrete change.
## Changelog conciseness
Every section bullet must be scannable at a glance. The changelog is not release documentation — it's a list. [Highlights](#changelog-highlights) get more room; every other bullet follows these limits.
An entry announces what changed. Product docs own setup, navigation, migration and edge cases, and the PR link leads to the rest. These rules apply to highlights and section bullets.
- **One sentence per bullet, max.** If a bullet contains two sentences, the second one is doing work that belongs in product docs, not the changelog. Cut it.
- **No instructions.** Cut setup steps, click paths, configuration keys, flags and migration notes. "Open a provider's settings from Settings, setup, or the model picker" is a click path. "Existing goose settings and sessions carry over to the bundled plugin" is a migration note.
- **One warning for a breaking requirement.** When the update stops something working until the user acts, state the requirement in one short sentence after the announcement, and link the product doc that has the steps: "Requires [Antigravity CLI 1.5.0 or later](https://paseo.sh/docs/supported-providers/antigravity)." Nothing else earns a second sentence.
- **No hedges or exception clauses.** Cut "when needed", "for eligible models", "on hosts where…", "except…", "with a hint shown when…" and "across common install shapes". Keep the condition that triggers a fixed failure, as in `Fixed <failure> when <condition>`.
- **The shorter bullet is still true.** When a change reaches only some providers, platforms or file types, name what it covers in the sentence's own words: "update supported CLIs" where one provider has no update command, "Markdown previews and source views" where HTML previews on iOS are left out, "by default" where an explicit interrupt still replaces the turn. Do not widen the claim to remove a clause.
- **State the outcome and stop.** Say what the user gets. Leave out queues, snapshots, caches, timeouts, LAN/WAN topology, TLS handshakes and IPC.
Each row is from the first draft of 0.17.1:
| Avoid | Write |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| Open a provider's settings from Settings, setup, or the model picker to update supported CLIs and watch their output | Update supported CLIs from the app |
| Use Antigravity CLI 1.5.0 or later on the daemon host, and include `acp` if you override its command | Requires Antigravity CLI 1.5.0 or later |
| Reports and notifications from other agents arrive in order when the current turn ends instead of interrupting it. An interrupt or your own prompt carries earlier queued messages in the same turn, and Stop holds queued messages until the next prompt | By default, messages from other agents wait for the current turn to end |
| Changed worktree teardown to keep the worktree when the command exceeds one minute or the `worktree.teardownTimeoutMs` limit in `paseo.json` | Changed worktree teardown to keep the worktree when the command times out |
| Fixed file views losing their scroll position when switching Preview and Source, except HTML previews on iOS | Fixed Markdown previews and source views losing their scroll position when switching between them |
Section bullets also follow these limits:
- **One sentence per bullet, max.** A second sentence is documentation. Cut it.
- **No trailing periods.** Bullets are list items, not prose. Drop the period at the end of every bullet, including the period inside any bolded lead-in. `**Configurable terminal scrollback**` not `**Configurable terminal scrollback.**`.
- **One line per bullet.** If a bullet wraps to three lines in a narrow column, it's too long.
- **Split bullets that pack multiple distinct changes.** If a bullet uses "and", "plus", a comma list, or an em-dash to chain several independent improvements, break them into separate bullets — even when they share a theme or author. One bullet = one user-facing change.
- **Trim qualifying clauses.** Drop "with a hint shown when…", "matching the CLI's behaviour", "across common install shapes". If the detail doesn't change whether a user cares, cut it.
- **Stop after identifying the change.** Do not explain LAN/WAN topology, TLS handshakes, IPC, or other architecture in a changelog bullet. Put necessary background in product docs.
- **Attribution follows the split.** When you split a dense bullet, move each PR/author to the bullet it belongs to. Never duplicate the same PR across multiple bullets.
## Changelog highlights
@@ -734,7 +759,7 @@ reader who stops after the highlights should have missed nothing they would ask
```markdown
## 0.16.0 - 2026-11-20
- **Undo workspace archive:** Archiving a workspace in the app now shows a "Workspace archived" toast for six seconds. Undo, or Cmd/Ctrl+Z, restores the workspace with its tabs and agents. ([#8904](https://github.com/getpaseo/paseo/pull/8904))
- **Undo workspace archive:** Restore an archived workspace with Undo or Cmd/Ctrl+Z. ([#8904](https://github.com/getpaseo/paseo/pull/8904))
### Added
```
@@ -745,17 +770,19 @@ reader who stops after the highlights should have missed nothing they would ask
- **The lead-in is not a place or something Paseo already had.** A device, screen or area names
where the change landed. A feature name that was true of the last release hides the news: Paseo
already had keyboard shortcuts, so the lead-in says they now work on mobile.
- **The first sentence says the plain thing.** Write what a user would tell a friend: Paseo now
- **One short sentence says the plain thing.** Write what a user would tell a friend: Paseo now
shows the background tasks an agent is running. Leave out the conditions and mechanics that make
it true.
it true. A second sentence is only for a
[breaking requirement](#changelog-conciseness).
- **Describe the new behavior, not the old one.** Say what is faster or better now, and do not
dwell on how slow or broken it was before. A number is welcome as a short aside after the new
behavior is stated: seconds, a percentage, a multiple.
- **Do not list what a sentence already covers.** After "the same shortcuts as desktop", naming
five of them adds nothing. Keep a list only when it sets the scope, such as the providers a
feature works with.
- **The description runs one to three sentences.** Sentences end with periods, and the attribution
follows the last one. [Changelog wording](#changelog-wording) applies in full.
- **Sentences end with periods, and the attribution follows the last one.**
[Changelog wording](#changelog-wording) and [Changelog conciseness](#changelog-conciseness)
apply.
- **A highlight replaces the section bullets it covers.** A PR appears once in an entry, so its
attribution moves to the highlight.
- **A highlight is something a user would name.** Everything else stays a section bullet. A patch
@@ -764,13 +791,13 @@ reader who stops after the highlights should have missed nothing they would ask
of related fixes, becomes a highlight only when it passes the same test as a feature, and then
it is written as what works now: `**Fewer reconnects on return:**`.
| Avoid | Write |
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| `**iPad and touch screens:**` | `**Touch-sized tablet controls:**` |
| `**Hardware keyboard shortcuts:**` | `**Keyboard shortcuts on mobile:**` |
| When an agent ends its turn while shells it started are still running, a pill lists them | Paseo now shows the background tasks an agent is running |
| A diff no longer waits 4 to 40 seconds behind worktree scans | Opening Changes shows the file tree right away, and diffs load about 6 times sooner on hosts with many worktrees |
| The same shortcuts as desktop: command center, file picker, new workspace, workspace jumps | The same shortcuts as desktop, including your custom bindings |
| Avoid | Write |
| ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| `**iPad and touch screens:**` | `**Touch-sized tablet controls:**` |
| `**Hardware keyboard shortcuts:**` | `**Keyboard shortcuts on mobile:**` |
| When an agent ends its turn while shells it started are still running, a pill lists them | Paseo now shows the background tasks an agent is running |
| A diff no longer waits 4 to 40 seconds behind worktree scans | Opening Changes shows the file tree right away, and diffs load about 6 times sooner |
| The same shortcuts as desktop: command center, file picker, new workspace, workspace jumps | The same shortcuts as desktop, including your custom bindings |
Before showing a draft, read only the bold lead-ins top to bottom. Each one must answer "what is
new?" without its description, and each must outrank the one below it.
@@ -820,6 +847,9 @@ question.
for them: `Undo workspace archive`, `Fewer reconnects on return`. Fixes are routine, so one
that earned a highlight still follows everything new or improved.
- **The headline change goes first, whatever its group.** It is the change the release is announced
with. 0.17.1 leads with `Antigravity approvals and history`, which needs one provider. The groups
rank everything after it.
- **Reach decides before kind.** A new capability that needs a hardware keyboard is in group 3.
- **Rank the whole list in one pass.** The order you collected the pull requests in, the alphabet
and the order of the sections below are not rankings.
@@ -837,6 +867,18 @@ Bullets within each section (Added, Changed, Fixed) follow this order:
2. **Quality-of-life improvements** — polish, performance, smoother interactions.
3. **Internal/infra changes last** — only include if they have a tangible user benefit (e.g. "faster startup" is user-facing even if the fix was internal).
## Pre-release dependency checks
Run these checks from the repository root on the release commit before shipping a beta or stable release.
Use Linux x64 so the audit includes the platform-specific dependencies that the CI job checked.
1. Review changes to dependency versions, download URLs, and integrity hashes in `git diff <previous-release-tag> HEAD -- package-lock.json`.
2. Install the exact dependencies from the release lockfile with `npm ci`.
3. Run `npm audit signatures`. Investigate failures before shipping. See [Dependency signature audit](development.md#dependency-signature-audit) for help.
Checking signatures and reviewing the lockfile diff reduce the risk of shipping compromised dependencies.
These checks help prevent supply-chain attacks from reaching users through Paseo.
## Pre-release sanity check
Before cutting a **stable** release, the release agent reviews the diff as a last line of defence against shipping bugs. Skip this for betas — the beta itself is the smoke test, and gating each beta on a code review defeats the point of using betas as fast release candidates.
@@ -864,6 +906,7 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] Fold this beta into the series' single `CHANGELOG.md` entry (heading `## X.Y.Z-beta.N - YYYY-MM-DD`, previous stable → release source), review it against the changelog policy, get approval, and commit it with its [`CHANGELOG.zh-CN.md` translation](#changelog-translations) before running `release:prep:*`
- [ ] The diff from the previous stable to the resolved release source is classified as patch or minor, with the target version and rationale approved
- [ ] `npm run release:prep:beta:patch`, `release:prep:beta:minor`, or `release:prep:beta:next` created the version commit on `release/vX.Y.Z-beta.N` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI)
- [ ] Complete the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
- [ ] After go-ahead, `npm run release:ship:beta` published npm and pushed the `vX.Y.Z-beta.N` tag without triggering a second CI run
- [ ] npm shows the version under the `beta` dist-tag, not `latest`
- [ ] The GitHub prerelease was published only after the three beta manifests were uploaded, and it has the changelog body and every expected macOS, Linux, Windows, and Android APK asset
@@ -887,6 +930,7 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] Verify the changelog heading follows strict `## X.Y.Z - YYYY-MM-DD` format
- [ ] Ensure local format, lint, and typecheck pass and the working tree is clean before running `release:prep:*`
- [ ] `npm run release:prep:patch`, `release:prep:minor`, or `release:prep:promote` created the version commit on `release/vX.Y.Z` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI)
- [ ] Complete the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
- [ ] After go-ahead, `npm run release:ship` published npm, updated dist-tags, and pushed the `vX.Y.Z` tag without triggering a second CI run
- [ ] `latest` resolves to the new stable, and `beta` resolves to it too unless an active newer beta holds `beta`
- [ ] The GitHub Release was published only after the three stable manifests were uploaded, and it has the changelog body and every expected macOS, Linux, Windows, and Android APK asset
+68 -11
View File
@@ -5,15 +5,9 @@ Agent chat delivery has two paths:
1. **Live stream** — `agent_stream` WebSocket messages for immediacy. These may be delta-shaped lifecycle updates.
2. **Authoritative history** — `fetch_agent_timeline_request` for correctness. This always returns full projected timeline items, never lifecycle deltas.
The daemon retains projected items in memory. Each source event advances the stream sequence,
then replaces the previous tool state or merges into the current text item. Intermediate payloads
are never retained for history or catch-up. Provider history is the durable transcript authority
and rebuilds the projection when an agent resumes.
Pagination bounds each read, not total resident history. Active and idle agents retain their
projected transcript; archive releases it and later history reads rebuild it from the provider.
Streaming overhead must remain proportional to the retained transcript. Cumulative text snapshots
must be released after their deltas have been consumed.
Pagination bounds each read, not total resident history. Streaming overhead must remain
proportional to the retained transcript. Cumulative text snapshots must be released after their
deltas have been consumed.
The invariants are:
@@ -32,6 +26,50 @@ bounded item is used for runtime timeline rows and live stream events. Provider
applies the same rule so reopening an agent cannot restore an oversized payload. Fetches apply it
again to assistant and reasoning rows the projection merges from many chunks.
## Owned history
The daemon owns each agent's history in `AgentTimeline`
(`packages/server/src/server/agent/timeline/`): one ordered history per agent, with each provider
child's descriptor and history in a child scope of the same agent. Each source event advances the
stream sequence, then replaces the previous tool state or merges into the current text item.
Intermediate payloads are never retained for history or catch-up.
History is append-only: rewind, import, reload and archive never delete or rewrite a row. Only
deleting the agent, or a provider removing one of its own children, deletes history.
- **Rewind** retires a range of rows. They leave the conversation and stay stored, in the same
epoch. See [Rewind retires rows](#rewind-retires-rows).
- **Provider history** is imported only into an agent that has no history. After that, resume
does not read it. Reload agent and Unarchive require the provider history to start with the
same prompt IDs and text in order. They then append whole new turns, starting at the next
prompt. Existing replies, including partial replies, stay as recorded. If the prompts differ,
for example because the provider stored expanded attachment text, the chat stays unchanged and
Paseo reports a mismatch. A provider child Paseo already holds, listed or retired, is never imported again.
- **Archive and reload** keep the history and the provider children. An archived chat reads them
without its provider. Opening a stored agent that has no provider session to resume starts its
first session on the same history.
- **Delete** removes the agent's history and every child's, retired ones included, before the
agent record. If the history cannot be removed, the request fails and the agent stays listed. The
user can keep using it and delete it again.
`epoch` is the stored history's identity, minted once when the history is created.
`AgentTimeline` serializes every operation of one agent, child scopes included, and keeps its
state in an `AgentTimelineBackend`: the sequence, the rows and retirements, prompt identities, the
open rewind, and the children. The backend contract suite is `agent-timeline.test.ts`, run over
`TIMELINE_CONTRACT_BACKENDS` in `timeline/testing.ts`. The daemon uses the SQLite backend in the
[daemon database](data-model.md#daemon-database). History, retirements, the open rewind, and
provider children survive a daemon restart in the same epoch, so clients keep their cursors. A
closed or archived agent holds no history in memory. Each fetch reads the page from the database
and starts no provider. An internal agent, such as the one that writes a commit message, keeps its
history in a memory backend instead, so it leaves nothing on disk. The memory backend also serves
tests.
An open rewind is stored with the history. Resuming an agent whose history holds one settles it
before the agent takes prompts: a recorded provider cut is committed, and an unknown outcome is
judged from the resumed provider history. When that history proves nothing, the rewind stays open
and the agent refuses prompts with the unknown-outcome error.
## Presence is not delivery
Client heartbeat reports presence:
@@ -168,7 +206,7 @@ or retry backoff. This cannot keep a mobile socket alive after the operating sys
bookkeeping without replacing timeline arrays, preserving an upward-scrolled viewport.
- When the page overlaps or is adjacent to the local end cursor, only projected items newer than
that cursor are applied. Already-covered rows are not replayed.
- A true middle gap, epoch change, or rewind atomically replaces stale canonical history with the
- A true middle gap or epoch change atomically replaces stale canonical history with the
latest tail. The replacement reconciles positioned live rows beyond its coverage and unresolved
local submissions; it never retains two discontiguous canonical ranges.
@@ -181,6 +219,24 @@ history replay. The pending approval UI can hide that tool from presentation, bu
must retain its position. Creating a new history card on rejection places it after the prompt that
rejected it; changing steer-event ordering would also put new assistant output before that prompt.
## Rewind retires rows
A conversation rewind commits a retirement `{ seq, retireFromSeq }`: active rows anchored in
`[retireFromSeq, seq)` leave the conversation, and `seq` is the retirement's own position in the
sequence. The provider children spawned by retired tool calls, and their descendants, are retired
in the same commit. They leave the listing, keep their history, and drop late provider events.
Clients learn of a retirement live through `agent.timeline.rewind`, and on pages through
`retirements`, which lists the retirements whose `seq` lies inside the page's span. The client
drops the rows it holds in that range; rows without a timeline position are unechoed local sends
and stay. Retired ranges and the retirement's `seq` count as covered, so forward cursors advance
through them. Tail, before and prompt-jump pages are served from active rows, so one served before
a retirement the client already applied is stale and is refetched (`viewed-timeline-sync.ts`).
Clients without `timeline_rewind_operations` cannot drop retired rows. For them the session derives
a wire epoch that changes with each retirement, so they take the destructive replacement they
always took on rewind. The shim is tagged `COMPAT(timelineRewindOperations)`.
## Provider child history
Child transcripts use the same projected-page reconciliation as the main conversation. The client
@@ -345,7 +401,7 @@ the draft-create handoff is the one boundary that also permits the legacy canoni
arrived first. Generic reducers and consumers do not reimplement message identity matching.
Ordinary bootstrap, same-epoch reset, and catch-up replacement preserve unmatched locally submitted
rows because a provider may never echo them. A known epoch change or rewind replaces history and
rows because a provider may never echo them. A known epoch change replaces history and
drops acknowledged local rows omitted by the new canonical epoch; every transaction not yet
acknowledged by the provider, and no other local row, crosses that destructive boundary. A cold
reset without an existing epoch is destructive because the client has no continuity anchor.
@@ -361,6 +417,7 @@ canonical assistant prefix, it stays in the head lane. No row may be returned in
## Relevant code
- Server owned history: `packages/server/src/server/agent/timeline/`
- Server live stream forwarding: `packages/server/src/server/session.ts`
- App sync planning: `packages/app/src/timeline/timeline-sync-plan.ts`
- App viewed-agent synchronization: `packages/app/src/timeline/viewed-timeline-sync.ts`
+10 -1
View File
@@ -86,7 +86,7 @@ mounts—never at module evaluation time.
## Dynamic Pixel Styles On Web
Avoid feeding changing pixel values such as `{ top, left }`, `{ maxHeight }`, or `{ minWidth }` into the `style` prop of Unistyles-managed React Native components on web. The web runtime hashes each distinct style object by value and appends a CSS rule to `#unistyles-web`; those rules are not reclaimed during the page lifetime, so pointer-driven positioning can turn into steady stylesheet growth.
Avoid feeding changing pixel values such as `{ top, left }`, `{ maxHeight }`, or `{ minWidth }` into the `style` prop of Unistyles-managed React Native components on web. The web runtime hashes each distinct style object by value and inserts a CSS rule into `#unistyles-web` for it, then deletes the rule when the last element using it unmounts. Pointer-driven positioning turns into a rule insert and delete per move.
Use the inline style escape hatch below for high-churn values. Do not split a component into plain/web/native variants just to keep one measured value out of the CSS registry. Raw DOM wrappers are reserved for real DOM infrastructure, such as terminal hosts, virtualized web rows, or third-party drag wrappers.
@@ -224,6 +224,7 @@ Quick confirmation in DevTools console:
```js
[...document.styleSheets]
.flatMap((s) => [...(s.cssRules || [])])
.flatMap((r) => (r.cssRules ? [...r.cssRules] : [r]))
.map((r) => r.cssText)
.filter((t) => t.includes("unistyles") && t.includes("> *"));
```
@@ -366,6 +367,14 @@ colors. Keep this patch until upstream reads the scheme through separate lists.
The desktop browser E2E checks both transition directions in an isolated Electron
process, because Playwright's focus emulation prevents real hidden-page behavior.
The stylesheet patch backports upstream PR #1354 (3.8.0). Unistyles 3.2.4 rewrote
the whole text of `#unistyles-web` whenever a class was added or removed, and
the browser then restyled the entire document: about 5 ms each time, several
times for one hover card. The backport changes one CSSOM rule per class instead.
The tag therefore has no text; read its rules through `sheet.cssRules`. Classes
without a media query sit inside an `@media all` group. Assert on the stylesheet
in E2E with `packages/app/e2e/support/helpers/shared-stylesheet.ts`.
Register every dependency patch in `scripts/postinstall-patches.mjs`. A file in
`patches/` is inert unless that script knows which installed package activates
it.
@@ -1,3 +1,5 @@
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request. Plugins can manage worktree creation, removal, and restoration. When you branch off a fork PR or MR, choose Run setup to approve workspace automation.
- Antigravity approvals and history: Choose a permission mode, answer tool approvals, and import or reopen sessions. Requires Antigravity CLI 1.5.0 or later.
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request.
- Update providers in Paseo: See each provider's status and installed version, and update supported CLIs from the app.
Full notes: https://paseo.sh/changelog
@@ -1,3 +1,5 @@
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request. Plugins can manage worktree creation, removal, and restoration. When you branch off a fork PR or MR, choose Run setup to approve workspace automation.
- Antigravity approvals and history: Choose a permission mode, answer tool approvals, and import or reopen sessions. Requires Antigravity CLI 1.5.0 or later.
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request.
- Update providers in Paseo: See each provider's status and installed version, and update supported CLIs from the app.
Full notes: https://paseo.sh/changelog
@@ -1,3 +1,5 @@
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request. Plugins can manage worktree creation, removal, and restoration. When you branch off a fork PR or MR, choose Run setup to approve workspace automation.
- Antigravity approvals and history: Choose a permission mode, answer tool approvals, and import or reopen sessions. Requires Antigravity CLI 1.5.0 or later.
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request.
- Update providers in Paseo: See each provider's status and installed version, and update supported CLIs from the app.
Full notes: https://paseo.sh/changelog
@@ -1,3 +1,5 @@
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request. Plugins can manage worktree creation, removal, and restoration. When you branch off a fork PR or MR, choose Run setup to approve workspace automation.
- Antigravity approvals and history: Choose a permission mode, answer tool approvals, and import or reopen sessions. Requires Antigravity CLI 1.5.0 or later.
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request.
- Update providers in Paseo: See each provider's status and installed version, and update supported CLIs from the app.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,5 @@
- Turn and session stats: View per-turn and session timing, token, cache, and cost metrics for Claude, OpenCode v2, Pi, Oh My Pi, and plugin providers.
- Automatic model list refresh: Enabled providers refresh their model lists in the background every 30 minutes.
- Sidebar usage by default: The sidebar usage summary is enabled by default, sources for inactive providers start hidden, and source toggles move to a Sources list.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,5 @@
- Turn and session stats: View per-turn and session timing, token, cache, and cost metrics for Claude, OpenCode v2, Pi, Oh My Pi, and plugin providers.
- Automatic model list refresh: Enabled providers refresh their model lists in the background every 30 minutes.
- Sidebar usage by default: The sidebar usage summary is enabled by default, sources for inactive providers start hidden, and source toggles move to a Sources list.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,5 @@
- Turn and session stats: View per-turn and session timing, token, cache, and cost metrics for Claude, OpenCode v2, Pi, Oh My Pi, and plugin providers.
- Automatic model list refresh: Enabled providers refresh their model lists in the background every 30 minutes.
- Sidebar usage by default: The sidebar usage summary is enabled by default, sources for inactive providers start hidden, and source toggles move to a Sources list.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,5 @@
- Turn and session stats: View per-turn and session timing, token, cache, and cost metrics for Claude, OpenCode v2, Pi, Oh My Pi, and plugin providers.
- Automatic model list refresh: Enabled providers refresh their model lists in the background every 30 minutes.
- Sidebar usage by default: The sidebar usage summary is enabled by default, sources for inactive providers start hidden, and source toggles move to a Sources list.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,6 @@
Fixed
- Fixed iPhone sheets such as Workspace tabs ignoring body swipes to expand, scroll, or collapse
- Fixed Antigravity applying the default model's thinking levels to every model, which blocked Orchestrator chats from opening
- Fixed / and @ pickers disappearing until reload after returning to a workspace through window history
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,6 @@
Fixed
- Fixed iPhone sheets such as Workspace tabs ignoring body swipes to expand, scroll, or collapse
- Fixed Antigravity applying the default model's thinking levels to every model, which blocked Orchestrator chats from opening
- Fixed / and @ pickers disappearing until reload after returning to a workspace through window history
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,6 @@
Fixed
- Fixed iPhone sheets such as Workspace tabs ignoring body swipes to expand, scroll, or collapse
- Fixed Antigravity applying the default model's thinking levels to every model, which blocked Orchestrator chats from opening
- Fixed / and @ pickers disappearing until reload after returning to a workspace through window history
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,6 @@
Fixed
- Fixed iPhone sheets such as Workspace tabs ignoring body swipes to expand, scroll, or collapse
- Fixed Antigravity applying the default model's thinking levels to every model, which blocked Orchestrator chats from opening
- Fixed / and @ pickers disappearing until reload after returning to a workspace through window history
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,7 @@
Fixed
- Fixed numbered sublists overlapping their text and quotes inside lists overlapping later messages on Android
- Fixed Android terminal input so it asks the keyboard to exclude typed text from personalized learning
- Fixed conversations disappearing when directory capitalization differs on a case-insensitive file system
- Fixed interrupt and steer messages to archived agents being queued without starting a turn
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,7 @@
Fixed
- Fixed numbered sublists overlapping their text and quotes inside lists overlapping later messages on Android
- Fixed Android terminal input so it asks the keyboard to exclude typed text from personalized learning
- Fixed conversations disappearing when directory capitalization differs on a case-insensitive file system
- Fixed interrupt and steer messages to archived agents being queued without starting a turn
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,7 @@
Fixed
- Fixed numbered sublists overlapping their text and quotes inside lists overlapping later messages on Android
- Fixed Android terminal input so it asks the keyboard to exclude typed text from personalized learning
- Fixed conversations disappearing when directory capitalization differs on a case-insensitive file system
- Fixed interrupt and steer messages to archived agents being queued without starting a turn
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,7 @@
Fixed
- Fixed numbered sublists overlapping their text and quotes inside lists overlapping later messages on Android
- Fixed Android terminal input so it asks the keyboard to exclude typed text from personalized learning
- Fixed conversations disappearing when directory capitalization differs on a case-insensitive file system
- Fixed interrupt and steer messages to archived agents being queued without starting a turn
Full notes: https://paseo.sh/changelog
+1
View File
@@ -72,6 +72,7 @@
"project": ["src/**/*.ts"]
}
},
"ignoreWorkspaces": ["packages/react-native-enriched-markdown"],
"ignoreDependencies": [
"sherpa-onnx-node",
"@playwright/test",
+2
View File
@@ -30,6 +30,8 @@ buildNpmPackage {
# Exclude mobile-only platform code (we only need the web/electron build)
!(lib.hasPrefix "/packages/app/android" relPath)
&& !(lib.hasPrefix "/packages/app/ios" relPath)
&& !(lib.hasPrefix "/packages/react-native-enriched-markdown/android" relPath)
&& !(lib.hasPrefix "/packages/react-native-enriched-markdown/ios" relPath)
# Website is unrelated to the desktop app
&& !(lib.hasPrefix "/packages/website" relPath)
# Documentation, CI definitions and agent/editor configuration. None of
+1 -1
View File
@@ -1 +1 @@
sha256-esZ6cghL+VfK01yLZlFIK/M94+q0a2e+od3rvA3lPqo=
sha256-IAhKhkolW4xvFvMaAEFdhYvPAhTm2azsqbGMKCKL3q0=
+134 -50
View File
@@ -1,17 +1,18 @@
{
"name": "paseo",
"version": "0.17.1",
"version": "0.17.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "paseo",
"version": "0.17.1",
"version": "0.17.4",
"hasInstallScript": true,
"license": "Apache-2.0",
"workspaces": [
"plugins",
"packages/expo-two-way-audio",
"packages/react-native-enriched-markdown",
"packages/highlight",
"packages/plugin",
"packages/protocol",
@@ -44,6 +45,9 @@
"react-dom": "19.2.3",
"typescript": "^5.9.3",
"ws": "^8.20.0"
},
"engines": {
"node": ">=22.16.0"
}
},
"node_modules/@0no-co/graphql.web": {
@@ -8519,6 +8523,52 @@
"integrity": "sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw==",
"license": "BSD-2-Clause"
},
"node_modules/@modelcontextprotocol/client": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/client/-/client-2.4.0.tgz",
"integrity": "sha512-LgrD2OphHuG12vfKFKz6SOnq7bKHQmhGJIAYdD+MZBn2npHEyry6uD8zvktodtl5CQM85MO0anUyD9JwmUmxww==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@modelcontextprotocol/core": "2.4.0",
"cross-spawn": "^7.0.5",
"eventsource": "^3.0.2",
"eventsource-parser": "^3.0.8",
"jose": "^6.1.3",
"pkce-challenge": "^5.0.0",
"zod": "^4.2.0"
},
"engines": {
"node": ">=20"
}
},
"node_modules/@modelcontextprotocol/core": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/core/-/core-2.4.0.tgz",
"integrity": "sha512-z8QBKqdfXLPzkLQuG4xp8hrVEMm1PZ1IgxMN2sMbJiFiAKOWXnAzogXn2W4aqIBlP1ea6U5yiqVquvUNM1Cj6Q==",
"dependencies": {
"zod": "^4.2.0"
},
"engines": {
"node": ">=20"
}
},
"node_modules/@modelcontextprotocol/node": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/node/-/node-2.1.2.tgz",
"integrity": "sha512-IIcIqBpr6NCQQs5DgJTgvbSOAw+3iaR/uquqg+e0nXCdudfjPg/80x0TseUnQx14AUAtE4fsJCEpJKPyb6WPVA==",
"license": "Apache-2.0",
"dependencies": {
"@hono/node-server": "^1.19.9 || ^2.1.3",
"hono": "^4.11.4"
},
"engines": {
"node": ">=20"
},
"peerDependencies": {
"@modelcontextprotocol/server": "^2.4.0"
}
},
"node_modules/@modelcontextprotocol/sdk": {
"version": "1.29.0",
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.29.0.tgz",
@@ -8905,6 +8955,19 @@
"url": "https://opencollective.com/express"
}
},
"node_modules/@modelcontextprotocol/server": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/server/-/server-2.4.0.tgz",
"integrity": "sha512-rgR9yxSaAJ+bcsi/XroT/S2AfPiIWloXAnrdfYSCms9ivVju0ishu/wW0J21Ho6+ZOR1r7RyeRbjiRuF87ix5Q==",
"license": "Apache-2.0",
"dependencies": {
"@modelcontextprotocol/core": "2.4.0",
"zod": "^4.2.0"
},
"engines": {
"node": ">=20"
}
},
"node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.4.tgz",
@@ -20578,9 +20641,9 @@
}
},
"node_modules/eventsource-parser": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz",
"integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.1.1.tgz",
"integrity": "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==",
"license": "MIT",
"engines": {
"node": ">=18.0.0"
@@ -31902,6 +31965,10 @@
"react-native": "*"
}
},
"node_modules/react-native-enriched-markdown": {
"resolved": "packages/react-native-enriched-markdown",
"link": true
},
"node_modules/react-native-gesture-handler": {
"version": "2.32.0",
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.32.0.tgz",
@@ -37477,7 +37544,7 @@
},
"packages/app": {
"name": "@getpaseo/app",
"version": "0.17.1",
"version": "0.17.4",
"dependencies": {
"@codemirror/commands": "6.10.4",
"@codemirror/language": "6.12.4",
@@ -37561,7 +37628,7 @@
"react-native": "0.86.3",
"react-native-draggable-flatlist": "^4.0.3",
"react-native-edge-to-edge": "^1.7.0",
"react-native-enriched-markdown": "1.2.0-nightly-20261014-766fc0e67",
"react-native-enriched-markdown": "*",
"react-native-gesture-handler": "~2.32.0",
"react-native-keyboard-controller": "1.21.12",
"react-native-nitro-modules": "0.35.5",
@@ -39474,23 +39541,6 @@
"dev": true,
"license": "MIT"
},
"packages/app/node_modules/react-native-enriched-markdown": {
"version": "1.2.0-nightly-20261014-766fc0e67",
"resolved": "https://registry.npmjs.org/react-native-enriched-markdown/-/react-native-enriched-markdown-1.2.0-nightly-20261014-766fc0e67.tgz",
"integrity": "sha512-PyYAAVJAyjlcqHXgSnzxok13MDmyxs/nt46hHIOBdCc0prfaL2Ef6nYkZu7fFCeaETOJXd/xQr4n2/79I+gvdA==",
"hasInstallScript": true,
"license": "MIT",
"peerDependencies": {
"katex": ">=0.16.0",
"react": "*",
"react-native": "*"
},
"peerDependenciesMeta": {
"katex": {
"optional": true
}
}
},
"packages/app/node_modules/react-native-keyboard-controller": {
"version": "1.21.12",
"resolved": "https://registry.npmjs.org/react-native-keyboard-controller/-/react-native-keyboard-controller-1.21.12.tgz",
@@ -39647,13 +39697,13 @@
},
"packages/cli": {
"name": "@getpaseo/cli",
"version": "0.17.1",
"version": "0.17.4",
"license": "Apache-2.0",
"dependencies": {
"@clack/prompts": "^1.0.0",
"@getpaseo/client": "0.17.1",
"@getpaseo/protocol": "0.17.1",
"@getpaseo/server": "0.17.1",
"@getpaseo/client": "0.17.4",
"@getpaseo/protocol": "0.17.4",
"@getpaseo/server": "0.17.4",
"chalk": "^5.3.0",
"commander": "^12.0.0",
"mime-types": "^2.1.35",
@@ -39672,6 +39722,9 @@
"typescript": "^5.2.2",
"vitest": "^4.1.6",
"zx": "^8.8.5"
},
"engines": {
"node": ">=22.16.0"
}
},
"packages/cli/node_modules/@vitest/expect": {
@@ -39900,11 +39953,11 @@
},
"packages/client": {
"name": "@getpaseo/client",
"version": "0.17.1",
"version": "0.17.4",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/protocol": "0.17.1",
"@getpaseo/relay": "0.17.1",
"@getpaseo/protocol": "0.17.4",
"@getpaseo/relay": "0.17.4",
"ws": "^8.20.0",
"zod": "^4.4.3"
},
@@ -39916,7 +39969,7 @@
},
"packages/desktop": {
"name": "@getpaseo/desktop",
"version": "0.17.1",
"version": "0.17.4",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/cli": "*",
@@ -40159,7 +40212,7 @@
},
"packages/expo-two-way-audio": {
"name": "@getpaseo/expo-two-way-audio",
"version": "0.17.1",
"version": "0.17.4",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.5.14",
@@ -40205,7 +40258,7 @@
},
"packages/highlight": {
"name": "@getpaseo/highlight",
"version": "0.17.1",
"version": "0.17.4",
"license": "Apache-2.0",
"dependencies": {
"@codemirror/language": "6.12.4",
@@ -40235,7 +40288,7 @@
},
"packages/plugin": {
"name": "@getpaseo/plugin",
"version": "0.17.1",
"version": "0.17.4",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^1.4.0",
@@ -40243,8 +40296,8 @@
"use-sync-external-store": "^1.6.0"
},
"devDependencies": {
"@getpaseo/client": "0.17.1",
"@getpaseo/protocol": "0.17.1",
"@getpaseo/client": "0.17.4",
"@getpaseo/protocol": "0.17.4",
"@types/node": "^20.9.0",
"@types/react": "~19.2.0",
"react": "19.2.3",
@@ -40254,8 +40307,8 @@
"zod": "^4.4.3"
},
"peerDependencies": {
"@getpaseo/client": "0.17.1",
"@getpaseo/protocol": "0.17.1",
"@getpaseo/client": "0.17.4",
"@getpaseo/protocol": "0.17.4",
"react": ">=19.1.0 <20",
"react-native": ">=0.81.5",
"zod": "^4.4.3"
@@ -40277,7 +40330,7 @@
},
"packages/protocol": {
"name": "@getpaseo/protocol",
"version": "0.17.1",
"version": "0.17.4",
"license": "Apache-2.0",
"dependencies": {
"semver": "^7.8.5",
@@ -40303,9 +40356,24 @@
"node": ">=10"
}
},
"packages/react-native-enriched-markdown": {
"version": "0.17.4",
"hasInstallScript": true,
"license": "MIT",
"peerDependencies": {
"katex": ">=0.16.0",
"react": "*",
"react-native": "*"
},
"peerDependenciesMeta": {
"katex": {
"optional": true
}
}
},
"packages/relay": {
"name": "@getpaseo/relay",
"version": "0.17.1",
"version": "0.17.4",
"license": "Apache-2.0",
"dependencies": {
"@noble/ciphers": "^2.4.0",
@@ -40527,19 +40595,21 @@
},
"packages/server": {
"name": "@getpaseo/server",
"version": "0.17.1",
"version": "0.17.4",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^0.17.1",
"@anthropic-ai/claude-agent-sdk": "0.3.326",
"@anthropic-ai/sdk": "^0.104.2",
"@getpaseo/client": "0.17.1",
"@getpaseo/highlight": "0.17.1",
"@getpaseo/plugin": "0.17.1",
"@getpaseo/protocol": "0.17.1",
"@getpaseo/relay": "0.17.1",
"@getpaseo/client": "0.17.4",
"@getpaseo/highlight": "0.17.4",
"@getpaseo/plugin": "0.17.4",
"@getpaseo/protocol": "0.17.4",
"@getpaseo/relay": "0.17.4",
"@isaacs/ttlcache": "^2.1.4",
"@modelcontextprotocol/node": "2.1.2",
"@modelcontextprotocol/sdk": "1.29.0",
"@modelcontextprotocol/server": "2.4.0",
"@opencode-ai/sdk": "1.14.46",
"@opencode/client": "2.0.10",
"@xterm/addon-serialize": "0.14.0",
@@ -40578,10 +40648,11 @@
"zod": "^4.4.3"
},
"devDependencies": {
"@modelcontextprotocol/client": "2.4.0",
"@playwright/test": "^1.56.1",
"@types/express": "^4.17.20",
"@types/markdown-it": "^14.2.0",
"@types/node": "^20.9.0",
"@types/node": "^22.16.0",
"@types/qrcode": "^1.5.6",
"@types/uuid": "^9.0.7",
"@types/ws": "^8.5.8",
@@ -40589,6 +40660,9 @@
"cross-env": "^10.1.0",
"tsx": "^4.6.0",
"vitest": "^4.1.6"
},
"engines": {
"node": ">=22.16.0"
}
},
"packages/server/node_modules/@esbuild/aix-ppc64": {
@@ -41036,6 +41110,16 @@
"@types/mdurl": "^2"
}
},
"packages/server/node_modules/@types/node": {
"version": "22.20.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.5.tgz",
"integrity": "sha512-U2+DNr+wSjpsTS/wZGYHq7GcwfuSmKiKvoPvK22zwTlRhU91yOniN4qRR5KhIjvif7ysw/dz/hKmfDH0Ris4aA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~6.21.0"
}
},
"packages/server/node_modules/@vitest/expect": {
"version": "4.1.6",
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.6.tgz",
@@ -41484,7 +41568,7 @@
},
"packages/website": {
"name": "@getpaseo/website",
"version": "0.17.1",
"version": "0.17.4",
"dependencies": {
"@cloudflare/vite-plugin": "^1.29.1",
"@cloudflare/workers-types": "^4.20260317.1",
@@ -43095,7 +43179,7 @@
},
"plugins": {
"name": "@getpaseo/builtin-plugins",
"version": "0.17.1",
"version": "0.17.4",
"dependencies": {
"@getpaseo/plugin": "*",
"zod": "^4.4.3"
+5 -1
View File
@@ -1,6 +1,6 @@
{
"name": "paseo",
"version": "0.17.1",
"version": "0.17.4",
"private": true,
"description": "Paseo: voice-controlled development environment for local AI coding agents",
"keywords": [
@@ -23,6 +23,7 @@
"workspaces": [
"plugins",
"packages/expo-two-way-audio",
"packages/react-native-enriched-markdown",
"packages/highlight",
"packages/plugin",
"packages/protocol",
@@ -168,5 +169,8 @@
"tiny-async-pool": {
"semver@^5": "5.7.2"
}
},
"engines": {
"node": ">=22.16.0"
}
}
+230 -207
View File
@@ -5,27 +5,26 @@ import path from "node:path";
import { test, expect } from "../support/fixtures";
import {
addProjectFlow,
chooseAddHostFromProjectFlow,
addProjectFlowBack,
addProjectFlowHost,
addProjectFlowHostTrigger,
addProjectFlowInput,
addProjectFlowMethod,
chooseAddProjectMethod,
expectAddProjectPage,
expectNewWorkspaceForAddedProject,
addProjectFlowSubmit,
chooseAddHostFromProjectFlow,
chooseAddProjectHost,
chooseAddProjectLocation,
chooseAddProjectTab,
expectAddProjectResultVisible,
expectAddProjectTab,
expectNewWorkspaceForAddedProject,
navigateAddProjectResults,
navigateAndDismissAddProject,
watchAddProjectRenderWarnings,
openAddProjectFlow,
openAddProjectHostSelection,
watchAddProjectRenderWarnings,
} from "../support/helpers/add-project-flow";
import { gotoAppShell } from "../support/helpers/app";
import {
disconnectAllHostsAndReload,
addConnectedHostAndReload,
addConnectedHostsAndReload,
addOfflineHostAndReload,
disconnectAllHostsAndReload,
waitForConnectedHost,
} from "../support/helpers/hosts";
import {
@@ -36,6 +35,8 @@ import { expectOpenedProject } from "../support/helpers/project-picker-ui";
import { connectSeedClient } from "../support/helpers/seed-client";
import { getServerId } from "../support/helpers/server-id";
const MOD = process.platform === "darwin" ? "Meta" : "Control";
const SECONDARY_HOST_ID = "add-project-flow-secondary";
const SECONDARY_HOST_LABEL = "Secondary Host";
@@ -70,13 +71,14 @@ async function expectProjectHasNoWorkspaces(projectId: string): Promise<void> {
}
}
test.describe("Add Project command-center flow", () => {
test.describe("Add project sheet", () => {
test.describe.configure({ timeout: 180_000 });
test("Add host replaces the project dialog when no hosts are connected", async ({ page }) => {
test("Add host replaces the project sheet when no hosts are connected", async ({ page }) => {
await gotoAppShell(page);
await disconnectAllHostsAndReload(page);
await openAddProjectHostSelection(page);
await page.locator('[data-testid="sidebar-add-project"]:visible').click();
await expect(addProjectFlow(page)).toContainText("No connected hosts");
const originalUrl = page.url();
await chooseAddHostFromProjectFlow(page);
await expect(addProjectFlow(page)).toBeHidden();
@@ -86,22 +88,36 @@ test.describe("Add Project command-center flow", () => {
await expect(page).toHaveURL(originalUrl);
});
test("method selection shows the daemon's available project sources without search", async ({
test("opens on Existing, switches tabs with Mod+1/2/3, keeps each draft, and closes on Escape", async ({
page,
}) => {
const renderWarnings = watchAddProjectRenderWarnings(page);
await gotoAppShell(page);
await openAddProjectFlow(page);
await expect(addProjectFlowMethod(page, "directory-search")).toBeVisible();
await expect(addProjectFlowMethod(page, "github")).toContainText("Clone from GitHub");
await expect(addProjectFlowMethod(page, "new-directory")).toContainText("New directory");
await expect(addProjectFlowInput(page)).toHaveCount(0);
await expect(addProjectFlow(page).getByRole("textbox")).toHaveCount(0);
await expect(page.getByTestId("add-project-flow-page-host")).toHaveCount(0);
await page.keyboard.type("paseo");
await page.keyboard.press(`${MOD}+2`);
await expectAddProjectTab(page, "clone");
await expect(addProjectFlowInput(page)).toBeFocused();
await page.keyboard.type("getpaseo/");
await page.keyboard.press(`${MOD}+3`);
await expectAddProjectTab(page, "new-folder");
await expect(addProjectFlowSubmit(page)).toBeDisabled();
await page.keyboard.press(`${MOD}+1`);
await expectAddProjectTab(page, "existing");
await expect(addProjectFlowInput(page)).toHaveValue("paseo");
await chooseAddProjectTab(page, "clone");
await expect(addProjectFlowInput(page)).toHaveValue("getpaseo/");
await navigateAndDismissAddProject(page);
await expect(addProjectFlow(page)).not.toBeVisible();
expect(renderWarnings).toEqual([]);
});
test("an offline extra host neither appears nor forces host selection", async ({ page }) => {
test("a single connected host shows no host picker, even with an offline host", async ({
page,
}) => {
await gotoAppShell(page);
await addOfflineHostAndReload(page, {
serverId: "add-project-flow-offline",
@@ -110,8 +126,7 @@ test.describe("Add Project command-center flow", () => {
await openAddProjectFlow(page);
await expect(addProjectFlowHost(page, "add-project-flow-offline")).toHaveCount(0);
await expect(addProjectFlowMethod(page, "directory-search")).toBeVisible();
await expect(addProjectFlowHostTrigger(page)).toHaveCount(0);
});
test.describe("with two connected hosts", () => {
@@ -125,73 +140,7 @@ test.describe("Add Project command-center flow", () => {
await secondaryHost?.close();
});
test("keyboard selection chooses the second host", async ({ page }) => {
await gotoAppShell(page);
await addConnectedHostAndReload(page, {
serverId: secondaryHost.serverId,
label: SECONDARY_HOST_LABEL,
port: secondaryHost.port,
});
await waitForConnectedHost(page, {
serverId: SECONDARY_HOST_ID,
endpoint: `localhost:${secondaryHost.port}`,
});
await openAddProjectHostSelection(page);
await page.keyboard.press("ArrowDown");
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "method");
await expect(addProjectFlow(page)).toContainText(SECONDARY_HOST_LABEL);
});
test("Escape and Back restore searchable page input before closing at the root", async ({
page,
}) => {
const renderWarnings = watchAddProjectRenderWarnings(page);
await gotoAppShell(page);
await addConnectedHostAndReload(page, {
serverId: secondaryHost.serverId,
label: SECONDARY_HOST_LABEL,
port: secondaryHost.port,
});
await waitForConnectedHost(page, {
serverId: SECONDARY_HOST_ID,
endpoint: `localhost:${secondaryHost.port}`,
});
await openAddProjectHostSelection(page);
await addProjectFlowInput(page).fill("o");
await page.keyboard.press("ArrowDown");
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "method");
await chooseAddProjectMethod(page, "new-directory");
await expectAddProjectPage(page, "new-directory-parent");
await page.keyboard.press("Escape");
await expectAddProjectPage(page, "method");
await expect(addProjectFlowInput(page)).toHaveCount(0);
await chooseAddProjectMethod(page, "new-directory");
await expectAddProjectPage(page, "new-directory-parent");
await addProjectFlowBack(page).click();
await expectAddProjectPage(page, "method");
await addProjectFlowBack(page).click();
await expectAddProjectPage(page, "host");
await expect(addProjectFlowInput(page)).toHaveValue("o");
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "method");
await expect(addProjectFlow(page)).toContainText(SECONDARY_HOST_LABEL);
await page.keyboard.press("Escape");
await expectAddProjectPage(page, "host");
await navigateAndDismissAddProject(page);
await expect(addProjectFlow(page)).not.toBeVisible();
expect(renderWarnings).toEqual([]);
});
test("New directory creates a Project on the selected remote host", async ({ page }) => {
test("New folder creates a Project on the host chosen in the sheet", async ({ page }) => {
const parentDirectory = await mkdtemp(path.join(tmpdir(), "paseo-e2e-remote-project-"));
const directoryName = `remote-${randomUUID().slice(0, 8)}`;
const directoryPath = path.join(parentDirectory, directoryName);
@@ -207,18 +156,15 @@ test.describe("Add Project command-center flow", () => {
serverId: SECONDARY_HOST_ID,
endpoint: `localhost:${secondaryHost.port}`,
});
await openAddProjectHostSelection(page);
await addProjectFlowHost(page, SECONDARY_HOST_ID).click();
await expectAddProjectPage(page, "method");
await openAddProjectFlow(page);
await chooseAddProjectTab(page, "new-folder");
await addProjectFlowInput(page).fill(directoryName);
await expect(addProjectFlowMethod(page, "new-directory")).toContainText(
`Create an empty directory on ${SECONDARY_HOST_LABEL}`,
);
await chooseAddProjectMethod(page, "new-directory");
await addProjectFlowInput(page).fill(parentDirectory);
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "new-directory-name");
await page.keyboard.type(directoryName);
await chooseAddProjectHost(page, SECONDARY_HOST_ID);
await expect(addProjectFlowHostTrigger(page)).toContainText(SECONDARY_HOST_LABEL);
await expect(addProjectFlowInput(page)).toHaveValue(directoryName);
await chooseAddProjectLocation(page, parentDirectory);
await addProjectFlowInput(page).focus();
await page.keyboard.press("Enter");
const projectId = await expectOpenedProject(page, directoryName);
@@ -236,57 +182,35 @@ test.describe("Add Project command-center flow", () => {
});
});
test("filtered hosts keep the keyboard-selected row visible", async ({ page }) => {
const hosts: IsolatedHostDaemon[] = [];
test("a host that disconnects keeps its draft and blocks submit instead of moving it", async ({
page,
}) => {
const droppingHost = await startIsolatedHostDaemon("add-project-flow-dropping");
try {
for (let index = 1; index <= 3; index += 1) {
hosts.push(await startIsolatedHostDaemon(`scroll-host-${index}`));
}
await page.setViewportSize({ width: 1280, height: 360 });
await gotoAppShell(page);
await addConnectedHostsAndReload(
page,
hosts.map((host, index) => ({
serverId: host.serverId,
port: host.port,
label: index < 2 ? `Fleet 0${index + 1}` : "Other host",
})),
{ primaryLabel: "Fleet 00" },
await addConnectedHostAndReload(page, {
serverId: droppingHost.serverId,
label: "Dropping Host",
port: droppingHost.port,
});
await waitForConnectedHost(page, {
serverId: droppingHost.serverId,
endpoint: `localhost:${droppingHost.port}`,
});
await openAddProjectFlow(page);
await chooseAddProjectHost(page, droppingHost.serverId);
await addProjectFlowInput(page).fill(homedir());
await droppingHost.close();
await expect(page.getByTestId("add-project-flow-error")).toHaveText(
"Dropping Host is offline",
{ timeout: 30_000 },
);
for (const host of hosts) {
await waitForConnectedHost(page, {
serverId: host.serverId,
endpoint: `localhost:${host.port}`,
});
}
await openAddProjectHostSelection(page);
await expect(
addProjectFlow(page).getByRole("button").filter({ hasText: "Other host" }),
).toBeVisible();
await addProjectFlowInput(page).fill("Fleet");
await expect(addProjectFlowHost(page, hosts[2]!.serverId)).toHaveCount(0);
await navigateAddProjectResults(page, "ArrowDown", 2);
await expectAddProjectResultVisible(page, "Fleet 02");
// Filtering out the first host moves retained rows to new positions.
await addProjectFlowInput(page).fill("scroll-host");
await expect(addProjectFlowHost(page, getServerId())).toHaveCount(0);
await expectAddProjectResultVisible(page, "Fleet 01");
await navigateAddProjectResults(page, "ArrowDown", 2);
await expectAddProjectResultVisible(page, "Other host");
await navigateAddProjectResults(page, "ArrowDown", 1);
await expectAddProjectResultVisible(page, "Fleet 01");
await addProjectFlowInput(page).fill("Fleet");
await expectAddProjectResultVisible(page, "Fleet 00");
await navigateAddProjectResults(page, "ArrowDown", 2);
await expectAddProjectResultVisible(page, "Fleet 02");
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "method");
await expect(addProjectFlow(page)).toContainText("Fleet 02");
await expect(addProjectFlowHostTrigger(page)).toContainText("Dropping Host");
await expect(addProjectFlowInput(page)).toHaveValue(homedir());
await expect(addProjectFlowSubmit(page)).toBeDisabled();
} finally {
await Promise.all(hosts.map((host) => host.close()));
await droppingHost.close();
}
});
@@ -297,9 +221,6 @@ test.describe("Add Project command-center flow", () => {
await gotoAppShell(page);
await openAddProjectFlow(page);
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "directory-search");
await expect(addProjectFlowInput(page)).toBeFocused();
await page.keyboard.type(projectPickerFixture.fuzzyQuery);
await expect(addProjectFlow(page)).toContainText(projectPickerFixture.projectName, {
timeout: 30_000,
@@ -323,45 +244,32 @@ test.describe("Add Project command-center flow", () => {
const parentDirectory = await mkdtemp(path.join(homedir(), "paseo-e2e-scroll-"));
const rowPath = (index: number) =>
path.join(parentDirectory, `scroll-probe-${String(index).padStart(2, "0")}`);
const rowName = (index: number) => path.basename(rowPath(index));
let projectId: string | null = null;
try {
await Promise.all(Array.from({ length: 16 }, (_, index) => mkdir(rowPath(index))));
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
await addProjectFlowInput(page).fill(path.basename(parentDirectory));
await addProjectFlowInput(page).fill(`${path.basename(parentDirectory)}/scroll-probe`);
const results = page.getByTestId("add-project-flow-results");
await expect(results.getByRole("button", { name: /scroll-probe-/ })).toHaveCount(16, {
timeout: 30_000,
});
await navigateAddProjectResults(page, "ArrowDown", 12);
await expectAddProjectResultVisible(page, rowPath(11));
await navigateAddProjectResults(page, "ArrowDown", 11);
await expectAddProjectResultVisible(page, rowName(11));
await navigateAddProjectResults(page, "ArrowUp", 12);
await expectAddProjectResultVisible(page, parentDirectory);
await navigateAddProjectResults(page, "ArrowUp", 1);
await expectAddProjectResultVisible(page, rowPath(15));
await expectAddProjectResultVisible(page, rowName(15));
await navigateAddProjectResults(page, "ArrowDown", 1);
await expectAddProjectResultVisible(page, parentDirectory);
await expectAddProjectResultVisible(page, rowName(0));
await navigateAddProjectResults(page, "ArrowDown", 12);
await expectAddProjectResultVisible(page, rowPath(11));
await addProjectFlowInput(page).fill(`${path.basename(parentDirectory)}probe`);
await expect(results.getByRole("button")).toHaveCount(16);
await expectAddProjectResultVisible(page, rowPath(0));
await navigateAddProjectResults(page, "ArrowDown", 12);
await expectAddProjectResultVisible(page, rowPath(12));
await addProjectFlowInput(page).fill(path.basename(parentDirectory));
await expect(results.getByRole("button")).toHaveCount(17);
await expectAddProjectResultVisible(page, parentDirectory);
await navigateAddProjectResults(page, "ArrowDown", 12);
await expectAddProjectResultVisible(page, rowPath(11));
await navigateAddProjectResults(page, "ArrowDown", 11);
await page.keyboard.press("Enter");
projectId = await expectOpenedProject(page, "scroll-probe-11");
projectId = await expectOpenedProject(page, rowName(11));
await expectNewWorkspaceForAddedProject(page, {
serverId: getServerId(),
projectId,
projectName: "scroll-probe-11",
projectName: rowName(11),
projectPath: rowPath(11),
});
} finally {
@@ -370,28 +278,146 @@ test.describe("Add Project command-center flow", () => {
}
});
test("a complete repository URL remains selectable without a GitHub search result", async ({
test("Enter on a focused result adds that folder, not the one picked before", async ({
page,
}) => {
const parentDirectory = await mkdtemp(path.join(homedir(), "paseo-e2e-focus-"));
const firstPath = path.join(parentDirectory, "focus-probe-a");
const secondPath = path.join(parentDirectory, "focus-probe-b");
let projectId: string | null = null;
try {
await Promise.all([mkdir(firstPath), mkdir(secondPath)]);
await gotoAppShell(page);
await openAddProjectFlow(page);
await addProjectFlowInput(page).fill(`${path.basename(parentDirectory)}/focus-probe`);
const results = page.getByTestId("add-project-flow-results");
await expect(results.getByRole("button", { name: /focus-probe-/ })).toHaveCount(2, {
timeout: 30_000,
});
await results.getByRole("button", { name: /focus-probe-b/ }).focus();
await page.keyboard.press("Enter");
projectId = await expectOpenedProject(page, "focus-probe-b");
await expectNewWorkspaceForAddedProject(page, {
serverId: getServerId(),
projectId,
projectName: "focus-probe-b",
projectPath: secondPath,
});
} finally {
if (projectId) await removeCreatedProject(secondPath, projectId);
await rm(parentDirectory, { recursive: true, force: true });
}
});
test("Enter while a new search runs does not open a row from the previous search", async ({
page,
}) => {
const parentDirectory = await mkdtemp(path.join(homedir(), "paseo-e2e-stale-"));
try {
await mkdir(path.join(parentDirectory, "stale-probe-a"));
await gotoAppShell(page);
await openAddProjectFlow(page);
const prefix = path.basename(parentDirectory);
await addProjectFlowInput(page).fill(`${prefix}/stale-probe`);
const results = page.getByTestId("add-project-flow-results");
await expect(results.getByRole("button", { name: /stale-probe-a/ })).toBeVisible({
timeout: 30_000,
});
await addProjectFlowInput(page).fill(`${prefix}/no-such-folder`);
await page.keyboard.press("Enter");
await expect(addProjectFlow(page).getByText("No matching folders")).toBeVisible({
timeout: 30_000,
});
await expect(addProjectFlow(page)).toBeVisible();
await expect(addProjectFlowSubmit(page)).toBeDisabled();
} finally {
await rm(parentDirectory, { recursive: true, force: true });
}
});
test("a complete repository URL is cloneable without a GitHub search result", async ({
page,
}) => {
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "github");
await chooseAddProjectTab(page, "clone");
const remote = "https://github.invalid/acme/manual.git";
await addProjectFlowInput(page).fill(remote);
await expect(addProjectFlow(page).getByText("manual", { exact: true })).toBeVisible();
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "github-location");
const title = addProjectFlow(page).getByTestId("add-project-flow-title");
await expect(title.getByText("Choose destination", { exact: true })).toBeVisible();
await expect(title.getByText("localhost", { exact: true })).toBeVisible();
await expect(title).not.toContainText("Where should Paseo create");
await addProjectFlowBack(page).click();
await expect(addProjectFlowInput(page)).toHaveValue(remote);
await expect(page.getByTestId("add-project-flow-location")).toContainText("/manual");
await expect(addProjectFlowSubmit(page)).toBeEnabled();
});
test("New directory validates the name, restores parent and name state, then creates a Project", async ({
test("Enter activates a focused button instead of the primary action", async ({ page }) => {
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectTab(page, "clone");
await addProjectFlowInput(page).fill("https://github.invalid/acme/manual.git");
await expect(addProjectFlowSubmit(page)).toBeEnabled();
await addProjectFlow(page).getByRole("button", { name: "Close", exact: true }).focus();
await page.keyboard.press("Enter");
await expect(addProjectFlow(page)).toBeHidden();
});
test("a row picked during a search is not replaced by the answer's first row", async ({
page,
}) => {
const parentDirectory = await mkdtemp(path.join(homedir(), "paseo-e2e-dropped-pick-"));
try {
await Promise.all([
mkdir(path.join(parentDirectory, "previous-probe")),
mkdir(path.join(parentDirectory, "incoming-probe")),
]);
await gotoAppShell(page);
await openAddProjectFlow(page);
const prefix = path.basename(parentDirectory);
const results = page.getByTestId("add-project-flow-results");
await addProjectFlowInput(page).fill(`${prefix}/previous-probe`);
await expect(results.getByRole("button", { name: /previous-probe/ })).toBeVisible({
timeout: 30_000,
});
await addProjectFlowInput(page).fill(`${prefix}/incoming-probe`);
await page.keyboard.press("ArrowDown");
await expect(results.getByRole("button", { name: /incoming-probe/ })).toBeVisible({
timeout: 30_000,
});
await expect(addProjectFlowSubmit(page)).toBeDisabled();
} finally {
await rm(parentDirectory, { recursive: true, force: true });
}
});
test("Enter in Location while a new search runs keeps the current location", async ({ page }) => {
const parentDirectory = await mkdtemp(path.join(homedir(), "paseo-e2e-stale-location-"));
try {
await mkdir(path.join(parentDirectory, "stale-probe-a"));
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectTab(page, "new-folder");
const location = page.getByTestId("add-project-flow-location");
const locationBefore = await location.textContent();
await location.click();
const search = page.getByPlaceholder("Search folders or enter a path").last();
const prefix = path.basename(parentDirectory);
await search.fill(`${prefix}/stale-probe`);
await expect(page.getByText(/stale-probe-a/).last()).toBeVisible({ timeout: 30_000 });
await search.fill(`${prefix}/no-such-folder`);
await page.keyboard.press("Enter");
await expect(page.getByText("No matching folders")).toBeVisible({ timeout: 30_000 });
await expect(search).toBeVisible();
await expect(location).toHaveText(locationBefore ?? "");
} finally {
await rm(parentDirectory, { recursive: true, force: true });
}
});
test("New folder validates the name, then creates a Project in the chosen location", async ({
page,
}) => {
const parentDirectory = await mkdtemp(path.join(tmpdir(), "paseo-e2e-new-project-"));
@@ -402,27 +428,23 @@ test.describe("Add Project command-center flow", () => {
try {
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "new-directory");
await chooseAddProjectTab(page, "new-folder");
await chooseAddProjectLocation(page, parentDirectory);
await page.keyboard.type(parentDirectory);
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "new-directory-name");
await page.keyboard.type("../invalid");
await page.keyboard.press("Enter");
await addProjectFlowInput(page).fill("../invalid");
const nameError = page.getByTestId("add-project-flow-name-field-error");
await expect(nameError).toHaveText("Use a name without slashes");
await expect(addProjectFlowSubmit(page)).toBeDisabled();
const error = page.getByTestId("add-project-flow-error");
await expect(error).toBeVisible();
await expect(error).toContainText(/name|separator|directory/i);
await expectAddProjectPage(page, "new-directory-name");
await addProjectFlowInput(page).fill("C:repo");
await expect(nameError).toHaveText("Use a name without a drive letter");
await expect(addProjectFlowSubmit(page)).toBeDisabled();
await addProjectFlowInput(page).fill(directoryName);
await addProjectFlowBack(page).click();
await expectAddProjectPage(page, "new-directory-parent");
await expect(addProjectFlowInput(page)).toHaveValue(parentDirectory);
await page.keyboard.press("Enter");
await expectAddProjectPage(page, "new-directory-name");
await expect(addProjectFlowInput(page)).toHaveValue(directoryName);
await page.keyboard.press("Enter");
await expect(nameError).toBeHidden();
await expect(addProjectFlowSubmit(page)).toBeEnabled();
await expect(page.getByTestId("add-project-flow-location")).toContainText(directoryName);
await addProjectFlowSubmit(page).click();
projectId = await expectOpenedProject(page, directoryName);
await expectNewWorkspaceForAddedProject(page, {
@@ -461,10 +483,11 @@ test.describe("Compact Add project context", () => {
await gotoAppShell(page);
await page.getByRole("button", { name: "Open menu", exact: true }).click();
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
await addProjectFlowInput(page).fill(projectPickerFixture.fuzzyQuery);
await expect(addProjectFlow(page)).toContainText(projectPickerFixture.projectName);
await page.keyboard.press("Enter");
await expect(
page.getByRole("button", { name: new RegExp(projectPickerFixture.projectName) }).first(),
).toBeVisible({ timeout: 30_000 });
await addProjectFlowSubmit(page).click();
const projectId = await expectOpenedProject(page, projectPickerFixture.projectName);
projectPickerFixture.rememberProjectId(projectId);
await expectNewWorkspaceForAddedProject(page, {
@@ -4,10 +4,9 @@ import path from "node:path";
import { expect, test } from "../support/fixtures";
import {
addProjectFlow,
addProjectFlowBack,
addProjectFlowInput,
chooseAddProjectMethod,
expectAddProjectPage,
chooseAddProjectLocation,
chooseAddProjectTab,
expectNewWorkspaceForAddedProject,
openAddProjectFlow,
} from "../support/helpers/add-project-flow";
@@ -39,28 +38,22 @@ test.describe("Add Project GitHub flow", () => {
await gotoAppShell(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "github");
await chooseAddProjectTab(page, "clone");
await addProjectFlowInput(page).fill("getpaseo/paseo");
await expect(addProjectFlow(page).getByText("getpaseo/paseo", { exact: true })).toBeVisible({
timeout: 30_000,
});
await addProjectFlowInput(page).fill("");
await addProjectFlowInput(page).fill(repository.fullName);
const repositoryRow = addProjectFlow(page).getByText(repository.fullName, { exact: true });
await expect(repositoryRow).toBeVisible({ timeout: 30_000 });
await repositoryRow.click();
await expectAddProjectPage(page, "github-location");
await addProjectFlowInput(page).fill(parentDirectory);
await expect(addProjectFlow(page)).toContainText(checkoutPath, { timeout: 30_000 });
await addProjectFlowBack(page).click();
await expectAddProjectPage(page, "github-search");
await expect(repositoryRow).toBeVisible();
await repositoryRow.click();
await expectAddProjectPage(page, "github-location");
await expect(addProjectFlowInput(page)).toHaveValue(parentDirectory);
await chooseAddProjectLocation(page, parentDirectory);
await expect(page.getByTestId("add-project-flow-location")).toContainText(
path.join(path.basename(parentDirectory), repository.name),
);
await addProjectFlowInput(page).focus();
await mkdir(checkoutPath);
await page.keyboard.press("Enter");
@@ -13,6 +13,13 @@ import {
import { expectNearBottom, scrollChatAwayFromBottom } from "../support/helpers/agent-bottom-anchor";
import { holdRewindCompletion } from "../support/helpers/agent-timeline-gate";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import { userScrollsTimelineToHistoryStart } from "../support/helpers/timeline-pagination";
import {
closeWorkspaceAgentTab,
fetchAgentArchivedAt,
primeAdditionalPage,
resetSeededPageState,
} from "../support/helpers/archive-tab";
async function completeSubmittedTurn(
page: Page,
@@ -48,26 +55,102 @@ async function expectTurnCompletesNormally(
await expectAgentIdle(page);
}
async function openAgentOnAnotherClient(
page: Page,
agent: Awaited<ReturnType<typeof seedMockAgentWorkspace>>,
): Promise<void> {
await primeAdditionalPage(page);
await resetSeededPageState(page);
await openAgentRoute(page, agent);
await expectComposerVisible(page);
}
/** The prompts the chat shows, in order, each exactly once. */
async function expectPrompts(page: Page, prompts: string[]): Promise<void> {
const messages = page.getByTestId("user-message");
await expect(messages).toHaveCount(prompts.length);
await expect(messages).toContainText(prompts);
}
async function reloadAgentFromTabMenu(page: Page, agentId: string): Promise<void> {
const tabId = `workspace-tab-agent_${agentId}`;
await page.getByTestId(tabId).filter({ visible: true }).first().click({ button: "right" });
await page.getByTestId(`workspace-tab-context-agent_${agentId}-reload-agent`).click();
}
async function archiveAgentByClosingTab(
page: Page,
agent: Awaited<ReturnType<typeof seedMockAgentWorkspace>>,
): Promise<void> {
await closeWorkspaceAgentTab(page, agent.agentId);
await expect.poll(() => fetchAgentArchivedAt(agent.client, agent.agentId)).not.toBeNull();
}
async function unarchiveAgent(page: Page): Promise<void> {
await page.getByRole("button", { name: "Unarchive", exact: true }).click();
await expect(page.getByText("This agent is archived", { exact: true })).toHaveCount(0, {
timeout: 30_000,
});
}
async function expectToast(page: Page, message: string): Promise<void> {
await expect(page.getByTestId("app-toast-message")).toHaveText(message, { timeout: 30_000 });
}
// The mock provider's resumed session holds no history, so it never matches what Paseo shows.
const UNSYNCED_RELOAD =
"Reloaded agent, but the provider's history doesn't match this chat, so it wasn't synced";
/** The prompts of the whole conversation, after scrolling up through its older pages. */
async function expectConversationPrompts(page: Page, prompts: string[]): Promise<void> {
const messages = page.getByTestId("user-message");
await expect
.poll(async () => {
await userScrollsTimelineToHistoryStart(page);
return await messages.count();
})
.toBe(prompts.length);
await expect(messages).toContainText(prompts);
}
// A row React remounts loses this attribute; one that stays mounted keeps it.
async function markMounted(row: Locator): Promise<void> {
await row.evaluate((element) => element.setAttribute("data-e2e-mounted", "before-rewind"));
}
async function expectStillMounted(row: Locator): Promise<void> {
await expect(row).toHaveAttribute("data-e2e-mounted", "before-rewind");
}
test.describe("Agent message rewind", () => {
test("rewinds a submitted prompt without replaying history and preserves a human draft", async ({
test("rewinds a prompt in place on every open client and keeps a human draft", async ({
page,
}) => {
test.setTimeout(90_000);
test.setTimeout(150_000);
const retainedPrompt = "Keep this completed turn after rewind.";
const rewoundPrompt = "Remove this completed turn after rewind.";
const nextPrompt = "Continue after the rewind.";
const preservedDraft = "Keep this human draft after rewind.";
const agent = await seedMockAgentWorkspace({
repoPrefix: "message-rewind-roundtrip-",
title: "Message rewind roundtrip",
model: "ten-second-stream",
});
const otherClient = await page.context().newPage();
try {
const rewindCompletion = await holdRewindCompletion(page, agent.agentId);
await openAgentRoute(page, agent);
await expectComposerVisible(page);
await completeSubmittedTurn(page, agent, retainedPrompt);
const retainedMessage = await completeSubmittedTurn(page, agent, retainedPrompt);
const userMessage = await completeSubmittedTurn(page, agent, rewoundPrompt);
await test.step("a second client opens the same chat", async () => {
await openAgentOnAnotherClient(otherClient, agent);
await expectPrompts(otherClient, [retainedPrompt, rewoundPrompt]);
});
await markMounted(retainedMessage);
await scrollChatAwayFromBottom(page, {
deltaY: -900,
minDistanceFromBottom: 300,
@@ -76,19 +159,92 @@ test.describe("Agent message rewind", () => {
await blurComposerInput(page);
rewindCompletion.clearTimelineStreamCount();
const rewind = rewindConversation(page, userMessage, rewoundPrompt);
await rewindCompletion.waitForDelayedResponse();
await expect(page.getByTestId("rewind-menu-conversation")).toBeDisabled();
expect(rewindCompletion.timelineStreamCount()).toBe(0);
rewindCompletion.release();
await rewind;
await test.step("the rewind stays pending until the daemon answers", async () => {
const rewind = rewindConversation(page, userMessage, rewoundPrompt);
await rewindCompletion.waitForDelayedResponse();
await expect(page.getByTestId("rewind-menu-conversation")).toBeDisabled();
expect(rewindCompletion.timelineStreamCount()).toBe(0);
rewindCompletion.release();
await rewind;
});
await expect(page.getByTestId("user-message").filter({ hasText: rewoundPrompt })).toHaveCount(
0,
);
await expectComposerDraft(page, preservedDraft);
await expectComposerNotFocused(page);
await expectNearBottom(page);
await test.step("the rewound turn leaves without reloading the chat", async () => {
await expectPrompts(page, [retainedPrompt]);
await expectStillMounted(retainedMessage);
expect(rewindCompletion.timelineFetchCount()).toBe(0);
await expectComposerDraft(page, preservedDraft);
await expectComposerNotFocused(page);
await expectNearBottom(page);
await expectPrompts(otherClient, [retainedPrompt]);
});
await test.step("the next prompt appears once on both clients", async () => {
await completeSubmittedTurn(otherClient, agent, nextPrompt);
await expectPrompts(otherClient, [retainedPrompt, nextPrompt]);
await expectPrompts(page, [retainedPrompt, nextPrompt]);
});
await test.step("a reconnecting client loads the rewound conversation", async () => {
await otherClient.reload();
await expectPrompts(otherClient, [retainedPrompt, nextPrompt]);
});
} finally {
await otherClient.close();
await agent.cleanup();
}
});
test("keeps the rewound conversation through Reload agent, archive and unarchive", async ({
page,
}) => {
test.setTimeout(150_000);
const keptPrompt = "Keep this turn through reload and archive.";
const rewoundPrompt = "Rewind this turn before reloading.";
const nextPrompt = "Continue after the rewind, then reload.";
const agent = await seedMockAgentWorkspace({
repoPrefix: "message-rewind-reload-archive-",
title: "Message rewind reload archive",
model: "ten-second-stream",
});
try {
await openAgentRoute(page, agent);
await expectComposerVisible(page);
await completeSubmittedTurn(page, agent, keptPrompt);
const rewound = await completeSubmittedTurn(page, agent, rewoundPrompt);
await rewindConversation(page, rewound, rewoundPrompt);
await expectPrompts(page, [keptPrompt]);
await completeSubmittedTurn(page, agent, nextPrompt);
await expectPrompts(page, [keptPrompt, nextPrompt]);
await test.step("Reload agent keeps the chat and says the provider's history was not synced", async () => {
await reloadAgentFromTabMenu(page, agent.agentId);
await expectToast(page, UNSYNCED_RELOAD);
await expectPrompts(page, [keptPrompt, nextPrompt]);
await expectComposerVisible(page);
});
await test.step("the archived chat shows the rewound conversation", async () => {
await archiveAgentByClosingTab(page, agent);
await openAgentRoute(page, agent);
await expect(page.getByText("This agent is archived", { exact: true })).toBeVisible({
timeout: 30_000,
});
await expectConversationPrompts(page, [keptPrompt, nextPrompt]);
});
await test.step("unarchiving keeps the rewound conversation", async () => {
await unarchiveAgent(page);
await expectToast(page, UNSYNCED_RELOAD);
await expectComposerVisible(page);
await expectConversationPrompts(page, [keptPrompt, nextPrompt]);
});
await test.step("a reconnecting client loads the same conversation", async () => {
await page.reload();
await expectComposerVisible(page);
await expectConversationPrompts(page, [keptPrompt, nextPrompt]);
});
} finally {
await agent.cleanup();
}
@@ -2,8 +2,10 @@ import { expect, test } from "../support/fixtures";
import {
applyProfileFromPicker,
closeModelPicker,
expectAgentProfileNameDraft,
expectComposerDoesNotName,
expectAgentProfilesEmptyPrompt,
expectHostAgentProfiles,
expectProfileEditTooltip,
expectComposerMode,
expectCreateProfileFromModelRow,
@@ -11,13 +13,23 @@ import {
expectModelRowProfileActionBesideRow,
expectModelRowSelected,
expectProfileEditIsPencilOnly,
expectProfileReachableByScrolling,
expectProfileSearchResult,
expectProfileVisibleForProvider,
fillAgentProfileName,
openEditProfileFromModelRow,
openModelPicker,
openAgentProfilesFromEmptyPrompt,
removeOpenModalAgentProfileWithConfirm,
searchModelPicker,
seedAgentProfiles,
selectModelRow,
} from "../support/helpers/agent-profiles";
import { expectWorkspaceAgentConfiguration } from "../support/helpers/command-center-agent-controls";
import {
chooseCommandCenterAgentControl,
expectWorkspaceAgentConfiguration,
openCommandCenterForAgent,
} from "../support/helpers/command-center-agent-controls";
import { expectComposerVisible } from "../support/helpers/composer";
import { openAgentRoute, seedMockAgentWorkspace } from "../support/helpers/mock-agent";
@@ -139,10 +151,129 @@ test.describe("Agent profiles in the model picker", () => {
await openModelPicker(page);
await expectModelRowProfileActionBesideRow(page, oneMinute);
await expectCreateProfileFromModelRow(page, oneMinute);
await expectComposerModel(page, "Ten second stream");
await openModelPicker(page);
await selectModelRow(page, oneMinute);
await expectComposerModel(page, oneMinute.modelLabel);
await openModelPicker(page);
await selectModelRow(page, { provider: "mock", modelId: "ten-second-stream" });
await expectComposerModel(page, "Ten second stream");
} finally {
await workspace.cleanup();
await seed.restore();
}
});
test("a profile is found by searching the model picker or the command center", async ({
page,
}) => {
const seed = await seedAgentProfiles([PROFILE]);
const workspace = await seedMockAgentWorkspace({
repoPrefix: "agent-profiles-search-",
title: "Agent profiles search",
model: "ten-second-stream",
modeId: "load-test",
});
try {
await test.step("searching its name in the model picker lists only the profile", async () => {
await openAgentRoute(page, workspace);
await expectComposerVisible(page);
await openModelPicker(page);
await searchModelPicker(page, "ui work");
await expectProfileSearchResult(page, { name: PROFILE.name });
});
await test.step("searching its model lists the profile above the model", async () => {
await searchModelPicker(page, "one minute");
await expectProfileSearchResult(page, {
name: PROFILE.name,
model: { provider: "mock", modelId: "one-minute-stream" },
});
await closeModelPicker(page);
});
await test.step("choosing it from the command center applies it", async () => {
await openCommandCenterForAgent(page, workspace);
await chooseCommandCenterAgentControl({
page,
query: "ui work",
choice: `Profile › ${PROFILE.name}`,
});
await expectComposerModel(page, "One minute stream");
await expectComposerMode(page, "Approval test");
await expectWorkspaceAgentConfiguration(workspace, {
id: workspace.agentId,
provider: "mock",
model: "one-minute-stream",
modeId: "approval-test",
});
});
} finally {
await workspace.cleanup();
await seed.restore();
}
});
test("profile-only search results scroll inside the picker", async ({ page }) => {
const profiles = Array.from({ length: 12 }, (_, index) => ({
id: `agent_profile_e2e_release_${index + 1}`,
name: `Release review ${String(index + 1).padStart(2, "0")}`,
provider: "mock",
model: "one-minute-stream",
}));
const seed = await seedAgentProfiles(profiles);
const workspace = await seedMockAgentWorkspace({
repoPrefix: "agent-profiles-search-scroll-",
title: "Agent profiles search scroll",
model: "ten-second-stream",
modeId: "load-test",
});
try {
await openAgentRoute(page, workspace);
await expectComposerVisible(page);
await openModelPicker(page);
await searchModelPicker(page, "release review");
await expectProfileSearchResult(page, { name: "Release review 01" });
await expectProfileReachableByScrolling(page, "Release review 12");
} finally {
await workspace.cleanup();
await seed.restore();
}
});
test("canceling Remove in the composer profile editor keeps the editor and draft open", async ({
page,
}) => {
const seed = await seedAgentProfiles([PROFILE]);
const workspace = await seedMockAgentWorkspace({
repoPrefix: "agent-profiles-remove-cancel-",
title: "Agent profiles remove cancel",
model: "ten-second-stream",
modeId: "load-test",
});
try {
await openAgentRoute(page, workspace);
await expectComposerVisible(page);
await openModelPicker(page);
await openEditProfileFromModelRow(page, {
provider: "mock",
modelId: "one-minute-stream",
});
await fillAgentProfileName(page, "Draft name");
await test.step("canceling Remove keeps the modal and draft intact", async () => {
await removeOpenModalAgentProfileWithConfirm(page, "dismiss");
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible();
await expectAgentProfileNameDraft(page, "Draft name");
});
await test.step("confirming Remove deletes the profile and closes the modal", async () => {
await removeOpenModalAgentProfileWithConfirm(page, "accept");
await expect(page.getByTestId("agent-profile-edit-modal")).toHaveCount(0, {
timeout: 30_000,
});
await expectHostAgentProfiles([]);
});
} finally {
await workspace.cleanup();
await seed.restore();
@@ -1,19 +1,32 @@
import { test } from "../support/fixtures";
import { expect, test } from "../support/fixtures";
import {
browserBackWithConfirm,
browserHistoryJumpWithConfirm,
createAgentProfile,
createAgentProfileFromEmptyState,
duplicateOpenAgentProfileWithConfirm,
editAgentProfile,
expectAgentProfile,
expectAgentProfileForm,
expectAgentProfileNameDraft,
expectAgentProfileNotesDraft,
expectAgentProfileOrder,
expectAgentProfileTagsGone,
expectHostAgentProfiles,
expectNoAgentProfiles,
fillAgentProfileName,
fillAgentProfileNotes,
moveAgentProfileUp,
openAgentProfileEditor,
openAgentProfileSettings,
openCompactAgentProfileSettings,
openCreateAgentProfileEditor,
removeAgentProfile,
saveOpenAgentProfile,
seedAgentProfiles,
stageLegacyFavoritesForHostMigration,
switchSettingsSectionWithConfirm,
toggleAgentProfileCustomize,
} from "../support/helpers/agent-profiles";
const MOCK_PROVIDER_LABEL = "Mock Load Test";
@@ -125,4 +138,252 @@ test.describe("Agent profiles settings", () => {
await seed.restore();
}
});
test("remounting the profile form keeps draft text across resize and collapsible toggles", async ({
page,
}) => {
const seed = await seedAgentProfiles([
{
id: "agent_profile_e2e_remount",
name: "Original profile",
provider: "mock",
model: "one-minute-stream",
notes: "Original note",
},
]);
try {
await page.setViewportSize({ width: 1680, height: 900 });
await openAgentProfileSettings(page);
await test.step("drawer-to-modal and compact resizes keep the edited name and save it", async () => {
await openAgentProfileEditor(page, "Original profile");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await fillAgentProfileName(page, "Draft rename");
await page.setViewportSize({ width: 1000, height: 900 });
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible({ timeout: 30_000 });
await expectAgentProfileNameDraft(page, "Draft rename");
await page.setViewportSize({ width: 390, height: 844 });
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible({ timeout: 30_000 });
await expectAgentProfileNameDraft(page, "Draft rename");
await saveOpenAgentProfile(page);
await expectAgentProfile(page, {
name: "Draft rename",
tags: [MOCK_PROVIDER_LABEL, "One minute stream"],
notes: "Original note",
});
});
await test.step("collapsing and reopening advanced settings keeps the draft note", async () => {
await page.setViewportSize({ width: 1000, height: 900 });
await openCreateAgentProfileEditor(page);
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible({ timeout: 30_000 });
await toggleAgentProfileCustomize(page);
await fillAgentProfileNotes(page, "Draft routing note");
await toggleAgentProfileCustomize(page);
await toggleAgentProfileCustomize(page);
await expectAgentProfileNotesDraft(page, "Draft routing note");
});
} finally {
await seed.restore();
}
});
test("duplicating while editing asks before discarding unsaved changes", async ({ page }) => {
const seed = await seedAgentProfiles([
{
id: "agent_profile_e2e_duplicate",
name: "UI work",
provider: "mock",
model: "one-minute-stream",
},
]);
try {
await page.setViewportSize({ width: 1680, height: 900 });
await openAgentProfileSettings(page);
await openAgentProfileEditor(page, "UI work");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await fillAgentProfileName(page, "Draft name");
await test.step("dismissing the prompt keeps the draft and does not create a copy", async () => {
await duplicateOpenAgentProfileWithConfirm(page, "dismiss");
await expectAgentProfileNameDraft(page, "Draft name");
await expectAgentProfileOrder(page, ["UI work"]);
});
await test.step("accepting the prompt creates and opens the copy", async () => {
await duplicateOpenAgentProfileWithConfirm(page, "accept");
await expectAgentProfileOrder(page, ["UI work", "UI work (copy)"]);
await expectAgentProfileNameDraft(page, "UI work (copy)");
});
} finally {
await seed.restore();
}
});
test("docked drawer allows roster search and section switches ask before discarding a draft", async ({
page,
}) => {
const seed = await seedAgentProfiles([
{
id: "agent_profile_e2e_docked_1",
name: "UI work",
provider: "mock",
model: "one-minute-stream",
},
{
id: "agent_profile_e2e_docked_2",
name: "Deep review",
provider: "mock",
model: "five-minute-stream",
},
]);
try {
await page.setViewportSize({ width: 1680, height: 900 });
await openAgentProfileSettings(page);
await openAgentProfileEditor(page, "UI work");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await test.step("typing in roster search works while the docked drawer is open", async () => {
const searchInput = page.getByTestId("agent-profiles-search-input");
await searchInput.click();
await page.keyboard.type("Deep");
await expect(searchInput).toHaveValue("Deep");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await expectAgentProfileOrder(page, ["Deep review"]);
await page.getByTestId("agent-profiles-search-clear").click();
});
await test.step("browser Back asks before discarding a draft and canceling keeps route and draft", async () => {
await fillAgentProfileName(page, "Unsaved browser back edit");
const profilesUrl = page.url();
await browserBackWithConfirm(page, "dismiss");
await expect(page).toHaveURL(profilesUrl, { timeout: 15_000 });
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await expectAgentProfileNameDraft(page, "Unsaved browser back edit");
});
await test.step("switching Settings sections asks before discarding an edited draft", async () => {
await fillAgentProfileName(page, "Unsaved sidebar edit");
await switchSettingsSectionWithConfirm(page, "Agents", "dismiss");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await expectAgentProfileNameDraft(page, "Unsaved sidebar edit");
await switchSettingsSectionWithConfirm(page, "Agents", "accept");
await expect(page.getByTestId("agent-profile-drawer")).toHaveCount(0, { timeout: 30_000 });
await expect(page.getByTestId("settings-detail-header-title")).toHaveText("Agents");
});
await test.step("confirming browser Back leaves Agent profiles and discards the draft", async () => {
await page.getByRole("button", { name: "Agent profiles", exact: true }).click();
await expect(page.getByTestId("agent-profiles-card")).toBeVisible({ timeout: 30_000 });
await openAgentProfileEditor(page, "UI work");
await fillAgentProfileName(page, "Discard on browser back");
const profilesUrl = page.url();
await browserBackWithConfirm(page, "accept");
await expect(page).not.toHaveURL(profilesUrl, { timeout: 15_000 });
await expect(page.getByTestId("agent-profile-drawer")).toHaveCount(0, { timeout: 30_000 });
});
} finally {
await seed.restore();
}
});
test("canceling a multi-step Back jump keeps intervening browser history and confirming reaches the destination", async ({
page,
}) => {
const seed = await seedAgentProfiles([
{
id: "agent_profile_e2e_multistep",
name: "UI work",
provider: "mock",
model: "one-minute-stream",
},
]);
try {
// Narrow viewport pushes Open project -> Settings -> Agent profiles onto history.
await page.setViewportSize({ width: 390, height: 844 });
await openCompactAgentProfileSettings(page);
const profilesUrl = page.url();
await openAgentProfileEditor(page, "UI work");
await fillAgentProfileName(page, "Unsaved multi-step edit");
await test.step("canceling a two-step Back jump keeps Agent profiles, draft, and Settings in history", async () => {
await browserHistoryJumpWithConfirm(page, -2, "dismiss");
await expect(page).toHaveURL(profilesUrl, { timeout: 15_000 });
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible();
await expectAgentProfileNameDraft(page, "Unsaved multi-step edit");
});
await test.step("canceling a two-step Back jump after reload still restores the Agent profiles URL", async () => {
await page.reload();
await expect(page.getByTestId("agent-profiles-card")).toBeVisible({ timeout: 30_000 });
await openAgentProfileEditor(page, "UI work");
await fillAgentProfileName(page, "Post-reload draft");
await browserHistoryJumpWithConfirm(page, -2, "dismiss");
await expect(page).toHaveURL(profilesUrl, { timeout: 15_000 });
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible();
await expectAgentProfileNameDraft(page, "Post-reload draft");
});
await test.step("confirming a two-step Back jump lands directly on the selected destination", async () => {
await browserHistoryJumpWithConfirm(page, -2, "accept");
await expect(page).toHaveURL(/\/open-project/, { timeout: 15_000 });
await expect(page.getByTestId("agent-profile-edit-modal")).toHaveCount(0, {
timeout: 30_000,
});
});
await test.step("forward navigation confirms the intervening Settings entry survived", async () => {
await page.goForward();
await expect(page).toHaveURL(/\/settings(?:\?|$)/, { timeout: 15_000 });
});
} finally {
await seed.restore();
}
});
test("canceling an untouched provider-and-model-only profile closes without a discard prompt", async ({
page,
}) => {
const seed = await seedAgentProfiles([
{
id: "legacy_favorite:mock:one-minute-stream",
name: "One minute stream",
provider: "mock",
model: "one-minute-stream",
},
]);
let dialogTriggered = false;
const onDialog = async (dialog: { dismiss: () => Promise<void> }) => {
dialogTriggered = true;
await dialog.dismiss();
};
page.on("dialog", onDialog);
try {
await page.setViewportSize({ width: 1680, height: 900 });
await openAgentProfileSettings(page);
await openAgentProfileEditor(page, "One minute stream");
await expect(page.getByTestId("agent-profile-drawer")).toBeVisible();
await page.getByTestId("agent-profile-cancel-button").click();
await expect(page.getByTestId("agent-profile-drawer")).toHaveCount(0, { timeout: 30_000 });
expect(dialogTriggered).toBe(false);
} finally {
page.off("dialog", onDialog);
await seed.restore();
}
});
});
@@ -430,7 +430,8 @@ async function expectFooterWithinWidth(page: Page, width: number): Promise<void>
const label = page.getByRole("button", { name: /^Worked for/ }).last();
await expect(label).toBeVisible();
await expectTimingInsideFooter(page);
const controls = footer.getByRole("button", { name: /Copy turn|Fork chat/ });
await expect(footer.getByRole("button", { name: "Turn stats" })).toBeVisible();
const controls = footer.getByRole("button", { name: /Copy turn|Fork chat|Turn stats/ });
const before = await controls.evaluateAll((elements) =>
elements.map((element) => {
const rect = element.getBoundingClientRect();
@@ -757,6 +757,161 @@ test("pasting an assistant selection preserves literal underscores and authored
}
});
const QUOTE_BODY = [
"Draft for the team: **ship it** with [the notes](https://example.com/notes).",
"",
"> Nested reply.",
"",
"```ts",
"const quoted = 1;",
"```",
"",
"```mermaid",
"flowchart LR",
" Start --> Done",
"```",
"",
"Thanks!",
].join("\n");
const QUOTE_MARKDOWN = [
"Text before the quote.",
"",
...QUOTE_BODY.split("\n").map((line) => (line ? `> ${line}` : ">")),
"",
"> [!NOTE]",
"> Heads up before you paste.",
"",
"Text after the quote.",
].join("\n");
function assistantQuote(page: Page, index: number): Locator {
return assistantMessageBlocks(page).getByRole("blockquote").nth(index);
}
/** A quote's own control is its first, ahead of any nested quote's. */
function quoteCopyControl(quote: Locator): Locator {
return quote.getByRole("button", { name: "Copy quote" }).first();
}
async function copyQuote(quote: Locator): Promise<void> {
await quote.hover();
await quoteCopyControl(quote).click();
await expect(quote.getByRole("button", { name: "Copied" })).toBeVisible();
}
async function pasteIntoPlainAndRichFields(page: Page): Promise<{ plain: Locator; rich: Locator }> {
await page.evaluate(() => {
const fields = document.createElement("div");
fields.style.cssText = "position: fixed; bottom: 0; left: 0; z-index: 10000; background: white";
const plainText = document.createElement("textarea");
plainText.setAttribute("aria-label", "Plain text paste");
const richText = document.createElement("div");
richText.contentEditable = "true";
richText.setAttribute("role", "textbox");
richText.setAttribute("aria-label", "Rich text paste");
fields.append(plainText, richText);
document.body.append(fields);
});
const plain = page.getByRole("textbox", { name: "Plain text paste" });
await plain.focus();
await page.keyboard.press("ControlOrMeta+v");
const rich = page.getByRole("textbox", { name: "Rich text paste" });
await rich.focus();
await page.keyboard.press("ControlOrMeta+v");
return { plain, rich };
}
test("a quote's copy control copies only that quote's body", async ({ context, page }) => {
const agent = await seedMockAgentWorkspace({
repoPrefix: "assistant-quote-copy-",
title: "Assistant quote copy",
initialPrompt: "Render the quote fixture.",
featureValues: { mockAssistantResponse: QUOTE_MARKDOWN },
});
try {
await allowRichClipboard(context);
await agent.client.waitForAgentUpsert(
agent.agentId,
(snapshot) => snapshot.status === "idle",
30_000,
);
await openAgentRoute(page, agent);
const quote = assistantQuote(page, 0);
const nested = assistantQuote(page, 1);
await expect(quote).toContainText("Thanks!");
await test.step("an admonition has no copy control", async () => {
await expect(assistantMessageBlocks(page)).toContainText("Heads up before you paste.");
await expect(
assistantMessageBlocks(page).getByRole("button", { name: "Copy quote" }),
).toHaveCount(2);
});
await test.step("the control appears on hover or keyboard focus", async () => {
const control = quoteCopyControl(quote);
await expect(control).toHaveCSS("opacity", "0");
await quote.hover();
await expect(control).toHaveCSS("opacity", "1");
await page.mouse.move(0, 0);
await expect(control).toHaveCSS("opacity", "0");
await control.focus();
await expect(control).toHaveCSS("opacity", "1");
await control.blur();
});
await test.step("copying the quote takes its body, with a diagram as its fence", async () => {
await expect(quote.getByRole("img", { name: "Diagram" })).toBeVisible({ timeout: 30_000 });
await copyQuote(quote);
const copied = await readRichClipboard(page);
expect(copied.plainText).toBe(QUOTE_BODY);
expect(copied.html).toContain("<strong>ship it</strong>");
expect(copied.html).toContain("<blockquote>");
});
await test.step("the copy pastes as Markdown and as rich text", async () => {
const { plain, rich } = await pasteIntoPlainAndRichFields(page);
await expect(plain).toHaveValue(QUOTE_BODY);
await expect(rich.locator("strong")).toHaveText("ship it");
await expect(rich.getByRole("link", { name: "the notes" })).toHaveAttribute(
"href",
"https://example.com/notes",
);
await expect(rich).not.toContainText("Text before the quote.");
});
await test.step("a nested quote copies only itself", async () => {
await copyQuote(nested);
await expect
.poll(async () => (await readRichClipboard(page)).plainText)
.toBe("Nested reply.");
});
await test.step("a code block in the quote keeps its own copy", async () => {
const code = quote.getByText("const quoted = 1;", { exact: true });
await code.hover();
await quote.getByRole("button", { name: "Copy code" }).first().click();
await expect.poll(() => readPlainClipboard(page)).toBe("const quoted = 1;");
});
await test.step("a phone-sized layout shows the control above the full-width text", async () => {
await page.mouse.move(0, 0);
await page.setViewportSize({ width: 390, height: 844 });
const control = quoteCopyControl(quote);
await expect(control).toHaveCSS("opacity", "1");
const controlBox = await control.boundingBox();
const firstLine = await quote.getByText(/^Draft for the team/).boundingBox();
expect(controlBox && firstLine).toBeTruthy();
// The text starts below the control instead of wrapping short of it.
expect(firstLine!.y).toBeGreaterThanOrEqual(controlBox!.y + controlBox!.height);
expect(firstLine!.x + firstLine!.width).toBeGreaterThan(controlBox!.x);
});
} finally {
await agent.cleanup();
}
});
test("copying a selection across an assistant image keeps its Markdown source and alt text", async ({
context,
page,
@@ -1,4 +1,5 @@
import { execFileSync } from "node:child_process";
import { mkdtempSync, rmSync } from "node:fs";
import { mkdir, readFile, unlink, writeFile } from "node:fs/promises";
import path from "node:path";
import { type Locator, type Page } from "@playwright/test";
@@ -471,6 +472,83 @@ test("All changes combines committed and pending edits and preserves an unfinish
});
});
test("Changes offers Push for a branch that was never pushed and the push sets its upstream", async ({
page,
}) => {
const workspace = await createWorkspaceWithRemote((repoPath) => {
execFileSync("git", ["checkout", "-b", "feature"], { cwd: repoPath });
});
await openWorkspaceChangesSurface(page, workspace);
const primary = page.getByTestId("changes-primary-cta");
await test.step("committing the edit makes Push the primary action", async () => {
await expect(primary).toHaveAccessibleName("Commit", { timeout: 30_000 });
commitAllWithGit(workspace.repoPath, "Feature work");
await expect(primary).toHaveAccessibleName("Push", { timeout: 30_000 });
});
await test.step("Push sends the branch and sets its upstream", async () => {
await primary.click();
await expect
.poll(() => remoteBranchHead(workspace, "feature"), { timeout: 30_000 })
.toBe(localHead(workspace));
// git writes the upstream after the remote has the branch, so wait for it too.
await expect
.poll(() => branchUpstream(workspace, "feature"), { timeout: 30_000 })
.toBe("origin/feature");
await expect(primary).not.toHaveAccessibleName("Push", { timeout: 30_000 });
});
});
test("Changes pushes and pulls a branch whose only remote is not named origin", async ({
page,
}) => {
const workspace = await createWorkspaceWithRemote((repoPath) => {
execFileSync("git", ["remote", "rename", "origin", "doras-mono"], { cwd: repoPath });
// git pull stops on a branch that is both ahead and behind until it is told how to combine them.
execFileSync("git", ["config", "pull.rebase", "false"], { cwd: repoPath });
});
await openWorkspaceChangesSurface(page, workspace);
const primary = page.getByTestId("changes-primary-cta");
await test.step("a branch that is ahead offers Push and the push updates the remote", async () => {
await expect(primary).toHaveAccessibleName("Commit", { timeout: 30_000 });
commitAllWithGit(workspace.repoPath, "Local work");
expect(trackingStatus(workspace)).toBe("## main...doras-mono/main [ahead 1]");
await expect(primary).toHaveAccessibleName("Push", { timeout: 30_000 });
await primary.click();
await expectInSyncWithRemote(workspace);
expect(remoteBranchSubjects(workspace, "main")).toContain("Local work");
await expectNoGitActionLeft(page);
});
await test.step("a branch that is behind offers Pull and the pull brings the commits in", async () => {
pushTeammateCommits(workspace, ["Teammate one", "Teammate two"]);
fetchRemote(workspace, "doras-mono");
expect(trackingStatus(workspace)).toBe("## main...doras-mono/main [behind 2]");
await expect(primary).toHaveAccessibleName("Pull", { timeout: 30_000 });
await primary.click();
await expectInSyncWithRemote(workspace);
expect(localBranchSubjects(workspace)).toEqual(
expect.arrayContaining(["Local work", "Teammate one", "Teammate two"]),
);
await expectNoGitActionLeft(page);
});
await test.step("a branch that is ahead and behind pulls and then pushes", async () => {
await writeFile(path.join(workspace.repoPath, "tracked.ts"), "export const tracked = 3;\n");
commitAllWithGit(workspace.repoPath, "More local work");
pushTeammateCommits(workspace, ["Teammate three", "Teammate four"]);
fetchRemote(workspace, "doras-mono");
expect(trackingStatus(workspace)).toBe("## main...doras-mono/main [ahead 1, behind 2]");
await expect(primary).toHaveAccessibleName("Pull", { timeout: 30_000 });
await page.getByTestId("changes-primary-cta-caret").click();
await page.getByTestId("changes-menu-pull-and-push").click();
await expectInSyncWithRemote(workspace);
expect(remoteBranchSubjects(workspace, "main")).toEqual(
expect.arrayContaining(["More local work", "Teammate three", "Teammate four"]),
);
await expectNoGitActionLeft(page);
});
});
test("Changes selects exact local and remote bases and retains the selection after reload", async ({
page,
}, testInfo) => {
@@ -2122,6 +2200,141 @@ async function createWorkspaceWithMountedTabDiff(
return { id: createdWorkspace.workspace.id, repoPath: repo.path };
}
interface RemoteWorkspace extends DirtyWorkspace {
remotePath: string;
}
// A regular checkout with a local bare remote and one uncommitted edit.
async function createWorkspaceWithRemote(
prepare: (repoPath: string) => void,
): Promise<RemoteWorkspace> {
const repo = await createTempGitRepo("changes-push-", {
withRemote: true,
files: [{ path: "tracked.ts", content: "export const tracked = 1;\n" }],
});
const client = await connectSeedClient();
cleanupTasks.push({
run: async () => {
await client.close();
await repo.cleanup();
},
});
// The helper keeps the bare remote inside the checkout; keep it out of the status.
await writeFile(path.join(repo.path, ".git/info/exclude"), "remote.git/\n");
prepare(repo.path);
await writeFile(path.join(repo.path, "tracked.ts"), "export const tracked = 2;\n");
const created = await client.createWorkspace({ source: { kind: "directory", path: repo.path } });
if (!created.workspace) {
throw new Error(created.error ?? `Failed to create workspace ${repo.path}`);
}
return {
id: created.workspace.id,
repoPath: repo.path,
remotePath: path.join(repo.path, "remote.git"),
};
}
// The app's Commit asks an agent provider for a message, and this harness has none.
function commitAllWithGit(repoPath: string, message: string): void {
execFileSync("git", ["commit", "-am", message], { cwd: repoPath, stdio: "ignore" });
}
function localHead(workspace: RemoteWorkspace): string {
return execFileSync("git", ["rev-parse", "HEAD"], {
cwd: workspace.repoPath,
encoding: "utf8",
}).trim();
}
function remoteBranchHead(workspace: RemoteWorkspace, branch: string): string | null {
const line = execFileSync("git", ["ls-remote", "--heads", workspace.remotePath, branch], {
encoding: "utf8",
}).trim();
return line ? (line.split("\t")[0] ?? null) : null;
}
// The branch line of `git status -sb`, such as "## main...origin/main [ahead 1, behind 2]".
function trackingStatus(workspace: RemoteWorkspace): string {
const status = execFileSync("git", ["status", "-sb"], {
cwd: workspace.repoPath,
encoding: "utf8",
});
return status.split("\n")[0] ?? "";
}
// Neither ahead nor behind, which a push reaches only after the remote accepted it.
async function expectInSyncWithRemote(workspace: RemoteWorkspace): Promise<void> {
await expect
.poll(() => trackingStatus(workspace), { timeout: 30_000 })
.toMatch(/^## [^ ]+\.\.\.[^ ]+$/);
}
// A clean main that is in sync with its remote has no git action, so the button is gone.
async function expectNoGitActionLeft(page: Page): Promise<void> {
await expect(page.getByTestId("changes-primary-cta")).toBeHidden({ timeout: 30_000 });
}
function localBranchSubjects(workspace: RemoteWorkspace): string[] {
return commitSubjects(workspace.repoPath, "HEAD");
}
function remoteBranchSubjects(workspace: RemoteWorkspace, branch: string): string[] {
return commitSubjects(workspace.remotePath, branch);
}
function commitSubjects(repoPath: string, revision: string): string[] {
const log = execFileSync("git", ["log", "--format=%s", revision], {
cwd: repoPath,
encoding: "utf8",
});
return log.trim().split("\n");
}
// Paseo fetches only origin in the background, so the checkout learns about another remote's
// commits when the user fetches it.
function fetchRemote(workspace: RemoteWorkspace, remoteName: string): void {
execFileSync("git", ["fetch", "--quiet", remoteName], { cwd: workspace.repoPath });
}
// Lands commits on the remote's main from a second clone, as a teammate's push does.
function pushTeammateCommits(workspace: RemoteWorkspace, subjects: string[]): void {
const clonePath = mkdtempSync(path.join(path.dirname(workspace.repoPath), "changes-teammate-"));
try {
execFileSync("git", ["clone", "--quiet", workspace.remotePath, clonePath]);
for (const subject of subjects) {
execFileSync(
"git",
[
"-c",
"user.name=Teammate",
"-c",
"user.email=teammate@paseo.test",
"-c",
"commit.gpgsign=false",
"commit",
"--quiet",
"--allow-empty",
"-m",
subject,
],
{ cwd: clonePath },
);
}
execFileSync("git", ["push", "--quiet", "origin", "HEAD:main"], { cwd: clonePath });
} finally {
rmSync(clonePath, { recursive: true, force: true });
}
}
// Empty until the branch has an upstream.
function branchUpstream(workspace: RemoteWorkspace, branch: string): string {
return execFileSync(
"git",
["for-each-ref", "--format=%(upstream:short)", `refs/heads/${branch}`],
{ cwd: workspace.repoPath, encoding: "utf8" },
).trim();
}
async function createWorkspaceWithNetDiff(): Promise<DirtyWorkspace> {
const repo = await createTempGitRepo("changes-net-", {
files: [{ path: "a-tracked.ts", content: "base\n" }],
@@ -59,6 +59,35 @@ async function selectClientSlashCommand(page: Page, query: string, label: string
await input.press("Enter");
}
async function typeBeforeMenuFilters(
page: Page,
input: { text: string; key: "Tab" | "Enter" },
): Promise<void> {
await composerLocator(page).evaluate(async (element, { text, key }) => {
if (!(element instanceof HTMLTextAreaElement)) {
throw new Error("Composer input is not a textarea");
}
const setValue = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set;
if (!setValue) throw new Error("Textarea value setter is unavailable");
setValue.call(element, text);
element.setSelectionRange(text.length, text.length);
element.dispatchEvent(new Event("input", { bubbles: true }));
await Promise.resolve();
element.dispatchEvent(new KeyboardEvent("keydown", { key, bubbles: true, cancelable: true }));
await new Promise((resolve) => requestAnimationFrame(() => setTimeout(resolve, 0)));
}, input);
}
async function showExitSuggestion(page: Page, query: string): Promise<void> {
await composerLocator(page).fill(query);
await expect(page.getByText("/exit", { exact: true }).first()).toBeVisible();
}
async function expectOpenAgentWithInput(page: Page, agentId: string, text: string): Promise<void> {
await expect(composerLocator(page)).toHaveValue(text);
await expectWorkspaceTabVisible(page, agentId);
}
async function expectAgentArchivedInSessions(page: Page, title: string): Promise<void> {
await openSessions(page);
await expectSessionRowArchived(page, title);
@@ -131,6 +160,16 @@ test.describe("Client slash commands", () => {
);
});
for (const key of ["Tab", "Enter"] as const) {
test(`${key} ignores an exit suggestion for an earlier query`, async ({ page }) => {
await withOpenReadyMockAgent(page, { title: "Stale slash command" }, async ({ agentId }) => {
await showExitSuggestion(page, "/e");
await typeBeforeMenuFilters(page, { text: "/co", key });
await expectOpenAgentWithInput(page, agentId, "/co");
});
});
}
test("slash clear replaces the active agent with a matching draft", async ({ page }) => {
await withOpenReadyMockAgent(
page,
@@ -1,4 +1,21 @@
import { execFileSync } from "node:child_process";
import { mkdtempSync, rmSync } from "node:fs";
import { tmpdir } from "node:os";
import path from "node:path";
import type { createCreationScenario } from "../support/helpers/creation";
import { gotoAppShell } from "../support/helpers/app";
import { fillComposerDraft } from "../support/helpers/composer";
import {
connectNewWorkspaceDaemonClient,
openNewWorkspaceComposer,
selectWorkspaceIsolation,
} from "../support/helpers/new-workspace";
import {
seedTerminalProfiles,
selectLaunchOption,
submitTerminalLaunch,
} from "../support/helpers/new-workspace-launch";
import { waitForSidebarHydration } from "../support/helpers/workspace-ui";
import { expect } from "../support/fixtures";
import { test } from "../support/creation-fixtures";
@@ -116,12 +133,14 @@ for (const scenario of [
test(`retrying failed agent initialization preserves its workspace${scenario.suffix}`, async ({
creation,
startup,
page,
}) => {
await creation.openWorkspaceForm("local");
await creation.submitPrompt("Retry this workspace and agent together.", "Create");
await creation.expectAgentStillStarting();
await startup.fail();
await creation.expectStartupFailure();
await expect(page.getByTestId("app-toast")).toHaveCount(0);
await creation.expectOneCreatedWorkspace();
await scenario.prepare(creation);
await creation.submitPrompt("Retry this workspace and agent together.");
@@ -180,6 +199,105 @@ test("an edited agent draft starts after its first start failed", async ({
await expect(page.getByText(/request_key_conflict/)).toHaveCount(0);
});
test("editing a failed New workspace submission starts without a request key conflict", async ({
page,
}) => {
// An empty git repository naturally rejects worktree creation before workspace_ready.
const repoDir = mkdtempSync(path.join(tmpdir(), "paseo-empty-git-ws-"));
execFileSync("git", ["init"], { cwd: repoDir, stdio: "ignore" });
const client = await connectNewWorkspaceDaemonClient();
let projectId: string | null = null;
try {
const seeded = await client.createWorkspace({
source: { kind: "directory", path: repoDir },
});
if (!seeded.workspace) throw new Error(seeded.error ?? "Failed to seed empty git project");
projectId = seeded.workspace.projectId;
const listed = await client.listProjects();
const project = listed.projects.find((entry) => entry.projectId === projectId);
if (!project?.projectKey) throw new Error("Seeded project has no projectKey");
await gotoAppShell(page);
await waitForSidebarHydration(page);
await openNewWorkspaceComposer(page, {
projectKey: project.projectKey,
projectDisplayName: seeded.workspace.projectDisplayName,
});
await selectWorkspaceIsolation(page, "worktree");
await fillComposerDraft(page, "Start original worktree task.");
await page.getByRole("button", { name: "Create", exact: true }).click();
const composerError = page.getByTestId("composer-error").filter({ visible: true }).first();
await expect(composerError).toContainText("Unable to resolve repository default branch");
// The failure renders once in the composer alert, not duplicated in a top toast.
await expect(page.getByText("Unable to resolve repository default branch")).toHaveCount(1);
await selectWorkspaceIsolation(page, "local");
await fillComposerDraft(page, "hi");
await page.getByRole("button", { name: "Create", exact: true }).click();
await expect(page).toHaveURL(/\/workspace\//);
await expect(page.getByText(/request_key_conflict/)).toHaveCount(0);
await expect(
page.getByTestId("user-message").filter({ hasText: "hi", visible: true }),
).toBeVisible();
} finally {
if (projectId) await client.removeProject(projectId).catch(() => undefined);
await client.close();
rmSync(repoDir, { recursive: true, force: true });
}
});
test("switching only the launch target after a failed New workspace creation starts a new workspace", async ({
creation,
workspaceProvision,
page,
}) => {
const profiles = await seedTerminalProfiles([
{
id: "promptless-shell",
name: "Promptless Shell",
command: "sh",
args: ["-c", "echo ready; sleep 5"],
promptArg: "none",
},
]);
try {
await creation.openWorkspaceForm("local");
await workspaceProvision.fail();
await page.getByRole("button", { name: "Create", exact: true }).click();
await expect(
page.getByTestId("composer-error").filter({ visible: true }).first(),
).toContainText("Workspace provisioning failed for test");
await selectLaunchOption(page, "promptless-shell");
await submitTerminalLaunch(page);
await creation.expectOneCreatedWorkspace();
await expect(
page.locator('[data-testid^="workspace-tab-terminal_"]').filter({ visible: true }).first(),
).toBeVisible();
} finally {
await profiles.restore();
}
});
test("failing New workspace creation after switching workspaces shows an error toast", async ({
creation,
workspaceProvision,
page,
}) => {
await creation.openWorkspaceForm("local");
await workspaceProvision.hold();
await page.getByRole("button", { name: "Create", exact: true }).click();
await page.locator('[data-testid^="sidebar-workspace-row-"]').first().click();
await expect(page).toHaveURL(/\/workspace\//);
await workspaceProvision.fail();
await expect(page.getByTestId("app-toast")).toContainText(
"Workspace provisioning failed for test",
);
});
for (const entry of [
{
name: "agent draft",
@@ -4,7 +4,7 @@ import { test, expect, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import {
addProjectFlowInput,
chooseAddProjectMethod,
addProjectFlowSubmit,
openAddProjectFlow,
} from "../support/helpers/add-project-flow";
import { expectOpenedProject } from "../support/helpers/project-picker-ui";
@@ -53,7 +53,6 @@ async function removeProjectFromSidebar(page: Page, projectViewKey: string): Pro
async function addProjectFromPicker(page: Page, projectPath: string): Promise<string> {
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
const input = addProjectFlowInput(page);
await input.fill(projectPath);
@@ -85,7 +84,6 @@ test.describe("Project picker search", () => {
await gotoAppShell(page);
await waitForSidebarProjectListReady(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
const input = addProjectFlowInput(page);
await input.fill(projectPickerFixture.fuzzyQuery);
@@ -93,6 +91,7 @@ test.describe("Project picker search", () => {
const suggestion = page.getByText(projectPickerFixture.projectName, { exact: false }).first();
await expect(suggestion).toBeVisible({ timeout: 30_000 });
await suggestion.click();
await addProjectFlowSubmit(page).click();
const projectId = await expectOpenedProject(page, projectPickerFixture.projectName);
projectPickerFixture.rememberProjectId(projectId);
@@ -104,13 +103,11 @@ test.describe("Project picker search", () => {
await gotoAppShell(page);
await waitForSidebarProjectListReady(page);
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
const input = addProjectFlowInput(page);
await input.fill("paseo-loading-state-no-match");
await expect(page.getByText("Start typing a path", { exact: true })).toHaveCount(0);
await expect(page.getByText("Loading...", { exact: true })).toBeVisible();
await expect(page.getByText("Searching...", { exact: true })).toBeVisible();
});
});
@@ -4,12 +4,15 @@
// never swallow entity tabs or lose the user's focus, and
// 2) splitting a tab out of a pane leaves a New tab behind, and the app must stay
// interactive in the [agent | New | explorer] state.
import { writeFileSync } from "node:fs";
import path from "node:path";
import { expect, type Locator, type Page } from "@playwright/test";
import { test } from "../support/fixtures";
import { gotoWorkspace } from "../support/helpers/launcher";
import { seedCorruptedWorkspaceLayout } from "../support/helpers/workspace-layout";
import {
openChangesTreePanel,
openFilesPanel,
waitForWorkspaceTabsVisible,
} from "../support/helpers/workspace-tabs";
@@ -317,3 +320,75 @@ test("reloading a saved hidden generated Explorer recovers a usable workspace",
await gotoWorkspace(page, otherWorkspace.workspaceId);
await expect(draftTabChip(page)).toHaveCount(1);
});
test("dragging a file tab into a split returns the previous pane to the tab you came from", async ({
page,
withWorkspace,
e2eWorkerClient,
}) => {
const workspace = await withWorkspace({ prefix: "split-prev-tab-focus-" });
writeFileSync(path.join(workspace.repoPath, "notes.md"), "# Notes\nhello\n");
const agentA = await e2eWorkerClient.createAgent({
provider: "mock",
cwd: workspace.repoPath,
workspaceId: workspace.workspaceId,
title: "Agent A",
});
const agentB = await e2eWorkerClient.createAgent({
provider: "mock",
cwd: workspace.repoPath,
workspaceId: workspace.workspaceId,
title: "Agent B",
});
await gotoWorkspace(page, workspace.workspaceId);
await waitForWorkspaceTabsVisible(page);
const mainPane = page.getByTestId("workspace-pane-main");
await expect(mainPane.getByTestId(`workspace-tab-agent_${agentA.id}`)).toBeVisible({
timeout: 30_000,
});
await expect(mainPane.getByTestId(`workspace-tab-agent_${agentB.id}`)).toBeVisible({
timeout: 30_000,
});
const initialTabs = await mainPane
.locator('[data-testid^="workspace-tab-"]:not([data-testid^="workspace-tab-context-"])')
.evaluateAll((els) => els.map((el) => el.getAttribute("data-testid")));
const firstTab = mainPane.getByTestId(initialTabs[0]!);
const secondTab = mainPane.getByTestId(initialTabs[1]!);
// Open FILE while on B so B is the birth parent, then navigate A -> FILE before splitting.
await secondTab.click({ position: { x: 12, y: 13 } });
await expect(secondTab).toHaveAttribute("aria-selected", "true");
await openFilesPanel(page);
await page
.getByTestId("file-explorer-tree-scroll")
.getByText("notes.md", { exact: true })
.click();
const fileTab = mainPane
.locator('[data-testid^="workspace-tab-file_"]:not([data-testid^="workspace-tab-context-"])')
.first();
await expect(fileTab).toBeVisible({ timeout: 15_000 });
await firstTab.click({ position: { x: 12, y: 13 } });
await expect(firstTab).toHaveAttribute("aria-selected", "true");
await fileTab.click({ position: { x: 12, y: 13 } });
await expect(fileTab).toHaveAttribute("aria-selected", "true");
const mainBox = await mainPane.boundingBox();
if (!mainBox) throw new Error("mainPane has no bounding box");
await dragChipTo(page, fileTab, {
x: mainBox.x + mainBox.width * 0.92,
y: mainBox.y + mainBox.height * 0.5,
});
await expect(
page.locator('[data-testid^="workspace-pane-"]').filter({ visible: true }),
).toHaveCount(2, { timeout: 10_000 });
await expect(firstTab).toHaveAttribute("aria-selected", "true");
await expect(secondTab).toHaveAttribute("aria-selected", "false");
});
@@ -1,17 +1,10 @@
import type { Page } from "@playwright/test";
import { test, expect } from "../support/fixtures";
import { runWorkspaceActionFromCommandCenter } from "../support/helpers/command-center-workspace-actions";
interface DragMeasurement {
observer: MutationObserver;
stylesheetMutations: number;
}
declare global {
interface Window {
__PASEO_EXPLORER_DRAG_MEASUREMENT__?: DragMeasurement;
}
}
import {
readSharedStylesheetChanges,
rememberSharedStylesheet,
} from "../support/helpers/shared-stylesheet";
async function waitForResizePaint(page: Page): Promise<void> {
await page.evaluate(
@@ -23,23 +16,8 @@ async function waitForResizePaint(page: Page): Promise<void> {
}
async function beginResizeMeasurement(page: Page): Promise<void> {
await page.evaluate(() => {
const stylesheet = document.getElementById("unistyles-web");
if (!stylesheet) throw new Error("Shared stylesheet is missing");
globalThis.__PASEO_RESET_RENDER_PROFILE__!();
const measurement: DragMeasurement = {
stylesheetMutations: 0,
observer: new MutationObserver((records) => {
measurement.stylesheetMutations += records.length;
}),
};
measurement.observer.observe(stylesheet, {
childList: true,
subtree: true,
characterData: true,
});
window.__PASEO_EXPLORER_DRAG_MEASUREMENT__ = measurement;
});
await page.evaluate(() => globalThis.__PASEO_RESET_RENDER_PROFILE__!());
await rememberSharedStylesheet(page);
}
async function previewExplorerResize(page: Page, distance: number) {
@@ -61,16 +39,14 @@ async function previewExplorerResize(page: Page, distance: number) {
await waitForResizePaint(page);
}
const during = (await explorer.boundingBox())!.width;
const measurement = await page.evaluate(() => {
const state = window.__PASEO_EXPLORER_DRAG_MEASUREMENT__!;
state.observer.disconnect();
return {
stylesheetMutations: state.stylesheetMutations,
paneRenders: Object.entries(globalThis.__PASEO_RENDER_PROFILE_REASONS__ ?? {})
const measurement = {
stylesheetChanges: await readSharedStylesheetChanges(page),
paneRenders: await page.evaluate(() =>
Object.entries(globalThis.__PASEO_RENDER_PROFILE_REASONS__ ?? {})
.filter(([id]) => id.startsWith("SplitPaneView:"))
.reduce((sum, [, reasons]) => sum + (reasons.render ?? 0), 0),
};
});
),
};
await page.mouse.up();
await waitForResizePaint(page);
const after = (await explorer.boundingBox())!.width;
@@ -92,7 +68,7 @@ async function expectExplorerWidthSurvivesReload(page: Page, width: number): Pro
await expect.poll(async () => (await explorer.boundingBox())?.width).toBeCloseTo(width, 0);
}
test("Explorer drag previews without rerendering panes or rewriting the shared stylesheet", async ({
test("Explorer drag previews without rerendering panes or changing the shared stylesheet", async ({
page,
withWorkspace,
}) => {
@@ -117,9 +93,9 @@ test("Explorer drag previews without rerendering panes or rewriting the shared s
).toBe(true);
const grown = await previewExplorerResize(page, -100);
const shrunk = await previewExplorerResize(page, 50);
expect(grown.stylesheetMutations).toBe(0);
expect(grown.stylesheetChanges).toEqual({ added: 0, removed: 0, edited: 0, rebuilt: 0 });
expect(grown.paneRenders).toBe(0);
expect(shrunk.stylesheetMutations).toBe(0);
expect(shrunk.stylesheetChanges).toEqual({ added: 0, removed: 0, edited: 0, rebuilt: 0 });
expect(shrunk.paneRenders).toBe(0);
await expectExplorerWidthSurvivesReload(page, shrunk.width);
});
@@ -4,6 +4,7 @@ import {
addConnectedHostAndReload,
chooseHostBadgeDisplay,
chooseHostColor,
chooseHostIcon,
expectHostAppearancePreview,
expectHostBadgeIconOnly,
expectHostBadgeName,
@@ -115,12 +116,21 @@ test("customizes a host badge and preserves its appearance after reload", async
expect(widths.content).toBeLessThanOrEqual(widths.client);
});
await test.step("preview a color and apply it to the sidebar badge", async () => {
await test.step("preview a color and icon and apply them to the sidebar badge and host popover", async () => {
await openHostAppearanceSettings(page, badge.serverId);
await chooseHostColor(page, "Teal");
await chooseHostIcon(page, "Laptop");
await expectHostAppearancePreview(page, { serverId: badge.serverId, hostName, color: "teal" });
await leaveHostAppearanceSettings(page);
await expectHostBadgeTinted(page, { ...badge, hostName, color: "teal" });
await page.getByTestId("sidebar-hosts-trigger").click();
const hostRow = page.getByTestId(`sidebar-host-row-${badge.serverId}`);
await expect(hostRow).toBeVisible();
await expect(hostRow).toContainText("Direct");
await expect(hostRow).toContainText(/\d+(?:\.\d+)?(?:µs|ms|s)/);
await expect(hostRow).not.toContainText(/agents?/i);
await page.keyboard.press("Escape");
});
await test.step("keep the icon-only preference through reload", async () => {
@@ -145,3 +155,30 @@ test("customizes a host badge and preserves its appearance after reload", async
});
});
});
base(
"activates Add host from the sidebar host picker via focus+Enter and Arrow+Enter",
async ({ page }) => {
await gotoAppShell(page);
const trigger = page.getByTestId("sidebar-hosts-trigger");
await expect(trigger).toBeVisible();
// Focus + Enter on Add host must open the Add connection dialog rather than selecting the active host.
const addConnectionDialog = page.getByRole("dialog").filter({ hasText: "Add connection" });
await trigger.click();
const addHostButton = page.getByRole("button", { name: "Add host", exact: true });
await expect(addHostButton).toBeVisible();
await addHostButton.focus();
await page.keyboard.press("Enter");
await expect(addConnectionDialog).toBeVisible();
await page.keyboard.press("Escape");
await expect(addConnectionDialog).toBeHidden();
// ArrowDown + Enter must also reach Add host from the host list.
await trigger.click();
await expect(addHostButton).toBeVisible();
await page.keyboard.press("ArrowDown");
await page.keyboard.press("Enter");
await expect(addConnectionDialog).toBeVisible();
},
);
@@ -4,10 +4,15 @@ import { copyFile, mkdir, rm, utimes, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import type { TestInfo } from "@playwright/test";
import type { FetchRecentProviderSessionsRequestMessage } from "@getpaseo/protocol/messages";
import { expect, test, type Page } from "../support/fixtures";
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
import { addConnectedHostAndReload } from "../support/helpers/hosts";
import { ImportSessionFlow } from "../support/helpers/import-session";
import { startIsolatedHostDaemon } from "../support/helpers/isolated-host-daemon";
import {
connectNewWorkspaceDaemonClient,
loadSessionMessageReaders,
openProjectViaDaemon,
type OpenedProject,
} from "../support/helpers/new-workspace";
@@ -20,16 +25,22 @@ const SCREENSHOT_DIRECTORY = path.join(
const claudeConfigDirectory = mkdtempSync(path.join(tmpdir(), "paseo-import-flow-claude-"));
const brokenProvider = "broken-acp";
const disabledProviders = {
codex: { enabled: false },
copilot: { enabled: false },
omp: { enabled: false },
opencode: { enabled: false },
pi: { enabled: false },
antigravity: { enabled: false },
muse: { enabled: false },
};
test.use({
e2eDaemonConfig: {
version: 1,
agents: {
providers: {
codex: { enabled: false },
copilot: { enabled: false },
omp: { enabled: false },
opencode: { enabled: false },
pi: { enabled: false },
...disabledProviders,
[brokenProvider]: {
extends: "acp",
label: "Broken ACP",
@@ -136,6 +147,120 @@ test("an open Import Session row keeps its age current", async ({ page }) => {
await expect(row).toContainText("4m ago");
});
test("shows listing failure details beside healthy sessions and retries the failed provider", async ({
page,
}, testInfo) => {
const frames = await loadSessionMessageReaders();
const requests: FetchRecentProviderSessionsRequestMessage[] = [];
const completed = new Set<string>();
page.on("websocket", (socket) => {
socket.on("framesent", ({ payload }) => {
const request = frames.client(payload);
if (request?.type === "fetch_recent_provider_sessions_request") {
requests.push(request);
}
});
socket.on("framereceived", ({ payload }) => {
const response = frames.server(payload);
if (response?.type === "fetch_recent_provider_sessions_response") {
completed.add(response.payload.requestId);
}
});
});
const flow = new ImportSessionFlow(page);
for (const width of [1280, 390]) {
await flow.openWorkspace(scenario.project.workspaceId, { width, height: 844 });
await flow.openGlobally();
await flow.expectProviderError("Broken ACP");
const healthySession = page.getByTestId(
`import-session-session-claude-${scenario.importSessionId}`,
);
await expect(healthySession).toBeVisible();
await page.screenshot({ path: testInfo.outputPath(`listing-failure-${width}.png`) });
await expect(page.getByTestId("import-session-provider-errors")).toContainText(
"missing-agent-command",
);
const requestOffset = requests.length;
await flow.retryProvider(brokenProvider, "Broken ACP");
await expect
.poll(() => requests.slice(requestOffset).map((request) => request.providers))
.toEqual([[brokenProvider]]);
const retriedRequest = requests[requestOffset];
if (!retriedRequest) throw new Error("Retry did not send a provider listing request");
await expect.poll(() => completed.has(retriedRequest.requestId)).toBe(true);
await expect(page.getByTestId(`import-session-retry-${brokenProvider}`)).toBeEnabled();
await expect(page.getByTestId("import-session-provider-errors")).toContainText(
"missing-agent-command",
);
await expect(healthySession).toBeVisible();
await page.screenshot({ path: testInfo.outputPath(`listing-failure-retry-${width}.png`) });
await flow.close();
}
});
test("Import Session keeps listings tied to their host during a switch and a pending import", async ({
page,
}) => {
const secondaryHost = await startIsolatedHostDaemon("import-session-secondary", {
config: {
agents: {
providers: {
...disabledProviders,
claude: { enabled: false },
[brokenProvider]: {
extends: "acp",
label: "Broken ACP",
command: ["missing-secondary-command", "acp"],
},
},
},
},
});
try {
const gate = await installDaemonWebSocketGate(page);
const flow = new ImportSessionFlow(page);
await flow.openWorkspace(scenario.project.workspaceId, { width: 1280, height: 844 });
await addConnectedHostAndReload(page, {
serverId: secondaryHost.serverId,
port: secondaryHost.port,
label: "Second import host",
primaryLabel: "First import host",
});
await flow.chooseHostForImport("First import host");
await expect(page.getByText(/missing-agent-command/)).toBeVisible();
await flow.close();
await flow.chooseHostForImport("Second import host");
await expect(page.getByText(/missing-secondary-command/)).toBeVisible();
await expect(page.getByText(/missing-agent-command/)).toHaveCount(0);
await flow.close();
await test.step("returning to the original host omits the session imported during the switch", async () => {
const sessionId = "fixture-root-04";
await flow.chooseHostForImport("First import host");
gate.holdNextClientRequest("import_agent_request");
await flow.startImport(sessionId);
await gate.waitForHeldClientRequest();
await flow.close();
await flow.chooseHostForImport("Second import host");
await flow.expectProviderError("Broken ACP");
gate.releaseHeldClientRequest();
await flow.expectClosed();
await flow.chooseHostForImport("First import host");
await flow.revealSession("fixture-worktree");
await flow.expectSessionUnavailable(sessionId);
await flow.close();
await flow.expectTranscript("Review fixture item 4", "Fixture response 4");
});
} finally {
await secondaryHost.close();
}
});
test("captures the compact import-session journey", async ({ page }, testInfo) => {
const flow = new ImportSessionFlow(page);
await flow.openWorkspace(scenario.project.workspaceId, { width: 390, height: 844 });
@@ -378,7 +503,13 @@ async function seedClaudeSessions(input: {
unrelatedDirectory: string;
importSessionId: string;
}): Promise<number> {
const sessions = [
const sessions: {
cwd: string;
id: string;
title: string;
prompt: string;
answer?: string;
}[] = [
{
cwd: input.projectRoot,
id: input.importSessionId,
@@ -403,6 +534,7 @@ async function seedClaudeSessions(input: {
id: `fixture-root-${String(index + 1).padStart(2, "0")}`,
title: `Root session ${String(index + 1).padStart(2, "0")}`,
prompt: index === 7 ? "Investigate invoice rendering" : `Review fixture item ${index + 1}`,
...(index === 3 ? { answer: "Fixture response 4" } : {}),
})),
];
const newest = Date.now() - 60_000;
@@ -55,7 +55,7 @@ import {
import { getServerId } from "../support/helpers/server-id";
import { selectSidebarStatusGrouping } from "../support/helpers/sidebar";
import { getE2EDaemonPort } from "../support/helpers/daemon-port";
import { chooseAddProjectMethod, expectAddProjectPage } from "../support/helpers/add-project-flow";
import { expectAddProjectTab } from "../support/helpers/add-project-flow";
import { seedSavedSettingsHosts } from "../support/helpers/settings";
import {
expectSidebarWorkspaceSelected,
@@ -291,8 +291,7 @@ test.describe("New workspace flow", () => {
await expect(addProject).toContainText(/(?:⌘|Ctrl\+)O/);
await addProject.click();
await expectAddProjectPage(page, "method");
await chooseAddProjectMethod(page, "directory-search");
await expectAddProjectTab(page, "existing");
} finally {
await repo.cleanup();
}
@@ -372,6 +372,25 @@ test.describe("Plugin sidebar items", () => {
await expect(page.getByText("Plugin failed", { exact: false })).toHaveCount(0);
});
test("a plugin screen keeps the sidebar toggle before its title", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await expect(headerRow(page, SHOWCASE_PLUGIN_ID, "deploys")).toBeVisible({ timeout: 30_000 });
await runCommand(page, "Open plugin workspaces");
await expect(screenTitle(page)).toHaveText("Workspaces");
await page.keyboard.press("ControlOrMeta+b");
await expect(page.getByTestId("sidebar-global-new-workspace")).not.toBeVisible();
await expect(visibleTestId(page, "menu-button")).toBeVisible();
const toggle = await boxOf(visibleTestId(page, "menu-button"));
const title = await boxOf(screenTitle(page));
expect(toggle.x + toggle.width).toBeLessThanOrEqual(title.x);
await qaScreenshot(page, "plugin-screen-sidebar-collapsed");
await visibleTestId(page, "menu-button").click();
await expect(page.getByTestId("sidebar-global-new-workspace")).toBeVisible();
});
test("a header row's shortcut hint presses the row", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
@@ -1,6 +1,12 @@
import { test } from "../support/fixtures";
import { expect, test } from "../support/fixtures";
import {
expectChatHistoryAttachment,
forkMostRecentAssistantTurnToNewTab,
observeForkAttachment,
} from "../support/helpers/assistant-fork";
import { installDaemonWebSocketGate } from "../support/helpers/daemon-websocket-gate";
import {
ASSISTANT_TEXT,
withTimelinePlugin,
viewInlineThinkingExample,
requestPluginTimeline,
@@ -55,3 +61,24 @@ test("inline-thinking example renders a streamed thought through host UI", async
}, info) => {
await viewInlineThinkingExample(page, info);
});
test("plugin-transformed assistant reply keeps copy, fork, and turn duration in its footer", async ({
page,
}, info) => {
const forkAttachment = observeForkAttachment(page);
await withTimelinePlugin(page, info, "assistant", async (agent) => {
await requestPluginTimeline(agent);
await agent.client.waitForFinish(agent.agentId, 30_000);
await expectWholeCompletedCard(page);
const footer = page.getByTestId("turn-footer").last();
await expect(footer).toBeVisible();
await expect(footer.getByRole("button", { name: "Copy turn" })).toBeVisible();
await expect(footer.getByRole("button", { name: "Fork chat from here" })).toBeVisible();
await expect(footer.getByText(/^Worked for /)).toBeVisible();
await forkMostRecentAssistantTurnToNewTab(page);
await expectChatHistoryAttachment(page);
expect(await forkAttachment.waitForText()).toContain(ASSISTANT_TEXT);
});
});
@@ -46,11 +46,7 @@ import {
} from "../support/helpers/project-settings";
import { gotoAppShell } from "../support/helpers/app";
import { openCompactSettings } from "../support/helpers/settings";
import {
addProjectFlowInput,
chooseAddProjectMethod,
openAddProjectFlow,
} from "../support/helpers/add-project-flow";
import { addProjectFlowInput, openAddProjectFlow } from "../support/helpers/add-project-flow";
import { createTempGitRepo } from "../support/helpers/workspace";
import {
buildOpenProjectRoute,
@@ -167,7 +163,6 @@ async function readProjectConfigFile(project: ProjectsSettingsProject): Promise<
async function addProjectFromSidebar(page: Page, projectPath: string): Promise<string> {
await openAddProjectFlow(page);
await chooseAddProjectMethod(page, "directory-search");
const input = addProjectFlowInput(page);
await input.fill(projectPath);
@@ -118,7 +118,8 @@ async function exerciseProviderSettingsStack(page: Page) {
await page.getByRole("button", { name: "Refresh", exact: true }).click();
await expectProviderSettingsVisible(page);
await expect(page.getByText("Checked just now", { exact: true })).toBeVisible({
// The Models header puts the model count before it: "12 · Checked just now".
await expect(page.getByText(/Checked just now$/)).toBeVisible({
timeout: 30_000,
});
}
@@ -235,7 +235,7 @@ test.describe("Rewind sheet", () => {
await expect(page.getByTestId("rewind-menu-content")).toHaveCount(0);
await expect(userMessage(page, secondPrompt)).toHaveCount(0);
await expect(page.getByText("Cycle 1", { exact: true })).toHaveCount(0);
await expectUserMessageCount(page, 1);
await expectUserMessageCount(page, 0);
await expectComposerDraft(page, firstPrompt);
await expectComposerFocused(page);
@@ -243,7 +243,7 @@ test.describe("Rewind sheet", () => {
await expectUserMessageVisible(page, replacementPrompt);
await expect(userMessage(page, secondPrompt)).toHaveCount(0);
await expect(page.getByText("Cycle 1", { exact: true })).toHaveCount(0);
await expectUserMessageCount(page, 2);
await expectUserMessageCount(page, 1);
await fillComposerDraft(page, "");
await composerLocator(page).evaluate((element) => element.blur());
@@ -254,7 +254,19 @@ test.describe("Rewind sheet", () => {
await expect(page.getByTestId("rewind-menu-content")).toHaveCount(0);
await expectComposerDraft(page, "");
await expectComposerNotFocused(page);
await expectUserMessageCount(page, 2);
await expectUserMessageCount(page, 1);
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 expectComposerNotFocused(page);
await expectUserMessageCount(page, 1);
await fillComposerDraft(page, "");
await composerLocator(page).evaluate((element) => element.blur());
@@ -265,7 +277,7 @@ test.describe("Rewind sheet", () => {
await expect(page.getByTestId("rewind-menu-content")).toHaveCount(0);
await expectComposerDraft(page, replacementPrompt);
await expectComposerFocused(page);
await expectUserMessageCount(page, 1);
await expectUserMessageCount(page, 0);
} finally {
await session.cleanup();
}
@@ -64,6 +64,10 @@ import {
expectSettingsHostPickerLabel,
openSettingsHostSection,
removeCurrentHostFromSettings,
openSidebarHostPicker,
sidebarHostRowButton,
activateSidebarHostSettingsWithKeyboard,
bindCommandCenterToEnter,
} from "../support/helpers/settings";
import { getServerId } from "../support/helpers/server-id";
import { expectAppRoute } from "../support/helpers/route-assertions";
@@ -187,6 +191,25 @@ test.describe("Settings sidebar scroll position", () => {
});
test.describe("Settings sidebar navigation", () => {
test("the sidebar host row opens Overview in one click", async ({ page, withWorkspace }) => {
const workspace = await withWorkspace({ prefix: "sidebar-host-settings-" });
await openWorkspace(page, workspace);
await openSidebarHostPicker(page);
await sidebarHostRowButton(page).click();
await expectAppRoute(page, buildSettingsHostSectionRoute(getServerId(), "host"));
});
test("Enter opens the active sidebar host row", async ({ page, withWorkspace }) => {
await bindCommandCenterToEnter(page);
const workspace = await withWorkspace({ prefix: "keyboard-host-settings-" });
await openWorkspace(page, workspace);
await openSidebarHostPicker(page);
await activateSidebarHostSettingsWithKeyboard(page);
await expectAppRoute(page, buildSettingsHostSectionRoute(getServerId(), "host"));
});
test("opening Settings closes the composer model selector until it is opened again", async ({
page,
withWorkspace,
@@ -541,7 +564,7 @@ test.describe("Settings — compact master-detail", () => {
await openWorkspace(page, workspace);
await page.getByRole("button", { name: "Open menu", exact: true }).click();
await page.getByTestId("sidebar-hosts-trigger").click();
await page.getByRole("button", { name: /Open .* settings/ }).click();
await sidebarHostRowButton(page).click();
await expectAppRoute(page, buildSettingsHostSectionRoute(getServerId(), "host"));
await expect(page.getByText("Overview", { exact: true })).toBeVisible();
@@ -25,6 +25,10 @@ import { projectEquivalenceViewKey } from "../support/helpers/project-view-key";
import { escapeRegex } from "../support/helpers/regex";
import { openFilesPanel } from "../support/helpers/workspace-tabs";
import { seedMockAgentWorkspace } from "../support/helpers/mock-agent";
import {
readSharedStylesheetChanges,
rememberSharedStylesheet,
} from "../support/helpers/shared-stylesheet";
const GITHUB_REMOTE_URL = "https://github.com/test-owner/test-repo.git";
@@ -429,6 +433,32 @@ test.describe("Sidebar workspace list", () => {
}
});
test("workspace hover card opens and closes without rebuilding the shared stylesheet", async ({
page,
}) => {
const workspace = await seedWorkspace({ repoPrefix: "sidebar-hover-stylesheet-" });
try {
await gotoAppShell(page);
await waitForSidebarProject(page, path.basename(workspace.repoPath));
await movePointerAwayFromWorkspaceHoverCard(page);
await rememberSharedStylesheet(page);
await openWorkspaceHoverCard(page, workspace.workspaceId);
const opened = await readSharedStylesheetChanges(page);
// The card brings styles nothing else on screen uses, so the stylesheet has to grow.
expect(opened.added).toBeGreaterThan(0);
expect(opened.rebuilt).toBe(0);
await rememberSharedStylesheet(page);
await movePointerAwayFromWorkspaceHoverCard(page);
await expectWorkspaceHoverCardClosed(page);
expect((await readSharedStylesheetChanges(page)).rebuilt).toBe(0);
} finally {
await workspace.cleanup();
}
});
test("workspace hover card closes when the pointer leaves a clicked row", async ({ page }) => {
const workspace = await seedWorkspace({ repoPrefix: "sidebar-hover-click-leave-" });
+39 -4
View File
@@ -1,9 +1,11 @@
import type { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import path from "node:path";
import {
expectTimelinePromptVisible,
holdOlderHistoryPages,
scrollTimelineRowIntoView,
userScrollsTimelineToHistoryStart,
waitForTimelineGeometryToSettle,
} from "../support/helpers/timeline-pagination";
import { getActiveTabTestId } from "../support/helpers/launcher";
import type { Page, Locator } from "@playwright/test";
@@ -491,6 +493,39 @@ async function seedWholeTurnHistory() {
return agent;
}
/** Read every command across the scroll window, without requiring offscreen rows to mount. */
async function expectExpandedCommandsReadable(page: Page, count: number) {
const timeline = page.getByTestId("agent-chat-scroll");
const commands = new Set<number>();
await timeline.hover();
await waitForTimelineGeometryToSettle(page);
for (let step = 0; step < count && commands.size < count; step += 1) {
const labels = await timeline
.getByRole("button", { name: /echo stress-\d+/ })
.allTextContents();
for (const label of labels) {
const command = /echo stress-(\d+)/.exec(label);
if (command) commands.add(Number(command[1]));
}
if (commands.size < count) {
await page.mouse.wheel(0, 300);
await waitForTimelineGeometryToSettle(page);
}
}
expect([...commands].sort((a, b) => a - b)).toEqual(
Array.from({ length: count }, (_, index) => index),
);
}
async function returnToExpandedSummary(page: Page, summary: Locator) {
await page.getByTestId("agent-chat-scroll").hover();
for (let step = 0; step < 120 && !(await summary.isVisible()); step += 1) {
await page.mouse.wheel(0, -300);
await waitForTimelineGeometryToSettle(page);
}
await scrollTimelineRowIntoView(page, summary);
}
async function expectInitialFillIsConcealed(page: Page) {
await expect(page.getByTestId("agent-initial-fill")).toBeVisible();
await expect(page.getByTestId("agent-chat-scroll")).toHaveCSS("opacity", "0");
@@ -564,14 +599,14 @@ test("loads complete long turns and preserves expansion while revealing older hi
).toBeVisible();
await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(0);
await latest.click();
await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(120);
await expectExpandedCommandsReadable(page, 120);
await userScrollsTimelineToHistoryStart(page);
await history.expectRequestedPages(3);
history.releasePage(3);
await page.getByTestId("scroll-to-bottom-button").click();
await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(120);
await expectTimelinePromptVisible(page, "Short 4: emit 1 coalesced agent stream updates");
await expectExpandedCommandsReadable(page, 120);
history.expectNoRepeatedEntries();
await scrollTimelineRowIntoView(page, latest);
await returnToExpandedSummary(page, latest);
await latest.click();
await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(0);
} finally {
+112 -8
View File
@@ -34,6 +34,7 @@ import {
openUsageFromItem,
pinRow,
openUsageOptions,
openUsageSources,
closeUsageOptions,
pickUsageHost,
usageModalHost,
@@ -250,16 +251,15 @@ test.describe("usage modal", () => {
await expect(alphaHandle).toHaveCSS("opacity", "1");
await alphaHandle.blur();
// The off card collapses to its header, which still names the account.
await setUsageCardOn(page, "beta plan (work)", false);
const work = page.getByTestId("usage-report-beta:work");
await expect(work.getByText("12% used")).toHaveCount(0);
await expect(work.getByText("work", { exact: true })).toBeVisible();
// Turning a source off in the dedicated Sources list removes its card and sidebar summary.
await setUsageCardOn(page, "beta:work", false);
await expectUsageCardOrder(page, ["alpha:a", "beta:home"]);
await expect(page.getByTestId("usage-report-beta:work")).toHaveCount(0);
await expectPinnedUsage(page, ["31% Weekly", "20% Weekly"]);
const stopRecording = await recordUsageCardPositionsAfterRelease(page);
await dragUsageCardAbove(page, "beta:home", "alpha:a");
await expectUsageCardOrder(page, ["beta:home", "alpha:a", "beta:work"]);
await expectUsageCardOrder(page, ["beta:home", "alpha:a"]);
await expectPinnedUsage(page, ["20% Weekly", "31% Weekly"]);
// The cards are in their new slots from the first frame after the drop.
const framesAfterDrop = await stopRecording();
@@ -270,10 +270,114 @@ test.describe("usage modal", () => {
await page.reload();
await expectPinnedUsage(page, ["20% Weekly", "31% Weekly"]);
await openUsageFromItem(page);
await expectUsageCardOrder(page, ["beta:home", "alpha:a", "beta:work"]);
await expect(page.getByTestId("usage-report-beta:work").getByText("12% used")).toHaveCount(0);
await expectUsageCardOrder(page, ["beta:home", "alpha:a"]);
await expect(page.getByTestId("usage-report-beta:work")).toHaveCount(0);
});
for (const [size, viewport] of Object.entries({
desktop: { width: 1440, height: 900 },
compact: { width: 390, height: 844 },
})) {
test(`dedicated Sources list manages default-off sources without clutter (${size})`, async ({
page,
}) => {
test.setTimeout(120_000);
const [claude, codex] = claudeAndCodexReports();
const fetchedAt = twoHoursAgo();
await installUsageReportsFixture(page, {
lists: [
() => [
claude!,
codex!,
{
id: "copilot:default",
account: {},
fetchedAt,
sourceId: "copilot",
sourceLabel: "GitHub Copilot",
defaultEnabled: false,
report: {
status: "unavailable",
problem: { kind: "rejected", status: 403 },
},
},
{
id: "cursor:default",
account: { label: "dev@example.com" },
fetchedAt,
sourceId: "cursor",
sourceLabel: "Cursor",
defaultEnabled: false,
report: {
status: "available",
windows: [
{ id: "monthly", label: "Monthly", shortLabel: "mo", summary: true, usedPct: 18 },
],
},
},
],
],
});
await page.setViewportSize(viewport);
await gotoAppShell(page);
if (size === "compact") await openCompactSidebar(page);
// Only active sources appear in the sidebar summary and modal cards.
await expectPinnedUsage(page, ["31% 5h", "54% wk", "7% 5h", "12% wk"]);
await openUsageFromItem(page);
await expectUsageCardOrder(page, ["claude:default", "codex:default"]);
await expect(page.getByTestId("usage-report-copilot:default")).toHaveCount(0);
await expect(page.getByTestId("usage-report-cursor:default")).toHaveCount(0);
await qaScreenshot(page, `usage-sources-${size}-cards`);
await openUsageOptions(page);
await expect(page.getByTestId("usage-options-sources")).toContainText("2 of 4");
await qaScreenshot(page, `usage-sources-${size}-settings`);
if (size === "compact") {
// Compact sheets expose menu rows in the browser Tab order so keyboard users can open
// Sources and toggle checkboxes without a pointer.
await page.getByTestId("usage-options-sources").focus();
await expect(page.getByTestId("usage-options-sources")).toBeFocused();
await expect(page.getByTestId("usage-options-sources")).toHaveAttribute("tabindex", "0");
await page.keyboard.press("Enter");
} else {
await openUsageSources(page);
}
const claudeToggle = page.getByRole("checkbox", { name: /^Claude/ });
const copilotToggle = page.getByRole("checkbox", { name: /^GitHub Copilot/ });
const cursorToggle = page.getByRole("checkbox", { name: /^Cursor/ });
await expect(claudeToggle).toBeChecked();
await expect(copilotToggle).not.toBeChecked();
await expect(copilotToggle).toContainText("Provider inactive");
await qaScreenshot(page, `usage-sources-${size}-list`);
// Opting into a default-off source brings its card and summary window in immediately.
if (size === "compact") {
await cursorToggle.focus();
await expect(cursorToggle).toBeFocused();
await expect(cursorToggle).toHaveAttribute("tabindex", "0");
await page.keyboard.press("Space");
} else {
await cursorToggle.click();
}
await expect(cursorToggle).toBeChecked();
await closeUsageOptions(page);
await expectUsageCardOrder(page, ["claude:default", "codex:default", "cursor:default"]);
// Hiding every source shows a quiet empty state with a shortcut back to Settings.
await openUsageSources(page);
await page.getByTestId("usage-source-toggle-claude:default").click();
await page.getByTestId("usage-source-toggle-codex:default").click();
await page.getByTestId("usage-source-toggle-cursor:default").click();
await closeUsageOptions(page);
await expect(page.getByTestId("usage-all-hidden")).toBeVisible();
await expect(page.getByTestId("usage-choose-sources")).toBeVisible();
await qaScreenshot(page, `usage-sources-${size}-empty`);
await page.getByTestId("usage-choose-sources").click();
await expect(page.getByTestId("usage-options-sources")).toContainText("0 of 4");
});
}
test("refreshes one report from its card", async ({ page }) => {
test.setTimeout(120_000);
const serverId = getServerId();
@@ -291,12 +291,12 @@ test.describe("Usage item", () => {
await gotoAppShell(page);
const screen = page.getByTestId(`usage-host-${serverId}`);
await test.step("a fresh device shows default windows once the Usage item is on", async () => {
// The Usage item starts off on every layout; turning it on stores the choice.
await expectNoUsageItem(page);
await test.step("a fresh device shows default windows in the sidebar automatically", async () => {
// The Usage item starts on by default on every layout.
await expectPinnedUsage(page, ["31% 5h", "54% wk", "7% 5h", "12% wk"]);
await qaScreenshot(page, "desktop-footer-defaults", { kind: "footer" });
await openSidebarNavSettings(page);
await expectFooterItemSetting(page, "usage", false);
await setFooterItemVisible(page, "usage", true);
await expectFooterItemSetting(page, "usage", true);
await qaScreenshot(page, "desktop-settings-sidebar-footer");
await page.setViewportSize(COMPACT);
await expectFooterItemSetting(page, "usage", true);
@@ -308,7 +308,6 @@ test.describe("Usage item", () => {
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await expectPinnedUsage(page, ["31% 5h", "54% wk", "7% 5h", "12% wk"]);
await qaScreenshot(page, "desktop-footer-defaults", { kind: "footer" });
await openUsageFromItem(page);
await qaScreenshot(page, "default-pins-card");
await expect(pinRow(screen, "Claude", "Session")).toBeChecked();
@@ -478,7 +477,7 @@ test("without summary data the footer drops the Usage item and keeps the Usage i
await openUsageFromIcon(page);
});
test("the Usage Settings switch turns on the sidebar summary and the pins with it", async ({
test("the Usage Settings switch turns the sidebar summary and pins off and back on", async ({
page,
}) => {
const serverId = getServerId();
@@ -488,8 +487,17 @@ test("the Usage Settings switch turns on the sidebar summary and the pins with i
const screen = page.getByTestId(`usage-host-${serverId}`);
const claude = screen.getByTestId("usage-report-claude:default");
await test.step("off by default: no Usage item, and rows that do not pin", async () => {
await openUsageFromIcon(page);
await test.step("on by default: the Usage item and pins appear", async () => {
await expectPinnedUsage(page, ["31% 5h", "54% wk", "7% 5h", "12% wk"]);
await openUsageFromItem(page);
await expect(pinRow(screen, "Claude", "Weekly")).toBeChecked();
await togglePin(screen, "Claude", "Weekly");
await expectPinnedUsage(page, ["31% 5h", "7% 5h", "12% wk"]);
await qaScreenshot(page, "usage-summary-on");
});
await test.step("off: no Usage item, and rows that do not pin", async () => {
await setSummaryInSidebar(page, false);
await expectNoUsageItem(page);
await expect(claude.getByText("Session", { exact: true })).toBeVisible({ timeout: 10_000 });
await expectUnpinnableRows(claude);
@@ -498,19 +506,7 @@ test("the Usage Settings switch turns on the sidebar summary and the pins with i
await qaScreenshot(page, "usage-summary-off");
});
await test.step("on: the Usage item and the pins appear", async () => {
await setSummaryInSidebar(page, true);
await expectPinnedUsage(page, ["31% 5h", "54% wk", "7% 5h", "12% wk"]);
await expect(pinRow(screen, "Claude", "Weekly")).toBeChecked();
await togglePin(screen, "Claude", "Weekly");
await expectPinnedUsage(page, ["31% 5h", "7% 5h", "12% wk"]);
await qaScreenshot(page, "usage-summary-on");
});
await test.step("off then on again, after a reload, brings back the saved pins", async () => {
await setSummaryInSidebar(page, false);
await expectNoUsageItem(page);
await expectUnpinnableRows(claude);
await test.step("after a reload, turning it back on brings back the saved pins", async () => {
await page.reload();
await openUsageFromIcon(page);
await expectSummaryInSidebar(page, false);
@@ -554,6 +550,7 @@ test("released hosts supply source logos through the client conversion", async (
test("hidden usage sends no requests until opened", async ({ page }) => {
test.setTimeout(180_000);
const usage = await installUsageReportsFixture(page, { lists: [() => claudeAndCodexReports()] });
await seedSidebarFooterPreferences(page, [{ key: "usage", visible: false }]);
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await expectNoUsageItem(page);
@@ -569,10 +566,9 @@ test("hidden usage sends no requests until opened", async ({ page }) => {
expect(usage.listRequests()).toHaveLength(1);
});
test("visible usage summary requests reports on load", async ({ page }) => {
test("visible usage summary requests reports on load by default", async ({ page }) => {
test.setTimeout(180_000);
const usage = await installUsageReportsFixture(page, { lists: [() => claudeAndCodexReports()] });
await seedSidebarFooterPreferences(page, [{ key: "usage", visible: true }]);
await page.setViewportSize(WIDE);
await gotoAppShell(page);
await expectPinnedUsage(page, ["31% 5h", "54% wk", "7% 5h", "12% wk"]);
@@ -0,0 +1,14 @@
# Tab switcher sheet drag on iPhone
Run on a task-owned iPhone 17 simulator (402×874 points, portrait) with the development bundle loaded and a connected isolated host. Select a workspace whose first tab is an agent and whose next 11 tabs are terminals, and select the agent tab. Dismiss the notification entitlement toast.
The sheet exposes its rows to XCUITest as one "Bottom Sheet" element, so the flow taps fixed points and asserts which tab opens. The sheet opens at 60%, where its handle is at y=350, and expands to 90%, where its handle is at y=87.
1. A swipe up on the list must expand the sheet. The tap at y=300 then lands on the fourth row and opens a terminal. Without the expansion it lands on the backdrop, and no terminal opens.
2. A swipe down on the list at 90% must collapse the sheet. The tap at y=424 then lands on the first row and opens the agent. Without the collapse it lands on the sixth row, which is a terminal.
The flow ends on the agent tab, so you can replay it. Replay it on the Namespace Mac with an explicit device:
```sh
agent-device replay packages/app/e2e/mobile/agent-device/native-tab-switcher-sheet-drag.ios.ad --platform ios --device 'iPhone 17'
```
@@ -0,0 +1,20 @@
context platform=ios timeout=60000 retries=0
env APP_ID=sh.paseo.debug
open "${APP_ID}"
wait "id=\"agent-chat-scroll\"" 20000
press "id=\"workspace-tab-switcher-trigger\""
wait "label=\"Bottom Sheet\"" 10000
gesture pan 200 650 0 -300 500
wait 1000
press 200 300
wait "id=\"terminal-surface\"" 10000
press "id=\"workspace-tab-switcher-trigger\""
wait "label=\"Bottom Sheet\"" 10000
gesture pan 200 650 0 -300 500
wait 1000
gesture pan 200 400 0 300 500
wait 1000
press 200 424
wait "id=\"agent-chat-scroll\"" 10000
close
@@ -28,12 +28,13 @@ bounds cannot establish measurement parity.
compares them with the shipped headers. This catches missing C++ fields in the
measurement path, which the Kotlin tests cannot exercise.
The package patch contains `InlineCodeFormattingTest`, which exercises actual
Android spans in Robolectric native graphics mode, covering draw and measurement,
span order, code inside paragraph/heading sizes, bold/italic composition, and
links preserving code and emphasized prose fonts.
It runs in the existing `test:android` CI job. To run only this regression locally,
from `packages/app/android` after Expo prebuild:
The vendored library (`packages/react-native-enriched-markdown`) contains
`InlineCodeFormattingTest`, which exercises actual Android spans in Robolectric
native graphics mode, covering draw and measurement, span order, code inside
paragraph/heading sizes, bold/italic composition, and links preserving code and
emphasized prose fonts. It runs in `npm run test:android`; CI does not run it.
To run only this regression locally, from `packages/app/android` after Expo
prebuild:
```sh
./gradlew :react-native-enriched-markdown:testDebugUnitTest \
@@ -15,8 +15,8 @@ press "id=\"model-provider-${PROVIDER_ID}\""
wait "id=\"compact-model-list\"" 3000
# The row's profile action sits inside Android's independent scroll viewport.
press "id=\"model-create-profile-${PROVIDER_ID}-${PROFILE_MODEL_ID}\""
wait "text=\"Add agent profile\"" 5000
# Closing the form keeps the remembered model: the tap did not also select the row.
back
wait "id=\"combined-model-selector\" label=\"Select model (${MODEL_LABEL})\"" 3000
wait "id=\"model-profile-created-toast\"" 5000
# Undo removes the created profile after selecting the model and closing the picker.
press "id=\"model-profile-created-undo\""
wait "id=\"combined-model-selector\"" 3000
close
@@ -15,6 +15,11 @@ import { delayBrowserAgentCreatedStatus } from "./helpers/new-workspace";
export const test = base.extend<{
startup: { release(): Promise<void>; fail(): Promise<void> };
workspaceProvision: {
hold(): Promise<void>;
fail(): Promise<void>;
release(): Promise<void>;
};
promptRejection: void;
composerMetadata: { set(patch: Record<string, string>): Promise<void> };
creation: Awaited<ReturnType<typeof createCreationScenario>>;
@@ -70,6 +75,57 @@ export default function contribute(server) {
await client.close();
}
},
workspaceProvision: async ({ page }, provide) => {
void page;
const client = await connectNewWorkspaceDaemonClient();
const plugin = await copyPluginExample("lifecycle-logger");
const gate = path.join(plugin.directory, "workspace-provision.txt");
const holdFile = path.join(plugin.directory, "workspace-provision-hold.txt");
const failFile = path.join(plugin.directory, "workspace-provision-fail.txt");
const previous = await client.getDaemonConfig();
try {
await writeFile(
path.join(plugin.directory, "index.server.ts"),
`
import { readFile, rm } from "node:fs/promises";
export default function contribute(server) {
return server.before("workspace.create", async ({ request }) => {
const gate = ${JSON.stringify(gate)};
let command = await readFile(gate, "utf8").catch(() => "release");
while (command === "hold") {
await new Promise(resolve => setTimeout(resolve, 20));
command = await readFile(gate, "utf8").catch(() => "release");
}
if (command === "fail") {
await rm(gate, { force: true });
throw new Error("Workspace provisioning failed for test");
}
return request;
});
}
`,
);
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(plugin.directory);
await provide({
hold: async () => {
await writeFile(holdFile, "hold");
await rename(holdFile, gate);
},
fail: async () => {
await writeFile(failFile, "fail");
await rename(failFile, gate);
},
release: () => rm(gate, { force: true }),
});
} finally {
await rm(gate, { force: true });
await client.removePlugin("lifecycle-logger");
await client.patchDaemonConfig({ pluginsEnabled: previous.config.pluginsEnabled });
await plugin.cleanup();
await client.close();
}
},
promptRejection: async ({ page }, provide) => {
void page;
const client = await connectNewWorkspaceDaemonClient();
@@ -1,73 +1,61 @@
import path from "node:path";
import { expect, type Locator, type Page } from "@playwright/test";
export type AddProjectFlowPage =
| "host"
| "method"
| "directory-search"
| "github-search"
| "github-location"
| "new-directory-parent"
| "new-directory-name";
export type AddProjectMethod = "directory-search" | "browse" | "github" | "new-directory";
const METHOD_DESTINATIONS: Record<Exclude<AddProjectMethod, "browse">, AddProjectFlowPage> = {
"directory-search": "directory-search",
github: "github-search",
"new-directory": "new-directory-parent",
};
export type AddProjectTab = "existing" | "clone" | "new-folder";
export function addProjectFlow(page: Page): Locator {
return page.getByTestId("add-project-flow");
}
/** The current tab's search or name field. */
export function addProjectFlowInput(page: Page): Locator {
return page.getByTestId("add-project-flow-input");
}
export function addProjectFlowBack(page: Page): Locator {
return page.getByTestId("add-project-flow-back");
export function addProjectFlowTab(page: Page, tab: AddProjectTab): Locator {
return page.getByTestId(`add-project-flow-tab-${tab}`);
}
export function addProjectFlowHost(page: Page, serverId: string): Locator {
return page.getByTestId(`add-project-flow-host-${serverId}`);
export function addProjectFlowSubmit(page: Page): Locator {
return page.getByTestId("add-project-flow-submit");
}
export function addProjectFlowMethod(page: Page, method: AddProjectMethod): Locator {
return page.getByTestId(`add-project-flow-method-${method}`);
export function addProjectFlowHostTrigger(page: Page): Locator {
return page.getByTestId("add-project-flow-host-trigger");
}
export async function expectAddProjectPage(page: Page, kind: AddProjectFlowPage): Promise<Locator> {
const currentPage = page.getByTestId(`add-project-flow-page-${kind}`);
await expect(currentPage).toBeVisible({ timeout: 30_000 });
return currentPage;
export async function expectAddProjectTab(page: Page, tab: AddProjectTab): Promise<void> {
await expect(addProjectFlowTab(page, tab)).toHaveAttribute("aria-selected", "true", {
timeout: 30_000,
});
}
async function openAddProjectFlowSurface(
page: Page,
expectedPage: "host" | "method",
): Promise<void> {
/** Opens Add project from the sidebar; it starts on Existing with the search focused. */
export async function openAddProjectFlow(page: Page): Promise<void> {
await page.locator('[data-testid="sidebar-add-project"]:visible').click();
await expect(addProjectFlow(page)).toBeVisible({ timeout: 30_000 });
await expectAddProjectPage(page, expectedPage);
}
export async function openAddProjectFlow(page: Page): Promise<void> {
await openAddProjectFlowSurface(page, "method");
}
export async function openAddProjectHostSelection(page: Page): Promise<void> {
await openAddProjectFlowSurface(page, "host");
await expectAddProjectTab(page, "existing");
await expect(addProjectFlowInput(page)).toBeFocused();
}
export async function chooseAddProjectMethod(page: Page, method: AddProjectMethod): Promise<void> {
const option = addProjectFlowMethod(page, method);
await expect(option).toBeVisible();
await option.click();
if (method !== "browse") {
await expectAddProjectPage(page, METHOD_DESTINATIONS[method]);
}
export async function chooseAddProjectTab(page: Page, tab: AddProjectTab): Promise<void> {
await addProjectFlowTab(page, tab).click();
await expectAddProjectTab(page, tab);
}
export async function chooseAddProjectHost(page: Page, serverId: string): Promise<void> {
await addProjectFlowHostTrigger(page).click();
await page.getByTestId(`add-project-flow-host-${serverId}`).click();
}
/** Types a parent directory into the Location picker and uses it as typed. */
export async function chooseAddProjectLocation(page: Page, location: string): Promise<void> {
await page.getByTestId("add-project-flow-location").click();
await page.getByPlaceholder("Search folders or enter a path").last().fill(location);
await page.getByText("Use this folder", { exact: true }).click();
await expect(page.getByTestId("add-project-flow-location")).toContainText(
path.basename(location),
);
}
export async function expectNewWorkspaceForAddedProject(
@@ -114,8 +102,10 @@ export async function expectAddProjectResultVisible(page: Page, text: string): P
.toBe(true);
}
/** Presses Enter on the focused Add host button, which the sheet's own Enter must not swallow. */
export async function chooseAddHostFromProjectFlow(page: Page): Promise<void> {
await page.getByRole("button", { name: /Add host.*No connected hosts/ }).click();
await addProjectFlow(page).getByRole("button", { name: "Add host", exact: true }).focus();
await page.keyboard.press("Enter");
}
export async function navigateAndDismissAddProject(page: Page): Promise<void> {
@@ -142,8 +142,22 @@ export async function openAgentProfileSettings(page: Page): Promise<void> {
await gotoAppShell(page);
await openSettings(page);
await openSettingsHost(page, serverId);
await page.getByRole("button", { name: "Agents", exact: true }).click();
await expectAppRoute(page, buildSettingsHostSectionRoute(serverId, "agents"));
await page.getByRole("button", { name: "Agent profiles", exact: true }).click();
await expectAppRoute(page, buildSettingsHostSectionRoute(serverId, "agent-profiles"));
await expect(page.getByTestId("agent-profiles-card")).toBeVisible({ timeout: 30_000 });
}
/** Reach agent profiles on a compact viewport so Open project -> Settings -> Agent profiles are pushed. */
export async function openCompactAgentProfileSettings(page: Page): Promise<void> {
const serverId = getServerId();
await gotoAppShell(page);
await page.getByRole("button", { name: "Open menu", exact: true }).click();
const settingsButton = page.locator('[data-testid="sidebar-settings"]:visible').first();
await expect(settingsButton).toBeVisible({ timeout: 30_000 });
await settingsButton.click();
await expect(page).toHaveURL(/\/settings(?:\?|$)/, { timeout: 30_000 });
await page.getByRole("button", { name: "Agent profiles", exact: true }).click();
await expectAppRoute(page, buildSettingsHostSectionRoute(serverId, "agent-profiles"));
await expect(page.getByTestId("agent-profiles-card")).toBeVisible({ timeout: 30_000 });
}
@@ -156,7 +170,9 @@ export async function expectNoAgentProfiles(page: Page): Promise<void> {
// ─── Settings: the profile list ────────────────────────────────────────────
export function agentProfileRow(page: Page, name: string): Locator {
return page.locator('[data-testid^="agent-profile-row-"]').filter({ hasText: name });
return page
.locator('[data-testid^="agent-profile-row-"]')
.filter({ has: page.getByText(name, { exact: true }) });
}
export async function expectAgentProfile(
@@ -165,7 +181,9 @@ export async function expectAgentProfile(
): Promise<void> {
const row = agentProfileRow(page, expected.name);
await expect(row).toBeVisible({ timeout: 30_000 });
await expect(row.getByText(expected.tags.join(" · "), { exact: true })).toBeVisible();
for (const tag of expected.tags) {
await expect(row).toContainText(tag);
}
if (expected.notes !== undefined) {
await expect(row.getByText(expected.notes, { exact: true })).toBeVisible();
}
@@ -177,7 +195,7 @@ export async function expectAgentProfileTagsGone(
): Promise<void> {
const row = agentProfileRow(page, input.name);
for (const tag of input.tags) {
await expect(row.getByText(tag, { exact: true })).toHaveCount(0);
await expect(row).not.toContainText(tag);
}
}
@@ -196,12 +214,22 @@ export async function expectAgentProfileOrder(page: Page, names: string[]): Prom
.toEqual(names);
}
async function openRowActionMenu(page: Page, name: string): Promise<void> {
const row = agentProfileRow(page, name);
await row.hover();
const trigger = row.locator('[data-testid^="agent-profile-menu-"]');
await expect(trigger).toBeVisible({ timeout: 15_000 });
await trigger.click();
}
export async function moveAgentProfileUp(page: Page, name: string): Promise<void> {
await agentProfileRow(page, name).getByRole("button", { name: "Move up", exact: true }).click();
await openRowActionMenu(page, name);
await page.getByRole("menuitem", { name: "Move up", exact: true }).click();
}
export async function moveAgentProfileDown(page: Page, name: string): Promise<void> {
await agentProfileRow(page, name).getByRole("button", { name: "Move down", exact: true }).click();
await openRowActionMenu(page, name);
await page.getByRole("menuitem", { name: "Move down", exact: true }).click();
}
/**
@@ -215,12 +243,13 @@ export async function removeAgentProfile(page: Page, name: string): Promise<void
await dialog.accept();
return message;
});
await agentProfileRow(page, name).getByRole("button", { name: "Remove", exact: true }).click();
await openRowActionMenu(page, name);
await page.getByRole("menuitem", { name: "Remove", exact: true }).click();
expect(await dialogMessage).toContain(`Remove "${name}"?`);
await expect(agentProfileRow(page, name)).toHaveCount(0, { timeout: 30_000 });
}
// ─── Settings: the edit modal ──────────────────────────────────────────────
// ─── Settings: the inspector drawer / edit sheet ───────────────────────────
export interface AgentProfileDraft {
name?: string;
@@ -231,62 +260,96 @@ export interface AgentProfileDraft {
notes?: string;
}
function editModal(page: Page): Locator {
return page.getByTestId("agent-profile-edit-modal");
function editSurface(page: Page): Locator {
return page.locator(
'[data-testid="agent-profile-drawer"], [data-testid="agent-profile-edit-modal"]',
);
}
async function chooseSelectFieldOption(
page: Page,
input: { field: "provider" | "model" | "mode" | "thinking"; option: string },
input: { field: "model" | "mode" | "thinking"; option: string },
): Promise<void> {
await editModal(page).getByTestId(`agent-profile-${input.field}-trigger`).click();
await editSurface(page).getByTestId(`agent-profile-${input.field}-trigger`).click();
const option = page
.getByTestId("combobox-desktop-container")
.getByRole("button", { name: input.option, exact: true });
await expect(option).toBeVisible({ timeout: 30_000 });
await option.click();
await expect(
page.getByRole("button", { name: `${capitalize(input.field)} (${input.option})` }),
).toBeVisible({ timeout: 30_000 });
}
function capitalize(value: string): string {
return value.charAt(0).toUpperCase() + value.slice(1);
async function ensureCustomizeExpanded(surface: Locator): Promise<void> {
const toggle = surface.getByTestId("agent-profile-customize-toggle");
if ((await toggle.count()) > 0 && (await toggle.isVisible())) {
await toggle.click();
}
}
async function chooseProfileModel(
page: Page,
input: { provider?: string; model?: string },
): Promise<void> {
await editSurface(page).getByTestId("agent-profile-model-trigger").click();
const container = page.getByTestId("combobox-desktop-container");
await expect(container).toBeVisible({ timeout: 30_000 });
if (input.provider) {
const providerRow = container.getByRole("button", {
name: new RegExp(escapeForRegex(input.provider)),
});
if ((await providerRow.count()) > 0 && (await providerRow.first().isVisible())) {
await providerRow.first().click();
}
}
const targetLabel = input.model ?? input.provider;
if (targetLabel) {
const option = container
.getByRole("button", { name: new RegExp(escapeForRegex(targetLabel)) })
.first();
await expect(option).toBeVisible({ timeout: 30_000 });
await option.click();
}
}
async function fillAgentProfileForm(page: Page, draft: AgentProfileDraft): Promise<void> {
const modal = editModal(page);
const surface = editSurface(page);
// Model first: CombinedModelSelector sets provider + model and auto-suggests defaults.
if (draft.model !== undefined || draft.provider !== undefined) {
await chooseProfileModel(page, { provider: draft.provider, model: draft.model });
}
if (draft.name !== undefined) {
await modal.getByRole("textbox", { name: "Name", exact: true }).fill(draft.name);
await surface.getByRole("textbox", { name: "Name", exact: true }).fill(draft.name);
}
// Provider first: it resets every provider-scoped field below it.
if (draft.provider !== undefined) {
await chooseSelectFieldOption(page, { field: "provider", option: draft.provider });
}
// Thinking after model: thinking levels hang off the model, and switching the
// model drops a level the new one does not offer.
if (draft.model !== undefined) {
await chooseSelectFieldOption(page, { field: "model", option: draft.model });
}
if (draft.thinking !== undefined) {
await chooseSelectFieldOption(page, { field: "thinking", option: draft.thinking });
if (draft.thinking !== undefined || draft.mode !== undefined || draft.notes !== undefined) {
await ensureCustomizeExpanded(surface);
}
if (draft.mode !== undefined) {
await chooseSelectFieldOption(page, { field: "mode", option: draft.mode });
}
if (draft.thinking !== undefined) {
const thinkingContainer = surface.getByTestId("agent-profile-thinking-field");
const segmentButton = thinkingContainer.getByRole("button", {
name: draft.thinking,
exact: true,
});
if ((await segmentButton.count()) > 0) {
await segmentButton.click();
} else {
await chooseSelectFieldOption(page, { field: "thinking", option: draft.thinking });
}
}
if (draft.notes !== undefined) {
await modal.getByRole("textbox", { name: "When to use", exact: true }).fill(draft.notes);
await surface.getByRole("textbox", { name: "When to use", exact: true }).fill(draft.notes);
}
}
async function saveAgentProfile(page: Page): Promise<void> {
await editModal(page).getByRole("button", { name: "Save", exact: true }).click();
await expect(editModal(page)).toHaveCount(0, { timeout: 30_000 });
await page.getByTestId("agent-profile-save-button").click();
await expect(editSurface(page)).toHaveCount(0, { timeout: 30_000 });
}
export async function createAgentProfile(page: Page, draft: AgentProfileDraft): Promise<void> {
await page.getByRole("button", { name: "Add agent profile", exact: true }).click();
await expect(editModal(page)).toBeVisible({ timeout: 30_000 });
await page.getByTestId("agent-profiles-add-button").click();
await expect(editSurface(page)).toBeVisible({ timeout: 30_000 });
await fillAgentProfileForm(page, draft);
await saveAgentProfile(page);
}
@@ -299,7 +362,7 @@ export async function createAgentProfileFromEmptyState(
.getByTestId("agent-profiles-card")
.getByRole("button", { name: "New profile", exact: true })
.click();
await expect(editModal(page)).toBeVisible({ timeout: 30_000 });
await expect(editSurface(page)).toBeVisible({ timeout: 30_000 });
await fillAgentProfileForm(page, draft);
await saveAgentProfile(page);
}
@@ -309,46 +372,183 @@ export async function editAgentProfile(
name: string,
changes: AgentProfileDraft,
): Promise<void> {
await agentProfileRow(page, name)
.getByRole("button", { name: "Edit profile", exact: true })
.click();
await expect(editModal(page)).toBeVisible({ timeout: 30_000 });
await agentProfileRow(page, name).click();
await expect(editSurface(page)).toBeVisible({ timeout: 30_000 });
await fillAgentProfileForm(page, changes);
await saveAgentProfile(page);
}
/** Opens the modal for a profile purely to read back what it stored. */
export async function openAgentProfileEditor(page: Page, name: string): Promise<void> {
await agentProfileRow(page, name).click();
await expect(editSurface(page)).toBeVisible({ timeout: 30_000 });
}
export async function openCreateAgentProfileEditor(page: Page): Promise<void> {
await page.getByTestId("agent-profiles-add-button").click();
await expect(editSurface(page)).toBeVisible({ timeout: 30_000 });
}
export async function fillAgentProfileName(page: Page, name: string): Promise<void> {
await page.getByRole("textbox", { name: "Name", exact: true }).fill(name);
}
export async function expectAgentProfileNameDraft(page: Page, name: string): Promise<void> {
await expect(page.getByRole("textbox", { name: "Name", exact: true })).toHaveValue(name);
}
export async function toggleAgentProfileCustomize(page: Page): Promise<void> {
await page.getByTestId("agent-profile-customize-toggle").click();
}
export async function fillAgentProfileNotes(page: Page, notes: string): Promise<void> {
await page.getByRole("textbox", { name: "When to use", exact: true }).fill(notes);
}
export async function expectAgentProfileNotesDraft(page: Page, notes: string): Promise<void> {
await expect(page.getByRole("textbox", { name: "When to use", exact: true })).toHaveValue(notes);
}
export async function saveOpenAgentProfile(page: Page): Promise<void> {
await saveAgentProfile(page);
}
export async function duplicateOpenAgentProfileWithConfirm(
page: Page,
decision: "accept" | "dismiss",
): Promise<void> {
const dialogMessage = page.waitForEvent("dialog").then(async (dialog) => {
const message = dialog.message();
if (decision === "accept") {
await dialog.accept();
} else {
await dialog.dismiss();
}
return message;
});
await page.getByTestId("agent-profile-drawer-more").click();
await page.getByTestId("agent-profile-drawer-duplicate").click();
expect(await dialogMessage).toMatch(/discard|unsaved/i);
}
export async function openEditProfileFromModelRow(
page: Page,
input: { provider: string; modelId: string },
): Promise<void> {
const row = modelRow(page, input);
await row.hover();
const editButton = pickerViewport(page).getByTestId(
`model-edit-profile-${input.provider}-${input.modelId}`,
);
await expect(editButton).toBeVisible({ timeout: 30_000 });
await editButton.click();
await expect(page.getByTestId("agent-profile-edit-modal")).toBeVisible({ timeout: 30_000 });
}
export async function removeOpenModalAgentProfileWithConfirm(
page: Page,
decision: "accept" | "dismiss",
): Promise<void> {
const dialogMessage = page.waitForEvent("dialog").then(async (dialog) => {
const message = dialog.message();
if (decision === "accept") {
await dialog.accept();
} else {
await dialog.dismiss();
}
return message;
});
await page.getByTestId("agent-profile-modal-remove-button").click();
expect(await dialogMessage).toMatch(/remove/i);
}
export async function switchSettingsSectionWithConfirm(
page: Page,
sectionName: string,
decision: "accept" | "dismiss",
): Promise<void> {
const dialogMessage = page.waitForEvent("dialog").then(async (dialog) => {
const message = dialog.message();
if (decision === "accept") {
await dialog.accept();
} else {
await dialog.dismiss();
}
return message;
});
await page.getByRole("button", { name: sectionName, exact: true }).click();
expect(await dialogMessage).toMatch(/discard|unsaved/i);
}
export async function browserBackWithConfirm(
page: Page,
decision: "accept" | "dismiss",
): Promise<void> {
const dialogMessage = page.waitForEvent("dialog").then(async (dialog) => {
const message = dialog.message();
if (decision === "accept") {
await dialog.accept();
} else {
await dialog.dismiss();
}
return message;
});
await page.goBack();
expect(await dialogMessage).toMatch(/discard|unsaved/i);
}
export async function browserHistoryJumpWithConfirm(
page: Page,
delta: number,
decision: "accept" | "dismiss",
): Promise<void> {
const dialogMessage = page.waitForEvent("dialog").then(async (dialog) => {
const message = dialog.message();
if (decision === "accept") {
await dialog.accept();
} else {
await dialog.dismiss();
}
return message;
});
await page.evaluate((step) => window.history.go(step), delta);
expect(await dialogMessage).toMatch(/discard|unsaved/i);
}
/** Opens the inspector for a profile purely to read back what it stored. */
export async function expectAgentProfileForm(
page: Page,
name: string,
expected: { provider?: string; model?: string; mode?: string; notes?: string },
): Promise<void> {
await agentProfileRow(page, name)
.getByRole("button", { name: "Edit profile", exact: true })
.click();
const modal = editModal(page);
await expect(modal).toBeVisible({ timeout: 30_000 });
await expect(modal.getByRole("textbox", { name: "Name", exact: true })).toHaveValue(name);
const notesHint = modal.getByTestId("agent-profile-notes-field-hint");
await expect(notesHint).toHaveText(
"Helps agents choose this profile when starting another agent.",
);
await agentProfileRow(page, name).click();
const surface = editSurface(page);
await expect(surface).toBeVisible({ timeout: 30_000 });
await expect(surface.getByRole("textbox", { name: "Name", exact: true })).toHaveValue(name);
const notesHint = surface.getByTestId("agent-profile-notes-field-hint");
await expect(notesHint).toHaveText("Tells agents when to pick this profile");
expect(await notesHint.evaluate((element) => getComputedStyle(element).webkitLineClamp)).not.toBe(
"1",
);
for (const [field, value] of Object.entries(expected)) {
if (field === "notes") {
await expect(modal.getByRole("textbox", { name: "When to use", exact: true })).toHaveValue(
value,
);
continue;
}
await expect(
modal.getByRole("button", { name: `${capitalize(field)} (${value})` }),
).toBeVisible({ timeout: 30_000 });
if (expected.model) {
await expect(surface.getByTestId("agent-profile-model-trigger")).toContainText(expected.model);
} else if (expected.provider) {
await expect(surface.getByTestId("agent-profile-model-trigger")).toContainText(
expected.provider,
);
}
await modal.getByRole("button", { name: "Cancel", exact: true }).click();
await expect(editModal(page)).toHaveCount(0, { timeout: 30_000 });
if (expected.provider) {
await expect(surface).toContainText(expected.provider);
}
if (expected.mode) {
await expect(surface.getByTestId("agent-profile-mode-trigger")).toContainText(expected.mode);
}
if (expected.notes !== undefined) {
await expect(surface.getByRole("textbox", { name: "When to use", exact: true })).toHaveValue(
expected.notes,
);
}
await surface.getByRole("button", { name: "Cancel", exact: true }).click();
await expect(editSurface(page)).toHaveCount(0, { timeout: 30_000 });
}
// ─── The model picker ──────────────────────────────────────────────────────
@@ -449,6 +649,41 @@ async function boxTop(locator: Locator): Promise<number> {
return box.y;
}
export async function searchModelPicker(page: Page, query: string): Promise<void> {
await pickerViewport(page).getByTestId("model-search-input").fill(query);
}
/** A search lists matching profiles first, then the matching models under their own heading. */
export async function expectProfileSearchResult(
page: Page,
input: { name: string; model?: { provider: string; modelId: string } },
): Promise<void> {
const viewport = pickerViewport(page);
const row = profilePickerRow(page, input.name);
await expect(row).toBeVisible({ timeout: 30_000 });
if (!input.model) {
await expect(viewport.getByText("Models", { exact: true })).toHaveCount(0);
return;
}
const matchedModel = modelRow(page, input.model);
await expect(viewport.getByText("Models", { exact: true })).toBeVisible();
await expect(matchedModel).toBeVisible();
expect(await boxTop(row)).toBeLessThan(await boxTop(matchedModel));
}
/** Wheel-scrolls the picker the way a pointer user would until the profile row is on screen. */
export async function expectProfileReachableByScrolling(page: Page, name: string): Promise<void> {
const row = profilePickerRow(page, name);
await expect(row).toBeAttached({ timeout: 30_000 });
const box = await pickerViewport(page).boundingBox();
if (!box) throw new Error("model picker has no layout box");
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
await expect(async () => {
await page.mouse.wheel(0, 400);
await expect(row).toBeInViewport({ timeout: 500 });
}).toPass({ timeout: 15_000 });
}
export async function applyProfileFromPicker(page: Page, name: string): Promise<void> {
await profilePickerRow(page, name).click();
await expect(pickerViewport(page)).toHaveCount(0, { timeout: 30_000 });
@@ -500,7 +735,10 @@ export async function expectModelRowProfileActionBesideRow(
await expect(row.getByRole("button")).toHaveCount(0);
}
/** The hover-revealed plus on an unprofiled model row opens a seeded profile form. */
/**
* The hover-revealed plus on an unprofiled model row saves the profile,
* selects the model immediately, closes the picker, and surfaces an Edit / Undo toast.
*/
export async function expectCreateProfileFromModelRow(
page: Page,
input: { provider: string; modelId: string; modelLabel: string },
@@ -513,14 +751,14 @@ export async function expectCreateProfileFromModelRow(
await modelRow(page, input).hover();
await expect(action).toHaveCSS("pointer-events", "auto");
await action.click();
const modal = editModal(page);
await expect(modal).toBeVisible({ timeout: 30_000 });
await expect(modal.getByRole("textbox", { name: "Name", exact: true })).toHaveValue(
input.modelLabel,
);
await expect(modal.getByRole("button", { name: `Model (${input.modelLabel})` })).toBeVisible();
await modal.getByRole("button", { name: "Cancel", exact: true }).click();
await expect(modal).toHaveCount(0, { timeout: 30_000 });
const toast = page.getByTestId("model-profile-created-toast");
await expect(toast).toBeVisible({ timeout: 30_000 });
await expect(toast).toContainText(input.modelLabel);
// Undo removes the newly saved profile from the toast.
await toast.getByTestId("model-profile-created-undo").click();
await expect(toast).toHaveCount(0, { timeout: 30_000 });
}
export async function selectModelRow(
@@ -31,6 +31,8 @@ export interface RewindCompletionGate {
clearTimelineStreamCount(): void;
release(): void;
timelineStreamCount(): number;
/** Timeline reads this page sent since the last clear. */
timelineFetchCount(): number;
waitForDelayedResponse(): Promise<void>;
}
@@ -186,12 +188,20 @@ export async function holdDaemonHydration(page: Page): Promise<DaemonHydrationGa
};
}
// The rewind response and the timeline change it causes; the change removes the rewound row too.
const REWIND_COMPLETION_MESSAGES = new Set([
"agent.rewind.response",
"agent.timeline.rewind",
"agent.timeline.replacement",
]);
export async function holdRewindCompletion(
page: Page,
agentId: string,
): Promise<RewindCompletionGate> {
let released = false;
let timelineStreamCount = 0;
let timelineFetchCount = 0;
const delayedForwards: Array<() => void> = [];
let resolveDelayedResponse: (() => void) | null = null;
const delayedResponse = new Promise<void>((resolve) => {
@@ -200,7 +210,16 @@ export async function holdRewindCompletion(
await page.routeWebSocket(daemonWsRoutePattern(), (ws) => {
const server = ws.connectToServer();
ws.onMessage((message) => server.send(message));
ws.onMessage((message) => {
const sessionMessage = getSessionMessage(message);
if (
sessionMessage?.type === "fetch_agent_timeline_request" &&
sessionMessage.agentId === agentId
) {
timelineFetchCount += 1;
}
server.send(message);
});
server.onMessage((message) => {
const sessionMessage = getSessionMessage(message);
const payload = sessionMessage ? getPayload(sessionMessage) : null;
@@ -216,11 +235,11 @@ export async function holdRewindCompletion(
}
if (
!released &&
(sessionMessage?.type === "agent.rewind.response" ||
sessionMessage?.type === "agent.timeline.replacement") &&
sessionMessage &&
REWIND_COMPLETION_MESSAGES.has(String(sessionMessage.type)) &&
payload?.agentId === agentId
) {
// The replacement also signals completion and removes the rewound row/menu.
// The rewind also signals completion and removes the rewound row/menu.
// Hold it with the response so the pending-state assertion observes a pending rewind.
delayedForwards.push(() => ws.send(message));
if (sessionMessage.type === "agent.rewind.response") resolveDelayedResponse?.();
@@ -233,6 +252,7 @@ export async function holdRewindCompletion(
return {
clearTimelineStreamCount() {
timelineStreamCount = 0;
timelineFetchCount = 0;
},
release() {
released = true;
@@ -241,6 +261,7 @@ export async function holdRewindCompletion(
}
},
timelineStreamCount: () => timelineStreamCount,
timelineFetchCount: () => timelineFetchCount,
waitForDelayedResponse: () => delayedResponse,
};
}
+10 -1
View File
@@ -132,7 +132,10 @@ export async function waitForConnectedHost(
): Promise<void> {
await page.getByTestId("sidebar-hosts-trigger").click();
const host = page.getByTestId(`sidebar-host-row-${input.serverId}`);
await expect(host).toContainText(input.endpoint, { timeout: 30_000 });
const escapedEndpoint = input.endpoint.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
// Local daemons render "Local" without repeating localhost:<port>; remote hosts render the endpoint.
await expect(host).toContainText(new RegExp(`${escapedEndpoint}|Local`), { timeout: 30_000 });
await expect(host).toContainText(/\d+(?:\.\d+)?(?:µs|ms|s)/, { timeout: 30_000 });
await page.keyboard.press("Escape");
await expect(host).not.toBeVisible();
}
@@ -195,6 +198,12 @@ export async function chooseHostColor(page: Page, colorName: string): Promise<vo
await expect(page.getByRole("button", { name: `Color, ${colorName}` })).toBeVisible();
}
export async function chooseHostIcon(page: Page, iconName: string): Promise<void> {
await page.getByTestId("host-appearance-icon").click();
await page.getByRole("menuitem", { name: iconName, exact: true }).click();
await expect(page.getByRole("button", { name: `Icon, ${iconName}` })).toBeVisible();
}
export async function chooseHostBadgeDisplay(
page: Page,
option: "Name" | "Icon only" | "Hidden",
@@ -137,13 +137,22 @@ export class ImportSessionFlow {
await this.expectProviderError(label);
await expect(this.page.getByRole("progressbar")).toHaveCount(0);
}
async importSession(id: string) {
async startImport(id: string) {
await this.revealSession(id);
await this.page.getByTestId(rowTestId(id)).click();
}
async importSession(id: string) {
await this.startImport(id);
await this.expectClosed();
}
async expectClosed() {
await expect(this.page.getByTestId("import-session-sheet")).toHaveCount(0, {
timeout: 30_000,
});
}
async expectSessionUnavailable(id: string) {
await expect(this.page.getByTestId(rowTestId(id))).toHaveCount(0);
}
async expectTranscript(userText: string, assistantText: string) {
await expect(this.page.getByTestId("user-message").filter({ visible: true })).toContainText(
userText,
@@ -169,6 +178,13 @@ export class ImportSessionFlow {
await this.page.getByRole("button", { name: "Close", exact: true }).last().click();
await expect(this.page.getByTestId("import-session-sheet")).toHaveCount(0);
}
async chooseHostForImport(hostLabel: string) {
const panel = await openCommandCenter(this.page);
await panel.getByTestId("command-center-input").fill("import");
await panel.getByText("Import session", { exact: true }).click();
await this.page.getByRole("dialog").getByRole("button", { name: hostLabel }).click();
await this.expectScope(`Sessions on ${hostLabel}`);
}
async expectCommandCenterMatch() {
const panel = await openCommandCenter(this.page);
await panel.getByTestId("command-center-input").fill("import");
@@ -6,6 +6,7 @@ import {
type ChildProcess,
type SpawnOptions,
} from "node:child_process";
import { existsSync } from "node:fs";
import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
import net from "node:net";
import { tmpdir } from "node:os";
@@ -229,7 +230,11 @@ export async function startIsolatedHostDaemon(
stdio: ["ignore", "ignore", "pipe"],
detached: false,
};
const spawned = publishedPackageRoot
const builtSupervisor = path.join(serverDir, "dist/scripts/supervisor-entrypoint.js");
const useBuiltSupervisor = Boolean(
publishedPackageRoot || (process.env.CI && existsSync(builtSupervisor)),
);
const spawned = useBuiltSupervisor
? spawn(process.execPath, ["dist/scripts/supervisor-entrypoint.js"], spawnOptions)
: spawnTsx("scripts/supervisor-entrypoint.ts", ["--dev"], spawnOptions);
@@ -4,7 +4,7 @@ import { tmpdir } from "node:os";
import path from "node:path";
import { expect, type Locator, type Page } from "@playwright/test";
import type { DaemonClient as InternalDaemonClient } from "@getpaseo/client/internal/daemon-client";
import { addProjectFlow, addProjectFlowInput, chooseAddProjectMethod } from "./add-project-flow";
import { addProjectFlow, addProjectFlowInput, expectAddProjectTab } from "./add-project-flow";
import { connectDaemonClient } from "./daemon-client-loader";
import { buildCreateAgentPreferences, buildSeededHost } from "./daemon-registry";
import { startIsolatedHostDaemon, type IsolatedHostDaemonOptions } from "./isolated-host-daemon";
@@ -122,7 +122,7 @@ export async function skipSetup(page: Page): Promise<void> {
export async function addProjectFromSetup(page: Page, projectPath: string): Promise<void> {
await setupModal(page).getByRole("button", { name: "Add project", exact: true }).click();
await expect(addProjectFlow(page)).toBeVisible({ timeout: 30_000 });
await chooseAddProjectMethod(page, "directory-search");
await expectAddProjectTab(page, "existing");
await addProjectFlowInput(page).fill(projectPath);
await page.keyboard.press("Enter");
await expect(addProjectFlow(page)).toHaveCount(0, { timeout: 30_000 });
+30 -1
View File
@@ -12,6 +12,33 @@ const DISABLE_DEFAULT_SEED_ONCE_KEY = "@paseo:e2e-disable-default-seed-once";
const SEED_NONCE_KEY = "@paseo:e2e-seed-nonce";
const REGISTRY_KEY = "@paseo:daemon-registry";
export async function openSidebarHostPicker(page: Page) {
await page.getByRole("button", { name: "Hosts", exact: true }).click();
}
export function sidebarHostRowButton(page: Page) {
return page.getByTestId(`sidebar-host-row-${getServerId()}`);
}
export async function bindCommandCenterToEnter(page: Page) {
await page.addInitScript(() => {
localStorage.setItem(
"@paseo:keyboard-shortcut-overrides",
JSON.stringify({
"command-center-toggle-cmd-k-mac": "Enter",
"command-center-toggle-ctrl-k-non-mac": "Enter",
}),
);
});
}
export async function activateSidebarHostSettingsWithKeyboard(page: Page) {
const host = sidebarHostRowButton(page);
await expect(host).toBeVisible();
await expect(host).toBeFocused();
await page.keyboard.press("Enter");
}
interface SavedSettingsHostInput {
serverId: string;
label: string;
@@ -567,7 +594,9 @@ export async function expectProviderPageLoaded(page: Page, providerName: string)
await expect(page.getByTestId("provider-detail-title")).toHaveText(providerName, {
timeout: 30_000,
});
await expect(page.getByText("Provider status")).toBeVisible({ timeout: 30_000 });
await expect(page.getByRole("button", { name: "Diagnostic report" })).toBeVisible({
timeout: 30_000,
});
}
export async function expectProviderNotOnHost(page: Page): Promise<void> {
@@ -0,0 +1,151 @@
import type { Page } from "@playwright/test";
/**
* The shared stylesheet is `#unistyles-web`: one rule per generated style class, for the whole app.
* Every change to it makes the browser restyle, and replacing a rule that is still in use restyles
* the entire document. A spec remembers the stylesheet, performs an interaction, and reads back
* everything that happened to it in between, including rules that came and went before the read.
*/
export interface SharedStylesheetChanges {
/** Rules inserted, counting ones deleted again before the read. */
added: number;
/** Rules deleted, counting ones inserted during the interaction. */
removed: number;
/** Rules whose declarations were changed in place. */
edited: number;
/** Rules for classes still in use that were thrown away and created again. */
rebuilt: number;
}
interface SharedStylesheetRule {
rule: CSSRule;
text: string;
}
interface SharedStylesheetWatch {
rules: Map<string, SharedStylesheetRule>;
added: number;
removed: number;
edited: number;
editedRules: Set<CSSRule>;
}
declare global {
interface Window {
__PASEO_SHARED_STYLESHEET_WATCH__?: SharedStylesheetWatch;
}
}
function readSharedStylesheetRules(): Map<string, SharedStylesheetRule> {
const tag = document.getElementById("unistyles-web");
if (!(tag instanceof HTMLStyleElement) || !tag.sheet) {
throw new Error("Shared stylesheet is missing");
}
const rules = new Map<string, SharedStylesheetRule>();
const collect = (list: CSSRuleList, group: string) => {
for (const rule of list) {
if (rule instanceof CSSStyleRule) {
rules.set(`${group}${rule.selectorText}`, { rule, text: rule.cssText });
} else if (rule instanceof CSSMediaRule) {
collect(rule.cssRules, `${rule.conditionText} `);
}
}
};
collect(tag.sheet.cssRules, "");
return rules;
}
// The CSSOM has no mutation events, so the watch wraps the calls that change a stylesheet and
// counts the ones that land in the shared stylesheet, including changes undone before the read.
// Chromium sets named properties such as `style.width` without an accessor the watch can wrap;
// reading the changes compares rule text to catch those. Installed once per page.
function installSharedStylesheetWatch(): void {
const marker = "__PASEO_SHARED_STYLESHEET_WATCHED__";
const flags = window as unknown as Record<string, boolean>;
if (flags[marker]) return;
flags[marker] = true;
const isShared = (sheet: CSSStyleSheet | null | undefined) => {
const tag = document.getElementById("unistyles-web");
return Boolean(sheet) && tag instanceof HTMLStyleElement && sheet === tag.sheet;
};
const watch = () => window.__PASEO_SHARED_STYLESHEET_WATCH__;
const wrapMethod = <Target>(
prototype: object,
name: string,
owner: (target: Target) => CSSStyleSheet | null | undefined,
record: (target: Target) => void,
) => {
const original = Reflect.get(prototype, name) as (...args: unknown[]) => unknown;
Reflect.set(prototype, name, function (this: Target, ...args: unknown[]) {
const result = original.apply(this, args);
if (isShared(owner(this))) record(this);
return result;
});
};
const countAdded = () => {
const current = watch();
if (current) current.added += 1;
};
const countRemoved = () => {
const current = watch();
if (current) current.removed += 1;
};
const countEdited = (style: CSSStyleDeclaration) => {
const current = watch();
if (!current) return;
current.edited += 1;
if (style.parentRule) current.editedRules.add(style.parentRule);
};
const sheetOf = (sheet: CSSStyleSheet) => sheet;
const groupSheet = (group: CSSGroupingRule) => group.parentStyleSheet;
const declarationSheet = (style: CSSStyleDeclaration) => style.parentRule?.parentStyleSheet;
wrapMethod(CSSStyleSheet.prototype, "insertRule", sheetOf, countAdded);
wrapMethod(CSSStyleSheet.prototype, "deleteRule", sheetOf, countRemoved);
wrapMethod(CSSGroupingRule.prototype, "insertRule", groupSheet, countAdded);
wrapMethod(CSSGroupingRule.prototype, "deleteRule", groupSheet, countRemoved);
wrapMethod(CSSStyleDeclaration.prototype, "setProperty", declarationSheet, countEdited);
wrapMethod(CSSStyleDeclaration.prototype, "removeProperty", declarationSheet, countEdited);
const cssText = Object.getOwnPropertyDescriptor(CSSStyleDeclaration.prototype, "cssText");
const setCssText = cssText?.set;
if (!cssText || !setCssText) throw new Error("CSSStyleDeclaration.cssText has no setter");
Object.defineProperty(CSSStyleDeclaration.prototype, "cssText", {
...cssText,
set(this: CSSStyleDeclaration, value: string) {
setCssText.call(this, value);
if (isShared(declarationSheet(this))) countEdited(this);
},
});
}
export async function rememberSharedStylesheet(page: Page): Promise<void> {
await page.evaluate(`(() => {
(${installSharedStylesheetWatch.toString()})();
window.__PASEO_SHARED_STYLESHEET_WATCH__ = {
rules: (${readSharedStylesheetRules.toString()})(),
added: 0,
removed: 0,
edited: 0,
editedRules: new Set(),
};
})()`);
}
export async function readSharedStylesheetChanges(page: Page): Promise<SharedStylesheetChanges> {
return page.evaluate(`(() => {
const watch = window.__PASEO_SHARED_STYLESHEET_WATCH__;
if (!watch) throw new Error("Shared stylesheet was not remembered");
const after = (${readSharedStylesheetRules.toString()})();
let edited = watch.edited;
let rebuilt = 0;
for (const [selector, { rule, text }] of after) {
const before = watch.rules.get(selector);
if (!before) continue;
if (before.rule !== rule) rebuilt += 1;
else if (before.text !== text && !watch.editedRules.has(rule)) edited += 1;
}
return { added: watch.added, removed: watch.removed, edited, rebuilt };
})()`);
}
@@ -160,11 +160,23 @@ export async function expectUsageCardOrder(page: Page, reportIds: string[]): Pro
.toEqual(reportIds);
}
/** Turns a card on or off from its header switch, named by its source and account. */
export async function setUsageCardOn(page: Page, name: string, on: boolean): Promise<void> {
const cardSwitch = usageModal(page).getByRole("switch", { name: `Show ${name}`, exact: true });
await cardSwitch.click();
await expect(cardSwitch).toBeChecked({ checked: on });
/** Turns a source on or off from the Sources page in Usage Settings, by report id. */
export async function setUsageCardOn(page: Page, reportId: string, on: boolean): Promise<void> {
await openUsageSources(page);
const item = visible(page, `usage-source-toggle-${reportId}`);
const checked = (await item.getAttribute("aria-checked")) === "true";
if (checked !== on) {
await item.click();
await expect(item).toHaveAttribute("aria-checked", String(on));
}
await closeUsageOptions(page);
}
/** Opens the Sources submenu inside Usage Settings (flyout on wide, in-place page on compact). */
export async function openUsageSources(page: Page): Promise<void> {
await openUsageOptions(page);
await visible(page, "usage-options-sources").click();
await expect(page.locator('[data-testid^="usage-source-toggle-"]:visible').first()).toBeVisible();
}
/** Drags a card by its handle until it sits above another card, with the mouse. */
@@ -245,18 +257,14 @@ export function pinRow(scope: Locator, source: string, window: string): Locator
/**
* A report card whose window rows do not pin: no pin toggle, no pin glyph, and nothing focusable
* but the header's buttons and on/off switch, so no row presses or highlights on hover.
* but the header's buttons, so no row presses or highlights on hover.
*/
export async function expectUnpinnableRows(card: Locator): Promise<void> {
await expect(card.getByRole("checkbox")).toHaveCount(0);
await expect(card.locator('[data-testid^="usage-pin-"]')).toHaveCount(0);
const focusable = await card
.locator("[tabindex]")
.evaluateAll(
(nodes) =>
nodes.filter((node) => !["button", "switch"].includes(node.getAttribute("role") ?? ""))
.length,
);
.evaluateAll((nodes) => nodes.filter((node) => node.getAttribute("role") !== "button").length);
expect(focusable).toBe(0);
}
@@ -388,6 +396,7 @@ export async function closeUsageOptions(page: Page): Promise<void> {
await waitForSettledPosition(usageOptionsSurface(page));
await page.mouse.click(0, 0);
await expect(page.getByTestId("usage-display-used")).toHaveCount(0);
await expect(page.locator('[data-testid^="usage-source-toggle-"]:visible')).toHaveCount(0);
}
export async function showUsageAs(page: Page, displayAs: "used" | "remaining") {
@@ -132,7 +132,7 @@ using namespace facebook::react;
if (!props.maintainVisibleContentPosition || scrollView.contentSize.width > self.frame.size.width) {
return nil;
}
NSArray<UIView *> *children = [self contentView].subviews;
NSArray<UIView *> *children = [self paseoScrollContentView].subviews;
NSUInteger first = props.maintainVisibleContentPosition.value().minIndexForVisible;
for (NSUInteger index = first; index < children.count; ++index) {
UIView *child = children[index];
@@ -149,7 +149,11 @@ using namespace facebook::react;
[((RCTViewComponentView *)view).nativeId isEqualToString:@"paseo-end-pin"];
}
- (UIView *)contentView
// Not `contentView`: that name would override RCTViewComponentView's getter, which
// react-native-gesture-handler reads to pick the view a gesture binds to. Bound to the content
// child, a bottom sheet's scroll gesture loses its pairing with the scroll view, so body drags
// neither expand the sheet nor scroll the list until the sheet is at its top detent.
- (UIView *)paseoScrollContentView
{
for (UIView *child in self.containerView.subviews) {
if (![child conformsToProtocol:@protocol(RCTCustomPullToRefreshViewProtocol)]) {
@@ -19,6 +19,7 @@ android {
dependencies {
implementation "androidx.customview:customview:1.1.0"
implementation "com.facebook.react:react-android"
testImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test:runner:1.6.2"
androidTestImplementation "androidx.test.ext:junit:1.2.1"
@@ -0,0 +1,69 @@
package sh.paseo.terminal
import android.text.InputType
import android.view.inputmethod.EditorInfo
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.facebook.react.bridge.BridgeReactContext
import com.facebook.react.uimanager.DisplayMetricsHolder
import com.facebook.react.uimanager.ThemedReactContext
import com.facebook.react.views.textinput.ReactEditText
import com.facebook.react.views.textinput.ReactTextInputManager
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals
import org.junit.Test
import org.junit.runner.RunWith
/**
* Builds React Native's own text input and applies `nativeID` through its view manager, which is
* how Fabric mounts the hidden terminal input. The app runs bridgeless, so the context is too.
*/
@RunWith(AndroidJUnit4::class)
class TerminalInputKeyboardTest {
private val instrumentation = InstrumentationRegistry.getInstrumentation()
@Test fun terminalInputAsksTheKeyboardNotToLearnWhatIsTyped() {
onInput("paseo-terminal-input") { input, editorInfo ->
assertNotEquals(
"The keyboard must not learn passwords typed at a terminal prompt",
0,
editorInfo.imeOptions and EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING,
)
assertEquals(
"Suggestions stay off and the input stays multiline",
InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS or InputType.TYPE_TEXT_FLAG_MULTI_LINE,
editorInfo.inputType and (InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS or InputType.TYPE_TEXT_FLAG_MULTI_LINE),
)
val connection = checkNotNull(input.onCreateInputConnection(EditorInfo()))
connection.setComposingText("su", 1)
connection.commitText("sudo ls", 1)
connection.deleteSurroundingText(1, 0)
assertEquals("sudo l", input.text.toString())
}
}
@Test fun otherInputsKeepPersonalizedLearning() {
onInput("message-composer") { _, editorInfo ->
assertEquals(0, editorInfo.imeOptions and EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING)
}
}
private fun onInput(nativeId: String, check: (ReactEditText, EditorInfo) -> Unit) {
TerminalInputKeyboard.install()
instrumentation.runOnMainSync {
val app = instrumentation.targetContext
DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(app)
val react = object : BridgeReactContext(app) {
override fun isBridgeless() = true
}
val input = ReactEditText(ThemedReactContext(react, app, null, -1))
input.inputType = InputType.TYPE_CLASS_TEXT or
InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS or
InputType.TYPE_TEXT_FLAG_MULTI_LINE
ReactTextInputManager().setNativeId(input, nativeId)
val editorInfo = EditorInfo()
input.onCreateInputConnection(editorInfo)
check(input, editorInfo)
}
}
}
@@ -7,6 +7,8 @@ class PaseoTerminalModule : Module() {
override fun definition() = ModuleDefinition {
Name("PaseoTerminal")
OnCreate { TerminalInputKeyboard.install() }
View(PaseoTerminalView::class) {
Events("onCellMetrics")
@@ -0,0 +1,32 @@
package sh.paseo.terminal
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.TextView
import com.facebook.react.bridge.UiThreadUtil
import com.facebook.react.uimanager.util.ReactFindViewUtil
// Matched against the hidden terminal input's `nativeID`
// (TERMINAL_INPUT_NATIVE_ID in terminal-input.native.tsx).
private const val TERMINAL_INPUT_NATIVE_ID = "paseo-terminal-input"
/**
* Keeps what is typed at a terminal prompt, such as a `sudo` password, out of the keyboard's
* learned words. React Native's TextInput has no prop for IME_FLAG_NO_PERSONALIZED_LEARNING, so the
* flag is added when the input receives its `nativeID`, before it can take focus.
*
* React Native replaces `imeOptions` when `returnKeyType` or `disableFullscreenUI` is set, so the
* terminal input sets neither.
*/
internal object TerminalInputKeyboard : ReactFindViewUtil.OnMultipleViewsFoundListener {
fun install() {
UiThreadUtil.runOnUiThread {
ReactFindViewUtil.addViewsListener(this, setOf(TERMINAL_INPUT_NATIVE_ID))
}
}
override fun onViewFound(view: View, nativeId: String) {
val input = view as? TextView ?: return
input.imeOptions = input.imeOptions or EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING
}
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/app",
"version": "0.17.1",
"version": "0.17.4",
"private": true,
"main": "index.ts",
"scripts": {
@@ -40,7 +40,7 @@
"dev:ios": "npm --prefix ../.. run build:client && cross-env APP_VARIANT=development expo run:ios",
"build:apk": "npm --prefix ../.. run build:apk",
"build:apk:arm64": "npm --prefix ../.. run build:apk:arm64",
"test:android": "expo prebuild --platform android --no-install && cd android && ./gradlew :paseo-native-trace:testReleaseUnitTest :paseo-hardware-keyboard:testReleaseUnitTest :react-native-enriched-markdown:testReleaseUnitTest --tests '*InlineCodeFormattingTest' --no-daemon --max-workers=2 -Dorg.gradle.parallel=false"
"test:android": "expo prebuild --platform android --no-install && cd android && ./gradlew :paseo-native-trace:testReleaseUnitTest :paseo-hardware-keyboard:testReleaseUnitTest :react-native-enriched-markdown:testReleaseUnitTest --tests '*InlineCodeFormattingTest' --tests '*ListRenderingTest' --tests '*TaskListInteractionTest' --tests '*ListBlockquoteMeasurementTest' --tests '*BlockquoteCopyTest' --no-daemon --max-workers=2 -Dorg.gradle.parallel=false"
},
"dependencies": {
"@codemirror/commands": "6.10.4",
@@ -125,7 +125,7 @@
"react-native": "0.86.3",
"react-native-draggable-flatlist": "^4.0.3",
"react-native-edge-to-edge": "^1.7.0",
"react-native-enriched-markdown": "1.2.0-nightly-20261014-766fc0e67",
"react-native-enriched-markdown": "*",
"react-native-gesture-handler": "~2.32.0",
"react-native-keyboard-controller": "1.21.12",
"react-native-nitro-modules": "0.35.5",
@@ -0,0 +1,204 @@
import { useMemo } from "react";
import { View } from "react-native";
import { StyleSheet, withUnistyles } from "react-native-unistyles";
import { GitHubIcon } from "@/components/icons/github-icon";
import { FormTextInput } from "@/components/ui/form-field";
import { isWeb } from "@/constants/platform";
import type { Theme } from "@/styles/theme";
import { ICON_SIZE } from "@/styles/theme";
import type { AddProjectActions } from "./use-add-project-actions";
import type { AddProjectFlowState, AddProjectHost, GithubRepositoryChoice } from "./model";
import { LocationField } from "./location-field";
import {
buildManualGithubRepositoryChoices,
checkoutName,
joinDirectoryPath,
MANUAL_CHOICE_PREFIX,
} from "./options";
import { ResultList, type ResultRow } from "./result-list";
import { RESULTS_TEST_ID } from "./result-list-id";
import { useGithubRepositorySearch } from "./searches";
import { resolveActiveIndex, type AddProjectTabView } from "./tab-view";
const ThemedGitHubIcon = withUnistyles(GitHubIcon);
const mutedColor = (theme: Theme) => ({ color: theme.colors.foregroundMuted });
const githubIcon = <ThemedGitHubIcon size={ICON_SIZE.md} uniProps={mutedColor} />;
/**
* The project the query names comes first: the search result that matches it exactly, or else
* the pasted URL or owner/repo as typed.
*/
function buildCloneChoices(
query: string,
found: GithubRepositoryChoice[],
): GithubRepositoryChoice[] {
const normalized = query.trim().toLowerCase();
const isExact = (repository: GithubRepositoryChoice) =>
repository.nameWithOwner.toLowerCase() === normalized ||
repository.cloneUrl.toLowerCase() === normalized;
const exact = found.filter(isExact);
if (exact.length === 0) return [...buildManualGithubRepositoryChoices(query), ...found];
return [...exact, ...found.filter((repository) => !isExact(repository))];
}
/** A choice built from the typed URL or owner/repo rather than from a search answer. */
function isTypedChoice(choice: GithubRepositoryChoice | undefined): boolean {
return choice?.id.startsWith(MANUAL_CHOICE_PREFIX) === true;
}
function cloneEmptyText(host: AddProjectHost, query: string): string {
if (!host.canSearchGithubRepositories) return "Paste a Git URL or owner/repo";
return query.trim() ? "No matching projects" : "Search GitHub or paste a Git URL";
}
export interface CloneTabView extends AddProjectTabView {
location: string;
destination: string;
}
const CLONE_UNAVAILABLE = "Update the host to clone projects";
export function useCloneTab(input: {
state: AddProjectFlowState;
host: AddProjectHost | null;
defaultLocation: string;
actions: AddProjectActions;
}): CloneTabView {
const { state, host, defaultLocation, actions } = input;
const { query } = state.clone;
const canClone = host?.canCloneGithubRepositories === true;
const search = useGithubRepositorySearch({
hostId: state.hostId,
query,
enabled: state.tab === "clone" && canClone && host?.canSearchGithubRepositories === true,
});
const choices = useMemo(
() => (canClone ? buildCloneChoices(query, search.items) : []),
[canClone, query, search.items],
);
const rows = useMemo<ResultRow[]>(
() =>
choices.map((repository) => ({
id: repository.id,
title: repository.cloneProtocol
? `${repository.nameWithOwner} via ${repository.cloneProtocol.toUpperCase()}`
: repository.nameWithOwner,
subtitle: repository.description,
icon: GitHubIcon,
testID: `add-project-flow-repository-${repository.id}`,
})),
[choices],
);
// While the search for new text runs, the rows on screen answer the old text. None of them is
// picked until the new answer arrives or the user picks one, unless it is the typed URL.
const awaitingRows =
search.pending && state.clone.selectedId === null && !isTypedChoice(choices[0]);
const activeIndex = awaitingRows ? -1 : resolveActiveIndex(rows, state.clone.selectedId);
const repository = choices[activeIndex] ?? null;
const location = state.clone.location ?? defaultLocation;
const destination = repository
? joinDirectoryPath(location, checkoutName(repository.nameWithOwner))
: location;
return useMemo<CloneTabView>(() => {
const unavailable = host && canClone ? null : CLONE_UNAVAILABLE;
let notice: AddProjectTabView["notice"] = null;
if (!host || unavailable) notice = { kind: "empty", text: CLONE_UNAVAILABLE };
else if (search.error) notice = { kind: "error", text: search.error };
else if (search.pending) notice = { kind: "pending", text: "Searching..." };
else notice = { kind: "empty", text: cloneEmptyText(host, query) };
return {
rows,
activeIndex,
notice,
unavailable,
location,
destination,
primary: {
label: "Clone project",
submit: repository ? () => actions.clone(repository, location) : null,
},
};
}, [
actions,
activeIndex,
canClone,
destination,
host,
location,
query,
repository,
rows,
search.error,
search.pending,
]);
}
export function CloneTab({
view,
query,
hostId,
recommendedPaths,
disabled,
autoFocus,
onQueryChange,
onSelectRow,
onLocationChange,
}: {
view: CloneTabView;
query: string;
hostId: string | null;
recommendedPaths: string[];
disabled: boolean;
/** Focus the field on mount; only with a hardware keyboard, so touch keeps the list in view. */
autoFocus: boolean;
onQueryChange: (query: string) => void;
onSelectRow: (index: number) => void;
onLocationChange: (location: string) => void;
}) {
const editable = !disabled && !view.unavailable;
return (
<View style={styles.body}>
<FormTextInput
initialValue={query}
onChangeText={onQueryChange}
onSubmitEditing={isWeb ? undefined : (view.primary.submit ?? undefined)}
leading={githubIcon}
placeholder="Search GitHub or paste a Git URL"
accessibilityLabel="Search GitHub"
autoFocus={autoFocus}
autoCapitalize="none"
autoCorrect={false}
returnKeyType="go"
editable={editable}
testID="add-project-flow-input"
/>
<ResultList
rows={view.rows}
activeIndex={view.activeIndex}
notice={view.notice}
onSelect={onSelectRow}
disabled={disabled}
testID={RESULTS_TEST_ID}
/>
<LocationField
hostId={hostId}
location={view.location}
destination={view.destination}
recommendedPaths={recommendedPaths}
onChange={onLocationChange}
disabled={!editable}
testID="add-project-flow-location"
/>
</View>
);
}
const styles = StyleSheet.create((theme) => ({
body: {
flex: 1,
minHeight: 0,
gap: theme.spacing[3],
},
}));
@@ -0,0 +1,166 @@
import { useMemo } from "react";
import { View } from "react-native";
import { StyleSheet, withUnistyles } from "react-native-unistyles";
import { Folder, FolderOpen, Search } from "lucide-react-native";
import { buildProjectPickerOptions } from "@/components/project-picker-options";
import { Button } from "@/components/ui/button";
import { FormTextInput } from "@/components/ui/form-field";
import { isWeb } from "@/constants/platform";
import { ICON_SIZE, type Theme } from "@/styles/theme";
import { shortenPath } from "@/utils/shorten-path";
import type { AddProjectActions } from "./use-add-project-actions";
import type { AddProjectFlowState, AddProjectHost } from "./model";
import { pathBaseName } from "./options";
import { ResultList, type ResultRow } from "./result-list";
import { RESULTS_TEST_ID } from "./result-list-id";
import { useDirectorySearch } from "./searches";
import { resolveActiveIndex, type AddProjectTabView } from "./tab-view";
const ThemedSearch = withUnistyles(Search);
const mutedColor = (theme: Theme) => ({ color: theme.colors.foregroundMuted });
const searchIcon = <ThemedSearch size={ICON_SIZE.md} uniProps={mutedColor} />;
export function useExistingTab(input: {
state: AddProjectFlowState;
host: AddProjectHost | null;
recommendedPaths: string[];
actions: AddProjectActions;
}): AddProjectTabView {
const { state, host, recommendedPaths, actions } = input;
const { query } = state.existing;
const canAddProject = host?.canAddProject === true;
const search = useDirectorySearch({
hostId: state.hostId,
query,
// The host answers a blank query with nothing, so only search once there is text.
enabled: state.tab === "existing" && canAddProject && query.trim().length > 0,
});
const paths = useMemo(
() =>
canAddProject
? buildProjectPickerOptions({ recommendedPaths, serverPaths: search.items, query })
: [],
[canAddProject, query, recommendedPaths, search.items],
);
const rows = useMemo<ResultRow[]>(
() =>
paths.map((option) => {
const shortPath = shortenPath(option.path);
return {
id: option.path,
title: option.kind === "path" ? shortPath : pathBaseName(option.path),
subtitle: option.kind === "path" ? "Open this path" : shortPath,
icon: Folder,
testID: `add-project-flow-folder-${encodeURIComponent(option.path)}`,
};
}),
[paths],
);
// While the search for new text runs, the rows on screen answer the old text. None of them is
// picked until the new answer arrives or the user picks one, unless it is the typed path.
const awaitingRows =
search.pending && state.existing.selectedId === null && paths[0]?.kind !== "path";
const activeIndex = awaitingRows ? -1 : resolveActiveIndex(rows, state.existing.selectedId);
const activePath = paths[activeIndex]?.path ?? null;
return useMemo<AddProjectTabView>(() => {
const unavailable = canAddProject ? null : "Update the host to add projects";
let notice: AddProjectTabView["notice"] = null;
if (unavailable) notice = { kind: "empty", text: unavailable };
else if (search.error) notice = { kind: "error", text: search.error };
else if (search.pending) notice = { kind: "pending", text: "Searching..." };
else notice = { kind: "empty", text: query.trim() ? "No matching folders" : "No folders yet" };
return {
rows,
activeIndex,
notice,
unavailable,
primary: {
label: "Open project",
submit: activePath ? () => actions.openFolder(activePath) : null,
},
};
}, [actions, activeIndex, activePath, canAddProject, query, rows, search.error, search.pending]);
}
export function ExistingTab({
view,
query,
canBrowse,
disabled,
autoFocus,
onQueryChange,
onSelectRow,
onBrowse,
}: {
view: AddProjectTabView;
query: string;
canBrowse: boolean;
disabled: boolean;
/** Focus the field on mount; only with a hardware keyboard, so touch keeps the list in view. */
autoFocus: boolean;
onQueryChange: (query: string) => void;
onSelectRow: (index: number) => void;
onBrowse: () => void;
}) {
const editable = !disabled && !view.unavailable;
return (
<View style={styles.body}>
<View style={styles.searchRow}>
<View style={styles.searchField}>
<FormTextInput
initialValue={query}
onChangeText={onQueryChange}
onSubmitEditing={isWeb ? undefined : (view.primary.submit ?? undefined)}
leading={searchIcon}
placeholder="Search folders or enter a path"
accessibilityLabel="Search folders"
autoFocus={autoFocus}
autoCapitalize="none"
autoCorrect={false}
returnKeyType="go"
editable={editable}
testID="add-project-flow-input"
/>
</View>
{canBrowse ? (
<Button
variant="secondary"
leftIcon={FolderOpen}
onPress={onBrowse}
disabled={!editable}
testID="add-project-flow-browse"
>
Browse
</Button>
) : null}
</View>
<ResultList
rows={view.rows}
activeIndex={view.activeIndex}
notice={view.notice}
onSelect={onSelectRow}
disabled={disabled}
testID={RESULTS_TEST_ID}
/>
</View>
);
}
const styles = StyleSheet.create((theme) => ({
body: {
flex: 1,
minHeight: 0,
gap: theme.spacing[3],
},
searchRow: {
flexDirection: "row",
alignItems: "center",
gap: theme.spacing[2],
},
searchField: {
flex: 1,
minWidth: 0,
},
}));
@@ -0,0 +1,4 @@
/** Native moves no focus to buttons from a hardware keyboard, so Enter always reaches the sheet. */
export function focusedControlOwnsEnter(): boolean {
return false;
}
@@ -0,0 +1,16 @@
import { RESULTS_TEST_ID } from "./result-list-id";
const ACTIVATES_ON_ENTER =
'button, a[href], [role="button"], [role="link"], [role="tab"], [role="combobox"], [role="menuitem"]';
/**
* Whether the focused element handles Enter itself, such as the Close button, a tab, or the
* Location field. Result rows are buttons too, but focusing a row picks it, so Enter on a row
* runs the primary action for that row.
*/
export function focusedControlOwnsEnter(): boolean {
const active = document.activeElement;
if (!(active instanceof HTMLElement)) return false;
if (active.closest(`[data-testid="${RESULTS_TEST_ID}"]`)) return false;
return active.matches(ACTIVATES_ON_ENTER);
}
+492
View File
@@ -0,0 +1,492 @@
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
import { Text, View } from "react-native";
import { StyleSheet } from "react-native-unistyles";
import { Folder, FolderPlus, Plus } from "lucide-react-native";
import { AdaptiveModalSheet, type SheetKeyboard } from "@/components/adaptive-modal-sheet";
import { HostStatusDot } from "@/components/host-status-dot";
import { HostPicker } from "@/components/hosts/host-picker";
import { GitHubIcon } from "@/components/icons/github-icon";
import { Button } from "@/components/ui/button";
import { SegmentedControl, type SegmentedControlOption } from "@/components/ui/segmented-control";
import { useIsCompactFormFactor } from "@/constants/layout";
import { useAddHost } from "@/hosts/add-host";
import { useHardwareKeyboardPresent, type KeyboardInputEvent } from "@/keyboard";
import { Shortcut } from "@/components/ui/shortcut";
import { FieldTrigger } from "@/screens/new-workspace/form/field-trigger";
import {
useAddProjectFlowStore,
type AddProjectFlowRequest,
} from "@/stores/add-project-flow-store";
import { useRecommendedProjectPaths } from "@/stores/session-store-hooks";
import { formatShortcut } from "@/utils/format-shortcut";
import { getShortcutOs } from "@/utils/shortcut-platform";
import { CloneTab, useCloneTab } from "./clone-tab";
import { ExistingTab, useExistingTab } from "./existing-tab";
import { focusedControlOwnsEnter } from "./focused-control";
import {
ADD_PROJECT_KEYS,
addProjectFailure,
applyAvailableAddProjectHosts,
currentAddProjectHost,
selectableAddProjectHosts,
isAddProjectSubmitting,
moveAddProjectActiveIndex,
openAddProjectFlow,
resolveAddProjectKey,
selectAddProjectHost,
selectAddProjectRow,
selectAddProjectTab,
setAddProjectLocation,
setAddProjectQuery,
setNewFolderName,
type AddProjectTab,
} from "./model";
import { NewFolderTab, useNewFolderTab } from "./new-folder-tab";
import { defaultProjectLocation } from "./options";
import type { AddProjectTabView } from "./tab-view";
import { useAddProjectActions } from "./use-add-project-actions";
import { useAddProjectHosts } from "./use-add-project-hosts";
const SNAP_POINTS = ["90%"];
// Tall enough for a search field, six result rows, and the location field, so switching tabs
// never resizes the card.
const DESKTOP_HEIGHT = 560;
// Compact drops the segment icons so the three labels fit a phone's width.
const TABS: {
value: AddProjectTab;
label: string;
key: string;
icon: SegmentedControlOption<AddProjectTab>["icon"];
}[] = [
{
value: "existing",
label: "Existing",
key: "1",
icon: ({ color, size }) => <Folder color={color} size={size} />,
},
{
value: "clone",
label: "Clone",
key: "2",
icon: ({ color, size }) => <GitHubIcon color={color} size={size} />,
},
{
value: "new-folder",
label: "New folder",
key: "3",
icon: ({ color, size }) => <FolderPlus color={color} size={size} />,
},
];
/** `lockedTo` is the tab a running submission belongs to; the others are disabled until it ends. */
function buildTabOptions(
isMac: boolean,
withIcons: boolean,
lockedTo: AddProjectTab | null,
): SegmentedControlOption<AddProjectTab>[] {
const os = isMac ? "mac" : "non-mac";
return TABS.map(
(tab): SegmentedControlOption<AddProjectTab> => ({
value: tab.value,
label: tab.label,
icon: withIcons ? tab.icon : undefined,
tooltip: formatShortcut(["mod", tab.key], os),
testID: `add-project-flow-tab-${tab.value}`,
disabled: lockedTo !== null && tab.value !== lockedTo,
}),
);
}
interface AddProjectFlowProps {
request: AddProjectFlowRequest;
onClose: () => void;
}
/**
* Add project: one sheet with a tab per way to add one. The flow state lives in `./model`; this
* component wires it to the host, the searches, and the keys.
*/
export function AddProjectFlow({ request, onClose }: AddProjectFlowProps) {
const isCompact = useIsCompactFormFactor();
const isMac = getShortcutOs() === "mac";
const keyboardPresent = useHardwareKeyboardPresent();
const availableHosts = useAddProjectHosts();
const [state, setState] = useState(() =>
openAddProjectFlow({
hosts: availableHosts,
...(request.preferredHostId ? { preferredHostId: request.preferredHostId } : {}),
}),
);
useEffect(() => {
setState((current) => applyAvailableAddProjectHosts(current, availableHosts));
}, [availableHosts]);
const host = currentAddProjectHost(state);
const submitting = isAddProjectSubmitting(state);
const failure = addProjectFailure(state);
const recommendedPaths = useRecommendedProjectPaths(state.hostId);
const rememberedLocation = useAddProjectFlowStore((store) =>
state.hostId ? store.lastLocationByHost[state.hostId] : undefined,
);
const defaultLocation = defaultProjectLocation({
remembered: rememberedLocation,
projectPaths: recommendedPaths,
});
const actions = useAddProjectActions({ hostId: state.hostId, setState, onClose });
// An offline host keeps its drafts, but nothing submits until it is back or the user picks
// another host. Gated here, once, so the footer, Enter and the native Go key all agree.
const offline = host?.online === false;
const existing = blockSubmitWhen(
offline,
useExistingTab({ state, host, recommendedPaths, actions }),
);
const clone = blockSubmitWhen(offline, useCloneTab({ state, host, defaultLocation, actions }));
const newFolder = blockSubmitWhen(
offline,
useNewFolderTab({ state, host, defaultLocation, actions }),
);
const views: Record<AddProjectTab, AddProjectTabView> = {
existing,
clone,
"new-folder": newFolder,
};
const view = views[state.tab];
const selectTab = useCallback(
(tab: AddProjectTab) => setState((current) => selectAddProjectTab(current, tab)),
[],
);
const selectHost = useCallback(
(hostId: string) => setState((current) => selectAddProjectHost(current, hostId)),
[],
);
const changeQuery = useCallback(
(query: string) => setState((current) => setAddProjectQuery(current, query)),
[],
);
const changeLocation = useCallback(
(location: string) => setState((current) => setAddProjectLocation(current, location)),
[],
);
const changeName = useCallback(
(name: string) => setState((current) => setNewFolderName(current, name)),
[],
);
// The key handler reads the latest view without re-registering the overlay on every keystroke.
const viewRef = useRef(view);
viewRef.current = view;
const hasHostRef = useRef(host !== null);
hasHostRef.current = host !== null;
/** Picks the row at `index` of the current tab's list, remembered by its id. */
const selectRow = useCallback((index: number) => {
const row = viewRef.current.rows[index];
if (row) setState((current) => selectAddProjectRow(current, row.id));
}, []);
const keyboard = useMemo<SheetKeyboard>(
() => ({
keys: ADD_PROJECT_KEYS,
onKeyDown: (event: KeyboardInputEvent) => {
// With no host there is nothing to switch to or submit; Enter belongs to Add host.
if (!hasHostRef.current) return false;
const command = resolveAddProjectKey(event, isMac);
if (!command) return false;
const current = viewRef.current;
if (command.kind === "tab") {
selectTab(command.tab);
return true;
}
if (command.kind === "move") {
if (current.rows.length === 0) return false;
selectRow(
moveAddProjectActiveIndex(current.activeIndex, current.rows.length, command.direction),
);
return true;
}
if (!current.primary.submit || focusedControlOwnsEnter()) return false;
current.primary.submit();
return true;
},
}),
[isMac, selectRow, selectTab],
);
const lockedTab = submitting ? state.tab : null;
const tabOptions = useMemo(
() => buildTabOptions(isMac, !isCompact, lockedTab),
[isCompact, isMac, lockedTab],
);
const selectableHosts = useMemo(() => selectableAddProjectHosts(state), [state]);
const header = useMemo(
() => ({
title: "Add project",
titleTestID: "add-project-flow-title",
actions:
selectableHosts.length > 1 && state.hostId ? (
<HostPill
hosts={selectableHosts}
hostId={state.hostId}
onSelect={selectHost}
disabled={submitting}
/>
) : undefined,
}),
[selectHost, selectableHosts, state.hostId, submitting],
);
// On a pointer layout the failure sits left of the button; compact stacks it above a
// full-width button.
const problem = failure ?? (offline && host ? `${host.label} is offline` : null);
const failureLine = problem ? (
<Text style={styles.failure} numberOfLines={2} testID="add-project-flow-error">
{problem}
</Text>
) : null;
const footer = host ? (
<>
{failureLine ?? (isCompact ? null : <KeyHints canMove={view.rows.length > 0} />)}
<Button
variant="default"
onPress={view.primary.submit ?? undefined}
disabled={!view.primary.submit}
loading={submitting}
style={isCompact ? styles.primaryCompact : styles.primary}
testID="add-project-flow-submit"
>
{view.primary.label}
</Button>
</>
) : null;
let body: ReactNode;
if (!host) {
body = <NoHosts onClose={onClose} />;
} else if (state.tab === "existing") {
body = (
<ExistingTab
view={existing}
query={state.existing.query}
canBrowse={host.canBrowse && !offline}
disabled={submitting}
autoFocus={keyboardPresent}
onQueryChange={changeQuery}
onSelectRow={selectRow}
onBrowse={actions.browse}
/>
);
} else if (state.tab === "clone") {
body = (
<CloneTab
view={clone}
query={state.clone.query}
hostId={state.hostId}
recommendedPaths={recommendedPaths}
disabled={submitting}
autoFocus={keyboardPresent}
onQueryChange={changeQuery}
onSelectRow={selectRow}
onLocationChange={changeLocation}
/>
);
} else {
body = (
<NewFolderTab
view={newFolder}
name={state.newFolder.name}
hostId={state.hostId}
recommendedPaths={recommendedPaths}
disabled={submitting}
autoFocus={keyboardPresent}
onNameChange={changeName}
onLocationChange={changeLocation}
/>
);
}
return (
<AdaptiveModalSheet
visible
onClose={onClose}
header={header}
footer={footer}
footerContainerStyle={isCompact ? styles.footerContainerCompact : undefined}
snapPoints={SNAP_POINTS}
desktopHeight={DESKTOP_HEIGHT}
scrollable={false}
keyboard={keyboard}
contentStyle={styles.content}
testID="add-project-flow"
>
{host ? (
<SegmentedControl
options={tabOptions}
value={state.tab}
onValueChange={selectTab}
fill
testID="add-project-flow-tabs"
/>
) : null}
{/* Keyed by tab so each tab's input mounts with its own draft and takes focus. */}
<View key={host ? state.tab : "no-host"} style={styles.tabBody}>
{body}
</View>
</AdaptiveModalSheet>
);
}
function blockSubmitWhen<TabView extends AddProjectTabView>(
blocked: boolean,
view: TabView,
): TabView {
return blocked ? { ...view, primary: { ...view.primary, submit: null } } : view;
}
function hostOptionTestID(serverId: string): string {
return `add-project-flow-host-${serverId}`;
}
function HostPill({
hosts,
hostId,
onSelect,
disabled,
}: {
hosts: { serverId: string; label: string }[];
hostId: string;
onSelect: (hostId: string) => void;
disabled: boolean;
}) {
const anchorRef = useRef<View>(null);
const [open, setOpen] = useState(false);
const openPicker = useCallback(() => setOpen(true), []);
const label = hosts.find((host) => host.serverId === hostId)?.label ?? hostId;
const icon = useMemo(() => <HostStatusDot serverId={hostId} />, [hostId]);
return (
<HostPicker
hosts={hosts}
value={hostId}
onSelect={onSelect}
open={open}
onOpenChange={setOpen}
anchorRef={anchorRef}
searchable={false}
title="Host"
desktopPlacement="bottom-end"
desktopMinWidth={240}
hostOptionTestID={hostOptionTestID}
>
<FieldTrigger
ref={anchorRef}
variant="badge"
label="Host"
accessibilityLabel="Project host"
tooltip="Host"
icon={icon}
value={label}
onPress={openPicker}
disabled={disabled}
testID="add-project-flow-host-trigger"
/>
</HostPicker>
);
}
const MOVE_KEYS = ["↑↓"];
const TAB_KEYS = ["mod", "1–3"];
/** The keys that are not on any control: list movement and tab switching. */
function KeyHints({ canMove }: { canMove: boolean }) {
const keyboardPresent = useHardwareKeyboardPresent();
if (!keyboardPresent) return <View />;
return (
<View style={styles.hints}>
{canMove ? (
<View style={styles.hint}>
<Shortcut keys={MOVE_KEYS} />
<Text style={styles.hintText}>Move</Text>
</View>
) : null}
<View style={styles.hint}>
<Shortcut keys={TAB_KEYS} />
<Text style={styles.hintText}>Switch</Text>
</View>
</View>
);
}
function NoHosts({ onClose }: { onClose: () => void }) {
const addHost = useAddHost();
const handleAddHost = useCallback(() => {
// The project sheet must release its window before the add-host sheet opens.
onClose();
addHost();
}, [addHost, onClose]);
return (
<View style={styles.noHosts}>
<Text style={styles.noHostsText}>No connected hosts</Text>
<Button
variant="secondary"
leftIcon={Plus}
onPress={handleAddHost}
testID="add-project-flow-add-host"
>
Add host
</Button>
</View>
);
}
const styles = StyleSheet.create((theme) => ({
content: {
flex: 1,
minHeight: 0,
},
tabBody: {
flex: 1,
minHeight: 0,
},
footerContainerCompact: {
flexDirection: "column",
alignItems: "stretch",
},
// The message wraps beside the button; the button keeps its width.
failure: {
flexShrink: 1,
minWidth: 0,
color: theme.colors.statusDanger,
fontSize: theme.fontSize.sm,
},
hints: {
flexDirection: "row",
alignItems: "center",
gap: theme.spacing[4],
},
hint: {
flexDirection: "row",
alignItems: "center",
gap: theme.spacing[1.5],
},
hintText: {
color: theme.colors.foregroundMuted,
fontSize: theme.fontSize.sm,
},
primary: {
flexShrink: 0,
},
primaryCompact: {
flexShrink: 0,
alignSelf: "stretch",
},
noHosts: {
flex: 1,
alignItems: "center",
justifyContent: "center",
gap: theme.spacing[3],
},
noHostsText: {
color: theme.colors.foregroundMuted,
fontSize: theme.fontSize.base,
},
}));
@@ -0,0 +1,109 @@
import { useCallback, useMemo, useRef, useState } from "react";
import type { View } from "react-native";
import { withUnistyles } from "react-native-unistyles";
import { HardDrive } from "lucide-react-native";
import { buildProjectPickerOptions } from "@/components/project-picker-options";
import { Combobox, type ComboboxOption } from "@/components/ui/combobox";
import { FieldTrigger } from "@/screens/new-workspace/form/field-trigger";
import { ICON_SIZE, type Theme } from "@/styles/theme";
import { shortenPath } from "@/utils/shorten-path";
import { buildSuggestedParentDirectories } from "./options";
import { useDirectorySearch } from "./searches";
const ThemedHardDrive = withUnistyles(HardDrive);
const mutedColor = (theme: Theme) => ({ color: theme.colors.foregroundMuted });
const locationIcon = <ThemedHardDrive size={ICON_SIZE.md} uniProps={mutedColor} />;
interface LocationFieldProps {
hostId: string | null;
/** The parent directory the project goes into. */
location: string;
/** Where the project ends up, shown on the field so the user rarely needs to open it. */
destination: string;
recommendedPaths: string[];
onChange: (location: string) => void;
disabled: boolean;
testID: string;
}
/** Picks the parent directory for a new project: recent parents, a folder search, or a typed path. */
export function LocationField({
hostId,
location,
destination,
recommendedPaths,
onChange,
disabled,
testID,
}: LocationFieldProps) {
const anchorRef = useRef<View>(null);
const [open, setOpen] = useState(false);
const [query, setQuery] = useState("");
const search = useDirectorySearch({ hostId, query, enabled: open && query.trim().length > 0 });
// The same builder as the Existing tab: a typed path first, then matching suggestions and
// folders the host found.
const pickerOptions = useMemo(() => {
const suggestions = [
location,
...buildSuggestedParentDirectories(recommendedPaths).filter((path) => path !== location),
];
return buildProjectPickerOptions({
recommendedPaths: suggestions,
serverPaths: search.items,
query,
});
}, [location, query, recommendedPaths, search.items]);
const options = useMemo<ComboboxOption[]>(
() =>
pickerOptions.map(
(option): ComboboxOption => ({
id: option.path,
label: shortenPath(option.path),
description: option.kind === "path" ? "Use this folder" : undefined,
kind: "directory",
}),
),
[pickerOptions],
);
// Like the Existing tab: while a new search runs, only a typed path is picked for Enter.
const awaitingOptions = search.pending && pickerOptions[0]?.kind !== "path";
const handleOpen = useCallback(() => setOpen(true), []);
const handleOpenChange = useCallback((next: boolean) => {
setOpen(next);
if (!next) setQuery("");
}, []);
return (
<>
<FieldTrigger
ref={anchorRef}
variant="field"
label="Location"
accessibilityLabel="Project location"
icon={locationIcon}
value={shortenPath(destination)}
onPress={handleOpen}
disabled={disabled}
testID={testID}
/>
<Combobox
options={options}
value={location}
onSelect={onChange}
searchable
remoteSearch
remoteSearchPending={awaitingOptions}
onSearchQueryChange={setQuery}
searchPlaceholder="Search folders or enter a path"
emptyText={search.error ?? (search.pending ? "Searching..." : "No matching folders")}
title="Location"
open={open}
onOpenChange={handleOpenChange}
anchorRef={anchorRef}
desktopPlacement="bottom-start"
/>
</>
);
}

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