You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reconcile member viewport selected before Discord READY after metadata arrives #43
A member viewport selected before Discord's initial READY can remain unsubscribed after the connection succeeds. A standalone real-daemon test against a local fake Discord Gateway reproduces this ordering defect without the GUI or a real account.
Start chatd with a synthetic account and delay the Gateway READY response by 1.5 seconds after identify.
After identify, but before READY, send Watch selecting a known fixture server/channel with members: [0, 50].
Allow READY to deliver the server/channel metadata and wait for Link::Connected.
Query Members and inspect outgoing subscription frames.
Observed: Members returns an immediate pending snapshot, but no subscription for the selected channel is delivered in the following 500 ms. The local regression member_viewport_selected_before_ready_is_subscribed_after_connect fails in 2.02 seconds overall. The 500 ms observation window is not a measurement of eventual recovery.
Code path in crates/chatd/src/adapters/discord/:
members.rs::watch records Watched.seen before resolving the conversation/server against available metadata.
With metadata absent, the desired live list cannot be established.
ready.rs::ready calls sync_subscription using that unresolved state, without reevaluating the stored Watch.
Later identical Watches are skipped by the equality check, so ordinary cache polling does not resolve this ordering error.
Expected: after READY installs metadata, reconcile the latest desired Watch against that metadata and subscribe the selected member window. Preserve ordering if navigation changes again while connecting. A member-cache miss should not be mistaken for an empty roster.
The controlled test establishes this startup failure path. It does not prove that every previously observed intermittent blank member pane has the same cause. Reconnect with RESUMED has a related but separate queue-loss reproduction in #42.
The reproducer and delayed-READY fixture support currently exist locally, not in #40. They can become a normal regression test with the fix. Other audit results: 133 daemon unit tests and 31 Discord integration tests passed; cached member IPC p99 was below 0.7 ms. This is a state-reconciliation problem rather than slow cache access.
Activity
fix: subscribe the Discord member viewport a Watch chose before READY (…
fix: answer Discord members asked before READY as pending, not unsupp…