Skip to content

Hide hidden files in DMG volume#2584

Merged
sejas merged 2 commits intotrunkfrom
stu-1294-studio-hidden-icons-are-too-visible-when-dmg-volume-mounts
Feb 13, 2026
Merged

Hide hidden files in DMG volume#2584
sejas merged 2 commits intotrunkfrom
stu-1294-studio-hidden-icons-are-too-visible-when-dmg-volume-mounts

Conversation

@sejas
Copy link
Copy Markdown
Member

@sejas sejas commented Feb 12, 2026

Related issues

Proposed Changes

  • Position .background, and .VolumeIcon.icns outside the visible DMG window area so they don't appear when macOS is configured to show hidden files
  • Uses appdmg's type: "position" to move hidden files to coordinates (900, 900), well outside the 710x502 window
  • If the user scrolls the window the icons might be visible.

Testing Instructions

  • Build a DMG with nvm use && npm run make:dmg-arm64 (or x64)
  • Mount the DMG with hidden files enabled (Toggle it by pressing cmd+shift+.)
  • Verify .background and .VolumeIcon.icns are no longer visible in the DMG window
  • Verify the app icon and Applications link still display correctly
  • Restore Finder settings (Toggle it by pressing cmd+shift+.)
Before After
Screenshot 2026-02-12 at 22 32 24 Screenshot 2026-02-12 at 22 55 55

If the user has hidden files disabled, the window won’t scroll. If the user has hidden files enabled, the hidden files will appear in a corner outside the default view, and you’ll need to scroll to see them. You can toggle between these two modes by pressing cmd+shift+..

hidden-files.mp4

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors? (Tests pass, no errors)

Position .background, .DS_Store, .Trashes, and .VolumeIcon.icns outside
the visible DMG window area (900,900) so they are not visible even when
macOS is configured to show hidden files.

Fixes STU-1294

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wpmobilebot
Copy link
Copy Markdown
Collaborator

wpmobilebot commented Feb 12, 2026

📊 Performance Test Results

Comparing 96d3304 vs trunk

site-editor

Metric trunk 96d3304 Diff Change
load 2692.00 ms 2763.00 ms +71.00 ms 🔴 2.6%

site-startup

Metric trunk 96d3304 Diff Change
siteCreation 7097.00 ms 7070.00 ms -27.00 ms ⚪ 0.0%
siteStartup 3930.00 ms 3928.00 ms -2.00 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@sejas sejas requested a review from a team February 12, 2026 23:11
@sejas sejas self-assigned this Feb 12, 2026
@wojtekn
Copy link
Copy Markdown
Contributor

wojtekn commented Feb 13, 2026

I think it may be confusing for Mac users if hidden files are not visible after they enable the display of hidden files. Let's avoid doing such hacks.

@sejas
Copy link
Copy Markdown
Member Author

sejas commented Feb 13, 2026

I think it may be confusing for Mac users if hidden files are not visible after they enable the display of hidden files. Let's avoid doing such hacks.

Other successful apps like Figma follow the same pattern. The goal is that the hidden files don't overlap with logos or text, and those icons don't distract users from dragging the correct file into Applications.

figma-dmg.mp4

@wojtekn
Copy link
Copy Markdown
Contributor

wojtekn commented Feb 13, 2026

Fair point about Figma - if popular apps are using this pattern successfully, I'm happy to go with it. I still have a slight preference for not hiding files, but it's not something I feel strongly about. Let's move forward with your approach.

@epeicher
Copy link
Copy Markdown
Contributor

Hi @sejas, I am testing this but I still see the hidden files
CleanShot 2026-02-13 at 10 48 38@2x

I've confirmed:

  • I am using this branch
  • I have deleted the out folder
  • I have run npm make
  • The out folder is correctly generated with my arm64 architecture
  • I checked that the dmg generated has the expected date

What could I be missing? 🤔

@sejas
Copy link
Copy Markdown
Member Author

sejas commented Feb 13, 2026

@epeicher , thanks for testing it. Make sure to eject the previous Studio mounted device:
Screenshot 2026-02-13 at 09 54 20

Happy to huddle sync, in case is still not working.

@epeicher
Copy link
Copy Markdown
Contributor

After a huddle with @sejas we identified that npm run make generates the dmg with the hidden files visible while npm run make:dmg-arm64 generates the dmg with the hidden files outside the visible window.

I've started the Mac build, and we will check the downloadable file that will be generated for the release.

@sejas
Copy link
Copy Markdown
Member Author

sejas commented Feb 13, 2026

@epeicher , great catch, and thanks for pointing me out in the right direction. I added the same position configuration in both places that produce dmg files. So now this PR works with npm run make:dmg-arm64 and also with npm run make.

Screenshot 2026-02-13 at 10 53 52 Screenshot 2026-02-13 at 10 53 37

Copy link
Copy Markdown
Contributor

@epeicher epeicher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sejas for solving this! I have seen that @wojtekn has approved to move forward, so I have tested it, and it works as expected for both npm run make and npm run make:dmg-arm64 scripts. Changes also LGTM!

@sejas sejas merged commit 7c29bb3 into trunk Feb 13, 2026
10 checks passed
@sejas sejas deleted the stu-1294-studio-hidden-icons-are-too-visible-when-dmg-volume-mounts branch February 13, 2026 11:11
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.

4 participants