Skip to content

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.

fix(ui): take the Fit map label of both maps from the Architecture strings

Bernhard Jackiewicz0596fb10cf88
diff --git a/graph-ui/src/architecture/ContainerMap.tsx b/graph-ui/src/architecture/ContainerMap.tsx
index 65685f488..c270180a5 100644
--- a/graph-ui/src/architecture/ContainerMap.tsx
+++ b/graph-ui/src/architecture/ContainerMap.tsx
@@ -149,7 +149,7 @@ export default function ContainerMap({ project, generation, active, filter, onNa
<header className="spatial-heading"><div><span className="spatial-eyebrow">Routes / Services</span><h2>How the services connect</h2>
<p>One square per declared service. Follow a connection to see the configuration and code behind it.</p></div>
<div className="spatial-camera-controls"><button aria-pressed={!planar} onClick={() => setPlanar(false)}>3D</button><button aria-pressed={planar} onClick={() => setPlanar(true)}>Plan</button>
- <button onClick={() => setResetKey(value => value + 1)}>Fit map</button><RefreshControl labels={text.refreshFeedback.services} feedback={refresh.feedback} onRefresh={() => {
+ <button onClick={() => setResetKey(value => value + 1)}>{text.fitMap}</button><RefreshControl labels={text.refreshFeedback.services} feedback={refresh.feedback} onRefresh={() => {
refresh.begin();
setRevision(value => value + 1);
if (!selections.length || !selections[0].inventory.manifests.length) setDiscoveryRevision(value => value + 1);
diff --git a/graph-ui/src/architecture/SpatialArchitecture.tsx b/graph-ui/src/architecture/SpatialArchitecture.tsx
index f838625ff..4f713d316 100644
--- a/graph-ui/src/architecture/SpatialArchitecture.tsx
+++ b/graph-ui/src/architecture/SpatialArchitecture.tsx
@@ -184,7 +184,7 @@ export default function SpatialArchitecture({ project, generation, graph, overvi
<div className="spatial-heading"><div><span className="spatial-eyebrow">Repository atlas / {view === 'entryPoints' ? 'entry points' : view}</span><h2>{model.title}</h2><p>{viewNotes[view]}</p></div>
<div className="spatial-camera-controls" role="group" aria-label="Map camera">
<button aria-pressed={!planar} onClick={() => changePlace({ planar: false })}>3D</button><button aria-pressed={planar} onClick={() => changePlace({ planar: true })}>Plan</button>
- <button onClick={() => setResetKey(value => value + 1)}>Fit map</button>
+ <button onClick={() => setResetKey(value => value + 1)}>{text.fitMap}</button>
</div>
</div>
<div className="spatial-controls">
diff --git a/graph-ui/src/architecture/fit-map-string.test.ts b/graph-ui/src/architecture/fit-map-string.test.ts
new file mode 100644
index 000000000..f9707185a
--- /dev/null
+++ b/graph-ui/src/architecture/fit-map-string.test.ts
@@ -0,0 +1,17 @@
+/*
+ * Review of K42: the line of the service map that got the shared Refresh
+ * control still carried "Fit map" as text in the TSX. Visible words live in
+ * architecture/strings.ts; both maps take the button's name from there.
+ */
+import { readFileSync } from 'node:fs';
+import { expect, it } from 'vitest';
+import { architectureText } from './strings';
+
+it('K42: "Fit map" comes from the strings of Architecture, not from the TSX of the maps', () => {
+ expect(architectureText.fitMap).toBe('Fit map');
+ for (const file of ['ContainerMap.tsx', 'SpatialArchitecture.tsx']) {
+ const source = readFileSync(new URL(`./${file}`, import.meta.url), 'utf8');
+ expect(source, file).not.toMatch(/>\s*Fit map\s*</);
+ expect(source, file).toContain('{text.fitMap}');
+ }
+});
diff --git a/graph-ui/src/architecture/strings.ts b/graph-ui/src/architecture/strings.ts
index 002d679bc..b44e133a2 100644
--- a/graph-ui/src/architecture/strings.ts
+++ b/graph-ui/src/architecture/strings.ts
@@ -119,6 +119,8 @@ export const architectureText = {
line: (place: string, line: number) => `${place}:${line}`,
ordinal: (index: number, count: number) => ` (${index} of ${count})`,
},
+ /** The camera button of the maps: back to the whole map. */
+ fitMap: 'Fit map',
/** Each Refresh button says what it did (hand test 2026-10-04, A3): busy while it runs, then when, and whether anything changed. */
refreshFeedback: {
routes: { idle: 'Refresh connections', busy: 'Refreshing connections…', done: (time: string) => `Connections refreshed at ${time}` },