Fix brainstorm server serving macOS resource fork dotfiles as content#950
Open
Fix brainstorm server serving macOS resource fork dotfiles as content#950
Conversation
On macOS, ._*.html resource fork files pass the .endsWith('.html')
filter and get served as page content, showing binary metadata instead
of the actual brainstorm screen. Filter out dotfiles in all four places
where content directory files are listed or served.
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.
On macOS, ._*.html resource fork files pass the .endsWith('.html') filter and get served as page content, showing binary metadata instead of the actual brainstorm screen. Filter out dotfiles in all four places where content directory files are listed or served.
What problem are you trying to solve?
On macOS, the brainstorm visual companion serves binary garbage
(Mac OS X 2ATTR...com.apple.provenance) instead of HTML content. macOS creates ._filename resource fork filesalongside real files. These ._screen.html files pass the .endsWith('.html') filter in server.cjs and get picked as the newest screen, serving their binary metadata to the browser.
This is a blocker for using visual asistant if project folder is localted on external drives, in my case it's
ExFATWhat does this PR change?
Adds !f.startsWith('.') dotfile guards to all four places in server.cjs where content directory files are listed or served. Adds one integration test covering the ._*.html case.
Is this change appropriate for the core library?
Yes — affects any macOS user running the brainstorm visual companion. Not project-specific, not third-party.
What alternatives did you consider?
Filtering only ._ prefix (!f.startsWith('._')). Chose !f.startsWith('.') instead because it covers all hidden/dotfiles per Unix convention (.DS_Store, .hidden.html, etc.) and is the
standard approach.
Does this PR contain multiple unrelated changes?
No. Single bug fix + its test.
Existing PRs
Environment tested
Evaluation
Rigor
superpowers:writing-skillsandcompleted adversarial pressure testing (paste results below)
rationalizations, "human partner" language) without extensive evals
showing the change is an improvement
Human review