Summary#
AppView currently does not subscribe to or ingest sh.tangled.repo.pull.status records. This leaves protocol-level pull request state records invisible to the web UI and can make AppView show stale state.
Reproduction / evidence#
For onev.cat/tang PR #2:
- Pull record:
at://did:plc:kl2ejrmz5zmxnno3ll4luz76/sh.tangled.repo.pull/3mkuuamwfj322 - Status record on the author's PDS:
at://did:plc:kl2ejrmz5zmxnno3ll4luz76/sh.tangled.repo.pull.status/3mkuuaumwkn2j - Status value:
sh.tangled.repo.pull.status.merged - AppView page still renders the PR as open:
https://tangled.org/onev.cat/tang/pulls/2/round/0
The same issue affects clients that write pull status records through ATProto: the record exists on the PDS and can be discovered by protocol-aware clients, but AppView does not reflect it.
Likely cause#
In appview/state/state.go, the Jetstream subscription list includes sh.tangled.repo.pull but not sh.tangled.repo.pull.status.
In appview/ingester.go, the commit dispatch handles tangled.RepoPullNSID, issues, comments, labels, etc., but has no tangled.RepoPullStatusNSID case.
The web UI close/reopen/merge paths appear to update the AppView database directly via db.ClosePulls, db.ReopenPulls, and db.MergePulls, which means AppView DB state and ATProto status records can diverge.
Expected behavior#
AppView should ingest sh.tangled.repo.pull.status records and update the corresponding pull state (open, closed, merged) in its indexed database, or otherwise define a single canonical source of truth for PR state.
Related context: #462 and #356.