zielu / GitToolBox

GitToolBox IntelliJ plugin
GNU General Public License v3.0
604 stars 71 forks source link

[BUG] Project view does not remember expanded state #456

Closed irnnr closed 1 year ago

irnnr commented 1 year ago

Describe the bug

When restarting the IDE the project view's folder structure is collapsed.

To Reproduce

  1. Expand the folder structure in the folder view
  2. Close the IDE
  3. Reopen the IDE
  4. Error: Project view folder structure is collapsed

I was able to track this down to GitToolBox by uninstalling all 3rd party plugins and reinstalling them one by one until the bug was reproducible.

This happens with the new UI and the old UI in Webstorm EAP 2023.1

Expected behavior Remember expanded state of project view folder structure

Plugin version 500.0.2+213

IDE version WebStorm 2023.1 EAP Build #WS-231.6890.13, built on February 8, 2023 Licensed to WebStorm EAP user: ingo@august.com Expiration date: March 10, 2023 Runtime version: 17.0.6+10-b802.4 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 13.2 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 10 Metal Rendering is ON Registry: debugger.watches.in.variables=false ide.images.show.chessboard=true

Non-Bundled Plugins: lermitage.intellij.extratci (1.24.0) com.karateca.jstoolbox (1.10) idea.plugin.protoeditor (231.6890.12) org.intellij.plugins.hcl (231.6890.12) org.intellij.plugins.postcss (231.6890.12) com.wix.sasslint (1.1.2) String Manipulation (9.6.1) ir.msdehghan.plugins.ansible (0.92) dev.meanmail.plugin.nginx-intellij-plugin (2022.1.1) com.ludditelabs.autodoc.plugin (0.9.2) com.intellij.grpc (231.6890.13) org.intellij.RegexpTester (1.0.8) com.intellij.kubernetes (231.6890.12) PlantUML integration (5.22.0) com.atlassian.bitbucket.references (2022.1.220) tv.twelvetone.intellij.plugins.intellivue (1.1.26) org.vepanimas.uml.javascript (0.2.0) mdx.js (231.6890.12) zielu.gittoolbox (500.0.2+213) mobi.hsz.idea.gitignore (4.4.4) com.intellij.swagger (231.6890.13) com.intellij.microservices.ui (231.6890.13) izhangzhihao.rainbow.brackets (2023.1.3)

Screenshots Cursor_and_august-fastify-commons_–_handlerchain_js

zielu commented 1 year ago

Hi, indeed happens on single-repo project. Interestingly does not happen on multi-repo one :/

zielu commented 1 year ago

Anyway - on it !

zielu commented 1 year ago

Caused by changes done in 231 to logic in com.intellij.ide.util.treeView.TreeState#calcId - https://github.com/JetBrains/intellij-community/blame/8341919aa730a81a5ad71c68a78396e5d2e99de1/platform/platform-api/src/com/intellij/ide/util/treeView/TreeState.java#L240

zielu commented 1 year ago

https://youtrack.jetbrains.com/issue/IDEA-313210/Project-view-does-not-restore-state-state-after-project-reopen

zielu commented 1 year ago

Waiting for fix from JB

irnnr commented 1 year ago

looks like they merged the fix and it's marked as shipped in the new/current EAP

zielu commented 1 year ago

Indeed they marked it for release in next EAP (6). I'll keep this open until I can verify the fix.

irnnr commented 1 year ago

ah ok, my bad, I read it as EAP 5

zielu commented 1 year ago

EAP 6 is out and it is fixed

irnnr commented 1 year ago

fix confirmed, ty!