feat(console-web): add bounded iframe keep-alive
- opt service and settings pages into document retention - preserve iframe identity and local Solid state across navigation - cap retained documents with deterministic LRU eviction - deliver activate, deactivate, and dispose lifecycle messages - reject commands emitted by inactive page documents - expose page activity as a Solid accessor - test retention, recreation, eviction, and invalid limits
This commit is contained in:
@@ -46,7 +46,7 @@ function FramePage() {
|
||||
</main>
|
||||
}
|
||||
>
|
||||
<Page state={bridge.state} command={bridge.command} />
|
||||
<Page state={bridge.state} active={bridge.active} command={bridge.command} />
|
||||
</Suspense>
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -3,5 +3,10 @@ import type { HostSharedState, PageCommand } from "../sdk/protocol";
|
||||
|
||||
export type PageProps = {
|
||||
state: Accessor<HostSharedState | null>;
|
||||
/**
|
||||
* False while a keep-alive iframe is hidden. Page-owned polling, media or
|
||||
* render loops should pause until this accessor becomes true again.
|
||||
*/
|
||||
active: Accessor<boolean>;
|
||||
command: (command: PageCommand) => void;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user