You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: DH-23321: Persist Browser Logs to IndexedDB - #2770
❌ Patch coverage is 93.98496% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.60%. Comparing base (af8215a) to head (f2bb154).
Prune log history based on projected batch entry count
packages/log/src/LogIndexedDbHistory.ts:518
Retention is checked only once per 30 write transactions, while each transaction can contain up to 5,000 buffered entries. Starting at the 20,000-entry default, the store can reach roughly 170,000 entries before this prune runs; a quota failure during those writes disables persistence before pruning can recover it. Enforce the count bound on each batch (while keeping the more expensive quota estimate throttled), or trigger pruning from the projected entry count.
Fix stack first-line detection to preserve the actual caller
packages/log/src/LogIndexedDbHistory.ts:632
This does not reliably report the actual call site. LogHistory.formatStack checks stack[0] === 'Error' (LogHistory.ts:64), but stack[0] is one character, so an ordinary Error\n... stack always uses the wrong splice count and retains an internal console-proxy frame. Correct the helper's first-line detection and assert that persisted output contains the caller rather than the wrapper.
Await persistence before reporting eviction protection status
packages/log/src/LogIndexedDbHistory.ts:477
The persistence request is fire-and-forget, but getFormattedHistory() immediately interprets the default false as “not granted.” If persist() is still pending (for example while the browser waits on permission), an export can incorrectly report that eviction protection was denied even though it later resolves true. Track this request and await it before producing the header, or represent the pending state explicitly.
🧠 Review effort: Balanced
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
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.