A hook given a forward req stays 'loading' forever when no event arrives
- 主要言語
- TypeScript
- スター
- 29
- フォーク
- 3
- 平均マージ
- 3時間 5分
- マージ済み PR(30日)
- 11
説明
`useReq()` resolves its `queryFn` promise from `next` and `complete`
(`src/lib/stores/useReq.ts:52-98`). For a caller-supplied forward req neither can be
relied on:
`createForwardEventObservable` is `this.event$.pipe(filterBySubId(subId))`
(`node_modules/rx-nostr/src/rx-nostr/rx-nostr.ts:401-408`) — no `completeOnTimeout`,
no completion. `over()` is not even part of the forward req type. The only terminator
is `takeUntil(this.dispose$)`.
So if no matching event ever arrives, the promise never settles: `.status` reports
`'loading'` indefinitely and the query stays `fetching`, with no error and no
timeout.
`src/routes/timeline/+page.svelte:61` passes a forward `req` to
``. If the followed set has no recent activity, the page shows its
loading slot forever.
This is distinct from #61, which is about tearing the subscription down once the
consumer is gone.
Determined by code reading of the installed rx-nostr source.
## Direction
A request needs a condition under which it is considered settled, owned by
nosvelte. It cannot be delegated to rx-nostr's `eoseTimeout`: that operator sits
before `filterBySubId` in the backward pipeline (`rx-nostr.ts:437-441`), so its timer
is reset by traffic on any subscription, and it does not apply to forward reqs at
all.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start in src/lib/stores/useReq.ts:52-98 and trace the forward req passed at src/routes/timeline/+page.svelte:61. Compare its next, complete, and takeUntil behavior with the rx-nostr paths cited in the issue; done means a forward request with no matching event settles instead of leaving .status and the query in loading/fetching indefinitely.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100