Skip to content

Toast a status note only for a block the front-end holds eager - #372

Closed
nbenn wants to merge 1 commit into
mainfrom
370-offscreen-toasts
Closed

nbenn wants to merge 1 commit into
mainfrom
370-offscreen-toasts

Conversation

@nbenn

@nbenn nbenn commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Since Report a parked block's last check and return its result #364 the check that finds a block unable to run records its status-phase note, whatever asked for the check: an evaluate request, a downstream read of the block as input, or "Evaluate blocks" in the code modal. The notify_user() plugin toasted every such warning with no duration, so a block nobody was looking at raised a toast that stayed until the block was fixed.
  • The plugin now toasts a status-phase note only for a block the front-end holds eager, the test Render a block when the front-end claims it, not when visible reports it painted #366 moves rendering onto, or for any block on a board no front-end gates. The note is still recorded by every check, for the status badge and the assistant, and conditions from other phases, such as a failed block's error, toast as before.
  • The plugin receives board but not which owner is the front-end, so the board now carries the front-end's eager set as a front_end_eager reactive, TRUE on an ungated board. A block's notification observer reads it only while the block carries a status note, so a change to the eager sets re-runs only those observers.
  • On core's own stacked board, "Evaluate blocks" with unconfigured blocks in a collapsed stack now toasts only those in the open stack. Expanding the stack brings the others' toasts up, and collapsing it removes them again.

Fixes #370

A check records why a block cannot run whatever asked for it, so an
evaluate request or a downstream read raised a lasting toast for a block
nobody is looking at. The board exposes the front-end's eager set, TRUE
on an ungated board, for the plugin to test such a note against.
@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
R/block-server.R 96.68% <ø> (ø)
R/board-server.R 97.68% <100.00%> (+<0.01%) ⬆️
R/plugin-notification.R 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nbenn

nbenn commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Closing without merging. Which blocks are on screen is for the front-end to know, so a filter on toasts belongs in the front-end's own notification plugin rather than in a board field that reads vis$gate. Core's own plugin stays as it is.

@nbenn nbenn closed this Sep 30, 2026
@nbenn
nbenn deleted the 370-offscreen-toasts branch September 30, 2026 14:34
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.

Waiting and unset notes now toast for blocks that are not on screen

1 participant