Implementation:AIScientists Dev WorldSeed GazetteView frontend
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Frontend, UI |
| Last Updated | 2026-10-26 18:00 GMT |
Overview
Concrete React + Zustand frontend components for displaying generated gazette content as a newspaper-style UI, with generation popover, store-driven state management, and i18n support.
Description
The gazette frontend consists of three main pieces:
- GazetteView (`GazetteView.tsx`, 281 lines): Renders the newspaper layout with edition_title, breaking_banner, lead_story, secondary_stories, editorials, ticker bar, and pull_quote. Uses shadcn/ui components and lucide-react icons.
- GazettePopover (`GazettePopover.tsx`, 194 lines): Generation trigger UI with model selection, generate button, and loading state.
- useGazetteStore (`stores/gazette.ts`, 175 lines): Zustand store managing `runId`, `gazettes` list, `current` gazette, `loading` state, and `error`. Provides actions to fetch, generate, and select gazettes via the API client.
Usage
These components are mounted in the dashboard route and driven by the Zustand store. No direct import needed for normal usage.
Code Reference
Source Location
- Repository: WorldSeed
- Files:
- frontend/src/components/gazette/GazetteView.tsx
- frontend/src/components/gazette/GazettePopover.tsx
- frontend/src/stores/gazette.ts
Import
import { GazetteView } from "@/components/gazette/GazetteView";
import { GazettePopover } from "@/components/gazette/GazettePopover";
import { useGazetteStore } from "@/stores/gazette";
Usage Examples =
import { GazetteView } from "@/components/gazette/GazetteView";
import { useGazetteStore } from "@/stores/gazette";
function MyPage() {
const { current, loading, generate } = useGazetteStore();
return (
<div>
<GazetteView />
{loading && <Spinner />}
</div>
);
}
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment