mattcasters commented on issue #8377:
URL: https://github.com/apache/hop/issues/8377#issuecomment-5682282582

   Thanks for reporting this! We investigated main (including recent 
improvements like PR #8108 for RAP session isolation and PR #8365 for Git 
plugin hardening) to see if this was already covered: it is **not yet addressed 
in main**.
   
   Here are the key findings from investigating the code:
   
   1. **Relation to #7797:** The fix for #7797 (forcing `FileObject.refresh()` 
in `listChildrenFresh()`) was already included in the 2.19.0 release, so this 
is indeed a distinct issue rather than a recurrence of #7797.
   2. **Commit flow in Hop Web:**
      * On Hop Web, `GitGuiPlugin.gitCommitOnWeb()` handles the commit and 
finishes by calling `ExplorerPerspective.getInstance().refresh()`.
      * In addition, `gitCommitOnWeb()` checks `fileExists(file)` with a 
repository-relative path without resolving it against `git.getDirectory()`.
   3. **Why the file disappears upon tree refresh:**
      * `refresh()` triggers `refreshEntireTree()`, which calls 
`tree.removeAll()` and rebuilds the tree lazily from the root folder (`depth = 
0`). Subfolders are created collapsed with a dummy placeholder child.
      * Expansion restoration then relies on 
`restoreTreeItemExpandedFromMemory()`. In Hop Web / RAP, after 
`tree.removeAll()` destroys the widgets, the expand state in `TreeMemory` can 
be lost or fail to re-expand the folder. As a result, the parent folder stays 
collapsed with only a dummy child, making the committed pipeline appear to have 
vanished from the tree.
      * Toolbar Refresh (F5) repeats the exact same `refreshEntireTree()` 
cycle, which is why F5 does not bring the file back.
      * Closing and reopening the File Explorer perspective or doing a full 
page reload re-initializes the perspective cleanly and loads folders on demand 
via `lazyLoadFolderOnExpand()`, which is why that workaround works.
      * Furthermore, `gitCommitOnWeb()` currently does not reselect or reveal 
the committed file via `selectInTree()`.
   
   We will work on a fix to ensure the tree memory / expand state and file 
visibility are properly preserved across git commits in the File Explorer 
perspective on Web.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to