fix: hide tree-sitter AST kind changes for source code (only show for schema protocols)
Author: Aaron Steven White
Commit
eebe64b41c9c683ee2b04a13c25f8130a9b06caeParent: 6ff03e45ba
Structural diff unavailable
These commits were pushed via plain git push, so no pre-parsed
schemas are available. Install git-remote-cospan and re-push via panproto:// to
see scope-level changes, breaking change detection, and semantic diffs.
brew install panproto/tap/git-remote-cospan1 file changed +16 -6
@@ -346,14 +346,24 @@
346346 {@const removedGroups = groupVertices(sd.removedVertices, file.path)} 347347 {@const addedGroups = groupVertices(sd.addedVertices, file.path)} 348348 <div class="mb-3 space-y-2"> 349- <!-- Kind changes - grouped by scope, each clickable --> 350- {#if sd.kindChanges.length > 0} 351- {@const namedKindChanges = sd.kindChanges.filter(kc => !shortVertex(kc.vertexId).startsWith('$'))} 352- {@const internalKindCount = sd.kindChanges.length - namedKindChanges.length} 353- {@const kindByScope = groupKindChanges(namedKindChanges)} 349+ <!-- Kind changes: only show changes to named program elements. 350+ Internal AST reshuffling is filtered out. --> 351+ {#if sd.kindChanges.filter(kc => { 352+ const name = shortVertex(kc.vertexId); 353+ if (name.startsWith('$') || name.includes('/')) return false; 354+ if (kc.oldKind.includes('_') && kc.newKind.includes('_')) return false; 355+ return true; 356+ }).length > 0} 357+ {@const meaningfulKindChanges = sd.kindChanges.filter(kc => { 358+ const name = shortVertex(kc.vertexId); 359+ if (name.startsWith('$') || name.includes('/')) return false; 360+ if (kc.oldKind.includes('_') && kc.newKind.includes('_')) return false; 361+ return true; 362+ })} 363+ {@const kindByScope = groupKindChanges(meaningfulKindChanges)} 354364 <details class="mb-2 rounded-md border border-amber-500/20"> 355365 <summary class="cursor-pointer px-3 py-2 text-xs font-semibold uppercase tracking-wider text-amber-400 hover:bg-amber-500/5"> 356- ◆ Type changes ({namedKindChanges.length}{internalKindCount > 0 ? ` + ${internalKindCount} internal` : ''}) 366+ ◆ Type changes ({meaningfulKindChanges.length}) 357367 </summary> 358368 <div class="space-y-0.5 px-2 pb-2"> 359369 {#each kindByScope as group (group.scope)}