Repository navigation
feat(composer): accept file references dragged from File Manager - #2580
Conversation
The durable abort can recover a partial reply while the renderer still believes the session is running. Publish the classified failure after recovery and before releasing the turn, so the transcript and queue observe a single outcome. Fixes vastsa#2570
The host skips active-branch saves until a revision exists. Seed the first revision through the normal RPC so the smoke case can verify growing live references and restoring both branches.
A queued prompt writes to Host directly and can pass a crash card that is still in the outbox. Wait for the Host append, spool failures under the original turn, and recheck live ownership before publishing.
Native Pi turns run inside the sidecar and never enter the main process activeTurns map, so the session list reported no running native sessions. After a renderer reload while a native turn was still in flight (a stalled provider or a long retry), the composer showed "Native Pi session is read-only: busy." with no Stop button, leaving the session stuck until the app restarted. The session list now also reports native sessions whose summary says the turn can be stopped, so the reloaded renderer restores the running state and offers Stop. fixes vastsa#2575
Allow a compatible File Manager view to hand its active local file to the Composer as a removable reference. Admit a single-use drag token only for the owning view and session, reusing disk-file metadata and normal tool permissions. Refs vastsa#2579; pairs with Tioit-Wang/pi-desktop-plugin-file-manager#15.
The renderer integration tests alias the shared package to its source entry. Use that entry for the drag marker so esbuild can resolve it. Keep the plugin preload on its independently bundled narrow import.
Check durable session metadata before registering a file reference so a remote session or isolated checkout cannot receive a project-tree file. Tighten frame and gesture lifetime checks, show the blocked drop state, and cover files from secondary project folders.
|
审阅跟进已提交。renderer 从 shared 主入口导入拖拽常量,沙箱 preload 继续使用独立子路径。原先失败的 松手时从 Host 的 macOS arm64 / Electron 43.6.0,以宿主 |
The target can close or change while Main saves the reference. Remove the newly written record when the final drop validation rejects it so the discarded drop leaves no unused file metadata behind. fixes vastsa#2579
Keep the proposal pending while the user edits their draft. Sending a revision rejects the displayed checkpoint before starting a new planning turn in the same session, preserving the explicit approval boundary. Closes vastsa#2576
The reference store checks the source again before writing. Treat a source or project that disappears at that point like one that was unavailable during the initial check. Storage errors still surface. fixes vastsa#2579
Match the composer and submission guards to the live Plan checkpoint. Keep Stop available for an empty running turn, retain draft references on plain-text paste, and give the revision action a compact accessible control at narrow widths. Exercise localized toolbar geometry and pending-state regressions. Refs vastsa#2576
Keep the toolbar button padding independent of the shared button rule and verify the rendered glyph has its full aspect ratio. Refs vastsa#2576
Confirm that reopening the File Manager after a rejected drop does not make the consumed drag token valid again.
Keep native caption hit regions active after Zoom so users can move the window within or across displays. Let AppKit apply the titlebar double-click preference and remove the renderer-only drag markers.
Users want to keep working with the desktop's existing projects and sessions from a phone or another browser on the same Wi-Fi. This adds an off-by-default LAN listener in Electron Main with one-time-code pairing, per-device project/temporary scopes and chat/organize grants, and a phone-first page for browsing, creating, chatting and organizing. The edge only calls existing Desktop handlers and Agent Host turn admission under a non-owner principal, so tool approvals stay on the desktop. Organization edits reuse the sidebar backup as the single durable record and stay pending until the renderer acknowledges them, so a stale sidebar snapshot cannot undo them. Transport is plain HTTP by product decision; Host/Origin checks and CSRF tokens guard requests.
… projects apart replaceChildren() stringifies null, so every list and chat view rendered a stray "null" line from optional slots. Filter empty slots before rendering, and assert no placeholder text in the phone user-path test. Legacy folder-named projects frequently share a label (several "apps"), which made the phone list and the Desktop pairing checklist ambiguous. Repeated labels now carry their parent folder name, never the full path.
Move pairing and grant choices into focused dialogs so connection status and device access are easier to scan. Keep device identity when grants change, but reauthorize requests and live streams under the new scope.
Make device confirmation the only project access decision so pairing works without a project checklist and new local projects stay visible. Keep Temporary, Chat and Organize as separate grants and refuse stale per-project approvals instead of widening them.
A renderer that crashes deterministically at startup (GPU driver or cache corruption, issue vastsa#2595) turned the automatic recovery into an infinite loop: did-finish-load never fires, so the hidden main window is never shown, and recoverRendererAfterGone reloads every 2s until the user force-quits. A plain reinstall does not help because the corrupt state lives in userData. Recovery now counts consecutive crashes with no successful load in between and stops reloading after five: the first trip relaunches the app once with --disable-gpu (the classic mitigation for corrupt GPU state), guarded by a userData marker so a loop that survives the fallback surfaces a localized dialog instead of relaunching forever. Boot reads the same marker to disable hardware acceleration for manual launches too, and a run that stays loaded for ten minutes clears it again. Successful loads reset the streak, so scattered crashes over a long session never trip the breaker. The dialog offers opening the log folder (where the rendererProcessGone diagnostics already land) or quitting; strings are added to all nine locales.
Treat the locally generated one-time code as the WebUI access decision. Remove pending approvals and per-device grants while keeping device revocation and the existing local workspace and Agent boundaries.
…ed to this branch)
Normalize pasted codes and reject duplicate submits without consuming extra pairing attempts. Distinguish an older service or a blocked session cookie from a bad code. Provide a local QR and copy action without sending pairing data to an external service.
|
维护者接受 #2579 的功能方向:支持从 File Manager 拖入整文件引用。下面是对当前实现的修改意见,不是对这项功能的否定。 感谢两端的实现和 macOS 联测。审查 在 A 发起拖拽, 请补上 A → B → A 的回归用例;此前的 6 项绿色 CI 不覆盖这个场景。请同时同步最新 main,并在更新后的宿主和插件候选上重跑跨视图拖拽验证,附上两个提交 SHA,方便复审。 |
# Conflicts: # scripts/e2e-smoke.mjs
When the user pressed Stop and the sidecar then died before agent_end, finishTurn still attached the classified crash error: the transcript got an AGENT_SIDECAR_* card, the turn result looked failed, and Agent Host recorded the crash code on what was a deliberate stop. The abort lock taken before the cancel request already records that intent, so a locked turn now settles as a plain abort. The crash card also carries its turnId in the live projection, matching the persisted row, so transcript grouping is the same before and after reload. Refs vastsa#2570
Place dir on ul/ol from the list's majority script so padding-inline-start sits on the same side as RTL items. The bidi probe now asserts list padding geometry and that an Arabic paragraph stays visually right-aligned when an ancestor uses physical text-align:left. Fixes vastsa#2635
Describe the MessageBubble assistant contract as physical row placement plus text-align:start under a majority-script dir. Add E2E-060d for that alignment and list-gutter behavior. This PR is the verified inherited-alignment fix; leave vastsa#2635 open until the reported Windows chat path is confirmed. Refs vastsa#2635
…nment fix(chat): right-align Arabic assistant replies with logical text-align
…load fix(session): keep running native Pi turns stoppable after reload
Calls in vastsa#2552 stored conversational junk in `path` ("Wizard.tsx here?", "Wizard.tsx:{") next to a clean `file_path`. D273 let the canonical name win when both arrived, so every retry ran the junk path and host-core never saw the clean value. Picking either spelling is a guess, so a call whose spellings disagree now fails with INVALID_ARGUMENT before the write lock and host call, quoting each value so the next call can send one. Identical values still fold to one argument. The alias map and its validation move from runtime.ts into tool-param-aliases.ts, shrinking the hotspot. Spec 03 and D690 record the amendment to D273. fixes vastsa#2552
fix(plan): allow revision requests from the pending composer
…tlebar-drag fix(desktop): restore titlebar dragging for zoomed macOS windows
…sh-2570 fix(desktop): settle live turns after sidecar crashes
…keover fix(desktop): break renderer crash loops with a guarded GPU-fallback relaunch
fix(agent-runtime): reject differing spellings of one tool argument
Remove obsolete UI and helper implementations with no production callers so they cannot drift from the active paths. Preserve public package exports, persisted compatibility fields, and runtime entry points.
宿主端复查(
|
A paired phone's turn computed the remote `ask` ceiling but never applied it: host-core authorized tools from the stored session mode, and an `inherit` session with an `auto` default did not even forward the value. Phone turns could therefore run tools without Desktop approval. The ceiling is now recorded on the durable turn and queue entry (schema v35) and host-core applies the stricter of it and the current session mode to every tool decision of that turn, including delegates, child sessions, session messages and background continuations. A Host that cannot record it starts no turn. The phone also offered Send and Queue in sessions of an archived project, because send admission checked only the session's own flag. Those conversations are now read-only with a project restore action, admission rechecks the current archive state, and a web archive refuses while a send is still being admitted. Records ADR turn-permission-ceiling and updates the LAN WebUI, storage, security and E2E specs.
fix(lan-webui): enforce the ask ceiling and archived-project read-only
更正:我上一条评论有几处结论是错的上一条评论发出后,我对它做了交叉验证(两个独立会话 + 我自己复跑探针)。结论:第 1 条与第 5 条成立,第 2、3、4、6 条不成立或表述错误,另外漏了一个真实缺陷。下面逐条更正,每条附证据。 我说错了、现在撤回的第 2 条( 第 3 条( 第 4 条(微任务早于桥接调用清空 token, 第 6 条(宿主对老插件隐藏桥接方法)——部分撤回。 仍然成立的第 1 条(生成包无法证明由合并后源码重建)——成立,且我补了根因。 第 5 条( 我漏掉的(这条才是真缺陷)
顺带核实、不构成缺陷的两条
我修正后的合并判词
方法与边界
对上一版评论里那几条错判,我道歉;这条更正以证据为准,请以本评论替换相应条目。 |
|
按你更正后的两点更新了宿主。两次拖动各自保留自己的令牌,后一次不会覆盖前一次;清理还没交给输入框的文件引用前,也会像读取时一样核对记录的实际路径。
|
Summary / 概要
Requirement link / 需求关联
Earlier work: #745 and Blue-Berrys' #786.
Validation / 验证
ca67e9ef6e74,基线649c3456af65,插件候选6a7f95723373。通过正常 Host API 安装候选包,使用真实 File Manager、Composer 和原生鼠标。确认一份文件只加入一张卡片、可移除、保留草稿、不发送、原文件内容不变。拖到外部或按 Escape 不加入卡片。原生拖拽截图
拖入前
拖入后
文件卡片近照