Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Ucbepic Docetl NamespaceDialog

From Leeroopedia
Revision as of 17:01, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Ucbepic_Docetl_NamespaceDialog.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Knowledge Sources
Domains Frontend, React_UI
Last Updated 2026-02-08 00:00 GMT

Overview

Concrete tool for the namespace configuration dialog used to set the user's workspace namespace in the DocETL playground.

Description

The NamespaceDialog provides a form for entering or generating a namespace identifier that isolates the user's pipeline data and files on the backend. It includes a random namespace generator that combines adjectives and nouns (e.g., "swift-eagle-a3b2c1d4"), namespace validation via the /api/checkNamespace endpoint, a warning when an existing namespace is detected with data, and a shake animation on validation errors. The namespace is used to organize files and pipeline configurations on the server.

Usage

Opened when the user first visits the playground or wants to change their workspace namespace. Required before uploading datasets or running pipelines.

Code Reference

Source Location

Signature

interface NamespaceDialogProps {
  open: boolean;
  onOpenChange: (open: boolean) => void;
  currentNamespace: string | null;
  onSave: (namespace: string) => void;
}

export function NamespaceDialog({ open, onOpenChange, currentNamespace, onSave }: NamespaceDialogProps): JSX.Element

Import

import { NamespaceDialog } from "@/components/NamespaceDialog";

I/O Contract

Inputs (Props)

Name Type Required Description
open boolean Yes Whether the dialog is visible
onOpenChange (open: boolean) => void Yes Toggle dialog visibility
currentNamespace string or null Yes Current namespace value
onSave (namespace: string) => void Yes Callback with the saved namespace

Outputs

Name Type Description
rendered JSX.Element Namespace input dialog with random generation

Usage Examples

<NamespaceDialog
  open={showNamespace}
  onOpenChange={setShowNamespace}
  currentNamespace={namespace}
  onSave={(ns) => setNamespace(ns)}
/>

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment