@crvouga/atlas 0.10.2 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +7 -0
- package/dist/reports/src/catalog-health.d.ts +142 -0
- package/dist/reports/src/catalog-health.js +257 -0
- package/dist/reports/src/test-catalog.d.ts +8 -0
- package/dist/reports/src/test-catalog.js +5 -1
- package/dist/schema/src/api.d.ts +79 -0
- package/dist/schema/src/api.js +50 -0
- package/dist/server/src/app.js +9 -0
- package/dist/server/src/llms.js +1 -0
- package/dist/server/src/openapi.js +18 -2
- package/dist/server/src/settings-page.d.ts +4 -4
- package/dist/server/src/settings-page.js +17 -78
- package/docs/reference/http-api.md +34 -0
- package/docs/reference/reports.md +224 -0
- package/docs/reference/schema.md +10 -0
- package/docs/reference/server.md +4 -4
- package/docs/server.md +10 -0
- package/docs/ui.md +142 -0
- package/docs/workspaces.md +130 -0
- package/llms-full.txt +322 -0
- package/llms.txt +2 -0
- package/package.json +17 -10
- package/packages/schema/schemas/catalog-health.schema.json +400 -0
- package/packages/server/openapi.json +596 -0
- package/packages/visualizer/src/admin/SettingsPage.tsx +456 -0
- package/packages/visualizer/src/admin/main.tsx +11 -0
- package/packages/visualizer/src/app/AppShell.tsx +62 -38
- package/packages/visualizer/src/app/gazetteer.tsx +90 -83
- package/packages/visualizer/src/app/router.tsx +33 -15
- package/packages/visualizer/src/components/ActivityIndicator.tsx +4 -5
- package/packages/visualizer/src/components/DataIssues.tsx +36 -54
- package/packages/visualizer/src/components/Header.tsx +197 -125
- package/packages/visualizer/src/components/Legend.tsx +13 -41
- package/packages/visualizer/src/components/ProjectPicker.tsx +61 -26
- package/packages/visualizer/src/components/Screen.tsx +80 -71
- package/packages/visualizer/src/components/SpecLogo.tsx +15 -0
- package/packages/visualizer/src/components/Status.tsx +20 -34
- package/packages/visualizer/src/components/labels.tsx +8 -3
- package/packages/visualizer/src/components/spec-logos/APACHE-2.0.txt +206 -0
- package/packages/visualizer/src/components/spec-logos/CAMUNDA-MIT.txt +21 -0
- package/packages/visualizer/src/components/spec-logos/FILE-ICONS-ISC.txt +13 -0
- package/packages/visualizer/src/components/spec-logos/README.md +23 -0
- package/packages/visualizer/src/components/spec-logos/SIMPLE-ICONS-CC0.txt +30 -0
- package/packages/visualizer/src/components/spec-logos/alloy.svg +1 -0
- package/packages/visualizer/src/components/spec-logos/dmn.svg +3 -0
- package/packages/visualizer/src/components/spec-logos/gherkin.svg +1 -0
- package/packages/visualizer/src/components/spec-logos/openslo.svg +63 -0
- package/packages/visualizer/src/components/spec-logos/quint.svg +1 -0
- package/packages/visualizer/src/evidence/artifacts.tsx +263 -110
- package/packages/visualizer/src/evidence/chart-source.tsx +18 -0
- package/packages/visualizer/src/evidence/check-detail.tsx +283 -139
- package/packages/visualizer/src/evidence/decision-table.tsx +35 -26
- package/packages/visualizer/src/evidence/document-page.tsx +51 -29
- package/packages/visualizer/src/evidence/feature-page.tsx +121 -53
- package/packages/visualizer/src/evidence/marks.tsx +112 -79
- package/packages/visualizer/src/evidence/model-page.tsx +77 -46
- package/packages/visualizer/src/evidence/model-trace.tsx +55 -35
- package/packages/visualizer/src/evidence/overview.tsx +137 -69
- package/packages/visualizer/src/evidence/recording-page.tsx +70 -31
- package/packages/visualizer/src/evidence/recording.tsx +135 -68
- package/packages/visualizer/src/evidence/snapshot.tsx +99 -43
- package/packages/visualizer/src/evidence/source-text.tsx +33 -0
- package/packages/visualizer/src/evidence/sources-panel.tsx +138 -144
- package/packages/visualizer/src/evidence/spec-header.tsx +52 -36
- package/packages/visualizer/src/evidence/spec-index.tsx +61 -32
- package/packages/visualizer/src/evidence/spec-page.tsx +56 -25
- package/packages/visualizer/src/evidence/test-filter.tsx +38 -14
- package/packages/visualizer/src/explorer/Explorer.tsx +688 -261
- package/packages/visualizer/src/explorer/ExplorerIndex.tsx +136 -68
- package/packages/visualizer/src/explorer/RunsView.tsx +307 -94
- package/packages/visualizer/src/explorer/TestDetail.tsx +393 -118
- package/packages/visualizer/src/explorer/parts.tsx +35 -13
- package/packages/visualizer/src/find/Finder.tsx +106 -90
- package/packages/visualizer/src/find/open.ts +17 -20
- package/packages/visualizer/src/live/test-progress.tsx +60 -22
- package/packages/visualizer/src/looks/Stage.tsx +223 -110
- package/packages/visualizer/src/main.tsx +9 -11
- package/packages/visualizer/src/map/ChartMap.tsx +125 -69
- package/packages/visualizer/src/map/EventEdge.tsx +59 -37
- package/packages/visualizer/src/map/map.module.css +12 -546
- package/packages/visualizer/src/map/nodes.tsx +124 -70
- package/packages/visualizer/src/reachable.test.ts +3 -2
- package/packages/visualizer/src/spec-kind.ts +2 -2
- package/packages/visualizer/src/ui/grammars/ALLOY-MIT.txt +21 -0
- package/packages/visualizer/src/ui/grammars/QUINT-APACHE-2.0.txt +206 -0
- package/packages/visualizer/src/ui/grammars/README.md +14 -0
- package/packages/visualizer/src/ui/grammars/alloy.json +71 -0
- package/packages/visualizer/src/ui/grammars/quint.json +152 -0
- package/packages/visualizer/src/ui/highlight.ts +50 -0
- package/packages/visualizer/src/ui/theme.tsx +109 -0
- package/packages/visualizer/src/views/ChartPage.tsx +46 -26
- package/packages/visualizer/src/views/ChartTests.tsx +59 -22
- package/packages/visualizer/src/views/ProductPage.tsx +16 -15
- package/packages/visualizer/src/views/SidePanel.tsx +241 -131
- package/packages/visualizer/src/app/gazetteer.module.css +0 -107
- package/packages/visualizer/src/components/ActivityIndicator.module.css +0 -4
- package/packages/visualizer/src/components/DataIssues.module.css +0 -136
- package/packages/visualizer/src/components/Header.module.css +0 -114
- package/packages/visualizer/src/components/Legend.module.css +0 -84
- package/packages/visualizer/src/components/Screen.module.css +0 -312
- package/packages/visualizer/src/components/Status.module.css +0 -116
- package/packages/visualizer/src/components/icons.tsx +0 -156
- package/packages/visualizer/src/evidence/artifacts.module.css +0 -213
- package/packages/visualizer/src/evidence/evidence.module.css +0 -907
- package/packages/visualizer/src/evidence/recording.module.css +0 -460
- package/packages/visualizer/src/evidence/sources.module.css +0 -168
- package/packages/visualizer/src/evidence/spec-snapshot.tsx +0 -26
- package/packages/visualizer/src/explorer/explorer.module.css +0 -1238
- package/packages/visualizer/src/find/Finder.module.css +0 -168
- package/packages/visualizer/src/looks/stage.module.css +0 -300
- package/packages/visualizer/src/styles/global.css +0 -105
- package/packages/visualizer/src/styles/tokens.css +0 -80
- package/packages/visualizer/src/views/views.module.css +0 -546
package/docs/server.md
CHANGED
|
@@ -255,6 +255,7 @@ with `format=markdown` (or `Accept: text/markdown`), and takes the project prefi
|
|
|
255
255
|
| Every test, a summary (by status, environment, producer, domain), insights (failing, flaky, slowest) and facets | `GET /api/reports/tests` |
|
|
256
256
|
| Only some: `q` (all words), `status` (or `flaky`), `environment`, `producer`, `domain`, `spec`, `tag`, `run`; `sort`, `offset`, `limit` | `GET /api/reports/tests?status=failed&environment=ios` |
|
|
257
257
|
| One test: every recorded result (status, duration, environment, branch, commit, CI run), newest first | `GET /api/reports/tests/history?key=<key>` |
|
|
258
|
+
| Why Specs, domains and counts disagree: ambiguous spec paths, shared domains, gaps, a reconciliation of the totals | `GET /api/reports/tests/health` |
|
|
258
259
|
| The runs that recorded the report (by CI run URL, else branch and commit) | `GET /api/reports/runs` |
|
|
259
260
|
| Every test one run recorded | `GET /api/reports/runs/detail?key=<run key>` |
|
|
260
261
|
|
|
@@ -267,6 +268,13 @@ curl "$ATLAS_SERVER_URL/api/projects/$ATLAS_PROJECT/reports/tests?format=markdow
|
|
|
267
268
|
`stats` describes its recorded history: pass rate, flips, whether it is flaky and why (it passed and failed on the
|
|
268
269
|
same commit, passed only after a retry, or its producer said so), durations (avg, p50, p95, min, max, last), runs
|
|
269
270
|
and branches.
|
|
271
|
+
- The **health** document explains the numbers instead of adding one. It keeps spec files, defined specs, specs with an
|
|
272
|
+
executed test, tests, outlines, examples and per-environment observations apart, and walks from the Specs total to
|
|
273
|
+
the Tests total. Two spec paths are one logical spec only when a mapping says so
|
|
274
|
+
(`?root=<from>><to>`, for example `?root=%3Especs/` to put `checkout/cart.feature` under `specs/`); similar paths
|
|
275
|
+
are reported as ambiguous and never merged, and a similar title is never an identity. Give a check the label
|
|
276
|
+
`outline` to say which scenario outline an example belongs to. A domain shared by nearly every spec is flagged, but
|
|
277
|
+
explicit domain metadata always stays authoritative. The document only reads: it changes no status.
|
|
270
278
|
- The server keeps the newest 100 results of every test (progress reported as `running` is not history) and every run's last result per test, in memory, as layers
|
|
271
279
|
arrive; it is rebuilt from the layers on restart. History never changes a result.
|
|
272
280
|
- Without a published spec set, tests are grouped under the specs their layers recorded (`specs[]`: path, domain,
|
|
@@ -318,6 +326,8 @@ curl "$ATLAS_SERVER_URL/api/projects/$ATLAS_PROJECT/reports/tests?format=markdow
|
|
|
318
326
|
| `DELETE /api/projects/{project}/store/{key}` | publish | Remove a scratch object. |
|
|
319
327
|
| `GET /api/reports/tests` | read | Every test, with insights, facets and history statistics. |
|
|
320
328
|
| `GET /api/projects/{project}/reports/tests` | read | Every test, with insights, facets and history statistics. |
|
|
329
|
+
| `GET /api/reports/tests/health` | read | Why specs, domains and counts disagree. |
|
|
330
|
+
| `GET /api/projects/{project}/reports/tests/health` | read | Why specs, domains and counts disagree. |
|
|
321
331
|
| `GET /api/reports/tests/history` | read | One test and every result recorded for it. |
|
|
322
332
|
| `GET /api/projects/{project}/reports/tests/history` | read | One test and every result recorded for it. |
|
|
323
333
|
| `GET /api/reports/runs` | read | The runs that recorded the report. |
|
package/docs/ui.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Viewer UI conventions
|
|
2
|
+
|
|
3
|
+
Read this before changing the Atlas viewer or settings UI. React and Mantine are the design system.
|
|
4
|
+
Use the installed version in `package.json` (currently 9.7.3) and its [official documentation](https://mantine.dev/).
|
|
5
|
+
Look up unfamiliar interactions before writing them; component props and compound components usually solve them.
|
|
6
|
+
|
|
7
|
+
## One setup
|
|
8
|
+
|
|
9
|
+
- `packages/visualizer/src/ui/theme.tsx` owns the only theme and `AtlasThemeProvider`.
|
|
10
|
+
- Both `src/main.tsx` (reports) and `src/admin/main.tsx` (settings) use that provider and Mantine's styles.
|
|
11
|
+
- Keep Atlas's blue navigation, neutral surfaces, system typography, and light color scheme. Outcome colors
|
|
12
|
+
come from `statusColor`: green passed, red failed, orange flaky, blue running, gray unknown/unrun.
|
|
13
|
+
Always accompany color with text or a named status mark. Unknown evidence must never look passed.
|
|
14
|
+
- The theme darkens the existing Mantine outcome scales and muted text to meet small-text contrast requirements. Use the default sizes, radii, font sizes, shadows and variants. Defaults belong in the theme, not in features.
|
|
15
|
+
The spacing vocabulary is Mantine's `xs`, `sm`, `md`, `lg`, `xl`.
|
|
16
|
+
|
|
17
|
+
## Compose directly
|
|
18
|
+
|
|
19
|
+
Use `AppShell` for persistent navigation, `Container size="xl"` for report pages (`md` for settings),
|
|
20
|
+
`Stack` for vertical flow, `Group` for horizontal flow, and `SimpleGrid` for responsive metrics/forms.
|
|
21
|
+
Page headers contain a `Title order={1}`, descriptive `Text c="dimmed"`, then the page's controls.
|
|
22
|
+
Use `Title order={2}` for sections and `order={3}` for subsections; do not choose heading sizes per page.
|
|
23
|
+
|
|
24
|
+
Use Mantine components directly. Do not add wrappers for ordinary buttons, inputs, cards, menus, or dialogs.
|
|
25
|
+
Shared product compositions include `SpecHeader`, `ResultRow`, `StatusMark`, `Origin`, `Stage`, and `TestDetail`:
|
|
26
|
+
they preserve evidence semantics, provenance, URL selection, or playback behavior.
|
|
27
|
+
|
|
28
|
+
- Primary action: `Button variant="filled"`. Secondary: default `Button` (light). Quiet: `variant="subtle"`.
|
|
29
|
+
Destructive action: `color="red"`. Icon-only action: `ActionIcon` with an `aria-label`, usually a `Tooltip`.
|
|
30
|
+
- Inputs: Mantine inputs with a visible `label`, `description` when needed, and `error` for validation.
|
|
31
|
+
Use `NativeSelect` for small native option lists; keep form values controlled. Settings validation and
|
|
32
|
+
authorization stay on the server; its optional JSON editor also validates with the shared schema.
|
|
33
|
+
- Use `Menu` for navigation menus, `Popover` for view options, `Drawer` for sources/test details,
|
|
34
|
+
`Modal` for modal content, and `Spotlight` for search. Let Mantine own dismissal, focus and keyboard behavior.
|
|
35
|
+
When an action opens a drawer from a popover, close and disable the parent popover during the drawer's lifetime;
|
|
36
|
+
return focus to its persistent trigger. Do not fix overlapping focus traps by raising z-index values.
|
|
37
|
+
- Use `Tabs` for view modes and `Accordion` for disclosure. URL-backed selections stay in the existing router.
|
|
38
|
+
- Render typed router links with Mantine's `renderRoot={props => <Link {...props} ... />}`.
|
|
39
|
+
This keeps route/search type inference and native navigation semantics.
|
|
40
|
+
- Use `Table` in `Table.ScrollContainer` for wide evidence, with column headers. Long lists must retain
|
|
41
|
+
`Bounded`/show-more controls. Do not fetch unopened results' recordings eagerly.
|
|
42
|
+
- Loading: named `Loader`/`Skeleton` or explicit text with `role="status"`. Error: `Alert color="red"` and
|
|
43
|
+
a retry when possible. Empty: descriptive `Text` and a relevant action. Use built-in loading/disabled states.
|
|
44
|
+
- Spec overview links use a centered `Group`: status, flexible title/folder, then outcome and time. Keep gaps
|
|
45
|
+
explicit with theme spacing; stack metadata on narrow screens instead of crowding the title.
|
|
46
|
+
|
|
47
|
+
## Executable spec source
|
|
48
|
+
|
|
49
|
+
`SourceText` is the common source reader for Gherkin, Quint, DMN/XML, Alloy, OpenSLO/YAML and statechart
|
|
50
|
+
XML/JSON/YAML. Show it expanded near the top of document pages; preserve indentation, comments and the
|
|
51
|
+
complete file. Do not replace source with a trimmed snapshot. Mantine `CodeHighlightTabs` supplies file
|
|
52
|
+
labels, line numbers, horizontal scrolling and copying. The full file is expanded by default. Native
|
|
53
|
+
collapse/expand controls can limit long files to 70vh; the Recorded results action jumps to the existing
|
|
54
|
+
results section and moves keyboard focus there. Keep scenario selection,
|
|
55
|
+
filters, traces, decision tables and model declaration links working alongside the source.
|
|
56
|
+
|
|
57
|
+
`ui/highlight.ts` owns the one lazy Shiki adapter. It imports only the supported grammars and caches the
|
|
58
|
+
engine. The shared source composition installs that adapter when source is displayed; the Mantine theme
|
|
59
|
+
and component defaults still live only in `ui/theme.tsx`. Quint/Alloy grammar sources and licenses live in
|
|
60
|
+
[`ui/grammars/README.md`](../packages/visualizer/src/ui/grammars/README.md). Unknown formats remain plain
|
|
61
|
+
text, and parse failures must leave the source visible. Syntax highlighting never means a spec passed.
|
|
62
|
+
|
|
63
|
+
## Icons and notation marks
|
|
64
|
+
|
|
65
|
+
Use named imports from `@tabler/icons-react` for all UI glyphs. The icon package supplies SVG paths;
|
|
66
|
+
Mantine still supplies every control and interaction. Use size 16 for compact inline glyphs and size 20
|
|
67
|
+
for standalone actions, with `aria-hidden="true"` when the adjacent text or control names the action.
|
|
68
|
+
Do not draw SVG icons, use Unicode glyphs as buttons, or add another icon library. Mantine's built-in
|
|
69
|
+
icons are fine. Keep textual keyboard shortcuts and path separators as text.
|
|
70
|
+
|
|
71
|
+
`SpecLogo` maps every `SpecKind` to a bundled SVG mark, used in navigation and page headers. Keep the
|
|
72
|
+
visible notation label; marks are decorative. Sources, licenses and the DMN notation-mark choice are in
|
|
73
|
+
[`spec-logos/README.md`](../packages/visualizer/src/components/spec-logos/README.md). Add a sourced SVG
|
|
74
|
+
and update this mapping when adding a format. Brand artwork preserves upstream colors independently of
|
|
75
|
+
Atlas's theme. SVG data plots and statechart arrow markers are geometry, not handcrafted UI icons.
|
|
76
|
+
|
|
77
|
+
## Accessibility and responsive behavior
|
|
78
|
+
|
|
79
|
+
The shell collapses its index below Mantine's `md` breakpoint; its named Burger toggles mobile navigation.
|
|
80
|
+
Navigation closes after choosing a destination. Use responsive props and the theme's breakpoints; no custom
|
|
81
|
+
media-query system. Let controls wrap, use one form column on mobile, and keep dialogs inside the viewport.
|
|
82
|
+
Wide tables scroll inside their container. Native video/audio controls remain available.
|
|
83
|
+
|
|
84
|
+
Preserve labels, status announcements, keyboard shortcuts, selected states, meaningful headings and focus
|
|
85
|
+
restoration. Mantine respects reduced motion through the central theme. Avoid nested interactive controls.
|
|
86
|
+
Never rely on color alone, remove focus outlines, or hide an important action only to make a layout fit.
|
|
87
|
+
|
|
88
|
+
## Styling policy and exceptions
|
|
89
|
+
|
|
90
|
+
Default custom CSS: zero. First try Mantine defaults, central defaults, variants, props, layout components,
|
|
91
|
+
and theme tokens. Do not add Tailwind, Radix, another design system, CSS modules, custom token scales,
|
|
92
|
+
inline styles, or `styles` objects for ordinary UI. Document a concrete functional limitation here before
|
|
93
|
+
adding an exception; `scripts/ui-architecture.test.ts` checks these boundaries in the normal test suite.
|
|
94
|
+
|
|
95
|
+
The central List Styles API adjustment makes item labels fill the available width, including Mantine's column wrappers;
|
|
96
|
+
List has no full-width label prop. This keeps all report rows usable without feature styles.
|
|
97
|
+
|
|
98
|
+
The narrowly scoped exceptions are:
|
|
99
|
+
|
|
100
|
+
1. **Interactive statechart graph:** React Flow and ELK provide graph layout, pan/zoom, edges and minimap,
|
|
101
|
+
which Mantine does not supply. Graph nodes and controls use Mantine. `src/map/map.module.css` only covers
|
|
102
|
+
SVG strokes, graph handles, edge-label geometry and graph selection/dimming. The two edge-label transforms
|
|
103
|
+
and node dimensions are computed by the layout engine, not visual design tokens.
|
|
104
|
+
2. **Captured evidence:** native video/audio and sandboxed iframes render recorded bytes. HTML snapshots use
|
|
105
|
+
the existing isolated shadow tree and intrinsic phone coordinates; their captured styles never style Atlas.
|
|
106
|
+
Recorded click markers and intrinsic image/video dimensions are evidence coordinates, not UI spacing.
|
|
107
|
+
3. **Public compatibility APIs:** `solid-js` and `@tanstack/solid-query` remain dependencies of existing
|
|
108
|
+
report-library entry points. They render no Atlas screen. Do not import them into the viewer or add Solid UI.
|
|
109
|
+
4. **Syntax rendering:** Shiki is the syntax engine behind Mantine's official code-highlight adapter,
|
|
110
|
+
not a second component system. Its token styles and escaped HTML are generated by the highlighter.
|
|
111
|
+
The supported Shiki line transformer supplies the existing Quint `line-N` navigation anchors.
|
|
112
|
+
No feature CSS, handcrafted code controls or custom syntax color theme is introduced.
|
|
113
|
+
5. **Consumer test fixture:** `examples/todo/app` is the app Atlas tests and records, not an Atlas screen.
|
|
114
|
+
Its intentionally separate implementation and selectors are test inputs; the overhaul does not restyle it.
|
|
115
|
+
|
|
116
|
+
## Inventory and migration boundary
|
|
117
|
+
|
|
118
|
+
| Area | Screens/interactions | Mantine composition |
|
|
119
|
+
| --- | --- | --- |
|
|
120
|
+
| Shared shell | Project switching, spec navigation, run selection, connection status, diagnostics, mobile index | AppShell, Burger, NavLink, Menu, Popover, NativeSelect, Drawer |
|
|
121
|
+
| Project home | Tests/runs tabs, metrics, search, status/environment/domain filters, grouping, sorting, show more | Container, Tabs, SimpleGrid, Paper, TextInput, Button, Accordion |
|
|
122
|
+
| Test detail | Current outcomes, statistics, duration graph, history, artifacts, recording | Drawer, Table, Badge, Alert, Stage |
|
|
123
|
+
| Specs | All six existing kinds, overview/index, Gherkin rules/scenarios/examples, Quint declarations/traces, DMN tables, source text | SpecHeader, Accordion, Table, CodeHighlightTabs, ResultRow |
|
|
124
|
+
| Statecharts | Graph, screen/event/journey details, developer metadata, chart test results | Mantine cards/navigation and product compositions; graph exception above |
|
|
125
|
+
| Evidence | Steps, retries, annotations, facts, unknown extensions, safe downloads and previews | List, Badge, Accordion, Code, Image, native media |
|
|
126
|
+
| Recordings | Pictures/video/timeline, actor selection, moments, failure jumps, timing, model-state differences | Tabs, Slider, Button, ScrollArea, Table, Progress |
|
|
127
|
+
| Search/help | Ranked and semantic search, shortcut help, recording shortcuts | Spotlight, Modal, Kbd |
|
|
128
|
+
| Administration | Token access, storage backends/write destination, live timeouts, report rules, limits, raw JSON, conflicts | Same provider/theme, Fieldset, Mantine inputs, Accordion, Alert |
|
|
129
|
+
|
|
130
|
+
The hash routes (`/`, `/chart/$chartId`, `/specs/$kind`), query contracts, project scoping, streaming,
|
|
131
|
+
report APIs and data adapters remain the migration boundary. `/admin` still serves an independent document:
|
|
132
|
+
it lazily bundles the shared React settings entry once, so API-only servers do not need a prebuilt viewer.
|
|
133
|
+
|
|
134
|
+
## Checks
|
|
135
|
+
|
|
136
|
+
Run `bunx tsc --noEmit -p packages/visualizer`,
|
|
137
|
+
`bun test --cwd packages/visualizer --preload ./tests/preload.ts tests`,
|
|
138
|
+
`bun test scripts/ui-architecture.test.ts`, `bun run client:build`, then `bun run docs` and `bun run docs:check`.
|
|
139
|
+
Before pushing, run the full repository checks from `AGENTS.md`, including package build and consumer smoke
|
|
140
|
+
when dependencies change. DOM tests use the same `AtlasThemeProvider` with Mantine's supported `env="test"`.
|
|
141
|
+
Use semantic/product selectors, not Mantine's private class names. Inspect real desktop and narrow layouts,
|
|
142
|
+
menus, dialogs, complex evidence and settings in the browser; do not describe a DOM test as a visual audit.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Atlas in agent IDEs
|
|
2
|
+
|
|
3
|
+
This guide is for developing **this repository** in Superset, super.engineering or Orca. A consumer
|
|
4
|
+
project should install Atlas from npm and follow [integrating](integrating.md) instead.
|
|
5
|
+
|
|
6
|
+
## Start from any terminal
|
|
7
|
+
|
|
8
|
+
Install the Bun version named by `packageManager` in [package.json](../package.json), then run these
|
|
9
|
+
commands from the repository root. Setup requires no tokens, copied `.env`, Docker or external services.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
bun run workspace:setup
|
|
13
|
+
bun run workspace:run
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Open the `Atlas server ready:` URL printed in the Run terminal. It serves the real API and hot-reloading
|
|
17
|
+
viewer together; `/admin` opens settings. A fresh node starts empty. Publish real results to the printed
|
|
18
|
+
`ATLAS_STORE` address using the existing [report commands](reference/reports.md).
|
|
19
|
+
|
|
20
|
+
For UI work with populated specs, statecharts, failures and recordings, run the separate examples target:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
bun run workspace:preview
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
This viewer uses `examples/todo/specs` and the existing example-evidence adapter. It does not seed or
|
|
27
|
+
alter the real server's data. It has no server administration interface. Existing example run files are
|
|
28
|
+
shown when present; setup does not run browsers, model checkers or generate recordings. To create fresh
|
|
29
|
+
example recordings, use the existing `example:run` command and [statechart guide](statecharts.md).
|
|
30
|
+
|
|
31
|
+
## Shared commands
|
|
32
|
+
|
|
33
|
+
| Command | Behavior |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `bun run workspace:setup` | Check the pinned Bun and install with `--frozen-lockfile`; safe to repeat. |
|
|
36
|
+
| `bun run workspace:run` | Run the real node and viewer; repeat the frozen install before starting. |
|
|
37
|
+
| `bun run workspace:preview` | Run the populated examples viewer; repeat the same setup first. |
|
|
38
|
+
| `bun run workspace:status` | Print live URLs, mode and readiness as JSON; omit private control credentials. |
|
|
39
|
+
| `bun run workspace:stop` | Stop both targets owned by this checkout; retain all reports. |
|
|
40
|
+
| `bun run workspace:stop server` | Stop only the API/viewer target. `preview` selects only examples. |
|
|
41
|
+
| `bun run workspace:check` | Run documentation, types, tests, package/client builds and consumer smoke. |
|
|
42
|
+
|
|
43
|
+
`run` and `preview` stay in the foreground so the IDE owns their lifetime and displays their output.
|
|
44
|
+
Ctrl+C or an IDE Stop closes the owned server and its child process. Teardown uses a random private
|
|
45
|
+
control capability stored in `.atlas-workspace/`; it never kills a PID from a file or uses `pkill`.
|
|
46
|
+
If the owned development child does not finish after five seconds, only that child is terminated.
|
|
47
|
+
Stopping an unrelated IDE, agent, checkout or application is outside these scripts' scope.
|
|
48
|
+
|
|
49
|
+
## Workspace isolation and ports
|
|
50
|
+
|
|
51
|
+
The API/viewer tries port 5180, and examples try 5181. If that default is busy, the OS supplies a free
|
|
52
|
+
port. Read `workspace:status` instead of assuming a URL. An explicit `--port`, `ATLAS_PORT`, or `PORT`
|
|
53
|
+
(in that priority order) is strict: conflicts fail and never connect publishers to a different node.
|
|
54
|
+
`--port 0` requests a free port explicitly.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
bun run workspace:run --port 5280
|
|
58
|
+
bun run workspace:status
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Everything binds to `127.0.0.1`. For remote workspaces, use the IDE's port forwarding. Reports and server
|
|
62
|
+
settings stay in this checkout's `.atlas-data/`; live runtime leases stay in `.atlas-workspace/`.
|
|
63
|
+
Keep both directories private to each worktree. Do not share `node_modules`, `.atlas-data/`,
|
|
64
|
+
`.atlas-workspace/` or caches across checkouts with different dependencies. Frozen installs use Bun's
|
|
65
|
+
download cache without linking one worktree's dependency tree to another.
|
|
66
|
+
|
|
67
|
+
Two simultaneous starts cannot claim the same target's runtime lease. A hard kill may leave metadata:
|
|
68
|
+
run `workspace:stop` before restarting. It removes a stale lease only when its owner PID is gone; if the
|
|
69
|
+
PID is still alive but the control endpoint cannot authenticate, investigate that owner rather than
|
|
70
|
+
assuming it is safe to stop. No reports or settings are deleted by teardown.
|
|
71
|
+
|
|
72
|
+
## Superset
|
|
73
|
+
|
|
74
|
+
[`.superset/config.json`](https://github.com/crvouga/atlas/blob/main/.superset/config.json) wires workspace creation to setup, the Run button
|
|
75
|
+
to the real node/viewer, and teardown to stop. Superset discovers listening ports; the conventional
|
|
76
|
+
ports are labelled in [ports.json](https://github.com/crvouga/atlas/blob/main/.superset/ports.json). Automatically chosen ports still appear
|
|
77
|
+
in its port panel. Use the examples command in a second terminal when needed. Personal lifecycle
|
|
78
|
+
overrides belong in ignored `.superset/config.local.json`.
|
|
79
|
+
|
|
80
|
+
Superset's Run command resolves from the main repository's configuration. Commit the configuration
|
|
81
|
+
and scripts together before expecting another workspace's Run button to discover them. See the
|
|
82
|
+
[official lifecycle guide](https://docs.superset.sh/setup-teardown-scripts) and
|
|
83
|
+
[port management](https://docs.superset.sh/ports).
|
|
84
|
+
|
|
85
|
+
## super.engineering
|
|
86
|
+
|
|
87
|
+
[`.super.engineering/config.json`](https://github.com/crvouga/atlas/blob/main/.super.engineering/config.json) defines **Atlas** (default),
|
|
88
|
+
**Viewer examples** and **Checks** in the Run controls. Each server target's Stop command affects only
|
|
89
|
+
that target; deletion stops both. Shared commands expose **Atlas URLs**, **Check Atlas** and a
|
|
90
|
+
**Review Atlas UI** prompt. The prompt uses the current agent's configured provider and does not
|
|
91
|
+
launch a team or change model settings.
|
|
92
|
+
|
|
93
|
+
Use the documented CLI to inspect or invoke the same definitions:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
sc project scripts check --json
|
|
97
|
+
sc project scripts run Atlas --json
|
|
98
|
+
sc project scripts status --json
|
|
99
|
+
sc project scripts stop Atlas --json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Edit shared script configuration with `sc project scripts set ... --scope repo`, and shared commands
|
|
103
|
+
with `sc commands ... --scope shared`. Preserve other entries and unknown configuration keys. See
|
|
104
|
+
[project config and scripts](https://super.engineering/docs/project-config-and-scripts/).
|
|
105
|
+
|
|
106
|
+
## Orca
|
|
107
|
+
|
|
108
|
+
[`orca.yaml`](https://github.com/crvouga/atlas/blob/main/orca.yaml) uses the supported `scripts.setup` and `scripts.archive` hooks. Agents
|
|
109
|
+
wait for setup. The first default tab is reserved for the agent; the second starts Atlas. Tab commands
|
|
110
|
+
may start alongside setup, so Run repeats the frozen install before importing application dependencies.
|
|
111
|
+
Orca's normal shared-script trust and setup-policy settings still apply. No `scripts.run` key is
|
|
112
|
+
invented: Orca starts the app through the terminal template.
|
|
113
|
+
|
|
114
|
+
Keep **Shared + Local** or **Shared only** enabled for repository hooks, and approve the shared config
|
|
115
|
+
in Orca when it offers its trust prompt. These are user-owned controls. For existing workspaces,
|
|
116
|
+
run the shared Bun commands in a terminal; default tabs are created for new workspaces. See the
|
|
117
|
+
[official `orca.yaml` reference](https://www.onorca.dev/docs/model/orca-yaml).
|
|
118
|
+
|
|
119
|
+
## Agent workflow
|
|
120
|
+
|
|
121
|
+
Read `AGENTS.md`, then use `workspace:status` to discover this checkout's live app. Run the server for
|
|
122
|
+
API, settings, upload and streaming changes; use examples for populated UI review. Read [UI conventions](ui.md)
|
|
123
|
+
before changing screens. Keep report/schema/permission contracts intact, and report what the browser and
|
|
124
|
+
checks actually verified. Do not launch other agents, change IDE permissions or install global IDE tooling
|
|
125
|
+
as a side effect of setup. `workspace:check` is an on-demand verification target, never a creation hook.
|
|
126
|
+
|
|
127
|
+
The lifecycle regression suite (`bun test scripts/workspace.test.ts`) checks fresh directories with spaces,
|
|
128
|
+
repeatable setup, strict ports, separate stores, authenticated ownership and independent shutdown.
|
|
129
|
+
Real IDE boot verification additionally needs that IDE installed and available; a passing configuration
|
|
130
|
+
test alone does not prove the IDE started a new workspace.
|