sync user own repos

This commit is contained in:
2026-09-25 20:01:28 +07:00
parent 42c1229a90
commit 333989813e
3 changed files with 53 additions and 80 deletions
+7 -8
View File
@@ -130,12 +130,12 @@ flowchart TD
announcements. Caveat: coverage depends on whether state events reach the bootstrap
relays; if a grasp server is the only holder, those repositories remain unseen.
- **B. Targeted fetch for the user's own repositories. — not implemented.**
In `sync_inbox` (`crates/signed_state/src/backend.rs` L1126-1152), where the user's
own repositories' relays are already connected, also sync `filters::state(addr)` per
own repository. This directly addresses "my repositories updated elsewhere" at low
cost. Note the existing race: `sync_inbox` reads the announcement list right after
login, which may not be loaded yet.
- **B. Targeted fetch for the user's own repositories. — implemented.**
`RepoListStore` fetches each own repository's state event from the relays that
repository announces, once the list discovers it. Driving this from the list rather
than `sync_inbox` sidesteps the login race described above: whenever the announcement
list is (re)loaded, any own repository not yet fetched is covered. The fetched-set is
cleared on `SignerChanged`, so a login or account switch re-fetches.
- **C. Reactivity fixes. — implemented.**
`Kind::RepoState` is now included in the `BackendEvent::Published` refresh condition of
@@ -144,5 +144,4 @@ flowchart TD
matching misses them — and locally published state updates by owner plus the `d`
identifier.
A + C are implemented; B remains available if own-repository freshness on fresh profiles
matters.
A + B + C are implemented.