Skip to content

Documentation / @etherfold/browser / sameProgress

Function: sameProgress() ​

sameProgress(a, b): boolean

Defined in: packages/browser/src/host/envelope.ts:854

WHETHER TWO REPORTS SAY THE SAME THING, which is how a push that carries no news is suppressed.

Field by field rather than by serialising both, because the equality is the one this decides on: failure is compared on what a tab acts on (its name and its message) and never on the host's stack, which is a string the same failure can spell differently and which nothing renders.

It lives HERE, beside the type it is about, rather than beside the push that first needed it: BOTH transports that carry a report suppress a repeat with it -- the host's push over the port, and the cross-tab channel a reader is told on -- and "the same report" has to mean one thing in both. Keeping it in cases.ts would also have tied a tab that holds NO host, and imports only openStateMovedAcrossTabs, to the module that serves every case.

Parameters ​

a ​

HostProgress

b ​

HostProgress

Returns ​

boolean