Skip to content

Persistent output: notify user once instead of console-spamming when the block can't be located#448

Closed
nelsonlove wants to merge 3 commits into
twibiral:masterfrom
nelsonlove:fix-persistent-output-noise
Closed

Persistent output: notify user once instead of console-spamming when the block can't be located#448
nelsonlove wants to merge 3 commits into
twibiral:masterfrom
nelsonlove:fix-persistent-output-noise

Conversation

@nelsonlove

@nelsonlove nelsonlove commented Jul 11, 2026

Copy link
Copy Markdown

Summary

With Persistent Output enabled, running a run-<lang> block (or any block whose editor range can't be resolved, e.g. live preview) logs Error finding output target: Probably because of 'run-' prefix to the console on every chunk of stdout, while the user gets no visible indication that their output isn't being saved to the note.

This PR:

  • Shows a single Notice per run explaining what happened: "persistent output isn't supported for this code block ('run-' blocks and live preview) — the output is only shown below the block, not saved to the note."
  • Stops the per-chunk console.error spam, and removes the setViewData(editor.getValue()) call in that error path (it rewrote the identical document on every output chunk)
  • Downgrades the constructor-time range-lookup failure to a clearer console.warn

On-screen output behavior is unchanged.

Testing

  • npm run build passes (tsc + esbuild)
  • Manually verified: with persistent output on, a run-lisp block now shows the Notice once and produces no per-chunk console errors; the happy path (block range resolved) is untouched by this change

🤖 Generated with Claude Code

nelsonlove and others added 3 commits July 11, 2026 06:29
…en the code block can't be located

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… render, not per execution

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ion start

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@nelsonlove

Copy link
Copy Markdown
Author

Superseded by #449, which includes these commits and rewrites the persistent output path they patch. Closing to reduce reviewer noise — if the smaller change is preferred over the rewrite, this can be reopened.

@nelsonlove nelsonlove closed this Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant