Repository navigation
Conversation
|
为方便 review,补一份实测数据和一份diff 导航。数据全部来自本 PR 的交付二进制( 实测(真实工作区,stdio RPC 直驱)
两点如实说明:
diff 导航(44 文件)核心逻辑集中在两个新文件,其余多为薄接线:
测试 ↔ 不变量
对照 #502 裁决清单:FTS5 store ✓ / 三个 lifecycle RPC ✓ / Workspace 组 Index 页 ✓ / 单开关默认关 ✓ / 不接 Grep( 更新 1 — 与最新 更新 2 — 多轮稳定性与查询测试(同一真实工作区,隔离 data dir,合并后二进制
|
|
你好,我们注意到 09-26 生效的贡献范围调整(外部 PR 暂只收 窗口期内我们不想让它占用您的审阅精力,您方便时给一个处置意向即可:
另想顺带确认:被拆分取代的 #502 是否可随本裁定一并关闭?其内容已由 #697(PR1)取代,其余部分本就留待后续窗口再议,挂着一个陈旧分支只会给 triage 添噪音。 无论哪种处置我们都配合,一条回复即可,不占您时间。谢谢! |
|
Thanks for this — and sorry for the wait, this one has been sitting for a while. It looks like solid work, and it's close to something we can evaluate properly. The one thing we're missing is visual evidence: since this touches the UI, we can't judge the result from the diff alone. Could you add two screenshots to the description?
With those attached we can see the actual result and make a confident call on merging. |
Squashed rebuild of vastsa#697 onto current main. Content unchanged from the reviewed branch; only conflict resolutions differ: - package.json: keep both the new test:e2e:index script and main's newer test:e2e:jev/storage entries. - shared/types.ts: export both worktree.js and workspace-index.js. - rpc/mod.rs: keep main's response_for and this branch's checked_index_root, plus both import lists. - settings-ia docs (en/zh): take main's current wording (Experimental destinations available in all builds) and add Index to the Workspace group. - e2e test plan: keep the new E2E-INDEX rows and main's E2E-263 row.
ceb8908 to
3a73bce
Compare
|
Visual evidence, as requested — and the branch is refreshed. ScreenshotsRendered from the production Full interface — the page in its real settings context: Close-up — the metric tiles that changed: Fixture values: The probe that produced them asserts the DOM rather than only capturing pixels: These two show the healthy state. The empty state, the failed state, and a live rebuild (progress bar polling once a second) are covered by Branch refreshedThe head had drifted 688 commits behind
Diff is unchanged in substance: 46 files, +3294/−21. Verification on the rebuilt head (
|
|
One structural thing I should have raised earlier, stated plainly so it does not sit in limbo. This PR is a Where it came from. #478 (the workspace-index half of the "Data & Statistics" request) was closed as What I am asking for is a decision, not a merge. Any of these closes the question, and I will follow it without argument:
Current state, so the decision is cheap to make:
I have also added a small read-only reviewer tool at |


PR 1 of the split agreed in #502 — Index infrastructure only, nothing else. Based on the latest
main, one clean branch.What's in
<data>/index/index.db(trigram tokenizer, fixed budgets: 50k files / 1MB per file / 2GB total), deliberately separate frompi.sqlite; integrity or schema failure quarantines the old file and recreates an empty storeindex.status/index.rebuild/index.clear, workspace-root-scoped (INDEX_ROOT_OUTSIDE_WORKSPACEotherwise), metadata only — never file contents; rebuild/clear write an audit entryindexGrepBoost, default off. Turned on, it indexes newly opened workspaces in the background (workspace.setstays fast; the health card polls while building). Turning it on arms the current workspace immediatelyWhat's deliberately out (per the split in #502)
tools/mod.rshas zero changes; tools execute exactly as before whether or not an index exists. The fast path + freshness changes are PR 2, to be reviewed on "does it ever change Grep's answer".workspace-watchwatcher, nomark_stalewiring, no stats surface. The three stats leftovers named in feat(settings): fold the workspace index into the Workspace group #502 (stats.rs,stats-real-rpc-reconcile.mjs,idx_turns_started) are not present — this branch never carried them.The two blockers named in #502
main(SettingsPage.tsx,06-settings-ia.md): resolved by starting from the currentmaininstead of stacking.workspace_set_auto_indexes…wall-clock polling: the background build's join handle is now registered on the app state (index_builds), and the test awaits that handle directly, then asserts the settled status. No wall-clock polling. (For what it's worth: the polling version was also hiding a real platform race — watcher events landing mid-build flip the root tostale, which the test then never sees becomefresh. That race belongs to PR 2's surface; PR 1 has no watcher at all.)Verification
cargo test -p host-core --locked: 549 passed / 0 failed (incl. new RPC tests: switch defaults + type validation, auto-index gated on the switch via the awaited handle, rebuild/clear audit, store self-healing, budget, multi-root scoping)cargo fmt --checkclean;cargo clippy -p host-core -- -D warningsclean for every file this PR touchespnpm docs:check: 487 pages en/zh paired; architecture budget passedpnpm test:e2e:index→PASS E2E-INDEX-status-rebuild-clearE2E-INDEX-settings-health-carddocumented as pending UI automationReal-workspace measurement (details in the comments)
Driven the shipped binary (
cc726590) over stdio RPC against a real checkout of this repository (64k files incl.node_modules; isolatedPI_DESKTOP_DATA_DIR):workspace.setwith the switch off: 0.6 ms, zero index rows — no cost while offfreshin 3.0 s — 1,644 source text files / 19.2 MB, 0 errors (node_modules,target/, build outputs correctly excluded)index.rebuild: 5.7 s; steady-stateindex.statuslatency 0.5–0.7 msindex.db: 115.5 MB (~6× content: FTS5 trigram postings + stored bodies; within the 2 GB budget — a contentless-FTS follow-up can shrink this substantially)Note on pre-existing main breakage (not from this PR)
Typecheck and clippy each currently fail on untouched files from today's
main, reproducible on pristineupstream/main(7a59a25) with the same commands:pnpm --filter @pi-desktop/desktop typecheck→electron/main/user-login-path.ts(28,74): TS2345(from 574c78a; the JS job on the fix(desktop): classify crash dumps and keep them in the data directory #689 merge commit already shows failure)cargo clippy -p host-core -- -D warnings→user_skills.rs(921): useless_formatI left both alone to keep this PR single-purpose — happy to send a one-line fix separately if useful.
Closes nothing; part of the #502 split (PR 2: Grep fast path + freshness, PR 3: stats RPCs).