Repository navigation
fix: reset editors when switching prompts - #316
Merged
Merged
Conversation
|
|
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/routes/prompts/[...slug]/+layout.svelte" line_range="7" />
<code_context>
+ const { children, params }: LayoutProps = $props();
+</script>
+
+{#key params.slug}
+ {@render children()}
+{/key}
</code_context>
<issue_to_address>
**New prompt shows stale output**
When navigation changes the slug while the previous page's Python run is pending or waiting for `getPy()`, the destroyed page's `onMount` resumes after `getPy()` and calls `reRun()` with its old prompt while the new page starts `py.runPythonAsync` on shared Pyodide; the new `setStdout` handler receives old output, and overlapping execution can fail, so the new prompt shows stale or incorrect output or a run error.
Invalidate runs from the previous page and serialize access to shared Pyodide so an obsolete page cannot start an old-prompt run or route its output to the new page.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: src/routes/prompts/[...slug]/+layout.svelte:7
CNSeniorious000
force-pushed
the
fix/prompt-navigation
branch
from
October 29, 2026 09:38
22da4a4 to
2f019e8
Compare
|
Deployment failed for project promplate-docs with the following error: Learn More: https://vercel.com/promplate?upgradeToPro=build-rate-limit |
CNSeniorious000
changed the base branch from
main
to
fix/control-accessible-names
October 29, 2026 09:39
CNSeniorious000
force-pushed
the
fix/prompt-navigation
branch
from
October 29, 2026 23:37
2f019e8 to
1a24743
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Start a fresh editing session when the prompt slug changes; preserve unsaved edits for query-only navigation. Serialize prompt runs on shared Pyodide, prepare context before execution, and ignore output or startup from an unmounted page.
Verified production navigation and Monaco cleanup. Chromium tests of the real page with deferred runtime stubs cover navigation before startup and during a running prompt: runs do not overlap and old output stays out of the new page. Build and lint pass.
Closes #313. Based on #310 to preserve its run-button accessibility changes; merge #310 first.