Cotal TypeScript packages
    Preparing search index...

    Function foldManagedRows

    • Fold one ps answer into the rows held per manager instance, which is the only shape that can both DROP a despawned seat and KEEP a quiet manager's seats.

      An instance that answered has its rows replaced wholesale, so a seat it no longer lists is gone on that tick. An instance that was asked and stayed silent keeps what it last said, because a seat is not gone just because nobody could be reached to ask about it. An instance that is neither has left the registry, and its rows leave with it.

      A flat merge across instances cannot express the first of those: it can add and overwrite but never delete, so one silent registration, which can persist indefinitely when a manager's host dies without deregistering, would freeze every other manager's seats in place forever. A flat rebuild is the opposite error, emptying a quiet manager's seats off the display.

      Parameters

      • prev: Map<string, ManagedRow[]>
      • reply: { answered: { instanceId: string; rows: ManagedRow[] }[]; silent: string[] }

      Returns Map<string, ManagedRow[]>