Repository navigation
fix: clearer Complete next steps, real Organize preview, honest Discover count, unblocked undo broadcast - #114
Merged
Conversation
…schema
UndoRedoService._notifyStateChanged sends { action: 'record' | 'remove' |
'clear' } on UNDO_REDO.STATE_CHANGED, but the event schema only allowed
'undo' | 'redo'. Strict-mode safeSend blocked every such broadcast, so the
undo toolbar missed history changes made elsewhere (logged on every
organize move). The service's own test mocks safeSend, so it never ran the
payload through the schema; the schema test now covers each reason.
…est Discover count
- Complete: "Start over" becomes "Analyze more files", which clears the
finished batch and lands on Discover instead of Welcome. The open-folder
button names the folder it opens; each row shows the new name and folder
and can reveal the file. A failed open now shows an error (the handler
returns { success: false } rather than throwing, so it was silent).
- Organize: Preview opens a dialog listing each file under its destination
folder with its new name, new folders, name clashes and skipped files,
instead of a count-only toast.
- Discover: the selection badge said "N files ready" for files not yet
analyzed, and grew as files were added mid-run. It now reads
"N files added · M analyzed" until every file is analyzed.
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.
Summary
Found in a manual run (3 files analyzed → organized → undo → redo) and its log.
files:open-folderreturns{ success: false }rather than throwing, so it was silent.OrganizePreviewModal) listing each file under its destination folder with old → new name, new folders, name clashes and skipped files. It replaces a count-only toast ("would move 3 files"). Main already returned the full dry-run plan; no main-process change.UndoRedoService._notifyStateChangedbroadcastsrecord/remove/clearonundo-redo:state-changed, but the event schema only allowedundo/redo, so strict-modesafeSendblocked it on every organize move (Blocking send for 'undo-redo:state-changed' due to validation failure). The service test mockssafeSend, so the schema never saw these payloads.Scope
Type of Change
Test Plan
Automated
npm run format:check(changed files)npm run lint(changed files)npm test— affected suites: CompletePhase, OrganizePreviewModal (new), DiscoverPhase, OrganizePhase, useOrganization, ipcEventSchemas, UndoRedoService.stateBroadcastnpm run typechecknpm run ci/ e2e not run locally (e2efull-pipeline.spec.jsupdated for the new button name)Manual QA
docs/TESTING.md)Manual QA notes:
undo-redo:state-changedvalidation error in the log after a move.Checklist
Follow-ups / known limitations
useAnalysis's in-memorypendingFilesRef; navigating away from Discover or reloading before the batch ends drops the auto-start (they stay "waiting for analysis").reading 'attributes'extraction failure; SVG with an unescaped&failing sharp decode; a vector DB health-check timeout at startup.