Skip to content

Desktop end-to-end test + fixes for the bugs it found - #7

Merged
carthworks merged 1 commit into
mainfrom
claude/pensive-shannon-afywuj
Oct 6, 2026
Merged

carthworks merged 1 commit into
mainfrom
claude/pensive-shannon-afywuj

Conversation

@carthworks

Copy link
Copy Markdown
Owner

Step 2 of the release plan: prove the installed desktop app works end to end, not just the backend.

The test (e2e/desktop.spec.js, Playwright)

It drives the packaged Electron app: the real shell, the PyInstaller backend it spawns, the per-launch API token, and Tesseract. Steps:

  1. First launch: "Setup & Login" → create account → dashboard empty state.
  2. Reload the window and confirm the app still renders.
  3. Upload a scan → OCR → text appears in the editor → metadata → generate archive → PDF/A-2b badge. On disk it checks for exactly one archived PDF (valid %PDF- header) and one dublin-core.xml.
  4. Archive Search finds the document by its new title.
  5. Closing the app stops the backend (port 5001 released).

CI: the Windows job now packages the full app (electron-builder --win --dir) after the backend smoke test and runs the suite. On failure it uploads screenshots and traces. The release workflow runs the same test before building the installer, so a broken installer can't be published.

Bugs the test found (all fixed here)

  • Reloading the window gave a blank page. The app used path URLs (file:///upload), which don't exist on disk, so Ctrl+R or F5 in the installed app showed ERR_FILE_NOT_FOUND. It now uses hash URLs (index.html#/upload) when loaded from file://. The web build keeps clean URLs. ErrorBoundary's "go home" had the same problem and is fixed too.
  • Users were pulled back to Cleanup. After OCR, the Upload page's 1.8 s auto-redirect was never cancelled. Someone who had already clicked "Continue" and moved on was dragged back to the Cleanup page. This also made the flow intermittently fail. The timer is now cleared when the page is left.
  • First run opened on the wrong tab. "Setup & Login" opened on Sign In even though no account exists yet. It now opens on Register.

Also

  • LIBRADIGIT_USER_DATA_DIR / LIBRADIGIT_ARCHIVE_FOLDER overrides in Electron, so tests (and admins) can isolate data.
  • README section on running the test locally.

Testing

  • Ran the full suite against a packaged Linux build under xvfb: 5/5 passed, twice in a row (~18 s each run).
  • ESLint: 0 errors. Build passes.
  • The Windows job in this PR is the first run on Windows itself.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jze3nDgZGqUXGceiu5RCAf


Generated by Claude Code

… bugs it found

e2e/desktop.spec.js (Playwright) drives the packaged Electron app with its
real PyInstaller backend, per-launch API token and Tesseract: first-run
account setup, window reload, upload -> OCR -> review -> metadata -> PDF/A
archive (checked on disk, plus dublin-core.xml), search, and that closing the
app stops the backend. CI runs it on Windows for every PR, and the release
workflow runs it before publishing an installer.

Bugs found by the test:
- Reloading the desktop window (Ctrl+R/F5) showed a blank page: path URLs
  such as file:///upload do not exist on disk. Use HashRouter under file://
  (web build keeps BrowserRouter); ErrorBoundary "go home" did the same.
- After OCR, the Upload page's 1.8 s auto-redirect to Cleanup was never
  cancelled, so a user who had already moved on was pulled back to Cleanup.
- First launch: "Setup & Login" opened on the Sign In tab although no
  account exists; it now opens on Register.

Electron: LIBRADIGIT_USER_DATA_DIR and LIBRADIGIT_ARCHIVE_FOLDER overrides so
tests (and admins) can isolate data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jze3nDgZGqUXGceiu5RCAf
@ecc-tools

ecc-tools Bot commented Oct 6, 2026

Copy link
Copy Markdown

ECC Tools / Security Evidence

Commit: 6f0384948f486d44a59fc2c5862c7aca3508243e

Security evidence gate passed (success)

No security-sensitive scanner-evidence gap detected.

Mode: enforce

Scanned 16 changed file(s). No missing scanner-evidence signal was detected.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Oct 6, 2026

Copy link
Copy Markdown

ECC Tools / PR Risk Taxonomy

Commit: 6f0384948f486d44a59fc2c5862c7aca3508243e

PR taxonomy review recommended (neutral)

Detected 3 PR taxonomy bucket(s): Security Evidence, Install Manifest Integrity, CI/CD Recommendation.

Scanned 16 changed file(s).

Roadmap taxonomy buckets:

Security Evidence

Security-sensitive changes should carry explicit scanner, code-scanning, or focused regression evidence.

Signals:

  • 2 security-sensitive path(s) changed

Paths:

  • .github/workflows/ci.yml
  • .github/workflows/release.yml

Install Manifest Integrity

Install manifests, plugin metadata, and shipped skills should stay synchronized with user-facing setup guidance.

Signals:

  • 2 install or manifest path(s) changed

Paths:

  • package-lock.json
  • package.json

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • Runtime config changes may ship without example or template updates
  • CI workflow changes may ship without failure-mode evidence
  • 5 CI or workflow path(s) changed

Paths:

  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • e2e/desktop.spec.js
  • package-lock.json
  • package.json
  • electron/main.js
  • eslint.config.js
  • playwright.config.js

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Oct 6, 2026

Copy link
Copy Markdown

ECC Tools / Reference Set Readiness

Commit: 6f0384948f486d44a59fc2c5862c7aca3508243e

Reference set readiness gaps detected (neutral)

Reference evidence present for 0/7 areas (0%) across 16 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Missing Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces.
Security evidence Missing Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs.
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Oct 6, 2026

Copy link
Copy Markdown

ECC Tools / Hosted Promotion Readiness

Commit: 6f0384948f486d44a59fc2c5862c7aca3508243e

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 16 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Oct 6, 2026

Copy link
Copy Markdown

ECC Tools / PR Config Audit

Commit: 6f0384948f486d44a59fc2c5862c7aca3508243e

Changed-config issues require attention (action_required)

Scanned 2 config file(s) present at this commit across 2 changed config path(s) and found 1 issue(s).

Changed config files:

  • .github/workflows/ci.yml
  • .github/workflows/release.yml

Top findings:

  • [high] Environment variable with secret exposed (.github/workflows/release.yml)

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Oct 6, 2026

Copy link
Copy Markdown

ECC Tools / PR Harness Audit

Commit: 6f0384948f486d44a59fc2c5862c7aca3508243e

No harness issues detected (success)

Scanned 2 changed config file(s) and found no harness issues.

Changed config files:

  • .github/workflows/ci.yml
  • .github/workflows/release.yml

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@carthworks
carthworks merged commit a40c297 into main Oct 6, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants