From 3f29dc5d5e239950143ec7e9f64ef9826810495b Mon Sep 17 00:00:00 2001 From: Bernhard Jackiewicz Date: Sat, 3 Oct 2026 19:00:00 +0200 Subject: [PATCH] fix(ui): name the shown operation in the Behavior Start field Without a requested entry the journey opens with the first entry point (Django: main in manage.py-tpl), so the heading read "What can main call?" while the Start field still offered "Choose an operation...". The field now follows the operation the journey shows. Signed-off-by: Bernhard Jackiewicz --- graph-ui/src/architecture/BehaviorJourney.test.tsx | 8 ++++++++ graph-ui/src/architecture/BehaviorJourney.tsx | 3 ++- graph-ui/src/architecture/SystemArchitecture.test.tsx | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/graph-ui/src/architecture/BehaviorJourney.test.tsx b/graph-ui/src/architecture/BehaviorJourney.test.tsx index b4b065439..031402764 100644 --- a/graph-ui/src/architecture/BehaviorJourney.test.tsx +++ b/graph-ui/src/architecture/BehaviorJourney.test.tsx @@ -110,6 +110,14 @@ describe('behavior journeys', () => { await render(data, { data: undefined, pending: false, error: 'Snapshot changed.' }); expect(container.querySelector('[data-scene]')).toBeNull(); expect(container.textContent).toContain('Snapshot changed.'); }); + it('shows the operation the journey opened with in the Start field, not "Choose an operation"', async () => { + // Without a requested entry the journey falls back to the first entry point (Django: main in manage.py-tpl). + await render(fixture(), { entryId: undefined }); + const start = container.querySelector('[aria-label="Behavior entry point"]')!; + expect(container.querySelector('.behavior-heading h2')?.textContent).toBe('What can operation1 call?'); + expect(start.value).toBe('1'); + expect(start.selectedOptions[0]?.textContent).toBe('operation1 · src/part1.ts'); + }); it('pages only real edges and component lanes within the selected path window', () => { const scene = behaviorJourney(fixture(), { entryId: 1, targetId: 9 }).scene; const page = journeyPage(scene, 6), ids = new Set(page.nodes.map(node => node.id)); diff --git a/graph-ui/src/architecture/BehaviorJourney.tsx b/graph-ui/src/architecture/BehaviorJourney.tsx index 89e873665..83d70431f 100644 --- a/graph-ui/src/architecture/BehaviorJourney.tsx +++ b/graph-ui/src/architecture/BehaviorJourney.tsx @@ -134,7 +134,8 @@ export default function BehaviorJourney({ project, generation, data, entries, ta

{path ? 'Follow one recorded call chain across the parts it touches.' : 'Choose a starting operation. Explore its calls, or follow a path to a destination.'}

-