Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
fix(ui): call a finished scope fully loaded
Bernhard Jackiewicza1059d9dba5c
diff --git a/graph-ui/src/browser-ai/chat-wording.test.ts b/graph-ui/src/browser-ai/chat-wording.test.tsindex 060f08108..56d0e3372 100644--- a/graph-ui/src/browser-ai/chat-wording.test.ts+++ b/graph-ui/src/browser-ai/chat-wording.test.ts@@ -41,3 +41,14 @@ describe('the render limit in the scope sentence (W1)', () => {+ 'daher können Anzahlen und Namen fehlen, auch bei den direkten Beziehungen.');});});++describe('a scope that finished loading (W4)', () => {+ it('says it is fully loaded, not complete for the whole graph', () => {+ expect(selectionSummary(jsonbAggEvidence()).at(-1)).toBe('Scope: 1 hop in both directions, all relationship types; 15 symbols and 25 relationships; fully loaded.');+ expect(selectionSummary(jsonbAggEvidence(), 'de').at(-1)).toBe('Ausschnitt: 1 Schritt in beide Richtungen, alle Beziehungstypen; 15 Symbole und 25 Beziehungen; vollständig geladen.');+ const listed = relationshipAnswer('Who calls JSONBAgg?', [jsonbAggEvidence()])!.markdown + relationshipAnswer('Wer ruft JSONBAgg auf?', [jsonbAggEvidence()])!.markdown;+ expect(listed).not.toMatch(/complete for the indexed graph|vollständig für den indizierten Graphen/);+ expect(listed).toContain('fully loaded.');+ expect(listed).toContain('vollständig geladen.');+ });+});diff --git a/graph-ui/src/browser-ai/explanation-context.test.ts b/graph-ui/src/browser-ai/explanation-context.test.tsindex 36c215459..409015a2c 100644--- a/graph-ui/src/browser-ai/explanation-context.test.ts+++ b/graph-ui/src/browser-ai/explanation-context.test.ts@@ -145,7 +145,7 @@ describe('bounded explanation evidence', () => {const prepared = prepareExplanationContext(undefined, jsonbAggEvidence(), 3200);const text = outputText(prepared);expect(text).toContain('Selected: JSONBAgg (Class) in django/contrib/postgres/aggregates/general.py:50-54.');- expect(text).toContain('Scope: 1 hop in both directions, all relationship types; 15 symbols and 25 relationships; complete for the indexed graph.');+ expect(text).toContain('Scope: 1 hop in both directions, all relationship types; 15 symbols and 25 relationships; fully loaded.');expect(text).toContain('Incoming relationships: 23 from 12 symbols.');const line = (type: string) => text.split('\n').find(item => item.startsWith(`- ${type} `)) ?? '';for (const type of ['CALLS', 'TESTS']) {diff --git a/graph-ui/src/browser-ai/grounded-explanation.test.ts b/graph-ui/src/browser-ai/grounded-explanation.test.tsindex 4e02b8794..6900b08f5 100644--- a/graph-ui/src/browser-ai/grounded-explanation.test.ts+++ b/graph-ui/src/browser-ai/grounded-explanation.test.ts@@ -109,7 +109,7 @@ describe('the selected symbol source in a Galaxy explanation (K14)', () => {'Selected: JSONBAgg (Class) in django/contrib/postgres/aggregates/general.py:50-54.','Incoming relationships: 23 from 12 symbols (CALLS 11, TESTS 11, DEFINES 1).','Outgoing relationships: 2 to 2 symbols (INHERITS 2).',- 'Scope: 1 hop in both directions, all relationship types; 15 symbols and 25 relationships; complete for the indexed graph.',+ 'Scope: 1 hop in both directions, all relationship types; 15 symbols and 25 relationships; fully loaded.',]);expect(selectionSummary(djangoAreaEvidence())[0]).toBe('Selected source area: `django` (2310 files · 15299 indexed nodes).');});@@ -120,7 +120,7 @@ describe('the selected symbol source in a Galaxy explanation (K14)', () => {+ 'so counts and names further out can be incomplete.';expect(selectionSummary(jsonbAggRenderLimited()).at(-1)).toBe(partial);expect(formatExplanationEvidence(prepareExplanationContext(undefined, jsonbAggRenderLimited(), 3200))).toContain(partial);- expect(selectionSummary(jsonbAggRenderLimited()).join('\n')).not.toContain('complete for the indexed graph');+ expect(selectionSummary(jsonbAggRenderLimited()).join('\n')).not.toContain('fully loaded');});it('checks a German sentence for the same unsupported claims and asks for it in German (C5)', () => {@@ -140,7 +140,7 @@ describe('the selected symbol source in a Galaxy explanation (K14)', () => {'Ausgewählt: JSONBAgg (Class) in django/contrib/postgres/aggregates/general.py:50-54.','Eingehende Beziehungen: 23 aus 12 Symbolen (CALLS 11, TESTS 11, DEFINES 1).','Ausgehende Beziehungen: 2 zu 2 Symbolen (INHERITS 2).',- 'Ausschnitt: 1 Schritt in beide Richtungen, alle Beziehungstypen; 15 Symbole und 25 Beziehungen; vollständig für den indizierten Graphen.',+ 'Ausschnitt: 1 Schritt in beide Richtungen, alle Beziehungstypen; 15 Symbole und 25 Beziehungen; vollständig geladen.',]);});});diff --git a/graph-ui/src/browser-ai/relationship-answer.test.ts b/graph-ui/src/browser-ai/relationship-answer.test.tsindex 0dc411f07..89c604625 100644--- a/graph-ui/src/browser-ai/relationship-answer.test.ts+++ b/graph-ui/src/browser-ai/relationship-answer.test.ts@@ -64,7 +64,7 @@ describe('listed relationship answers', () => {expect(answer.markdown).not.toMatch(/\bfrom 11\b/);// The outgoing INHERITS edges answer another question.expect(answer.markdown).not.toContain('INHERITS');- expect(answer.markdown).toContain('complete for the indexed graph');+ expect(answer.markdown).toContain('fully loaded');expect(answer.markdown).toContain('not generated by the model');});@@ -99,7 +99,7 @@ describe('listed relationship answers', () => {expect(german).toContain('Ausschnitt: 3 Schritte in beide Richtungen, alle Beziehungstypen; 5.548 Symbole und 15.673 Beziehungen; '+ 'unvollständig. Ebene 3 hörte nach der Anfrage auf zu laden, die sie über das Darstellungslimit von 5.000 Knoten brachte; '+ 'die Szene zeichnet höchstens 5.000 Knoten, daher können Anzahlen und Namen weiter außen fehlen.');- expect(german).not.toContain('vollständig für den indizierten Graphen');+ expect(german).not.toContain('vollständig geladen');});it('never reports "no callers" for a side the scope did not load or while it is still loading', () => {@@ -120,7 +120,7 @@ describe('listed relationship answers', () => {const markdown = relationshipAnswer('What does postgres call?', [selectionEvidenceContext(largeFolderScope())])!.markdown;expect(markdown).toContain('150 outgoing relationships to 150 symbols.');for (const type of ['CALLS', 'TESTS', 'USAGE', 'IMPORTS', 'DEFINES_METHOD']) expect(line(markdown, type)).toMatch(/^- \*\*\w+ \(30\):\*\* .*; \+\d+ more$/);- expect(markdown).toContain('complete for the indexed graph.');+ expect(markdown).toContain('fully loaded.');});it('says so when the snapshot cut relationships instead of claiming a complete list', () => {diff --git a/graph-ui/src/browser-ai/strings.ts b/graph-ui/src/browser-ai/strings.tsindex 8de54bac8..96b175983 100644--- a/graph-ui/src/browser-ai/strings.ts+++ b/graph-ui/src/browser-ai/strings.ts@@ -44,7 +44,8 @@ const englishRelationshipWords = {allTypes: 'all relationship types',onlyTypes: (types: readonly string[]) => types.length ? `only ${types.join(', ')}` : 'no relationship types',size: (nodes: number, edges: number) => `${en(nodes)} ${nodes === 1 ? 'symbol' : 'symbols'} and ${en(edges)} ${edges === 1 ? 'relationship' : 'relationships'}`,- complete: 'complete for the indexed graph',+ /** The scope finished loading; it is not the whole graph (W4). */+ complete: 'fully loaded',loading: 'still loading, so this is a partial preview',partial: (error?: string) => `incomplete${error ? `: ${error}` : ''}`,/** A layer stopped at the render limit: the layers inside it are whole, it and those further out are not (C1). As the@@ -110,7 +111,7 @@ export const relationshipWords: { en: RelationshipWords; de: RelationshipWords }allTypes: 'alle Beziehungstypen',onlyTypes: (types: readonly string[]) => types.length ? `nur ${types.join(', ')}` : 'keine Beziehungstypen',size: (nodes: number, edges: number) => `${de(nodes)} ${nodes === 1 ? 'Symbol' : 'Symbole'} und ${de(edges)} ${edges === 1 ? 'Beziehung' : 'Beziehungen'}`,- complete: 'vollständig für den indizierten Graphen',+ complete: 'vollständig geladen',loading: 'lädt noch, das ist eine Vorschau',partial: (error?: string) => `unvollständig${error ? `: ${error}` : ''}`,renderLimited: (layer: number, limit: number, kind: 'nodes' | 'edges') => {