Repository navigation
Show and tell: one shared task-status fetch without sharing it across viewers #12673
Unanswered
jiangxingfan1-coder
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Two parts of an app can display the same background task. One query key is useful while the viewer stays the same, but a key made of just the run ID can carry a fresh result across an account switch.
I built a small runnable Query Core example against Open Agent API, our self-hosted coding-agent gateway. The key is
['run-status', viewerScope, runId], whereviewerScopecomes from trusted session state and is not a credential. Server-side authorization still decides whether the viewer may read the task.In a local test with Query Core 5.108.2:
The example covers Query Core and the gateway, not an auth UI or SSR. When account switching is common, do you prefer replacing the browser QueryClient up front or cancelling and removing only the old scope?
All reactions