Skip to content

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

chore(settings): refresh scroll reset candidate against main

yuxino8bacb7d8100f
diff --cc docs/spec/06-delivery/04-e2e-test-plan.md
index 2c0d45a2d,39a771835..c1d135a40
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@@ -14403,20 -14454,28 +14454,46 @@@ the latest destination. These assertion
cover ownership, deletion, repeated/bounded forks, retained checkpoint paths,
expired inputs, rollback, and symlink rejection.
+### E2E-SETTINGS-destination-scroll-reset
+
+- Open Settings → AI and scroll midway down. Select Shortcuts: its title and
+ first settings appear at the top. Scroll and return to AI: it starts at top.
+- Re-select the active destination and update settings without navigating:
+ the content keeps its scroll position.
+- Repeat for built-in → plugin, plugin → plugin, and plugin → the previously
+ selected built-in destination. Re-selecting a plugin keeps its position.
+- Follow a global search setting anchor into AI from another destination and
+ within AI: the target row is visible, and consuming the anchor keeps that
+ position.
+- Run in light and dark themes.
+- Automated coverage: `pnpm test:e2e:settings-scroll` mounts the production
+ SettingsPage, store, translations, and built CSS in isolated Electron. Only
+ preload data is stubbed; search navigation uses SearchDialog's public store
+ entry points. This covers renderer interaction, not host persistence or the
+ full global-search dialog.
++
+ ### E2E-SCHEDULED-dispatch
+
+ - **Scenario:** Independent task dispatch.
+ - **Expected:** The Electron runner admits independent due tasks without awaiting another task's prompt setup. Local in-flight ownership is keyed by task ID and Host instance until setup settles; Host remains authoritative for enabled, due and overlap checks. A replaced Host's completion cannot clear its successor's local ownership. Stop prevents new polls; admitted work keeps the existing execution/failure lifecycle. Failures remain observable and the 90-second late policy is unchanged.
+ - **Automation:** `node --experimental-strip-types scripts/e2e-scheduled-dispatch.mjs` uses an isolated real Host and SQLite profile. Inference is not sent to a live provider.
+ ### E2E-SCHEDULED-project-removal
+
+ - **Scenario:** Project removal and automations.
+ - **Expected:** Removing a project pauses its bound scheduled tasks without deleting their definitions, schedule, workspace binding or run history. Session references in history may become null when the project's conversations are removed. Already admitted task runs block removal even before a conversation turn starts. Tasks belonging to other projects and unbound legacy tasks are unaffected. Explicit resume or Run now may recreate a project from the preserved path; automatic polling cannot do so while paused.
+ - **Automation:** `node --experimental-strip-types scripts/e2e-scheduled-project-removal.mjs` uses an isolated real Host and SQLite profile. Inference is not sent to a live provider.
+ ### E2E-SCHEDULED-legacy-pause
+
+ - **Scenario:** Legacy task maintenance.
+ - **Expected:** Agent tools allow title, prompt and pause updates on legacy automatic tasks without a schedule, including an echoed unchanged cadence. These edits do not arm the task or capture the foreground workspace. Explicit enabling, a cadence change or a supplied schedule still follows schedule validation. Resume requires an explicit valid schedule; Manual-to-Hourly retains its existing default interval behavior.
+ - **Automation:** `node --experimental-strip-types scripts/e2e-scheduled-legacy-maintenance.mjs` uses an isolated real Host and SQLite profile. Inference is not sent to a live provider.
+ ### E2E-SCHEDULED-calendar-intent
+
+ - **Scenario:** Calendar intent.
+ - **Expected:** The optional config_json.calendarConfigured boolean distinguishes an explicitly configured Daily/Weekly calendar from Hourly's internal schedule placeholder. Without the key, legacy Daily/Weekly schedules are treated as configured; legacy Hourly schedules retain their values but require an explicit schedule when converting to Daily/Weekly. Known calendar intent survives Hourly and restart, including midnight. Clearing or replacing the calendar with a different non-calendar placeholder clears intent. This additive extension needs no table/schema migration; older versions ignore it and cannot enforce the new conversion guard. Metadata-only edits and Manual-to-Hourly remain unchanged.
+ - **Automation:** `node --experimental-strip-types scripts/e2e-scheduled-calendar-intent.mjs` uses an isolated real Host and SQLite profile. Inference is not sent to a live provider.
+ ### E2E-SCHEDULED-paths
+
+ - **Scenario:** Workspace identity.
+ - **Expected:** Stored workspace bindings use the existing project canonicalization contract on both write and read. On Windows, slash direction, case, trailing separators and extended path prefixes do not hide a task from its own project's conversation. The distinction between missing legacy bindings and explicit null remains unchanged. Foreign-project tools cannot list or mutate bound tasks.
+ - **Automation:** `node --experimental-strip-types scripts/e2e-scheduled-paths.mjs` uses an isolated real Host and SQLite profile. Inference is not sent to a live provider.
diff --cc docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
index 43bc6e5c9,3015ed50a..db83e2046
--- a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
@@@ -8564,17 -8595,40 +8595,55 @@@ the latest destination. These assertion
- **验收 / 里程碑**:C、Quality / M6+。
- **状态**:组件与状态层用户路径由 `queue-pending-actions.test.mjs` 覆盖。
+### E2E-SETTINGS-destination-scroll-reset
+
+- 打开设置 → AI,滚动到中间,再选择快捷键:标题和首项从顶部显示。滚动后
+ 返回 AI,该页也从顶部显示。
+- 再次选择当前分类,或不离开当前页更新设置,保留内容区滚动位置。
+- 覆盖内置分类 → 插件、插件 → 插件、插件 → 先前选择的内置分类;再次
+ 选择当前插件分类时保留位置。
+- 从其他分类及 AI 当前页通过全局搜索设置锚点进入 AI,目标项可见,消费
+ 锚点后保持定位。
+- 在明暗两种主题下运行。
+- 自动化覆盖:`pnpm test:e2e:settings-scroll` 在隔离 Electron 中挂载真实
+ SettingsPage、store、翻译和构建后的 CSS。仅 preload 数据使用 fixture;
+ 搜索导航调用 SearchDialog 使用的公开 store 入口。该测试覆盖渲染层交互,
+ 不覆盖 host 持久化或完整全局搜索弹窗。
++
+ ### E2E-SCHEDULED-dispatch
+
+ - **场景**:独立分发到期任务。
+ - **预期**:Electron runner 无需等待其他任务的提示词准备即可准入彼此独立的
+ 到期任务;本地所有权按任务 ID 和 Host 实例保留,Host 继续负责 enabled、
+ due 和重叠检查。停止只阻止新轮询,错误仍可观察,迟到 90 秒的规则不变。
+ - **自动化**:`node --experimental-strip-types scripts/e2e-scheduled-dispatch.mjs`
+ ### E2E-SCHEDULED-project-removal
+
+ - **场景**:删除项目与自动任务。
+ - **预期**:删除项目会暂停其绑定任务,并保留任务定义、schedule、工作区绑定和
+ 运行历史;已准入的任务会阻止删除。其他项目和未绑定旧任务不受影响。用户显式
+ 恢复或 Run now 可以重新创建项目,暂停状态下的自动轮询不会这样做。
+ - **自动化**:`node --experimental-strip-types scripts/e2e-scheduled-project-removal.mjs`
+ ### E2E-SCHEDULED-legacy-pause
+
+ - **场景**:旧任务维护。
+ - **预期**:Agent 工具可对缺少 schedule 的旧版自动任务修改标题、提示词或暂停,
+ 包括回传未变化的 cadence;维护不会启用任务或捕获前台工作区。显式启用、改变
+ cadence 或提供 schedule 时仍执行校验,Manual 转 Hourly 的默认间隔行为不变。
+ - **自动化**:`node --experimental-strip-types scripts/e2e-scheduled-legacy-maintenance.mjs`
+ ### E2E-SCHEDULED-calendar-intent
+
+ - **场景**:日历配置意图。
+ - **预期**:可选的 `config_json.calendarConfigured` 区分明确设置的每日/每周
+ 日历时间与 Hourly 内部占位 schedule。旧版 Daily/Weekly 保留日历语义;
+ 旧版 Hourly 转换时必须明确提供 schedule。已知配置可跨 Hourly 与重启保留,
+ 包括午夜;仅修改元数据以及 Manual 转 Hourly 的行为不变。
+ - **自动化**:`node --experimental-strip-types scripts/e2e-scheduled-calendar-intent.mjs`
+ ### E2E-SCHEDULED-paths
+
+ - **场景**:工作区身份。
+ - **预期**:保存和读取工作区绑定时统一使用现有项目路径规范化规则。Windows
+ 路径的斜杠方向、大小写、末尾分隔符和扩展路径前缀差异不影响同项目会话;
+ 缺失的旧版绑定与显式 null 保持不同语义,其他项目不能查询或修改绑定任务。
+ - **自动化**:`node --experimental-strip-types scripts/e2e-scheduled-paths.mjs`
+ 使用隔离的真实 Host 与 SQLite 配置,不向真实提供商发送推理请求。