Skip to content

fix(import): support multi-file markdown drops#210

Merged
ThisIs-Developer merged 1 commit into
mainfrom
codex/fix-multi-file-drop-import
Jul 6, 2026
Merged

fix(import): support multi-file markdown drops#210
ThisIs-Developer merged 1 commit into
mainfrom
codex/fix-multi-file-drop-import

Conversation

@ThisIs-Developer

Copy link
Copy Markdown
Owner

Summary

Fixes multi-file local Markdown imports so drag-and-drop processes every supported dropped file instead of only files[0].

What changed

  • Added a shared Markdown file filter and multi-file import helper.
  • Made importMarkdownFile promise-based so dropped files are opened sequentially in the browser-provided order.
  • Reused the same multi-file path for the file picker and enabled multiple on the hidden file input.
  • Updated root web assets and the desktop resource copies with matching drop/import UI text.

Root cause

The drop handler read only the first item from DataTransfer.files, so any additional valid Markdown files in the same drop were ignored. Reading files asynchronously without coordination could also risk tab ordering, so the new helper awaits each import in order.

Validation

  • node --check script.js
  • node --check desktop-app/resources/js/script.js
  • Node harness around the actual import helper block for both scripts, verifying a mixed drop imports three Markdown files in order: 01-first, 02-second, 03-third.
  • Loaded the local app at http://127.0.0.1:4173/index.html and confirmed the file input has multiple enabled.
  • git diff --check (clean; Git reported only existing Windows line-ending conversion warnings).

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment Jul 6, 2026 1:39pm

@ThisIs-Developer ThisIs-Developer force-pushed the codex/fix-multi-file-drop-import branch from b9ce02d to c64a118 Compare July 6, 2026 13:39
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 6, 2026

Copy link
Copy Markdown

Deploying markdownviewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: c64a118
Status: ✅  Deploy successful!
Preview URL: https://74720609.markdownviewer.pages.dev
Branch Preview URL: https://codex-fix-multi-file-drop-im.markdownviewer.pages.dev

View logs

@ThisIs-Developer ThisIs-Developer changed the title [codex] fix multi-file markdown drop import fix(import): support multi-file markdown drops Jul 6, 2026
@ThisIs-Developer ThisIs-Developer marked this pull request as ready for review July 6, 2026 13:44
@ThisIs-Developer ThisIs-Developer merged commit d1b5744 into main Jul 6, 2026
5 checks passed
@ThisIs-Developer ThisIs-Developer deleted the codex/fix-multi-file-drop-import branch July 6, 2026 13:45
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