Eliminate the frontend's dependency on the 51MB client-options.js by
lazy-loading all bulk data from existing API endpoints. Languages,
compilers, libraries, and tools are now fetched per-language on demand
and cached via dedicated service singletons (languagesService,
compilersService, libsService, toolsService).
Small scalar config (sentryDsn, policies, defaultFontScale, etc.) is
inlined into the HTML page via the pug config div's extraOptions
attribute. The backend /client-options.js route is preserved for
backward compatibility.
Key changes:
- Add static/services/{languages,compilers,libs,tools}.service.ts
- Remove client-options.js script tag from _layout.pug
- Replace options.languages with languagesService.getLanguagesOrFail()
- Replace options.compilers with compilersService.getCompilersForLang()
- Replace options.libs/remoteLibs with libsService
- Replace options.tools with toolsService
- Add defaultLibs to Language type and API response
- Add args, monacoStdin, icon, darkIcon, stdinHint to tools API response
- Remove languages, compilers from frontend Options type
- Use field-limited API queries with optionsHash cache-busting
- Split pane constructors into sync + async postInit phases
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>