Referenced by5
Labels2

Referencing ideas

IdeaStatusTagsSummaryKatz
activationVS Code loads the extension host entry at ["../../../packages/extension/src/extension/main.ts"] when an activation event in ["../../../packages/extension/package.json"] matches. The exported `activate(context)` function is the single activation entry point for [scope.vscode_extension]. Install-time and first-run sequencing across extension vs base layers: ["./installation.rq".installation_sequencing]. Startup failure diagnosis, first-paint sequencing, bundle splitting, and development-host lessons: ["./startup-performance.rq"].0.064
first_paint_startupdoneThe activity-bar HTML shell is assigned by ["../../../packages/extension/src/activity_bar_module/activity-bar-webview-provider.ts"] after one event-loop turn ( retry once on invalid-state ). Host `postMessage` starts only after the webview `ready` handshake; disposed / invalid-state errors are swallowed by ["../../../packages/extension/src/shared/safe-webview-post.ts"]. Its Svelte app installs the host message listener before mount, then sends the one-shot `ready` handshake from a task queued after its first animation frame. ["../../../packages/extension/src/extension/startup-gate.ts"] resolves that handshake once; `IndexService.activate` then discovers bases and syncs. If no view opens, a bounded three-second fallback starts the index without any visible first paint to contend with. Index open / sync requires the host-matching core engine ( rusqlite ); missing `.node` fails activate. Windows claim / dispose races: ["./startup-performance.rq".webview_claim_race].0.148
extension_startup_reliabilitydoneReqlan startup must make the activity-bar shell and contributed commands available before optional indexing, parser construction, database initialization, or language-client startup can monopolize the extension host. The implementation contract is [first_paint_contract], [webview_claim_race], [deferred_startup_sequence], [lazy_runtime_dependencies], and [development_bundle_freshness]. Operational diagnosis follows [startup_diagnostics]. [activation.activation_sequence] [activitybar.loading_state] [indexer.nonblocking_index] [build.extension_bundle]0.046
first_paint_contractdoneThe platform spinner ends only after VS Code loads the host module, calls `activate`, the provider registers, and `resolveWebviewView` assigns HTML. `resolveWebviewView` is async: it binds the view, yields one turn so the overlay can be claimed, then assigns the lightweight HTML / Svelte shell ( retry once on invalid-state ). It does **not** `postMessage` in that method. The webview installs its host message listener, mounts, waits for its first animation frame, then posts the one-shot `ready` signal from a queued task. Host messages start only after that handshake. Index discovery / sync waits for the same signal so synchronous parser or database setup cannot race the first visible frame. Windows overlay restore can dispose and re-resolve the sidebar; the provider rebinds and waits for a new `ready`. [activation.first_paint_startup] [webview_claim_race] ["../../../packages/extension/webviews/activity-bar/App.svelte"] ["../../../packages/extension/webviews/activity-bar/state/app.svelte.ts"] ["../../../packages/extension/src/extension/startup-gate.ts"] ["../../../packages/extension/src/shared/safe-webview-post.ts"]0.058
webview_claim_racedoneSetting `webview.html` or calling `postMessage` before the workbench has claimed the overlay ( or after it has disposed it ) can fail with `Webview is in an invalid state` / `Webview is disposed`. This is intermittent and more common on Windows during extension init, when the activity-bar view is restored in the same tick as another webview ( first-run onboarding ). Contract: - Activity-bar host posts only after the webview's `ready` signal; `post` is a no-op until then and swallows disposed / invalid-state errors. - `resolveWebviewView` may run more than once: dispose prior view listeners, clear `webviewReady`, rebind, reassign HTML. - First-run onboarding waits for the activity-bar paint gate or 400 ms, whichever first, so it does not register a second webview service worker during sidebar claim. Palette `reqlan.showOnboarding` stays immediate. Index and language-client startup still use the existing paint / timeout fallbacks — a dead sidebar must not strand indexing. [first_paint_contract] [activation.onboarding_check] ["../../../packages/extension/src/activity_bar_module/activity-bar-webview-provider.ts"] ["../../../packages/extension/src/extension/main.ts"] ["../../../packages/extension/src/shared/safe-webview-post.ts"]0.091

Reference labels

"../../../packages/extension/src/shared/safe-webview-post.ts", ../../../packages/extension/src/shared/safe-webview-post.ts