mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 10:48:20 +00:00
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 <bj@techport.io>
This commit is contained in:
1 parent
ddf7c70fd2
commit
0596fb10cf
4 files changed
+21
-2
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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}');
|
||||
}
|
||||
});
|
||||
@@ -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}` },
|
||||
|
||||
Reference in new issue
Block a user