Compare commits

...
Author SHA1 Message Date
Mohamed Boudra a012702b79 fix(server): keep Changes probes working across Git versions and worktrees
Use line-delimited batch input for older Git versions. Resolve shared refs in the common Git directory so a removed worktree cannot block the remaining comparisons.
2026-11-19 05:39:03 +01:00
Mohamed Boudra 093866a3f0 fix(server): report Changes metadata fallback in daemon diagnostics
Log the watcher failure once per root and count comparisons currently using the fallback. Exercise the transition from an active watcher to polling and the release of the last comparison.
2026-11-19 05:25:36 +01:00
Mohamed Boudra 5b99f85213 fix(server): probe only revisions used by degraded Changes streams
Reuse each comparison's initial Git resolution as the baseline. Batched ref lookups run after subscription setup, stay bounded when the repository has a large ref table, and refresh only comparisons with changed inputs.
2026-11-19 05:21:13 +01:00
Mohamed Boudra 5e964a3847 fix(server): keep Changes available when Git metadata watching fails
A valid checkout could lose its first comparison when metadata observation exceeded the directory limit. Keep working-tree observation active and share a backing-off metadata sample per Git root so quiet comparisons stay idle.
2026-11-19 05:05:37 +01:00
Mohamed Boudraandfivetaku 51baa2beb8 feat(claude): give Ultracode its own toggle (#10150)
Keep Ultracode independent of effort in the Claude composer and retain support for saved Ultra Code choices.

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

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

Closes #10128

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

Closes #10157

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

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

Closes #10151

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

openForkMenu now presses the trigger until its menu shows.

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

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

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

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

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

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

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

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

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

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

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

---------

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

* Back off when the Hub repeatedly rejects session permissions

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---------

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

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

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

Rows already stored without a turn id are not changed.

Refs #10030.

* Show a stopped background command's notification at once

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

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

Refs #10030.

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

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

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

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

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

Refs #10030

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

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

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

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

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

Refs #10030

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

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

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

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

Closes #8249

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

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

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

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

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

Closes #9857.

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

Closes #9650.
Supersedes #9626.

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

Fixes #9810.

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

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

Closes #10004

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

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

Refs #7904

* Rewrite the plugin development guidance as plain steps

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

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

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

Closes #9975

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

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

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

---------

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

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

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

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

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

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

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

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

---------

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

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

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

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

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

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

---------

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

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

Fixes #9996

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

* refactor(app): publish restored hosts through setHostsAndSync

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

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

---------

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

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

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

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

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

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

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

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

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

* test(workspaces): verify detached checkout after restore

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

---------

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

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

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

Fixes #9999

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

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

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

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

---------

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

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

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

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

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

---------

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

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

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

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

Every read now waits for a non-empty id.

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

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


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

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

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

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

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

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

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

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

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

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

---------

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

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

Fixes #6355
Supersedes #8405

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

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

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

Closes #9895

Co-authored-by: panta82 <4291324+panta82@users.noreply.github.com>
2026-11-17 08:04:50 +00:00
paseo-ai[bot] c71d41f687 fix: update lockfile signatures and Nix hash [skip ci] 2026-11-17 06:51:06 +00:00
Mohamed Boudra 689e3412b4 chore(release): reconcile main with 0.16.1 (#9945)
Brings in the shipped 0.16.1 CHANGELOG.md and CHANGELOG.zh-CN.md entries
exactly as tagged, the 0.16.1 version in every package.json and
package-lock.json, and the F-Droid changelog files for version codes
160011-160014.
2026-11-17 13:43:31 +07:00
paseo-bot[bot]andClaude Opus 5.5 349a2e43ea Keep the phone model-label sweep from reading the browser's clipped label (#9934)
* test(app): wait for the model control to re-measure in the label sweep

The phone label sweep read the folded model control twice, 100ms apart,
after each resize. A resize reflows the page at once and the browser
clips the model label with its own ellipsis until the control's layout
event arrives. On a slow runner both reads landed in that window, so the
sweep recorded a truncated label beside the thinking label and stopped.

A settled read now also requires the model label to fit its box, and
gives up after 10s with the last state.

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

* test(app): settle the label sweep on the label its box fits

The previous commit rejected one in-between state: the browser clipping
the model label beside the thinking label. A slow runner can also leave
the label truncated to "Ten second…" after the thinking label is gone,
because the label's box widens at once but its text waits for the next
layout event.

A settled read now requires the shown label to match the box: the full
text when the invisible full-text sizer fits, otherwise a truncation
that fits. That covers both states, so the clipped-label special case
goes.

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

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 06:41:21 +00:00
eabbd3d97c Show a Codex message canceled before it starts as canceled, not as a startup error (#9931)
* fix(server): treat canceled Codex starts as interruptions

* fix(server): report a replaced pending start as undelivered to its sender

waitForAgentRunStart followed the agent rather than the sender's run, so a
send canceled by a replacement before reaching Codex resolved once the
replacement started. Keep the sender's own pending run and reject when it is
cleared before its turn starts.

The canceled-start tests drain streamAgent, because a fresh Codex agent has no
session handle before its first turn (#8393).

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

* fix(server): keep a sender's start wait across a stale-session retry

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

* test(server): expect the start options passed to a foreground run

Session create and scheduled prompts now pass the sender's start options,
so the two call-argument assertions include them.

Co-authored-by: 3ae3ae <3ae3ae@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(server): keep a Codex message canceled before it starts in history

A Stop or replacing send during Codex preparation settled the run as
canceled without recording the sender's prompt, so the message vanished
from history after a reload and on other clients. Record it as a
rejected attempt, as the start-failure branch already does, so it stays
in history without being delivered.

Co-authored-by: 3ae3ae <3ae3ae@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(server): return each send's start from dispatch

A send waited for its turn by looking up the agent's pending run when the
wait began. When a provider plugin's session was stale, the first start
failed and its run was cleared before the sender started waiting, so the
send rejected with "has no pending run" while the retry answered it.

startAgentRun now returns the start of the prompt it dispatched. Every run
created for that prompt, including the stale-session retry, is bound to
it, so the send resolves when its own turn starts and rejects when its own
run ends unstarted. This replaces the retry hand-off between runs in the
agent manager.

Co-authored-by: 3ae3ae <3ae3ae@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: 3ae3ae <ogyshjsm@naver.com>
Co-authored-by: Bae Seongmin <83870598+3ae3ae@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: bot <bot@localhost>
Co-authored-by: paseo-bot[bot] <paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: 3ae3ae <3ae3ae@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-17 05:11:25 +00:00
paseo-ai[bot] 0bac18f359 fix: update lockfile signatures and Nix hash [skip ci] 2026-11-17 04:02:57 +00:00
Mohamed Boudra 3eedffc4ac fix(claude): keep the user's ask rules and hooks in Bypass (#9927)
In Bypass, Claude agents again show a permission card for asks from the user's permissions.ask rules (including managed policy), PreToolUse hooks that return ask, compound and piped commands that hit an ask rule, permissions.blockReadsOutsideWorkingDirectories, an organization's ask limit, and sandbox overrides. Claude's own checks are still approved without a card. Upgrades @anthropic-ai/claude-agent-sdk to 0.3.326, which passes the ask's source to canUseTool.

Closes #9916
2026-11-17 10:53:08 +07:00
Michael ThomasandMohamed Boudra e5352c9890 fix: size controls by the primary pointer, not any touch screen (#9909)
* feat(desktop): size controls by the primary pointer, not any touch screen

The desktop app gave touch-sized controls to every machine with a touch
screen, including Windows laptops driven by a trackpad. In Electron, ask
whether a mouse-like primary pointer drives the UI instead: Chromium
reports a fine primary pointer for those laptops and a coarse one for a
tablet with no mouse or trackpad attached.

Browsers and native keep the touch-screen check, so an iPad keeps touch
sizes with a trackpad attached. Swipe gestures still follow the
touch-screen capability.

Refs #9892

* feat(app): size controls by the primary pointer on every platform

Replace the Electron-only check with one rule everywhere: touch-sized
when touch is the primary input, `(pointer: coarse)`, rather than when a
touch screen exists at all. WebKit keeps touch primary on an iPad with a
trackpad attached, so iPad Safari stays touch-sized; Chromium reports a
fine primary pointer for a touch-screen laptop driven by its trackpad, in
the browser and the desktop app. Native is always touch-sized.

`hasTouchScreen()` and its `maxTouchPoints` fallback had no other caller
and are removed. Swipe gestures still follow the touch-screen capability.

Refs #9892

* test(app): exercise pointer sizing through the media source

* test(app): cover touch laptops with a primary pointer

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
2026-11-17 10:48:34 +07:00
307 changed files with 10145 additions and 1495 deletions
+37 -1
View File
@@ -1,5 +1,41 @@
# Changelog
## 0.16.2 - 2026-11-18
### Fixed
- Fixed Collapse turns hiding a finished reply when Claude answers a later background task notification ([#10092](https://github.com/getpaseo/paseo/pull/10092))
- Fixed detached worktree commits getting lost when archiving a workspace ([#10009](https://github.com/getpaseo/paseo/pull/10009) by [@ragokan](https://github.com/ragokan))
- Fixed Desktop updates leaving an older daemon running when an earlier Desktop session started it ([#10067](https://github.com/getpaseo/paseo/pull/10067))
- Fixed daemons losing their Hub connection after execution permissions changed ([#10113](https://github.com/getpaseo/paseo/pull/10113))
- Fixed saved hosts disappearing when one stored entry could not be read ([#9847](https://github.com/getpaseo/paseo/pull/9847) by [@ragokan](https://github.com/ragokan))
- Fixed worktree creation timing out while scanning large ignored folders that `.worktreeinclude` does not name ([#10020](https://github.com/getpaseo/paseo/pull/10020) by [@mgranderath](https://github.com/mgranderath))
- Fixed Steer cancelling a Claude compaction in progress ([#10028](https://github.com/getpaseo/paseo/pull/10028) by [@NightMachinery](https://github.com/NightMachinery))
- Fixed agents getting stuck after a second Stop when the provider reused the cancelled turn ID ([#9774](https://github.com/getpaseo/paseo/pull/9774) by [@DAnaeto](https://github.com/DAnaeto))
- Fixed Desktop staying blank after its renderer exited unexpectedly ([#10035](https://github.com/getpaseo/paseo/pull/10035))
- Fixed failed file downloads taking over the app window on web and Desktop ([#9937](https://github.com/getpaseo/paseo/pull/9937) by [@panta82](https://github.com/panta82))
- Fixed Import Session losing its scroll position when you select Load more ([#9974](https://github.com/getpaseo/paseo/pull/9974))
- Fixed terminals failing to open when the home filesystem refuses Unix sockets, such as on AFS ([#9214](https://github.com/getpaseo/paseo/pull/9214) by [@bendavid](https://github.com/bendavid))
- Fixed timed-out Git watchers repeatedly rescanning large repositories ([#9828](https://github.com/getpaseo/paseo/pull/9828) by [@Spshulem](https://github.com/Spshulem))
- Fixed `paseo workspace create --path .` using the local daemon's directory instead of the caller's ([#10010](https://github.com/getpaseo/paseo/pull/10010))
- Fixed MCP agent status and list responses omitting background work for idle agents ([#10022](https://github.com/getpaseo/paseo/pull/10022) by [@ortschun](https://github.com/ortschun))
- Fixed the thinking selector showing an old level after OMP changes it ([#9841](https://github.com/getpaseo/paseo/pull/9841) by [@dsingal0](https://github.com/dsingal0))
## 0.16.1 - 2026-11-17
### Fixed
- Fixed Claude Bypass approving actions without a permission card when a `permissions.ask` rule or a hook that returns `ask` required one ([#9927](https://github.com/getpaseo/paseo/pull/9927))
- Fixed controls being touch-sized on a touch-screen laptop when a trackpad or mouse is its primary input ([#9909](https://github.com/getpaseo/paseo/pull/9909) by [@michaelhthomas](https://github.com/michaelhthomas))
- Fixed Claude sessions failing until `/login` when Paseo refreshed the Claude model list while Claude Code was renewing an expired access token ([#9855](https://github.com/getpaseo/paseo/pull/9855) by [@daysun-k](https://github.com/daysun-k))
- Fixed Add host text fields on web drawing without a box, which left the host password field invisible ([#9865](https://github.com/getpaseo/paseo/pull/9865) by [@angusb93](https://github.com/angusb93))
- Fixed an OpenCode question that could not be answered or dismissed after a new message steered the turn ([#9891](https://github.com/getpaseo/paseo/pull/9891))
- Fixed Pi and OMP model names that contain `/` being cut to the text after the last slash ([#9823](https://github.com/getpaseo/paseo/pull/9823), [#9836](https://github.com/getpaseo/paseo/pull/9836) by [@rms523](https://github.com/rms523))
- Fixed Changes leaving out an edit when the file was saved with the same size in the same second it was staged ([#9854](https://github.com/getpaseo/paseo/pull/9854))
- Fixed an error toast that never closed when marking a chat as read failed ([#9837](https://github.com/getpaseo/paseo/pull/9837))
- Fixed wait results and finish notifications after a daemon restart joining an agent's self-started reply to the reply before it ([#9846](https://github.com/getpaseo/paseo/pull/9846))
- Fixed Codex chats staying loaded in the daemon until restart when a client opened them only to read their history ([#9859](https://github.com/getpaseo/paseo/pull/9859) by [@Spshulem](https://github.com/Spshulem))
## 0.16.0 - 2026-11-16
- **Background tasks:** See and stop background tasks above the composer for Claude Code, Codex and OpenCode v2. ([#6220](https://github.com/getpaseo/paseo/pull/6220), [#9162](https://github.com/getpaseo/paseo/pull/9162), [#9635](https://github.com/getpaseo/paseo/pull/9635) by [@fxlelouarn](https://github.com/fxlelouarn))
@@ -8,6 +44,7 @@
- **Plugin sidebar views:** Plugins can replace the sidebar with their own workspace and agent layout across connected hosts. Choose a view per device in Settings → Sidebar. ([#8906](https://github.com/getpaseo/paseo/pull/8906))
- **Plugin composer controls:** Plugins can add composer controls, edit drafts and attachments, and change agent settings. They can also add New workspace items and save metadata on agents and workspaces. ([#8744](https://github.com/getpaseo/paseo/pull/8744), [#9209](https://github.com/getpaseo/paseo/pull/9209), [#9207](https://github.com/getpaseo/paseo/pull/9207), [#9734](https://github.com/getpaseo/paseo/pull/9734) by [@michaelmwu](https://github.com/michaelmwu))
- **Arrange Usage cards:** Drag provider cards into your preferred order and turn off cards you do not want in the sidebar summary. Choose the host from Usage settings. ([#9660](https://github.com/getpaseo/paseo/pull/9660), [#9740](https://github.com/getpaseo/paseo/pull/9740), [#9748](https://github.com/getpaseo/paseo/pull/9748), [#9780](https://github.com/getpaseo/paseo/pull/9780))
- **fx provider:** Run [fx](https://paseo.sh/docs/supported-providers/fx), the coding agent from Vercel Labs, in Paseo. Add it from the provider catalog in Settings → Hosts → Providers. ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- **Quieter app reopening:** Returning to an unchanged chat no longer flashes “Updating messages.” Paseo keeps healthy connections open and recovers dropped connections when you return. After reconnecting, an up-to-date chat no longer shows an extra update toast. ([#9242](https://github.com/getpaseo/paseo/pull/9242), [#8651](https://github.com/getpaseo/paseo/pull/8651), [#9086](https://github.com/getpaseo/paseo/pull/9086), [#8855](https://github.com/getpaseo/paseo/pull/8855), [#9116](https://github.com/getpaseo/paseo/pull/9116), [#9558](https://github.com/getpaseo/paseo/pull/9558) by [@adamcstephens](https://github.com/adamcstephens))
- **Rebuilt mobile chat:** Expanding turn summaries, todo cards and tool groups keeps your reading position on iOS and Android. Sending during a scroll moves to the new prompt. ([#8717](https://github.com/getpaseo/paseo/pull/8717), [#9085](https://github.com/getpaseo/paseo/pull/9085), [#9806](https://github.com/getpaseo/paseo/pull/9806), [#9693](https://github.com/getpaseo/paseo/pull/9693))
- **Faster diff loading:** Changes shows the file tree before file contents finish loading. Large diffs load in batches and take priority over background worktree scans. ([#8907](https://github.com/getpaseo/paseo/pull/8907), [#9241](https://github.com/getpaseo/paseo/pull/9241), [#9243](https://github.com/getpaseo/paseo/pull/9243), [#9584](https://github.com/getpaseo/paseo/pull/9584))
@@ -21,7 +58,6 @@
- Added a Change base picker for worktree diffs, commits and Git actions ([#8642](https://github.com/getpaseo/paseo/pull/8642), [#8934](https://github.com/getpaseo/paseo/pull/8934) by [@Myasuka](https://github.com/Myasuka))
- Added issue and pull request links that resolve SSH aliases and fork parent repositories ([#8636](https://github.com/getpaseo/paseo/pull/8636), [#9576](https://github.com/getpaseo/paseo/pull/9576))
- Added an iPhone Duo layout with the sidebar and workspace on opposite sides of the fold ([#8741](https://github.com/getpaseo/paseo/pull/8741), [#8901](https://github.com/getpaseo/paseo/pull/8901) by [@zeyugao](https://github.com/zeyugao))
- Added fx as a provider you can add from the provider catalog in Settings → Hosts → Providers ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- Added background agents that stay out of tabs, notifications and default agent lists ([#8683](https://github.com/getpaseo/paseo/pull/8683))
- Added syntax highlighting for Terraform and HCL files (`.tf`, `.tfvars`, `.hcl`) ([#9106](https://github.com/getpaseo/paseo/pull/9106))
- Added `PASEO_WORKSPACE_ID` to each agent's environment so an agent can identify, rename or archive its own workspace ([#8939](https://github.com/getpaseo/paseo/pull/8939) by [@DTTerastar](https://github.com/DTTerastar))
+37 -1
View File
@@ -1,5 +1,41 @@
# Changelog
## 0.16.2 - 2026-11-18
### 修复
- 修复启用“折叠轮次”时,Claude 回复后续后台任务通知导致上一条已完成的回复被折叠的问题 ([#10092](https://github.com/getpaseo/paseo/pull/10092))
- 修复归档工作区时丢失分离 HEAD 的 worktree 提交的问题 ([#10009](https://github.com/getpaseo/paseo/pull/10009),贡献者:[@ragokan](https://github.com/ragokan))
- 修复 Desktop 更新后,由上一次 Desktop 会话启动的旧版 daemon 仍在运行的问题 ([#10067](https://github.com/getpaseo/paseo/pull/10067))
- 修复更改执行权限后 daemon 与 Hub 断开连接的问题 ([#10113](https://github.com/getpaseo/paseo/pull/10113))
- 修复一条已保存的主机记录无法读取时,其他主机也消失的问题 ([#9847](https://github.com/getpaseo/paseo/pull/9847),贡献者:[@ragokan](https://github.com/ragokan))
- 修复创建 worktree 时,扫描 `.worktreeinclude` 未指定的大型忽略目录导致超时的问题 ([#10020](https://github.com/getpaseo/paseo/pull/10020),贡献者:[@mgranderath](https://github.com/mgranderath))
- 修复发送引导消息时取消 Claude 正在进行的上下文压缩的问题 ([#10028](https://github.com/getpaseo/paseo/pull/10028),贡献者:[@NightMachinery](https://github.com/NightMachinery))
- 修复 Provider 重用已取消的轮次 ID 时,再次停止导致 Agent 卡住的问题 ([#9774](https://github.com/getpaseo/paseo/pull/9774),贡献者:[@DAnaeto](https://github.com/DAnaeto))
- 修复 Desktop 渲染进程意外退出后窗口一直空白的问题 ([#10035](https://github.com/getpaseo/paseo/pull/10035))
- 修复 Web 和 Desktop 上文件下载失败时,错误页面占据应用窗口的问题 ([#9937](https://github.com/getpaseo/paseo/pull/9937),贡献者:[@panta82](https://github.com/panta82))
- 修复在“导入会话”中选择“加载更多”时丢失滚动位置的问题 ([#9974](https://github.com/getpaseo/paseo/pull/9974))
- 修复主目录所在的文件系统拒绝 Unix 套接字时无法打开终端的问题,例如 AFS ([#9214](https://github.com/getpaseo/paseo/pull/9214),贡献者:[@bendavid](https://github.com/bendavid))
- 修复 Git 监视器设置超时后反复扫描大型仓库的问题 ([#9828](https://github.com/getpaseo/paseo/pull/9828),贡献者:[@Spshulem](https://github.com/Spshulem))
- 修复 `paseo workspace create --path .` 使用本地 daemon 的目录而非命令所在目录的问题 ([#10010](https://github.com/getpaseo/paseo/pull/10010))
- 修复针对空闲 Agent 查询 MCP 状态或列表时漏报后台任务的问题 ([#10022](https://github.com/getpaseo/paseo/pull/10022),贡献者:[@ortschun](https://github.com/ortschun))
- 修复 OMP 更改思考级别后,选择器仍显示旧级别的问题 ([#9841](https://github.com/getpaseo/paseo/pull/9841),贡献者:[@dsingal0](https://github.com/dsingal0))
## 0.16.1 - 2026-11-17
### 修复
- 修复 `permissions.ask` 规则或返回 `ask` 的钩子要求确认时,Claude Bypass 不显示权限卡片就批准操作的问题 ([#9927](https://github.com/getpaseo/paseo/pull/9927))
- 修复触屏笔记本以触控板或鼠标为主要输入时,控件仍使用触控尺寸的问题 ([#9909](https://github.com/getpaseo/paseo/pull/9909),贡献者:[@michaelhthomas](https://github.com/michaelhthomas))
- 修复 Claude Code 正在续期已过期的访问令牌时,Paseo 刷新 Claude 模型列表导致 Claude 会话在执行 `/login` 前一直失败的问题 ([#9855](https://github.com/getpaseo/paseo/pull/9855),贡献者:[@daysun-k](https://github.com/daysun-k))
- 修复 Web 端“添加主机”的文本字段没有输入框,导致主机密码字段不可见的问题 ([#9865](https://github.com/getpaseo/paseo/pull/9865),贡献者:[@angusb93](https://github.com/angusb93))
- 修复新消息引导当前回合后,OpenCode 提问既无法回答也无法关闭的问题 ([#9891](https://github.com/getpaseo/paseo/pull/9891))
- 修复名称包含 `/` 的 Pi 和 OMP 模型被截成最后一个斜杠之后文本的问题 ([#9823](https://github.com/getpaseo/paseo/pull/9823), [#9836](https://github.com/getpaseo/paseo/pull/9836),贡献者:[@rms523](https://github.com/rms523))
- 修复文件暂存后在同一秒内以相同大小保存时,“更改”遗漏该修改的问题 ([#9854](https://github.com/getpaseo/paseo/pull/9854))
- 修复将对话标记为已读失败后,错误提示一直不关闭的问题 ([#9837](https://github.com/getpaseo/paseo/pull/9837))
- 修复 daemon 重启后,等待结果和完成通知把 Agent 自行开始的回复与上一条回复拼接在一起的问题 ([#9846](https://github.com/getpaseo/paseo/pull/9846))
- 修复客户端仅为读取历史而打开的 Codex 对话一直加载在 daemon 中直到重启的问题 ([#9859](https://github.com/getpaseo/paseo/pull/9859),贡献者:[@Spshulem](https://github.com/Spshulem))
## 0.16.0 - 2026-11-16
- **后台任务**:在 Composer 上方查看并停止 Claude Code、Codex 和 OpenCode v2 的后台任务。 ([#6220](https://github.com/getpaseo/paseo/pull/6220), [#9162](https://github.com/getpaseo/paseo/pull/9162), [#9635](https://github.com/getpaseo/paseo/pull/9635),贡献者:[@fxlelouarn](https://github.com/fxlelouarn))
@@ -8,6 +44,7 @@
- **插件侧边栏视图**:插件可以用自己的布局替换侧边栏,展示已连接主机上的工作区和 Agent。在“设置 → 侧边栏”中为每台设备选择视图。 ([#8906](https://github.com/getpaseo/paseo/pull/8906))
- **插件 Composer 控件**:插件可以添加 Composer 控件、编辑草稿和附件,以及更改 Agent 设置。插件还可以添加“新建工作区”条目,并在 Agent 和工作区上保存元数据。 ([#8744](https://github.com/getpaseo/paseo/pull/8744), [#9209](https://github.com/getpaseo/paseo/pull/9209), [#9207](https://github.com/getpaseo/paseo/pull/9207), [#9734](https://github.com/getpaseo/paseo/pull/9734),贡献者:[@michaelmwu](https://github.com/michaelmwu))
- **排列用量卡片**:拖动 Provider 卡片来调整顺序,并关闭不想在侧边栏摘要中显示的卡片。在用量设置中选择主机。 ([#9660](https://github.com/getpaseo/paseo/pull/9660), [#9740](https://github.com/getpaseo/paseo/pull/9740), [#9748](https://github.com/getpaseo/paseo/pull/9748), [#9780](https://github.com/getpaseo/paseo/pull/9780))
- **fx Provider**:在 Paseo 中运行 Vercel Labs 的编程 Agent [fx](https://paseo.sh/zh-CN/docs/supported-providers/fx)。在“设置 → Hosts → 提供方”的 Provider 目录中添加。 ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- **返回应用时更少提示**:返回没有变化的聊天时,不再闪现“正在更新消息”。Paseo 会保留可用的连接,并在你返回时恢复断开的连接。重连后,已是最新状态的聊天也不再显示额外的更新提示。 ([#9242](https://github.com/getpaseo/paseo/pull/9242), [#8651](https://github.com/getpaseo/paseo/pull/8651), [#9086](https://github.com/getpaseo/paseo/pull/9086), [#8855](https://github.com/getpaseo/paseo/pull/8855), [#9116](https://github.com/getpaseo/paseo/pull/9116), [#9558](https://github.com/getpaseo/paseo/pull/9558),贡献者:[@adamcstephens](https://github.com/adamcstephens))
- **重建移动端聊天**:在 iOS 和 Android 上展开轮次摘要、待办卡片和工具组时,阅读位置保持不变。滚动期间发送消息会移到新提示词处。 ([#8717](https://github.com/getpaseo/paseo/pull/8717), [#9085](https://github.com/getpaseo/paseo/pull/9085), [#9806](https://github.com/getpaseo/paseo/pull/9806), [#9693](https://github.com/getpaseo/paseo/pull/9693))
- **更快的 diff 加载**:“更改”在文件内容加载完成前先显示文件树。大型 diff 分批加载,且优先于后台 worktree 扫描。 ([#8907](https://github.com/getpaseo/paseo/pull/8907), [#9241](https://github.com/getpaseo/paseo/pull/9241), [#9243](https://github.com/getpaseo/paseo/pull/9243), [#9584](https://github.com/getpaseo/paseo/pull/9584))
@@ -21,7 +58,6 @@
- 为 worktree 的 diff、提交和 Git 操作新增基准分支选择器(Change base) ([#8642](https://github.com/getpaseo/paseo/pull/8642), [#8934](https://github.com/getpaseo/paseo/pull/8934),贡献者:[@Myasuka](https://github.com/Myasuka))
- 新增可解析 SSH 别名和 fork 上游仓库的 Issue 和 PR 链接 ([#8636](https://github.com/getpaseo/paseo/pull/8636), [#9576](https://github.com/getpaseo/paseo/pull/9576))
- 新增 iPhone Duo 布局,侧边栏和工作区分列折痕两侧 ([#8741](https://github.com/getpaseo/paseo/pull/8741), [#8901](https://github.com/getpaseo/paseo/pull/8901),贡献者:[@zeyugao](https://github.com/zeyugao))
- 新增 fx Provider,可在“设置 → Hosts → 提供方”的 Provider 目录中添加 ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- 新增后台 Agent,不占用标签页、不发送通知,也不出现在默认 Agent 列表中 ([#8683](https://github.com/getpaseo/paseo/pull/8683))
- 新增 Terraform 和 HCL 文件(`.tf`、`.tfvars`、`.hcl`)的语法高亮 ([#9106](https://github.com/getpaseo/paseo/pull/9106))
- 在每个 Agent 的环境中新增 `PASEO_WORKSPACE_ID`,Agent 可据此识别、重命名或归档自己的工作区 ([#8939](https://github.com/getpaseo/paseo/pull/8939),贡献者:[@DTTerastar](https://github.com/DTTerastar))
+6 -2
View File
@@ -91,8 +91,12 @@ You need at least one agent CLI installed and configured with your credentials:
- [GitHub Copilot](https://github.com/features/copilot/cli/)
- [OpenCode](https://github.com/anomalyco/opencode)
- [Pi](https://pi.dev)
- [Antigravity](https://paseo.sh/docs/supported-providers#antigravity)
- [Muse Code](https://paseo.sh/docs/muse-code)
- [Antigravity](https://paseo.sh/docs/supported-providers/antigravity)
- [Muse Code](https://paseo.sh/docs/supported-providers/muse-code)
- [fx](https://paseo.sh/docs/supported-providers/fx)
- [Hoplite](https://paseo.sh/docs/supported-providers/hoplite)
Paseo also runs Cursor, Gemini CLI, and many other agents. See [Supported providers](https://paseo.sh/docs/supported-providers) for the full list and setup steps.
### Desktop app (recommended)
+8
View File
@@ -121,6 +121,14 @@ from `packages/app/android`:
These check terminal arrow ownership, held-key repeats and modifiers, and ordinary text-field editing.
Run the display density regression tests the same way:
```bash
./gradlew :paseo-display-metrics:connectedDebugAndroidTest --no-daemon --max-workers=2 -Dorg.gradle.parallel=false
```
These check that React Native sizes text at the window's density when the window is on another display, such as Samsung DeX.
### Diagnostic logs without ADB
In a dogfood build, open Android's Files app → Downloads → **Paseo diagnostics** and share all
+1 -1
View File
@@ -506,5 +506,5 @@ Agent and terminal environments are unchanged. System proxy settings and SOCKS-o
## Deployment models
1. **Local daemon** (default): `paseo daemon start` on `127.0.0.1:6767`
2. **Managed desktop**: Electron uses the server package’s local-instance lifecycle capability for sanitized launch, published readiness, and captured-PID stop. Only a matching `{pid, startedAt}` from a spawn in the current Desktop session authorizes automatic stop or binary replacement. Preexisting instances, including legacy `desktopManaged` records, are attach-only. Keep-running survivors attach in the next session. Explicit attached Stop requires a confirmation naming the captured home/PID. Ordinary Restart uses the worker RPC on every app platform.
2. **Managed desktop**: Electron uses the server package’s local-instance lifecycle capability for sanitized launch, published readiness, and captured-PID stop. Only Desktop's own launch writes `desktopManaged: true` to `paseo.pid`. The CLI launch path removes the flag. While Desktop manages the built-in daemon, an app update or a version mismatch replaces any `desktopManaged` daemon, including one that an earlier Desktop session left running. Bundled CLIs before v0.9.0 exported the flag, so a daemon that one of them started also carries it and is replaced. Quit, Settings, and host removal stop only a daemon that the current session launched, matched by `{pid, startedAt}`. A daemon that the user started through the CLI is attach-only. Explicit attached Stop requires a confirmation naming the captured home/PID. Ordinary Restart uses the worker RPC on every app platform.
3. **Remote + relay**: Daemon behind firewall, relay bridges with E2E encryption
+4 -1
View File
@@ -117,7 +117,10 @@ There is no renderer prep/restore handshake or lifetime background-throttling ov
Screenshot capture temporarily enables frame production inside the shared serialized queue,
restores the previous throttling policy on success or failure, and retains a 5-second capture budget.
The browser tool takes one viewport frame through Electron's frame subscription and releases the
subscription on completion or cancellation. A resized resident guest can produce fresh pixels
subscription on completion or cancellation. Guest pages have a transparent base background, so a page
that has painted nothing yet (a dev server hiding `body` until its JS boots) produces frames where
every pixel is transparent. Both screenshot paths skip those frames and return `screenshot_no_frame`
when the capture budget expires without a painted one. A resized resident guest can produce fresh pixels
while `capturePage()` leaves its surface-copy request pending; waiting for animation frames or
retrying the copy does not repair that state. Full-page screenshots retain the CDP path with layout
metrics and screenshot clip.
+1 -1
View File
@@ -76,7 +76,7 @@ Dense toolbar rows, such as the composer's, are the exception to the 44pt contro
In the composer, the first glyph's ink starts on the text column's edge, and the trailing control is always a disc, so the row does not shift as it changes between voice mode, send and stop. The disc nests into the corner, as far from the right edge as from the bottom, and touch-sized the composer's corner radius is concentric with it (`packages/app/src/composer/input/toolbar-rails.ts`). Touch-sized the disc keeps a 6pt clearance from its neighbour, because it is always painted and a pressed neighbour would merge with it. The attach button sits 2pt closer to the picker than its highlight would put it: the plus is all thin arms, so the full gap reads wide. That offset is set by eye.
One gate, `resolveControlSizing`, picks touch or pointer sizing: touch when the layout is compact or the device has a touch screen. An iPad with the sidebar docked is wide and touch-sized; a desktop is pointer-sized; a phone is both compact and touch. The touch-screen fact is read once at startup (`hasTouchScreen` in `hooks/use-fine-pointer.ts`), so attaching a mouse or keyboard to a tablet never shrinks its controls. 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.
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.
+4 -2
View File
@@ -99,8 +99,10 @@ Register the adapter in `defaultForgeRegistry` with:
Current change-request lookup matches the branch and repository for both open and
terminal requests. Prefer an open request, then a terminal request at the local
HEAD, then the most recently updated terminal request. A reused branch can show
its previous request until a new one opens. Auto-archive separately requires an
HEAD, then the most recently updated terminal request. When the forge identifies
the checkout's branch as the origin repository's default branch, only open
requests are eligible. A reused feature branch can show its previous request
until a new one opens. Auto-archive separately requires an
observed open-to-merged transition and a fresh exact match between checkout HEAD
and the PR head, along with the existing workspace safety checks.
+1 -1
View File
@@ -24,7 +24,7 @@ Math and video are disabled. Task lists and admonitions are enabled; task checkb
Mermaid fences use the existing isolated diagram runtime and fullscreen viewer. Web dispatches them through the library’s code-block override. Native has no block-renderer hook, so the renderer extracts only Mermaid fences and places the existing WebView host between library-rendered segments. This is the only block exception; see [native selection limitations](native-text-selection.md) for diagram grouping and leading inline images. Streaming keeps the last valid diagram visible while the next revision renders.
Native code blocks use the library's copy control and compiled grammars. Web code blocks use `HighlightedCodeBlock` through the library's `renderers.codeBlock` override. The patch also keeps the library's block spacing around the web code block override, preserves web list numbering and link titles, marks pending parses with `aria-busy` so Find waits for rendered text, and carries link syntax through native and web tap events. Web inline code inside a link inherits only the link colour; its code font, size and background stay intact. Keep link variants colour-only: native pills replace text runs and prevent paths from wrapping; Android pills also use the surrounding block’s font size. The package patch is tracked by [upstream PR #997](https://github.com/software-mansion/enriched-markdown/pull/997); remove the patch when the pinned release includes it.
Native code blocks use the library's copy control and compiled grammars. Web code blocks use `HighlightedCodeBlock` through the library's `renderers.codeBlock` override. Selection copy has to tell links Paseo recognized in the text (paths, forge references, code spans) from links in the Markdown, so the web link renderer marks the recognized ones. Plain-text paste carries them as the text the reply showed, and rich paste keeps them as links only when they point to an `http` or `https` URL. Authored links and parser autolinks such as a bare `www.example.com` copy as links. The patch also keeps the library's block spacing around the web code block override, preserves web list numbering and link titles, marks pending parses with `aria-busy` so Find waits for rendered text, and carries link syntax through native and web tap events. Web inline code inside a link inherits only the link colour; its code font, size and background stay intact. Keep link variants colour-only: native pills replace text runs and prevent paths from wrapping; Android pills also use the surrounding block’s font size. The package patch is tracked by [upstream PR #997](https://github.com/software-mansion/enriched-markdown/pull/997); remove the patch when the pinned release includes it.
The package patch also keeps overflowing native horizontal blocks in control of their drags: Android claims parent interception at touch-down and releases it for vertical drags so the chat list can scroll; iOS keeps its scroll recognizer active for outward drags at the leading edge. This prevents compact sidebar pans from taking block scrolling without changing sidebar swipes on prose or non-overflowing blocks. Native changes require a client rebuild.
+15
View File
@@ -49,6 +49,21 @@ restarting the process. It writes snapshots and native failure state under
production package. This needs a native rebuild when the Unistyles patch changes; a Metro
reload cannot update it.
To check the first Android composer tap after pinch-to-zoom, install the rebuilt
APK and connect it to a chat whose latest assistant message contains a visible
Markdown image. For example, put `picture.png` in the agent workspace and have
the assistant reply with `![Test image](picture.png)`. Set `CHAT_URL` to the
chat's Paseo deep link and run from the repository root:
```bash
agent-device test packages/app/e2e/mobile/composer-keyboard/lightbox-pinch.android.ad \
--platform android --serial emulator-5554 -e APP_ID=sh.paseo -e "CHAT_URL=$CHAT_URL"
```
Use `APP_ID=sh.paseo.debug` for a development build. If the image has different
alt text, pass it with `-e IMAGE_LABEL="..."`. The test pinches the image, closes
it, types in the composer, and checks that a single Attach tap opens Upload file.
For Android keyboard continuity, run the current checkout in the app, open an idle terminal
with an empty prompt, hide its keyboard, and run:
+1 -1
View File
@@ -129,7 +129,7 @@ availability and a diagnostic after the daemon resolves the executable. Configur
environment, or enablement overrides under `agents.providers.muse`. Omit `extends` to keep
the bundled integration; an entry with `extends` shadows it with a custom provider. See
[provider contributions](#contribute-a-provider) for the contract and
[Muse Code](../public-docs/muse-code.md) for setup, per-agent options, and version limitations.
[Muse Code](../public-docs/supported-providers/muse-code.md) for setup, per-agent options, and version limitations.
## Install from a registry
+4 -4
View File
@@ -19,8 +19,8 @@ provider icon map. You do not need a core manifest entry or provider factory.
| Provider | Transport | Setup and limitations |
| ----------- | ------------------------------------------ | ---------------------------------------------------------------- |
| Antigravity | Installed `agy` CLI | [Antigravity](../public-docs/supported-providers.md#antigravity) |
| Muse Code | MSP over one `muse serve` host per session | [Muse Code](../public-docs/muse-code.md) |
| Antigravity | Installed `agy` CLI | [Antigravity](../public-docs/supported-providers/antigravity.md) |
| Muse Code | MSP over one `muse serve` host per session | [Muse Code](../public-docs/supported-providers/muse-code.md) |
## Provider-native session options
@@ -50,8 +50,8 @@ or without a control.
reject. A key the running session cannot apply (one the provider reads only when it opens) is
rejected too, so a stored option always describes what runs. Claude reads most options when it
starts its query, and replacing a started query would end its background work, so after the
first prompt only Fast can change. Codex fixes its approval policy and sandbox when the thread
starts, so it applies only `service_tier` and `plan_mode` live. A session with no
first prompt only Fast and Ultracode can change. Codex fixes its approval policy and sandbox
when the thread starts, so it applies only `service_tier` and `plan_mode` live. A session with no
`applyOptions` rejects every patch; the daemon enforces this. The provider returns the options
it ended up with when they differ from the request. The daemon stores the patch and that
result in one step after the call resolves. Throwing rejects the whole patch and none of it is
+11 -3
View File
@@ -49,9 +49,17 @@ Large unbounded timeline responses can exceed relay frame limits, so catch-up us
Page limits are projected-item targets. A tool call lifecycle is one projected item even if it spans many source sequence numbers, and assistant/reasoning chunks are merged before counting. The response carries `seqStart`, `seqEnd`, `sourceSeqRanges`, and `collapsed` so clients can advance sequence cursors without rendering delta rows.
When live delivery detects a sequence gap, the app fetches `direction: "after"`. If the daemon
responds with `hasNewer: true`, the app immediately fetches the next page from `endCursor`. Gap
recovery is complete only when `hasNewer: false`.
When live delivery detects a sequence gap, the app fetches `direction: "after"` its end cursor. If
the daemon responds with `hasNewer: true`, the app immediately fetches the next page from
`endCursor`. Gap recovery is complete only when `hasNewer: false`.
A chat that was empty when it last caught up has no end cursor to compare a live row against. Such a
row starts coverage only if it is the epoch's first row, seq 1. A later row means the chat missed the
rows before it, such as a prompt sent while the app was offline, so the app drops it and recovers
after seq 0. Coverage started at that later row would make the resume page look already applied, and
the chat and its replica cache would keep only the end of the reply. A recovery that waits behind a
running catch-up starts after whatever that catch-up applied, because the app applies a forward page
row by row and an older cursor repeats rows.
Initialization timeouts guard lack of catch-up progress, not the full multi-page sync. A successful page that queues the next `after` page refreshes the watchdog.
@@ -0,0 +1,6 @@
Fixed
- Fixed Claude Bypass approving actions without a permission card when a permissions.ask rule or a hook that returns ask required one
- Fixed controls being touch-sized on a touch-screen laptop when a trackpad or mouse is its primary input
- Fixed Claude sessions failing until /login when Paseo refreshed the Claude model list while Claude Code was renewing an expired access token
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,6 @@
Fixed
- Fixed Claude Bypass approving actions without a permission card when a permissions.ask rule or a hook that returns ask required one
- Fixed controls being touch-sized on a touch-screen laptop when a trackpad or mouse is its primary input
- Fixed Claude sessions failing until /login when Paseo refreshed the Claude model list while Claude Code was renewing an expired access token
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,6 @@
Fixed
- Fixed Claude Bypass approving actions without a permission card when a permissions.ask rule or a hook that returns ask required one
- Fixed controls being touch-sized on a touch-screen laptop when a trackpad or mouse is its primary input
- Fixed Claude sessions failing until /login when Paseo refreshed the Claude model list while Claude Code was renewing an expired access token
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,6 @@
Fixed
- Fixed Claude Bypass approving actions without a permission card when a permissions.ask rule or a hook that returns ask required one
- Fixed controls being touch-sized on a touch-screen laptop when a trackpad or mouse is its primary input
- Fixed Claude sessions failing until /login when Paseo refreshed the Claude model list while Claude Code was renewing an expired access token
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,8 @@
Fixed
- Fixed Collapse turns hiding a finished reply when Claude answers a later background task notification
- Fixed detached worktree commits getting lost when archiving a workspace
- Fixed Desktop updates leaving an older daemon running when an earlier Desktop session started it
- Fixed daemons losing their Hub connection after execution permissions changed
- Fixed saved hosts disappearing when one stored entry could not be read
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,8 @@
Fixed
- Fixed Collapse turns hiding a finished reply when Claude answers a later background task notification
- Fixed detached worktree commits getting lost when archiving a workspace
- Fixed Desktop updates leaving an older daemon running when an earlier Desktop session started it
- Fixed daemons losing their Hub connection after execution permissions changed
- Fixed saved hosts disappearing when one stored entry could not be read
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,8 @@
Fixed
- Fixed Collapse turns hiding a finished reply when Claude answers a later background task notification
- Fixed detached worktree commits getting lost when archiving a workspace
- Fixed Desktop updates leaving an older daemon running when an earlier Desktop session started it
- Fixed daemons losing their Hub connection after execution permissions changed
- Fixed saved hosts disappearing when one stored entry could not be read
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,8 @@
Fixed
- Fixed Collapse turns hiding a finished reply when Claude answers a later background task notification
- Fixed detached worktree commits getting lost when archiving a workspace
- Fixed Desktop updates leaving an older daemon running when an earlier Desktop session started it
- Fixed daemons losing their Hub connection after execution permissions changed
- Fixed saved hosts disappearing when one stored entry could not be read
Full notes: https://paseo.sh/changelog
+1 -1
View File
@@ -1 +1 @@
sha256-alhf4ULeJ7n8sfgnxsX8Ugw40GB7jz0u9R/3/MOveIw=
sha256-yLTaVMgu3tc/dgngJ7RP0htJcWE0ZtQ4mouypevyv0s=
+65 -65
View File
@@ -1,12 +1,12 @@
{
"name": "paseo",
"version": "0.16.0",
"version": "0.16.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "paseo",
"version": "0.16.0",
"version": "0.16.2",
"hasInstallScript": true,
"license": "Apache-2.0",
"workspaces": [
@@ -130,22 +130,22 @@
}
},
"node_modules/@anthropic-ai/claude-agent-sdk": {
"version": "0.3.246",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk/-/claude-agent-sdk-0.3.246.tgz",
"integrity": "sha512-FtR0HoHHNqeqJWjZN8qLUAzZVFUI9ztXYNPPwv98Ecmv9qq2QTauI8IzkY26CC0mleWAqb9RQEW2C0OtiUliug==",
"version": "0.3.326",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk/-/claude-agent-sdk-0.3.326.tgz",
"integrity": "sha512-BUTSky/4YWfL/MxC+4kV0NDbJFjbJPoQMFEk/s9G6hV9LUfYPMbsWz94bFQ7ZIo2ubj2xwJ2c2NVxkNlQhVw+Q==",
"license": "SEE LICENSE IN README.md",
"engines": {
"node": ">=18.0.0"
"node": ">=18.14.0"
},
"optionalDependencies": {
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.246",
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.246",
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.246",
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.246",
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.246",
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.246",
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.246",
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.246"
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.326",
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.326",
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.326",
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.326",
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.326",
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.326",
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.326",
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.326"
},
"peerDependencies": {
"@anthropic-ai/sdk": ">=0.93.0",
@@ -154,9 +154,9 @@
}
},
"node_modules/@anthropic-ai/claude-agent-sdk-darwin-arm64": {
"version": "0.3.246",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-arm64/-/claude-agent-sdk-darwin-arm64-0.3.246.tgz",
"integrity": "sha512-pYDv2RT+UVOvEapMEWKf7Gm5a87Si1Zf+XR23IMGYbG5mESatNJ8Gz2PmkrwfTezZknb0ljWZe8zgcTFITM3dA==",
"version": "0.3.326",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-arm64/-/claude-agent-sdk-darwin-arm64-0.3.326.tgz",
"integrity": "sha512-D3ZbowCMdKNet0YPZlsJxdJUW1t1Q8KLy1BwNd+5eilf18TlCRtWZlm8DrewFLmu/gxBK7gcsq6uysrIVbPyQg==",
"cpu": [
"arm64"
],
@@ -167,9 +167,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-darwin-x64": {
"version": "0.3.246",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-x64/-/claude-agent-sdk-darwin-x64-0.3.246.tgz",
"integrity": "sha512-yl+gMMFUQ8++SBaxUe2JxBqU0LOJO4HZTsWWTOrH5kRlTRhdQDF/lESsoNXCHgfF/+77YNKgef0h+rl/D12Jfg==",
"version": "0.3.326",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-x64/-/claude-agent-sdk-darwin-x64-0.3.326.tgz",
"integrity": "sha512-m8K3Im2S8STdAVBrriuDZyJcnjsu/Vc3476wIOqTAefnCCdtdZ4AHcOcWxt+4KIHE5Vx1qT2qacTRrQBaVVweA==",
"cpu": [
"x64"
],
@@ -180,9 +180,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-linux-arm64": {
"version": "0.3.246",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64/-/claude-agent-sdk-linux-arm64-0.3.246.tgz",
"integrity": "sha512-t7AEewD7bcjZYMmrfFLjsUSxPo4z+5J5O5cC9V2zOvAhNkefdMeGWI2/1cdqZxuaOiFVt46byjlZuiNNunF+bQ==",
"version": "0.3.326",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64/-/claude-agent-sdk-linux-arm64-0.3.326.tgz",
"integrity": "sha512-nYVN8jCcH490DCXIvby7rllzQFxLzKeKClfo2u/yv7mx3ipZQv344caULL/amwZ8w8GUzYyZ8hnS6pI9goSq+A==",
"cpu": [
"arm64"
],
@@ -193,9 +193,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-linux-arm64-musl": {
"version": "0.3.246",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64-musl/-/claude-agent-sdk-linux-arm64-musl-0.3.246.tgz",
"integrity": "sha512-AeiDXveuA9dVRDouSRiQzL40P3dOuJPfZOlwwsFNbVUN0D+06WtwgmeWYnyRG4dxsM67Pf4lYcRZ0x9pfEZUwQ==",
"version": "0.3.326",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64-musl/-/claude-agent-sdk-linux-arm64-musl-0.3.326.tgz",
"integrity": "sha512-baSsuP2/wuWujRpHjKT4WkJB5lhttqKq9jcTfY2KRtQpylbk8E5PWcct/pmwJfNCKIUoE8CD+JpmoWzsdd5Ajw==",
"cpu": [
"arm64"
],
@@ -206,9 +206,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-linux-x64": {
"version": "0.3.246",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64/-/claude-agent-sdk-linux-x64-0.3.246.tgz",
"integrity": "sha512-BIbBlJ6x7Cys6UFvahUfce26H+U+Q4tLWjKRD39AaV7JvRav8/vfdFytzWq6E+h9hT1OOWYuPYx2gMn5vDhZhQ==",
"version": "0.3.326",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64/-/claude-agent-sdk-linux-x64-0.3.326.tgz",
"integrity": "sha512-WMhDY07gk2O0E8FXTbrVYmPjSLFaYPDCPwsNueVxm6vZ7ek+lPaKuOMAxTb1K07TzSmTOexoWeX2Y9VrbVDMpw==",
"cpu": [
"x64"
],
@@ -219,9 +219,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-linux-x64-musl": {
"version": "0.3.246",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64-musl/-/claude-agent-sdk-linux-x64-musl-0.3.246.tgz",
"integrity": "sha512-+3PrWX3qXgakO3tZImr7keKFry5XIkbHBEaUxgi3/RtPmxGwS+JdVAr0xxzOoC2F6Y66Kn0lUnztRnZHORBc+Q==",
"version": "0.3.326",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64-musl/-/claude-agent-sdk-linux-x64-musl-0.3.326.tgz",
"integrity": "sha512-kK9VO3uFqNd4wgeU0Cefluam5AdPu6mvF1nn6aboGy8TA5NoxlWTmA4/AwMhK39zK1S9Q2OjeX0JtAahYlIchw==",
"cpu": [
"x64"
],
@@ -232,9 +232,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-win32-arm64": {
"version": "0.3.246",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-arm64/-/claude-agent-sdk-win32-arm64-0.3.246.tgz",
"integrity": "sha512-JV8b28OJ8d+EMVEVIWlN3aEkT8uSehO3ZN/PJzXFG7Jgn56oVYUew4aY9vK4jao/4E4mdfzvs358w4HcTBUzVw==",
"version": "0.3.326",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-arm64/-/claude-agent-sdk-win32-arm64-0.3.326.tgz",
"integrity": "sha512-S+Ai+HhGRVFfTDmYWRfTrdWF3b4KMsfLSThZCqRJ0WCOKOXrRShMKV1hqqHBljx/wkMDPCpY0V/9S/e6w57eGQ==",
"cpu": [
"arm64"
],
@@ -245,9 +245,9 @@
]
},
"node_modules/@anthropic-ai/claude-agent-sdk-win32-x64": {
"version": "0.3.246",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-x64/-/claude-agent-sdk-win32-x64-0.3.246.tgz",
"integrity": "sha512-omI65bYGynLpE1Ybijk56K1wBnt0H6WujNwlg1LzIdeHrYmpUxoqncK92xKH5kb9XWUz3byHqArbv7wsT+M/2A==",
"version": "0.3.326",
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-x64/-/claude-agent-sdk-win32-x64-0.3.326.tgz",
"integrity": "sha512-Yn1gZXYFuHmjHz7SpHx4TqDcRDsC8TfwWcntJdYjFzMWm+caPAp6QRqr/aTvirjqVA1D+D8Rd29xhuytpE3xTQ==",
"cpu": [
"x64"
],
@@ -37468,7 +37468,7 @@
},
"packages/app": {
"name": "@getpaseo/app",
"version": "0.16.0",
"version": "0.16.2",
"dependencies": {
"@codemirror/commands": "6.10.4",
"@codemirror/language": "6.12.4",
@@ -39637,13 +39637,13 @@
},
"packages/cli": {
"name": "@getpaseo/cli",
"version": "0.16.0",
"version": "0.16.2",
"license": "Apache-2.0",
"dependencies": {
"@clack/prompts": "^1.0.0",
"@getpaseo/client": "0.16.0",
"@getpaseo/protocol": "0.16.0",
"@getpaseo/server": "0.16.0",
"@getpaseo/client": "0.16.2",
"@getpaseo/protocol": "0.16.2",
"@getpaseo/server": "0.16.2",
"chalk": "^5.3.0",
"commander": "^12.0.0",
"mime-types": "^2.1.35",
@@ -39890,11 +39890,11 @@
},
"packages/client": {
"name": "@getpaseo/client",
"version": "0.16.0",
"version": "0.16.2",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/protocol": "0.16.0",
"@getpaseo/relay": "0.16.0",
"@getpaseo/protocol": "0.16.2",
"@getpaseo/relay": "0.16.2",
"ws": "^8.20.0",
"zod": "^4.4.3"
},
@@ -39906,7 +39906,7 @@
},
"packages/desktop": {
"name": "@getpaseo/desktop",
"version": "0.16.0",
"version": "0.16.2",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/cli": "*",
@@ -40149,7 +40149,7 @@
},
"packages/expo-two-way-audio": {
"name": "@getpaseo/expo-two-way-audio",
"version": "0.16.0",
"version": "0.16.2",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.5.14",
@@ -40195,7 +40195,7 @@
},
"packages/highlight": {
"name": "@getpaseo/highlight",
"version": "0.16.0",
"version": "0.16.2",
"license": "Apache-2.0",
"dependencies": {
"@codemirror/language": "6.12.4",
@@ -40225,7 +40225,7 @@
},
"packages/plugin": {
"name": "@getpaseo/plugin",
"version": "0.16.0",
"version": "0.16.2",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^1.4.0",
@@ -40233,8 +40233,8 @@
"use-sync-external-store": "^1.6.0"
},
"devDependencies": {
"@getpaseo/client": "0.16.0",
"@getpaseo/protocol": "0.16.0",
"@getpaseo/client": "0.16.2",
"@getpaseo/protocol": "0.16.2",
"@types/node": "^20.9.0",
"@types/react": "~19.2.0",
"react": "19.2.3",
@@ -40244,8 +40244,8 @@
"zod": "^4.4.3"
},
"peerDependencies": {
"@getpaseo/client": "0.16.0",
"@getpaseo/protocol": "0.16.0",
"@getpaseo/client": "0.16.2",
"@getpaseo/protocol": "0.16.2",
"react": ">=19.1.0 <20",
"react-native": ">=0.81.5",
"zod": "^4.4.3"
@@ -40267,7 +40267,7 @@
},
"packages/protocol": {
"name": "@getpaseo/protocol",
"version": "0.16.0",
"version": "0.16.2",
"license": "Apache-2.0",
"dependencies": {
"semver": "^7.8.5",
@@ -40295,7 +40295,7 @@
},
"packages/relay": {
"name": "@getpaseo/relay",
"version": "0.16.0",
"version": "0.16.2",
"license": "Apache-2.0",
"dependencies": {
"@noble/ciphers": "^2.4.0",
@@ -40517,17 +40517,17 @@
},
"packages/server": {
"name": "@getpaseo/server",
"version": "0.16.0",
"version": "0.16.2",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^0.17.1",
"@anthropic-ai/claude-agent-sdk": "0.3.246",
"@anthropic-ai/claude-agent-sdk": "0.3.326",
"@anthropic-ai/sdk": "^0.104.2",
"@getpaseo/client": "0.16.0",
"@getpaseo/highlight": "0.16.0",
"@getpaseo/plugin": "0.16.0",
"@getpaseo/protocol": "0.16.0",
"@getpaseo/relay": "0.16.0",
"@getpaseo/client": "0.16.2",
"@getpaseo/highlight": "0.16.2",
"@getpaseo/plugin": "0.16.2",
"@getpaseo/protocol": "0.16.2",
"@getpaseo/relay": "0.16.2",
"@isaacs/ttlcache": "^2.1.4",
"@modelcontextprotocol/sdk": "1.29.0",
"@opencode-ai/sdk": "1.14.46",
@@ -41474,7 +41474,7 @@
},
"packages/website": {
"name": "@getpaseo/website",
"version": "0.16.0",
"version": "0.16.2",
"dependencies": {
"@cloudflare/vite-plugin": "^1.29.1",
"@cloudflare/workers-types": "^4.20260317.1",
@@ -43084,7 +43084,7 @@
},
"plugins": {
"name": "@getpaseo/builtin-plugins",
"version": "0.16.0",
"version": "0.16.2",
"dependencies": {
"@getpaseo/plugin": "*",
"zod": "^4.4.3"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "paseo",
"version": "0.16.0",
"version": "0.16.2",
"private": true,
"description": "Paseo: voice-controlled development environment for local AI coding agents",
"keywords": [
+2
View File
@@ -7,6 +7,7 @@ const withAndroidProfileable = require("./plugins/with-android-profileable");
const withFdroidAutolinking = require("./plugins/with-fdroid-autolinking");
const withPasteInput = require("./plugins/with-paste-input");
const withAndroidScroll = require("./modules/paseo-scroll/app.plugin");
const withAndroidDisplayMetrics = require("./modules/paseo-display-metrics/app.plugin");
const { getNativeReleaseVersion } = require("./native-release-version");
const appVariant = process.env.APP_VARIANT ?? "production";
const isFdroidBuild = process.env.PASEO_FDROID_BUILD === "1";
@@ -146,6 +147,7 @@ export default {
"expo-router",
withPasteInput,
withAndroidScroll,
withAndroidDisplayMetrics,
[withAndroidAsyncStorageSize, 64],
...buildProfile.cameraPlugins,
withAndroidOptionalCamera,
@@ -527,7 +527,17 @@ async function expectHiddenStreamingSubmissionOrderAfterWorkspaceEviction(
expect(gate.getClientRequestCount("agent.timeline.set_subscription.request")).toBe(
subscriptionRequests,
);
const requestsBeforeRelease = rememberTimelineRequestCounts(gate, target.agentId);
gate.releaseHeldAgentStreamEvent("turn_started");
// The chat never saw the hidden prompt's live row, so the reply's first row is a gap.
// The chat recovers the missing rows once, while its workspace is still evicted.
await expect
.poll(() => gate.getTimelineRequestCount("after", target.agentId))
.toBe(requestsBeforeRelease.after + 1);
await gate.waitForServerMessage(
"fetch_agent_timeline_response",
gate.getClientRequestCount("fetch_agent_timeline_request"),
);
const requestsBeforeReturn = rememberTimelineRequestCounts(gate, target.agentId);
await waitForWorkspaceInSidebar(page, {
serverId: getServerId(),
@@ -14,6 +14,8 @@ import {
answerFreshnessCheck,
commitTimelineTurnsWhileDisconnected,
disconnectViewedTimeline,
expectEmptyChatSynced,
expectPromptAndWholeReply,
expectResumeAnsweredWithoutFetch,
expectResumeOverflowFallsBackToOneTail,
hideTabAndReturn,
@@ -22,7 +24,11 @@ import {
restoreUnchangedViewedTimeline,
restoreViewedTimelineHoldingCatchUp,
restoreViewedTimelineWithHeldResponse,
restoreViewedTimelineWithLiveRowsFirst,
reopenWithFreshnessCheckUnanswered,
seedStreamingReplyAgent,
sendPromptWhileDisconnected,
stopStreamingReply,
waitForResumeAnswer,
reopenAppWatchingForUpdatingToast,
watchForUpdatingToast,
@@ -147,4 +153,27 @@ test.describe("Agent timeline resume", () => {
await agent.cleanup();
}
});
test("an empty chat that reconnects mid-reply keeps the prompt and the whole reply", async ({
page,
}) => {
test.setTimeout(120_000);
const gate = await installDaemonWebSocketGate(page);
const agent = await seedStreamingReplyAgent();
try {
await openAgentTimeline(page, agent);
await expectEmptyChatSynced(page, gate);
await disconnectViewedTimeline(page, gate);
await sendPromptWhileDisconnected(agent);
await restoreViewedTimelineWithLiveRowsFirst(gate);
const reply = await stopStreamingReply(agent);
await expectPromptAndWholeReply(page, agent, reply);
await page.reload();
await expectPromptAndWholeReply(page, agent, reply);
} finally {
gate.restore();
await agent.cleanup();
}
});
});
@@ -72,14 +72,12 @@ const ASSISTANT_MARKDOWN = [
"| Current \\| active | ~~obsolete~~ | ready |",
].join("\n");
const EXPECTED_WHOLE_SELECTION_MARKDOWN = ASSISTANT_MARKDOWN.replace(
// text/plain carries the selection as displayed, so an inline code span the renderer
// linked copies without its destination.
const EXPECTED_WHOLE_SELECTION_TEXT = ASSISTANT_MARKDOWN.replace(
"www.example.com stays",
"[www.example.com](http://www.example.com) stays",
)
.replace(
"`https://example.com/generated` stays",
"[`https://example.com/generated`](https://example.com/generated) stays",
)
.replace(`${CROSS_STRUCTURE_MARKDOWN}\n\n`, "")
.replace(
"<https://autolink.example.com>",
@@ -422,7 +420,7 @@ test("copying an assistant selection preserves Markdown structure and links", as
await copySelection(page);
const clipboard = await readRichClipboard(page);
expect(clipboard.plainText).toBe(EXPECTED_WHOLE_SELECTION_MARKDOWN);
expect(clipboard.plainText).toBe(EXPECTED_WHOLE_SELECTION_TEXT);
expect(clipboard.html).not.toContain("<ul>");
expect(clipboard.html).not.toContain("<li>");
expect(clipboard.html).toContain("<div>- ");
@@ -688,6 +686,77 @@ test("copying an assistant selection preserves Markdown structure and links", as
}
});
test("pasting an assistant selection preserves literal underscores and authored links", async ({
context,
page,
}) => {
const agent = await seedMockAgentWorkspace({
repoPrefix: "assistant-selection-paste-",
title: "Assistant selection paste",
initialPrompt: "Render the paste fixture.",
featureValues: {
mockAssistantResponse:
"Keep \\_literal\\_ and `https://example.com/generated` beside [the docs](https://example.com/docs).",
},
});
try {
await allowRichClipboard(context);
await agent.client.waitForAgentUpsert(
agent.agentId,
(snapshot) => snapshot.status === "idle",
30_000,
);
await openAgentRoute(page, agent);
const message = assistantMessageBlocks(page);
await expect(message.locator('a[href="https://example.com/generated"]')).toHaveText(
"https://example.com/generated",
);
await selectAssistantTextRange(page, "Keep _literal_", "the docs.");
await copySelection(page);
await page.evaluate(() => {
const fields = document.createElement("div");
fields.style.cssText =
"position: fixed; bottom: 0; left: 0; z-index: 10000; background: white";
const plainText = document.createElement("textarea");
plainText.setAttribute("aria-label", "Plain text paste");
const richText = document.createElement("div");
richText.contentEditable = "true";
richText.setAttribute("role", "textbox");
richText.setAttribute("aria-label", "Rich text paste");
fields.append(plainText, richText);
document.body.append(fields);
});
const plainText = page.getByRole("textbox", { name: "Plain text paste" });
await plainText.focus();
await page.keyboard.press("ControlOrMeta+v");
await expect(plainText).toHaveValue(
"Keep _literal_ and `https://example.com/generated` beside [the docs](https://example.com/docs).",
);
const richText = page.getByRole("textbox", { name: "Rich text paste" });
await richText.focus();
await page.keyboard.press("ControlOrMeta+v");
await expect(richText).toHaveText(
"Keep _literal_ and https://example.com/generated beside the docs.",
);
await expect(richText.locator("code")).toHaveText("https://example.com/generated");
await expect(richText.getByRole("link")).toHaveCount(2);
await expect(
richText.getByRole("link", { name: "https://example.com/generated" }),
).toHaveAttribute("href", "https://example.com/generated");
await expect(richText.getByRole("link", { name: "the docs" })).toHaveAttribute(
"href",
"https://example.com/docs",
);
} finally {
await agent.cleanup();
}
});
test("copying a selection across an assistant image keeps its Markdown source and alt text", async ({
context,
page,
@@ -466,12 +466,12 @@ test("downloads a file over direct TCP with its original filename and bytes", as
await gotoWorkspace(page, workspace.workspaceId);
await openFileExplorer(page);
const daemonRequest = page.waitForRequest("**/api/files/download?*");
const downloaded = await downloadFileFromExplorer(page, fileName);
const url = new URL(downloaded.url());
expect(url.protocol).toBe("http:");
expect(url.port).toBe(getE2EDaemonPort());
expect(url.pathname).toBe("/api/files/download");
expect(url.searchParams.get("token")).toBeTruthy();
const requestUrl = new URL((await daemonRequest).url());
expect(requestUrl.port).toBe(getE2EDaemonPort());
expect(requestUrl.searchParams.get("token")).toBeTruthy();
expect(new URL(downloaded.url()).protocol).toBe("blob:");
expect(downloaded.suggestedFilename()).toBe(fileName);
const savedFile = testInfo.outputPath(fileName);
await downloaded.saveAs(savedFile);
@@ -479,6 +479,45 @@ test("downloads a file over direct TCP with its original filename and bytes", as
expect(await readFile(savedFile)).toEqual(source);
});
test("keeps the app open and shows the error when the host rejects a download", async ({
page,
}, testInfo) => {
const fileName = "removed-during-download.bin";
const filePath = path.join(workspace.workspaceDirectory, fileName);
const source = Buffer.from([0, 1, 2, 255]);
await writeFile(filePath, source);
await gotoWorkspace(page, workspace.workspaceId);
await openFileExplorer(page);
const workspaceUrl = page.url();
// The file disappears after the token is issued, so the real daemon answers 404.
await page.route(
"**/api/files/download?*",
async (route) => {
await rm(filePath);
await route.continue();
},
{ times: 1 },
);
await page
.getByTestId("file-explorer-tree-scroll")
.getByText(fileName, { exact: true })
.click({ button: "right" });
await page.getByRole("menuitem", { name: "Download", exact: true }).click();
await expect(
page.getByText("Failed to download file (HTTP 404).", { exact: true }),
).toBeVisible();
expect(page.url()).toBe(workspaceUrl);
await writeFile(filePath, source);
const downloaded = await downloadFileFromExplorer(page, fileName);
const savedFile = testInfo.outputPath(fileName);
await downloaded.saveAs(savedFile);
expect(await readFile(savedFile)).toEqual(source);
expect(page.url()).toBe(workspaceUrl);
});
test("downloads an unsupported binary from its preview with original filename and bytes", async ({
page,
}, testInfo) => {
@@ -362,6 +362,16 @@ test.describe("Plugin sidebar items", () => {
});
});
test("a plugin screen reads workspaces through the state hooks", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
await expect(headerRow(page, SHOWCASE_PLUGIN_ID, "deploys")).toBeVisible({ timeout: 30_000 });
await runCommand(page, "Open plugin workspaces");
await expect(screenTitle(page)).toHaveText("Workspaces");
await expect(page.getByText(`Workspace ${workspaceId}`, { exact: true })).toBeVisible();
await expect(page.getByText("Plugin failed", { exact: false })).toHaveCount(0);
});
test("a header row's shortcut hint presses the row", async ({ page }) => {
await page.setViewportSize(WIDE);
await gotoWorkspace(page, workspaceId);
@@ -0,0 +1,36 @@
import { expect, test } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import {
expectFooterActionsInline,
seedDockedSidebarWidth,
} from "../support/helpers/sidebar-footer-overflow";
// Chromium's pointer bitmasks expose both inputs while the mouse is primary.
test.use({
viewport: { width: 1280, height: 800 },
launchOptions: {
args: [
"--blink-settings=primaryPointerType=4,availablePointerTypes=6,primaryHoverType=2,availableHoverTypes=3",
],
},
});
test("a touchscreen laptop keeps sidebar actions visible with a fine primary pointer", async ({
page,
}) => {
await seedDockedSidebarWidth(page, 200);
await gotoAppShell(page);
expect(
await page.evaluate(() => ({
finePrimary: matchMedia("(pointer: fine)").matches,
touchScreen: matchMedia("(any-pointer: coarse)").matches,
})),
).toEqual({ finePrimary: true, touchScreen: true });
await expectFooterActionsInline(page, [
"sidebar-add-project",
"sidebar-usage-icon",
"sidebar-hosts-trigger",
"sidebar-help",
"sidebar-settings",
]);
});
+13 -2
View File
@@ -705,7 +705,7 @@ test("a scheduled heartbeat opens a separate turn without reopening the previous
});
const schedules = agent.client as unknown as Pick<
DaemonClient,
"scheduleCreate" | "scheduleRunOnce" | "scheduleDelete"
"scheduleCreate" | "scheduleRunOnce" | "scheduleDelete" | "scheduleList"
>;
let scheduleId: string | undefined;
try {
@@ -743,7 +743,18 @@ test("a scheduled heartbeat opens a separate turn without reopening the previous
await expect(summaries).toHaveCount(2);
await expect.poll(() => rowsBetweenLatestSummaryAndReply(page)).toBe(0);
await expect(page.getByRole("button", { name: /^Worked for/ })).toHaveCount(2);
await page.screenshot({ path: "/tmp/heartbeat-turn-footer.png" });
const tasks = page.getByRole("button", { name: "1 background task", exact: true });
await expect(page.getByTestId("workspace-status-indicator-running").first()).toBeVisible();
await expect(page.getByRole("button", { name: "Stop agent", exact: true })).toHaveCount(0);
await tasks.click();
const panel = page.getByTestId("background-work-panel");
await expect(panel).toContainText("Heartbeat");
await panel.getByRole("button", { name: "Stop Check the completed work" }).click();
await expect(tasks).toHaveCount(0);
await expect(page.getByTestId("workspace-status-indicator-running")).toHaveCount(0);
const remaining = await schedules.scheduleList();
expect(remaining.error).toBeNull();
expect(remaining.schedules.map((schedule) => schedule.id)).not.toContain(scheduleId);
} finally {
if (scheduleId) await schedules.scheduleDelete({ id: scheduleId });
await agent.cleanup();
@@ -23,6 +23,8 @@ import {
outlastUndoWindow,
pressArchiveShortcut,
pressUndoShortcut,
readSidebarListLayout,
recordLastRowBottomPerFrame,
resizeSidebarToMinimum,
rowArchiveButton,
rowKebab,
@@ -121,7 +123,7 @@ test.describe("Workspace archive undo", () => {
expect(shortcutBox.x - (labelBox.x + labelBox.width)).toBeLessThanOrEqual(8.5);
});
test("a long list ends just below its last row, and the toast over it moves no row", async ({
test("a long list scrolls its last row clear of the toast, and settles back smoothly after it", async ({
page,
}) => {
await page.clock.install({ time: Date.now() });
@@ -136,18 +138,35 @@ test.describe("Workspace archive undo", () => {
const worktree = await seedWorktree(page, "archive-toast-long-list");
const resting = await scrollSidebarListToEnd(page);
expect(resting.listBottom - resting.rowBottoms.at(-1)!).toBeLessThan(resting.rowHeight);
const restingEndGap = resting.listBottom - resting.rowBottoms.at(-1)!;
expect(restingEndGap).toBeLessThan(resting.rowHeight);
await archiveFromRowButton(page, worktree.workspaceId);
await page.mouse.move(0, 0);
const withToast = await scrollSidebarListToEnd(page);
const toastBox = await archivedToast(page).boundingBox();
if (!toastBox) throw new Error("Toast is not laid out");
expect(toastBox.y + toastBox.height).toBeLessThanOrEqual(withToast.listBottom);
// The list keeps its usual end gap, measured from the toast's top instead of its own bottom.
await expect
.poll(async () => {
const layout = await scrollSidebarListToEnd(page);
return Math.round(toastBox.y - layout.rowBottoms.at(-1)!);
})
.toBe(Math.round(restingEndGap));
const frames = recordLastRowBottomPerFrame(page, 40);
await outlastUndoWindow(page);
const bottoms = await frames;
await expect(archivedToast(page)).toHaveCount(0);
expect(await scrollSidebarListToEnd(page)).toEqual(withToast);
// Without scrolling again, the list ends just below its last row once more.
const settled = await readSidebarListLayout(page);
expect(settled.listBottom - settled.rowBottoms.at(-1)!).toBeCloseTo(restingEndGap, 0);
// The rows travel down by the toast's height over several frames, never in one jump.
const travel = bottoms.at(-1)! - bottoms[0]!;
expect(travel).toBeGreaterThan(toastBox.height);
const steps = bottoms.slice(1).map((bottom, index) => bottom - bottoms[index]!);
expect(Math.min(...steps)).toBeGreaterThanOrEqual(0);
expect(Math.max(...steps)).toBeLessThan(travel / 2);
} finally {
for (const projectId of fillerProjectIds) {
await client.removeProject(projectId).catch(() => undefined);
@@ -3,6 +3,7 @@ import { gotoAppShell } from "../support/helpers/app";
import { getServerId } from "../support/helpers/server-id";
import { seedWorkspace } from "../support/helpers/seed-client";
import { waitForSidebarHydration } from "../support/helpers/workspace-ui";
import { openWorkspaceSidebarKebab } from "../support/helpers/sidebar";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
interface SessionEnvelope {
@@ -114,11 +115,7 @@ async function expectAssigned(
}
async function openWorkspaceLabels(page: import("@playwright/test").Page, workspaceId: string) {
const serverId = getServerId();
const row = page.getByTestId(`sidebar-workspace-row-${serverId}:${workspaceId}`).first();
await expect(row).toBeVisible({ timeout: 30_000 });
await row.hover();
await page.getByTestId(`sidebar-workspace-kebab-${serverId}:${workspaceId}`).first().click();
const serverId = await openWorkspaceSidebarKebab(page, workspaceId);
await page.getByTestId(`sidebar-workspace-menu-labels-${serverId}:${workspaceId}`).click();
await expect(page.getByTestId("workspace-label-picker-create")).toBeVisible();
}
@@ -361,6 +361,10 @@ test.describe("Worktree restore", () => {
cwd: backingWorktree.workspaceDirectory,
stdio: "pipe",
});
const originalHead = execFileSync("git", ["rev-parse", "HEAD"], {
cwd: backingWorktree.workspaceDirectory,
encoding: "utf8",
}).trim();
const created = await worktreeClient.createWorkspace({
source: { kind: "directory", path: backingWorktree.workspaceDirectory },
title: "Sample workspace",
@@ -389,10 +393,7 @@ test.describe("Worktree restore", () => {
await page.getByTestId(`agent-row-${getServerId()}-${agent.id}`).click();
await expect(page.getByText("Workspace archived", { exact: true })).toBeVisible();
await expect(
page.getByText(
"Restore Sample workspace to return to its agents. A new branch will start from the saved base or the repository default.",
{ exact: true },
),
page.getByText("Restore Sample workspace to return to its agents.", { exact: true }),
).toBeVisible();
await captureBranchlessRestoreStep(page, "01-restore-workspace.png");
@@ -409,17 +410,13 @@ test.describe("Worktree restore", () => {
cwd: backingWorktree.workspaceDirectory,
encoding: "utf8",
}).trim();
const defaultHead = execFileSync("git", ["rev-parse", "main"], {
cwd: tempRepo.path,
encoding: "utf8",
}).trim();
expect(restoredHead).toBe(defaultHead);
expect(restoredHead).toBe(originalHead);
expect(
execFileSync("git", ["branch", "--show-current"], {
cwd: backingWorktree.workspaceDirectory,
encoding: "utf8",
}).trim(),
).toMatch(/^restored\//);
).toBe("");
});
test("restore failure stays visible and permits a successful retry", async ({ page }) => {
@@ -0,0 +1,15 @@
# CHAT_URL opens a connected chat containing a visible Markdown image with alt text IMAGE_LABEL.
context platform=android timeout=120000 retries=0
env APP_ID=sh.paseo.debug
env IMAGE_LABEL="Test image"
open "${APP_ID}" "${CHAT_URL}"
wait "label=\"${IMAGE_LABEL}\"" 30000
press "label=\"${IMAGE_LABEL}\""
wait "label=\"Close image\"" 5000
gesture pinch 1.7
press "label=\"Close image\""
press "editable=true"
type "pinch regression"
press "role=\"button\" label=\"Add attachment\""
wait "label=\"Upload file\"" 3000
@@ -56,11 +56,20 @@ function inFlightTurn(page: Page) {
return page.getByTestId("turn-working-indicator");
}
/**
* Presses a fork trigger until its menu shows.
*
* The in-flight turn's trigger sits below text that is still streaming in. While the chat is
* shorter than the viewport, each new line moves the trigger down. A line that arrives between
* the press and the release moves the trigger away from the pointer, so the press opens nothing,
* and the next press lands on the trigger where it is now.
*/
async function openForkMenu(page: Page, trigger: ReturnType<Page["getByRole"]>): Promise<void> {
await trigger.click();
await expect(page.getByRole("menuitem", { name: "Fork in a new tab" })).toBeVisible({
timeout: 10_000,
});
const forkInNewTab = page.getByRole("menuitem", { name: "Fork in a new tab" });
await expect(async () => {
await trigger.click({ timeout: 5_000 });
await expect(forkInNewTab).toBeVisible({ timeout: 5_000 });
}).toPass({ timeout: 30_000 });
}
export async function openMostRecentAssistantForkMenu(page: Page): Promise<void> {
@@ -170,6 +170,11 @@ export interface ModelTriggerLabelState {
modelShown: boolean;
modelText: string;
modelTruncated: boolean;
/**
* The model label shows what its box fits right now: the full text when it fits, otherwise a
* truncation that fits. False while the control has yet to catch up with a reflow.
*/
modelFitsBox: boolean;
}
declare global {
@@ -194,12 +199,18 @@ function readModelTriggerLabelStateInPage(): ModelTriggerLabelState {
};
const modelShown = model !== undefined && shown(model);
const modelText = model?.textContent ?? "";
const overflows = (node: Element) => node.scrollWidth > node.clientWidth;
const modelOverflows = model !== undefined && overflows(model);
// The label's box is sized by an invisible copy of the full text, its first child, so the box
// follows a reflow at once while the shown text waits for the control's next layout event.
const fullTextSizer = model?.parentElement?.parentElement?.firstElementChild;
const fullTextFits = fullTextSizer ? !overflows(fullTextSizer) : true;
return {
modelShown,
modelText,
thinkingShown: modelShown && thinking !== undefined,
modelTruncated:
model !== undefined && (modelText.endsWith("…") || model.scrollWidth > model.clientWidth),
modelTruncated: modelText.endsWith("…") || modelOverflows,
modelFitsBox: !modelOverflows && modelText.endsWith("…") !== fullTextFits,
};
}
@@ -217,13 +228,26 @@ export async function recordModelTriggerFramesFromLoad(page: Page): Promise<void
})()`);
}
/** The model control's labels once two reads 100ms apart agree. */
/**
* The model control's labels once it has caught up with its width: two reads 100ms apart agree
* and the model label shows what its box fits. A resize reflows the page at once, but the control
* chooses its labels again only when its layout events arrive, and on a slow runner that takes
* longer than 100ms. Until then the label can be clipped by the browser beside the thinking
* label, or truncated in a box that has since widened.
*/
export async function readSettledModelTriggerLabels(page: Page): Promise<ModelTriggerLabelState> {
const deadline = Date.now() + 10_000;
let previous = await page.evaluate(readModelTriggerLabelStateInPage);
for (;;) {
await page.waitForTimeout(100);
const next = await page.evaluate(readModelTriggerLabelStateInPage);
if (JSON.stringify(next) === JSON.stringify(previous)) return next;
const agrees = JSON.stringify(next) === JSON.stringify(previous);
if (agrees && next.modelFitsBox) return next;
if (Date.now() > deadline) {
throw new Error(
`the model control never settled on a label that fits its box: ${JSON.stringify(next)}`,
);
}
previous = next;
}
}
@@ -97,18 +97,15 @@ export class ImportSessionFlow {
await target.scrollIntoViewIfNeeded();
await expect(target).toBeInViewport();
}
/**
* Scrolls the virtualized list, the only one that leaves rows unmounted. A row handle is no way
* in: the list unmounts rows as it scrolls, and a detached row has no scroller above it.
*/
private async scrollList(forward: boolean) {
await this.page
.locator('[data-testid^="import-session-session-"]')
.first()
.evaluate((row, advance) => {
let element = row.parentElement;
while (element && !["auto", "scroll"].includes(getComputedStyle(element).overflowY))
element = element.parentElement;
if (!element) throw new Error("Import list has no scroll owner");
element.scrollTop = advance ? element.scrollTop + element.clientHeight * 0.8 : 0;
element.dispatchEvent(new Event("scroll"));
}, forward);
await this.page.getByTestId("import-session-list").evaluate((list, advance) => {
list.scrollTop = advance ? list.scrollTop + list.clientHeight * 0.8 : 0;
list.dispatchEvent(new Event("scroll"));
}, forward);
}
async search(query: string) {
await this.page.getByTestId("import-session-search").fill(query);
@@ -120,11 +117,18 @@ export class ImportSessionFlow {
await this.page.getByTestId("import-session-search").fill("");
await expect(this.page.getByTestId("import-session-load-more")).toBeVisible();
}
/** Load more keeps the reader down the list instead of sending them back to the top. */
async loadMore() {
await this.page.getByTestId("import-session-load-more").click();
const loadMore = this.page.getByTestId("import-session-load-more");
const topRow = this.page.getByTestId((await this.rowIds())[0]!);
await expect(topRow).toBeInViewport();
await loadMore.click();
// The next page is the last and short, so the button leaves once it lands.
await expect(loadMore).toHaveCount(0);
await expect(this.page.getByText("Loading sessions...", { exact: true })).toHaveCount(0);
await expect(topRow).not.toBeInViewport();
await this.revealSession("fixture-root-20");
await expect(this.page.getByText("Root session 20", { exact: true })).toBeInViewport();
await expect(this.page.getByTestId("import-session-load-more")).toHaveCount(0);
}
async retryProvider(provider: string, label: string) {
await this.expectProviderError(label);
@@ -198,6 +198,14 @@ async function expectDetails(page: Page) {
await expect(page.getByText("All systems operational", { exact: true })).toBeInViewport();
}
// The details render before the daemon answers their event subscription, and reopened
// details show the cached summary at once, so wait for the subscription id to arrive.
async function readContentObservation(page: Page): Promise<string> {
const observation = page.getByLabel("Content observation", { exact: true });
await expect(observation).not.toHaveText("");
return (await observation.textContent())!;
}
function workspaceMenuRow(page: Page, title: string): Locator {
return compactWorkspaceMenu(page).getByRole("menuitem", { name: title, exact: true });
}
@@ -354,14 +362,12 @@ export async function withButtonShowcase(
test.step("closing and crashing content release its owner while sibling buttons and app remain live", async () => {
await press(page, "Header status");
await expectDetails(page);
const observation = page.getByLabel("Content observation", { exact: true });
await expect(observation).not.toHaveText("");
const first = (await observation.textContent())!;
const first = await readContentObservation(page);
await press(page, "Close deployment details");
await expect.poll(() => released.has(first)).toBe(true);
await press(page, "Composer status");
await expectDetails(page);
const second = (await observation.textContent())!;
const second = await readContentObservation(page);
expect(second).not.toBe(first);
await workspace.client.renameProject(workspace.projectId, "Observer control");
await expect(page.getByText("Observed updates: 1", { exact: true })).toBeVisible();
@@ -373,7 +379,7 @@ export async function withButtonShowcase(
await page.keyboard.press("Escape");
await press(page, "Header status");
await expectDetails(page);
const recovered = (await observation.textContent())!;
const recovered = await readContentObservation(page);
expect([first, second]).not.toContain(recovered);
await showcase.setTitle("Healthy app after button failure");
await expect(page.getByTestId("workspace-header-title")).toHaveText(
@@ -687,9 +693,7 @@ export async function withButtonShowcase(
page,
page.getByRole("button", { name: "Close deployment details", exact: true }),
);
const observation = page.getByLabel("Content observation", { exact: true });
await expect(observation).not.toHaveText("");
const owner = (await observation.textContent())!;
const owner = await readContentObservation(page);
await showcase.disable();
await expect.poll(() => released.has(owner)).toBe(true);
await expect(
@@ -15,8 +15,18 @@ export const COMPACT = { width: 390, height: 844 };
/** A plugin written against the current API: a screen, header and footer items, a command. */
const SHOWCASE_SOURCE = `import React from "react";
import { Pressable, Text, View } from "react-native";
import { useWorkspaces } from "@getpaseo/plugin/client";
import { SidebarRow } from "@getpaseo/plugin/client/ui";
function WorkspacesScreen({ theme }) {
const workspaces = useWorkspaces();
return (
<View style={{ flex: 1, padding: 24, gap: 8 }}>
{workspaces.map((ref) => <Text key={ref.id} style={{ color: theme.colors.foreground }}>{"Workspace " + ref.id}</Text>)}
</View>
);
}
function DeploysScreen({ theme }) {
return <View style={{ flex: 1, padding: 24 }}><Text style={{ color: theme.colors.foreground }}>Deploys screen body</Text></View>;
}
@@ -63,11 +73,13 @@ function Broken() {
export default function contribute(client) {
client.addScreen({ id: "deploys", title: "Deploys", Component: DeploysScreen });
client.addScreen({ id: "workspaces", title: "Workspaces", Component: WorkspacesScreen });
client.addSidebarHeaderItem({ id: "deploys", title: "Deploys", Component: DeploysItem });
client.addSidebarHeaderItem({ id: "broken", title: "Broken header", Component: Broken });
client.addSidebarFooterItem({ id: "sync", title: "Sync", Component: SyncItem });
client.addSidebarFooterItem({ id: "broken", title: "Broken footer", Component: Broken });
client.addCommandCenterItem({ id: "open-deploys", title: "Open deploys", icon: "Rocket", context: "global", onSelect: (ctx) => ctx.openScreen({ screenId: "deploys" }) });
client.addCommandCenterItem({ id: "open-workspaces", title: "Open plugin workspaces", icon: "List", context: "global", onSelect: (ctx) => ctx.openScreen({ screenId: "workspaces" }) });
return () => {};
}
`;
@@ -60,14 +60,8 @@ export function footerOverflowMenu(page: Page): Locator {
return page.getByTestId("sidebar-footer-overflow-menu");
}
/**
* The icon line shows exactly `testIDs`, in order, each `controlSize` square and wholly inside the
* line's box, so no button is cut off by the sidebar's edge.
*/
export async function expectFooterLine(
page: Page,
input: { testIDs: string[]; controlSize: number },
): Promise<void> {
/** The icon line shows exactly `testIDs`, in order. */
export async function expectFooterActionsInline(page: Page, testIDs: string[]): Promise<void> {
const line = footerLine(page);
await expect(line).toHaveCount(1);
await expect
@@ -76,7 +70,16 @@ export async function expectFooterLine(
.locator(FOOTER_LINE_TEST_IDS.map((testID) => `[data-testid="${testID}"]`).join(","))
.evaluateAll((elements) => elements.map((element) => element.getAttribute("data-testid"))),
)
.toEqual(input.testIDs);
.toEqual(testIDs);
}
/** The actions are square and fit inside the line. */
export async function expectFooterLine(
page: Page,
input: { testIDs: string[]; controlSize: number },
): Promise<void> {
await expectFooterActionsInline(page, input.testIDs);
const line = footerLine(page);
const { row, buttons } = await line.evaluate((element, testIDs) => {
const rect = (node: Element) => {
const { x, width, height } = node.getBoundingClientRect();
+16 -5
View File
@@ -190,14 +190,25 @@ export async function selectWorkspaceInSidebar(page: Page, workspaceId: string):
await row.click();
}
async function openWorkspaceSidebarKebab(page: Page, workspaceId: string) {
/**
* Opens a workspace row's kebab menu the way a pointer does: enter the row, then press the kebab
* it reveals.
*
* The kebab only mounts while the row holds hover, and hover only arrives on pointerenter. A row
* that re-renders or shifts under a parked pointer drops that hover with no new pointerenter to
* restore it, so each attempt leaves the row and enters it again instead of waiting on a kebab
* that a still pointer cannot bring back.
*/
export async function openWorkspaceSidebarKebab(page: Page, workspaceId: string) {
const serverId = getServerId();
const row = page.getByTestId(`sidebar-workspace-row-${serverId}:${workspaceId}`);
await expect(row).toBeVisible({ timeout: 30_000 });
await row.hover();
const kebab = page.getByTestId(`sidebar-workspace-kebab-${serverId}:${workspaceId}`);
await expect(kebab).toBeVisible({ timeout: 10_000 });
await expect(row).toBeVisible({ timeout: 30_000 });
await expect(async () => {
await page.mouse.move(0, 0);
await row.hover();
await expect(kebab).toBeVisible({ timeout: 2_000 });
}).toPass({ timeout: 15_000 });
await kebab.click();
return serverId;
@@ -1,5 +1,6 @@
import { expect, type Page } from "@playwright/test";
import type { installDaemonWebSocketGate } from "./daemon-websocket-gate";
import { seedMockAgentWorkspace, type MockAgentWorkspace } from "./mock-agent";
import { readReplicaCache } from "./replica-cache-storage";
import type { LongTimelineAgent } from "./timeline-pagination";
import {
@@ -241,3 +242,100 @@ export async function restoreUnchangedViewedTimeline(
gate.restore();
await expectReconnectingToastGone(page);
}
export interface StreamingReplyAgent extends MockAgentWorkspace {
prompt: string;
}
/**
* A mock agent with no history whose reply streams one word every 100 ms. At 2,000 words the
* reply outlasts the test's timeout, so it is still streaming however long the app takes to
* reconnect. The test ends the turn with {@link stopStreamingReply}.
*/
export async function seedStreamingReplyAgent(): Promise<StreamingReplyAgent> {
const reply = Array.from({ length: 2_000 }, (_unused, index) => `word${index}`).join(" ");
const agent = await seedMockAgentWorkspace({
repoPrefix: "reply-reconnect-",
title: "Reply through reconnect",
featureValues: {
mockStreamingAssistantResponse: reply,
mockStreamingAssistantIntervalMs: 100,
},
});
return {
...agent,
prompt: "stream through a reconnect",
cleanup: async () => {
await agent.client.cancelAgent(agent.agentId).catch(() => undefined);
await agent.cleanup();
},
};
}
interface TimelineReader {
fetchAgentTimeline(
agentId: string,
request: { direction: "tail"; limit: number },
): Promise<{ entries: Array<{ item: { type: string; text?: string } }> }>;
}
async function readDaemonReply(agent: StreamingReplyAgent): Promise<string> {
const timeline = await (agent.client as unknown as TimelineReader).fetchAgentTimeline(
agent.agentId,
{ direction: "tail", limit: 0 },
);
return timeline.entries
.map(({ item }) => (item.type === "assistant_message" ? (item.text ?? "") : ""))
.join("");
}
/** Waits for the empty chat's first catch-up, so the chat is synced with no range. */
export async function expectEmptyChatSynced(page: Page, gate: DaemonWebSocketGate): Promise<void> {
await gate.waitForServerMessage(TIMELINE_RESPONSE);
await expect(page.getByTestId("agent-chat-scroll").filter({ visible: true })).toHaveCount(1, {
timeout: 30_000,
});
}
/** Another client sends the prompt, and the reply starts, while the chat is away. */
export async function sendPromptWhileDisconnected(agent: StreamingReplyAgent): Promise<void> {
await agent.client.sendAgentMessage(agent.agentId, agent.prompt);
await expect.poll(() => readDaemonReply(agent), { timeout: 30_000 }).toContain("word10");
}
/** Reconnects with live reply chunks reaching the chat before the catch-up page that holds them. */
export async function restoreViewedTimelineWithLiveRowsFirst(
gate: DaemonWebSocketGate,
): Promise<void> {
gate.holdNextClientRequest(TIMELINE_REQUEST);
const chunksBeforeReconnect = gate.getAgentStreamItemCount("assistant_message");
gate.restore();
await gate.waitForHeldClientRequest();
await gate.waitForAgentStreamItem("assistant_message", chunksBeforeReconnect + 5);
gate.releaseHeldClientRequest();
}
/** Stops the turn and returns the reply as the daemon recorded it. */
export async function stopStreamingReply(agent: StreamingReplyAgent): Promise<string> {
await agent.client.cancelAgent(agent.agentId);
await agent.client.waitForFinish(agent.agentId, 30_000);
const reply = (await readDaemonReply(agent)).trim();
expect(reply).toMatch(/^word0 word1 word2 .* word10 /);
return reply;
}
export async function expectPromptAndWholeReply(
page: Page,
agent: StreamingReplyAgent,
reply: string,
): Promise<void> {
const chat = page.getByTestId("agent-chat-scroll").filter({ visible: true }).first();
await expect(chat.getByText(agent.prompt, { exact: true })).toBeVisible({ timeout: 30_000 });
await expect
.poll(
async () =>
(await chat.getByTestId("assistant-message").allInnerTexts()).map((text) => text.trim()),
{ timeout: 30_000 },
)
.toEqual([reply]);
}
@@ -175,13 +175,19 @@ export interface SidebarListLayout {
rowHeight: number;
}
const SIDEBAR_LIST = "sidebar-project-workspace-list-scroll";
/** Scrolls the sidebar's workspace list to its end and reads where its rows sit. */
export async function scrollSidebarListToEnd(page: Page): Promise<SidebarListLayout> {
const list = page.getByTestId("sidebar-project-workspace-list-scroll");
await list.evaluate((element) => {
await page.getByTestId(SIDEBAR_LIST).evaluate((element) => {
element.scrollTop = element.scrollHeight;
});
return list.evaluate((element) => {
return readSidebarListLayout(page);
}
/** Reads where the sidebar list's rows sit, without scrolling it. */
export async function readSidebarListLayout(page: Page): Promise<SidebarListLayout> {
return page.getByTestId(SIDEBAR_LIST).evaluate((element) => {
const visible = element.getBoundingClientRect();
const rows = Array.from(
element.querySelectorAll<HTMLElement>(
@@ -197,3 +203,26 @@ export async function scrollSidebarListToEnd(page: Page): Promise<SidebarListLay
};
});
}
/**
* Starts recording the bottom edge of the sidebar list's last row once per painted frame.
* Resolves with one value per frame after `frameCount` frames.
*/
export function recordLastRowBottomPerFrame(page: Page, frameCount: number): Promise<number[]> {
return page.getByTestId(SIDEBAR_LIST).evaluate(
(element, count) =>
new Promise<number[]>((resolve) => {
const bottoms: number[] = [];
const sample = () => {
const rows = element.querySelectorAll<HTMLElement>(
'[data-testid^="sidebar-workspace-row-"],[data-testid^="sidebar-project-row-"]',
);
bottoms.push(Math.max(...Array.from(rows, (row) => row.getBoundingClientRect().bottom)));
if (bottoms.length >= count) resolve(bottoms);
else requestAnimationFrame(sample);
};
requestAnimationFrame(sample);
}),
frameCount,
);
}
@@ -0,0 +1,2 @@
/android/.cxx/
/android/build/
@@ -0,0 +1,23 @@
apply plugin: 'com.android.library'
group = 'sh.paseo.displaymetrics'
version = '0.1.0'
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
apply from: expoModulesCorePlugin
applyKotlinExpoModulesCorePlugin()
useCoreDependencies()
useDefaultAndroidSdkVersions()
android {
namespace "sh.paseo.displaymetrics"
defaultConfig {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
}
dependencies {
implementation "com.facebook.react:react-android"
androidTestImplementation 'androidx.test:runner:1.6.2'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
}
@@ -0,0 +1,86 @@
package sh.paseo.displaymetrics
import android.util.DisplayMetrics
import android.util.TypedValue
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.facebook.react.uimanager.DisplayMetricsHolder
import com.facebook.react.uimanager.PixelUtil
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Assert.assertSame
import org.junit.Assert.assertThrows
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class PaseoDisplayMetricsTest {
private lateinit var display: DisplayMetrics
@Before
fun readDisplayLikeReactNative() {
DisplayMetricsHolder.initDisplayMetrics(InstrumentationRegistry.getInstrumentation().targetContext)
display = DisplayMetricsHolder.getScreenDisplayMetrics()
}
@After
fun forgetDisplay() {
DisplayMetricsHolder.setScreenDisplayMetrics(null)
}
@Test
fun reservesRoomForTextAtTheWindowDensity() {
// A DeX window at two thirds of the phone's density (240 dpi on a 360 dpi phone). React Native
// reads the font scale from the window but the density from the phone's display.
val window = windowAt(display.densityDpi * 2 / 3)
DisplayMetricsHolder.setScreenDisplayMetrics(
DisplayMetrics().apply {
setTo(display)
scaledDensity = window.scaledDensity
},
)
assertTrue(reservedTextPx(window) < drawnTextPx())
PaseoDisplayMetrics.syncWithWindow(window)
assertEquals(drawnTextPx(), reservedTextPx(window), 0.01f)
assertEquals(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 16f, window), drawnTextPx(), 0.01f)
val synced = DisplayMetricsHolder.getScreenDisplayMetrics()
assertEquals(window.densityDpi, synced.densityDpi)
assertEquals(display.widthPixels, synced.widthPixels)
assertEquals(display.heightPixels, synced.heightPixels)
}
@Test
fun leavesTheBuiltInDisplayAlone() {
PaseoDisplayMetrics.syncWithWindow(windowAt(display.densityDpi))
assertSame(display, DisplayMetricsHolder.getScreenDisplayMetrics())
}
@Test
fun waitsForReactNativeToReadTheDisplay() {
DisplayMetricsHolder.setScreenDisplayMetrics(null)
PaseoDisplayMetrics.syncWithWindow(windowAt(display.densityDpi / 2))
assertThrows(IllegalStateException::class.java) { DisplayMetricsHolder.getScreenDisplayMetrics() }
}
private fun windowAt(densityDpi: Int): DisplayMetrics =
DisplayMetrics().apply {
setTo(display)
this.densityDpi = densityDpi
density = densityDpi.toFloat() / DisplayMetrics.DENSITY_DEFAULT
scaledDensity = density * display.scaledDensity / display.density
}
/** A 16sp font as React Native draws it, in pixels. */
private fun drawnTextPx(): Float = PixelUtil.toPixelFromSP(16f)
/** The box React Native lays out for that font, once the window renders it in pixels. */
private fun reservedTextPx(window: DisplayMetrics): Float =
PixelUtil.toDIPFromPixel(drawnTextPx()) * window.density
}
@@ -0,0 +1,43 @@
package sh.paseo.displaymetrics
import android.app.Activity
import android.util.DisplayMetrics
import com.facebook.react.uimanager.DisplayMetricsHolder
/**
* React Native 0.86 converts between px and dp, and so sizes text, with the density of the
* device's built-in display, because `DisplayMetricsHolder` reads `Display.getRealMetrics()`.
* Fabric lays out at the window's density. On a display with another density, such as a Samsung
* DeX monitor, text boxes come out too small and clip their text.
*
* Backports react/react-native#59087 (`useWindowDensityForDisplayMetricsAndroid`): keep the
* window's density and take only the size from the display. Remove once the app runs React Native
* 0.89 or later with that flag on.
*/
object PaseoDisplayMetrics {
/** Call right after React Native reads the display, which it does again on each configuration change. */
@JvmStatic
fun syncWithWindow(activity: Activity) {
syncWithWindow(activity.resources.displayMetrics)
}
@JvmStatic
fun syncWithWindow(window: DisplayMetrics) {
val screen =
try {
DisplayMetricsHolder.getScreenDisplayMetrics()
} catch (_: IllegalStateException) {
// React Native hasn't read the display yet, so there is nothing to correct.
return
}
if (screen.densityDpi == window.densityDpi) return
DisplayMetricsHolder.setScreenDisplayMetrics(
DisplayMetrics().apply {
setTo(screen)
density = window.density
densityDpi = window.densityDpi
},
)
}
}
@@ -0,0 +1,35 @@
const { withMainActivity } = require("expo/config-plugins");
const ACTIVITY_CLASS = "class MainActivity : ReactActivity() {";
const SYNC = "sh.paseo.displaymetrics.PaseoDisplayMetrics.syncWithWindow(this)";
// React Native re-reads the built-in display's density when it creates the root view and on every
// configuration change, so the window's density has to be restored right after each `super` call.
const OVERRIDES = `
override fun onContentChanged() {
super.onContentChanged()
${SYNC}
}
override fun onConfigurationChanged(newConfig: android.content.res.Configuration) {
super.onConfigurationChanged(newConfig)
${SYNC}
}
`;
function configureDisplayMetricsActivity(contents) {
if (contents.includes(SYNC)) return contents;
if (
!contents.includes(ACTIVITY_CLASS) ||
/override fun on(ContentChanged|ConfigurationChanged)\(/.test(contents)
) {
throw new Error("Could not keep React Native text at the window's density in MainActivity");
}
return contents.replace(ACTIVITY_CLASS, `${ACTIVITY_CLASS}${OVERRIDES}`);
}
module.exports = (config) =>
withMainActivity(config, (mod) => {
mod.modResults.contents = configureDisplayMetricsActivity(mod.modResults.contents);
return mod;
});
module.exports.configureDisplayMetricsActivity = configureDisplayMetricsActivity;
@@ -0,0 +1,29 @@
import { describe, expect, it } from "vitest";
const { configureDisplayMetricsActivity } = require("./app.plugin");
const SYNC = "sh.paseo.displaymetrics.PaseoDisplayMetrics.syncWithWindow(this)";
describe("Android display metrics", () => {
it("restores the window's density after React Native reads the display", () => {
const source = "class MainActivity : ReactActivity() {\n}";
const result = configureDisplayMetricsActivity(source);
expect(result).toContain(`super.onContentChanged()\n ${SYNC}`);
expect(result).toContain(`super.onConfigurationChanged(newConfig)\n ${SYNC}`);
expect(configureDisplayMetricsActivity(result)).toBe(result);
});
it("fails prebuild when the template no longer has a place for the overrides", () => {
expect(() => configureDisplayMetricsActivity("changed template")).toThrow(
"Could not keep React Native text at the window's density",
);
});
it("fails prebuild rather than replace another plugin's configuration handler", () => {
const source =
"class MainActivity : ReactActivity() {\n override fun onConfigurationChanged(newConfig: Configuration) {}\n}";
expect(() => configureDisplayMetricsActivity(source)).toThrow(
"Could not keep React Native text at the window's density",
);
});
});
@@ -0,0 +1,6 @@
{
"platforms": ["android"],
"android": {
"modules": []
}
}
@@ -0,0 +1,5 @@
{
"name": "paseo-display-metrics",
"version": "0.1.0",
"private": true
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/app",
"version": "0.16.0",
"version": "0.16.2",
"private": true,
"main": "index.ts",
"scripts": {
@@ -30,6 +30,25 @@ function answer(
}
describe("draft options model", () => {
it("retains an Ultracode option only after the current host advertises it", () => {
const model = openDraftOptions({ provider: "claude" });
const legacy = { provider: "claude", cwd: "/repo", thinkingOptionId: "ultracode" };
model.applyResolved(answer("claude", "old-host", {}, []));
expect(model.retainResolvedOption("ultracode", "old-host")).toBeUndefined();
expect(draftControlsRequest(model.getState(), legacy)).toEqual(legacy);
model.applyResolved(
answer("claude", "new-host", { ultracode: true }, [
{ type: "toggle", key: "ultracode", label: "Ultracode" },
]),
);
expect(model.retainResolvedOption("ultracode", "old-host")).toBeUndefined();
expect(model.retainResolvedOption("ultracode", "new-host")).toEqual({ ultracode: true });
expect(
draftControlsRequest(model.getState(), { ...legacy, thinkingOptionId: "high" }),
).toMatchObject({ thinkingOptionId: "high", providerOptions: { ultracode: true } });
});
it("draws a legacy Fast profile as the Fast tier the daemon resolved", () => {
const model = openDraftOptions({ provider: "codex", seed: { service_tier: "fast" } });
model.applyResolved(answer("codex", "k1", { service_tier: "priority" }));
@@ -47,6 +47,7 @@ export interface DraftOptionsModel {
applyProfile: (profile: { provider: string; options: ProviderOptions }) => void;
setRemembered: (remembered: ProviderOptions) => void;
setOption: (key: string, value: unknown) => void;
retainResolvedOption: (key: string, requestKey: string) => ProviderOptions | undefined;
applyResolved: (resolved: ResolvedDraftOptions) => void;
}
@@ -112,6 +113,17 @@ export function openDraftOptions(input: {
: { ...current, edits: { ...current.edits, [key]: value } },
);
},
retainResolvedOption: (key, requestKey) => {
const resolved = state.resolved;
if (resolved?.requestKey !== requestKey || key in state.edits) return undefined;
const value = resolved.options[key];
if (value === undefined || !resolved.controls.some((control) => control.key === key)) {
return undefined;
}
const patch = { [key]: value };
publish((current) => ({ ...current, edits: { ...current.edits, ...patch } }));
return patch;
},
applyResolved: (resolved) =>
publish((current) => ({
...current,
@@ -851,6 +851,94 @@ it("copies a selection inside semantic inline code without Markdown escaping", (
);
});
it("keeps intraword underscores in prose unescaped", () => {
const message = mountFixture();
message.innerHTML = "<p>Set max_retries and snake_case before the call.</p>";
const paragraph = fixtureElement(message, "p");
expect(createAssistantSelectionClipboardContent(selectNodeContents(paragraph))?.plainText).toBe(
"Set max_retries and snake_case before the call.",
);
});
it("copies literal paired underscores raw in text/plain and escaped in text/html", () => {
const message = mountFixture();
message.innerHTML = "<p>literal _word_ stays literal</p>";
const paragraph = fixtureElement(message, "p");
const content = createAssistantSelectionClipboardContent(selectNodeContents(paragraph));
expect(content?.plainText).toBe("literal _word_ stays literal");
expect(content?.html).toContain("literal _word_ stays literal");
});
it("copies a path the renderer recognized as text, and an authored link as a link", () => {
const message = mountFixture();
message.innerHTML =
'<p>See <a href="src/index.ts" data-paseo-markdown-recognized-link="true">src/index.ts</a> and <a href="https://example.test/doc">the doc</a>.</p>';
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toBe("See src/index.ts and [the doc](https://example.test/doc).");
expect(content?.html).not.toContain('href="src/index.ts"');
});
it("copies a recognized inline-code path without its link", () => {
const message = mountFixture();
message.innerHTML =
'<p>Edited <a href="src/app.tsx" data-paseo-markdown-recognized-link="true"><code>src/app.tsx</code></a> today.</p>';
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toBe("Edited `src/app.tsx` today.");
expect(content?.html).not.toContain('href="src/app.tsx"');
});
it("copies a recognized web link as its text in text/plain and as a link in text/html", () => {
const message = mountFixture();
message.innerHTML =
'<p>Fixed in <a href="https://github.com/o/r/issues/12" data-paseo-markdown-recognized-link="true">#12</a> today.</p>';
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toBe("Fixed in #12 today.");
expect(content?.html).toContain('<a href="https://github.com/o/r/issues/12">#12</a>');
});
it("copies a recognized Windows drive path as text in both clipboard flavors", () => {
const message = mountFixture();
message.innerHTML =
'<p>Open <a href="C:%5Crepo%5Csrc%5Cx.ts" data-paseo-markdown-recognized-link="true">C:\\repo\\src\\x.ts</a> now.</p>';
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toBe("Open C:\\repo\\src\\x.ts now.");
expect(content?.html).not.toContain("<a ");
});
it("keeps literal angle brackets around a URL in text/html", () => {
const message = mountFixture();
message.innerHTML = "<p>Open &lt;http://localhost:3000&gt; before the call.</p>";
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toBe("Open <http://localhost:3000> before the call.");
expect(content?.html).toContain("<p>Open &lt;http://localhost:3000&gt; before the call.</p>");
});
it("keeps a heading marker split across inline elements literal in text/html", () => {
const message = mountFixture();
message.innerHTML = "<p>Use <strong>C#</strong> for the service layer.</p>";
const paragraph = fixtureElement(message, "p");
const range = document.createRange();
range.setStart(textNode(fixtureElement(message, "strong")), 1);
range.setEnd(paragraph.lastChild!, paragraph.lastChild!.textContent!.length);
const selection = window.getSelection()!;
selection.removeAllRanges();
selection.addRange(range);
const content = createAssistantSelectionClipboardContent(selection);
expect(content?.plainText).toBe("# for the service layer.");
expect(content?.html).toContain("<p># for the service layer.</p>");
});
it("keeps table cell pipes escaped in text/plain table syntax and literal in text/html", () => {
const message = mountFixture();
message.innerHTML =
"<table><thead><tr><th>Header | label</th></tr></thead><tbody><tr><td>Value | detail</td></tr></tbody></table>";
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toContain("Header \\| label");
expect(content?.plainText).toContain("Value \\| detail");
expect(content?.html).toContain("<th>Header | label</th>");
expect(content?.html).toContain("<td>Value | detail</td>");
});
it("copies a workspace image path instead of its temporary display URL", () => {
const message = mountFixture();
const sources = JSON.stringify({ "blob:preview": "assets/chart.png" });
@@ -2,7 +2,7 @@ import TurndownService from "turndown";
import { gfm } from "turndown-plugin-gfm";
import {
createCodeClipboardContent,
createMarkdownClipboardContent,
createSelectionClipboardContent,
type MarkdownClipboardContent,
} from "@/utils/rich-clipboard";
import {
@@ -15,6 +15,7 @@ import {
MARKDOWN_COPY_LIST_START_ATTRIBUTE,
MARKDOWN_COPY_SRC_ATTRIBUTE,
MARKDOWN_COPY_TAG_ATTRIBUTE,
MARKDOWN_COPY_RECOGNIZED_LINK_ATTRIBUTE,
MARKDOWN_COPY_UNWRAP_ATTRIBUTE,
TRAILING_CODE_LINE_BREAKS,
} from "./markup";
@@ -56,40 +57,68 @@ function copySemanticAttributes(original: Element, copy: Element): void {
}
}
const turndown = new TurndownService({
bulletListMarker: "-",
codeBlockStyle: "fenced",
emDelimiter: "_",
strongDelimiter: "**",
});
turndown.use(gfm);
turndown.addRule("escapedGfmTableCell", {
filter: ["th", "td"],
replacement: (content, node) => {
const index = node.parentNode ? Array.from(node.parentNode.childNodes).indexOf(node) : 0;
const prefix = index === 0 ? "| " : " ";
return `${prefix}${content.replace(/\|/g, "\\|")} |`;
},
});
turndown.addRule("gfmStrikethrough", {
filter: ["del", "s"],
replacement: (content) => `~~${content}~~`,
});
turndown.addRule("compactListItem", {
filter: "li",
replacement: (content, node, options) => {
const item = content
.replace(/^\n+/, "")
.replace(/\n+$/, "\n")
// Every non-empty line, so indented code lines stay inside the item.
.replace(/\n(?=[^\n])/g, "\n ");
const parent = node.parentElement;
if (parent?.nodeName !== "OL") {
return `${options.bulletListMarker} ${item}\n`;
}
return `${node.getAttribute("value")}. ${item}\n`;
},
});
function createTurndown(flavor: "markdown" | "plain"): TurndownService {
const turndown = new TurndownService({
bulletListMarker: "-",
codeBlockStyle: "fenced",
emDelimiter: "_",
strongDelimiter: "**",
});
turndown.use(gfm);
// text/plain still carries tables as GFM syntax, so a cell's pipe stays escaped there.
turndown.addRule("escapedGfmTableCell", {
filter: ["th", "td"],
replacement: (content, node) => {
const index = node.parentNode ? Array.from(node.parentNode.childNodes).indexOf(node) : 0;
const prefix = index === 0 ? "| " : " ";
return `${prefix}${content.replace(/\|/g, "\\|")} |`;
},
});
// A link Paseo recognized pastes as the text the reply showed. Rich paste keeps it as a
// link when it points to a web page, such as a forge reference.
turndown.addRule("recognizedLink", {
filter: (node) =>
node.nodeName === "A" &&
node.hasAttribute(MARKDOWN_COPY_RECOGNIZED_LINK_ATTRIBUTE) &&
(flavor === "plain" || !isWebUrl(node.getAttribute("href") ?? "")),
replacement: (content) => content,
});
if (flavor === "markdown") {
// Turndown leaves `<` unescaped, so displayed text such as `<http://localhost>`
// would render back into text/html as an autolink.
const escapeMarkdown = turndown.escape.bind(turndown);
turndown.escape = (text) => escapeMarkdown(text).replace(/</g, "\\<");
} else {
turndown.escape = (text) => text;
}
turndown.addRule("gfmStrikethrough", {
filter: ["del", "s"],
replacement: (content) => `~~${content}~~`,
});
turndown.addRule("compactListItem", {
filter: "li",
replacement: (content, node, options) => {
const item = content
.replace(/^\n+/, "")
.replace(/\n+$/, "\n")
// Every non-empty line, so indented code lines stay inside the item.
.replace(/\n(?=[^\n])/g, "\n ");
const parent = node.parentElement;
if (parent?.nodeName !== "OL") {
return `${options.bulletListMarker} ${item}\n`;
}
return `${node.getAttribute("value")}. ${item}\n`;
},
});
return turndown;
}
function isWebUrl(href: string): boolean {
return /^https?:\/\//i.test(href);
}
const markdownTurndown = createTurndown("markdown");
const plainTurndown = createTurndown("plain");
export function createAssistantSelectionClipboardContent(
selection: Selection | null,
@@ -117,11 +146,15 @@ export function createAssistantSelectionClipboardContent(
}
restoreMarkdownElements(container);
const markdown = turndown.turndown(container.innerHTML).trim();
const markdown = markdownTurndown.turndown(container).trim();
if (!markdown) {
return null;
}
const content = createMarkdownClipboardContent(markdown);
// text/plain carries unescaped Markdown: a plain target shows backslashes literally.
// text/html is rendered from escaped Markdown, so literal Markdown characters stay
// literal in a rich target.
const plainText = plainTurndown.turndown(container).trim();
const content = createSelectionClipboardContent(markdown, plainText);
return { ...content, html: flattenClipboardListMarkup(content.html) };
}
@@ -651,13 +684,15 @@ function restoreMarkdownElements(container: HTMLElement): void {
for (const element of presentational.toReversed()) {
element.replaceWith(...element.childNodes);
}
// Turndown escapes line-start Markdown per text node, so text split by an unwrapped
// element, such as `#` and ` for`, has to be one node to keep `# for` literal.
container.normalize();
}
/**
* Each item carries its number before Turndown re-parses the HTML. Until then every
* child of the list is one item, including a partly selected item demoted to a `p`.
* The parser splits a `p` that holds a code block into several siblings, so counting
* siblings afterwards numbers the next item too high.
* Assign item numbers before passing the DOM to Turndown. A partly selected item
* still takes its original list position when copied as a paragraph, so the following
* items keep their numbers.
*/
function numberOrderedListItems(list: Element, start: number): void {
Array.from(list.children).forEach((child, index) => {
@@ -2,6 +2,8 @@ export const MARKDOWN_COPY_TAG_ATTRIBUTE = "data-paseo-markdown-tag";
export const MARKDOWN_COPY_IGNORE_ATTRIBUTE = "data-paseo-markdown-ignore";
export const MARKDOWN_COPY_LIST_MARKER_ATTRIBUTE = "data-paseo-markdown-list-marker";
export const MARKDOWN_COPY_UNWRAP_ATTRIBUTE = "data-paseo-markdown-unwrap";
/** A link Paseo recognized in the reply text, as opposed to one the Markdown wrote. */
export const MARKDOWN_COPY_RECOGNIZED_LINK_ATTRIBUTE = "data-paseo-markdown-recognized-link";
export const MARKDOWN_COPY_LIST_START_ATTRIBUTE = "data-paseo-markdown-list-start";
export const MARKDOWN_COPY_LANGUAGE_ATTRIBUTE = "data-paseo-markdown-language";
export const MARKDOWN_COPY_ALIGN_ATTRIBUTE = "data-paseo-markdown-align";
+2 -2
View File
@@ -10,8 +10,8 @@ import { createHostBackgroundWorkModel } from "./host";
import { backgroundWorkText } from "./presentation";
export { createHostBackgroundWorkModel } from "./host";
function kindKey(kind: string): "shell" | "monitor" | "other" {
if (kind === "shell" || kind === "monitor") return kind;
function kindKey(kind: string): "shell" | "monitor" | "heartbeat" | "other" {
if (kind === "shell" || kind === "monitor" || kind === "heartbeat") return kind;
return "other";
}
@@ -17,6 +17,11 @@ export function nextPageLimit(limit: number): number {
return PAGE_LIMITS.find((candidate) => candidate > limit) ?? limit;
}
/** The page Load more grew this limit from, or null for the first page. */
export function previousPageLimit(limit: number): number | null {
return PAGE_LIMITS.findLast((candidate) => candidate < limit) ?? null;
}
export function requiresImportSessionsHostUpgrade(input: {
supportsSnapshot: boolean;
workspaceId?: string | null;
@@ -1172,6 +1172,44 @@ describe("ImportSessionSheet", () => {
});
});
it("keeps the loaded list in place while Load more fetches the next page", async () => {
let releaseNextPage: () => void = () => undefined;
const nextPage = new Promise<void>((resolve) => {
releaseNextPage = resolve;
});
const fetchRecentProviderSessions = vi.fn(async (options: { limit?: number } | undefined) => {
if (options?.limit !== 15) await nextPage;
return {
requestId: "recent-provider-sessions",
entries: createPageOfEntries(options?.limit === 15 ? 15 : 20),
};
});
renderSheet(createRecentSessionsClient(fetchRecentProviderSessions, vi.fn()), {
cwd: null,
snapshot: { supportsSnapshot: true, entries: [createSnapshotEntry("claude")] },
});
fireEvent.click(await screen.findByTestId("import-session-load-more"));
// The list the user scrolled to Load more is the one they keep: replacing it would drop
// them back at the top, behind a loading state, until the larger page lands.
const list = screen.getByTestId("import-session-list");
await waitFor(() => {
expect(fetchRecentProviderSessions).toHaveBeenCalledWith({
providers: ["claude"],
limit: 45,
});
});
expect(screen.getByTestId("import-session-list")).toBe(list);
expect(screen.queryByText("Loading sessions...")).toBeNull();
releaseNextPage();
await waitFor(() => {
expect(screen.queryByTestId("import-session-load-more")).toBeNull();
});
expect(screen.getByTestId("import-session-list")).toBe(list);
});
it("stops the refresh spinner and retries only the failed provider", async () => {
const fetchRecentProviderSessions = vi.fn(
async (options: { providers?: string[] } | undefined) => {
@@ -1,6 +1,6 @@
import React, { type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from "react";
import { Pressable, type PressableStateCallbackType, Text, View } from "react-native";
import { keepPreviousData, useMutation, useQueries, useQueryClient } from "@tanstack/react-query";
import { useMutation, useQueries, useQueryClient, type QueryClient } from "@tanstack/react-query";
import { useTranslation } from "react-i18next";
import type {
DaemonClient,
@@ -40,6 +40,7 @@ import {
resolveDirectoryLabel,
nextPageLimit,
PER_PROVIDER_LIMIT,
previousPageLimit,
type ProviderErrorRow,
resolveImportTarget,
resolveProvidersToFetch,
@@ -100,11 +101,12 @@ interface SessionsQueryConfig {
// Query's default retry would keep the header spinner turning and pile up
// in-flight daemon requests behind a dead provider (#2512).
retry: false;
placeholderData: typeof keepPreviousData;
placeholderData: () => RecentSessionsResponse | undefined;
queryFn: () => Promise<RecentSessionsResponse>;
}
function buildSessionsQueriesConfig(args: {
queryClient: QueryClient;
providersToFetch: AgentProvider[] | null;
visible: boolean;
client: RecentProviderSessionsClient | null;
@@ -113,14 +115,24 @@ function buildSessionsQueriesConfig(args: {
limit: number;
hostDisconnectedMessage?: string;
}): SessionsQueryConfig[] {
const { providersToFetch, visible, client, cwd, query, limit, hostDisconnectedMessage } = args;
const { queryClient, providersToFetch, visible, client, cwd, query, limit } = args;
const { hostDisconnectedMessage } = args;
if (providersToFetch === null) return [];
const enabled = visible && Boolean(client);
const previousLimit = previousPageLimit(limit);
return providersToFetch.map((provider) => ({
queryKey: buildSessionsQueryKey({ cwd, query, limit, provider }),
enabled,
retry: false as const,
placeholderData: keepPreviousData,
// While Load more fetches the next page, keep showing the page it grew from. React Query's
// keepPreviousData cannot do this here: useQueries gives a changed key a new observer, which
// has no previous data, so the rows would vanish and the list would remount at the top.
placeholderData: () =>
previousLimit === null
? undefined
: queryClient.getQueryData<RecentSessionsResponse>(
buildSessionsQueryKey({ cwd, query, limit: previousLimit, provider }),
),
queryFn: async () => {
if (!client) {
throw new Error(hostDisconnectedMessage ?? i18n.t("workspace.terminal.hostDisconnected"));
@@ -522,6 +534,7 @@ export function ImportSessionSheet({
const queriesConfig = useMemo(
() =>
buildSessionsQueriesConfig({
queryClient,
providersToFetch,
visible,
client,
@@ -530,7 +543,7 @@ export function ImportSessionSheet({
limit: pageLimit,
hostDisconnectedMessage: t("workspace.terminal.hostDisconnected"),
}),
[providersToFetch, visible, client, scopeCwd, query, pageLimit, t],
[queryClient, providersToFetch, visible, client, scopeCwd, query, pageLimit, t],
);
const queries = useQueries({ queries: queriesConfig });
File diff suppressed because one or more lines are too long
@@ -215,6 +215,32 @@ describe("Mermaid sandbox runtime", () => {
expect(widths).toEqual([240, 350, 900]);
});
/**
* Agents often write a label that starts with a mention or holds an email address. Mermaid 11
* read the text up to the "@" as an edge id, so these diagrams failed to parse.
*/
it.each([
"flowchart LR\n F[@mention in any workspace] --> G[Look up token]",
"flowchart LR\n A[ops@example.com] --> B",
"flowchart LR\n A -->|@user approves| B",
"graph TD\n A(@x) --> B{@x?}",
])("renders a flowchart whose label contains an @: %s", async (source) => {
const frame = await mountRuntime();
const result = await render(frame, { revision: 1, source });
expect(result).toMatchObject({ type: "rendered", revision: 1, source });
});
it("still renders a flowchart edge id", async () => {
const frame = await mountRuntime();
const source = "flowchart LR\n A[Start] e1@--> B[End]";
const result = await render(frame, { revision: 1, source });
expect(result).toMatchObject({ type: "rendered", revision: 1, source });
});
it("coalesces queued input and never reports an obsolete result", async () => {
const frame = await mountRuntime();
const obsoleteSource = `flowchart TD\n${Array.from({ length: 250 }, (_, index) => `A${index} --> A${index + 1}`).join("\n")}`;
@@ -0,0 +1,103 @@
// @vitest-environment jsdom
import type { ReactNode } from "react";
import { cleanup, renderHook, waitFor } from "@testing-library/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { afterEach, beforeEach, expect, it } from "vitest";
import type { FileReadResult } from "@getpaseo/client/internal/daemon-client";
import { __setAttachmentStoreForTests } from "@/attachments/store";
import type { AttachmentStore } from "@/attachments/types";
import { useMarkdownSource, type MarkdownImageContext } from "./images";
import { PENDING_MARKDOWN_IMAGE } from "./source";
const memoryStore: AttachmentStore = {
storageType: "web-indexeddb",
async save(input) {
return {
id: input.id ?? "att_chart",
mimeType: input.mimeType ?? "image/png",
storageType: "web-indexeddb",
storageKey: input.id ?? "att_chart",
fileName: input.fileName,
createdAt: 1,
};
},
async encodeBase64() {
return "";
},
async resolvePreviewUrl() {
return "blob:chart";
},
async releasePreviewUrl() {},
async delete() {},
async garbageCollect() {},
};
function createHostFiles() {
const reads: { cwd: string; path: string }[] = [];
return {
reads,
async readFile(cwd: string, path: string): Promise<FileReadResult> {
reads.push({ cwd, path });
return {
kind: "image",
path,
mime: "image/png",
size: 4,
modifiedAt: "2026-11-18T00:00:00.000Z",
bytes: new Uint8Array([1, 2, 3, 4]),
};
},
};
}
beforeEach(() => {
__setAttachmentStoreForTests(memoryStore);
});
afterEach(() => {
cleanup();
__setAttachmentStoreForTests(null);
});
function renderMarkdownSource(text: string, initialProps: MarkdownImageContext) {
// No retries: a failed read settles at once. For a host's Markdown this is the state once the
// retries have run out on a host that is slow to connect.
const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } });
const wrapper = ({ children }: { children: ReactNode }) => (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);
const rendered = renderHook((props: MarkdownImageContext) => useMarkdownSource(text, props), {
wrapper,
initialProps,
});
return { ...rendered, queryClient };
}
it("waits for the host's client before reading a workspace image", async () => {
const context = { serverId: "srv_test", workspaceRoot: "/repo" };
const { result, rerender, queryClient } = renderMarkdownSource("![Chart](chart.png)", {
...context,
client: null,
});
await waitFor(() => {
expect(queryClient.isFetching()).toBe(0);
expect(result.current.markdown.replace(PENDING_MARKDOWN_IMAGE, "pending")).toBe(
"![Chart](<pending>)",
);
});
const files = createHostFiles();
rerender({ ...context, client: files });
await waitFor(() => expect(result.current.imageSources).toEqual({ "blob:chart": "chart.png" }));
expect(files.reads).toEqual([{ cwd: "/repo", path: "chart.png" }]);
});
it("shows the alt text of a file image in Markdown that belongs to no host", async () => {
const { result } = renderMarkdownSource("![Chart](/tmp/chart.png)", {});
await waitFor(() =>
expect(result.current.markdown.replace(PENDING_MARKDOWN_IMAGE, "pending")).toBe("Chart"),
);
});
@@ -81,7 +81,10 @@ export function useMarkdownSource(
const results = useFetchQueries(
acquisitions.map((acquisition, index) => ({
queryKey: ["markdownImage", acquisition?.key ?? sources[index]],
enabled: acquisition !== null,
// A host that hasn't connected yet has no client. Its images stay pending until it does: the
// key doesn't change when the client arrives, so a read that already failed would not run
// again. Markdown with no host has no client to wait for and falls back to its alt text.
enabled: acquisition !== null && (context.client != null || !context.serverId),
immutableWhen: () => true,
dataShape: "value",
gcTime: 0,
@@ -13,7 +13,7 @@ import { decodeMarkdownImage, getMarkdownImageStatus } from "./image-decoding";
import { describe, expect, it } from "vitest";
import { darkTheme, lightTheme } from "@/styles/theme";
import { createMarkdownStyles } from "./styles";
import { prepareMarkdownSource, PENDING_MARKDOWN_IMAGE } from "./source";
import { isRecognizedLink, prepareMarkdownSource, PENDING_MARKDOWN_IMAGE } from "./source";
import { normalizeMarkdownHtml } from "./html";
it("recognizes complete known commands in inline code", () => {
@@ -38,6 +38,13 @@ it("resolves authored root-relative links only when the target is a known comman
expect(matchCommandLink("https://example.com/code-review", "markdown", names)).toBeNull();
});
it("treats only a parsed path or code span as a link the author did not write", () => {
expect(isRecognizedLink({ sourceType: "text" })).toBe(true);
expect(isRecognizedLink({ sourceType: "inline-code" })).toBe(true);
expect(isRecognizedLink({ sourceType: "markdown" })).toBe(false);
expect(isRecognizedLink({})).toBe(false);
});
describe("shared Markdown source adaptation", () => {
it("keeps paragraphs, fences and quotes together for the library", () => {
const source = "First paragraph.\n\nSecond paragraph.\n\n```ts\nconst n = 1;\n```\n\n> Quote";
@@ -0,0 +1,61 @@
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { act } from "react";
import { createRoot, type Root } from "react-dom/client";
import { afterEach, beforeEach, expect, it } from "vitest";
import { i18n } from "@/i18n/i18next";
import { WEB_RENDERERS } from "./renderers.web";
const Link = WEB_RENDERERS.link;
const LINK_TEXT = "src/index.ts";
let root: Root;
let container: HTMLDivElement;
beforeEach(async () => {
await i18n.changeLanguage("en");
container = document.createElement("div");
document.body.append(container);
root = createRoot(container);
});
afterEach(() => {
act(() => root.unmount());
container.remove();
});
function anchorPropsFor(url: string) {
return { href: url };
}
function renderAnchor(link: { url: string; sourceType?: "markdown" | "text" | "inline-code" }) {
if (!Link) {
throw new Error("Expected a web link renderer");
}
const anchorProps = anchorPropsFor(link.url);
const client = new QueryClient();
act(() =>
root.render(
<QueryClientProvider client={client}>
<Link link={link} anchorProps={anchorProps}>
{LINK_TEXT}
</Link>
</QueryClientProvider>,
),
);
const anchor = container.querySelector("a");
if (!anchor) {
throw new Error("Expected a rendered link");
}
return anchor;
}
it("marks a link it recognized from a path for selection copy", () => {
const anchor = renderAnchor({ url: LINK_TEXT, sourceType: "text" });
expect(anchor.getAttribute("href")).toBe(LINK_TEXT);
expect(anchor.getAttribute("data-paseo-markdown-recognized-link")).toBe("true");
});
it("leaves an authored link wrapped", () => {
const anchor = renderAnchor({ url: "https://example.test/doc", sourceType: "markdown" });
expect(anchor.hasAttribute("data-paseo-markdown-recognized-link")).toBe(false);
});
@@ -7,12 +7,13 @@ import type {
} from "react-native-enriched-markdown";
import { StyleSheet, withUnistyles } from "react-native-unistyles";
import { useFileLink } from "@/assistant-file-links";
import { MARKDOWN_COPY_RECOGNIZED_LINK_ATTRIBUTE } from "@/assistant-selection-copy/markup";
import { useForgeShorthand } from "@/git/forge-shorthand";
import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip";
import { HighlightedCodeBlock } from "@/components/highlighted-code-block";
import type { Theme } from "@/styles/theme";
import { MermaidFence } from "./fence/mermaid";
import { markdownLinkSource } from "./source";
import { isRecognizedLink, markdownLinkSource } from "./source";
const ThemedCodeBlock = withUnistyles(HighlightedCodeBlock);
const codeStyle = (theme: Theme) => ({
@@ -50,9 +51,18 @@ function WebLink({ link, anchorProps, children }: LinkRendererProps) {
}),
[anchorProps.style, hovered],
);
// Selection copy pastes a link Paseo recognized as the text the reply showed.
const recognized = isRecognizedLink(link);
const copyAnchorProps = useMemo(
() =>
recognized
? { ...anchorProps, [MARKDOWN_COPY_RECOGNIZED_LINK_ATTRIBUTE]: "true" }
: anchorProps,
[anchorProps, recognized],
);
const anchor = (
<a
{...anchorProps}
{...copyAnchorProps}
href={forgeUrl ?? anchorProps.href}
style={anchorStyle}
onMouseEnter={handleMouseEnter}
+11 -1
View File
@@ -111,15 +111,25 @@ function collectInlineCodePaths(
return paths;
}
type LinkSourceType = "markdown" | "text" | "inline-code";
export function markdownLinkSource(
url: string,
sourceType?: "markdown" | "text" | "inline-code",
sourceType?: LinkSourceType,
): AssistantFileLinkSource {
if (sourceType === "inline-code") return { href: url, text: url, sourceType };
if (sourceType === "text") return { href: url, text: url, markup: "linkify" };
return { href: url, text: url };
}
/**
* Link recognition classifies matches as `text` or `inline-code`. The renderer
* classifies parser autolinks such as `www.example.com` as `markdown`.
*/
export function isRecognizedLink(link: { sourceType?: LinkSourceType }): boolean {
return link.sourceType === "text" || link.sourceType === "inline-code";
}
// Generated by scripts/generate-markdown-image-placeholder.mjs; reserves the image box.
export const PENDING_MARKDOWN_IMAGE =
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAKACAYAAAAMzckjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKBklEQVR42u3dXWscVRgH8ElFLK032tiCN1nSEiiowdKAn8DY2rR+AG965Qt4Y24Sm91kd5tN1ogQaGzzFfIl43Nki+s4u+m+ZWfC7weH0M6Z2QPn5s8zc87JMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgKvm/Px8YXd3d7Hdbi/Ns6UxxHAWzAgAwIxE4LrebDafxd/f9/b2TkvSujGep2lsZggAYIr29/c/iZDVKlHwy7dmryIIAEA2hcpfo9Folzj89YdAlUAAgEml174VCH//tBjrhhkDAMgmXvDxn2/+4t+von0dbXmOC0CW6/X6ehpL/9iiUtnNLAwBAMgmef27mK+ypfCXlac6uZ4fX6fTuWXmAADGD4C1fMCKCtzdsowvjaUgoNbMHADA+AFwuSBgLRsfAIAAmL/vRrSVVqu1mipy0a4JgAAAVzAAbm9v34nrP0a/17l7/oz25PT09H0BEADgigTAnZ2d+3H9eNg2LXHvb9E+FAABACoeAFPl76Lw13f/r9mUtmoRAAEA5hQAe69933nD5uj/UAAEAKhoAOwt+Pgr1+cwFoB8Hn9vx159j+Lvm9xzfhEAAQCqGwBXCvp80d8n/u957vofAiAAQEUDYCz+WC3oczv3nMe5I9tOBEAAgOpWAP93Wkh67fv2+tnZ2Xtp9W+uz74ACABQ3QB4Le3zl+uTvvl73qv8vSh4xvcCIABAhVcB1+v1jRFWAb+OZ3x60RnE0b6Lvj+kFhXFZ3Hu75IACABQkgCYTvgoeM07aAuYx4N+7+jo6GZc/3nI/T9tbm7eFAABAEpwEkg64SOubw6r/EUl79tswCbQW1tbH8XikPZFATL1SX0FQACAEpwFnMJd2uQ57fMX7SjaSVrwkb75G/baNwW6uP5yhI2kX/buEQABAOYcAEd2Qfh7Edd2BoXA2Gx6VQAEAKhQABwU/tLJIrGwZC37d5HJWv60kd7r4K4ACABQkQCYwl88rz3gW8G1fP+o9n1ZFAIFQACACgTAUcPfKCFQAAQAKFkAHDf8vWsIFAABAEoUAId98xftwQjjejAoBHY6nXtmDgCgBAFwWuGvPwSmqmHB874ycwAAcw6A0w5/b8Ur40f5Z8Yr4vtmDgBgjgFwVuHPSSAAACUMgJMu+BAAAQAqFABnHf4EQACAEgXAywh/AiAAQEkC4GWFPwEQAKAEAfAyw58ACAAw5wB42eFPAAQAmE3AquUDVrvdvluG8Ncb372CAFgzcwAA4wesxXzAqtfr62UIf73xfVNwFNwtMwcAML6FCFXdXIXtVQS79fSqNdpn0Q4LqnBv0ikdUS1cmkVLv52e32g0TnK/e5jGbNoAALKJqmxPC6p7pWwx1idmDABg8gB4PcJVswLhb+/4+PgDMwYAMKVvAaO1yhz+0hjNFADAFKXqWnx3txHf3XVLFPwO02tflT8AgNlaSCtt02KMg4ODWlrpGyFsZVYLPoYsBPnYgg8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBK+hsMQ7RDjzvGwwAAAABJRU5ErkJggg==";
@@ -86,6 +86,7 @@ import {
} from "@/components/ui/dropdown-menu";
import { ProjectLeadingVisual } from "@/components/sidebar/project-leading-visual";
import { useToast } from "@/contexts/toast-context";
import { SidebarToastClearance } from "@/components/sidebar/sidebar-toast-region";
import { getForgePresentation, normalizeForge } from "@/git/forge";
import { hasVisibleOrderChanged, mergeWithRemainder } from "@/utils/sidebar-reorder";
import { confirmDialog } from "@/utils/confirm-dialog";
@@ -2551,6 +2552,7 @@ function ProjectModeList({
: null}
{sidebarFilterEmpty ? <SidebarFilterEmptyState /> : projectBody}
{listFooterComponent}
<SidebarToastClearance />
</>
);
@@ -2592,8 +2594,7 @@ const styles = StyleSheet.create((theme) => ({
// Optical inset: aligns the visible Pinned/Workspaces glyph edge with the
// Schedules icon across the divider; their layout boxes have different insets.
paddingTop: 2,
// The sidebar toast floats over the list's end. Keep this padding the same whether or not
// a toast shows: changing it moves the rows when the toast leaves.
// Room for the sidebar toast comes from SidebarToastClearance at the end of the content.
paddingBottom: theme.spacing[4],
},
projectListContainer: {
@@ -34,6 +34,7 @@ import {
CircleX,
} from "lucide-react-native";
import { useToast } from "@/contexts/toast-context";
import { SidebarToastClearance } from "@/components/sidebar/sidebar-toast-region";
import { useSidebarWorkspaceRename } from "@/workspace-rename";
import { useWorkspaceClipboardActions } from "@/hooks/use-workspace-clipboard-actions";
import { redirectIfArchivingActiveWorkspace } from "@/utils/sidebar-workspace-archive-redirect";
@@ -270,6 +271,7 @@ export function SidebarStatusWorkspaceList({
onToggleWorkspacePin={onToggleWorkspacePin}
/>
)}
<SidebarToastClearance />
</>
);
@@ -1089,8 +1091,7 @@ const styles = StyleSheet.create((theme) => ({
paddingHorizontal: theme.spacing[2],
// Keep status mode's Pinned/Workspaces boundary identical to project mode.
paddingTop: 2,
// The sidebar toast floats over the list's end. Keep this padding the same whether or not
// a toast shows: changing it moves the rows when the toast leaves.
// Room for the sidebar toast comes from SidebarToastClearance at the end of the content.
paddingBottom: theme.spacing[4],
},
pinnedSection: {
@@ -1,9 +1,31 @@
import { useEffect, useMemo, useRef, type ReactNode } from "react";
import {
createContext,
useCallback,
useContext,
useEffect,
useMemo,
useRef,
type ReactNode,
} from "react";
import { View } from "react-native";
import Animated, {
useAnimatedStyle,
useSharedValue,
withTiming,
type SharedValue,
} from "react-native-reanimated";
import { StyleSheet } from "react-native-unistyles";
import { ToastViewport, useToastHost, type ToastApi } from "@/components/toast-host";
import { TOAST_FADE_MS, ToastViewport, useToastHost, type ToastApi } from "@/components/toast-host";
import { ToastApiProvider, useToast } from "@/contexts/toast-context";
interface SidebarToastCoverage {
toastVisible: boolean;
/** Distance from the region's bottom edge to the toast's top edge, as last laid out. */
height: SharedValue<number>;
}
const SidebarToastCoverageContext = createContext<SidebarToastCoverage | null>(null);
/**
* Shows toasts raised by the sidebar's list over its bottom edge, just above the footer.
*
@@ -15,6 +37,8 @@ export function SidebarToastRegion({ active, children }: { active: boolean; chil
const appToast = useToast();
const { api: sidebarToast, toast, dismiss } = useToastHost();
const activeRef = useRef(active);
const coverageHeight = useSharedValue(0);
const toastVisible = toast !== null;
useEffect(() => {
activeRef.current = active;
@@ -35,14 +59,58 @@ export function SidebarToastRegion({ active, children }: { active: boolean; chil
};
}, [appToast, sidebarToast]);
const coverage = useMemo<SidebarToastCoverage>(
() => ({ toastVisible, height: coverageHeight }),
[toastVisible, coverageHeight],
);
const handleCoverageChange = useCallback(
(height: number) => {
coverageHeight.value = height;
},
[coverageHeight],
);
return (
<View style={styles.region}>
<ToastApiProvider api={api}>{children}</ToastApiProvider>
<ToastViewport toast={toast} onDismiss={dismiss} placement="sidebar" />
<SidebarToastCoverageContext.Provider value={coverage}>
<ToastApiProvider api={api}>{children}</ToastApiProvider>
</SidebarToastCoverageContext.Provider>
<ToastViewport
toast={toast}
onDismiss={dismiss}
placement="sidebar"
onBottomCoverageChange={handleCoverageChange}
/>
</View>
);
}
/**
* Space at the end of a sidebar list that matches the toast covering it, so the last row can
* scroll clear of the toast. It sits below every row, so growing it moves nothing. It shrinks
* with the toast's fade, so a list scrolled to its end settles back with the toast instead of
* jumping.
*/
export function SidebarToastClearance() {
const coverage = useContext(SidebarToastCoverageContext);
return coverage ? <AnimatedClearance coverage={coverage} /> : null;
}
function AnimatedClearance({ coverage }: { coverage: SidebarToastCoverage }) {
const { toastVisible, height } = coverage;
const style = useAnimatedStyle(() => ({
height: withTiming(toastVisible ? height.value : 0, { duration: TOAST_FADE_MS }),
}));
return (
<Animated.View
style={style}
pointerEvents="none"
testID="sidebar-toast-clearance"
aria-hidden
/>
);
}
const styles = StyleSheet.create({
region: {
position: "relative",
+27 -6
View File
@@ -4,7 +4,14 @@ import {
} from "@/components/floating-header";
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
import { createPortal } from "react-dom";
import { Platform, StyleSheet as NativeStyleSheet, Text, ToastAndroid, View } from "react-native";
import {
Platform,
StyleSheet as NativeStyleSheet,
Text,
ToastAndroid,
View,
type LayoutChangeEvent,
} from "react-native";
import Animated, { FadeIn, FadeOut } from "react-native-reanimated";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { StyleSheet, withUnistyles } from "react-native-unistyles";
@@ -57,8 +64,11 @@ type ToastViewportPlacement = "app-shell" | "panel" | "sidebar";
const DEFAULT_DURATION_MS = 2200;
const noopDismiss: DismissToast = () => {};
const TOAST_MAX_WIDTH = 480;
const toastEntering = FadeIn.duration(140);
const toastExiting = FadeOut.duration(140);
/** How long a toast takes to fade in or out. */
export const TOAST_FADE_MS = 140;
const SIDEBAR_TOAST_INSET = SPACING[2];
const toastEntering = FadeIn.duration(TOAST_FADE_MS);
const toastExiting = FadeOut.duration(TOAST_FADE_MS);
const ThemedCheckCircle = withUnistyles(CheckCircle2);
const ThemedInfo = withUnistyles(Info);
const ThemedWarning = withUnistyles(AlertTriangle);
@@ -148,10 +158,13 @@ export function ToastViewport({
toast,
onDismiss,
placement = "app-shell",
onBottomCoverageChange,
}: {
toast: ToastState | null;
onDismiss: () => void;
placement?: ToastViewportPlacement;
/** Sidebar placement: reports the distance from the region's bottom edge to the toast's top. */
onBottomCoverageChange?: (coverage: number) => void;
}) {
const insets = useSafeAreaInsets();
const isMobile = useIsCompactFormFactor();
@@ -206,6 +219,13 @@ export function ToastViewport({
return clearTimer;
}, [clearTimer, durationMs, scheduleDismiss, toastId]);
const handleSidebarLayout = useCallback(
(event: LayoutChangeEvent) => {
onBottomCoverageChange?.(event.nativeEvent.layout.height + SIDEBAR_TOAST_INSET);
},
[onBottomCoverageChange],
);
const panelClearance = useFloatingHeaderOverlayClearance();
const headerHeight = isMobile ? HEADER_INNER_HEIGHT_MOBILE : HEADER_INNER_HEIGHT;
const headerTopPadding = isMobile ? HEADER_TOP_PADDING_MOBILE : 0;
@@ -227,6 +247,7 @@ export function ToastViewport({
}
pointerEvents="box-none"
collapsable={false}
onLayout={placement === "sidebar" ? handleSidebarLayout : undefined}
>
<View
style={placement === "sidebar" ? styles.sidebarWidthBoundary : styles.widthBoundary}
@@ -307,9 +328,9 @@ const animatedStyles = NativeStyleSheet.create({
},
sidebarContainer: {
position: "absolute",
left: SPACING[2],
right: SPACING[2],
bottom: SPACING[2],
left: SIDEBAR_TOAST_INSET,
right: SIDEBAR_TOAST_INSET,
bottom: SIDEBAR_TOAST_INSET,
zIndex: OVERLAY_Z.toast,
alignItems: "center",
},
@@ -21,7 +21,7 @@ import { highlightDiffLines } from "@/utils/diff-highlight";
import { hasMeaningfulToolCallDetail } from "@/utils/tool-call-detail-state";
import { inlineUnistylesStyle } from "@/styles/unistyles-inline-style";
import { CODE_SURFACE_DATASET } from "@/styles/code-surface";
import { extensionFromPath, highlightToKeyedLines } from "@/utils/highlight-cache";
import { highlightToKeyedLines } from "@/utils/highlight-cache";
import { HighlightedLines } from "./highlighted-content";
import { DiffViewer } from "./diff-viewer";
import { getCodeInsets } from "./code-insets";
@@ -226,7 +226,7 @@ function ScrollableTextSection({
startLine,
}: ScrollableContentProps) {
const keyedLines = useMemo(
() => (filePath ? highlightToKeyedLines(content, extensionFromPath(filePath)) : null),
() => highlightToKeyedLines(content, filePath ?? null),
[content, filePath],
);
const body = (
@@ -68,24 +68,27 @@ const theme = {
} as unknown as Theme;
describe("control sizing gate", () => {
it("is touch-sized in the compact layout or on a touch screen, and pointer-sized otherwise", () => {
expect(resolveControlSizing({ compactLayout: true, touchScreen: true })).toBe("touch");
expect(resolveControlSizing({ compactLayout: true, touchScreen: false })).toBe("touch");
expect(resolveControlSizing({ compactLayout: false, touchScreen: true })).toBe("touch");
expect(resolveControlSizing({ compactLayout: false, touchScreen: false })).toBe("pointer");
it("is touch-sized in the compact layout or where touch is the primary input, and pointer-sized otherwise", () => {
expect(resolveControlSizing({ compactLayout: true, touchPrimaryPointer: true })).toBe("touch");
expect(resolveControlSizing({ compactLayout: true, touchPrimaryPointer: false })).toBe("touch");
expect(resolveControlSizing({ compactLayout: false, touchPrimaryPointer: true })).toBe("touch");
expect(resolveControlSizing({ compactLayout: false, touchPrimaryPointer: false })).toBe(
"pointer",
);
});
it("gives a touch screen its touch sizes at every width", () => {
it("gives a touch primary pointer its touch sizes at every width", () => {
const sizes = { touch: 44, pointer: 32 };
// An iPad: touch-sized in the docked desktop layout too.
expect(bySizing(sizes, true)).toEqual({ xs: 44, md: 44 });
// A mouse-driven window: touch-sized only once it narrows into the compact layout.
// A mouse- or trackpad-driven window, touch screen or not: touch-sized only once it narrows
// into the compact layout.
expect(bySizing(sizes, false)).toEqual({ xs: 44, md: 32 });
});
it("keeps a device without a touch screen on pointer sizes from md up", () => {
// The unit runtime has no touch screen, which is the desktop that must not change.
it("keeps a device without a touch primary pointer on pointer sizes from md up", () => {
// The unit runtime has no touch primary pointer, which is the desktop that must not change.
expect(controlSizingForLayout(false)).toBe("pointer");
expect(controlSizingForLayout(true)).toBe("touch");
expect(CONTROL_HEIGHTS.md).toEqual({ xs: 44, md: 32 });
@@ -1,4 +1,4 @@
import { hasTouchScreen } from "@/hooks/pointer-capabilities";
import { hasTouchPrimaryPointer } from "@/hooks/pointer-capabilities";
// The sizing gate, apart from the control sizes so that low-level modules such as
// `constants/layout` can size by it without loading the theme. Import it through
@@ -14,28 +14,32 @@ export type ControlSizing = "touch" | "pointer";
export interface ControlSizingFacts {
/** The layout is below the `md` breakpoint. */
compactLayout: boolean;
/** The device has a touch screen; see `hasTouchScreen`. */
touchScreen: boolean;
/** Touch is the device's primary input; see `hasTouchPrimaryPointer`. */
touchPrimaryPointer: boolean;
}
/**
* The one sizing gate: touch-sized in the compact layout or on any device with a touch screen,
* pointer-sized otherwise. A touch screen keeps touch sizing when a mouse or keyboard is attached.
* The one sizing gate: touch-sized in the compact layout or where touch is the primary input,
* pointer-sized otherwise. An iPad keeps touch sizing with a trackpad attached; a laptop with a
* touch screen that its trackpad drives is pointer-sized.
*/
export function resolveControlSizing({
compactLayout,
touchScreen,
touchPrimaryPointer,
}: ControlSizingFacts): ControlSizing {
if (compactLayout || touchScreen) return "touch";
if (compactLayout || touchPrimaryPointer) return "touch";
return "pointer";
}
// Read once, so attaching a mouse or keyboard later never flips the sizing.
const DEVICE_HAS_TOUCH_SCREEN = hasTouchScreen();
const DEVICE_HAS_TOUCH_PRIMARY_POINTER = hasTouchPrimaryPointer();
/** The sizing on this device for a layout, for code that sizes outside a stylesheet. */
export function controlSizingForLayout(compactLayout: boolean): ControlSizing {
return resolveControlSizing({ compactLayout, touchScreen: DEVICE_HAS_TOUCH_SCREEN });
return resolveControlSizing({
compactLayout,
touchPrimaryPointer: DEVICE_HAS_TOUCH_PRIMARY_POINTER,
});
}
/** A Unistyles breakpoint value: one number in the compact layout, another from `md` up. */
@@ -51,11 +55,11 @@ export type SizingValue = Record<ControlSizing, number>;
*/
export function bySizing(
sizes: SizingValue,
touchScreen: boolean = DEVICE_HAS_TOUCH_SCREEN,
touchPrimaryPointer: boolean = DEVICE_HAS_TOUCH_PRIMARY_POINTER,
): LayoutValue {
return {
xs: sizes[resolveControlSizing({ compactLayout: true, touchScreen })],
md: sizes[resolveControlSizing({ compactLayout: false, touchScreen })],
xs: sizes[resolveControlSizing({ compactLayout: true, touchPrimaryPointer })],
md: sizes[resolveControlSizing({ compactLayout: false, touchPrimaryPointer })],
};
}
@@ -82,10 +82,10 @@ describe("ComposerControls", () => {
expect(trigger.textContent).not.toContain("Large");
});
it("flips a toggle on press in the toolbar", () => {
it("keeps the toolbar toggle name and flips it on press", () => {
const onChange = vi.fn();
renderControls([{ ...base, type: "toggle", value: true, onChange }]);
fireEvent.click(screen.getByRole("button", { name: "Context" }));
fireEvent.click(screen.getByRole("button", { name: /^Context$/ }));
expect(onChange).toHaveBeenCalledWith(false);
});
@@ -94,6 +94,12 @@ describe("ComposerControls", () => {
expect(screen.getByRole("button", { name: "Context" }).textContent).toContain("On");
});
it("keeps the provider's tooltip for a toolbar toggle", () => {
const tooltip = "Fast is enabled but does not apply to this model.";
renderControls([{ ...base, type: "toggle", value: true, tooltip, onChange: () => undefined }]);
expect(screen.getByRole("button", { name: tooltip })).toBeDefined();
});
it("gives a sheet row's value the row's width, so a short value is not truncated", () => {
const toast = createToast();
render(
@@ -157,6 +163,8 @@ describe("ComposerControls", () => {
});
const FAST_ON = { fast_mode: true };
const ULTRACODE_ON = { ultracode: true };
const ignoreOption = () => undefined;
describe("provider option controls", () => {
const fastMode: AgentOptionControl = {
@@ -173,7 +181,11 @@ describe("provider option controls", () => {
onSetOption: (key: string, value: unknown) => void;
}) {
const optionControls = React.useMemo(
() => ({ controls: [fastMode], options, onSetOption }),
() => ({
controls: [fastMode, { key: "ultracode", label: "Ultracode", type: "toggle" as const }],
options,
onSetOption,
}),
[onSetOption, options],
);
const items = useAgentControlItems({
@@ -197,4 +209,9 @@ describe("provider option controls", () => {
fireEvent.click(screen.getByTestId("agent-feature-fast_mode"));
expect(writes).toEqual([["fast_mode", false]]);
});
it("announces the state of a provider toggle with no custom tooltip", () => {
render(<OptionControls options={ULTRACODE_ON} onSetOption={ignoreOption} />);
expect(screen.getByRole("button", { name: "Ultracode: On" })).toBeDefined();
});
});
@@ -28,7 +28,7 @@ interface ComposerControlBase {
title: string;
icon: AgentControlIcon;
/** Tints the icon; muted when absent. */
highlight?: "blue" | "green" | "yellow";
highlight?: "blue" | "green" | "purple" | "yellow";
/** Defaults to the title, or to "title: choice" on an icon-only select. */
tooltip?: string;
/** Defaults to the tooltip. */
@@ -393,6 +393,7 @@ function ComposerControlSlot({
const styles = StyleSheet.create((theme) => ({
fieldIcon: { color: theme.colors.foregroundMuted },
blue: { color: theme.colors.palette.blue[400] },
purple: { color: theme.colors.palette.purple[500] },
green: { color: theme.colors.palette.green[400] },
yellow: { color: theme.colors.palette.yellow[400] },
tooltipText: {
@@ -33,6 +33,8 @@ function getFeatureHighlight(
function toFeatureItem(
control: AgentOptionControl,
optionControls: ComposerOptionControls,
surface: ComposerControlSurface,
t: TFunction,
): ComposerControlItem {
const { options, onSetOption } = optionControls;
const base = {
@@ -43,11 +45,15 @@ function toFeatureItem(
testID: `agent-feature-${control.key}`,
};
if (control.type === "toggle") {
const enabled = readToggleOption(control, options);
const stateLabel = enabled ? t("agentControls.features.on") : t("agentControls.features.off");
return {
...base,
type: "toggle",
tooltip: getControlTooltip(control),
value: readToggleOption(control, options),
tooltip:
control.tooltip ??
(surface === "toolbar" ? `${control.label}: ${stateLabel}` : control.label),
value: enabled,
onChange: (value) => onSetOption(control.key, value),
};
}
@@ -92,9 +98,11 @@ export function useAgentControlItems({
const features = useMemo(
() =>
optionControls
? optionControls.controls.map((control) => toFeatureItem(control, optionControls))
? optionControls.controls.map((control) =>
toFeatureItem(control, optionControls, surface, t),
)
: [],
[optionControls],
[optionControls, surface, t],
);
return { thinking: thinkingItem, features };
}
@@ -1316,8 +1316,7 @@ export function DraftAgentControls({
return toThinkingControlOptions(thinkingOptions);
}, [thinkingOptions]);
const effectiveSelectedThinkingOption =
selectedThinkingOptionId || mappedThinkingOptions[0]?.id || undefined;
const effectiveSelectedThinkingOption = selectedThinkingOptionId || mappedThinkingOptions[0]?.id;
const modelOptions = useMemo<AgentControlOption[]>(
() =>
@@ -20,6 +20,7 @@ describe("feature metadata helpers", () => {
expect(getFeatureHighlightColor("fast_mode")).toBe("yellow");
expect(getFeatureHighlightColor("service_tier")).toBe("yellow");
expect(getFeatureHighlightColor("plan_mode")).toBe("blue");
expect(getFeatureHighlightColor("ultracode")).toBe("purple");
expect(getFeatureHighlightColor("other")).toBe("default");
});
});
@@ -8,7 +8,7 @@ import {
} from "@/agent-controls/policy";
export type ExplainedAgentControl = "mode" | "model" | "thinking";
export type FeatureHighlightColor = "blue" | "default" | "green" | "yellow";
export type FeatureHighlightColor = "blue" | "default" | "green" | "purple" | "yellow";
export type AgentControlHintKey =
| "agentControls.hints.thinking"
| "agentControls.hints.model"
@@ -48,6 +48,8 @@ export function getFeatureHighlightColor(featureId: string): FeatureHighlightCol
return "yellow";
case "auto_accept":
return "green";
case "ultracode":
return "purple";
case PLAN_MODE_FEATURE_ID:
return "blue";
default:
+20 -2
View File
@@ -22,6 +22,7 @@ import {
resolveEffectiveComposerThinkingOptionId,
type ProviderSelectionState,
} from "@/provider-selection/provider-selection";
import { findThinkingOptionReplacement } from "@/provider-selection/resolve-agent-form";
import { useDraftStore, type DraftInput } from "@/stores/draft-store";
import { AfterPaintPublication } from "@/composer/after-paint-publication";
import { useShallow } from "zustand/shallow";
@@ -293,6 +294,7 @@ export function useAgentInputDraft(input: UseAgentInputDraftInput): AgentInputDr
options: draftOptions,
shownOptions: draftShownOptions,
setOption: setDraftOption,
retainLegacyUltracode,
applyProfile: applyProfileOptions,
} = useDraftProviderOptions({
serverId: formState.selectedServerId,
@@ -312,6 +314,11 @@ export function useAgentInputDraft(input: UseAgentInputDraftInput): AgentInputDr
},
[applyProfileOptions, formState],
);
const setDraftThinking = useCallback(
(thinkingOptionId: string) =>
formState.setThinkingOptionFromUser(thinkingOptionId, retainLegacyUltracode()),
[formState, retainLegacyUltracode],
);
const commandDraft = useMemo(
() =>
@@ -330,8 +337,18 @@ export function useAgentInputDraft(input: UseAgentInputDraftInput): AgentInputDr
return null;
}
return {
// COMPAT(claudeUltracodePreference): added in v0.17.0, remove after 2027-05-18.
const draftForm = {
...formState,
selectedThinkingOptionId:
findThinkingOptionReplacement(
formState.availableThinkingOptions,
formState.selectedThinkingOptionId,
) ?? formState.selectedThinkingOptionId,
setThinkingOptionFromUser: setDraftThinking,
};
return {
...draftForm,
workingDir,
effectiveModeId,
effectiveModelId,
@@ -339,7 +356,7 @@ export function useAgentInputDraft(input: UseAgentInputDraftInput): AgentInputDr
providerOptions: draftOptions,
metadata,
agentControls: buildDraftAgentControls({
formState,
formState: draftForm,
optionControls: draftOptionControls,
options: draftShownOptions,
onSetOption: setDraftOption,
@@ -360,6 +377,7 @@ export function useAgentInputDraft(input: UseAgentInputDraftInput): AgentInputDr
draftOptions,
draftShownOptions,
setDraftOption,
setDraftThinking,
applyDraftAgentProfile,
formState,
metadata,
+1 -10
View File
@@ -1,7 +1,4 @@
import { PluginClientStateProvider } from "@getpaseo/plugin/client/host";
import type { PluginFilePanelProps } from "@getpaseo/plugin/client";
import { useMemo } from "react";
import { createPluginClientStateSource } from "@/plugins/client-state/source";
import { PluginInstallationProvider } from "@/plugins/installation-provider";
import { SurfaceErrorBoundary } from "@/plugins/surface-error-boundary";
import type { PluginFilePanel } from "./panels";
@@ -11,17 +8,11 @@ export function PluginFilePanelHost({
...props
}: PluginFilePanelProps & { panel: PluginFilePanel }) {
const { plugin, contribution } = panel;
const stateSource = useMemo(
() => createPluginClientStateSource(plugin.serverId),
[plugin.serverId],
);
const Component = contribution.Component;
return (
<SurfaceErrorBoundary installation={plugin} Surface={Component} key={panel.id}>
<PluginInstallationProvider plugin={plugin}>
<PluginClientStateProvider source={stateSource}>
<Component {...props} />
</PluginClientStateProvider>
<Component {...props} />
</PluginInstallationProvider>
</SurfaceErrorBoundary>
);
@@ -23,10 +23,18 @@ class FakeMediaQueryList {
}
}
function createFakeDisplay(initial: { finePointer: boolean; touchScreen: boolean }) {
function createFakeDisplay(initial: {
finePointer: boolean;
touchScreen: boolean;
touchPrimaryPointer?: boolean;
}) {
const queries = {
finePointer: new FakeMediaQueryList("(hover: hover) and (pointer: fine)", initial.finePointer),
touchScreen: new FakeMediaQueryList("(any-pointer: coarse)", initial.touchScreen),
touchPrimaryPointer: new FakeMediaQueryList(
"(pointer: coarse)",
initial.touchPrimaryPointer ?? false,
),
};
const matchMedia = (query: string) => {
const match = Object.values(queries).find((list) => list.media === query);
@@ -75,3 +83,25 @@ describe("pointer capabilities", () => {
});
});
});
describe("hasTouchPrimaryPointer", () => {
it("is false on a touch-screen laptop driven by its trackpad", () => {
const display = createFakeDisplay({ finePointer: true, touchScreen: true });
expect(createPointerCapabilitiesSource(display.matchMedia).hasTouchPrimaryPointer()).toBe(
false,
);
});
it("is true when the primary pointer is coarse", () => {
const display = createFakeDisplay({
finePointer: false,
touchScreen: true,
touchPrimaryPointer: true,
});
expect(createPointerCapabilitiesSource(display.matchMedia).hasTouchPrimaryPointer()).toBe(true);
});
it("is false without media queries", () => {
expect(createPointerCapabilitiesSource(null).hasTouchPrimaryPointer()).toBe(false);
});
});
+12 -6
View File
@@ -8,6 +8,7 @@ import { isWeb } from "@/constants/platform";
// (detachable keyboards, tablet mode, devtools touch emulation).
const FINE_POINTER_QUERY = "(hover: hover) and (pointer: fine)";
const TOUCH_SCREEN_QUERY = "(any-pointer: coarse)";
const TOUCH_PRIMARY_POINTER_QUERY = "(pointer: coarse)";
export interface PointerCapabilities {
/** A mouse-like pointer drives the UI. */
@@ -21,6 +22,7 @@ type MatchMedia = (query: string) => MediaQueryList;
export interface PointerCapabilitiesSource {
getSnapshot: () => PointerCapabilities;
subscribe: (onChange: () => void) => () => void;
hasTouchPrimaryPointer: () => boolean;
}
export function createPointerCapabilitiesSource(
@@ -28,9 +30,11 @@ export function createPointerCapabilitiesSource(
): PointerCapabilitiesSource {
const finePointerQuery = matchMedia?.(FINE_POINTER_QUERY) ?? null;
const touchScreenQuery = matchMedia?.(TOUCH_SCREEN_QUERY) ?? null;
const touchPrimaryPointerQuery = matchMedia?.(TOUCH_PRIMARY_POINTER_QUERY) ?? null;
let snapshot: PointerCapabilities = { finePointer: false, touchScreen: false };
return {
hasTouchPrimaryPointer: () => touchPrimaryPointerQuery?.matches ?? false,
getSnapshot() {
const finePointer = finePointerQuery?.matches ?? false;
const touchScreen = touchScreenQuery?.matches ?? false;
@@ -61,6 +65,7 @@ const NATIVE_POINTER_CAPABILITIES: PointerCapabilities = { finePointer: false, t
const nativeSource: PointerCapabilitiesSource = {
getSnapshot: () => NATIVE_POINTER_CAPABILITIES,
subscribe: () => () => {},
hasTouchPrimaryPointer: () => true,
};
const source = isWeb ? createPointerCapabilitiesSource(browserMatchMedia()) : nativeSource;
@@ -79,10 +84,11 @@ export function hasFinePointer(): boolean {
return source.getSnapshot().finePointer;
}
/** Touch sizing remains enabled on hybrid browsers that report touch points. */
export function hasTouchScreen(): boolean {
return (
source.getSnapshot().touchScreen ||
(isWeb && typeof window !== "undefined" && window.navigator.maxTouchPoints > 0)
);
/**
* True when touch is the primary input, read at call time. iPadOS keeps touch primary with a
* trackpad attached; a laptop with a touch screen that its trackpad drives reports a fine primary
* pointer.
*/
export function hasTouchPrimaryPointer(): boolean {
return source.hasTouchPrimaryPointer();
}
@@ -4,6 +4,7 @@ import type {
AgentMode,
AgentModelDefinition,
AgentProvider,
ProviderOptions,
ProviderSnapshotEntry,
} from "@getpaseo/protocol/agent-types";
import { buildProviderDefinitions } from "@/utils/provider-definitions";
@@ -58,7 +59,7 @@ export interface UseAgentFormStateResult {
selectedModel: string;
setModelFromUser: (modelId: string) => void;
selectedThinkingOptionId: string;
setThinkingOptionFromUser: (thinkingOptionId: string) => void;
setThinkingOptionFromUser: (thinkingOptionId: string, retainedOptions?: ProviderOptions) => void;
workingDir: string;
providerDefinitions: AgentProviderDefinition[];
providerDefinitionMap: Map<AgentProvider, AgentProviderDefinition>;
@@ -419,7 +420,7 @@ export function useAgentFormState(options: UseAgentFormStateOptions): UseAgentFo
);
const setThinkingOptionFromUser = useCallback(
(thinkingOptionId: string) => {
(thinkingOptionId: string, retainedOptions?: ProviderOptions) => {
dispatch({ type: "SET_THINKING_OPTION_FROM_USER", thinkingOptionId });
const { provider, model: modelId } = formStore.getState().form;
if (provider && modelId) {
@@ -431,6 +432,7 @@ export function useAgentFormState(options: UseAgentFormStateOptions): UseAgentFo
thinkingByModel: {
[modelId]: thinkingOptionId,
},
options: retainedOptions,
},
}),
);
@@ -69,6 +69,14 @@ export function useDraftProviderOptions(input: {
[draftConfig, serverId],
);
const requestKey = JSON.stringify(queryKey);
// COMPAT(claudeUltracodePreference): added in v0.17.0, remove after 2027-05-18.
const retainLegacyUltracode = useCallback(
() =>
thinkingOptionId === "ultracode"
? model.retainResolvedOption("ultracode", requestKey)
: undefined,
[model, requestKey, thinkingOptionId],
);
const { data } = useFetchQuery({
queryKey,
@@ -129,6 +137,7 @@ export function useDraftProviderOptions(input: {
options: ownOptions,
shownOptions,
setOption,
retainLegacyUltracode,
applyProfile: model.applyProfile,
};
}
+11 -2
View File
@@ -6,6 +6,7 @@ import { createMacDockBadgeCountSelector } from "@/utils/desktop-badge-state";
import { createFaviconStatusSelector, type FaviconStatus } from "@/utils/favicon-status";
import { isNative } from "@/constants/platform";
import { useSessionStore } from "@/stores/session-store";
import { useSidebarViewStore } from "@/stores/sidebar-view-store";
import { useHosts } from "@/runtime/host-runtime";
type ColorScheme = "dark" | "light";
@@ -85,8 +86,16 @@ export function useFaviconStatus() {
// The favicon reads the whole fleet, so it has to keep every host's directory loading even
// though it no longer subscribes to the agent maps.
useAllDirectoryDemand({ serverIds, enabled: !isNative });
const selectFaviconStatus = useMemo(createFaviconStatusSelector, []);
const selectMacDockBadgeCount = useMemo(createMacDockBadgeCountSelector, []);
// Background workspaces count exactly when the sidebar shows them.
const showBackground = useSidebarViewStore((state) => state.showBackground);
const selectFaviconStatus = useMemo(
() => createFaviconStatusSelector({ showBackground }),
[showBackground],
);
const selectMacDockBadgeCount = useMemo(
() => createMacDockBadgeCountSelector({ showBackground }),
[showBackground],
);
const status = useSessionStore(selectFaviconStatus);
const dockBadgeCount = useSessionStore(selectMacDockBadgeCount);
const [colorScheme, setColorScheme] = useState<ColorScheme>(getSystemColorScheme);
+3 -2
View File
@@ -394,6 +394,7 @@ export const ar: TranslationResources = {
otherPlaceholder: "آخر...",
},
backgroundWork: {
heartbeat: "نبضة دورية",
pillOne: "مهمة واحدة في الخلفية",
pillMany: "{{count}} مهمة في الخلفية",
notRunning: "لم يعد قيد التشغيل",
@@ -484,8 +485,7 @@ export const ar: TranslationResources = {
archivedTitle: "مساحة العمل مؤرشفة",
restoreDescription:
"استعد {{workspaceName}} للعودة إلى وكلائها. ستستخدم شجرة العمل الفرع {{branch}}.",
restoreWithoutBranchDescription:
"استعد {{workspaceName}} للعودة إلى وكلائها. سيبدأ فرع جديد من الفرع الأساسي المحفوظ أو الفرع الافتراضي للمستودع.",
restoreWithoutBranchDescription: "استعد {{workspaceName}} للعودة إلى وكلائها.",
unarchiveDescription: "{{workspaceName}} مؤرشفة. ألغِ أرشفتها لفتحها مجددًا.",
restoreAction: "استعادة",
unarchiveAction: "إلغاء الأرشفة",
@@ -2017,6 +2017,7 @@ export const ar: TranslationResources = {
hostUnavailable: "مضيف التنزيل غير متاح.",
cancelled: "تم إلغاء التنزيل.",
failed: "فشل تنزيل الملف.",
httpFailed: "فشل تنزيل الملف (HTTP {{status}}).",
shareFile: "مشاركة الملف",
shareFileNamed: "مشاركة{{fileName}}",
},
+3 -2
View File
@@ -393,6 +393,7 @@ export const en = {
otherPlaceholder: "Other...",
},
backgroundWork: {
heartbeat: "Heartbeat",
pillOne: "1 background task",
pillMany: "{{count}} background tasks",
notRunning: "No longer running",
@@ -483,8 +484,7 @@ export const en = {
archivedTitle: "Workspace archived",
restoreDescription:
"Restore {{workspaceName}} to return to its agents. Its worktree will use branch {{branch}}.",
restoreWithoutBranchDescription:
"Restore {{workspaceName}} to return to its agents. A new branch will start from the saved base or the repository default.",
restoreWithoutBranchDescription: "Restore {{workspaceName}} to return to its agents.",
unarchiveDescription: "{{workspaceName}} is archived. Unarchive it to open it again.",
restoreAction: "Restore",
unarchiveAction: "Unarchive",
@@ -2045,6 +2045,7 @@ export const en = {
hostUnavailable: "Download host is unavailable.",
cancelled: "Download was cancelled.",
failed: "Failed to download file.",
httpFailed: "Failed to download file (HTTP {{status}}).",
shareFile: "Share file",
shareFileNamed: "Share {{fileName}}",
},
+3 -2
View File
@@ -399,6 +399,7 @@ export const es: TranslationResources = {
otherPlaceholder: "Otro...",
},
backgroundWork: {
heartbeat: "Latido",
pillOne: "1 tarea en segundo plano",
pillMany: "{{count}} tareas en segundo plano",
notRunning: "Ya no está en ejecución",
@@ -489,8 +490,7 @@ export const es: TranslationResources = {
archivedTitle: "Espacio de trabajo archivado",
restoreDescription:
"Restaura {{workspaceName}} para volver a sus agentes. Su worktree usará la rama {{branch}}.",
restoreWithoutBranchDescription:
"Restaura {{workspaceName}} para volver a sus agentes. Se creará una rama nueva desde la base guardada o la rama predeterminada del repositorio.",
restoreWithoutBranchDescription: "Restaura {{workspaceName}} para volver a sus agentes.",
unarchiveDescription:
"{{workspaceName}} está archivado. Desarchívalo para volver a abrirlo.",
restoreAction: "Restaurar",
@@ -2066,6 +2066,7 @@ export const es: TranslationResources = {
hostUnavailable: "El host de descarga no está disponible.",
cancelled: "La descarga fue cancelada.",
failed: "No se pudo descargar el archivo.",
httpFailed: "No se pudo descargar el archivo (HTTP {{status}}).",
shareFile: "compartir archivo",
shareFileNamed: "Compartir{{fileName}}",
},
+3 -2
View File
@@ -399,6 +399,7 @@ export const fr: TranslationResources = {
otherPlaceholder: "Autre…",
},
backgroundWork: {
heartbeat: "Battement périodique",
pillOne: "1 tâche en arrière-plan",
pillMany: "{{count}} tâches en arrière-plan",
notRunning: "N’est plus en cours",
@@ -489,8 +490,7 @@ export const fr: TranslationResources = {
archivedTitle: "Espace de travail archivé",
restoreDescription:
"Restaurez {{workspaceName}} pour retrouver ses agents. Son worktree utilisera la branche {{branch}}.",
restoreWithoutBranchDescription:
"Restaurez {{workspaceName}} pour retrouver ses agents. Une nouvelle branche partira de la base enregistrée ou de la branche par défaut du dépôt.",
restoreWithoutBranchDescription: "Restaurez {{workspaceName}} pour retrouver ses agents.",
unarchiveDescription: "{{workspaceName}} est archivé. Désarchivez-le pour le rouvrir.",
restoreAction: "Restaurer",
unarchiveAction: "Désarchiver",
@@ -2065,6 +2065,7 @@ export const fr: TranslationResources = {
hostUnavailable: "L’hôte de téléchargement est indisponible.",
cancelled: "Téléchargement annulé.",
failed: "Impossible de télécharger le fichier.",
httpFailed: "Impossible de télécharger le fichier (HTTP {{status}}).",
shareFile: "Partager le fichier",
shareFileNamed: "Partager {{fileName}}",
},
+3 -2
View File
@@ -399,6 +399,7 @@ export const ja: TranslationResources = {
otherPlaceholder: "その他...",
},
backgroundWork: {
heartbeat: "ハートビート",
pillOne: "バックグラウンドタスク1件",
pillMany: "バックグラウンドタスク{{count}}件",
notRunning: "実行は終了しました",
@@ -489,8 +490,7 @@ export const ja: TranslationResources = {
archivedTitle: "ワークスペースはアーカイブ済みです",
restoreDescription:
"{{workspaceName}} を復元してエージェントに戻ります。worktree ではブランチ {{branch}} を使用します。",
restoreWithoutBranchDescription:
"{{workspaceName}} を復元してエージェントに戻ります。保存されたベース、またはリポジトリのデフォルトブランチから新しいブランチを作成します。",
restoreWithoutBranchDescription: "{{workspaceName}} を復元してエージェントに戻ります。",
unarchiveDescription:
"{{workspaceName}} はアーカイブされています。再度開くにはアーカイブを解除してください。",
restoreAction: "復元",
@@ -2038,6 +2038,7 @@ export const ja: TranslationResources = {
hostUnavailable: "ダウンロードホストが利用できません。",
cancelled: "ダウンロードがキャンセルされました。",
failed: "ファイルのダウンロードに失敗しました。",
httpFailed: "ファイルのダウンロードに失敗しました (HTTP {{status}}).",
shareFile: "ファイルを共有",
shareFileNamed: "{{fileName}}を共有",
},
+3 -2
View File
@@ -395,6 +395,7 @@ export const ko: TranslationResources = {
otherPlaceholder: "기타...",
},
backgroundWork: {
heartbeat: "하트비트",
pillOne: "백그라운드 작업 1개",
pillMany: "백그라운드 작업 {{count}}개",
notRunning: "더 이상 실행 중이 아님",
@@ -485,8 +486,7 @@ export const ko: TranslationResources = {
archivedTitle: "워크스페이스가 보관되었습니다",
restoreDescription:
"{{workspaceName}}를 복원하여 에이전트로 돌아갑니다. 워크트리는 {{branch}} 브랜치를 사용합니다.",
restoreWithoutBranchDescription:
"{{workspaceName}}를 복원하여 에이전트로 돌아갑니다. 저장된 기반 브랜치 또는 저장소 기본 브랜치에서 새 브랜치를 만듭니다.",
restoreWithoutBranchDescription: "{{workspaceName}}를 복원하여 에이전트로 돌아갑니다.",
unarchiveDescription: "{{workspaceName}}가 보관되었습니다. 다시 열려면 보관을 취소하세요.",
restoreAction: "복원",
unarchiveAction: "보관 취소",
@@ -2028,6 +2028,7 @@ export const ko: TranslationResources = {
hostUnavailable: "다운로드 호스트를 사용할 수 없습니다.",
cancelled: "다운로드가 취소되었습니다.",
failed: "파일을 다운로드하지 못했습니다.",
httpFailed: "파일을 다운로드하지 못했습니다 (HTTP {{status}}).",
shareFile: "파일 공유",
shareFileNamed: "{{fileName}} 공유",
},
+3 -2
View File
@@ -398,6 +398,7 @@ export const ptBR: TranslationResources = {
otherPlaceholder: "Outro...",
},
backgroundWork: {
heartbeat: "Batimento",
pillOne: "1 tarefa em segundo plano",
pillMany: "{{count}} tarefas em segundo plano",
notRunning: "Não está mais em execução",
@@ -488,8 +489,7 @@ export const ptBR: TranslationResources = {
archivedTitle: "Workspace arquivado",
restoreDescription:
"Restaure {{workspaceName}} para voltar aos seus agentes. A worktree usará a branch {{branch}}.",
restoreWithoutBranchDescription:
"Restaure {{workspaceName}} para voltar aos seus agentes. Uma nova branch partirá da base salva ou da branch padrão do repositório.",
restoreWithoutBranchDescription: "Restaure {{workspaceName}} para voltar aos seus agentes.",
unarchiveDescription:
"{{workspaceName}} está arquivado. Desarquive-o para abri-lo novamente.",
restoreAction: "Restaurar",
@@ -2051,6 +2051,7 @@ export const ptBR: TranslationResources = {
hostUnavailable: "Host de download indisponível.",
cancelled: "Download cancelado.",
failed: "Falha ao baixar arquivo.",
httpFailed: "Falha ao baixar arquivo (HTTP {{status}}).",
shareFile: "Compartilhar arquivo",
shareFileNamed: "Compartilhar {{fileName}}",
},
+3 -1
View File
@@ -398,6 +398,7 @@ export const ru: TranslationResources = {
otherPlaceholder: "Другой ответ...",
},
backgroundWork: {
heartbeat: "Периодический сигнал",
pillOne: "1 фоновая задача",
pillMany: "Фоновые задачи: {{count}}",
notRunning: "Больше не выполняется",
@@ -489,7 +490,7 @@ export const ru: TranslationResources = {
restoreDescription:
"Восстановите «{{workspaceName}}», чтобы вернуться к его агентам. Worktree будет использовать ветку {{branch}}.",
restoreWithoutBranchDescription:
"Восстановите «{{workspaceName}}», чтобы вернуться к его агентам. Новая ветка будет создана от сохранённой базовой или ветки репозитория по умолчанию.",
"Восстановите «{{workspaceName}}», чтобы вернуться к его агентам.",
unarchiveDescription:
"Рабочее пространство «{{workspaceName}}» находится в архиве. Разархивируйте его, чтобы снова открыть.",
restoreAction: "Восстановить",
@@ -2051,6 +2052,7 @@ export const ru: TranslationResources = {
hostUnavailable: "Хост загрузки недоступен.",
cancelled: "Загрузка отменена.",
failed: "Не удалось загрузить файл.",
httpFailed: "Не удалось загрузить файл (HTTP {{status}}).",
shareFile: "Поделиться файлом",
shareFileNamed: "Поделиться {{fileName}}",
},
+3 -2
View File
@@ -394,6 +394,7 @@ export const zhCN: TranslationResources = {
otherPlaceholder: "其他...",
},
backgroundWork: {
heartbeat: "心跳",
pillOne: "1 个后台任务",
pillMany: "{{count}} 个后台任务",
notRunning: "已不再运行",
@@ -484,8 +485,7 @@ export const zhCN: TranslationResources = {
archivedTitle: "Workspace 已归档",
restoreDescription:
"恢复 {{workspaceName}} 以返回其中的代理。worktree 将使用分支 {{branch}}。",
restoreWithoutBranchDescription:
"恢复 {{workspaceName}} 以返回其中的代理。新分支将从保存的基准分支或仓库默认分支创建。",
restoreWithoutBranchDescription: "恢复 {{workspaceName}} 以返回其中的代理。",
unarchiveDescription: "{{workspaceName}} 已归档。取消归档以重新打开。",
restoreAction: "恢复",
unarchiveAction: "取消归档",
@@ -1994,6 +1994,7 @@ export const zhCN: TranslationResources = {
hostUnavailable: "下载 Host 不可用。",
cancelled: "下载已取消。",
failed: "下载文件失败。",
httpFailed: "下载文件失败 (HTTP {{status}}).",
shareFile: "共享文件",
shareFileNamed: "共享 {{fileName}}",
},

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