Bug with 'Folder on Top' feature

Hello. I’m testing TotalFinder v 1.7.3 under 10.11 and I understand the SIP situation with 10.11 and I have this temporarily disabled while I test TotalFinder. I’m having a weird problem at attempting to create a new folder while in List view which I classify as a bug in ‘Folders on Top’ feature. Here’s how to reproduce it:

  1. Open a finder window to any location that have at least one non-directory object
  2. Make sure the view is set to List
  3. Create a new folder (by any means)
  4. The new folder is created but temporarily displayed incorrectly depending on how the items are sorted according to this scheme:
    • By Name (descend) [if there’s at least one object with name that sorts AFTER ‘untitled folder’ - disguised as that item]
    • By Name (ascend ) [if there’s at least one object with name that sorts BEFORE ‘untitled folder’ - disguised as that item]
    • By Date Modified (ascend ) [always - disguised as the last item in the list]
    • By Size (descend) [always - disguised as the last item in the list]
    • By Kind (descend) [always - disguised as the last item in the list]
    • Other sorting options that I have not test may apply as well

I made some additional experiments and found the following notes:

  • Refreshing the window (by going anywhere then back to it) will correct the view
  • The same problem exist while attempting to paste a folder into the opened window
  • The same problem exits while attempting to decompress an archive that contain a folder into the opened window
  • Disabling ‘Folders on Top’ feature goes away with the problem (but of course main feature is gone)

This is screenshot showing the problem: http://store.picbg.net/pubpic/04/B5/4f3e22f8266804b5.png

Thanks for the awesome software.

Yes, I can confirm that folders on top feature behaves erratically when view content gets modified under the hood.

I have been working on this issue for past 3 days. Don’t have a good solution yet. Hopefully I will find one which will also implement folders on top in column view.

I hope I will have some solution by the end of next week. Right now the only workaround is to force refresh of the view from scratch - for example switching tabs, or disabling+enabling folders on top (by pressing CMD+OPT+; twice).

That’s good to know you are aware of the bug. As an additional method for refreshing the window, I used script editor to save this script as application and pinned it into Finder’s toolbar so I can refresh the window with a click to this button. Still inconvenient but the easiest approach I found so far until you find a proper fix …

tell application "Finder" to tell front window to update every item

EDIT:
I tried to automate the whole thing so once a file change is made the Finder refresh the views using the script but this approach needs a listener to Finder actions which I could not do. You might be able to do that or even better since your application already injects Finder.

Nice job.

Unfortunately this problem seems to be really hard to solve. The 10.11 Finder does not seem to have a place where I could hook to affect sorting globally. Finder code is trying to be smart about views being updated incrementally, so sorting is also updated incrementally. I don’t have a good way how to override sorting without confusing other parts of the system.

Your hard-refresh solution works, but I don’t know when view is out-of-sync and all my previous attempts to refresh view to match underlying data caused a lot of flickering.

I believe I found a way how to fix this in v1.7.5:
http://totalfinder.binaryage.com/beta-changes#latest

Thanks for testing.

Hi, thanks for your hard work.
After installing v1.7.5, the folder on top feature seems to be functioning correctly in column view. However, I noticed that it breaks (at least) the “ordering by last modification date” in list view. When applied, it keeps the folders on top while ordering the files in what seems to be a random order. I haven’t tried other “ordering by” possibilities.

I can add that the new implementation works a lot better and is much faster on directories with lots of folders. Changing sort order in list view is still broken though, and sometimes after renaming files the ordering can be off too.

Thanks for the update(s). I have not tried v1.75 but I assume the fixes remains in v1.7.8 which I have tried. Unfortunately, neither the problem in this thread is fixed nor folders on top is functioning in Icon View mode. I have reverted to 1.7.3 and folders on top started working again in Icon View mode.

I confirm that new “Folders on Top” implementation in 1.7.5 does not handle Icon View.

Apparently in the last version 1.7.8 folders on top for icon view mode are not working, at least on my end.

Folders on Top will work in Icon View under El Capitan in version 1.7.9 (will be released later this weekend).

TotalFinder v1.7.9 is available on beta channel:
http://totalfinder.binaryage.com/beta-changes#latest