GeoLeaf Core API - v3.19.0
    Preparing search index...

    Interface PreflightReport

    "Can I leave?" — the facts a device must be read for before going off-network, in one read.

    Each fact already had its door (getSyncReport, getSyncStatus, getStats, the cache manifest); two had none — whether the browser keeps this origin's data, which the PWA requested at boot and only logged, and the write session, which only its holder knows. verdict says what they mean together:

    • notReady — a layer that declares something to pull was never pulled, or its last pull failed: its entities are not on the device.
    • degraded — the device can leave, but something will be missing or may go: an unfinished or stale pull, entries set aside, an origin the browser may evict (bestEffort or unsupported), zooms left out of a basemap, resources that failed to download, a write session absent or expired.
    • ready — none of the above.

    ⚠️ A session that is valid now does not make the verdict. When it will expire is a fact (session.expiresAt); whether that falls within the trip is not — nobody here knows how long the trip lasts. And a session that is missing never makes a device notReady: no entity leaves the device with it, and the captures wait in the queue for a sign-in.

    interface PreflightReport {
        at: number;
        verdict: "ready" | "degraded" | "notReady";
        persistence: StoragePersistenceRegime;
        quota: { used: number; quota: number; percentage: number } | null;
        layers: readonly LayerSyncReport[];
        queue: SyncStatus;
        preparation:
            | {
                cachedAt: number
                | null;
                failedResources: number;
                tiles: TilePreparationTrace | null;
            }
            | null;
        session: WriteSession
        | null;
    }
    Index
    at: number

    When the check was made, epoch ms.

    verdict: "ready" | "degraded" | "notReady"

    Whether the browser keeps this origin's data — read, never assumed.

    quota: { used: number; quota: number; percentage: number } | null

    Storage used and available, or null when the browser does not say.

    layers: readonly LayerSyncReport[]

    One report per layer that declares something to pull — see LayerSyncReport.

    queue: SyncStatus

    The write queue as a whole — see SyncStatus.

    preparation:
        | {
            cachedAt: number
            | null;
            failedResources: number;
            tiles: TilePreparationTrace | null;
        }
        | null

    The last offline preparation, or null when the device was never prepared: when it ran, how many resources failed, and what the tile enumeration asked for and left out.

    session: WriteSession | null

    The write session, as its holder tells it — null when nobody does: no reader registered (no connector, or a host token whose holder registered none), or one that failed or did not answer in time. See WriteSession.