Page Layout
Designpage-layoutPage Layout is an Agent Skill for design published in the hyperdxio/hyperdx repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Add or update app page headers and layout using PageHeader and PageLayout. Use when creating a new page, fixing inconsistent headers, or migrating Service Map / Kubernetes / dashboard pages to the shared layout.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/hyperdxio/hyperdx/blob/HEAD/.claude/skills/page-layout/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/page-layout, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Page layout and headers
Read agent_docs/page_layout.md before changing any page shell. It is the source of truth for API, examples, and migration steps.
Quick rules
- Default for new pages:
PageLayoutwithtitle, optionalleading/actions, andcontent— only when the sticky bar is text-only (no inputs in that bar). - Sticky bar contains inputs (source pickers, SQL/search, sliders, time range, Run, etc.): do not use
PageHeader/PageLayouttitle. The sticky row is for controls only. Put where you are in thebreadcrumbsprop (renders inside the stickyPageHeader, above the toolbar) when the page lives under a hierarchy (e.g.Dashboards→Kubernetes); otherwise you may omitbreadcrumbsand rely on<Head><title>, the sidebar active item, and the empty state copy. - Never duplicate location: do not set
title="Kubernetes Dashboard"and breadcrumbs that repeat the same page name. - Never use
<Text size="xl">as the page title in the body. - Global controls (time range, Run, Save, sampling) go in
actions, right-aligned. Context pickers go inleading(notitlewhen those slots are used for inputs). Breadcrumbs use thebreadcrumbsprop so they stay in the sticky header, not incontent. - Full-height tools (maps, large charts):
fillViewportonPageLayout. - Search / Chart Explorer: keep bespoke toolbars unless the task is explicitly to redesign them.
Workflow
- Read
agent_docs/page_layout.md. - Open a similar page already on
PageHeader/PageLayout(e.g.AlertsPage.tsx,DBServiceMapPage.tsx,KubernetesDashboardPage.tsx). - Implement using
@/components/PageLayoutor@/components/PageHeader. - Preserve or add
data-testidon the page root for E2E tests. - Run
yarn lint:fixin the repo root when done. - If the page has E2E coverage, run the relevant spec under
packages/app/tests/e2e/.
Imports
import { PageHeader } from '@/components/PageHeader';
import { PageLayout } from '@/components/PageLayout';
Reference implementations
| Page | File | Pattern |
|---|---|---|
| List page | AlertsPage.tsx | PageHeader + title + Container (no inputs in header) |
| Tool page with inputs + hierarchy | KubernetesDashboardPage.tsx, ClickhousePage.tsx | PageLayout without title; breadcrumbs + leading + actions in one sticky header |
| Tool page (top-level) | DBServiceMapPage.tsx | PageLayout without title; leading / actions only; no duplicate breadcrumb unless you add a real hierarchy |
| Custom toolbar | SessionsPage.tsx | PageLayout + header = custom PageHeader children (single-row inputs, no title) |
| Custom title | TeamPage.tsx | PageHeader with children only |