Skip to content

The Open Standard for Generative UI

Document Inspect and Debug under Advanced, and drop the Paste sidebar link. (#1021)

AB275eb488b1d4
diff --git a/docs/app/paste/components/Banner.tsx b/docs/app/debug/components/Banner.tsx
similarity index 100%
rename from docs/app/paste/components/Banner.tsx
rename to docs/app/debug/components/Banner.tsx
diff --git a/docs/app/paste/components/EditorPane.tsx b/docs/app/debug/components/EditorPane.tsx
similarity index 100%
rename from docs/app/paste/components/EditorPane.tsx
rename to docs/app/debug/components/EditorPane.tsx
diff --git a/docs/app/paste/components/HelpDialog.tsx b/docs/app/debug/components/HelpDialog.tsx
similarity index 93%
rename from docs/app/paste/components/HelpDialog.tsx
rename to docs/app/debug/components/HelpDialog.tsx
index 23f6e8a6f..57b33ef4f 100644
--- a/docs/app/paste/components/HelpDialog.tsx
+++ b/docs/app/debug/components/HelpDialog.tsx
@@ -24,8 +24,8 @@ export function HelpDialog() {
size="small"
onClick={() => setOpen(true)}
aria-haspopup="dialog"
- aria-label="How to use paste"
- title="How to use paste"
+ aria-label="How to use Debug"
+ title="How to use Debug"
>
<HelpCircle size={16} />
</Button>
@@ -35,11 +35,11 @@ export function HelpDialog() {
className={styles.helpDialog}
role="dialog"
aria-modal="true"
- aria-label="How to use paste"
+ aria-label="How to use Debug"
onClick={(e) => e.stopPropagation()}
>
<div className={styles.helpHeader}>
- <h2>How to use Paste</h2>
+ <h2>How to use Debug</h2>
<Button
variant="tertiary"
size="small"
@@ -51,7 +51,7 @@ export function HelpDialog() {
<div className={styles.helpBody}>
<p>
- Paste is a playground for <strong>OpenUI Lang</strong>. Paste code on the left; the
+ Debug is a playground for <strong>OpenUI Lang</strong>. Put code on the left; the
panels on the right show what the parser and renderer make of it.
</p>
diff --git a/docs/app/paste/components/Playground.tsx b/docs/app/debug/components/Playground.tsx
similarity index 100%
rename from docs/app/paste/components/Playground.tsx
rename to docs/app/debug/components/Playground.tsx
diff --git a/docs/app/paste/components/RenderErrorBoundary.tsx b/docs/app/debug/components/RenderErrorBoundary.tsx
similarity index 100%
rename from docs/app/paste/components/RenderErrorBoundary.tsx
rename to docs/app/debug/components/RenderErrorBoundary.tsx
diff --git a/docs/app/paste/components/StreamControls.tsx b/docs/app/debug/components/StreamControls.tsx
similarity index 100%
rename from docs/app/paste/components/StreamControls.tsx
rename to docs/app/debug/components/StreamControls.tsx
diff --git a/docs/app/paste/components/Toasts.tsx b/docs/app/debug/components/Toasts.tsx
similarity index 100%
rename from docs/app/paste/components/Toasts.tsx
rename to docs/app/debug/components/Toasts.tsx
diff --git a/docs/app/paste/components/Toolbar.tsx b/docs/app/debug/components/Toolbar.tsx
similarity index 98%
rename from docs/app/paste/components/Toolbar.tsx
rename to docs/app/debug/components/Toolbar.tsx
index f29aaced9..69f9e87bb 100644
--- a/docs/app/paste/components/Toolbar.tsx
+++ b/docs/app/debug/components/Toolbar.tsx
@@ -23,7 +23,7 @@ import type { LoadedLangCore } from "@paste/lib/versions/types";
import { HelpDialog } from "./HelpDialog";
import { PlaybackButtons, StreamSettingsFields } from "./StreamControls";
// The docs site's own toggle (animated sun/moon, phosphor icons) — same one
-// as the homepage header, so /paste matches the rest of the site.
+// as the homepage header, so /debug matches the rest of the site.
import { ThemeToggle } from "@/components/theme-toggle";
import { VersionPicker } from "./VersionPicker";
import styles from "@paste/paste.module.css";
@@ -139,7 +139,7 @@ export function Toolbar({
<span>Back to docs</span>
</Link>
<div className={styles.topbarRight}>
- <span className={styles.toolbarLogo}>OpenUI Paste</span>
+ <span className={styles.toolbarLogo}>OpenUI Debug</span>
<ThemeToggle />
</div>
</header>
diff --git a/docs/app/paste/components/VersionPicker.tsx b/docs/app/debug/components/VersionPicker.tsx
similarity index 100%
rename from docs/app/paste/components/VersionPicker.tsx
rename to docs/app/debug/components/VersionPicker.tsx
diff --git a/docs/app/paste/components/panels/JsonPanel.tsx b/docs/app/debug/components/panels/JsonPanel.tsx
similarity index 100%
rename from docs/app/paste/components/panels/JsonPanel.tsx
rename to docs/app/debug/components/panels/JsonPanel.tsx
diff --git a/docs/app/paste/components/panels/RenderPanel.tsx b/docs/app/debug/components/panels/RenderPanel.tsx
similarity index 100%
rename from docs/app/paste/components/panels/RenderPanel.tsx
rename to docs/app/debug/components/panels/RenderPanel.tsx
diff --git a/docs/app/paste/components/panels/StreamTimeline.tsx b/docs/app/debug/components/panels/StreamTimeline.tsx
similarity index 100%
rename from docs/app/paste/components/panels/StreamTimeline.tsx
rename to docs/app/debug/components/panels/StreamTimeline.tsx
diff --git a/docs/app/paste/components/panels/TreePanel.tsx b/docs/app/debug/components/panels/TreePanel.tsx
similarity index 100%
rename from docs/app/paste/components/panels/TreePanel.tsx
rename to docs/app/debug/components/panels/TreePanel.tsx
diff --git a/docs/app/paste/components/panels/ValidationPanel.tsx b/docs/app/debug/components/panels/ValidationPanel.tsx
similarity index 97%
rename from docs/app/paste/components/panels/ValidationPanel.tsx
rename to docs/app/debug/components/panels/ValidationPanel.tsx
index 049c35c84..c545eed4c 100644
--- a/docs/app/paste/components/panels/ValidationPanel.tsx
+++ b/docs/app/debug/components/panels/ValidationPanel.tsx
@@ -27,7 +27,7 @@ export function ValidationPanel({ outcome }: { outcome: ValidationOutcome }) {
);
}
if (!result)
- return <div className={styles.panelEmpty}>Paste some OpenUI Lang code to validate it.</div>;
+ return <div className={styles.panelEmpty}>Add some OpenUI Lang to validate it.</div>;
const { meta } = result;
const groups = groupByCode(meta.errors);
diff --git a/docs/app/paste/hooks/useMediaQuery.ts b/docs/app/debug/hooks/useMediaQuery.ts
similarity index 100%
rename from docs/app/paste/hooks/useMediaQuery.ts
rename to docs/app/debug/hooks/useMediaQuery.ts
diff --git a/docs/app/paste/hooks/useValidation.ts b/docs/app/debug/hooks/useValidation.ts
similarity index 100%
rename from docs/app/paste/hooks/useValidation.ts
rename to docs/app/debug/hooks/useValidation.ts
diff --git a/docs/app/paste/hooks/useVersionList.ts b/docs/app/debug/hooks/useVersionList.ts
similarity index 100%
rename from docs/app/paste/hooks/useVersionList.ts
rename to docs/app/debug/hooks/useVersionList.ts
diff --git a/docs/app/paste/layout.tsx b/docs/app/debug/layout.tsx
similarity index 54%
rename from docs/app/paste/layout.tsx
rename to docs/app/debug/layout.tsx
index 1a4e09615..bce6746ee 100644
--- a/docs/app/paste/layout.tsx
+++ b/docs/app/debug/layout.tsx
@@ -3,11 +3,11 @@ import type { Metadata } from "next";
import type { ReactNode } from "react";
export const metadata: Metadata = {
- title: "OpenUI Paste",
+ title: "OpenUI Debug",
description:
- "Paste OpenUI Lang code, validate it against any published @openuidev/lang-core version, replay it as a simulated LLM stream, and see what renders.",
+ "Try OpenUI Lang against any published @openuidev/lang-core version, replay it as a simulated LLM stream, and see what renders.",
};
-export default function PasteLayout({ children }: { children: ReactNode }) {
+export default function DebugLayout({ children }: { children: ReactNode }) {
return <WebsiteThemeProvider>{children}</WebsiteThemeProvider>;
}
diff --git a/docs/app/paste/lib/editor/hover.ts b/docs/app/debug/lib/editor/hover.ts
similarity index 100%
rename from docs/app/paste/lib/editor/hover.ts
rename to docs/app/debug/lib/editor/hover.ts
diff --git a/docs/app/paste/lib/editor/openui-lang.ts b/docs/app/debug/lib/editor/openui-lang.ts
similarity index 100%
rename from docs/app/paste/lib/editor/openui-lang.ts
rename to docs/app/debug/lib/editor/openui-lang.ts
diff --git a/docs/app/paste/lib/examples.ts b/docs/app/debug/lib/examples.ts
similarity index 97%
rename from docs/app/paste/lib/examples.ts
rename to docs/app/debug/lib/examples.ts
index 6dfcfaaab..5a4b609ea 100644
--- a/docs/app/paste/lib/examples.ts
+++ b/docs/app/debug/lib/examples.ts
@@ -48,7 +48,7 @@ pic = Image()
label: "Kitchen sink (form + table + chart)",
code: `root = Stack([title, note, form, tbl, chart])
-title = TextContent("paste playground", "large-heavy")
+title = TextContent("debug playground", "large-heavy")
note = Callout("info", "Demo", "A form with validation, a table and a chart — rendered fully client-side.")
form = Form("contact", btns, [nameField, emailField])
nameField = FormControl("Name", Input("name", "Your name", "text", { required: true, minLength: 2 }))
diff --git a/docs/app/paste/lib/groupErrors.ts b/docs/app/debug/lib/groupErrors.ts
similarity index 100%
rename from docs/app/paste/lib/groupErrors.ts
rename to docs/app/debug/lib/groupErrors.ts
diff --git a/docs/app/paste/lib/libraries.ts b/docs/app/debug/lib/libraries.ts
similarity index 100%
rename from docs/app/paste/lib/libraries.ts
rename to docs/app/debug/lib/libraries.ts
diff --git a/docs/app/paste/lib/mockTools.ts b/docs/app/debug/lib/mockTools.ts
similarity index 96%
rename from docs/app/paste/lib/mockTools.ts
rename to docs/app/debug/lib/mockTools.ts
index f37cd7427..5179bdc01 100644
--- a/docs/app/paste/lib/mockTools.ts
+++ b/docs/app/debug/lib/mockTools.ts
@@ -5,7 +5,7 @@
*/
const CANNED_RESULT = {
status: "ok",
- note: "Mock response from the paste playground — tools are not connected.",
+ note: "Mock response from the Debug playground — tools are not connected.",
items: [
{ id: 1, label: "Alpha", value: 42 },
{ id: 2, label: "Beta", value: 17 },
diff --git a/docs/app/paste/lib/parse.ts b/docs/app/debug/lib/parse.ts
similarity index 100%
rename from docs/app/paste/lib/parse.ts
rename to docs/app/debug/lib/parse.ts
diff --git a/docs/app/paste/lib/streaming/chunker.ts b/docs/app/debug/lib/streaming/chunker.ts
similarity index 100%
rename from docs/app/paste/lib/streaming/chunker.ts
rename to docs/app/debug/lib/streaming/chunker.ts
diff --git a/docs/app/paste/lib/streaming/usePlayback.ts b/docs/app/debug/lib/streaming/usePlayback.ts
similarity index 100%
rename from docs/app/paste/lib/streaming/usePlayback.ts
rename to docs/app/debug/lib/streaming/usePlayback.ts
diff --git a/docs/app/paste/lib/versions/loader.ts b/docs/app/debug/lib/versions/loader.ts
similarity index 100%
rename from docs/app/paste/lib/versions/loader.ts
rename to docs/app/debug/lib/versions/loader.ts
diff --git a/docs/app/paste/lib/versions/registry.ts b/docs/app/debug/lib/versions/registry.ts
similarity index 100%
rename from docs/app/paste/lib/versions/registry.ts
rename to docs/app/debug/lib/versions/registry.ts
diff --git a/docs/app/paste/lib/versions/types.ts b/docs/app/debug/lib/versions/types.ts
similarity index 100%
rename from docs/app/paste/lib/versions/types.ts
rename to docs/app/debug/lib/versions/types.ts
diff --git a/docs/app/paste/page.tsx b/docs/app/debug/page.tsx
similarity index 92%
rename from docs/app/paste/page.tsx
rename to docs/app/debug/page.tsx
index 4f3d04483..998044a9a 100644
--- a/docs/app/paste/page.tsx
+++ b/docs/app/debug/page.tsx
@@ -10,6 +10,6 @@ const Playground = dynamic(() => import("./components/Playground").then((m) => m
loading: () => <div className={styles.loading}>Loading playground…</div>,
});
-export default function PastePage() {
+export default function DebugPage() {
return <Playground />;
}
diff --git a/docs/app/paste/paste.module.css b/docs/app/debug/paste.module.css
similarity index 100%
rename from docs/app/paste/paste.module.css
rename to docs/app/debug/paste.module.css
diff --git a/docs/components/site-primary-nav.tsx b/docs/components/site-primary-nav.tsx
index 327bc8254..27d25eb2d 100644
--- a/docs/components/site-primary-nav.tsx
+++ b/docs/components/site-primary-nav.tsx
@@ -108,9 +108,9 @@ export const PRIMARY_SITE_NAV_ITEMS: NavItem[] = [
},
},
{
- title: "Paste",
+ title: "Debug",
description: "Validate and stream OpenUI Lang.",
- href: "/paste",
+ href: "/debug",
preview: {
light: "/nav/paste-light.webp",
dark: "/nav/paste-dark.webp",
diff --git a/docs/content/docs/openui-lang/developer-tools.mdx b/docs/content/docs/openui-lang/developer-tools.mdx
new file mode 100644
index 000000000..1110758cd
--- /dev/null
+++ b/docs/content/docs/openui-lang/developer-tools.mdx
@@ -0,0 +1,69 @@
+---
+title: Developer Tools
+description: Use Inspect and Debug in development to watch streams, catch errors, and try OpenUI Lang against your own components.
+---
+
+OpenUI Developer Tools sit on your running app in development. They do not change production behavior. Two trays share a floating button: **Inspect** shows what the runtime is doing, and **Debug** lets you try OpenUI Lang against the same library the user sees.
+
+<img
+ src="/images/api-reference/devtools.gif"
+ alt="OpenUI DevTools drawer displaying captured events in an OpenUI app"
+ className="w-full rounded-lg border"
+/>
+
+## Installation
+
+Apps created with `@openuidev/cli` already mount the widget. If you use `@openuidev/react-lang`, it also auto-mounts in development — look for the Shiro button in the bottom-right corner.
+
+To add it to an existing app, install the package as a dev dependency:
+
+```bash tab="pnpm" tab-group="pkg"
+pnpm add -D @openuidev/devtools
+```
+
+```bash tab="bun" tab-group="pkg"
+bun add -d @openuidev/devtools
+```
+
+```bash tab="yarn" tab-group="pkg"
+yarn add -D @openuidev/devtools
+```
+
+```bash tab="npm" tab-group="pkg"
+npm install -D @openuidev/devtools
+```
+
+Then mount it once, anywhere in the tree. A manual instance replaces the auto-mounted one, so you can set the corner, theme, or other props:
+
+```tsx
+import { OpenUIDevtools } from "@openuidev/devtools";
+
+export function App() {
+ return (
+ <>
+ {/* your app */}
+ <OpenUIDevtools position="bottom-right" theme="light" />
+ </>
+ );
+}
+```
+
+The widget is omitted from production builds unless you pass `enabled`. See [`OpenUIDevtools` props](/docs/api-reference/devtools) for the full list.
+
+## Inspect
+
+Use Inspect when a stream misbehaves and you want the live record, not a guess from the console.
+
+Each OpenUI Lang render publishes events as it streams and when it settles: the response text, parser issues, errors, and timing. Inspect lists those events in the app. Expand a stream to read the Lang, copy it, or open it in Debug.
+
+The header settings control auto-open on error, an errors-only filter, and light or dark theme. Close the tray with the X or Escape; the page behind stays usable.
+
+## Debug
+
+Use Debug when you already have a response and want to see how _this app_ parses, validates, and renders it.
+
+Expand a settled stream in Inspect and click **Debug**. The editor loads that response. Render uses the `createLibrary()` instance that produced the stream, including your components and CSS. `Query()` and `Mutation()` run against mocked tools so you can iterate without hitting a backend.
+
+The other panels are for diagnosis: Validation groups parse errors, Tree and JSON show the parsed result, and Stream replays the editor chunk by chunk as if the model were still generating. Eject Debug into its own window when you need more space.
+
+[Try Debug here](/debug).
diff --git a/docs/content/docs/openui-lang/meta.json b/docs/content/docs/openui-lang/meta.json
index 955138847..c5677aa81 100644
--- a/docs/content/docs/openui-lang/meta.json
+++ b/docs/content/docs/openui-lang/meta.json
@@ -18,12 +18,12 @@
"incremental-editing",
"builtins",
"patterns",
- "external:[Paste](/paste)",
"---Language Specification---",
"specification-v01",
"specification-v05",
"evolution-guide",
"---Advanced---",
+ "developer-tools",
"benchmarks",
"troubleshooting",
"telemetry",
diff --git a/docs/next.config.mjs b/docs/next.config.mjs
index 658ad90df..d0a80d129 100644
--- a/docs/next.config.mjs
+++ b/docs/next.config.mjs
@@ -76,6 +76,12 @@ const config = {
},
// Nav rename: Playground -> Demos, Projects -> Lab. Keep the old
// paths working for external links and search results.
+ // Product rename: Paste → Debug. Keep the old path working.
+ {
+ source: "/paste",
+ destination: "/debug",
+ permanent: true,
+ },
{
source: "/playground",
destination: "/demos",
diff --git a/docs/public/images/api-reference/devtools.gif b/docs/public/images/api-reference/devtools.gif
index 38948276a..2d1255fcd 100644
Binary files a/docs/public/images/api-reference/devtools.gif and b/docs/public/images/api-reference/devtools.gif differ
diff --git a/docs/tsconfig.json b/docs/tsconfig.json
index 95cfd3874..b4cc3cb66 100644
--- a/docs/tsconfig.json
+++ b/docs/tsconfig.json
@@ -33,7 +33,7 @@
".source/*"
],
"@paste/*": [
- "./app/paste/*"
+ "./app/debug/*"
]
},
"plugins": [