Drag-and-drop import: only the first .json is imported, additional files silently ignored #39

Closed
opened 2026-07-12 12:45:12 -04:00 by the_og · 0 comments
Owner

Found in audit of main @ 06326e5.

MainWindow.dropEvent (bcc.py ~L2358) iterates dropped URLs but breaks after the first successfully imported .json. Dropping three config files imports one with no indication the other two were skipped (dragEnterEvent accepted the whole drop). Also: the file is read with no size guard, so a mistakenly dropped multi-MB .json (e.g. a full ~/.claude.json with history) is parsed on the UI thread.

Proposed fix: import all dropped .json files (single undo snapshot, aggregate added/replaced counts in the status line), and skip files over a sanity threshold (e.g. 5 MB) with a warning dialog naming the file.

Acceptance: dropping N valid files imports servers from all N and reports the aggregate; an oversized file is skipped with feedback; a mix of valid and invalid files imports the valid ones and reports the failures (existing per-file warning already does this).

**Found in audit of `main` @ 06326e5.** `MainWindow.dropEvent` (`bcc.py` ~L2358) iterates dropped URLs but `break`s after the first successfully imported .json. Dropping three config files imports one with no indication the other two were skipped (`dragEnterEvent` accepted the whole drop). Also: the file is read with no size guard, so a mistakenly dropped multi-MB .json (e.g. a full `~/.claude.json` with history) is parsed on the UI thread. **Proposed fix**: import all dropped .json files (single undo snapshot, aggregate added/replaced counts in the status line), and skip files over a sanity threshold (e.g. 5 MB) with a warning dialog naming the file. **Acceptance**: dropping N valid files imports servers from all N and reports the aggregate; an oversized file is skipped with feedback; a mix of valid and invalid files imports the valid ones and reports the failures (existing per-file warning already does this).
the_og added the P2 label 2026-07-12 12:45:12 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: the_og/better-claude-config#39