Join the discussion on Telegram
Why this matters
frontend/src/components/stream-creation/StreamCreationWizard.tsx lines 328-354. The polling loop after submitting a stream:
const response = await fetch(\`/v1/streams?sender=\${senderAddress}\`);
const streams = await response.json();
if (streams && streams.length > 0) {
const newStream = streams[0];
...
router.push(\`/app/streams/\${newStream.streamId}\`);
}
Three bugs in one block:
- The fetch URL is a relative path (
/v1/streams?...) — it will hit the Next.js origin (port 3000), not the backend on NEXT_PUBLIC_API_URL / 3001. So this will always 404 in development unless a Next proxy is configured (none is).
streams.length is checked, but the backend returns { data, total, hasMore, limit, offset } (see backend/src/controllers/stream.controller.ts:198-204). So the truthy check fails or the wrong key is used.
- It uses
senderAddress = formData.recipient (line 367) — it's polling for streams where the RECIPIENT is the sender field; that's a swapped role.
The path issue is the same family as #502, but startPolling is a separate function in a different file (the existing fix targets the wizard's post-submit flow elsewhere); the URL/shape problems were not addressed here.
Acceptance criteria
Files to touch
frontend/src/components/stream-creation/StreamCreationWizard.tsx (lines 328-354, 367)
Out of scope
- Replacing polling with SSE
Join the discussion on Telegram
Why this matters
frontend/src/components/stream-creation/StreamCreationWizard.tsxlines 328-354. The polling loop after submitting a stream:Three bugs in one block:
/v1/streams?...) — it will hit the Next.js origin (port 3000), not the backend onNEXT_PUBLIC_API_URL/ 3001. So this will always 404 in development unless a Next proxy is configured (none is).streams.lengthis checked, but the backend returns{ data, total, hasMore, limit, offset }(seebackend/src/controllers/stream.controller.ts:198-204). So the truthy check fails or the wrong key is used.senderAddress = formData.recipient(line 367) — it's polling for streams where the RECIPIENT is the sender field; that's a swapped role.The path issue is the same family as #502, but
startPollingis a separate function in a different file (the existing fix targets the wizard's post-submit flow elsewhere); the URL/shape problems were not addressed here.Acceptance criteria
getApiBaseUrl()(or absolute URL) for the fetchpayload.data(or check Array shape) consistently with howlib/dashboard.ts:fetchStreamsdoes itsender, notrecipient/streams/\${streamId}, not/app/streams/\${streamId}—/app/...does not exist as a Next route in this project (see issue [Frontend] Broken /app route prefix in landing CTA, dashboard links, and wizard redirect #500 family)Files to touch
frontend/src/components/stream-creation/StreamCreationWizard.tsx(lines 328-354, 367)Out of scope