Add reactive agents timeline query#4347
Conversation
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Use a fine-grained timeline query for the agents UI so streamed run items update through TanStack DB instead of rematerializing the whole chat timeline. Co-authored-by: Cursor <cursoragent@cursor.com>
Rely on TanStack DB's virtual $synced prop instead of carrying a custom _optimistic field through inbox rows. Co-authored-by: Cursor <cursoragent@cursor.com>
Use the timeline order token for pending local inbox rows so optimistic timeline ordering no longer depends on the legacy _seq field. Co-authored-by: Cursor <cursoragent@cursor.com>
Bridge the first pending queued message into the timeline while there is no active run so it does not briefly appear in the pending drawer. Co-authored-by: Cursor <cursoragent@cursor.com>
Document the multi-source row structure and live child collections returned by createEntityTimelineQuery. Co-authored-by: Cursor <cursoragent@cursor.com>
Pin the chat timeline on content resize while near the bottom and force a final bottom scroll when a streaming run completes. Co-authored-by: Cursor <cursoragent@cursor.com>
Mark the agents runtime and server UI for a patch release because the timeline query now uses fine-grained TanStack DB reactivity. Co-authored-by: Cursor <cursoragent@cursor.com>
78078c2 to
065f4fc
Compare
❌ 4 Tests Failed:
View the full list of 4 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
|
Overall I think this is the right approach. Moving the agents timeline from the aggregate A few concrete things I noticed / would double-check: 1. Synthetic pending row
|
Summary
createEntityTimelineQuery, a multi-source TanStack DB timeline query for agent streams.@electric-ax/agents-runtimeand@electric-ax/agents-server-ui.Dependencies
This PR depends on TanStack DB support from:
Test plan
pnpm --filter @electric-ax/agents-runtime typecheckpnpm --filter @electric-ax/agents-runtime buildpnpm --filter @electric-ax/agents-server-ui typecheckMade with Cursor