Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/site/app/components/InteractiveDemo.tsx
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
'use client';

import React, { useMemo } from 'react';
import { SchemaRenderer, SchemaRendererContext } from '@object-ui/react';
import { SchemaRenderer, SchemaRendererContext, toRenderableSchema } from '@object-ui/react';
import { SidebarProvider } from '@object-ui/components';
// Registers `page-header` & friends — see the module header (objectui#3787).
import './registerLayoutBlocks';
Expand DownExpand Up@@ -71,7 +71,7 @@ export function InteractiveDemo({
<DemoProvider>
<SidebarProvider className="min-h-0 w-full" defaultOpen={false}>
<div className="w-full">
<SchemaRenderer schema={example.schema} />
<SchemaRenderer schema={toRenderableSchema(example.schema)} />
</div>
</SidebarProvider>
</DemoProvider>
Expand DownExpand Up@@ -116,7 +116,7 @@ export function InteractiveDemo({
<DemoProvider>
<SidebarProvider className="min-h-0 w-full" defaultOpen={false}>
<div className="w-full">
<SchemaRenderer schema={schema} />
<SchemaRenderer schema={toRenderableSchema(schema)} />
</div>
</SidebarProvider>
</DemoProvider>
Expand Down
4 changes: 2 additions & 2 deletions apps/site/app/components/LiveSplitDemo.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,7 @@ import React, {
useRef,
useState,
} from 'react';
import { SchemaRenderer, SchemaRendererContext } from '@object-ui/react';
import { SchemaRenderer, SchemaRendererContext, toRenderableSchema } from '@object-ui/react';
import { SidebarProvider } from '@object-ui/components';
import type { SchemaNode } from '@object-ui/core';
import {
Expand DownExpand Up@@ -283,7 +283,7 @@ export function LiveSplitDemo({
defaultOpen={false}
>
<div className="w-full">
<SchemaRenderer schema={lastValidSchema} />
<SchemaRenderer schema={toRenderableSchema(lastValidSchema)} />
</div>
</SidebarProvider>
</SchemaRendererContext.Provider>
Expand Down
4 changes: 2 additions & 2 deletions apps/site/app/components/SchemaThumbnail.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ import React, {
useRef,
useState,
} from 'react';
import { SchemaRenderer, SchemaRendererContext } from '@object-ui/react';
import { SchemaRenderer, SchemaRendererContext, toRenderableSchema } from '@object-ui/react';
import { SidebarProvider } from '@object-ui/components';
import type { SchemaNode } from '@object-ui/core';
// Registers `page-header` & friends — see the module header (objectui#3787).
Expand DownExpand Up@@ -135,7 +135,7 @@ export function SchemaThumbnail({
<SchemaRendererContext.Provider value={ctx}>
<SidebarProvider className="min-h-0 w-full" defaultOpen={false}>
<div className="w-full p-4">
<SchemaRenderer schema={schema} />
<SchemaRenderer schema={toRenderableSchema(schema)} />
</div>
</SidebarProvider>
</SchemaRendererContext.Provider>
Expand Down
4 changes: 2 additions & 2 deletions apps/site/app/playground/page.tsx
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
'use client';

import React, { useState, useEffect } from 'react';
import { SchemaRenderer } from '@object-ui/react';
import { SchemaRenderer, toRenderableSchema } from '@object-ui/react';
import type { SchemaNode } from '@object-ui/core';
import dynamic from 'next/dynamic';
import { ObjectUIProvider } from '@/app/components/ObjectUIProvider';
Expand DownExpand Up@@ -1410,7 +1410,7 @@ export default function PlaygroundPage() {
viewMode === 'mobile' ? 'min-h-[667px]' : viewMode === 'tablet' ? 'min-h-[600px]' : ''
}`}>
<div className="p-6">
<SchemaRenderer schema={schema} />
<SchemaRenderer schema={toRenderableSchema(schema)} />
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/site/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@
"lint": "eslint .",
"dev": "next dev",
"start": "next start",
"types:check": "fumadocs-mdx && next typegen && tsc --noEmit",
"type-check": "fumadocs-mdx && next typegen && tsc --noEmit",
"postinstall": "fumadocs-mdx"
},
"dependencies": {
Expand Down
30 changes: 19 additions & 11 deletions scripts/check-type-check-coverage.mjs
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,17 +90,25 @@ export const NOT_COMPILED = ["@object-ui/example-hello-world"];
//
// That escape hatch is exactly how this exemption could rot, so it is verified
// on every run rather than trusted: setting `ignoreBuildErrors` fails the guard.
export const CHECKED_BY_OWN_BUILD = {
"@object-ui/site": {
build: "next build",
// Caveat worth knowing: the `docs` CI job runs this build only when
// `apps/site/` or `content/` changed (plus every push to main). A PR that
// only touches a workspace package in `transpilePackages` therefore does
// not re-check the site until it lands. Closing that would mean paying a
// Next build on many more PRs — a cost/coverage call, not a silent gap.
verifyNoIgnoreBuildErrors: "apps/site/next.config.mjs",
},
};
//
// Empty since objectui#4617, and worth keeping that way. Its sole entry was
// `@object-ui/site`, and the caveat that entry carried — "the `docs` CI job runs
// this build only when `apps/site/` or `content/` changed", so a PR touching only
// a `transpilePackages` workspace package "does not re-check the site until it
// lands" — turned out to describe a live main-red, not a tolerable cost/coverage
// call. PR #4608 widened `SchemaNode` to a union, touched no file under
// `apps/site/`, and merged green; the site's five `SchemaRenderer` call sites
// stopped compiling the moment it landed and `Build Docs` was red on every push
// to `main` for the next ~5 hours. The exemption was honest about WHAT checked
// the package and silent about WHEN, and "when" was the half that mattered.
//
// The site now carries a real `type-check` script, so it is audited by the same
// ratchet as every other package and the `Type Check` job reaches it on every PR.
// `verifyNoIgnoreBuildErrors` retires with the entry rather than being orphaned:
// its whole job was protecting a coverage claim that rested on `next build`, and
// coverage no longer rests there — `tsc --noEmit` runs directly, so setting
// `ignoreBuildErrors` can no longer hide a type error from CI.
export const CHECKED_BY_OWN_BUILD = {};

// ── Known gaps: tests that nothing type-checks ───────────────────────────────
// Packages whose tests do not compile yet, so they cannot chain a
Expand Down
Loading