This pull request has been designated for reprocessing. Please check back in a few minutes.

[Ledgers] Implement captureLedgers on the server #37591

Open
acdlite opened 11:07am on September 11, 2026 wants to merge 601 Ξ” into facebook/react ledgers/3-write-entries from
ledgers/4-capture-server

Pull Request Overview

  • Opened on September 11, 2026
  • Status Open
  • Commit count 2 with first commit September 11, 2026

Total Delta

601 Total Diff Delta

Open Days

Open 6 weekdays

Test Delta

0 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Data pending calculation for pull request

Author avatar

[Ledgers] Implement captureLedgers on the server

Implements captureLedgers on the server. This wraps around part of the Flight rendering graph and captures its Ledger effects. Like with previous steps, decoding on the client is still not implemented; will be added in later PRs.

The previous PR already implemented most of the changes to the wire protocol, including the Y row type that represents a captureLedgers instance.

In addition to writing Ledger declarations to the response stream, we also introduce two internal, renderable types recognized by Flight:


  • A LedgerDataObject is the data field returned by captureLedgers. It is the wrapped version of the model object passed as the first argument to captureLedgers, and renders to the same data as the original object; the only difference is that it also tracks any Ledger writes that occur during rendering.

  • A LedgerTotal is an entry in the ledgers array returned by captureLedgers. It renders to a thenable that resolves to the final Ledger total, resolving only once the client stream has closed. It cannot be read on the server.

No comments have been left on this PR.