mirror of
https://github.com/hansjone/netx.git
synced 2026-10-11 01:43:21 +08:00
Fix empty topology create-root and cut navigation loading flash.
Keep the hidden system root built-in; speed tree bootstrap, unblock new-root UI, and soften query/Suspense refetch jank. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
c4911b6ddc
commit
990798987b
8 changed files with 246 additions and 61 deletions
|
|
@ -25,8 +25,10 @@ export function AppLayout({ children }: Props) {
|
|||
queryKey: ["opsTasks"],
|
||||
queryFn: fetchOpsTasks,
|
||||
enabled: Boolean(user),
|
||||
refetchInterval: 4000,
|
||||
staleTime: 1500,
|
||||
// Idle installs: poll slowly; speed up only while tasks are active.
|
||||
refetchInterval: (q) => ((q.state.data?.active ?? 0) > 0 ? 4000 : 20_000),
|
||||
staleTime: 10_000,
|
||||
refetchOnWindowFocus: false,
|
||||
});
|
||||
const activeTasks = opsTasksQuery.data?.active ?? 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue