Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
adbf841 to
3d6ab38
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines frontend error-toasting behavior so cell error toasts only appear in app/run (“read”) mode (avoiding duplicate/noisy error surfacing in edit mode), and adds regression tests around both the toast gating and editor syncing during document transactions.
Changes:
- Gate internal/exception error toast emission in
getCellLogsForMessageto app (“read”) mode only. - Add unit tests asserting toast behavior across read/edit/unset initial mode and “toast only once” semantics.
- Add reducer/editor integration tests ensuring
set-codetransactions imperatively sync the mounted CodeMirror editor document.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| frontend/src/core/cells/logs.ts | Restricts error toast emission to read mode using initial app mode. |
| frontend/src/core/cells/tests/logs.test.ts | Adds targeted tests for toast gating and once-per-session behavior. |
| frontend/src/core/cells/tests/apply-transaction.test.ts | Adds regression coverage for set-code syncing into mounted editor views. |
dmadisetti
reviewed
Apr 15, 2026
| // the cell UI, so toasting there would be noisy and duplicative. Read the | ||
| // atom directly so an unset initial mode (e.g. in tests/islands) simply | ||
| // returns undefined instead of throwing and masking real errors. | ||
| const isAppMode = store.get(initialModeAtom) === "read"; |
Collaborator
There was a problem hiding this comment.
Fair, this was a little annoying
dmadisetti
approved these changes
Apr 15, 2026
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.
Previously we were toasting on all internal errors. When only this should be happening in run mode. Also this skips it for the scratch pad (which i saw when used by code_mode)