Hub UI
The Hub UI is the launcher screen the editor shows while no project is open. It presents a recent-projects list plus New and Open actions, drawn through the same MicroUI context as the rest of the debug overlay.
The overlay calls this in place of the Scene/Inspector panels when
safi_project_session_hub_active is true,
passing the logical window size so the Hub fills the viewport. window is the
parent for native folder dialogs.
Async folder dialogs
SDL folder pickers (SDL_ShowOpenFolderDialog) are asynchronous and may
deliver their result on another thread. The Hub's dialog callback only stashes
the chosen path and publishes it with an atomic flag; the next UI frame
consumes it on the main thread and performs the project open / create. This
keeps every world mutation on the main thread, where flecs defers structural
changes safely.
Actions
- Projects — rows from
safi_recents_load; click tosafi_project_session_open, or remove a stale entry. - New — name + parent folder + template, then
safi_project_createfollowed byopen. - Open — browse to a folder; requires a
project.safi.json.
Failures surface as an inline toast rather than asserting.
See also
- Editor Hub guide — the end-to-end workflow
- Project Session — the open / close it drives
- Project I/O — load / create / recents
- Debug UI — the overlay that hosts this screen