Repository navigation
Conversation
Exports into a library folder didn't show up in the grid, filmstrip or folder counts until a manual refresh, because the export-complete listener only set the status. Refresh the folder trees and the current folder after an export completes, fails or is cancelled (a partial batch can still have written files), as import-complete already does. Fixes CyberTimon#1674 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Yes I think this would be a much cleaner approach, as most of the time you don't export into the folder you're currently in. (at least in my workflow) |
Emit the deduplicated output folders from completed image and LUT workers. Refresh the library and folder tree only if the current folder is among those destinations; errors and cancellations no longer force a broad refresh. AI-assisted with Codex. Native fmt, strict Clippy and library tests pass; seven local listener tests pass. Frontend typecheck and scoped ESLint reproduce the unchanged upstream baseline (70 type errors and 34 lint errors). Local only, pending maintainer approval to push.
Track destination folders immediately after successful file writes. Emit export-outputs before the success, error or cancelled terminal event, while keeping export-complete payload-less. Match only the open folder, normalising trailing separators and Windows slash/case spelling. AI-assisted with Codex. Fmt, locked strict Clippy, library test and 15 local listener tests pass. Frontend typecheck (70 errors) and scoped ESLint (34 errors) match the unchanged upstream baseline. Local only; no upstream push or comment.
Contributor
Author
|
Done, it's narrower now. The export records each folder it actually wrote a file to and sends that list in a new The event also fires for partly failed and cancelled batches, since those can still have written files into the open folder. |
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.
Description
Fixes #1674. Exporting into the source folder (or any folder in the library) doesn't show the new files in the library grid or filmstrip, and the folder image counts don't change, until a manual "Refresh folders".
Cause: the
export-completelistener insrc/hooks/useTauriListeners.tsonly sets the export status.import-completein the same file refreshes the folder tree and the current folder, but nothing does that after an export.Type of Change
Changes Made
useTauriListeners.ts: afterexport-complete,export-errorandexport-cancelled, callrefreshAllFolderTrees()and, when a folder is open,refreshImageList()(the same calls used after moving files and after indexing). Errors and cancels are included because a failed or cancelled batch can still have written some files.This refreshes after every export, also when the destination is outside the library. A narrower version would send the output folders in the
export-completepayload (export_processing.rs) and refresh only when one of them is open; I kept it frontend-only, but can do that if you prefer.Testing
These changes were tested locally by a human and confirmed to work.
I haven't added any automated tests to the code because the codebase currently lacks a test suite.
tsc --noEmit: no new errors (upstream has pre-existing ones).eslinton the file: no new findings.prettier --check: clean.Untested in the GUI. Things to check: the new file appears in the grid and filmstrip after exporting into the open folder; the folder count goes up; the editor stays open when exporting from the editor (
refreshImageListusespreserveEditor).Checklist
AI Disclaimer:
🤖 Generated with Claude Code