1.8 KiB
058 — Newly auto-declared params don't appear in the UI until a manual refresh
Summary
auto_declare_params / auto_declare_log_stream_params (src/engine.rs:383,
:451) can add new param declarations on any ingested line, but the
frontend only ever fetches the param list once, on mount
(webapp/src/App.tsx:278-284, fetchParamDeclarations().then(setParams)).
The main poll loop (App.tsx:300-350, interval from
webapp/src/lib/polling.ts) refetches timeline entries and logs every
tick but never re-fetches param declarations — the only other place
setParams is called is the onDeclared callback fired by a user's own
manual edit in Params.tsx. So a param that gets auto-declared mid-run
from freshly ingested lines is invisible in the Params panel until the
page is reloaded.
There is no push infrastructure (SSE/websocket) anywhere in the codebase; all live-refresh today is plain polling.
Scope
- Add a periodic (or piggybacked on the existing poll loop) refetch of
param declarations in
App.tsx, e.g. callfetchParamDeclarations()alongside the existing timeline/log poll in the loop atApp.tsx:300-350, or on its own lighter-weight interval if refetching every tick is wasteful. - Only update state when the declaration list actually changed, to avoid
needlessly re-rendering
Params.tsxon every poll tick. - Out of scope: introducing SSE/websocket push infrastructure — polling is consistent with how the rest of the app already refreshes.
Acceptance criteria
- Ingesting new lines that trigger auto-declaration of a previously unseen param causes that param to appear in the Params UI within one poll interval, without a page reload.
- Existing manual param declaration/edit flows (
Params.tsx'sonDeclared) are unaffected.
Depends on
None.