main
60
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bb056c511d |
fix(core): a venv made with --symlinks is its own environment
Its python.exe links to the Python it was made from, and env_hash followed the link, so the venv's pins, snapshots and cached graph, report and audit were filed under its base. Nothing showed it while no screen could list the two apart; Add interpreter now can. A venv's own interpreter, recognised by its pyvenv.cfg, is resolved only up to its folder. No other path's identity changes, and a linked venv's earlier pins and snapshots stay with the base they were filed under. Checked against a real --symlinks venv: `env use` stores the venv with its own prefix, and the venv and its base keep two identities. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2539950cd5 |
fix: what an independent review of 1.6.0 found
A venv made with --symlinks is run and stored as itself, not as the base Python its python.exe links to: validate_interpreter returned the canonical path, so `--env .venv update --all --yes` would have changed the system Python. Canonicalizing now only decides where a link leads and whether it is PipDock's own; a link to another program is refused, and a Microsoft Store alias (os error 1920) is judged by its own path. The GUI merges and removes an added row by its path rather than by envHash, which follows links: a re-add replaces a broken row, removal sticks for an entry whose file is gone (a share), and neither runs during a scan. Added entries are validated again on every listing in both heads (envs::probe_listed), and the CLI checks its stored default when it uses it. `env remove` makes a typed path absolute first. SECURITY section 2 and env_probe's doc claimed an enforcement point over IPC; they now say what is checked, and backlog X36-b records the rest. notify.yml reports a Triage failure on a pull request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
38e0226878 |
chore(release): 1.6.0
The five places the version lives, moved together: Cargo.toml, Cargo.lock, package.json, package-lock.json and tauri.conf.json. `cargo metadata --locked` agrees. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ab16742989 |
feat(core): interpreters a person adds — validated, stored, listed
PRD P0-1's manual browse, the last command NOT_YET owed (env_add_manual). - envs::validate_interpreter, the enforcement point for every path a person supplies: an existing file named python[X[.Y]].exe, not one of PipDock's own tools or audit venvs (canonical, so .. cannot walk past), returned canonical and without the verbatim prefix. A missing file reads exactly as the probe's own message, so the CLI's goldens do not move. - store v5: manual_envs, apart from the CLI's recents and default. - scan_reporting appends the manual list last: discovery keeps its own source, and an added interpreter whose file is gone stays listed, so its PD-ENV-001 row can be removed. - env_add_manual validates, probes, then stores; env_remove_manual takes an entry off the list and touches nothing else. env_probe validates a manual path too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
95e45d7acc |
chore(release): 1.5.0
The five places the version lives, moved together: Cargo.toml, Cargo.lock, package.json, package-lock.json and tauri.conf.json. `cargo metadata --locked` agrees. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> |
||
|
|
093ea4fce4 |
build(deps): dependencies to latest; classify pip 26.3's backend-unavailable (#102)
- cargo update (~60 bumps, 627 -> 616 crates) clears the yanked async-executor 1.14.0 that had turned cargo audit red on main and on every Dependabot PR since 2026-11-03 (Linux-only, never in the shipped binary). rusqlite 0.41.1 (SQLite 3.54.1), no code change. rfd 0.17 with tauri-plugin-dialog 2.8.4, which met the rfd ignore's own condition, so the ignore goes. - npm: thirteen packages to latest; TypeScript still held at 6.0.3 (typescript-eslint peers <6.1). - Tools: ruff 0.17.3, certifi, msgpack, platformdirs; constraints regenerated. - Actions: taiki-e/install-action v2.87.32, sonarqube-scan-action v8.4.0; Node 24 -> 26 LTS. "Latest" means the newest release past each ecosystem's Dependabot cooldown. - pip 26.3 renders an unloadable build backend as `error: backend-unavailable`, which fell through to PD-BLD-003; a classifier rule restores PD-BLD-002. Found by the drift job; live corpus re-captured with pip 26.3 / uv 0.13.7, the 26.2.1 capture frozen as pip-26.2/, and a test holds both renderings to one code. - Docs: ARCHITECTURE §10 re-verified, ERROR-CATALOG, TESTING, ROADMAP, CLAUDE.md. Supersedes #97, #98, #99, #100, #101. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
2f6ad04967 |
fix: the 16 Rust findings and the coverage gap from the first CI analysis of main (#91)
The first CI analysis of main failed its gate: 16 Rust bugs and new-code coverage 78.3 % against 80 %, over all of 1.4.0 (sending a version did not move the previous-version baseline). - rust:S6677 x3: a failure's message is logged as `error`, not as a second `message` field (CLI, update flow, app startup); golden.rs reads the CLI's log to hold it, and failed first. - rust:S7493 x13: std::fs inside async fns goes through tokio::fs (tools venv sync, deptry's report, export/requirements/report commands). - Tests for 1.4.0 code nothing drove: rollback end to end, forcing a latest this Python cannot run, PEP 691 parsing (L55), user_file_error (U25), a plan verified in another environment, PyPiReleases' cache, and the plan/env stores' success and late-error paths. InstallSet::only had no caller and is removed. - ROADMAP, TESTING and CLAUDE.md record what the analysis found. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
6cd7e99385 |
chore(release): 1.4.0
The version in all five places it lives — Cargo.toml, Cargo.lock, package.json, package-lock.json and tauri.conf.json — checked with `cargo metadata --locked` and with the release workflow's own tag check run locally against v1.4.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
42f227c1aa |
fix: what installing the build found, and what the doc pass turned up
The release build was installed and driven before tagging. Two defects showed up that no suite could see: - Every dialog opened in the window's top-left corner. Tailwind's preflight sets `margin: 0` on everything, which removes the `margin: auto` a modal <dialog> is centred by; PdDialog (and so the uninstall guard, since it was written) and the Ctrl+K palette were both affected. `m-auto` / `mx-auto`, measured in the dev server: (0,0) before, centred after. - On a profile that had never downloaded the index, Search said "preparing the package index" for ever and never offered the download. Moving the load into the background let a failed load restart on the next search, which reset the slot to Warming before the failure could be read, and the screen asked again every 150 ms. A failed load now stays failed until a refresh; a test in state.rs failed first against the old rule. From the documentation pass, each checked against the code: - The GUI's snapshot diff used the plain diff while the CLI's and the rollback used the engine-aware one, so the two heads disagreed about pip and setuptools across engines (G5). - `--json`'s help still promised NDJSON; `--yes`, `--quiet`, `--verbose`, `--log-file`, the install spec and `engine` described behaviour they did not have. Corrected, and the 32 help goldens re-blessed for exactly those lines. `pipdock engine` now marks the configured engine, as its help always said; `health --fix` printed a dirty-tree warning to stdout before its JSON; the text preview now lists withdrawn releases, as the GUI's does. - Copy that promised what the code does not do: a pinned package "can still be updated on its own" (an Exclude pin filters a named package too), a held pin left only "out of bulk updates", and an empty Environments screen pointing at a Browse… button that does not exist. - Stale comments in exec, the pip and uv parsers, index refresh, health, the pin screen, the status line, the settings store and i18n.ts (whose missing-key warning never fires). The ExecutionSummary.cancelled description is part of the public schema, so that golden and the TypeScript bindings move with it. - Metadata lookups reuse the shared HTTP client (M37 had been half done); insta was a dev dependency of core that nothing in core used; the integration workflow's checkouts no longer persist credentials; the capability file cites SECURITY §4, where the rule lives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
12bf723daa |
ci: failures reach someone, audits run on what is merged, releases are attested
- notify-ci-failure.yml lists its workflows by name. `workflows: ['*']` is not a wildcard to workflow_run: it matched nothing, so `main` was red from 2026-09-23 with no one told. - cargo audit runs a prebuilt cargo-audit (taiki-e/install-action, pinned by commit) with `--deny warnings`, replacing rustsec/audit-check@v2 - Node 20, a check-run write token, and on a pull request a failure only for "critical", which is how September's advisories passed every PR. .cargo/audit.toml's contract (a new informational advisory fails CI) is now what runs. - security-scan.yml: both audits daily against `main`, so an advisory against something already merged is reported the day it is published, not at the next PR. - cargo deny (licences, sources, bans) with deny.toml: the licence allowlist makes "every bundled licence is GPL-3.0-compatible" a test. The workspace declares `publish = false`, which it never had - and without which cargo-deny judged the app crates as published ones. - CodeQL analyses rust and actions as well as javascript-typescript. The comment saying CodeQL had no Rust support stopped being true in 2025. - ci-node.yml: Pages and id-token write move from the workflow to the one job that needs them (Sonar S8233); the audit installs with --ignore-scripts (S6505); a new `tauri lockstep` job fails when a Tauri crate and its npm package drift apart on Cargo.lock and package-lock.json. - release.yml: build (read-only token, no persisted credentials) and publish (attest + draft) are separate jobs; the tag must match all five version fields; SHA256SUMS.txt is LF, which `sha256sum -c` elsewhere needs; actions/attest-build-provenance attests the .exe and .msi; softprops/action-gh-release is pinned by commit; `workflow_dispatch` with `dry_run` builds any ref without attesting or drafting. - ci-integration.yml also runs for the CLI, exec, audit, release metadata, errors, store, index, Cargo.lock and rust-toolchain.toml - every one of which its end-to-end steps run through. - dependabot.yml: cooldowns, a group per ecosystem for Tauri packages and for actions and pip, TypeScript held below 6.1 (typescript-eslint's peer range), and the rust-toolchain ecosystem. A multi-ecosystem group would put both Tauri halves in one PR, but what it does to dependencies outside its patterns is undocumented; the lockstep job covers the gap instead. - Sonar: NOSONAR with reasons on the dev scripts' argv and PATH lookups; bundle-cli.mjs no longer claims to run from beforeBuildCommand. The dev CSP moves out of index.html into a Vite plugin that reads devCsp from tauri.conf.json, so a release build carries one policy, the strict one (S7039); checked in the dev server, where React Refresh's preamble still runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
4da4c0f3ec |
fix(ui): the shell - window, grants, CSP, language, keys, table, contrast
The window (U21). It may now be maximized and snapped; the 1600x1100 cap is gone, and the content column stops at max-w-content (87.5rem) instead, centred in what is left. The window is created hidden and src-tauri/src/window.rs fits it to the monitor's work area before showing it: 1180x760 is taller than the work area of a 1920x1080 panel at 150% and of a 1366x768 laptop, so the status line and the plan panel's Confirm opened under the taskbar. Never below 900x560; pinned to the corner rather than centred off-screen when even that does not fit. UI-SPEC §5 says so. The webview's grants (U1, U32). core:default granted some sixty core commands nothing called and not core:window:allow-close, so Decline on the legal gate did nothing in the installed app while its component test - which mocks close() - passed. default.json now holds exactly the five the frontend calls, and a test in lib.rs pins the union of every capability file, plus the opener's four hosts. CSP (U56): object-src, base-uri and form-action 'none'. A release build's style-src drops 'unsafe-inline' - React sets styles through CSSOM, which CSP does not govern. index.html keeps it for `npm run dev`, where Vite injects <style> elements; both policies are enforced, so the stricter decides. To be confirmed on the installed build. Language (U3): the choice is stored and applied at start. save() sent locale: null every time, so choosing Vietnamese lasted until the window closed. Settings now load before the legal gate, so the gate is in the chosen language too, and <html lang> follows the UI. Keys: a screen's data-autofocus wins over the heading (U12) - Search's field lost focus to the shell's effect, which runs after its children's - and `/` works from Search itself. Ctrl+1..9 by e.code (U49): on AZERTY Ctrl+3 reports `"`. A release build swallows F5, Ctrl+R, Ctrl+P, Ctrl+F, F3 and Alt+arrows (U20), which reloaded, printed and found in a single-page app. Also: Security scrolls (U2); the legal gate shows a consent that cannot be recorded (U29); Report bug asks for the link again with the environment, so the issue carries the Python and engine versions, at one subprocess per click rather than per row (U31); the package table's header and rows share one set of widths and one gutter, and narrow tables drop Size so names stay visible at 900px (U22, U23); the grid is focusable (Sonar S6852); --color-danger is #F26A63 and danger badges use a 15% tint, with tokens.test.ts now compositing every badge tint over every surface (U46 - 3.92:1 before); test seeds typecheck instead of `as never`, the IPC mock uses the real isPdError and has the audit cache entry (U10). U14 and U26 were already fixed by earlier commits in this release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a9f476a2ae |
fix(app): a claimed slot releases itself; IO errors say what happened; quieter locks
- The session slot is claimed through a guard that releases it on drop unless it was parked (U4). Release was a call every exit path had to remember, and plan_resolve, uninstall_guard and the rollback preview each had a `?` between claim and release: one failed settings read left the slot Busy and every later plan answered PD-RES-003 until a restart. The slot is a std mutex now, held only to swap a value, so the drop can take it; a test returns early through a claim and finds the slot free and the token gone. - A guard refusal in uninstall_execute keeps the flow parked: the dialog is still on screen and Force remove is still a choice, and its buttons used to answer "no plan". - A file the user chose - an export, a saved report, a requirements file - fails with the code that fits: read-only is PD-PRM-003, in use is PD-PRM-002, a full disk is still PD-SYS-002. Every one of them was PD-SYS-002, "not enough free disk space" (U25). - cache_clear holds the slot of the feature that owns the target - Health for the tools venv, the Security tab for the audit venv, the plan slot for snapshots - so a clear is refused while that feature runs instead of deleting the venv in use, and a parked preview is put back (U36). The deletion runs off the async workers. - The name index loads in the background on its own connection (U35). The load held the store's lock for 140 ms - every command that wanted the store waited behind a keystroke - on a worker the app shares; the triggering search answers ready:false, as the command's doc always said. - Environment probes run four at a time instead of in series (U19, part). - The audit's cancellation token is registered before the freeze, so Stop during it is honoured (U37); a run stopped that early skips the venv sync and reports itself cancelled. - A cache test named its scratch folder after the clock alone, so two tests in one tick shared it and the fresh-install test read the other's files. It failed once in this run; a counter fixes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
77ca18cc33 |
feat(app): the GUI logs, says when it cannot start, and shows where the log is
- The GUI writes data\logs\pipdock.<date>.log through the same core::logging the CLI uses, with
the panic hook installed, so a crash leaves a record where it used to leave nothing.
- A data folder that cannot be opened is said in a dialog before any window exists (U18). The
store was opened inside Tauri's setup hook, whose failure is a panic in the event loop: a
release build has no console, so the user double-clicked and nothing happened. It now opens
before Tauri starts, and the failure shows the code, the message and the log path through
rfd - already in the tree via tauri-plugin-dialog, so Cargo.lock gains one dependency edge and
no crate. It is the one place GUI copy is written in Rust (both languages at once), because no
webview exists yet to load a catalog.
- logs_tail returns LogTail { dir, lines } - a new schema, so schema-LogTail is blessed and
schema-unknown-type lists one more type. NOT_YET is down to one entry, env_add_manual.
- Settings gains a Logs row: the folder, as a path, and "Copy recent log", which re-reads the tail
at the moment of copying so the clipboard holds the run that just went wrong. The clipboard
permission "Copy full log" already had is enough; no capability changes. en + vi copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
535b4c8707 |
fix(health, audit, index, snapshot): what was previewed is what is fixed, and smaller holes
Code Health - ruff --fix ran `check . --fix` with none of the exclusions the previewed run used (C4). Real ruff 0.17.1, verified: it rewrote every .ipynb in the tree - the preview excludes notebooks - and, in a project whose pyproject sets its own `exclude` (which replaces ruff's defaults), the files under .venv as well. The fix argv is now the read-only argv plus --fix, by construction; re-run against both cases, neither file changes. - git status runs with -c core.fsmonitor=false (M40): a project folder that carries its own .git/config could name a program for `git status` to run, and asking "is it safe to write here" would have run it. - One tool whose output cannot be read is that tool's problem, not the run's (H24). A `?` at the last step returned from the whole run, taking the other tools' findings with it. - The fix's own failures speak Code Health's codes, and a timeout says files may already have been rewritten (M39). Project paths lose Windows' \?\ prefix, which every filename in the report carried (M47). Security tab - pip-audit is given pins, not the raw freeze (H21): one editable install failed the whole audit. Index - TLS failures read the error's source chain (M32): reqwest's top-level message never mentions the certificate, so PD-NET-002's guidance never showed. - Typed, borrowing parse instead of a Value tree of 700k objects; the ingest runs on a blocking thread; connect/read timeouts replace a single 120 s total a slow link could exceed while making progress (M36). An empty project list is refused rather than ingested over the index (L55). Snapshots - Ids are fixed width and the list orders by created_at (M43): the timestamp's trimmed fraction made `…09-42Z` sort after `…09-4235606Z`. A sidecar whose id is not a PipDock id is ignored rather than used to build a freeze-file path (L54). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
545e86bd31 |
fix(flow): rollback across engines keeps pip; Hold pins hold; a failed round keeps the preview
- A rollback never removes pip, and across engines leaves pip, setuptools and wheel out of the comparison (C7). uv's freeze has no --all, so a uv snapshot never lists them; compared with pip's freeze every one looked added since, and the restore uninstalled pip from the environment. Meta::engine was recorded for exactly this and read by nothing. Verified: a uv snapshot previewed for a pip rollback now reports the environment already matches. - Hold pins are restated at their version in every resolve (H17). hold_requirements existed and nothing called it, so a held package was only left out of the upgrade list and free to move as anyone's dependency. A hold never releases the packages it collides with - only a forced pin does - so its impossibility is shown as it stands. - PinMode::Exclude's doc promised one-at-a-time updates that filter_upgrades never allowed. The rule stays DATA-FLOW §9.5 and the doc now says so (schema-Pin re-blessed for the wording). - decide() is transactional and the GUI keeps the flow parked when it fails (U24): a failed re-resolve used to leave the new request beside the old report, and plan_decide dropped the flow, so the preview on screen had a Confirm that answered "no plan". - An install no longer runs `list --outdated`, a network sweep of every installed package that nothing in an install reads (M28). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
e2e75f63fb |
feat(flow): PipDock enforces Requires-Python itself, as hard invariant 10 says
Invariant 10 says PipDock enforces Requires-Python because the engines disagree, and nothing did (C2): PD-PKG-001 existed in the catalog and was never raised. pip refused an incompatible exact pin with the "No matching distribution" it gives a typo (PD-PKG-002); uv honours the lower bound, ignores the upper one, planned scipy==1.7.3 on Python 3.14 and failed at install time building it from source. The update flow now checks three places: - exact pins the user typed (name==v, name===v), before any engine sees them. A request that is nothing but such pins is PD-PKG-001 with the range and the interpreter; otherwise the pin is left out and the preview says so (report.incompatible). - forced pins: forcing a release this Python cannot run stays held back, with the reason. - what the engine planned. pip's report already says what each release requires, so nothing is asked; for uv's plan PyPI is, and each release that excludes this Python is ruled out by name (`name!=v`) and the engine asked again, at most twice - it, not PipDock, picks what is next. crate::release asks https://pypi.org/pypi/{name}/{version}/json for info.requires_python, at most eight at once with a 15 s watchdog each, and remembers every answer forever in a new store table (an uploaded release's metadata never changes). A failure is asked again; unknown never blocks. The PyPI client is shared per process now, rather than rebuilt for every request (M37, part). Store v4. Migrations ran on every open - a journal_mode write and eight CREATE TABLEs, on a store some paths open twice per lookup - and an older build set user_version back down, so the next newer build re-ran them (M38). Both fixed, with tests. Verified on Python 3.14: `install scipy==1.7.3` is PD-PKG-001 under pip and uv alike, and `install scipy==1.7.3 six==1.17.0` plans six and says why scipy was left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
3cfb8f82ec |
fix(flow): PEP 668 is decided on a fresh probe, and the override works
The gate read env.externally_managed - whatever the caller last cached - before anything was probed, and the rollback flow had no gate at all (H12). The Settings override saved and nothing read it, so turning it on changed nothing (H11). Every mutating flow now starts with one preamble: probe, then decide on what the probe says. Without the override a managed environment is PD-ENV-002 before any engine command; with it, the flow carries SystemPackages::OverrideAllowed to every mutating engine call. SystemPackages is a named value, not a bool, for the reason SnapshotProof is a named waiver: hard invariant 5 says the flag is never passed implicitly, and this makes "implicitly" greppable. It reaches pip and uv installs and removals, and uv's dry run, which refuses a managed environment without it (verified, uv 0.13.1); pip's --dry-run --report is exempt and is never given it. pip implemented PEP 668 in 23.0 and added the flag in 23.0.1, so below 23.0 nothing is passed and pip 23.0 itself is PD-ENV-002. The CLI reads the override from the store both heads share - deliberately with no flag of its own - and says on stderr, every run, that it is in force. Verified against a uv-managed CPython 3.13 with an EXTERNALLY-MANAGED marker: refused without the override (exit 3); with it, pip installed and uv dry-ran and removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
f9984fa4fb |
refactor(flow): FlowOptions and an Engine::probe seam
Every flow probed through a free function, so nothing `start` decides - the PEP 668 gate, the graph, the drift basis, what reaches the resolver - could be reached by a test without a real interpreter, and the bugs the next commits fix were all there. Engine::probe is a provided method (it is probe.py, not an engine command; no adapter overrides it), and tests/flows.rs drives whole flows against a scripted engine that owns a small, mutable world. FlowOptions carries what the caller decides before a flow starts: the cancellation token and a clock. The token is the caller's because the first resolve runs inside `start`, and a token made there could only be handed out after the resolve it was needed to stop. The GUI registered a token of its own for that window which nothing listened to, so Stop during a first resolve did nothing at all (H13); plan_resolve now hands its token to the flow, and a test proves a hung resolve ends on Stop rather than on its watchdog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
7e6ad52b4f |
fix(graph): platform markers are read, and the lexer is safe on any text
The marker evaluator knew python_version and python_full_version and treated every other variable as unknown, which keeps the requirement in force. The platform markers had been left out as "constants for a Windows-only v1" - but a constant still has to be read. Unread, ipython's `pexpect; sys_platform != "win32"` was in force on Windows, so the dependency view reported pexpect missing from every Windows environment with ipython in it, and the uninstall guard and pin suggestions counted edges that do not exist there (H25). ReverseDeps::for_probe evaluates against probe schema 3's marker environment: platform variables compare as strings with ==, != and PEP 508's `in` / `not in`, which the lexer now reads. Whatever the probe did not report - platform_release on Windows - still keeps the requirement. Every production graph (update and uninstall flows, deps_graph, pin suggestions) is built this way; build_for remains for callers that know only the Python version. The lexer skipped whitespace a byte at a time and sliced a word's length before checking the prefix, so a no-break or ideographic space in some installed package's Requires-Dist cut a character in half and panicked the command (H19). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
91a846c0fd |
build(deps): every dependency to its latest release
Supersedes Dependabot #75, #76 and #77, which could not merge while `main`'s audits were red. Rust (floors raised to what is locked, so the manifests say what is built): - tauri 2.11.5 → 2.12.4 and tauri-build 2.7.3, with the plugins dialog 2.8.3, opener 2.7.2, clipboard-manager 2.5.0 and single-instance 2.5.4 — in lockstep with `@tauri-apps/*` 2.12, which Tauri's own version check requires. - **rusqlite 0.37 → 0.40.2** (libsqlite3-sys 0.38.2, SQLite 3.53.2). ARCHITECTURE §10 held it because libsqlite3-sys used the then-unstable `cfg_select!`; that is stable since 1.95 and the toolchain is now 1.99.1. Nothing here used `u64`/`usize` `ToSql` (disabled by default since 0.38) or `prepare_cached` (optional since 0.38), and 0.40.1 fixes a SAVEPOINT-name injection. - reqwest 0.13.5, tokio 1.53.3, tokio-util 0.7.20, jiff 0.2.38, clap 4.6.7, schemars 1.2.3, sha2 0.11.1, thiserror 2.0.21, serde_json 1.0.154, async-trait 0.1.92, insta 1.49.0, and 211 transitive updates (h2 0.4.20 among them). npm: React 19.3.1, Vite 8.3.4, @vitejs/plugin-react 6.1.2, **Vitest 5.0.5** (all 18 `vi.mock` calls were already top-level), ESLint 10.12.0, typescript-eslint 8.71.2, jsdom 30.1.3, @tanstack/react-virtual 3.14.21, i18next 26.4.7, react-i18next 17.0.19, @types/* current. **TypeScript stays 6.0.3**: typescript-eslint 8.71.2 still peers `>=4.8.4 <6.1.0`. Code Health pin: ruff 0.16.3 → 0.17.1. Verified by running it, not by reading its changelog: `health/sample/capture.py` reproduces all four committed `ruff/*.json` byte for byte, and exit codes 0/1/2 still mean clean/findings/error. Two things the upgrade surfaced in the frontend, both real: - virtual-core 3.19 measures the scroll element with `clientWidth`/`clientHeight` (it used `getBoundingClientRect()`), and that first reading replaces `initialRect`. jsdom reports 0, so 13 table tests and 5 App-level ones went back to rendering an empty grid; the setup now stubs the two properties beside the `offset*` ones. - jsdom 30.1 implements "a closed `<dialog>`'s contents cannot take focus", which is the spec. React applies `autoFocus` by calling `focus()` during commit — *before* PdDialog's effect calls `showModal()` — and never writes the `autofocus` attribute, so neither path focused Cancel. It worked in WebView2 only because Cancel is the first focusable element. PdDialog and the palette now focus explicitly after `showModal()`, and return focus to whatever opened them on close (it fell to `<body>` before). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
02cc17d95d |
docs: the dependency view recorded, and 1.3.0
UI-SPEC §4 gains the screen and **loses the sentence it contradicted**. It said the third row action folds all three into a `⋮` menu "with the budget intact"; that makes uninstall four clicks where §5's table records three, hand-counted. The correction is written as a correction rather than an overwrite, because the reason it slipped through is the useful part: four is under the ceiling of five, and a ceiling is not a ratchet — a table of measured counts is. §5 gains the row, §6 the component, ARCHITECTURE §4 the forward direction and the whole-graph value. **The dangling cross-reference is repaired by writing what it promised.** `ROADMAP.md` has pointed at "the analysis above" for what blocks P1-6 and P1-7 since 1.2.0, and no such analysis was anywhere in the document — the survey lived only outside the repository, and the sentence had been copied into CLAUDE.md as well. P1-6's half is its slice record. P1-7's is now written too, and counted against the tree rather than recalled: no toast component, no notification/autostart/tray dependency, one plan-scoped `tokio::spawn` and zero intervals in either head, and no surface that can report a failure at 03:00 while `logs_tail` is still `NOT_YET`. Drafting this commit I nearly shipped a CLAUDE.md line claiming that survey existed before I had written it, which is the same defect one layer up. Version in five places, moved together: the workspace inherits it, so `Cargo.toml`, `package.json` and `tauri.conf.json` are the only hand edits and the two lockfiles are regenerated. Hand-editing `Cargo.lock` would have been wrong twice over — `scopeguard` and `simd_cesu8` are also at 1.2.0 and `fs_extra` was already at 1.3.0. `cargo metadata --locked` passes, which is the one-command check. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
c58fcac523 |
feat: deps_graph, and the shape it deliberately is not
`pin_suggestions`' shape, not `audit_run`'s. No `Sessions` slot, no progress channel, no cancellation: those exist because an audit is 18-68 seconds, and a probe is 605 ms. Borrowing them here would be a constant carrying its original units — the mistake `AUDIT_TIMEOUT` already records. One call per environment rather than one per package, which is the whole reason the value is shaped this way. The view re-centres on a click; a `deps_for(pkg)` command would read more naturally and pay a probe for every click to answer a question the previous probe already held the data for. No store read, so there is no guard to drop — `pkg_list` is the same and for the same reason. All five sites: the command, the handler list, `COMMANDS`, the wrapper with `DepsGraph` added to the `import type` list (`export type *` does not bring it into scope for a wrapper's own signature), the `test/ipc.ts` mock, and ARCHITECTURE §7 — with its trailing pipe, which the test added two commits ago now checks. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
3152c55eaa |
fix(docs): three things main was carrying, and the gate that missed one
Found while surveying P1-6. None is caught by any suite, which is the common thread rather than a coincidence. `docs/ARCHITECTURE.md`'s `audit_run` row was the only row in the §7 command table missing its trailing pipe, so the table rendered wrong from 1.2.0. Every gate passed: the command is registered, declared and documented, and `documented()` strips only the *leading* pipe, so the row parsed correctly and nothing looked at its shape. A spec sentence is not a test — and neither is a spec table. The new `the_architecture_table_is_well_formed` asserts the shape as well as the contents, and was mutation-checked against the row it was written for. `catalog.rs`'s comment read "Rust has 33; docs tabulates 30" three lines above `assert_eq!(Code::ALL.len(), 34)`. Both numbers were one behind; the doc tabulates 31, folding PD-HLT-001..004 into one row. CLAUDE.md's error-code checklist named three schemas embedding `Code` while saying "four", and 1.2.0 made it genuinely four by adding `AuditReport` via `ToolProblem.code` — five snapshot files in all. So anyone adding a code today would leave `golden__schema-AuditReport.snap` stale. The line now says to grep `PD-ENV-001` across the snapshots rather than trust the list, because that is how the omission was found. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
bee85dcdc2 |
chore(release): 1.2.0, and the Security tab recorded
Version in all five places — `Cargo.toml`, `Cargo.lock`, `package.json`, `package-lock.json`, `tauri.conf.json` — and `cargo metadata --locked` verified after, which is the one-command check that would have caught the `thiserror` lockfile breakage that had `main` red for a day in Phase 4. The ROADMAP stage record, and three rules in CLAUDE.md that the diff does not show: - **A spec can promise a field that has never existed.** SECURITY §6 and PRD P1-1 both asked for a severity pip-audit publishes under neither vulnerability service, and §6 named a venv the code had refused since P2. Found by running the tool and reading its JSON, not by reading the specs against each other. When a spec describes an external tool, the tool is the authority. - **A watchdog is a unit, not a number.** Borrowing Code Health's 120 s gave an audit a linter's budget for a network fetch, and it fired on the first real run. A borrowed constant carries its original units with it. - **Adding a field to a struct that is summed is a bug the suite will not see.** `total_bytes` kept adding three entries after a fourth arrived, with every cache test green. Post-1.0 is down to two items: the dependency-graph view and the scheduled check. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
62c359c75b |
feat: the audit venv is a cache target, and a report can be saved
Two gaps the Security tab left, both of the same kind — a thing that exists on disk or on screen that the rest of the app did not know about. **The cache manager under-reported by a whole venv.** P1-1 put pip-audit in `data\audit\`, and `cache::usage` knew only about `data\tools\`, so "clear the cache" would have left one venv behind while reporting it gone. `Target::Audit` is a separate variant rather than part of `Tools` for the same reason the venvs are separate: two directories are two rows. Fixing that turned up a second, worse one. `total_bytes` summed three entries and the new field made four, so the total silently under-reported while **every existing test passed** — the size on screen would have been wrong with nothing to say so. `every_entry_reaches_the_total` now asserts on distinct powers of two, so a missing term shows up as its own bit rather than as a number that merely looks plausible. `PdCacheUsage`'s `entryOf` also became a lookup, because its ternary chain ended in a hand-maintained negation that would have reported the tools venv's size on the audit row. **And an audit could not be saved**, where Code Health writes Markdown and JSON beside a chosen path. `audit_save_report` is `health_save_report`'s shape exactly, including both of its reasons: Rust does the writing because `dialog:allow-save` asks for a path and grants no `fs` permission, and the report comes from the frontend because what the user asked to save is what is on their screen. `audit::markdown` lives in core so a future `--format md` reuses it rather than growing a second renderer, and it states the source at the top — an advisory database records what has been *reported*, which is what a reader needs to judge an absence of findings. Still owner-verifiable only: the save dialog itself, which needs the real Tauri runtime rather than the stubbed bridge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
47b9bc9039 |
docs: the Security tab's spec and legal debt, including two claims that were false
SECURITY §6 has said since it was written that pip-audit "runs **from the tools venv**". The code has refused that since P2, with three tests enforcing the refusal, because `pip-audit`'s closure contains `msgpack` — no universal wheel, so a new CPython would hard-fail the whole sync under `--only-binary=:all:` and take Code Health down with a feature it does not use. §6 now describes the venv that exists. **And neither §6 nor PRD P1-1 could have been implemented as written.** Both promised a severity — §6 as "(CVE/GHSA id, severity, fixed-in)", the PRD as "severity-sorted" — against a field pip-audit has never had under either vulnerability service. Running the pinned 2.10.1 is what settled it: a finding carries `id`, `fix_versions`, `aliases` and `description`, full stop. Both are corrected to the order that ships, which is package → fixable → id, and both now say why a derived severity would be worse than none. `osv.dev` joins the opener allowlist, which ROADMAP has flagged as owed since 1.1.0 — without it every advisory link rejects and nothing opens, which is the silence SECURITY §4 exists to name. The description records what makes this entry different from `docs.astral.sh`: `PdHealthReport` hands over ruff's own `finding.url` verbatim, while `audit::advisory_url` **builds** the URL from an id checked against a whitelist that cannot contain a slash, colon, question mark, hash or percent. The tool chooses the id, never the destination. The three legal documents that said pip-audit is "not invoked in version 1.0" now say what it does, and DISCLAIMER §4's forward-looking sentence is replaced by one about a feature that exists: findings come from **PyPI's** advisory data, an advisory database is a record of what has been reported rather than a guarantee, and PipDock assigns no severity because pip-audit publishes none. **This re-shows the consent gate once** for every existing user — the mechanism working, not a regression. Also: UI-SPEC §4 gains the screen it has assumed since §3's diagram, §5 its click budget counted in the running app, and §6's off-list inventory said *four* while naming five — now six, plus the three from 1.1.0 it never named at all. CLI-SPEC §3 documents `pipdock audit` and drops `doctor`'s promise of an audit summary it has never printed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
2c6670a336 |
feat: audit_run, audit_cancel and pipdock audit
The Security tab's core reaches both heads. `AuditReport` joins `SCHEMA_TYPES`, which is the six-place change the P1-A record describes — including `golden.rs`'s own copy of the list, a new `golden__schema-AuditReport.snap`, and the expected churn in `golden__schema-unknown-type.snap`, whose error message enumerates every known type. `audit_run` takes the freeze itself, through the configured engine, because that choice changes what is audited: pip is invoked with `--all` and includes pip and setuptools, uv has no such flag. The real run makes that concrete — auditing the SP-4 environment reports **five advisories in pip 25.0.1** alongside urllib3's eight, which a uv-engine audit of the same environment would not see. The store guard is read and dropped before any subprocess. `AppState.audit` is `Sessions<()>`: nothing is parked, because an audit hands its report straight back with no second call consuming it the way `health_fix` consumes a `HealthSession`. What the slot is for is the **token**, which lives beside it so `audit_cancel` can reach a run the slot no longer owns. Its own slot rather than health's, for the reason health's is not `sessions` — an audit touches no environment, so refusing it while Code Health runs would be a lock with no invariant behind it. `pipdock audit` exits **1 on findings**, as `health` does: an advisory is a result, not a failure, and a script wants to branch on it. A tool problem outranks the findings, so a report that is empty because pip-audit never ran cannot exit 0 and read as "nothing wrong here". **Run rather than asserted.** Cold, against `spikes/out/target-env` with an isolated `LOCALAPPDATA`: the audit venv bootstrapped, wrote its manifest, and reported 13 advisories across 2 packages; `--json` emitted **one** camelCase document with `toolVersion` read back out of that manifest, and exit was 1. The second run did no bootstrap at all, which is `needs_sync` returning `Fresh` for `AUDIT_TOOLS` — the half of the venv split that only a warm second run can show. Two hand-maintained lists were a row short and are not now: ARCHITECTURE §7, which the new drift test demanded before it would pass, and `golden.rs`'s per-command help list, which nothing polices — so `help-audit.snap` exists rather than the subcommand's help going unpinned. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
8d9a28dc03 |
refactor(health): the tools venv takes a tool list, and pip-audit gets its own
P1-1's blocking decision, settled: pip-audit does **not** become a fourth entry in `HEALTH_TOOLS`. `HEALTH_TOOLS` gave two reasons for excluding it and only one survives the Security tab existing — "a feature they cannot reach" stops being true, but `pip-audit`'s closure still contains `msgpack`, which publishes no universal wheel and would hard-fail under `--only-binary=:all:` on a new CPython. Installed alongside the three, that failure takes the **whole** sync down, and Code Health with it, over a package Code Health does not use. So the bootstrap is parameterised rather than duplicated. `pins_for(tools)`, `sync_steps(tools)`, `needs_sync(dir, tools)`, `sync_tools_venv(dir, python, tools, sink)` and `verify_tools` all take the set; `audit_dir` is a sibling of `tools_dir`, not a directory inside it, so `cache::Target` can resolve them separately. Everything below the tool list — the manifest, the pin hash, the requirements rendering, the rebuild-don't-repair rule — is shared, so there is one implementation to keep right rather than two that drift. Rendering per set is what makes the two hashes independent, which is the property that matters in practice: a Dependabot bump to `pip-audit` must not re-sync Code Health, and a bump to `ruff` must not re-sync the audit venv. Asserted. The three tests that policed the old rule are rewritten rather than deleted, because the rule changed shape rather than going away. "pip-audit reaches no venv" becomes **"the two sets are disjoint"** — which is the property that actually keeps one tool's wheel availability from breaking the other's feature — plus the two directions the old tests did not cover: rendering the audit set produces pip-audit and none of Code Health's, and the hashes differ. Mutation-checked by adding `ruff` to `AUDIT_TOOLS`, which fails the disjointness assertion by name. Nothing creates the audit venv yet; `audit::run` is the next commit, and the cache manager gains the directory when there is one to report — the `LOG_RETENTION_DAYS` rule, applied in the other direction. One trap worth the line: clippy's `tabs_in_doc_comments` caught a literal tab that a patch script had put in `tools_dir`'s doc where a `\t` was meant, and looking for it turned up a **BEL** in `audit_dir`'s from the same cause. The tab was visible in a lint; the BEL was visible in nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
b526d1bf81 |
docs: ARCHITECTURE §7's five missing commands, and a test that keeps it honest
§7 opens with "A command that is not listed here does not exist; adding one means amending this section in the same commit." The 1.1.0 P1 wave broke that rule five times: `pin_suggestions`, `env_export`, `requirements_read`, `cache_usage` and `cache_clear` are registered, wrapped and shipping, and appear nowhere in the document. 35 rows against 38 registered commands. The rows are added, and so is a fourth drift test. The three that existed police `lib.rs`, `COMMANDS` and `NOT_YET` against each other and not one of them reads the document making the promise — the assertion message of `every_registered_command_is_ declared` even claimed it did, so that message is narrowed to what it actually checks. `documented()` parses §7's table the way `registered()` parses the handler macro, and the new test runs both directions: a row for a command nobody registered is the same lie as a command nobody documented, it just fails later. Checked by deleting the `cache_clear` row, which fails it by name. Two stale counts with it. `golden.rs` said "25 as of Phase 3 P3" and there are 30, so the number is removed rather than reset — the list is directly below it and `schema_lists_exactly_the_documented_types` already holds it to the binary's. CLAUDE said 58 goldens; there are 64, now pinned to 1.1.0 per the counting-trap rule. ROADMAP's screenshot note was **not** stale, which only looking established: the seven pre-About shots really do show an eight-entry sidebar. The sentence just reads as though `screenshot/` held seven files when it holds eight. Reworded, and while there: `about.png` shows nine entries and a build panel reading 1.0.0, so every shot is now stale in at least one way. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
edb7544b93 |
chore(release): 1.1.0, and the P1 wave closed
Five places again — Cargo.toml, Cargo.lock, package.json, package-lock.json, tauri.conf.json — and `cargo metadata --locked` earned its place in the checklist by failing on the first attempt, exactly the way `main` was broken this morning. The shipped CLI reports `pipdock 1.1.0`. The stage record covers all four slices and the four things running them said that reading could not: 94 suggestions on a real environment, a parser that turns prose into a package name, a cache manager for a logs directory that does not exist, and a palette that ranked an action above the screen it belongs to. **One PRD row corrected rather than ticked.** P1-4 asked for the engine caches (`pip cache`, `uv cache`) as well as PipDock's own. Those belong to the engine, live outside `%LOCALAPPDATA%\PipDock\`, and purging them is a subprocess rather than a file delete — a different feature wearing the same word. The row says "partly shipped" and names what is missing, and the roadmap's open list carries it. UI-SPEC §1's "signature moves" sentence stops saying the palette is P1; §8 gains Ctrl+K; §4 gains the Disk usage section and why it lists three artefacts. Two rules into CLAUDE.md, both paid for this afternoon: a parser correct for trusted input is a hole for untrusted input, and check a thing exists before shipping a size and a Clear button for it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
0b02bbde1e |
feat: the cache manager — P1-C
**The scope needed correcting before anything was built: there are no log files.** `LOG_RETENTION_DAYS` has never had a reader, the only log is the in-memory ring buffer behind *Report bug*, and `logs_tail` is still owed. So this covers three artefacts, not the four the roadmap listed — a "logs — 0 B" row would be inventing a thing that does not exist. **`index.db` is not a target, and the screen says why.** It holds the package index *and* the settings *and* the pin list *and* the legal-consent record in one SQLite file, so a "clear the cache" that removed it would take a user's pins — the same class of surprise the privacy policy had to be corrected for. Its size is still reported: a disk report that omitted the largest thing on disk would be answering a different question. **This is the first delete-a-tree in production code**, so the safety design is the feature rather than the UI: - **Nothing is removed by path.** Callers name a `Target` enum; `cache::path_of` is the only thing that turns one into a location, and it is private. There is no function here that accepts a path to delete. - **The resolved path is checked to be inside the data root**, canonicalized on both sides. A prefix test on unresolved paths is a string comparison wearing a `Path` — on Windows it passes `data\..\..\Users` and fails a legitimate path that arrived through a junction or a short name. - **Symlinks contribute zero and are not walked.** `fs::metadata` follows them and would report the target's size; worse, a recursive walk that follows one can leave the data root entirely, which is the single thing this module exists to prevent. Pinned by a test that builds a real link out of the root. `PD-PRM-002` rather than a generic failure when the files are held open: a tools venv whose Python is still running is the ordinary way to hit this on Windows, and it is something the user can act on. Clearing goes through `PdDialog` — Cancel first and focused, per UI-SPEC §7 — and the confirm says exactly what is lost: snapshots take the *record*, not the environment. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
3d636a4793 |
feat: requirements export and import — P1-B
**Export needed no formatter.** A `pip freeze` document *is* a requirements file, and `Engine::freeze` already produces it for snapshots — so `env_export` is that string and a path, and there is one idea of what a written-down environment looks like rather than two. A constraints file is the same body under a different name. Import is the half with work in it, and the work is parsing. `snapshot::parse_freeze` was deliberately not reused: its narrowness is what makes it the exact complement of `unrestorable_lines`, an invariant the rollback preview depends on, so widening it to read a hand-written file would break the thing it exists for. `crates/pipdock-core/src/requirements.rs` handles ranges, extras, markers, hashes, continuations and comments, and **reports by line** what it will not use: `-r`/`-c` includes name files PipDock has not read, `-e` and URLs install from outside the index, `--index-url` changes how everything installs. Reported rather than skipped, because a silently shorter install list is the failure DATA-FLOW §9 exists to prevent — the preview would be honest about itself and wrong about the user's file. **A real defect found while writing the tests.** `graph::Requirement::parse` splits the name at the first space, so `this is not a requirement` parses happily as name `this` with constraint `is not a requirement` — which would have rendered as a spec containing spaces and gone straight into argv. That is correct for its own job: `Requires-Dist` metadata never looks like prose. A file a person typed can. So the constraint is shape-checked here, the same obligation SECURITY §2 puts on every other user-supplied version, and the check is deliberately a shape test rather than a PEP 440 parse — rejecting a legitimate specifier would make a package uninstallable, which is the worse failure. Eight specifier shapes are pinned by a test. Reading and writing both happen in Rust: `capabilities/default.json` grants only `dialog:allow-open` and `dialog:allow-save`, so the webview can ask for a path and do nothing with it. `pickOpenFile` joins the two existing pickers; the permission already covered it. The UI sits on the environment detail screen beside snapshots — both are the environment as a document — and **import does not install.** It hands the specs to the ordinary flow, which previews, snapshots and confirms. Arriving from a file earns no exemption. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
446d84a3b8 |
feat(bridge): pin_suggestions
Takes the whole `PyEnv`, not an `env_hash`. There is no resolver from one to the other and there cannot be: `envs::env_hash` is a one-way SHA-256 of the canonicalized interpreter path. Every command that probes takes a `PyEnv` for this reason; the hash is derived inside, the same thing `flow::UpdateFlow::start` does. Store read, guard dropped, *then* probe — `pkg_outdated`'s rule. Both the pin list and the threshold come out of one locked block. Holding it across the await compiles, passes every test, and freezes `settings_get` and the pin commands for the length of the probe. One probe per call, which is why UI-SPEC §4 puts this on the Pins screen rather than a sidebar badge: only someone who opened the tab pays it. The alternative — asking the frontend for the `Dist` list it already holds — would send several hundred packages' worth of `requires_dist` back across the bridge to save a subprocess. **The drift tests found a fourth registration site the plan had missed.** `crates/pipdock-cli/tests/golden.rs` keeps its own copy of `SCHEMA_TYPES`, and `schema_lists_exactly_the_documented_types` reads the real list back out of the binary to compare — so the local copy cannot silently fall behind. It failed exactly as designed. Six places, not five: core's `schema_for!`, core's `SCHEMA_TYPES`, the test's copy, `generate_handler!`, `COMMANDS`, and the typed wrapper. Two goldens, both read before blessing: `golden__schema-PinSuggestion.snap` is new, and `golden__schema-unknown-type.snap` gains one word because its error message enumerates every known type. That is a real behaviour change — the CLI serves one more schema — which is the only condition under which that file may be re-blessed. 61 snapshots now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
196f0408e4 |
chore(release): 1.0.0
Five places, and they have to move together — a stale lockfile is exactly how `main`
has been red since
|
||
|
|
57c365e36a |
feat(ui): About — what PipDock is, and a way back to the documents you accepted
UI-SPEC §4 has specified *Legal & About* since the spec was written, as a section inside Settings, and four milestones shipped without it. That is what folding a read-only surface into a screen of controls does. It is now the ninth tab. **The ninth tab cost nothing.** `App.tsx` reads `NAV_KEYS[key - 1]`, so appending `about` made it Ctrl+9 without moving one existing binding. UI-SPEC's warning was about *inserting* — which is still true, and is still why Snapshots is a mode of Environments: it would have to sit beside Environments to read as related. The comments in four files said "a ninth entry would renumber Ctrl+1..8"; they now say what the rule actually is. Contents: what PipDock does and what it does not collect; version and the legal-docs hash from `app_info` — a command that has existed since M1 with no consumer, so the version on screen cannot drift from CARGO_PKG_VERSION; the SPDX identifier `GPL-3.0-only` rather than the looser "GPL-3.0" elsewhere; a control that puts the gate back; and contact. **Addresses are copied, not opened.** `mailto:` would widen the opener capability by a whole URL scheme, and the scope's real job is bounding the two call sites that pass data — one of which hands over a URL that came out of ruff's JSON. Clipboard-write is already granted, works with no mail client, and the address has to be on screen anyway. Only `https://poli0981.dev/*` was added, for the links page. They are also TS constants rather than catalog entries: an address is data (I18N §2), and a catalog is a thing a translator is invited to change. **`review` is a flag of its own, not `accepted = false`.** Re-using the latter was one line and would have made a review indistinguishable from a revocation — offering Accept, and a Decline that closes the application, to someone who wanted to re-read their privacy policy. The gate takes a presentational prop instead; first-run rendering is untouched and `PdLegalGate.test.tsx` (its first test, ever) pins that. Two things found by running rather than by the suite: - `app_info` fired **twice** per mount under `npm run dev`. StrictMode's doubling is dev-only, but it drew attention to the real one: `key={nav}` remounts `<main>`, so every visit to About was a fresh call for a value baked in at compile time. Now cached per process in `useAppInfo`. Verified against the bridge log: one call. - The whole seam — About, re-open, Ctrl+3 refused behind the modal, Close, back on About — with zero IPC calls, confirming consent is never touched. VI catalog complete and checked in the running app; the parity gate gets the rest. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
2abfef6a7c |
fix(ui): one window, one way back, and a sidebar that stops mid-plan
Four things from the first real click-through of the installed build. **Two "Back to packages" buttons after a successful run.** `PdSummarySheet` renders `plan.done` from its `onDone`, and the panel rendered a second one beneath it. The panel's is now shown only when there is no sheet — a run that failed before producing an `ExecutionSummary` has an error row and nothing else, and without a button that phase is a dead end. Worth naming *why* no test caught it: `PdSummarySheet` has its own tests and `PdPlanPanel` had none, so the two had never been rendered together. `PdPlanPanel.test.tsx` now does exactly that, and it was checked against the bug — reverting just the panel change makes it fail with "expected 2 to have length 1". Adding it exposed a second gap: `ipcMock` had no `reportBugUrl`, which `PdErrorRow` asks for on mount, so any screen containing an error was untestable. **No single instance.** Five launches gave five windows — which is five `AppState`s over one machine: five `Sessions` slots, each certain it owned the mutation in flight, and five `PD-RES-003` guards that cannot see each other. `tauri-plugin-single-instance` is registered **first**, before any plugin that could take a lock, and the handler unminimizes before focusing: focusing a minimized window leaves it minimized, and the user's second launch appears to do nothing. Added without the `deep-link` feature `cargo add` selects by default — PipDock registers no deep links, and it pulls three crates into the audit surface for nothing. **The sidebar is disabled while a plan owns the content area.** Navigating away left the plan parked in Rust with nothing on screen driving it, and the next Update answered `PD-RES-003` about a plan the user could no longer see. `App.tsx` already refuses `Ctrl+1..8` while the guard dialog is open; this is that rule applied to the panel and to the mouse. **The window is bounded and cannot be maximized.** `maxWidth`/`maxHeight` at 1600×1100 with `maximizable: false` and `fullscreen: false`. The layout is a fixed sidebar plus one scrolling column; stretched across a 4K panel it is a column of text with a metre of empty surface. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
9fee1cd077 |
fix(ci): a bundling concern had leaked into every compile
CI caught two things the previous commits broke, and the first is pointed: I declared the CLI sidecar in `tauri.conf.json`, and **`tauri-build` validates `externalBin` at build-script time** — so plain `cargo clippy` and `cargo test` on `pipdock-app` began failing in a fresh clone with *"resource path `binaries\pipdock-x86_64-pc-windows-msvc.exe` doesn't exist"*. It passed locally only because I had already staged the file. That is exactly the "works on my machine" failure the commit that introduced it claimed to be preventing. `externalBin` moves to `src-tauri/tauri.bundle.conf.json`, merged with `--config` only when bundling. Compiling the app does not need the sidecar; bundling it does, and the config now says so. Verified the way it should have been the first time: **`src-tauri/binaries/` deleted**, then `cargo clippy -p pipdock-app --all-targets` and `cargo test --workspace` both clean — and `npm run bundle` from that same state stages the sidecar and produces two installers, the NSIS payload still carrying `pipdock-app.exe` and `pipdock.exe`. The whole recipe now lives in one `npm run bundle` script the workflow calls, so nobody has to remember that `--locked` goes after `--` or that the overlay exists. RELEASE-CI §3.1 records both traps rather than just the command. Second breakage: `ci-integration.yml` hardcoded `%LOCALAPPDATA%\PipDock\tools` in three places — it quarantines `ruff.exe` there to prove `PD-HLT-001` — and the data root had moved under `data\`. A test that reaches into a path by hand is a test that has to be told when the path moves. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
4d687a4a40 |
fix(core): the program and the data stop sharing a directory
Installing the first bundle put `pipdock-app.exe`, `pipdock.exe` and `uninstall.exe` into
`%LOCALAPPDATA%\PipDock` — the same folder as `index.db`, `snapshots\` and `tools\`, because
Tauri's NSIS per-user installer writes to `$LOCALAPPDATA\{productName}` and
`store::default_app_data()` derived from the same name.
SECURITY §8 tells users that deleting the app data folder is a complete reset. With the two
collided, following our own documented advice would have uninstalled the application.
The data root moves to `%LOCALAPPDATA%\PipDock\data\`. Changed now because it is still free:
**no release has ever been published**, so there is no on-disk layout in the world to migrate
and no migration code belongs here — a `default_app_data()` that checked for a legacy
location would be dead code from its first commit.
`APP_DATA_SUBDIR` is a second constant rather than `"PipDock/data"` in one join: a path built
from a literal containing a separator reads differently depending on the platform's idea of
one, and every comparison against it inherits that.
Verified by moving this machine's real data and asking the binaries to find it: `tools status`
reports `…\PipDock\data\tools` and *up to date with the pins shipped in this build*, and
`search` still answers out of the 53 MB index.
Two doc paths were also corrupted, by me, in earlier commits: `\PipDock\tools` written through
a Python patch became `PipDock<TAB>ools` in SECURITY §2 and ROADMAP. Fixed here rather than
left for a reader to puzzle over.
The uninstall behaviour is recorded in SECURITY §8 because it was tested rather than assumed:
uninstalling removes its own binaries, the Start-menu shortcut and the registry entry, and
leaves the data directory untouched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
debc05edee |
fix(bundle): ship the CLI, which the installer had been leaving behind
The first bundle ever built for this project contained exactly one binary. NSIS payload: `pipdock-app.exe`. MSI `app.cab`: one file. **`pipdock.exe` was not installed at all** — while PRD P0-12 is "CLI core parity", CLI-SPEC documents the entire surface, `golden.rs` pins 58 snapshots of its output, and the README's own Quick start opens with `pipdock env list`. A user who installed PipDock had none of it. Found by listing the installer. `tauri.conf.json` declared no `externalBin` and no `resources`, so there was nothing to notice in a diff — the config was correct for a GUI-only app, and nobody had built one to see what came out. `scripts/bundle-cli.mjs` builds the CLI and stages it as a sidecar under the host triple, which Tauri strips at bundle time, so it installs as plain `pipdock.exe` beside the GUI. The triple is asked of `rustc -vV` rather than assumed, since a guess breaks the moment anyone cross-compiles. It runs from `beforeBuildCommand`, not only from the release workflow. A locally built installer and a released one have to be the same artifact; a bundle that differs by who built it is how "works on my machine" reaches a release. This build proves the clean-checkout case too — `src-tauri/binaries/` is gitignored and did not exist when the build started. **`PATH` is deliberately left alone** (owner decision, 2026-08-13). PipDock does not modify the user's environment, which is the restraint SECURITY §5 already applies to not shipping a self-updater; the README says where the binary lands and gives the one-liner to add it if that is what you want. Verified by rebuilding and listing both installers: NSIS 5.7 → 8.8 MB carrying `pipdock-app.exe` and `pipdock.exe`; MSI 7.6 → 11.6 MB carrying `Path` and `Bin_pipdock.exe`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
3e72ecf7c4 |
feat(ui): Fix N safely fixable issues, and a confirm that says what it cannot undo
**One dialog with two states, not two dialogs.** Two confirms would break the click budget, and the second is the one nobody reads. `PdDialog` renders Cancel first and focuses it, so Enter without Tab cancels — UI-SPEC §7's rule for a destructive confirm, inherited rather than re-implemented. `button[data-action='fix']` joins the forced-colors list in `styles.css`, because high contrast drops every tint and a destructive primary that looks like Cancel is worse than no colour at all. The unconditional line is *PipDock cannot undo this; only your own version control can* — true whether or not there is a repository. The **danger** block is reserved for a tree that really has uncommitted work, so a folder outside version control is not nagged about. That is the same reasoning `fix::dirty` documents for answering `None` rather than warning. `health_dirty` is a command of its own rather than a field on the report, because the answer expires: the user can commit, or start editing, between the run and the button. It is asked when the dialog opens, and `health_fix` asks **again** before writing — this answer decides what to render, that one decides what to allow. Every count comes off the report. The button names `fixable`, the dialog names `fixableFiles`, and neither is derived from the badges rendered beside them — the button, the CLI prompt and the server's own check all have to name one number, which is what `recount` exists for. `fix` is in `NO_HEALTH`, so a second Run closes an open confirm. The server replaces its parked report on a new run, and a dialog left open would let the user confirm a count that no longer exists on either side. On success the tab drops to `remaining` with **no second Run**, which is why the server re-parks its session rather than releasing it. On failure the dialog closes and the report stays: nothing was written, so it is still true, and every failure here is one the user has to act on elsewhere — commit, clear a read-only flag, or re-run. Six store tests, including the two that would pass silently: that `acknowledgedDirty` is true only when the tree really is dirty, and that a failed dirty check opens the confirm anyway rather than blocking the fix for a reason nobody can act on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
d5f02c73d2 |
feat(app): health_fix, and the last NOT_YET row Phase 3 owed
`NOT_YET` is down to two, both M3-general. Code Health is feature-complete. The command takes **no project, no environment, no file list and no findings**. All of it comes from the parked `HealthSession`, which is the point: what is fixed must be what was reported on — the same reasoning that makes `plan_execute` take nothing. `files` crosses as an assertion the server checks against its own copy, so a frontend cannot widen the blast radius past what its own dialog named. Three gates, in the order that matters, all before the first byte: 1. `files` against the parked report — a mismatch is `PD-INT-001`, because only a frontend out of date with its own store can produce it. 2. A **read-only re-read** of the project. Minutes pass between confirming and clicking, and a source tree is not PipDock's to assume is still; a change in either count is `PD-RES-002`, which is DATA-FLOW §9.3's staleness rule applied to the one thing no snapshot describes. It has to be a separate invocation because `--fix` writes as it goes. 3. `git status` asked **again**. The dialog's answer decided what to render; this one decides what to allow. `ruff_argv` is extracted so the re-check and the run cannot drift — a re-check excluding different files would compare two different questions and refuse a fix the user was correctly shown. And a note where the next person will read it: if `RunOptions` ever reaches the wire, this must re-check with the *session's* options rather than the defaults. The session is re-parked either way, carrying the post-fix ruff state on success. The screen drops its tab count to `remaining` without a second Run, so the server has to hold the same thing the user is now looking at — otherwise the next fix is checked against a report nobody can see. `claim_one` rather than `claim`, so finding nothing leaves the slot idle instead of wedging every later command with `PD-RES-003` for a session that does not exist. `FixReport` is the one type on the wire; `FixConsent` never crosses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
fc74edfc0c |
feat(app): health_save_report, Markdown and JSON where the user asked
CODE-HEALTH-SPEC §5's *Save report*, and §7's argument for it: the JSON export is what lets users wire their own CI annotations, which is why "no CI annotations in v1" is a non-goal rather than a gap. Two files from one prompt, because asking twice for what is conceptually one action spends a click on nothing. **Written in Rust, not through `tauri-plugin-fs`.** A general `fs:allow-write-text-file` is a write-anywhere primitive granted to the webview of a tool that already runs subprocesses against the user's interpreters. `dialog:allow-save` only lets the webview *ask* for a path; it still has no permission to read or write a single file. The grant says so where the next person will look for it. `markdown()` lives in `health/report.rs` rather than in the bridge, so a future `pipdock health --format md` reuses it instead of growing a second renderer that drifts. That flag is deliberately not built now — one consumer is not a reason to design for two. The renderer makes the same three-way distinction the tabs do, and for a sharper reason: a saved report is read months later, away from the screen that produced it. An empty section says `_Not run._`, `_Did not finish — see Problems above._` or `_No findings._`, because a document claiming "no findings" about a ruff that could not be spawned would be read as proof the code was fine. The deptry caveat travels with the findings it qualifies for the same reason — the saved file is the one place it cannot be left implicit. Both names are derived from the chosen path's stem rather than from what was typed, so the pair always matches even if the user names the file `report` or `report.txt`. Read the rendered document rather than only asserting on fragments of it: headings, the per-file grouping, the whole-file location with no dangling colon, and "3 of 6 carry a safe fix, across 2 file(s)" against a fixture carrying exactly that. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
2d1b261625 |
feat(app): docs.astral.sh, or every ruff link does nothing
`opener:allow-open-url` was scoped to `https://github.com/*`. Every `RuffFinding.url` points at `https://docs.astral.sh/ruff/rules/<name>`, so the ruff tab's links would have failed — the promise rejects, nothing opens, and nothing in the console, the tests or a review says so. Invisible in dev, which is why it goes in before the screen that needs it rather than after, and why it has its own line on the click-through list. Still scoped. Two hosts is not the same as any host: an unscoped opener is a launch-anything primitive reachable from any injected string, which is the reasoning SECURITY §2 already applies to argv arrays. The second entry is there because a feature failed silently without it, not to make room for future ones. Recorded in SECURITY §4 beside the GitHub precedent rather than only in `capabilities/`. An allowlist entry is a change to that document's subject matter — what PipDock will hand to the user's browser — not a config detail. Note the two hosts cover more than the ruff tab needs: vulture's whitelist help, which CODE-HEALTH-SPEC §6 wants linked from the dead-code tab, is already on github.com. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
eec926862d |
feat(app): the project folder, on the row that already carries per-env data
`EnvRow` gains `healthProject`, read out of the `health_projects` table P3 added and the CLI has been writing since. P4's screen needs to know where Health last ran without asking for a command whose whole job is to return one string, which is the trade `pipVersion` already makes on this struct. `env_scan` reads every folder in one pass before the probe loop and joins afterwards. Not tidiness: `Store` is not `Sync`, so holding the guard across `envs::probe` does not compile at the command boundary — the hazard CLAUDE.md says has bitten twice, enforced this time by the type system rather than by remembering. `health_run` now writes the folder, so the GUI stops being the head that reads a table only the CLI fills. Not with `?`: the report is in hand and P5 depends on it being parked, so a failed bookkeeping write must not discard findings that cost three subprocesses. Two things `env_probe` was getting wrong, both of the same shape, and both because `upgradePip` replaces the row **wholesale**: Its own doc comment warned that a refresh path omitting `pip_version` would blank the field it was refreshed to update. `healthProject` is the second field to need that warning applied — without it, upgrading pip made the Health screen forget where it was pointed. `source` was hardcoded `EnvSource::Manual` for both of the function's uses. So refreshing a registry-discovered interpreter relabelled it *Added manually* in the chip at `PdEnvironments.tsx:31` — and, because `PyEnv` carries the source too, handed that relabelled environment to every subsequent `pkg_list`. It is a parameter now: `None` means *Browse…*, which really is manual, and a refresh passes back the source the row had. The join the whole feature rests on gets a test rather than an argument. `a_probed_env_hashes_the_same_as_the_path_it_was_discovered_at` pins that the write key (`PyEnv.interpreter`, round-tripped through the frontend) and the read key (the discovered candidate path, before any probe) hash to the same string. If they ever diverge the folder is written under one key and read under another, and the only symptom is a screen that keeps asking where the project is. Verified by running: `pipdock health --path <sample>` then, from an unrelated working directory, `pipdock health` with no `--path` — same project, out of the store. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
01426b97a8 |
feat(app): health_run, and a progress forwarder that knows its own channel
NOT_YET is down to three, and only health_fix is still Phase 3's. forward_progress hardcoded "plan-progress". It now takes the channel as a `&'static str` rather than a String, because the names are the closed set in EVENTS — a literal typo becomes a compile error instead of an event nobody is listening for, which is the failure that leaves a progress bar at zero while the work runs to completion behind it. The health slot is its own, not Sessions<Session>. A run mutates nothing, so refusing it while an install streams would be a lock with no invariant behind it — and S5 bug 1 is the standing warning about claims that wedge. But two Run clicks would put six subprocesses over one folder, so it needs *a* slot. Sessions<T> was already generic and already tested with a u32. It is typed Sessions<HealthSession> rather than Sessions<()> deliberately: P5's health_fix has to check the user's consent against a report the *server* holds — a count arriving from the frontend proves nothing about what the frontend displayed — which is the same shape ack_ok checks a GuardAck against the guard that produced it. Typing it now means P5 does not redo the slot. The implicit tools-venv sync runs on the same channel, so a first run on a fresh install shows the ~15 s bootstrap rather than an unexplained pause, and the total is decided before the first event because whether a sync is owed is exactly what changes it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
3ccd93e9f1 |
feat(core): the environment's pip version, out of a probe that already knew it
P0-10 wants pip's version on every Environments row. The obvious source is engine_info — and it is the wrong one: it spawns two subprocesses per call, pip's --version and uv's, so per row that is 2N spawns added to the landing screen on top of the N probe.py runs already happening there. The data was already computed and thrown away. pip is an ordinary distribution in site-packages, `probe_row` holds `probed.dists`, and `packages` is that same list's length. Reading one more field off it costs nothing and needs no probe.py change, so CLAUDE.md's hot-path warning does not apply. env_probe carries it too, and that is load-bearing rather than tidy: refreshing one row after an upgrade is exactly what that command is for in the next commit, and a refresh through a path that omitted the field would blank the thing it was refreshing to update. The compiler caught it, which is the argument for the field not being Option-defaulted. `pipdock env list --json` grows the same field off the same list, so the two heads cannot disagree about which pip is installed. Absent means the probe found no pip — a --without-pip venv, or -I hiding a user-site install — which is a real state, not "not yet known". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
5bd21de203 |
feat(app): pip_upgrade, the command P0-10 needs
P0-10 is a ship blocker that has had an Engine method, a CLI command and no way to reach it from the app. This is the bridge, and NOT_YET is one shorter. Returns StepResult. ARCHITECTURE §7 typed it ExecutionSummary, which would need an invented plan_id, phase, CheckReport and counts — four lies for one step. It carries no versions either; the caller re-probes, which it must do anyway to refresh the row. Two DATA-FLOW §9 amendments, both narrow and both written down rather than assumed. §9.1 gains a fourth plan shape: pip upkeep, which is not resolver-planned and cannot be. This is S5's lesson a second time — the invariant named the shapes that could produce a proof and left out the one that structurally cannot. pip below 22.2 cannot emit --dry-run --report at all, which is exactly the case the feature exists for, so demanding a report would refuse the only environments that need it. One IPC message parking nothing, so no waiver type: those exist for a decision made in one message and consumed in another. §9.2 gains an exemption: no snapshot. A snapshot's only restore path is `pip install pip==X` executed by pip, so one taken to protect against a broken pip has no consumer that could use it. Made visible rather than silent — the dialog will say so — which is what keeps it an exemption instead of an erosion. The slot is claimed and released on both paths. Two pip invocations against one site-packages would interleave, and a claim that is never released leaves every later command answering PD-RES-003 for a plan that never existed (S5 bug 1). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
ccee3151a7 |
feat(app): engine_info, COMMANDS stops being a lie, and focus follows the tab
S7's four remaining items, together.
**`COMMANDS` was never checked against anything.** It is the array the frontend
types its wrappers against, and nothing tied it to what Tauri actually registers
— so for four stages it listed 32 names while 19 were registered, and a wrapper
for any of the other 13 typechecked, shipped, and would have failed at runtime in
front of a user, on a command that looked implemented. Three tests close it, all
reading the source rather than a duplicate list: `generate_handler!` is a macro,
so there is no runtime list to inspect and a hand-maintained copy would be one
more thing to forget. `NOT_YET` is the honest half — five declared-and-owed
commands, each naming the slice that owes it — and a third test fails if an entry
there already exists, so a stale note cannot outlive the work.
**`engine_info`** returns both engines, because Settings shows a version beside
each radio and asking about the configured one leaves the other blank until it is
picked. It takes a `PyEnv` since `Engine::info` does in the trait and both
adapters — pip's version comes from `<python> -m pip --version`, so there is no
env-free answer. `EngineInfo` pays the full wire cost: membership in
`SCHEMA_TYPES`, not the `JsonSchema` derive, is what puts a type in
`generated.ts`, and it was in neither. Goldens 54 → 55.
**Focus follows the tab.** `Ctrl+3` changed the screen and left focus on whatever
was last clicked, so the next Tab resumed inside the screen the user had just
left and a screen reader announced nothing. It now moves to the new screen's
heading; `key={nav}` on `<main>` is what makes the effect fire on every change
rather than only the first.
**Search's idle empty state.** It rendered a bare empty list before anything was
typed — the first thing a user sees on that screen, saying nothing. UI-SPEC §7's
glyph, sentence and hint, and the hint is the one worth having: results come from
the local index, so it works offline.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
1b391140a8 |
feat(core): the bug-report URL, built once and shared by both heads
ERROR-CATALOG §4 is the entire telemetry story: a prefilled issue URL the user reviews and submits themselves. `pipdock self report-bug` built one and the GUI needed another — two builders that agree until the day the template gains a field, and the CLI's is the one nobody would notice had drifted. It moves to `pipdock_core::report`, which both now call. `BUG_REPORT_EXCERPT_CHARS` finally has a reader. §4.3's budget is on the *URL*, so the excerpt is tail-biased — a failing install's last twenty lines are the traceback and its first hundred are the resolver listing downloads — and cut at a line boundary so it does not open mid-token and read as corruption. By `char`, not by byte: slicing a String by bytes panics on the first Vietnamese path, which is a test rather than a hypothetical. `LogRing` in `AppState` is what fills it, fed by **three** writers rather than one. The obvious tap is `plan_execute`'s progress forwarder, but the commonest thing anyone reports is a plan that would not resolve — and a resolve emits no progress events at all. So `plan_resolve` also pushes the engine's own output on success and the stderr tail on failure, which is exactly the case worth filing. The three forwarders collapse into one `forward_progress`, which tees into the ring on the way past. `report_bug_url` returns the URL *and* the full log, because §4.3 splits them: GitHub takes the truncated one, the clipboard takes all of it. It parses the code string back through `Code::ALL` rather than trusting what the frontend hands back — an unrecognised code is left off instead of pasted into a public URL. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
1df526c1ed |
feat(app): the five snapshot commands
`snapshot_list|create|diff|rollback_preview|rollback`, all `async` — a synchronous `#[tauri::command]` runs on the UI thread, and `snapshot_list` reads a directory while the other four shell out. `snapshot_list` takes the `env_hash`, not a `PyEnv`. Snapshots outlive the interpreter that made them, so an environment whose Python has been deleted still has a history worth showing — and that is exactly when `EnvRow.env` is `None`. `snapshot_diff` claims no session. Browsing a timeline must not start a flow: `RollbackFlow::start` runs `engine.freeze()`, which would be a subprocess per click on an interaction that has to feel instant, and each start would silently discard the preview the user is reading. The declared `snapshot_rollback` row becomes two, so ARCHITECTURE §7 goes 32 → 33. The preview parks the flow and the execute claims it, for the reason `plan_resolve` and `plan_execute` are separate: what the user confirms has to be the plan they were shown, not one re-derived after they answered. The outcome always carries a snapshot, because the pre-rollback one is what makes a rollback itself reversible — and is why `latest` moves twice across a single restore. Every one reads the store and drops the guard before awaiting; `cargo check -p pipdock-app` after the signatures and before the bodies, as usual. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |