fix(ui): a hand-written fixture that npm test accepted and tsc did not
CI's Node job failed on the test I had just added: `TS2322` on an `ExecutionOutcome` literal that was missing `appVersion` and carried three fields `SnapshotMeta` does not have. Vitest does not typecheck, so `npm test` passed — and I ran the suite and the linter after adding the file but **not `npm run typecheck`**, which is the one gate that could see it. Now taken from `snapshot_list.json`, which is the pattern the rest of the suite already uses and the reason it exists: a fixture serialized from the real Rust type cannot drift from it, and a literal typed by hand can be wrong in three ways at once. Also records the Phase 4 state for whoever picks this up: what the pipeline can now do, and the six things still open — a genuinely clean machine, SmartScreen, the rest of the manual charter, the icon, the version and RC tag, and README screenshots. CLAUDE.md gains the two rules this stretch established: building and installing are their own test tier, and the seam between a tested component and its untested parent is where bugs live. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
be0f8caa18
commit
3eeda059c8
3 files changed
+68
-13
No files matched your search
@@ -1,7 +1,7 @@
|
||||
# PipDock — working notes for Claude
|
||||
|
||||
Windows GUI + CLI for bulk-managing Python packages. Tauri 2 + Rust core + React 19.
|
||||
Repo `poli0981/pipdock` · GPL-3.0 · **Status: M1, M2 and Phase 3 complete; Phase 4 (RC → v1.0) next**.
|
||||
Repo `poli0981/pipdock` · GPL-3.0 · **Status: M1, M2 and Phase 3 complete; Phase 4 in progress — the pipeline builds and installs, the RC tag is the owner's call**.
|
||||
|
||||
## Read the docs before changing anything
|
||||
|
||||
@@ -170,6 +170,18 @@ Things worth knowing before you change any of it:
|
||||
failure. The ARIA grid answer is a roving tabindex (`←`/`→`, `Esc` back out), and P6 added it.
|
||||
`Enter` on a row is the **non-destructive** primary — pin, never uninstall.
|
||||
|
||||
- **The seam between a tested component and its untested parent is where bugs live.**
|
||||
`PdSummarySheet` had tests; `PdPlanPanel` had none; both rendered `plan.done`, so a successful
|
||||
run showed *Back to packages* twice and every suite stayed green. Found by a human using the
|
||||
installed build. When adding a component test, ask what renders it.
|
||||
|
||||
- **Building and installing are their own test tier, and nothing else substitutes.** The first
|
||||
bundle ever produced exposed three defects in one afternoon: `release.yml` could not have run
|
||||
(`--locked` is cargo's flag and goes after `--`), the installers shipped no `pipdock.exe` at all,
|
||||
and the program installed *into* the data directory — making SECURITY §8's "delete the folder to
|
||||
reset" advice uninstall the app. None was visible in a diff. See `docs/ROADMAP.md`'s Phase 4
|
||||
section for the layout rules that came out of it.
|
||||
|
||||
- **Run it, don't just test it.** Every unplanned bug in Stage 1 *and* Stage 2 came from executing
|
||||
against a real environment, a real runner or a real browser — never from reading code or from a
|
||||
passing suite. Stage 1: the watchdog that never killed anything, `--json` that never parsed,
|
||||
|
||||
@@ -624,6 +624,53 @@ three Code Health tools with the path intact. Scale, release build: `pipdock lis
|
||||
over a 145-package venv and **1.5 s** over a 352-package system Python. Still to do: the VI locale
|
||||
sweep of the mutation dialogs, corporate-proxy simulation, and cancel mid-Phase-B.
|
||||
|
||||
### Shell polish from the first click-through — 2026-08-13
|
||||
|
||||
The owner drove the **installed** build as a user. That cleared every item P4/P5 had left owed —
|
||||
folder picker, both locales, ruff over a real project, install/rollback/upgrade, bilingual error
|
||||
copy, and the bug-report deep link — and found two bugs and two improvements that only appear when
|
||||
someone actually uses the thing.
|
||||
|
||||
| | Found |
|
||||
|---|---|
|
||||
| **Duplicate *Back to packages*** | `PdSummarySheet` renders `plan.done` from `onDone`; the panel rendered a second beneath it. The panel's now shows only when there is no sheet, because a run that fails before producing an `ExecutionSummary` would otherwise be a dead end |
|
||||
| **No single instance** | five launches, five windows — five `AppState`s over one machine, each certain it owned the mutation in flight |
|
||||
| **Sidebar navigable mid-plan** | left the plan parked in Rust with nothing driving it; the next Update answered `PD-RES-003` about a plan the user could no longer see |
|
||||
| **Window unbounded** | a fixed sidebar plus one scrolling column, stretched across a 4K panel |
|
||||
|
||||
**The duplicate button is the interesting one.** `PdSummarySheet` had tests and `PdPlanPanel` had
|
||||
none, so the two had never been rendered together — the bug lived exactly in the seam between a
|
||||
tested component and its untested parent. The new `PdPlanPanel.test.tsx` was checked *against* the
|
||||
bug (revert the panel change, it fails `expected 2 to have length 1`), and adding it exposed a
|
||||
second gap: `ipcMock` had no `reportBugUrl`, which `PdErrorRow` requests on mount, so **any screen
|
||||
containing an error row was untestable**.
|
||||
|
||||
Verified against the installed build rather than the config: five launches → one process and one
|
||||
window; the real `HWND` style carries no `WS_MAXIMIZEBOX` and still carries `WS_THICKFRAME`.
|
||||
|
||||
### Phase 4 — where it stands
|
||||
|
||||
**Done:** the release pipeline builds, checksums and drafts correctly (proven by running its own
|
||||
steps against real artifacts); the installer ships both binaries; program and data no longer share
|
||||
a directory; the shell bugs above are fixed; README carries the badges RELEASE-CI §5 asks for.
|
||||
|
||||
**Still open, in rough order:**
|
||||
|
||||
1. **A genuinely clean machine.** This one has run PipDock; isolating the app-data root
|
||||
approximates the criterion rather than meeting it.
|
||||
2. **SmartScreen.** The installer has only ever been run scripted, and SmartScreen is an Explorer
|
||||
behaviour — it needs a double-click on a freshly downloaded file.
|
||||
3. **The rest of the manual charter** (TESTING §4): the VI locale sweep of the mutation dialogs,
|
||||
corporate-proxy simulation for `PD-NET-002`, and cancel mid-Phase-B. Fixtures for the scale and
|
||||
non-ASCII cases are already recorded above.
|
||||
4. **The icon**, still the Tauri-era placeholder — a brand decision, deliberately not invented.
|
||||
5. **Version and tag.** Everything is `0.1.0`; the RC and the `v*` tag that fires `release.yml`
|
||||
are the owner's call, and that tag is the first time the pipeline runs for real.
|
||||
6. **`docs/README` screenshots**, which want the finished icon first.
|
||||
|
||||
**Repo scaffolding (RELEASE-CI §5)** still owes the two owner-only items: branch protection plus
|
||||
disabling CodeQL default setup, and the three Discord webhook secrets. Neither is committable.
|
||||
|
||||
## Post-1.0 (P1 wave)
|
||||
|
||||
Security tab (pip-audit), pin auto-suggest, requirements/constraints export-import, cache manager, command palette, dependency graph view, scheduled check. Then P2 candidates by demand: macOS/Linux, per-env engine, elevation broker, winget, JP locale.
|
||||
|
||||
@@ -11,9 +11,10 @@ import { render, screen } from '@testing-library/react'
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
import { PdPlanPanel } from '@/screens/PdPlanPanel'
|
||||
import type { ExecutionSummary } from '@/ipc'
|
||||
import type { ExecutionOutcome, ExecutionSummary, SnapshotMeta } from '@/ipc'
|
||||
import { usePlanStore } from '@/stores/plan'
|
||||
import { resetStore } from '@/test/stores'
|
||||
import snapshotFixture from '@/test/fixtures/snapshot_list.json'
|
||||
import summaryFixture from '@/test/fixtures/execution_summary.json'
|
||||
|
||||
vi.mock('@/ipc', async () => {
|
||||
@@ -23,20 +24,15 @@ vi.mock('@/ipc', async () => {
|
||||
|
||||
const SUMMARY = summaryFixture as ExecutionSummary
|
||||
|
||||
const OUTCOME = {
|
||||
const OUTCOME: ExecutionOutcome = {
|
||||
summary: SUMMARY,
|
||||
snapshot: {
|
||||
id: '2026-08-13T10-00-00Z',
|
||||
createdAt: '2026-08-13T10:00:00Z',
|
||||
engine: 'pip' as const,
|
||||
trigger: { plan: { planId: SUMMARY.planId } },
|
||||
packageCount: 6,
|
||||
envHash: 'aaa',
|
||||
interpreter: 'C:\\venv\\Scripts\\python.exe',
|
||||
pythonVersion: '3.12.4',
|
||||
},
|
||||
// From the committed fixture rather than hand-written. A literal here needs every field of
|
||||
// `SnapshotMeta` and invents none — mine was missing `appVersion` and had three fields that do
|
||||
// not exist, which `npm test` happily accepted and `tsc` caught in CI.
|
||||
snapshot: (snapshotFixture as SnapshotMeta[])[0]!,
|
||||
}
|
||||
|
||||
|
||||
describe('the summary phase', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
|
||||
Reference in new issue
Block a user