From 46b57561d694dad30a550aecac4480caa51302c3 Mon Sep 17 00:00:00 2001 From: Jules Charly <154359675+idrivehtbusiness@users.noreply.github.com> Date: Wed, 30 Sep 2026 08:22:08 -0400 Subject: [PATCH 1/4] Detect isolated cells in publish warnings --- app/reducers/builderUtils.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/reducers/builderUtils.ts b/app/reducers/builderUtils.ts index 8401139d..ba045a13 100644 --- a/app/reducers/builderUtils.ts +++ b/app/reducers/builderUtils.ts @@ -1,6 +1,7 @@ import { entryWord, hasUnches } from '../lib/gridBase.js'; import { parseClueEnumeration, parseClueReferences } from '../lib/parse.js'; import { emptySelection, hasMultipleCells } from '../lib/selection.js'; +import { BLOCK } from '../lib/types.js'; import { ViewableEntry, entryString } from '../lib/viewableGrid.js'; import type { BuilderState } from './builderReducer.js'; import type { GridInterfaceState } from './gridReducer.js'; @@ -128,8 +129,16 @@ export function getWarningStats(state: BuilderState) { }); const enumsExpected = missingEnums.size < numValidClues / 2; + const hasIsolatedCells = grid.entriesByCell.some( + ([across, down], index) => + grid.cells[index] !== BLOCK && + across.entryIndex === null && + down.entryIndex === null + ); + return { shortWords, + hasIsolatedCells, hasUnches: hasUnches(grid) && !state.userTags.includes('cryptic'), unmatchedRefs, missingEnums: enumsExpected ? missingEnums : null, From 3a124ddbde60ab40ea3185a76617dac6024da803 Mon Sep 17 00:00:00 2001 From: Jules Charly <154359675+idrivehtbusiness@users.noreply.github.com> Date: Wed, 30 Sep 2026 08:22:11 -0400 Subject: [PATCH 2/4] Warn when publishing isolated cells --- app/reducers/builderReducer.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/reducers/builderReducer.ts b/app/reducers/builderReducer.ts index 4f23565e..b3f1392c 100644 --- a/app/reducers/builderReducer.ts +++ b/app/reducers/builderReducer.ts @@ -1041,6 +1041,9 @@ function _builderReducer( if (stats.hasUnches) { warnings.push('UNCHES'); // A bit of a hack but PublishWarningsList handles rendering this one } + if (stats.hasIsolatedCells) { + warnings.push('Some cells are isolated and cannot be clued'); + } if (stats.unmatchedRefs.size > 0) { warnings.push( `Some clues reference entries that don't exist: (${Array.from( From f1752228c2e8314a32142d88ba183512230e678e Mon Sep 17 00:00:00 2001 From: Jules Charly <154359675+idrivehtbusiness@users.noreply.github.com> Date: Wed, 30 Sep 2026 08:22:13 -0400 Subject: [PATCH 3/4] Test isolated cell publish warning --- app/__tests__/builderReducer.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/__tests__/builderReducer.test.ts b/app/__tests__/builderReducer.test.ts index 0a2b53ab..fc72afc8 100644 --- a/app/__tests__/builderReducer.test.ts +++ b/app/__tests__/builderReducer.test.ts @@ -111,6 +111,18 @@ test('short word warning', () => { `); }); +test('isolated cell warning', () => { + const state = getState( + ['.', '.', '.', '.', 'A', '.', '.', '.', '.'], + {} + ); + expect(builderReducer(state, publish).publishWarnings).toMatchInlineSnapshot(` + [ + "Some cells are isolated and cannot be clued", + ] + `); +}); + test('basic enum warnings', () => { const state = getState(['a', 'b', 'c', 'g', '', '', 'd', 'e', 'f'], { abc: 'test with good enum (3)', From 4094c97df709e069585b9b73ffa28b43dfb07694 Mon Sep 17 00:00:00 2001 From: Jules Charly <154359675+idrivehtbusiness@users.noreply.github.com> Date: Thu, 1 Oct 2026 15:39:16 -0400 Subject: [PATCH 4/4] Fix formatting in isolated cell test --- app/__tests__/builderReducer.test.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/__tests__/builderReducer.test.ts b/app/__tests__/builderReducer.test.ts index fc72afc8..d3a4fbf5 100644 --- a/app/__tests__/builderReducer.test.ts +++ b/app/__tests__/builderReducer.test.ts @@ -112,10 +112,7 @@ test('short word warning', () => { }); test('isolated cell warning', () => { - const state = getState( - ['.', '.', '.', '.', 'A', '.', '.', '.', '.'], - {} - ); + const state = getState(['.', '.', '.', '.', 'A', '.', '.', '.', '.'], {}); expect(builderReducer(state, publish).publishWarnings).toMatchInlineSnapshot(` [ "Some cells are isolated and cannot be clued",