File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
src/lib/stores/boardstore Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,22 @@ describe('BoardStorage', () => {
116116 expect ( boardIds ) . not . toContain ( 'settings' ) ; // ← CRITICAL!
117117 } ) ;
118118
119+ it ( '❌ sollte "config-merged" und andere config-* Keys NICHT als Board IDs erkennen' , ( ) => {
120+ // ARRANGE: Setup localStorage mit config-merged (settingsStore Flag)
121+ localStorage . setItem ( 'kanban-config-merged' , new Date ( ) . toISOString ( ) ) ;
122+ localStorage . setItem ( 'kanban-config-v2' , JSON . stringify ( { version : 2 } ) ) ;
123+ localStorage . setItem ( 'kanban-board-valid789012' , JSON . stringify ( { name : 'Valid Board' } ) ) ;
124+
125+ // ACT
126+ const boardIds = BoardStorage . loadBoardIds ( ) ;
127+
128+ // ASSERT
129+ expect ( boardIds ) . toHaveLength ( 1 ) ;
130+ expect ( boardIds ) . toContain ( 'board-valid789012' ) ;
131+ expect ( boardIds ) . not . toContain ( 'config-merged' ) ; // ← BUG FIX!
132+ expect ( boardIds ) . not . toContain ( 'config-v2' ) ;
133+ } ) ;
134+
119135 it ( '❌ sollte "boards-list" Key NICHT als Board ID erkennen' , ( ) => {
120136 // ARRANGE
121137 localStorage . setItem ( 'kanban-boards-list' , JSON . stringify ( [ ] ) ) ;
Original file line number Diff line number Diff line change @@ -40,11 +40,13 @@ export class BoardStorage {
4040
4141 // Exclude non-board keys
4242 if ( id === 'config' ) return false ;
43+ if ( id === 'config-merged' ) return false ;
4344 if ( id === 'settings' ) return false ;
4445 if ( id === 'boards-list' ) return false ;
4546 // ✅ Anti-Resurrection: Tombstone registry is NOT a board
4647 if ( id === 'deleted-boards-v1' ) return false ;
4748 if ( id . startsWith ( 'deleted-boards-' ) ) return false ;
49+ if ( id . startsWith ( 'config-' ) ) return false ;
4850 if ( id . includes ( '-metadata' ) ) return false ;
4951 if ( id . includes ( '-backup' ) ) return false ;
5052 if ( id . includes ( '-migrated' ) ) return false ;
You can’t perform that action at this time.
0 commit comments