diff --git a/docs/orientation-recovery.md b/docs/orientation-recovery.md index 084fa550..e19318ef 100644 --- a/docs/orientation-recovery.md +++ b/docs/orientation-recovery.md @@ -115,7 +115,7 @@ explicit saved mappings remain usable. Newly exported face metadata also keeps the actual uploaded JPEG. Capture cancellation cannot approve a preview. The vendored package's source commit and artifact hashes are checked by -`npm run verify:capture-core`. Its EUPL-1.2 license and CubeAssembler MIT notices +`npm run verify:capture-core`. Its `EUPL-1.2 OR AGPL-3.0-or-later` license and CubeAssembler MIT notices are included; production distribution remains subject to the owner's license acceptance gate. This slice does not migrate the viewer or the puzzle engine. diff --git a/e2e/preferences.spec.ts b/e2e/preferences.spec.ts index 5d5f2e0a..0519c558 100644 --- a/e2e/preferences.spec.ts +++ b/e2e/preferences.spec.ts @@ -29,7 +29,7 @@ test('ignores invalid size and missing color profile cookies', async ({ await page.context().addCookies([ { name: 'cube-assembler-cube-size', - value: '8', + value: '16', url: 'http://127.0.0.1:4174/', }, { @@ -47,6 +47,27 @@ test('ignores invalid size and missing color profile cookies', async ({ ) }) +for (const size of [8, 15]) { + test(`restores a ${size}x${size} size cookie and opens camera capture`, async ({ + page, + }) => { + await page.context().addCookies([ + { + name: 'cube-assembler-cube-size', + value: String(size), + url: 'http://127.0.0.1:4174/', + }, + ]) + await page.goto('/') + await expect(page.getByRole('combobox', { name: 'Cube' })).toHaveValue( + `builtin-generic-${size}`, + ) + await page.getByRole('button', { name: 'Capture faces' }).click() + await expect(page.locator('.capture-modal-content')).toBeVisible() + await expect(page.getByText(/review only/i)).toHaveCount(0) + }) +} + test('restores the 3D view, sticker style, and auto-rotation after reload', async ({ page, }) => { diff --git a/package-lock.json b/package-lock.json index 6022f8d5..b8a1b7fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@fontsource/ibm-plex-mono": "^5.3.0", "@fontsource/ibm-plex-sans": "^5.3.0", "@fontsource/space-grotesk": "^5.3.0", - "@puzlwerk/capture-recovery": "file:vendor/puzlwerk-capture-recovery-0.3.0-f1fa30ac.tgz", + "@puzlwerk/capture-recovery": "file:vendor/puzlwerk-capture-recovery-0.4.0-97d0897c.tgz", "@puzlwerk/viewer": "file:vendor/puzlwerk-viewer-0.1.0-7e14cbd8.tgz", "fflate": "^0.8.3", "preact": "^11.2.0" @@ -921,10 +921,10 @@ "license": "MIT" }, "node_modules/@puzlwerk/capture-recovery": { - "version": "0.3.0", - "resolved": "file:vendor/puzlwerk-capture-recovery-0.3.0-f1fa30ac.tgz", - "integrity": "sha512-BtfE7CoPonBHrK4prBaJKizjjF/qIwhjm3aUZnhYSGJ8rDdISN62efvPH3fNz6ojh+uaVrPDGgrkrPW83euFCw==", - "license": "EUPL-1.2", + "version": "0.4.0", + "resolved": "file:vendor/puzlwerk-capture-recovery-0.4.0-97d0897c.tgz", + "integrity": "sha512-1Uq7MPYcPE64XJ9gd6tYITFh9oZJ2IHjPSqp7nuIqrDN0VXDTZXL9gcwUk5vjkwOL52A3y0RZTKmfvExDp4SFw==", + "license": "EUPL-1.2 OR AGPL-3.0-or-later", "dependencies": { "@rescript/runtime": "12.3.1" } diff --git a/package.json b/package.json index b61af6cc..8e8a5d7d 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@fontsource/ibm-plex-mono": "^5.3.0", "@fontsource/ibm-plex-sans": "^5.3.0", "@fontsource/space-grotesk": "^5.3.0", - "@puzlwerk/capture-recovery": "file:vendor/puzlwerk-capture-recovery-0.3.0-f1fa30ac.tgz", + "@puzlwerk/capture-recovery": "file:vendor/puzlwerk-capture-recovery-0.4.0-97d0897c.tgz", "@puzlwerk/viewer": "file:vendor/puzlwerk-viewer-0.1.0-7e14cbd8.tgz", "fflate": "^0.8.3", "preact": "^11.2.0" diff --git a/public/licenses/index.html b/public/licenses/index.html index b2043159..1b66ebf2 100644 --- a/public/licenses/index.html +++ b/public/licenses/index.html @@ -29,10 +29,10 @@

Third-party licenses

includes) — AGPL-3.0-or-later
  • - PuzlWerk capture recovery (compiled PuzlWerk Core, vendored archive 0.3.0) — - EUPL-1.2; the archive was distributed under EUPL-1.2 only. From 2026-11-17 on - PuzlWerk Core is EUPL-1.2 OR AGPL-3.0-or-later at your choice - (AGPL-3.0-or-later); archives 0.1.0 and 0.3.0 stay EUPL-1.2. The archive also + PuzlWerk capture recovery (compiled PuzlWerk Core, vendored archive 0.4.0) — + EUPL-1.2 OR AGPL-3.0-or-later at your choice + (EUPL-1.2, AGPL-3.0-or-later). Archives 0.1.0 and + 0.3.0 were distributed under EUPL-1.2 only. The archive also contains material derived from CubeAssembler, which keeps its MIT license and attribution (CUBE_ASSEMBLER_LICENSE.txt inside the archive).
  • diff --git a/scripts/fixtureUploadServer.mjs b/scripts/fixtureUploadServer.mjs index 70976e8d..9f5cb368 100644 --- a/scripts/fixtureUploadServer.mjs +++ b/scripts/fixtureUploadServer.mjs @@ -5,6 +5,8 @@ import { join } from 'node:path' import { fileURLToPath } from 'node:url' const FACES = ['u', 'r', 'f', 'd', 'l', 'b'] +// Same range as CubeSizeRange.maxCubeSize; a test keeps the two equal. +const MAX_CUBE_SIZE = 15 const MAX_BYTES = 30 * 1024 * 1024 const FAVICON = readFileSync( new URL('./fixtureUploadFavicon.svg', import.meta.url), @@ -93,7 +95,7 @@ async function validateFixture(byName) { if ( !Number.isInteger(n) || n < 2 || - n > 7 || + n > MAX_CUBE_SIZE || !validFacelets(meta.colorsURFDLB, n) ) { throw new UploadError(400, 'Invalid fixture metadata') diff --git a/src/client/profiles/cubeProfileReview.ts b/src/client/profiles/cubeProfileReview.ts index 1e05ab2a..78549df5 100644 --- a/src/client/profiles/cubeProfileReview.ts +++ b/src/client/profiles/cubeProfileReview.ts @@ -9,5 +9,6 @@ export { mergeCubes, replaceCubes, sampledSquares, + toggleSizeFilter, unusedCubes, } from '../../core/profiles/CubeProfileReview.gen' diff --git a/src/client/profiles/cubeReviewPage.tsx b/src/client/profiles/cubeReviewPage.tsx index d0eaafcd..725db76f 100644 --- a/src/client/profiles/cubeReviewPage.tsx +++ b/src/client/profiles/cubeReviewPage.tsx @@ -8,6 +8,7 @@ import { deleteCubes, mergeCubes, replaceCubes, + toggleSizeFilter, unusedCubes, } from './cubeProfileReview' import { DeleteButton, SelectionBar } from './profileDeletion' @@ -227,13 +228,7 @@ export function CubeReviewTab({ settings, onChange, photo }: Props) { key={size} class="color-review-tab" aria-pressed={sizes.includes(size)} - onClick={() => - setSizes( - sizes.includes(size) - ? sizes.filter((s) => s !== size) - : [...sizes, size].sort(), - ) - } + onClick={() => setSizes(toggleSizeFilter(sizes, size))} > {size}×{size} diff --git a/src/client/scannerAppView.tsx b/src/client/scannerAppView.tsx index 91c9d91d..a7a9d7a5 100644 --- a/src/client/scannerAppView.tsx +++ b/src/client/scannerAppView.tsx @@ -418,9 +418,6 @@ export function ScannerAppView({ model }: { model: ScannerAppModel }) { e.currentTarget.value = profile.id }} > - {puzzleSize === 8 && ( - - )}