Fix playground sample config synchronization (#11660)
Sole Author: Patrick Ribbsaeter (@patrickswedish) · Immutable Commit SHA: 7c995f21898ff44a36564a811d55fd2fcb474607
API definition language workspace fix preserving sample emitter options and compiler configuration synchronization across Monaco model transitions in Microsoft TypeSpec.

PR #11660
Merged Mainline
7c995f2
Immutable Git SHA
TypeScript
Compiler
49 Compiler Checks Green
CI & Test Matrix
01 · Engineering problem
The failure mode
Switching samples in the TypeSpec Playground triggered asynchronous Monaco editor model callbacks that raced with newly loaded sample configuration, overwriting compiler options with stale state.
02 · Technical response
What changed
- 01Guarded Monaco model synchronization during programmatic sample transitions in TypeSpec's playground state store.
- 02Added state-transition unit tests verifying deterministic sample configuration loading.
03 · Verified outcome
Evidence-backed result
- ✓Eliminated stale editor callback overwrites when switching TypeSpec Playground samples.
- ✓Passed 11/11 CI checks and merged upstream into microsoft/typespec as commit 7c995f21898ff44a36564a811d55fd2fcb474607.
04 · Cryptographic Git record
Immutable source evidence
Independent open-source engineering authored solely by Patrick Ribbsaeter (@patrickswedish). Company and project names identify the public repository context only under nominative fair use. No employment, client, vendor, or partnership relationship is implied unless explicitly stated.