Fix design systems stuck showing "Indexing" status - #5529
liamdebeasi wants to merge 1 commit into
Conversation
|
Here's a visual recap of what changed: Open the full interactive recap |
0cb2f29 to
5c3effd
Compare
There was a problem hiding this comment.
Builder reviewed your changes and found 5 potential issues 🔴
Review Details
Code Review Summary — Incremental Update
The latest revision takes a different approach: it removes the shared indexing-status model, list-action status field, picker filtering, polling, and server-side readiness checks. That broad removal does eliminate the previous validation-field mismatch, but it introduces compile failures and removes the only authoritative guard preventing incomplete Builder proxies from being attached to decks.
Key Findings
🔴 HIGH: Multiple deleted helpers/refs are still referenced, so the Slides app does not type-check.
🔴 HIGH: create-deck and apply-design-system now accept indexing, failed, or malformed Builder systems because readiness validation was removed at the action boundary.
🟡 MEDIUM: The picker now exposes every Builder proxy as enabled, and the existing hook test still expects polling that was deleted.
The change is not safe to merge until the stale references are removed or restored and an equivalent live usability/readiness check is retained at action boundaries. Browser testing is deferred because the current branch has confirmed compile/test failures.
🧪 Browser testing: Blocked by compile/test failures; skipped
| referenceDeckAutoRef.current = true; | ||
| setSelectedDesignSystemId(null); | ||
| setSelectedDesignSystemId(defaultDesignSystemId); | ||
| setSelectedReferenceDeckId(defaultReferenceDeckId); |
There was a problem hiding this comment.
🔴 Removing the auto-selection refs leaves undefined identifiers
The declarations for designSystemAutoRef and referenceDeckAutoRef are removed, but applyImportedReference and chooseSource still assign to both refs. This leaves unresolved identifiers and prevents the Slides app from compiling; retain the refs or remove every remaining use.
| isDesignSystemSelectable, | ||
| resolveSelectableDesignSystemId, | ||
| } from "@/lib/design-system-selection"; | ||
| import { |
There was a problem hiding this comment.
🔴 Remove the remaining call to the deleted selection resolver
The import for resolveSelectableDesignSystemId was removed, but the component still calls it when computing the effective default design system. This is an unresolved identifier and fails the Slides type check; update the call consistently or restore the helper/import.
| let resolvedDesignSystemId = designSystemId; | ||
| if (resolvedDesignSystemId) { | ||
| const designSystemAccess = await assertAccess( | ||
| "design-system", | ||
| resolvedDesignSystemId, | ||
| "viewer", | ||
| ); | ||
| assertDesignSystemReady( | ||
| resolvedDesignSystemId, | ||
| designSystemAccess.resource.data, | ||
| ); | ||
| await assertAccess("design-system", resolvedDesignSystemId, "viewer"); |
There was a problem hiding this comment.
🔴 create-deck accepts unusable Builder systems
The explicit and implicit-default paths now call only assertAccess, so a Builder proxy that is still indexing, failed, or malformed can be persisted on a deck. Restore an authoritative readiness/usability check before writing the design-system id, including a safe fallback for an unusable workspace default.
| { statusCode: 409 }, | ||
| ); | ||
| } | ||
| await assertAccess("design-system", designSystemId, "viewer"); |
There was a problem hiding this comment.
🔴 apply-design-system now links unusable Builder systems
Removing the indexing-status guard leaves access control as the only check before linking a design system. Agents can now attach an indexing, failed, or malformed Builder proxy to an existing deck; retain an equivalent authoritative usability check before updating the deck.
| </SelectItem> | ||
| ); | ||
| })} | ||
| {designSystems.map((designSystem) => ( |
There was a problem hiding this comment.
🟡 Reference picker offers Builder systems with no usable data
Every persisted design-system row is now enabled and the continue path no longer checks readiness. Builder proxies can still be in progress or failed, so users can select and submit a system with no usable tokens/components. Preserve a readiness signal/filter or validate before allowing Continue.

The status field on design systems is known to be a bit buggy, and we are trying to avoid relying on it. Currently, we are which means many design systems show up as indexing even though they aren't.
To avoid this, this PR now looks at the published doc count to determine if a DS is still indexing or not.
Reverts #4990 and re-implements.
To clone this PR locally use the Github CLI with command
gh pr checkout 5529You can tag me at @BuilderIO for anything you want me to fix or change