Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

Merge pull request #2236 from yg2224/fix/queue-refresh-event-order

vastsa14e8513a701e
diff --cc docs/spec/04-ux/08-component-spec.md
index 4be8f8628,dc73d5bea..20424a7bb
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@@ -1,9 -1,7 +1,11 @@@
# 08. Component Spec
+Workspace file index Git queries settle at their deadline or output limit,
+even when inherited child pipes do not close. Composer file search and the
+Files index then use the existing bounded filesystem fallback (Refs #1731).
+
+ The Composer queue mirror accepts only the current read for each session. A newer queueChanged event invalidates earlier reads so an already delivered prompt cannot reappear. Reads in other sessions remain independent, and future refreshes still reconcile authoritative entries (Refs #1699).
+
A full transcript read may fill its session cache only when that cache has not
changed during the request. New streaming or edit snapshots retain ownership;
the caller still receives the requested history for its own action validation.
diff --cc docs/spec/06-delivery/04-e2e-test-plan.md
index 4466e8cbe,33a25751c..5576dc262
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@@ -1,12 -1,9 +1,16 @@@
# 04. E2E Test Plan
+### E2E-FILE-INDEX-git-deadline
+
+Drive `getWorkspaceFileIndex` and `searchWorkspaceFiles` against real fixture
+files. Hold Git's close event beyond its deadline: both calls return the bounded
+filesystem listing. Coverage: `fs-index-git-deadline.test.mjs`. Existing index
+tests cover Git ignore semantics, Unicode chunk boundaries and deep search.
+
+ ### E2E-QUEUE-late-read-after-event
+
+ Render two queued prompts, hold a production refresh, deliver a queueChanged event removing the first prompt, then return the old read. Only the second remains visible; a later authoritative refresh still applies. `queue-refresh-event-order.test.mjs` covers event/read order, reversed reads and session independence; `e2e-queue-refresh-event-order.mjs` renders production ComposerStatus/useAppStore in real Electron. No prompt is dispatched to a provider.
+
### E2E-EXTENSION-thinking-request-state
Set high thinking through the production extension bridge, send a prompt and
diff --cc docs/zh-CN/spec/04-ux/08-component-spec.md
index 9c1a45e0a,dbe2a8176..cb2e7646c
--- a/docs/zh-CN/spec/04-ux/08-component-spec.md
+++ b/docs/zh-CN/spec/04-ux/08-component-spec.md
@@@ -1,8 -1,7 +1,10 @@@
# 08. 组件规格
+工作区文件索引的 Git 查询在截止时间或输出上限直接结束等待,即使继承的
+子进程管道未关闭。输入框文件搜索及 Files 索引使用现有有界目录回退(Refs #1731)。
+
+ Composer 队列镜像仅接受每个会话当前读取。更新的 queueChanged 事件使旧读取失效,已送出的提示不会重新出现。其他会话读取相互独立,后续刷新仍可同步权威队列条目(Refs #1699)。
+
全量会话读取仅在请求期间缓存未改变时写入该会话缓存。新的流式消息或编辑
快照保留所有权;调用方仍得到读取的历史,用于独立动作校验。
diff --cc docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
index 4af7e20c8,c709d75ca..a4f0542e6
--- a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
@@@ -1,12 -1,9 +1,16 @@@
# 04. E2E 测试 Plan
+### E2E-FILE-INDEX-git-deadline
+
+对真实测试文件调用 `getWorkspaceFileIndex` 和 `searchWorkspaceFiles`,
+保持 Git 的 close 事件未到达,推进截止时间后两者均返回有界目录列表。
+覆盖:`fs-index-git-deadline.test.mjs`。原有索引测试覆盖 Git 忽略规则、
+Unicode 字节分块及深层搜索。
+
+ ### E2E-QUEUE-late-read-after-event
+
+ 呈现两个排队提示,保持生产刷新,发送 queueChanged 事件移除第一个提示,再返回旧读取;只显示第二个提示,后续权威刷新继续生效。`queue-refresh-event-order.test.mjs` 覆盖事件与读取顺序、逆序响应及会话独立性;`e2e-queue-refresh-event-order.mjs` 在真实 Electron 中呈现生产 ComposerStatus/useAppStore。不向提供商发送提示。
+
### E2E-EXTENSION-thinking-request-state
通过生产扩展桥接设置 high,发送提示并捕获提供商流参数。真实 Agent 循环