From 0596fb10cf88443e4db786c7d1f929c35e63c516 Mon Sep 17 00:00:00 2001 From: Bernhard Jackiewicz Date: Sun, 4 Oct 2026 14:57:18 +0200 Subject: [PATCH] fix(ui): take the Fit map label of both maps from the Architecture strings The line of the service map that got the shared Refresh control (A3) still had "Fit map" written into the TSX, and so had the repository map. The label now lives in architecture/strings.ts and both maps read it there. Signed-off-by: Bernhard Jackiewicz --- graph-ui/src/architecture/ContainerMap.tsx | 2 +- .../src/architecture/SpatialArchitecture.tsx | 2 +- .../src/architecture/fit-map-string.test.ts | 17 +++++++++++++++++ graph-ui/src/architecture/strings.ts | 2 ++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 graph-ui/src/architecture/fit-map-string.test.ts 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
Routes / Services

How the services connect

One square per declared service. Follow a connection to see the configuration and code behind it.

- { + { 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
Repository atlas / {view === 'entryPoints' ? 'entry points' : view}

{model.title}

{viewNotes[view]}

- +
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* `${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}` },