@@ -12,32 +12,107 @@ Copy the template at the bottom of this file, fill it in, and prepend it to the
1212
1313## Snapshots
1414
15+ ### 2026-05-10 — After Phases 6 & 7: data structures and DP on the new primitives
16+
17+ ** Trigger:** Phase 6 data structures (BST insert, min-heap insert) and Phase 7 dynamic programming (Edit Distance, LCS) layered on top of the Phase 5 visual-primitives architecture. Two new primitives — TreeShape and Grid2D — extend the existing array-bars / array-cells / graph-2d set.
18+
19+ #### Algorithms
20+
21+ | Category | Count | Names |
22+ | --------------- | ------ | ------------------------------------------------------------------------ |
23+ | Sorting | 6 | bubbleSort, selectionSort, insertionSort, mergeSort, quickSort, heapSort |
24+ | Searching | 2 | linearSearch, binarySearch |
25+ | Graph | 7 | bfs, dfs, dijkstra, topologicalSort, bellmanFord, prim, kruskal |
26+ | Data Structures | 2 | bstInsert, minHeapInsert |
27+ | Dynamic Prog. | 2 | editDistance, lcs |
28+ | ** Total** | ** 19** | |
29+
30+ Difficulty breakdown: easy × 4, medium × 11, hard × 4
31+
32+ #### Test suite
33+
34+ | Metric | Count |
35+ | ------------------ | ------ |
36+ | Test files | 14 |
37+ | Test cases | 162 |
38+ | Statement coverage | 57.35% |
39+ | Branch coverage | 42.62% |
40+ | Function coverage | 46.15% |
41+
42+ New test files:
43+
44+ - ` __tests__/lib/algorithms/datastructure/bst.test.ts ` — BST insertion, in-order property, duplicates, lineNumber annotations
45+ - ` __tests__/lib/algorithms/datastructure/heap.test.ts ` — min-heap invariant, no input mutation, lineNumber annotations
46+ - ` __tests__/lib/algorithms/dp/dp.test.ts ` — Edit Distance and LCS correctness across canonical pairs
47+
48+ #### Pages & routes
49+
50+ | Metric | Count |
51+ | ---------------- | ------ |
52+ | Static routes | 8 |
53+ | Dynamic routes | 8 |
54+ | ** Total routes** | ** 16** |
55+
56+ New routes: ` /datastructure ` , ` /datastructure/[algorithm] ` , ` /dp ` , ` /dp/[algorithm] ` . Sitemap updated.
57+
58+ #### Components
59+
60+ | Metric | Count |
61+ | --------------------- | ----- |
62+ | Total components | 21 |
63+ | Visualizer primitives | 5 |
64+
65+ New primitives in ` components/primitives/ ` :
66+
67+ - ` TreeShape.tsx ` — binary tree SVG layout, BFS coloring per ` TreeStep `
68+ - ` Grid2D.tsx ` — DP-table grid with row/col labels, dependency highlights, traceback path
69+
70+ New input panel: ` components/visualizer/StringPairInputPanel.tsx ` — two-string input for DP algorithms.
71+
72+ ` renderPrimitive ` 's exhaustive switch now covers all five primitives.
73+
74+ #### Source code
75+
76+ | Metric | Count |
77+ | ---------------------------------------- | ------ |
78+ | TypeScript/TSX files | 76 |
79+ | Total lines (lib+components+context+app) | ~ 8,457 |
80+
81+ #### Notes
82+
83+ - ** Discriminated primitives:** new algorithms declare ` primitive: "tree-shape" ` or ` "grid-2d" ` and the ` StepsForPrimitive ` mapped type constrains their step shape at the ` createVisualization ` call site.
84+ - ** DP input model:** DP page maintains its own ` (stringA, stringB) ` state independent of the global ` data: number[] ` . Strings are URL-synced as ` ?a=…&b=… ` .
85+ - ** Categories:** added ` dp ` to ` AlgorithmCategory ` . Home page now uses an explicit label map and category ordering rather than auto-titlecasing the category key.
86+
87+ ---
88+
1589### 2026-05-09 — After Phase 3 & 4: Graph algorithms + test expansion
1690
1791** Trigger:** Addition of Bellman-Ford, Prim's, Kruskal's algorithms; Phase 4 custom input editing & shareable URLs; comprehensive test suite expansion.
1892
1993#### Algorithms
2094
21- | Category | Count | Names |
22- | ------------| -------| -------|
23- | Sorting | 6 | bubbleSort, selectionSort, insertionSort, mergeSort, quickSort, heapSort |
24- | Searching | 2 | linearSearch, binarySearch |
25- | Graph | 7 | bfs, dfs, dijkstra, topologicalSort, bellmanFord, prim, kruskal |
26- | ** Total** | ** 15** | |
95+ | Category | Count | Names |
96+ | --------- | ------ | ------------------------------------------------------------------------ |
97+ | Sorting | 6 | bubbleSort, selectionSort, insertionSort, mergeSort, quickSort, heapSort |
98+ | Searching | 2 | linearSearch, binarySearch |
99+ | Graph | 7 | bfs, dfs, dijkstra, topologicalSort, bellmanFord, prim, kruskal |
100+ | ** Total** | ** 15** | |
27101
28102Difficulty breakdown: easy × 4, medium × 8, hard × 3
29103
30104#### Test suite
31105
32- | Metric | Count |
33- | --------| -------|
34- | Test files | 11 |
35- | Test cases | 134 |
106+ | Metric | Count |
107+ | ------------------ | ------ |
108+ | Test files | 11 |
109+ | Test cases | 134 |
36110| Statement coverage | 57.17% |
37- | Branch coverage | 44.73% |
38- | Function coverage | 42.55% |
111+ | Branch coverage | 44.73% |
112+ | Function coverage | 42.55% |
39113
40114Test files:
115+
41116- ` __tests__/lib/utils.test.ts ` — 2 cases
42117- ` __tests__/lib/algorithms/index.test.ts ` — 4 cases
43118- ` __tests__/lib/algorithms/sorting/bubbleSort.test.ts ` — 6 cases
@@ -52,29 +127,29 @@ Test files:
52127
53128#### Pages & routes
54129
55- | Metric | Count |
56- | --------| -------|
57- | Static routes | 6 |
58- | Dynamic routes | 6 |
130+ | Metric | Count |
131+ | ---------------- | ------ |
132+ | Static routes | 6 |
133+ | Dynamic routes | 6 |
59134| ** Total routes** | ** 12** |
60135
61136Routes unchanged from baseline; all new algorithms available via existing route structure.
62137
63138#### Components
64139
65- | Metric | Count |
66- | --------| -------|
67- | Total components | 17 |
68- | Visualizer components | 10 |
140+ | Metric | Count |
141+ | --------------------- | ----- |
142+ | Total components | 17 |
143+ | Visualizer components | 10 |
69144
70145New components: InputPanel, graphEdge (support for custom input editing and graph visualization).
71146
72147#### Source code
73148
74- | Metric | Count |
75- | --------| -------|
76- | TypeScript/TSX files | 75 |
77- | Total lines | ~ 7,879 |
149+ | Metric | Count |
150+ | -------------------- | ------ |
151+ | TypeScript/TSX files | 75 |
152+ | Total lines | ~ 7,879 |
78153
79154#### Notes
80155
@@ -91,24 +166,25 @@ New components: InputPanel, graphEdge (support for custom input editing and grap
91166
92167#### Algorithms
93168
94- | Category | Count | Names |
95- | ------------| -------| -------|
96- | Sorting | 6 | bubbleSort, selectionSort, insertionSort, mergeSort, quickSort, heapSort |
97- | Searching | 2 | linearSearch, binarySearch |
98- | Graph | 4 | bfs, dfs, dijkstra, topologicalSort |
99- | ** Total** | ** 12** | |
169+ | Category | Count | Names |
170+ | --------- | ------ | ------------------------------------------------------------------------ |
171+ | Sorting | 6 | bubbleSort, selectionSort, insertionSort, mergeSort, quickSort, heapSort |
172+ | Searching | 2 | linearSearch, binarySearch |
173+ | Graph | 4 | bfs, dfs, dijkstra, topologicalSort |
174+ | ** Total** | ** 12** | |
100175
101176Difficulty breakdown: easy × 4, medium × 6, hard × 2
102177
103178#### Test suite
104179
105- | Metric | Count |
106- | --------| -------|
107- | Test files | 7 |
108- | Test cases | 56 |
180+ | Metric | Count |
181+ | ------------------------ | -------------------------- |
182+ | Test files | 7 |
183+ | Test cases | 56 |
109184| Files with zero coverage | ~ 50 (components, most lib) |
110185
111186Test files:
187+
112188- ` __tests__/lib/utils.test.ts ` — 2 cases
113189- ` __tests__/lib/algorithms/index.test.ts ` — 4 cases
114190- ` __tests__/lib/algorithms/sorting/bubbleSort.test.ts ` — 6 cases
@@ -119,51 +195,51 @@ Test files:
119195
120196#### Pages & routes (` app/ ` )
121197
122- | Route | Type |
123- | -------| ------|
124- | ` / ` | Static |
125- | ` /about ` | Static |
126- | ` /difficulty ` | Static |
198+ | Route | Type |
199+ | -------------------------- | ------- |
200+ | ` / ` | Static |
201+ | ` /about ` | Static |
202+ | ` /difficulty ` | Static |
127203| ` /difficulty/[difficulty] ` | Dynamic |
128- | ` /glossary ` | Static |
129- | ` /glossary/[term] ` | Dynamic |
130- | ` /sorting ` | Static |
131- | ` /sorting/[algorithm] ` | Dynamic |
132- | ` /searching ` | Static |
133- | ` /searching/[algorithm] ` | Dynamic |
134- | ` /graph ` | Static |
135- | ` /graph/[algorithm] ` | Dynamic |
204+ | ` /glossary ` | Static |
205+ | ` /glossary/[term] ` | Dynamic |
206+ | ` /sorting ` | Static |
207+ | ` /sorting/[algorithm] ` | Dynamic |
208+ | ` /searching ` | Static |
209+ | ` /searching/[algorithm] ` | Dynamic |
210+ | ` /graph ` | Static |
211+ | ` /graph/[algorithm] ` | Dynamic |
136212
137213** Total routes: 12** (6 static + 6 dynamic)
138214
139215#### Components (` components/ ` )
140216
141- | Directory | Components |
142- | -----------| ------------|
143- | ` components/ ` (root) | AlgorithmCard, Controls |
144- | ` components/glossary/ ` | GlossaryItem |
145- | ` components/layout/ ` | Footer, Navbar, PageLayout |
146- | ` components/seo/ ` | JsonLd |
217+ | Directory | Components |
218+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
219+ | ` components/ ` (root) | AlgorithmCard, Controls |
220+ | ` components/glossary/ ` | GlossaryItem |
221+ | ` components/layout/ ` | Footer, Navbar, PageLayout |
222+ | ` components/seo/ ` | JsonLd |
147223| ` components/visualizer/ ` | AlgorithmInfo, AlgorithmPseudocode, AlgorithmVisualizer, ColorLegend, GraphVisualization, SearchVisualization, SortingVisualization, VisualizerControls |
148224
149225** Total components: 15**
150226
151227#### Source code
152228
153- | Metric | Count |
154- | --------| -------|
155- | TypeScript/TSX files | 69 |
156- | Total lines (all ` .ts ` /` .tsx ` ) | ~ 6,550 |
157- | Type definitions (` lib/types.ts ` ) | 8 |
158- | Step types | 3 (SortingStep, SearchStep, GraphStep) |
229+ | Metric | Count |
230+ | --------------------------------- | -------------------------------------- |
231+ | TypeScript/TSX files | 69 |
232+ | Total lines (all ` .ts ` /` .tsx ` ) | ~ 6,550 |
233+ | Type definitions (` lib/types.ts ` ) | 8 |
234+ | Step types | 3 (SortingStep, SearchStep, GraphStep) |
159235
160236#### Dependencies
161237
162- | Type | Count |
163- | ------| -------|
164- | Production | 3 (next, react, react-dom) |
165- | Development | 23 |
166- | ** Total** | ** 26** |
238+ | Type | Count |
239+ | ----------- | -------------------------- |
240+ | Production | 3 (next, react, react-dom) |
241+ | Development | 23 |
242+ | ** Total** | ** 26** |
167243
168244---
169245
@@ -178,45 +254,45 @@ Copy and fill in for each new snapshot:
178254
179255#### Algorithms
180256
181- | Category | Count | Names |
182- | ------------ | ------- | ------- |
183- | Sorting | | |
184- | Searching | | |
185- | Graph | | |
186- | ** Total** | | |
257+ | Category | Count | Names |
258+ | --------- | ----- | ----- |
259+ | Sorting | | |
260+ | Searching | | |
261+ | Graph | | |
262+ | ** Total** | | |
187263
188264Difficulty breakdown: easy × ?, medium × ?, hard × ?
189265
190266#### Test suite
191267
192- | Metric | Count |
193- | --------| -------|
194- | Test files | |
195- | Test cases | |
196- | Statement coverage | |
197- | Branch coverage | |
268+ | Metric | Count |
269+ | ------------------ | ----- |
270+ | Test files | |
271+ | Test cases | |
272+ | Statement coverage | |
273+ | Branch coverage | |
198274
199275#### Pages & routes
200276
201- | Metric | Count |
202- | --------| -------|
203- | Static routes | |
204- | Dynamic routes | |
205- | ** Total routes** | |
277+ | Metric | Count |
278+ | ---------------- | ----- |
279+ | Static routes | |
280+ | Dynamic routes | |
281+ | ** Total routes** | |
206282
207283#### Components
208284
209- | Metric | Count |
210- | --------| -------|
211- | Total components | |
212- | Visualizer components | |
285+ | Metric | Count |
286+ | --------------------- | ----- |
287+ | Total components | |
288+ | Visualizer components | |
213289
214290#### Source code
215291
216- | Metric | Count |
217- | --------| -------|
218- | TypeScript/TSX files | |
219- | Total lines | |
292+ | Metric | Count |
293+ | -------------------- | ----- |
294+ | TypeScript/TSX files | |
295+ | Total lines | |
220296
221297#### Notes
222298
0 commit comments