mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-07-16 17:26:58 -04:00
The lazy-load change (#8549) made the LibsWidget fetch its available library list from the API, so applying the saved state (selecting the libraries from a shortlink) became asynchronous. The compiler/executor panes called initLibraries without awaiting it and then immediately compiled and persisted state, so the saved libraries were not yet selected (e.g. /z/jMdjdahn6 loaded without beman_any_view selected). Expose a stateLoaded promise on LibsWidget that resolves once loadState has run, await it in initLibraries, and await initLibraries in postInit. Also refresh the libraries button after loadState so its count is correct. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>