Skip to content

Fix Fleet link navigation in GameServer view#32

Merged
markmandel merged 1 commit into
agones-dev:mainfrom
Fire-furo:fix/gameserver-fleet-link
Jul 9, 2026
Merged

Fix Fleet link navigation in GameServer view#32
markmandel merged 1 commit into
agones-dev:mainfrom
Fire-furo:fix/gameserver-fleet-link

Conversation

@Fire-furo

Copy link
Copy Markdown
Contributor

Type of change

  • 🐛 Bug fix
  • 🚀 New feature / enhancement
  • 📖 Documentation
  • 🧹 Refactoring / cleanup
  • ⚙️ CI / tooling
  • ⚠️ Breaking change

What this PR does

This PR fixes the Fleet link in the GameServer details view.

Previously, the Fleet link was rendered as a plain HTML <a> element, which did not trigger client-side navigation in Headlamp. This change replaces it with Headlamp's Link component, using the registered agones-fleet route to navigate correctly to the Fleet page.

Related issues

Fixes #28

Did you use AI tools in preparing this PR?:
Yes.
Used ChatGPT to discuss the routing issue, verify the use of Headlamp's Link component, and review the PR description. The code was implemented, tested, and verified manually.

Screenshots / recordings

before.mp4
after.mp4

Test plan

Automated checks

  • npm ci
  • npm run build
  • npm run tsc
  • npm run lint
  • npm run format -- --check
  • npm run test

Manual verification

  • Tested in Headlamp against a cluster with Agones installed

  • Verified on a cluster without Agones

(if change affects CRD detection)

RBAC considerations

Notes for reviewers

@Fire-furo Fire-furo force-pushed the fix/gameserver-fleet-link branch from 6f0ff28 to 410b7c5 Compare July 8, 2026 21:44
@markmandel

Copy link
Copy Markdown
Member

@NAME-ASHWANIYADAV I'm seeing this error on the CI lint

Problem running format inside of "."

Any ideas? (Since you set this up 😄 )

Signed-off-by: Adarsh <216428386+Fire-furo@users.noreply.github.com>
@Fire-furo Fire-furo force-pushed the fix/gameserver-fleet-link branch from 410b7c5 to d8221d3 Compare July 9, 2026 06:11
@NAME-ASHWANIYADAV

Copy link
Copy Markdown
Contributor

Hey @markmandel, the "Problem running format" error means the contributor's changed file(s) have Prettier formatting violations. The CI step npm run format -- --check catches this.

@Fire-furo to fix this, just run:
npm run format

This will auto-fix the formatting, then commit and push the changes. The CI should pass after that. 👍

@Fire-furo

Copy link
Copy Markdown
Contributor Author

Hi @markmandel @NAME-ASHWANIYADAV,

I have fixed the Prettier formatting violations, and all checks (build, tsc, lint, format, and test) passed successfully in GitHub Codespaces.

There is another issue I would like to discuss. When I ran these checks on my local Windows machine (I tried multiple Node.js versions: 20.x, 22.x, and 24.x), I encountered the following issue:

Problem running <command> inside of "."
issue

The interesting part is that running the underlying commands directly works:

  • npx tsc --noEmit
  • npx eslint --cache -c package.json --max-warnings 0 --ext .js,.ts,.tsx src
  • npx prettier --config package.json --check src
  • npx vitest -c node_modules/@kinvolk/headlamp-plugin/config/vite.config.mjs

@markmandel

Copy link
Copy Markdown
Member

Hey @markmandel, the "Problem running format" error means the contributor's changed file(s) have Prettier formatting violations. The CI step npm run format -- --check catches this.

@Fire-furo to fix this, just run: npm run format

This will auto-fix the formatting, then commit and push the changes. The CI should pass after that. 👍

As an aside (I can create an issue if you want) - seems like we should provide a better error message (ideally one that explains how to resolve the issue)

@NAME-ASHWANIYADAV

Copy link
Copy Markdown
Contributor

Hi @markmandel @NAME-ASHWANIYADAV,

I have fixed the Prettier formatting violations, and all checks (build, tsc, lint, format, and test) passed successfully in GitHub Codespaces.

There is another issue I would like to discuss. When I ran these checks on my local Windows machine (I tried multiple Node.js versions: 20.x, 22.x, and 24.x), I encountered the following issue:

Problem running <command> inside of "."
issue The interesting part is that running the underlying commands directly works:
  • npx tsc --noEmit
  • npx eslint --cache -c package.json --max-warnings 0 --ext .js,.ts,.tsx src
  • npx prettier --config package.json --check src
  • npx vitest -c node_modules/@kinvolk/headlamp-plugin/config/vite.config.mjs

Hey @Fire-furo, the code change itself looks great!
As for that Windows "Problem running " error you encountered, it's actually a known quirk with the headlamp-plugin CLI wrapper on certain Windows setups where shell resolution fails during internal child process spawning. If you want to troubleshoot it locally, you could try doing a clean npm install (after deleting your node_modules and package-lock.json), running the commands in standard cmd.exe instead of PowerShell, or double-checking your npm version since older ones sometimes struggle with Windows .cmd shims. Either way, since our CI runs on Ubuntu and everything is passing perfectly there, this local dev environment glitch isn't a blocker for your PR at all

@NAME-ASHWANIYADAV

Copy link
Copy Markdown
Contributor

Hey @markmandel, the "Problem running format" error means the contributor's changed file(s) have Prettier formatting violations. The CI step npm run format -- --check catches this.
@Fire-furo to fix this, just run: npm run format
This will auto-fix the formatting, then commit and push the changes. The CI should pass after that. 👍

As an aside (I can create an issue if you want) - seems like we should provide a better error message (ideally one that explains how to resolve the issue)

@markmandel! That "Problem running format" message from the headlamp-plugin CLI is definitely a bit too cryptic right now. We can absolutely create a separate issue to track this, and I'd be more than happy to take it on. My thought is we could add a clear, descriptive hint in the CI workflow's format step that guides contributors when the check fails-something simple like echo "💡 Fix: run 'npm run format' locally, then commit and push." Let me know if that sounds good and I can get the issue spun up!

@markmandel

Copy link
Copy Markdown
Member

My thought is we could add a clear, descriptive hint in the CI workflow's format step that guides contributors when the check fails-something simple like echo "💡 Fix: run 'npm run format' locally, then commit and push." Let me know if that sounds good and I can get the issue spun up!

Love it! Let's do it!

@markmandel markmandel merged commit 312f527 into agones-dev:main Jul 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] GamesServer view - clicking fleet link doesn't work.

3 participants