Skip to content

fix: clearer Complete next steps, real Organize preview, honest Discover count, unblocked undo broadcast - #114

Merged
iLevyTate merged 2 commits into
mainfrom
fix/complete-phase-and-preview-ux
Nov 11, 2026
Merged

iLevyTate merged 2 commits into
mainfrom
fix/complete-phase-and-preview-ux

Conversation

@iLevyTate

Copy link
Copy Markdown
Owner

Summary

Found in a manual run (3 files analyzed → organized → undo → redo) and its log.

  • Complete: "Start over" → Analyze more files, which clears the finished batch and lands on Discover instead of Welcome (users had to find Discover in the phase bar). The open-folder button now names its folder ("Open Finance", full path on hover); each row shows the new name and folder and can reveal the file. A failed open now shows an error — files:open-folder returns { success: false } rather than throwing, so it was silent.
  • Organize: Preview opens a dialog (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.
  • Discover: the selection badge said "N files ready" for every selected file, analyzed or not, and grew when files were added mid-run. It now reads "N files added · M analyzed" until all are analyzed.
  • IPC: UndoRedoService._notifyStateChanged broadcasts record/remove/clear on undo-redo:state-changed, but the event schema only allowed undo/redo, so strict-mode safeSend blocked it on every organize move (Blocking send for 'undo-redo:state-changed' due to validation failure). The service test mocks safeSend, so the schema never saw these payloads.

Scope

  • Area(s): complete, organize, discover, undo/redo IPC
  • Risk Level: low
  • Breaking Changes: none (button label change; e2e spec updated)

Type of Change

  • Bug fix
  • Enhancement
  • New feature
  • Refactor
  • Documentation update
  • Breaking 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.stateBroadcast
  • npm run typecheck
  • Additional tests added/updated when behavior changed
  • Full npm run ci / e2e not run locally (e2e full-pipeline.spec.js updated for the new button name)

Manual QA

  • Manual checklist completed (see docs/TESTING.md)
  • Not applicable (explain below)

Manual QA notes:

  • Not yet re-run in the app after the change. To verify: organize a batch → Complete shows "Open " and per-row reveal; "Analyze more files" lands on Discover; Organize → Preview lists destinations; no undo-redo:state-changed validation error in the log after a move.

Checklist

  • I scoped this PR to one logical change (two commits: IPC fix, UI)
  • I self-reviewed code and naming for clarity
  • I updated docs/config references where needed
  • I called out follow-up work or known limitations

Follow-ups / known limitations

  • Files added during a running analysis are queued in useAnalysis's in-memory pendingFilesRef; navigating away from Discover or reloading before the batch ends drops the auto-start (they stay "waiting for analysis").
  • "Analyze more files" still discards analyzed-but-unorganized files ("still queued"), same as "Start over" did.
  • Same log, not addressed here: system memory at 97% with the text model (~5.8 GB) over its 4.9 GB budget; xlsx reading 'attributes' extraction failure; SVG with an unescaped & failing sharp decode; a vector DB health-check timeout at startup.

…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.
@iLevyTate
iLevyTate merged commit caae2f9 into main Nov 11, 2026
10 checks passed
@iLevyTate
iLevyTate deleted the fix/complete-phase-and-preview-ux branch November 11, 2026 18:45
@iLevyTate
iLevyTate restored the fix/complete-phase-and-preview-ux branch November 11, 2026 18:45
@iLevyTate
iLevyTate deleted the fix/complete-phase-and-preview-ux branch November 11, 2026 18:46
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.

1 participant