Repository navigation
Allow reloading the same image file after editing - #109
Merged
Merged
Conversation
Owner
Author
Automated reviewNo defects found, so nothing was pushed. Verification: E2E Reviewed by GPT 6.1 Sol |
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tspassed (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 retainedC:\\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 mainfailures are historical branch-policy checks from the initial target, not code/test failures; GitHub may still show them on this head.