Hi all,
While working on folder support for the model tree, I ran into a pre-existing bug that isn’t specific to folders: when a new schema item (Data Structure, Entity, Documentation, Screen, …) is created inside a category and saved, the tree is supposed to refresh and show it. Instead, the refresh call targets the grandparent node instead of the item’s direct parent (architect-html/src/components/editors/gridEditor/GridEditorState.ts, and the same copy-pasted pattern in DocumentationEditorState.ts and DesignerEditorState.tsx).
In practice this usually goes unnoticed, because the tree has a safety net: any node marked “expanded” but not yet loaded gets its children lazily fetched. If the direct parent category happened to already be expanded before the item was created, that safety net masks the wrong refresh target and the new item shows up anyway. But if the parent was never expanded first, the refresh misses it entirely - the item is saved correctly on the backend and its editor tab works fine, it just stays invisible in the tree until the user manually collapses/re-expands the category or reloads the page.
This matters more with folder support landing: folders are frequently created and populated in the same flow without ever being pre-expanded (create folder, then immediately create an item inside it), which hits this bug on the very first use rather than in an edge case.
I’d propose fixing the refresh target to reload the item’s direct parent instead of the grandparent, and also have item creation expand its parent immediately (mirroring what folder creation already does), so a newly created item is visible right away regardless of prior expand state.
Rough size estimate is S.
Happy to open a PR for this.
Thanks!