Skip to content

fix: run stop, refused send, file reveal and fusion panel fixes - #1683

Merged
jiangzhuqing000 merged 23 commits into
mainfrom
pr/dev-jiangzhuqing000
Nov 24, 2026
Merged

jiangzhuqing000 merged 23 commits into
mainfrom
pr/dev-jiangzhuqing000

Conversation

@jiangzhuqing000

Copy link
Copy Markdown
Collaborator

这个 PR

dev-jiangzhuqing000 上一批已完成任务合并进来的内容,冻结在 pr/dev-jiangzhuqing000(04bcfcdf3),已包含最新的 origin/main。

包含的改动

  • fix: 别的客户端停掉的回复不再显示成模型故障 — 从手机停止后,桌面端曾把 run 结算成 failed,并把 [RUN_CANCELLED] run was cancelled before it answered 当成「模型服务异常 / 请稍后重试」。现在 Agent 报告的 run_cancelled 在两条结算路径(headless 执行器、桌面 prompt pipeline)都结算为 cancelled;已经写成 failed 的历史行在桌面端也按「已停止」投影,孤儿失败恢复不再把它重建成失败气泡。
  • fix(mobile): 被拒绝的发送带上桌面端自己的话 / 没传上去的文件按文件失败 — 发送失败时的提示来自桌面端的原始原因;附件上传失败不再报告成「消息发送失败」。
  • fix(desktop/files): 在文件夹中显示落在链接指向的文件上 — 目标文件已不存在时打开最近的仍存在的目录;修正 Windows 根路径链接的解析。
  • fix(fusion): 等待仍在产出的评审者,引号样式不再丢强调/代码标记时算作同一段。
  • docs(screenshots): 内容文件可自带分页规则,小节标题不再与正文分页。

验证

  • cargo test -p future-host --lib agent_bridge:: 455 通过;remote_host:: 238、application:: 128、任务账本取消用例通过;cargo clippy -p future-host --all-targets -- -D warnings、cargo fmt --check 通过。
  • packages/thread-projection 457 个测试、desktop src/features/agent 1440 个测试通过;tsc --noEmit、eslint 干净。
  • 移动端相关改动由 CI 的 mobile 测试矩阵覆盖。

…words

An issue map quoted `存在性风险论:概率太低…` from a P3 bullet that reads
`- **存在性风险论**:概率太低…`. Exact-excerpt matching normalized quotation
marks and whitespace only, so the missing `**` read as a different excerpt:
the report failed source validation, the single repair round had already been
spent on a schema field (`status`), and the whole mapping stage failed. Fusion
then degraded to analysis_only and skipped cross-review.

Strip rendering markers (emphasis, code spans, strikethrough) before comparing.
A single `_` or `~` stays: it delimits identifiers (`max_tokens`) and ranges
(`3~5 年`), where removing it would conflate different text.
The analysis and review phases started a fixed clock when the first
participant ended (10 minutes, tightened to 5 once only one was left), so a
panelist that was still reasoning was cancelled mid-answer, recorded as
`panel_timeout`, and the discussion fell back to a single advisor. A run on
16x16 tiling lost two of three participants that way while both were still
emitting reasoning.

Anchor the wait to content progress instead of to the fastest answer: every
new reasoning or text from a still-pending participant restarts the window,
so only a silent panel is cut. The wait keeps a 30-minute ceiling from the
first result, and the phase re-reads progress every 15 seconds so an
extension is noticed without waiting for the old cutoff.
`section.item { break-inside: avoid-page }` made every item try to fit on one
page: a 94-item release-notes document grew to 60 pages with 11 headings
stranded at the bottom of a page and up to 40% of the page left blank.

Let an item break across pages, but keep a heading with what follows it and
keep figures (single or paired) whole:

- `section.item { break-inside: auto }`
- `h2, h3 { break-after: avoid-page }`
- `figure, .pair { break-inside: avoid }`

The same document now renders in 48 pages with no orphaned heading. Both
guides say pagination is the stylesheet's job, so an author does not pad an
item to line it up with a page.
A short brief packs two or three items per page, and the shared sheet lets an
item break anywhere in it: a body would end a page and its screenshot open the
next one, sitting directly above the following heading, which reads as if the
figure belonged to that heading.

`document.css` cannot both allow a 96-item report to break its items and keep a
13-item brief intact, so a content file may now carry a `style` string that is
appended after the shared sheet for that document only. Existing documents are
unaffected; the guides say when to reach for it rather than editing the sheet.
A chat link is resolved to an absolute path before it is opened or revealed,
and both shapes below ended in the wrong folder — "show in folder" opened
Documents instead of the file.

