Repository navigation
fix: keep the 200 newest errors - #47
Merged
Merged
Conversation
lxsmnsyc
marked this pull request as ready for review
November 4, 2026 04:48
Every caught error was added to the list and nothing was ever dropped, so an error thrown on each frame of a loop grew it without end. The list now keeps the 200 newest, the same limit the async history uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lxsmnsyc
force-pushed
the
fix/cap-error-list
branch
from
November 4, 2026 05:02
ceaa344 to
e99acd4
Compare
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.
What and why
Every error the toolbar caught was added to its list, and nothing was ever dropped. An error thrown on every frame of a loop grew the list, and the memory it holds, without end. A review of #45 found this.
Changes
src/dev-toolbar/error-list.ts:addError(list, error, max = 200)puts the new error first and keeps the 200 newest. 200 is the same limit asMAX_RECORDSin the async history.pushErroruses it.Proof
mainthe Errors tab counts 205. Here it counts 200 and shows the newest ("frame 205") first.error-list.test.tscover the order, the drop and the default limit.pnpm format:check,pnpm typecheck,pnpm build,pnpm testandpnpm test:e2e(24 tests) pass.Risk
Review
src/dev-toolbar/index.tsxnear the error capture, so whichever merges later needs a small rebase.🤖 Generated with Claude Code