exlab_wizard.ui.client.folder_feed#

Folder-feed client abstraction. GUI/Orchestrator Redesign §5.

A small start(path, on_update) / stop() surface that owns the ~2-3 s GET /folder/{path} poll for the centre-pane file list. Returning to the same path is idempotent; switching paths stops the previous poll before starting the new one. Paused on window background / foreground per §5.

The HTTP call is delegated through a caller-provided async function so the module remains framework-agnostic (NiceGUI / pytest both reuse it).

Classes

FolderFeed(*, fetch[, on_update, ...])

One folder feed; rebound to a different path via start().

FolderFeedState([path, paused, last_payload])

In-memory state of one folder feed (one per centre pane).

class exlab_wizard.ui.client.folder_feed.FolderFeed(*, fetch, on_update=None, poll_interval_s=2.5)[source]#

Bases: object

One folder feed; rebound to a different path via start().

Parameters:
pause()[source]#

Pause polling — used when the window is backgrounded.

Return type:

None

resume()[source]#

Resume polling after a pause.

Return type:

None

async start(path)[source]#

Start polling path. Switching paths stops the previous poll before starting the new one (the spec’s stop() then start() lifecycle, called from the single on_select_node handler).

Parameters:

path (str)

Return type:

None

property state: FolderFeedState#
async stop()[source]#
Return type:

None

class exlab_wizard.ui.client.folder_feed.FolderFeedState(path=None, paused=False, last_payload=None)[source]#

Bases: object

In-memory state of one folder feed (one per centre pane).

Parameters:
last_payload: Any | None = None#
path: str | None = None#
paused: bool = False#