Skip to content

fix: hidden e2e windows, no Generate toolbar button, empty Generate state - #40

Merged
Maxaubert merged 2 commits into
mainfrom
fix/38-e2e-headless-generate
Oct 5, 2026
Merged

Maxaubert merged 2 commits into
mainfrom
fix/38-e2e-headless-generate

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #38

What changed

Headless e2e. Every spec now launches through launchApp() in e2e/helpers.ts, which sets FILESMITH_E2E_HIDDEN=1. With that flag src/main/index.ts creates the window with paintWhenInitiallyHidden, backgroundThrottling: false and skipTaskbar, never calls show() on ready-to-show, and does not restore or focus it on second-instance. The flag is read only from the environment, so the packaged app behaves as before. The Ctrl+C console helper (e2e/ctrlc-console.ps1, started by cli-packed.spec.ts) now opens hidden instead of minimized, and the test still passes. No off-screen showInactive() fallback was needed: hidden windows paint, so screenshots render.

Generate toolbar. The Generate and Cancel buttons are gone from the centre toolbar. The 32px row stays so it lines up with the inspector tabs, and it shows the image count on the right (0 images, or Generating), like the file count on the other tabs. Run and Stop live only in the inspector footer.

Generate with no model. Before, the inspector showed a "ComfyUI was not found" warning, an empty Model row ("No image models found in your ComfyUI models folder" when no folder existed), a "Change ComfyUI folder" button with no folder set, and three ways to pick a folder. Generate also turned on as soon as a prompt was typed and then failed. Now:

  • The inspector shows one block, No image model yet, with Choose ComfyUI folder and Add a model.
  • Generate stays off even with a prompt, and a quiet line above it explains why ("Choose your ComfyUI folder to generate", or "Add an image model to generate" when the folder has none).
  • The centre empty state says the same thing.
  • Settings > Tools labels the button Choose folder when no folder is set.

The generate status is now shared between the inspector and the Run button, so picking a folder updates both. The pure helpers are in genReady.ts, with tests.

Tooling. Lint and prettier skip .claude/worktrees (in-repo worktrees made npm run lint fail).

Version 0.7.1.

Screenshots

  • docs/mockups/generate-empty/before.png: Generate tab with no model, before
  • docs/mockups/generate-empty/after.png: after
  • docs/mockups/generate-empty/settings.png: Settings > Tools, ComfyUI folder "Not set"
  • The FILESMITH_SHOTS captures in docs/mockups/terminal-v5/shots/ and docs/mockups/view-zoom/shots/ were re-made, hidden, with this build.

Verification

  • npm run typecheck, npm run lint, npx prettier --check .: clean
  • npm test: 89 files, 857 passed, 1 skipped
  • npm run build && npm run test:e2e (after npm run package for the packed-CLI specs): 77 passed, 2 skipped. The 2 skips are the FILESMITH_SHOTS-only captures, which passed in an earlier full run with FILESMITH_SHOTS=1. The GPU tests (real ComfyUI generate, upscale) passed. In that earlier run, before packaging, the 2 cli-packed version tests failed because dist/ still held 0.7.0; they pass against the 0.7.1 package.
  • Window check: during both full e2e runs, a PowerShell monitor polled every 250 ms (960 and 738 samples). It saw 0 visible top-level windows owned by electron or Filesmith, and no Filesmith process with a MainWindowHandle. The foreground window stayed on the owner's browser for the whole run.
  • New spec e2e/generate-empty.spec.ts: fresh userData and a throwaway USERPROFILE. It checks the empty block, that Generate stays disabled with and without a prompt, the shown reason, and that the toolbar has no buttons.
  • Packaged and silently installed Filesmith-Setup-x64-0.7.1.exe. The installed exe reports 0.7.1 and launches normally (a visible window, as before).

Unsigned build, as expected.

🤖 Generated with Claude Code

Maxaubert and others added 2 commits October 5, 2026 22:12
…tate

- e2e: every spec launches through launchApp() in e2e/helpers.ts, which sets
  FILESMITH_E2E_HIDDEN=1. The main process then keeps the window hidden
  (paintWhenInitiallyHidden, no background throttling, no taskbar entry) and
  never calls show() or focus(), so a test run no longer steals focus.
  Screenshots still render. The Ctrl+C console helper starts hidden.
- Generate: the toolbar row keeps its 32px height and shows the image count;
  Run and Stop live only in the inspector footer.
- Generate with no model: one calm block ("No image model yet" with Choose
  ComfyUI folder / Add a model), Generate stays off with a short reason, and
  the centre empty state says what to do. Settings says "Choose folder" when
  no ComfyUI folder is set.
- Lint and prettier skip .claude/worktrees.
- Version 0.7.1.

Refs #38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Maxaubert
Maxaubert merged commit 170f3c7 into main Oct 5, 2026
1 of 2 checks passed
@Maxaubert
Maxaubert deleted the fix/38-e2e-headless-generate branch October 5, 2026 20:54
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.

Headless e2e, no Generate toolbar button, check the no-model Generate state

1 participant