Split init into separate queries and simplify tasks panel#804
Open
Split init into separate queries and simplify tasks panel#804
Conversation
2b6a923 to
0391a4b
Compare
aeccdf8 to
f93eb37
Compare
Base automatically changed from
add-startup-logs-in-task-detail-view
to
main
February 19, 2026 14:01
0391a4b to
adad103
Compare
- Replace InitResponse with separate getTasks and getTemplates queries with independent poll intervals (10s tasks, 5min templates) - Remove extension-side template cache in favor of React Query staleTime - Add resume button to TaskMessageInput for paused tasks - Reject message sends to paused tasks instead of auto-starting workspace - Extract TasksPanel component and usePersistedState hook from App - Centralize query keys in config.ts - Rename TasksPanel to TasksPanelProvider on the extension side - Add refresh bar indicator for initial load and user-triggered refresh
adad103 to
1bd2ac7
Compare
mtojek
reviewed
Feb 20, 2026
| createExpanded: createOpen, | ||
| historyExpanded: historyOpen, | ||
| }); | ||
| }, [persisted, tasks, templates, createOpen, historyOpen]); |
Member
There was a problem hiding this comment.
can you pull persisted out and just operate on save?
const { save } = persisted;
Comment on lines
+50
to
+53
| const { onShowCreateForm } = useTasksApi(); | ||
| useEffect(() => { | ||
| return onShowCreateForm(() => setCreateOpen(true)); | ||
| }, [onShowCreateForm, setCreateOpen]); |
Member
There was a problem hiding this comment.
alternative way without deps?
const api = useTasksApi();
useEffect(() => {
return api.onShowCreateForm(() => setCreateOpen(true));
}, []);
|
|
||
| useEffect(() => { | ||
| if (hasInitialData) void refreshAll(); | ||
| }, []); |
|
|
||
| return () => unsubs.forEach((fn) => fn()); | ||
| }, [api.onTasksUpdated, api.onTaskUpdated, api.onRefresh, queryClient]); | ||
| }, [api, queryClient]); |
Member
There was a problem hiding this comment.
Does it mean we recreate api on every render?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
with independent poll intervals (10s tasks, 5min templates)