Skip to content

Comments

feat: refetch actor details every 5s#4306

Open
jog1t wants to merge 1 commit into02-24-fix_missing_context_switcher_for_enginefrom
02-25-feat_refetch_actor_details_every_5s
Open

feat: refetch actor details every 5s#4306
jog1t wants to merge 1 commit into02-24-fix_missing_context_switcher_for_enginefrom
02-25-feat_refetch_actor_details_every_5s

Conversation

@jog1t
Copy link
Contributor

@jog1t jog1t commented Feb 24, 2026

Description

Added automatic refetching to actor queries by setting a 5-second refetch interval. This ensures actor data stays up-to-date by polling the server every 5 seconds when the query is active.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Contributor Author

jog1t commented Feb 24, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link

claude bot commented Feb 24, 2026

PR Review: feat: refetch actor details every 5s

Summary: Single-line change adding refetchInterval: 5000 to actorQueryOptions in the default data provider context.


Correctness

The change is correct. Since the following derived queries all spread from actorQueryOptions via ...this.actorQueryOptions(actorId), the 5-second refetch interval will propagate to all of them automatically:

  • actorDestroyedAtQueryOptions
  • actorStatusQueryOptions
  • actorStatusAdditionalInfoQueryOptions
  • actorErrorQueryOptions
  • actorGeneralQueryOptions

This is the intended behavior and consistent with how actorsListQueryOptions already overrides the base actorsQueryOptions with its own refetchInterval: 5000.


Consistency

The interval choice (5000ms) is consistent with:

  • actorsListQueryOptionsrefetchInterval: 5000
  • statusQueryOptionsrefetchInterval: 5000

The base actor list/builds queries use 2000ms, which makes sense since lists change more frequently than individual actor details.


Minor Observation (pre-existing, not introduced by this PR)

The actorQueryOptions stub silently returns {} as Rivet.Actor rather than throwing like nearly every other stub in the file:

queryFn: async () => {
  return {} as Rivet.Actor; // no throw
},

Compare to other stubs:

queryFn: async () => {
  throw new Error("Not implemented");
  // biome-ignore lint/correctness/noUnreachable: stub
  return {} as Rivet.Whatever;
},

If the default context is ever consumed without being overridden, the silent empty return could produce subtle UI bugs. Not a blocker for this PR since it's pre-existing, but worth aligning in a follow-up.


Overall

Clean, minimal change. No issues introduced. Approved.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 24, 2026

More templates

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4306

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4306

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4306

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4306

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4306

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4306

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4306

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4306

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4306

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4306

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4306

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4306

commit: 7533536

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant