Skip to content

fix: offer .txt in the Open dialog (#535) - #537

Merged
PathGao merged 1 commit into
masterfrom
fix/open-txt-files
Aug 8, 2026
Merged

fix: offer .txt in the Open dialog (#535)#537
PathGao merged 1 commit into
masterfrom
fix/open-txt-files

Conversation

@PathGao

@PathGao PathGao commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Fixes #535.

Markpad already treats .txt as one of its own documents everywhere that matters — hasMarkdownLinkExtension accepts it, so a .txt opens, renders, follows wikilinks, reloads on external change and saves back under its own extension; the drop handler routes it to open; the Rust side lists it in MARKDOWN_LINK_EXTENSIONS too.

The Open dialog was the one place that spelled the set out by hand, and it spelled four of the five. The files opened fine but were invisible in the picker unless the user switched the filter to "All Files", which reads as "Markpad cannot open .txt".

Fixed at the list rather than at the symptom: the filter now takes the exported MARKDOWN_LINK_EXTENSIONS, so the sixth place that needs this set cannot be the next one to miss an entry.

The installer still does not claim .txt (#179 / #302) — that association belongs to the system text editor, and taking it is a different act from being able to open the file. Both halves of that policy now sit in scripts/fileAssociations.test.ts so neither side moves without the reader seeing the other.

Validation:

  • npm run check — 0 errors
  • npm test — 866 passing

🤖 Generated with Claude Code

Markpad already treats `.txt` as one of its own documents everywhere that
matters: `hasMarkdownLinkExtension` accepts it, so a `.txt` opens, renders,
follows wikilinks, reloads on external change and saves back under its own
extension; the drop handler routes it to open; the Rust side lists it in
MARKDOWN_LINK_EXTENSIONS too.

The Open dialog was the one place that spelled the set out by hand, and it
spelled four of the five. So the files opened fine but were invisible in the
picker unless the user switched the filter to "All Files" — which reads as
"Markpad cannot open .txt", and is what #535 reports.

Fixed at the list rather than at the symptom: the filter now takes the
exported MARKDOWN_LINK_EXTENSIONS, so the sixth place that needs this set
cannot be the next one to miss an entry.

The installer still does not claim `.txt` (#179/#302) — that association
belongs to the system text editor, and taking it is a different act from
being able to open the file. Both halves of that policy now sit in
fileAssociations.test.ts so neither moves unseen.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@PathGao
PathGao merged commit 6709243 into master Aug 8, 2026
4 checks passed
@PathGao
PathGao deleted the fix/open-txt-files branch August 8, 2026 03:30
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.

Markpad to open .txt files

1 participant