From a6f6460e09e7c482ef5a9ed4a45165a045bb55d7 Mon Sep 17 00:00:00 2001 From: Francois Lanusse Date: Thu, 17 Sep 2026 12:57:52 +0200 Subject: [PATCH 1/4] Bump @astra-spec/ui to 0.0.6 No source changes are needed: the removed public exports come from layers the theme never imports, the dropped prior_insights inventory section is independent of the in-document record kind we render, and every astra-ui class our stylesheet overrides still exists. Typecheck, the test suite and a production article build all pass on the new version. Co-Authored-By: Claude Fable 5.1 --- package-lock.json | 25 ++++++++++++++++++++----- packages/astra/package.json | 2 +- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 676d74a..7df3f58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -148,13 +148,14 @@ "link": true }, "node_modules/@astra-spec/ui": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@astra-spec/ui/-/ui-0.0.5.tgz", - "integrity": "sha512-6G7xY92rOM1yXb1EuSzSFj7MVsNZsbOz7EZlvn67XhxumlYl21orh52B8KRfPe8nfMbDRl5kL+MBQoRtbIOzXA==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@astra-spec/ui/-/ui-0.0.6.tgz", + "integrity": "sha512-zrm7fPU7zo+XbUhZ5wiSllZinz4RPfEjPD7lp02AM9jXI+bPKAWa5ECQVv1DBM5mFuj+Av8RCmAXcpfUsBRWtA==", "license": "BSD-3-Clause", "dependencies": { "@floating-ui/react": "^0.27.20", - "katex": "^0.16.47" + "katex": "^0.16.47", + "react-zoom-pan-pinch": "^4.2.0" }, "engines": { "node": ">=20" @@ -24811,6 +24812,20 @@ "react": ">= 0.14.0" } }, + "node_modules/react-zoom-pan-pinch": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/react-zoom-pan-pinch/-/react-zoom-pan-pinch-4.2.0.tgz", + "integrity": "sha512-QSw1dvr6QGv5zHCUY7SEIY7EWRDbx1y6plylrWf2Nko9KOMW1MEoPC6oJ+Y/qOSeQjhvbkMV0m5bFF7pBxCH4A==", + "license": "MIT", + "engines": { + "node": ">=8", + "npm": ">=5" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -29966,7 +29981,7 @@ "license": "BSD-3-Clause", "dependencies": { "@astra-spec/sdk": "^0.1.2", - "@astra-spec/ui": "0.0.5", + "@astra-spec/ui": "0.0.6", "@lightcone-research/brand": "0.0.3", "@myst-theme/providers": "^1.3.1", "myst-common": "^1.8.1", diff --git a/packages/astra/package.json b/packages/astra/package.json index 8f32ef1..b1e6393 100644 --- a/packages/astra/package.json +++ b/packages/astra/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@astra-spec/sdk": "^0.1.2", - "@astra-spec/ui": "0.0.5", + "@astra-spec/ui": "0.0.6", "@lightcone-research/brand": "0.0.3", "@myst-theme/providers": "^1.3.1", "myst-common": "^1.8.1", From 4d5e79726377e8a4ba3d0a057a65cd9019d305ed Mon Sep 17 00:00:00 2001 From: Francois Lanusse Date: Thu, 17 Sep 2026 13:08:26 +0200 Subject: [PATCH 2/4] Pin the preview workflow to astra-ui 0.0.6 The reusable preview workflow packs the astra-ui checkout it is given, not the version this theme pins on npm, so the PR preview was still rendering the inventory with 0.0.5. Point both the workflow and the packed `ui` ref at the commit that carries the 0.0.6 release. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/preview.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index ddba2d4..4c0638a 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -19,9 +19,9 @@ permissions: jobs: preview: - uses: LightconeResearch/astra-ui/.github/workflows/preview.yml@9c940ebd65c0d25c46f9dbc83c27c8635aa3eda2 + uses: LightconeResearch/astra-ui/.github/workflows/preview.yml@6248ae0bf1ca7b4ee45de52f0b9839c0e0d1d4e6 with: - ui: 9c940ebd65c0d25c46f9dbc83c27c8635aa3eda2 + ui: 6248ae0bf1ca7b4ee45de52f0b9839c0e0d1d4e6 theme: ${{ github.event.pull_request.head.sha }} secrets: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} From 82ff90278deaf8b3d57d7079372e54bc01d540c1 Mon Sep 17 00:00:00 2001 From: Francois Lanusse Date: Thu, 17 Sep 2026 13:22:17 +0200 Subject: [PATCH 3/4] Hide the project hierarchy in the page inventory astra-ui 0.0.6 shows analysis navigation in the inventory sidebar by default. The theme controls which analysis is read through the page itself and reaches sub-analyses through their own pages, so the tree would either be inert or duplicate site navigation. Turn it off. Co-Authored-By: Claude Fable 5.1 --- packages/astra/src/inventory.tsx | 3 +++ packages/astra/tests/inventory.test.tsx | 2 ++ 2 files changed, 5 insertions(+) diff --git a/packages/astra/src/inventory.tsx b/packages/astra/src/inventory.tsx index 947a1d1..5d86fd4 100644 --- a/packages/astra/src/inventory.tsx +++ b/packages/astra/src/inventory.tsx @@ -68,6 +68,9 @@ export function AstraInventory({ document={publication.document} index={publication.index} analysisPath={publication.activeAnalysis.canonicalPath} + // The page already fixes which analysis is read; sub-analyses are + // reached through their own pages, not by switching the inventory. + showHierarchy={false} idPrefix="astra-inventory-" /> diff --git a/packages/astra/tests/inventory.test.tsx b/packages/astra/tests/inventory.test.tsx index 754fd72..1cfe50a 100644 --- a/packages/astra/tests/inventory.test.tsx +++ b/packages/astra/tests/inventory.test.tsx @@ -54,6 +54,8 @@ describe('publication inventory', () => { const inventory = await screen.findByRole('dialog', { name: 'Demo' }); expect(inventory.closest('article')).toBeNull(); expect(within(inventory).getByRole('heading', { name: 'Outputs' })).toBeVisible(); + expect(within(inventory).queryByRole('navigation', { name: 'Project hierarchy' })).toBeNull(); + expect(within(inventory).queryByRole('button', { name: 'Calibration' })).toBeNull(); expect(within(inventory).getByRole('img', { name: 'Shear correlation plot' })).toHaveAttribute( 'src', '/myst-assets/shear_plot.png', ); From b00569a339841f3612525999b3680297145b78c0 Mon Sep 17 00:00:00 2001 From: Francois Lanusse Date: Thu, 17 Sep 2026 13:27:13 +0200 Subject: [PATCH 4/4] Stack the nested citation card above its parent preview A citation hovered inside a shared record preview opens its bibliography card in a sibling portal, not inside the parent. Its fixed z-index of 70 therefore sat below the shared preview level (1100) and the card was painted behind the record it was opened from. Stack it one above that token instead, and pin the relationship in the stylesheet contract. Co-Authored-By: Claude Fable 5.1 --- packages/astra/styles/astra.css | 6 ++++-- packages/astra/tests/styles-contract.test.ts | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/astra/styles/astra.css b/packages/astra/styles/astra.css index 9c0241e..ef20b55 100644 --- a/packages/astra/styles/astra.css +++ b/packages/astra/styles/astra.css @@ -109,10 +109,12 @@ /* Citation previews use the shared floating tree so pointer travel remains coordinated with their parent record card. Their inner document keeps the - stock MyST bibliography appearance; this only makes the shared shell inert. */ + stock MyST bibliography appearance; this only makes the shared shell inert. + The card portals beside its parent preview rather than inside it, so it + must stack above the shared preview level to be seen at all. */ .astra-ui.astra-preview-popover-portal.astra-citation-preview-portal .astra-citation-preview { - z-index: 70; + z-index: calc(var(--astra-z-preview, 1100) + 1); width: 500px; max-width: calc(100vw - 1rem); color: inherit; diff --git a/packages/astra/tests/styles-contract.test.ts b/packages/astra/tests/styles-contract.test.ts index 6ea7607..6d86b69 100644 --- a/packages/astra/tests/styles-contract.test.ts +++ b/packages/astra/tests/styles-contract.test.ts @@ -102,6 +102,14 @@ describe('shared ASTRA stylesheet contract', () => { expect(orphans).toEqual([]); }); + it('stacks a nested citation card above the shared preview it opens from', () => { + // Both cards portal beside each other, so the citation must outrank the + // shared preview level rather than a fixed number below it. + expect(css).toMatch( + /\.astra-citation-preview-portal\s+\.astra-citation-preview \{[^}]*z-index: calc\(var\(--astra-z-preview(?:, ?\d+)?\) \+ 1\);/, + ); + }); + it('keeps registry identifiers visually identical when no anchor is available', () => { expect(css).toMatch( /\.astra-inputs \.astra-id,\s*\.astra-outputs \.astra-id \{[^}]*font-weight: 500;[^}]*text-decoration: underline;/,