Interface EditorContext

The editor "dirty set" mirrored from the immediately.run host into the sandbox (UI_AS_APPS_SPEC §5.3): which files the user has changed but not yet saved.

This is the ELEVATED editor:read capability — only a system app whose binding grants it (e.g. the contribute dialog) receives it. The active file and ref are already available to every app via routing (useNavigationState), so this channel carries only the genuine delta: the unsaved paths. An app without editor:read simply sees an empty dirty set.

interface EditorContext {
    activeFile: null | string;
    dirtyPaths: string[];
    openFiles: string[];
    viewedFile: null | string;
}

Properties

activeFile: null | string

The one file currently focused in the host editor (repo-relative, leading slash — e.g. /src/index.ts), or null when no file is open. Distinct from dirtyPaths (the unsaved SET) and openFiles (the open-tab set): this is the single ACTIVE file. A baseline app reads its own active file from the route, but a self-routed system panel (drivesHostRoute=false, e.g. the file explorer) does not see the host editor's route, so it receives the active file here instead (UI_AS_APPS_SPEC §5.3 self-routed-panel refinement).

dirtyPaths: string[]

Repo-relative paths the user has modified but not yet saved.

openFiles: string[]

Repo-relative paths currently open as tabs in the host editor (§4.2).

viewedFile: null | string

The viewed-document HINT (R3-268): the working-tree file the STAGE app is currently rendering (leading slash), or null. Distinct from activeFile (the editor's focus): this is what is ON STAGE. It is an app-supplied claim the host validated for existence only — consume it as a highlight and nothing more (never scroll, move focus, or switch files on it; that contract is what keeps the signal activation-free).