Files
compiler-explorer/test/storage
Joshua Berne 1863cec885 Accept GoldenLayout format in /clientstate/ URLs (#8862)
The /z/ stored-link handler already supports both ClientState
(sessions-based) and GoldenLayout (content-based) JSON formats, but the
/clientstate/ endpoint only accepted ClientState and always converted it
to GoldenLayout using the default layout.

Extract a shared configToGoldenLayout() method that checks for a
'content' key (GoldenLayout format) and passes it through directly, or
converts from ClientState otherwise. Both storedStateHandler and
unstoredStateHandler now use this method, making the two endpoints
consistent in what formats they accept.

This allows /clientstate/ URLs to carry full GoldenLayout state
including custom panel layouts (e.g., editor-on-top with conformance
view below), which was previously only possible via stored /z/ links.

<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->

Co-authored-by: jberne4 <jberne4@bloomberg.net>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-11 11:19:28 -05:00
..