the pykern WebSocket server receives a table call for proposal '0' which does not exist, causing a RuntimeError.
Root cause: state.metadata.proposal.value starts as '' (empty string from initialState), but somewhere during initialization it briefly transitions through '0' before settling on the real proposal number (e.g. '9001'). The !proposal guard in usePagination only catches falsy values — '0' is truthy — so effects fire prematurely with the wrong proposal.
The fetchTableMetadata condition (runs.length === 0) passed because Redux state was empty at that moment, allowing a metadata fetch for proposal '0'. When metadata arrives for the real proposal (e.g. from use-proposal.ts via updateTable), hasMetadata becomes true while proposal is still '0', triggering a getTableViaPykernApi call for the wrong proposal.
Where '0' comes from: needs further investigation — likely useParams() or route matching returning '0' transiently during navigation.
the pykern WebSocket server receives a
tablecall for proposal'0'which does not exist, causing aRuntimeError.Root cause:
state.metadata.proposal.valuestarts as''(empty string frominitialState), but somewhere during initialization it briefly transitions through'0'before settling on the real proposal number (e.g.'9001'). The!proposalguard inusePaginationonly catches falsy values —'0'is truthy — so effects fire prematurely with the wrong proposal.The
fetchTableMetadatacondition (runs.length === 0) passed because Redux state was empty at that moment, allowing a metadata fetch for proposal'0'. When metadata arrives for the real proposal (e.g. fromuse-proposal.tsviaupdateTable),hasMetadatabecomes true whileproposalis still'0', triggering agetTableViaPykernApicall for the wrong proposal.Where
'0'comes from: needs further investigation — likelyuseParams()or route matching returning'0'transiently during navigation.