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
Greptile and CodeRabbit between them found eight things, all verified against
the code before changing anything.
The renderer-recovery event reported the attempt, not the outcome. It emitted
`recovered: true` the moment the budget allowed a reload, so a reload that was
attempted and then failed still went out as a recovery. It now reports after
`loadURL` settles — true on resolve, false on reject, and false when the budget
refuses outright — so the metric describes what the user got rather than what
ADE tried.
Compaction could be skipped entirely by a payload it could not measure. When
`JSON.stringify` throws (a BigInt anywhere in the object), the fallback measured
`String(value)` — "[object Object]", 15 bytes, under every cap — so the original
unbounded payload was stored and sent untouched, which is the one case a cap
exists for. Unmeasurable is now treated as must-compact. A circular reference
never reached this path; inline-image redaction breaks the cycle first.
Compaction also ran once per subscriber. `sendChatEvent` compacted inside the
per-peer loop, so one live event serialized and binary-searched its payload
again for every peer watching that session. It is memoized against the envelope
now — once per event, no matter how many peers.
The shortened-diff matcher was unanchored, on both desktop and iOS, so a real
diff whose own changed lines quoted the notice strings — editing the compactor,
for instance — was classified as compacted and reported as zero additions and
deletions. Both now require the header at the start.
iOS measured the suspension gap on the wall clock, the same defect already fixed
on the desktop budget: a device whose clock moves backward during a long
suspension would report a short or negative gap and go on to trust a socket iOS
had already suspended. It uses `systemUptime` now. And a shortened diff no longer
draws a `-0` deletion badge through the delete-kind branch, which contradicted
the VoiceOver label beside it.
One test weakness: `bytes(undefined)` is 0, so upper-bound assertions about
`structured` passed just as happily if compaction had deleted the field instead
of bounding it. Size claims about fields that must survive now go through a
helper that also asserts a lower bound.
Regression tests: reload-rejection reporting, the unserializable payload, the
anchored matcher on both platforms, and the fenced-content case from the earlier
commit.
0 commit comments