superfile: Getting "Terminal size too small" error when trying to open `spf` from `/tmp` directory
Bug
When I run spf from /tmp directory it just shows a small dialog box saying “Terminal size is too small”, and points out the required dimensions. But my terminal is already maximized.
Please watch the following video:
https://www.loom.com/share/bf09a107eab344d0a62efcd80aa4b0a1?sid=babd03b8-252d-4c40-8d85-cc80dec03033
- The issue is not terminal specific. The same issue occurs in Wezterm too.
Steps to reproduce
- Install using
bash -c "$(curl -sLo- https://superfile.netlify.app/install.sh)"and denysudoprivileges - Go to
/tmpdirectory - Run
spf
OS Info
- OS: macOs Sequoia 15.3
- superfile version: v1.1.7.1
- Ghostty: Ghostty 1.1.0
- Wezterm: wezterm 20250103-121535-8e9cf912
- Shell: fish shell
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 31 (1 by maintainers)
@yedhink “underlying issue ought to be fixed in a separate PR” - Yes. This is just a stop gap fix.
"Also, please note that, we need to make the directory listing logic a background job rather than it holding up the main thread " - Yes. Its not already implemented. It should be implemented
“I would also recommend taking inspiration from Yazi where they have implemented chunked directory listing” - Sounds interesting, will check it out. Thanks.
Ideally, the application should display a “Loading…” message during file loading to keep the user informed that the program is actively processing, ensuring that they don’t mistakenly believe the program has frozen.
However, as a temporary solution, I believe we could implement a feature where, for directories containing more than 10,000 files, superfile would display a message such as “Directory contains over 10k files, superfile does not support display at this time,” or something similar.
This would help avoid situations where the program becomes unresponsive, while still providing clear feedback to the user about the limitation.
Do let me know if you need any more info from my end. I will update here in a week if the issue reoccurs.
I tried to see if bubbletea framework is causing the issue by running the following code:
And it worked as intended in
/tmp.Issue is specific to exact path
/tmpPS: Opening
spffrom a nested directory within/tmp, like say/tmp/spfworks.Please watch this video: https://www.loom.com/share/6d555013937f49ea86c2b9910068f57c?sid=46ca479a-23e4-4f94-81f2-48292ecc80c1
Also, moving back to
/tmpfrom/tmp/spffrom withinspfcauses the application to get stuck - meaning I can’t do anything once I try to go to/tmp.@lazysegtree Lemme know if you need any further info.
Logs when opening and quitting in non-temp directory
Logs when opening in
/tmpdirectory - not able to quit the appDid that. No new logs are getting appended once
terminalSizeWarnRenderis shown on screen. Also, like I had mentioned before, we cannot exit out ofspfwhen on this warning screen - have to kill it usingpidof currently runningspf.Issue is only in
/tmpdirectoryI tried running
spffrom/usr,/etc(symlinked to/private/etc),/var(symlinked to/private/var) and other directories where usually an executable runs into permission issues - but none of these directories caused an issue -spfworked as intended.Only in
/tmpand/private/tmpthis issue occurs. Between/tmpis a symlink to/private/tmp: https://apple.stackexchange.com/questions/1043/why-is-tmp-a-symlink-to-private-tmp