Skip to content

Allow reloading the same image file after editing - #109

Merged
vycdev merged 2 commits into
developfrom
codex/reload-image-file
Oct 29, 2026
Merged

vycdev merged 2 commits into
developfrom
codex/reload-image-file

Conversation

@vycdev

@vycdev vycdev commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

🤖 This was created by Codex using the GPT-6.1-Sol model on xhigh reasoning effort, during automated macOS end-to-end testing.

Choosing an image, resizing or cropping it, and choosing the same source again leaves the edited pixels in place because the hidden file input retains its previous selection. This was reproduced twice in the released macOS app.

Clear the input after capturing its File so a later selection of that path triggers a new import. Cancelled pickers still do nothing. Add a browser regression that resizes a 1024×1024 source to 512×512, checks the cleared input, then reloads the original dimensions.

Fixes #105.

Validation:

  • npm run lint: passed.
  • npm run build: passed (includes TypeScript).
  • npm test: 860 passed, 1 skipped, 0 failed.
  • npm run test:docs: 3 passed.
  • PLAYWRIGHT_BROWSERS_PATH=/Users/vycdev/Desktop/kromacut-e2e/.playwright npx playwright test tests/e2e/image-reimport.spec.ts: 1 passed.
  • git diff --check: passed.

The input-value assertion matters because Playwright's setInputFiles dispatches a change even when a native picker would retain the same selection. The fix restores the existing import behavior; no new workflow or format requires a guide change. The patched desktop app was not rebuilt, per the QA brief.
Additional engine validation: PLAYWRIGHT_BROWSERS_PATH=/Users/vycdev/Desktop/kromacut-e2e/.playwright npx playwright test --config ../perf/image-webkit.config.ts passed (1 test). Running the same test with the base URL set to unmodified main (image-baseline.config.ts) failed as expected because the file input retained C:\\fakepath\\1024x1024p.png. These temporary external configs select WebKit and the server URL; the regression source is included in this PR.

Repository target note: this feature branch was cut from latest main as requested by the QA brief. The repository only permits develop→main PRs, so this PR targets develop (currently the same source tree as main). Earlier Require develop into main failures are historical branch-policy checks from the initial target, not code/test failures; GitHub may still show them on this head.

@vycdev
vycdev changed the base branch from main to develop October 24, 2026 15:49
@vycdev

vycdev commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

Automated review

No defects found, so nothing was pushed.

Verification: E2E image-reimport passes (1/1).


Reviewed by GPT 6.1 Sol

# Conflicts:
#	CHANGELOG.md
@vycdev
vycdev merged commit ec84608 into develop Oct 29, 2026
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.

Image picker does not reload the same source file after editing

1 participant