Skip to content

fix: add host rename form for admins - #149

Merged
rodriguecyber merged 2 commits into
Open-Source-Kigali:developfrom
samuelxanda:feat/124-admin-host-rename
Aug 25, 2026
Merged

fix: add host rename form for admins#149
rodriguecyber merged 2 commits into
Open-Source-Kigali:developfrom
samuelxanda:feat/124-admin-host-rename

Conversation

@samuelxanda

Copy link
Copy Markdown
Contributor

Summary

  • Add a rename action on the host card menu so admins can set a dashboard-friendly display name.
  • Agent hostname stays visible as secondary metadata.
  • Hosts query updates without a full page reload.
  • Empty names are rejected in the UI; VIEWER users do not get the action.

Frontend-only for #124. Depends on the API from #123 / #145 (PATCH /api/hosts/:id and displayName on GET /api/hosts).

Test plan

  • npm run test --workspace=@docksight/web -- src/lib/host-name.test.ts src/services/hosts.test.ts
  • As ADMIN, open Hosts, use the card menu Rename, set a name, Save.
  • Card title, host select, and search show the new name without a reload; hostname remains on the card.
  • Empty / whitespace names are rejected in the form.
  • As VIEWER, Rename is hidden.

Closes #124

Made with Cursor

samuelxanda and others added 2 commits August 24, 2026 22:43
Operators could not set a friendly host name in the dashboard. Add a card-menu form that PATCHes displayName and refreshes the hosts query.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid clearing the cached host list when React Query has no data yet, and keep the agent hostname searchable in container views.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI lite review requested due to automatic review settings August 24, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@samuelxanda samuelxanda changed the title feat: add host rename form for admins fix: add host rename form for admins Aug 24, 2026
@rodriguecyber
rodriguecyber merged commit a26ce58 into Open-Source-Kigali:develop Aug 25, 2026
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.

[Frontend] Add host rename form for admins

3 participants