Atom 0.186.0 - Tree View Will Not Display


#1

I just updated to version 0.186.0 (for OS X).

Now I can no longer use the tree view. And the tree view keystroke is not functioning. I cannot open a folder either, when I try nothing happens. I tried using the “project manager” package as well and still no luck.

Any idea how I can get around this?


#2

Hi :slight_smile: You might tree to run atom in --safe mode to see if package is a problem or even better run the command Key Binding Resolver: Toggle. Press keystroke and see what was triggered.


#3

Tried both - Safe mode and Key Binding Resolver. No errors and no tree view. Here is what the Key Binding Resolver reports in both instances:


#4

If you open the JavaScript console is anything reported?


#5

When I opened the console I saw this …

So I disabled the listed packages and themes that could be disabled. Still no luck with the tree view.

Then I disable all installed community packages manually and restarted. Still no tree view.

Then I started disabling all other packages in small groups at a time manually and restarting each time. Again no tree view.

I have now disabled every packages to the point that I can’t even view my preferences. Still no tree view.


#6

Try this next:

  1. Completely close all instance of Atom
  2. Delete the ~/.atom/storage directory
  3. Run Atom using atom --safe

#7

I tried what you said. Still no tree view. So, I deleted the app, the app support directory and the entire ~/.atom directory. I downloaded reinstalled Atom then moved all my installed packages from the trash back into ~/.atom/packages. Everything seems to be working and I now have a tree view.


#8

Same bug for me. I can see it on many versions of Atom. Seems like I can reproduce it by these steps:

  1. You have some “Project folders” in tree view.
  2. Close Atom window with Cmd+w
  3. Close Atom app with Cmd+q
  4. Open Atom

After these steps I now have editor without tree view and it can’t be opened by Cmd+Shift+O Tree View: Show and Tree View: Toggle commands. (Atom 1.12.8, 1.12.9)


Save-Session
#9

Following these repro steps using Atom v1.14.0-dev-6fb78bdc9 on Mac OS X 10.12.2 I can replicate that Tree View: Toggle won’t display the tree view. But Cmd+Shift+O aka Application: Add Project Folder works as soon as I select a directory and click Open.

I just now tried the following using Atom v1.12.9 on Mac OS X 10.12.2:

  1. Launch Atom with a project folder in the Tree View
  2. Close Atom window with Cmd+SHift+W
  3. Close Atom app with Cmd+Q
  4. Launch Atom using the Dock
  5. Open the add a project folder dialog with Cmd+Shift+O
  6. Select a folder
  7. Click “Open”

The Tree View displays as expected.


#10

Also play some time with it.
First I remove all local atom folders, and start again, now I can show tree view after adding project folder. But I discovered this.

  1. It looks like atom not always have time to save project paths when I click Cmd+Q. I can reproduce (sometimes) this by adding new project folder ( Cmd+Shift+O) then immediately quit (Cmd+Q). Mostly after launch atom I can’t see added folder. Not sure what I need to do to save state time, or some actions…
  2. After closing window (Cmd+Shift+W), quit (Cmd+Q). I need to restore all project folders by hand anyway :frowning:

I looked at sources, but seems like process of save/restore too complicated and without knowledge of architecture I can only shoots in the air. As I can see, projects save to LocalStorage and it somewhat linked to history, but there are some code for migrate from other db in HistoryManager


#11

Yes, this is a known issue here:


#12

Thank you! You link is very helpfull! Also there is a pull request that fixes first problem #12545


#13

There’s a pull request, but it still needs tests to be accepted. If someone were to take it and add some tests, that would be very helpful.


#14

I just try write some tests pull#13564
Currently it fails on windows… It would be helpfull, if some atom devs suggests how to fix it.


#15

Seems I found place in code where issue occur: AtomApplication#removeWindow

  removeWindow: (window) ->
    @windows.splice(@windows.indexOf(window), 1)
    if @windows.length is 0
      @applicationMenu?.enableWindowSpecificItems(false)
      if process.platform in ['win32', 'linux']
        app.quit()
        return
    @saveState(true) unless window.isSpec

If @windows.length is 0 (@saveState will not be called on win32 & linux, but will be on mac). Most probably it should be like:

    if @windows.length is 0
      @applicationMenu?.enableWindowSpecificItems(false)
      if process.platform in ['win32', 'linux']
        app.quit()
        return
    else
      @saveState(true) unless window.isSpec

But not sure exactly…


#16

I’ll be interested to hear what you find out!


#17

Simple: in windows & linux AtomApplication#removeWindow can call @saveState only if another window exists. When the last window is closed, these systems will remember project paths from the last window (more correctly project paths will not be overwritten).

On mac, however, after closing the last window, @saveState will be executed which will save empty project paths to ATOM_HOME/storage/application.json. It is the problem here. Because a user expects that after he starts Atom again the state of the last window will be restored.