-
-
Notifications
You must be signed in to change notification settings - Fork 272
Show a swarm's own name as its Overview title #4460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -247,11 +247,17 @@ export function formatSwarmId(swarmId: string): string { | |
| } | ||
|
|
||
| /** | ||
| * ID-first title, matching evals (`Run n57bwtsk`): `Swarm` + short route id. | ||
| * Scope (goals / personas) lives in the subtitle, not the title. | ||
| * The name its author gave the swarm, else the ID-first title matching evals | ||
| * (`Run n57bwtsk`): `Swarm` + short route id. Scope (goals / personas) lives in | ||
| * the subtitle, not the title. | ||
| */ | ||
| export function swarmWaveTitle(wave: SwarmWave): string { | ||
| return `Swarm ${formatSwarmId(swarmWaveRouteId(wave))}`; | ||
| // The backend resolves the name per WAVE, so a wave's runs agree. The scan | ||
| // is for legacy rows, whose name falls back to each journey's authoring | ||
| // swarm and can therefore differ across a wave that reused journeys — the | ||
| // newest member wins, as it does for `swarmWaveRouteId`. | ||
| const authored = wave.runs.find((run) => run.swarmName)?.swarmName; | ||
| return authored ?? `Swarm ${formatSwarmId(swarmWaveRouteId(wave))}`; | ||
|
Comment on lines
+255
to
+260
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: printf '%s\n' '--- applicable conventions ---'
for f in /tmp/coderabbit-repo-knowledge/mcpjam-inspector-1d2d9454/*/*.md; do
case "$f" in
*client*|*learnings*) printf '\n--- %s ---\n' "$f"; cat "$f" ;;
esac
done
printf '%s\n' '--- resolver and direct grouping definitions/usages ---'
sed -n '220,275p' mcpjam-inspector/client/src/components/swarms/swarm-overview-panel.tsx
rg -n -C 4 'function groupRunsIntoSwarmWaves|const groupRunsIntoSwarmWaves|swarmWaveRouteId|swarmWaveTitle|groupRunsIntoSwarmWaves' mcpjam-inspector/client/src/components/swarms
printf '%s\n' '--- relevant tests ---'
sed -n '450,535p' mcpjam-inspector/client/src/components/swarms/__tests__/SwarmsTab.overview.test.tsxRepository: MCPJam/inspector Length of output: 45579 🏁 Script executed: printf '%s\n' '--- grouping implementation and run types ---'
sed -n '175,262p' mcpjam-inspector/client/src/components/swarms/swarm-overview-panel.tsx
sed -n '1,175p' mcpjam-inspector/client/src/components/swarms/swarm-overview-panel.tsx
printf '%s\n' '--- swarmName producers and overview contract ---'
rg -n -C 5 'swarmName|swarmRunGroupId|SwarmOverviewRun|SwarmOverview' mcpjam-inspector/client/src mcpjam-inspector/server mcpjam-inspector 2>/dev/null | head -n 260Repository: MCPJam/inspector Length of output: 35545 🏁 Script executed: printf '%s\n' '--- client API types ---'
rg -n -C 12 'export type SwarmOverviewRun|type SwarmOverviewRun|swarmName' mcpjam-inspector/client/src/lib/swarm-api.ts
printf '%s\n' '--- overview query definitions ---'
rg -n -C 8 'getSwarmOverview|swarmName' mcpjam-inspector --glob '*.ts' --glob '*.tsx' | head -n 320Repository: MCPJam/inspector Length of output: 34146 🏁 Script executed: printf '%s\n' '--- repository files containing the overview implementation ---'
git ls-files | rg '(^|/)(journeyRuns|swarm|swarm-insights|swarm-api|swarm-overview).*'
printf '%s\n' '--- exact fixture ordering and field helper ---'
sed -n '55,150p' mcpjam-inspector/client/src/components/swarms/__tests__/SwarmsTab.overview.test.tsx
sed -n '180,240p' mcpjam-inspector/client/src/components/swarms/__tests__/SwarmsTab.overview.test.tsx
printf '%s\n' '--- all direct swarmName assignments in tracked source ---'
rg -n -C 3 'swarmName\s*[:=]' --glob '*.ts' --glob '*.tsx' .Repository: MCPJam/inspector Length of output: 13962 Use the newest run for the wave title. 📍 Affects 2 files
🤖 Prompt for AI AgentsSource: Coding guidelines |
||
| } | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Add failure-path coverage for wave provenance.
This test covers only a successful two-run launch. Add cases for
createSwarmrejection, partial launch followed by retry, and the applicable absent or empty optional-field behavior. Assert that retries do not mint a second wave ID and that launches retain the intended provenance when swarm creation fails.As per coding guidelines, inspector changes must include happy-path, validation-error, error-handling, and null/empty edge-case tests.
🤖 Prompt for AI Agents
Source: Coding guidelines