JSON demo keeps streaming after leaving the page

Open
#334 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@CNSeniorious000 is already working on this.

Since Nov 11, 2026.

  • #335 by @CNSeniorious000 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
30/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Find the /partial-json-parser demo and trace where its completion request is started. Check how the page lifecycle is handled when SvelteKit unmounts the page, then verify that leaving cancels the request and returning starts a fresh one. The issue reports an open SSE connection after navigation; linked pull request #335 is already open.

Written by the indexing model from the issue text.

Description

Start a response on /partial-json-parser, then navigate away with SvelteKit's client router (for example, browser Back). The page is destroyed, but the completion request continues until the response finishes.

Reproduced in the production build with a local OpenAI-compatible SSE fixture: the server had sent 4 chunks before navigation and 15 afterward, with the connection still open. The request has no abort signal.

Cancel the request when the demo is unmounted; returning to the page should start a new response normally.

Dominant language
Svelte
Stars
2
Forks
0
Avg merge
18h 1m
Merged PRs (30d)
18

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from promplate/site

All issues in promplate/site

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.