Repository navigation
fix(web): keep loading states on the widget that is loading - #8002
Merged
Merged
Conversation
Relative time expressions resolved against a fresh Date on every render, so any navigation (each search keystroke) changed the audit logs query key and re-suspended the whole dashboard, dropping the search input's focus. Pin "now" per picked range, give the audit table its own boundary, and defer the connection filter's search term.
Thread rows and search avatars, the composer's tools popover, the next-action chip and the tab bar's dev-server client all suspended above the whole ChatLayout for data that is optional or only needed later. Read them without suspending (useMCPClientNonBlocking gains an enabled flag), drop the now-unused useMCPClientOptional, and warm the counterpart agent before the Develop/Live flip navigates.
The connection page followed siblings[0], which reorders on every toggle or
save, so the whole page re-suspended on a new client; pin the primary
connection. App previews, the role editor's MCP tab and the binding
selector get their own boundaries or non-blocking reads, and switching a
tool's instance runs in a transition. The tool-set selector now caches
connection items in the { item } shape useConnection reads.
The automation Runs tab and list rows no longer suspend the whole automation page, and the reports companion cards stay on screen while queries keyed on a changed schema or saved state load.
decocms Bot
pushed a commit
that referenced
this pull request
Oct 15, 2026
PR: #8002 fix(web): keep loading states on the widget that is loading Bump type: patch - decocms (apps/api/package.json): 4.488.12 -> 4.488.13 - @decocms/native (apps/native/package.json): 4.488.12 -> 4.488.13 - @decocms/ui (packages/ui/package.json): 1.23.0 -> 1.23.1 Deploy-Scope: web
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.
What is this contribution about?
Follow-up to #7995. An audit of every suspending read (
useSuspenseQuery,use(), suspense SDK hooks, lazy components) against its nearest boundary turned up more places where a user action makes a small piece of UI suspend and a boundary far above it blanks a whole page, panel, or both chat and main panels. Each fix puts the loading state on the part that is actually waiting, or removes the wait when the data is optional.Monitoring
now-24h…now) were resolved against a freshDateon every render. Each navigation, including every keystroke in the search box, produced a new audit logs query key and re-suspended the dashboard; the search input lost focus mid-typing.expressionToDatenow takes an optionalnow, and the dashboard pins it per picked range.Chat layout (these escaped to the boundary around the whole
ChatLayout, blanking both panels)useVirtualMCPNonBlocking. Opening the menu, loading more, or typing a search no longer blanks the layout.useMCPClientNonBlockingtakes anenabledflag;useMCPClientOptionalhad no callers left and is removed.prefetchVirtualMCP) in parallel with the thread create, so the flip doesn't land on a session-wide fallback.Connections and settings
siblings[0], which is ordered byupdated_at, so enabling, disabling or saving an instance swapped the page onto another client and re-suspended all of it. The primary connection is now pinned once picked.useConnectionNonBlocking, so inline-installing a connection doesn't blank the form.useConnectionreads as{ item }. It now uses the sharedcollectionItemQueryOptions.Automations and reports
Checked and left alone: route changes (sidebar, settings navigation) already show the loader only in the page area, and most dialogs, popovers and message parts already have their own boundaries.
How did you verify your code works?
bun run verify: 11000 pass, 0 fail.bun run checkpasses.MutationObserverlogging every[data-testid=panel-loading](position and size) and skeleton:mainthe content was replaced by skeletons anddocument.activeElementbecameBODYafter typing. With this branch, no loader appears and focus stays in the input.Screenshots/Demonstration
No screenshots: the defects are brief fallbacks and focus loss, which a still image doesn't show. The observer results above are the evidence.
How to Test
Review Checklist
Summary by cubic
Stops user-triggered suspense fallbacks from blanking whole pages and panels by placing loading states on the exact widget that's waiting, or deferring optional reads that don't need to block. Typing in the monitoring audit search previously re-suspended the dashboard and dropped focus, toggling or saving a connection swapped the page to a different client, and optional chat reads blanked the entire layout.
Loading states scoped to the waiting UI
siblings[0], app previews have their own skeletons, tool instance switches run in a transition, and the role editor's MCP tab and binding selector have scoped fallbacks.Hook and cache changes
useMCPClientNonBlockinggained anenabledflag;useMCPClientOptionalwas removed as unused.{ item }cache shapeuseConnectionreads.Written for commit b7856b0. Summary will update on new commits.