A destination that starts with a separator but names no drive (/notes/a.md,
the POSIX spelling a model writes for a file it just saved) is *rooted*
rather than relative on Windows, so Path::join kept the workspace drive and
dropped the workspace itself: D:\work + /a.md became D:\a.md. That path does
not exist, and explorer /select on a missing path opens Documents. Such a
path now resolves against the workspace root unless it already spells the
workspace out with only the drive missing, and a bare separator keeps its
old shape.

Explorer parses /select,"<path>" and not the whole-token quoting
Command::arg produces, so any file name with a space landed in Documents
even when the path was right. The Windows arm now passes the switch through
raw_arg so only the path is quoted.
… is gone

`explorer /select` answers a path that no longer exists by opening Documents,
so "show in folder" on a link whose file was deleted or moved looked like the
link resolved to the wrong place. The command now walks up to the deepest
ancestor that still exists and opens that folder, and returns an error instead
of handing a missing path to the OS when no part of it is left — a wrong
window is worse than none.

The injected OS layer becomes `FnMut` so a test can record what was chosen.
…ssage

Reported twice from the same screen: a waiting message, its "+", a photo, then
"message failed to send". That sentence pointed at the words, and the words were
fine — a prompt carrying files fails in three places, and only the last is the
prompt. The phone reads its own copy back, the desktop takes the upload and then
claims it for the conversation, and either can refuse; the desktop answers most
of those in prose rather than in a code, so none of them matched anything and
every one of them landed on the catch-all.

- `sendFailureText` now recognizes the file family: a transfer that died or an
  upload the desktop could not claim reads as what it is, bytes that cannot be
  read at all (the phone's temp copy gone, an image the desktop cannot decode)
  say so, and the desktop's own quota refusals keep the numbers they refuse on
  rather than pretending the send faulted.
- The client being closed under a send is the link going away, not a fault of
  the message: it reads as offline now, with the retry it invites.

The row's "+" also stops being silent on the one host that cannot serve it: a
desktop too old to report what a waiting message carries gets a sentence instead
of a picker that leads to a refused send — the same fact the panel's editor
already states about saving such a row.

Tests: nine new `sendFailureText` rows and one `ChatScreen` case, all verified to
fail on the pre-fix source (10 failed / 131 passed with the fix stashed). Full
mobile jest 3331/3332 (the one failure is `MarkdownText.test.ts`, which fails at
this worktree's baseline because of the junctioned `node_modules`), typecheck and
eslint clean.
Every send failure this build can name already has its own sentence, but the
remainder kept one catch-all: "Message failed to send." Three reports of a
photo added to a waiting message on the phone all ended there, and that
sentence points at the message's text — the one part that was fine. It also
left the reports undiagnosable: the refusal comes from the paired desktop (or
the Agent behind it), whose log the phone cannot read.

The unknown remainder now says what it was told, on one line and cut to a
toast's worth, so the reader learns it was not their words and a report of a
failure no build can name arrives with its reason attached.

The tests keep the four sentences the old fallback was standing in for — the
waiting message that left the queue, the file that never transferred, the file
the desktop's quotas refused, and the connection that went away — and make the
unknown case assert the words rather than the key alone.

Docs: the send-failure vocabulary, and why the fallback carries the remote
machine's words (README and zh-CN).
Stopping a run from the phone left the desktop reporting "模型服务异常 /
请稍后重试([RUN_CANCELLED] run was cancelled before it answered)" over a
reply the reader had deliberately stopped.

The Agent ends a cancelled run with `agent_end {state: cancelled}` and hands
every attached client `complete: false` + termination kind `run_cancelled`.
The client that owned the prompt but not the stop settled its run row
`failed` with that raw error — the local stop button writes `cancelled`, and
only that path drew the stopped reply.

- host: `run_cancelled` now settles the row `cancelled` (error_type
  `cancelled`) on both settlement paths — the headless executor a phone's
  prompt runs through, and the prompt pipeline the desktop uses.
- thread-projection: `isCancelledRunError` recognises the Agent's code.
- desktop: a `failed` row carrying `[RUN_CANCELLED] ...` (already written by
  older builds) reads as a stop instead of a model failure, and it is not
  rebuilt into a failure bubble by orphan recovery.
@jiangzhuqing000
jiangzhuqing000 enabled auto-merge (squash) November 24, 2026 07:48
@jiangzhuqing000
jiangzhuqing000 merged commit f7deb5e into main Nov 24, 2026
56 of 58 checks passed
@jiangzhuqing000
jiangzhuqing000 deleted the pr/dev-jiangzhuqing000 branch November 24, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant