0006. retainContextWhenHidden only where live editing state exists

Status: Superseded by 0017 (2026-10-02). Accepted (2026-09-30).

Context

All nine Deckard webviews set retainContextWhenHidden: true, including the two sidebar views. The official guide calls it the exception, for state that cannot be quickly saved and restored, and warns of its high memory overhead. The API documentation and the guide also disagree on whether a hidden retained webview receives messages. GitLens buffers and replays messages for that reason.

Decision

retainContextWhenHidden stays only on the Dashboard’s query editor and the Task Board’s drag state. Every other page puts its UI state, such as scroll, selection, and open sections, into setState, so the serializers restore it. The stale refresh on isStale and onDidChangeViewState stays everywhere, including where the option is kept.

Consequences

Alternatives considered