Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Tier 3 (#2901): unregistered PageComponentType values, and the ai:chat_window palette trap #2943

Closed

Description

@os-zhuang

From the #2901 audit (doc).

This tier fails loudly — SchemaRenderer.tsx:365 renders a red role="alert" panel naming the missing type and dumping the schema JSON. That makes it materially cheaper to triage than Tier 1/2: it cannot hide. Filed separately for exactly that reason.

PageComponentType — 24 of 34 registered

Dispatch is a flat Map with exact-key lookup (core/src/registry/Registry.ts:288) — no prefix stripping, so nav:menu will never fall back to a registered navigation-menu.

Hard gaps (no renderer, no placeholder): ai:chat_window, element:filter, element:form.

Soft gaps (dashed placeholder, but only in hosts that call registerPlaceholders() — today just apps/console/src/main.tsx:166; every other host of @object-ui/components gets the red box): app:launcher, nav:menu, nav:breadcrumb, global:search, global:notifications, user:profile, ai:suggestion.

The trap worth fixing first

ai:chat_window is offered by the Studio page palette with a config panel — app-shell/src/views/metadata-admin/previews/block-types.ts:116 (label "AI chat window", Bot icon) and block-config.ts:352. It has no renderer, and components/src/renderers/placeholders.tsx:97 documents a deliberate decision to exclude it so it produces "a loud Unknown component type".

The reasoning is sound in isolation. The palette was never told. An author drags a block Studio offers and gets a red error box.

Either prune it from block-types.ts/block-config.ts, or ship the renderer.

Dashboard chart dispatch

Renderer Missing from ChartTypeSchema (19)
plugin-dashboard/src/DashboardRenderer.tsx:131 gauge, solid-gauge, kpi, bullet
plugin-dashboard/src/DashboardGridLayout.tsx:173 8 types

Note DatasetWidget.tsx:136 covers 19 of 19, and DashboardRenderer.tsx:140 already defines METRIC_LIKE_TYPES = ['gauge','solid-gauge','kpi','bullet'] with a docstring saying they "render as a metric card rather than a chart" — then consults it only to pick a grid span. The renderer sizes the tile correctly and never routes the widget. The knowledge is already there; it just isn't wired to dispatch.

Guard

block-config.test.ts:26 looks like a coverage gate but asserts palette exclusions by hand rather than deriving inclusion from PageComponentType — so it locks the drift in instead of detecting it. Invert it.

Refs #2901

Activity

  1. self-assigned this
    on Jul 30, 2026
  2. os-zhuang commented on Jul 30, 2026

    @os-zhuang
    ContributorAuthor

    Picking this up now (following #2993 Tier 1 and #3008 Tier 2).

    One note on sequencing: #3008 made the dashboard-chart row cheaper than filed. AdvancedChartImpl now renders the single-value families (gauge/solid-gauge/metric/kpi/bullet) as a number card instead of an empty bar shell, so DashboardRenderer needs its dispatch routed — not a new renderer. The METRIC_LIKE_TYPES constant this issue points at is exactly the right table for it.

    Planned scope: route metric-like dispatch in DashboardRenderer + DashboardGridLayout, resolve the ai:chat_window palette/renderer contradiction (leaning prune, per the audit), triage the PageComponentType hard/soft gaps, and invert block-config.test.ts to derive inclusion from PageComponentType instead of hand-asserting exclusions.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions