Commit c93c0ae
fix(ui+ast): board/knowledge hang + multi-language symbol coverage
Board + Knowledge views were rendering blank on large memory sets —
my resolveMemorySymbols() was compiling ~4000 RegExp instances per
memory card, which blocked the main thread for seconds on 1600-memory
/ 10000-symbol graphs. Rewrote with:
- _hasWordMatch(hay, needle): indexOf + manual word-boundary char
check, zero regex allocations.
- Label cap lowered 4000 → 1500.
- Case-sensitive label index — function names in memories are
usually written with their original casing and case-sensitive
matching avoids "do" matching every "Do" verb.
- Minimum label length raised 3 → 4 to cut noise from common short
words.
AST multi-language coverage (workflow_graph_source_ast.py) — AP
supports 27 languages but the extractor only queried 7 label kinds.
Expanded _SYMBOL_LABELS to cover every label the Java / Kotlin /
Swift / ObjC / C / C++ / Go parsers emit:
Class, Interface, Field, Property (JVM)
Protocol, Extension (Swift / ObjC)
Union, Typedef, Macro (C / C++)
Module, Package, Namespace, Variable (Go / general)
_symbol_type_from_label maps them all onto the five palette slots:
function · method · class · module · constant. Module-ish containers
(module, package, namespace) now render with amber #FBBF24.
AST cache cleared — next build re-queries AP and picks up the new
symbol kinds automatically.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 111dd46 commit c93c0ae
2 files changed
Lines changed: 86 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
173 | 191 | | |
174 | 192 | | |
175 | 193 | | |
176 | 194 | | |
177 | 195 | | |
178 | 196 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
183 | 200 | | |
184 | 201 | | |
185 | | - | |
| 202 | + | |
186 | 203 | | |
187 | | - | |
| 204 | + | |
188 | 205 | | |
189 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
190 | 211 | | |
191 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
192 | 218 | | |
193 | 219 | | |
194 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
315 | 318 | | |
316 | | - | |
317 | | - | |
318 | | - | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
325 | 346 | | |
326 | 347 | | |
327 | 348 | | |
328 | 349 | | |
329 | | - | |
| 350 | + | |
| 351 | + | |
330 | 352 | | |
331 | 353 | | |
332 | 354 | | |
333 | 355 | | |
334 | | - | |
335 | | - | |
336 | | - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
337 | 359 | | |
338 | 360 | | |
339 | | - | |
340 | | - | |
341 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
342 | 365 | | |
343 | 366 | | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
349 | 376 | | |
350 | 377 | | |
351 | | - | |
352 | | - | |
| 378 | + | |
353 | 379 | | |
354 | 380 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
364 | 390 | | |
365 | 391 | | |
366 | 392 | | |
| |||
0 commit comments