Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
fi

- name: Install dependencies
if: steps.plan.outputs.code == 'true' || steps.plan.outputs.asf_source == 'true' || steps.plan.outputs.cli_package == 'true' || steps.plan.outputs.release_contract == 'true'
if: steps.plan.outputs.code == 'true' || steps.plan.outputs.astryx_surface == 'true' || steps.plan.outputs.asf_source == 'true' || steps.plan.outputs.cli_package == 'true' || steps.plan.outputs.release_contract == 'true'
run: npm ci

# The header audit above remains install-free. The complete source gate
Expand All @@ -155,7 +155,9 @@ jobs:
# directly instead of being hidden behind an earlier compilation failure.
- name: Astryx surface inventory
if: steps.plan.outputs.code == 'true' || steps.plan.outputs.astryx_surface == 'true'
run: npm run astryx:surface-inventory
run: |
npm run astryx:surface-inventory
Comment thread
liuxiaocs7 marked this conversation as resolved.
npm run astryx:surface-inventory:test

- name: Build
if: steps.plan.outputs.code == 'true' || steps.plan.outputs.cli_package == 'true' || steps.plan.outputs.release_contract == 'true'
Expand Down
5 changes: 4 additions & 1 deletion docs/astryx-alignment-inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

Maps [Astryx wiki](https://github.com/facebook/astryx/wiki) conventions onto
Maka product surfaces. Severity: **blocker** (raw control when an Astryx twin
exists / broken hierarchy) · **polish** (off-scale px, density).
exists / broken hierarchy) · **reimplementation** (a public `@maka/ui` export
shadows a shipped Astryx component — a review signal, not proof) · **polish**
(off-scale px, density).

## Wiki smell checklist (searchable)

Expand All @@ -34,6 +36,7 @@ exists / broken hierarchy) · **polish** (off-scale px, density).
| Design · radius | Nested radii not `outer − gap` | Role radii |
| Design · elevation | Raw `box-shadow` / magic z-index | Elevation tokens |
| API · Use the System | Raw `<button>` / `<input>` / `<select>` with Astryx twin | `Button`, `TextInput`, `Selector`, `List`/`Item`, `EmptyState`, `Dialog`, `ToggleButton`, `Collapsible`, `SegmentedControl` |
| API · Use the System | Public `@maka/ui` export whose name shadows a shipped Astryx component (defined locally, not a re-export) | Re-export the Astryx component, or confirm the local one is intentional |
| Theming | One-off hex for ladder roles | Bridge + product tokens |
| Container padding | Product padding fighting `--container-padding-*` | Let Card/Section/Layout own inset |

Expand Down
170 changes: 86 additions & 84 deletions docs/astryx-surface-file-inventory.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"astryx:theme": "node scripts/build-astryx-theme.mjs",
"astryx:surface-inventory": "node scripts/check-astryx-surface-inventory.mjs",
"astryx:surface-inventory:write": "node scripts/generate-astryx-surface-inventory.mjs",
"astryx:surface-inventory:test": "node --test scripts/generate-astryx-surface-inventory.test.mjs",
"sync:model-metadata": "node scripts/sync-model-metadata.mjs",
"refresh:model-metadata": "node scripts/sync-model-metadata.mjs --refresh",
"check:model-metadata": "node scripts/sync-model-metadata.mjs --check",
Expand Down
14 changes: 14 additions & 0 deletions scripts/ci-test-plan.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,20 @@ test('core CI checks the Astryx inventory for every code change before building'
assert.doesNotMatch(inventoryStep, /continue-on-error/u);
});

test('CI installs dependencies whenever the Astryx surface inventory runs', () => {
const workflow = readWorkflow('ci.yml');
// The inventory step imports the generator, which resolves @astryxdesign/core
// and parses the @maka/ui barrel. An inventory-doc-only PR is `astryx_surface`
// without `code`, so the `npm ci` step must gate on astryx_surface too — else
// the generator runs with no dependencies installed and fails closed.
const npmCi = workflow.indexOf('run: npm ci');
assert.ok(npmCi >= 0, 'expected an `npm ci` install step');
const stepStart = workflow.lastIndexOf('\n - name:', npmCi) + 1;
const stepEnd = workflow.indexOf('\n - ', npmCi);
const installStep = workflow.slice(stepStart, stepEnd);
assert.match(installStep, /steps\.plan\.outputs\.astryx_surface == 'true'/u);
});

test('core CI validates affected installed CLI packages on its existing runner', () => {
const workflow = readWorkflow('ci.yml');
const toolchain = workflow.indexOf(
Expand Down
Loading
Loading