Skip to content

CRATIS-UI-1003 logs a console error for every slot outside an adapter's documented profile #234

Description

@cratis-stagehand

With @cratis/components.primereact selected as library, the browser console fills with errors like:

[CRATIS-UI-1003] Renderer resolution requested Core fallback for slot 'dialogs.dialog'.
Remedy: Provide a supported 'dialogs.dialog' renderer declaration or intentionally retain the Core fallback.

unstable_useSlot reports a strictProfileFallback diagnostic whenever a slot resolves to Core while any library layer is mounted (renderer/RendererContext.js), and unstable_logDiagnostic emits it through console.error.

Why that reads as a defect

The adapter documents itself as a nine-slot profile, and the migration guide is explicit that Core keeps Dialog, Dropdown, DatePicker, paginator and table regardless of which adapter is installed. So Core fallback for dialogs.dialog is not a misconfiguration — it is the documented, only-possible outcome of installing the adapter. Reporting it at error severity means an application that has done exactly what the docs say ships a console full of errors, which trains people to ignore the console and buries the diagnostics that are actionable.

The remedy text offers "or intentionally retain the Core fallback" as an alternative, but there is no way to express that intent: rendererFallback: 'core' is already the default and does not silence it, and libraryMode: 'degrade' only affects library-validation diagnostics, not slot fallbacks.

Suggested direction

State the problem rather than the fix, but some options: only report a fallback for slots the selected library claims in profileSlots and stay quiet for slots outside the profile; or lower out-of-profile fallbacks to console.debug/info; or add a way to acknowledge the expected Core set once at the provider.

Found while migrating Cratis/Stagehand to Components 4 with the PrimeReact 11 adapter (Cratis/Stagehand#356).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions