Skip to content

fix(nav): wire Hosts sidebar link + project Hosts tab#82

Merged
Copxer merged 2 commits into
mainfrom
fix/wire-hosts-nav
May 2, 2026
Merged

fix(nav): wire Hosts sidebar link + project Hosts tab#82
Copxer merged 2 commits into
mainfrom
fix/wire-hosts-nav

Conversation

@Copxer
Copy link
Copy Markdown
Owner

@Copxer Copxer commented May 2, 2026

Small follow-up to specs 026 + 027 — the Hosts CRUD UI is live but the navigation paths to reach it were still gated behind "Phase 6 pending" placeholders.

Summary

  • Sidebar: enable the `Hosts` entry, route to `monitoring.hosts.index`.
  • Sidebar: drop the vestigial `Pipelines` stub (Phase 4 is done; the work folded into Deployments — GitHub workflow runs are pipelines — so two entries for the same view added no value).
  • Project detail page: replace the "phase 6 pending" placeholder on the `Hosts` tab with a project-scoped host list. Mirrors the existing Monitoring tab — same 20-row cap, same "Add host" + "Browse all" header pattern, same status-badge rendering.
  • `ProjectController::show` loads `projectHosts` (with `has_active_token` flag so the warning chip can flag hosts missing a token).

Test plan

  • Sidebar Hosts link routes to `/monitoring/hosts` and renders the index.
  • Sidebar no longer shows a "Pipelines" entry; visual order: Issues & PRs → Deployments → Hosts → Monitoring.
  • Project page Hosts tab renders the empty state when no hosts exist, and the host list when they do.
  • New feature test `test_show_scopes_hosts_to_this_project` locks sibling-project isolation.
  • `vendor/bin/pint --dirty` clean.
  • `php artisan test` — 435 passing (+1 vs main).
  • `npm run build` succeeds.

Out of scope

Container metric rendering on the host detail page — that's spec 028. This PR only wires navigation.

Copxer added 2 commits May 1, 2026 17:31
- Sidebar: enable the `Hosts` entry, route to `monitoring.hosts.index`
  (specs 026 + 027 shipped, the page is live).
- Sidebar: drop the vestigial `Pipelines` stub. Phase 4 is done and the
  work folded into Deployments — GitHub workflow runs are pipelines —
  so we ship one entry rather than maintain two views of the same data.
- Project detail page: drop the "phase 6 pending" placeholder on the
  Hosts tab and render a project-scoped host list (mirrors the
  Monitoring tab). Includes "Add host" link with `?project_id=N`
  preselect and a "Browse all" link to the cross-project index.
- ProjectController loads `projectHosts` (cap 20, with active-token
  flag) alongside the existing `projectMonitors`.
- Test: `test_show_scopes_hosts_to_this_project` locks sibling-project
  isolation. Full suite 435 passing.
Hosts (`monitoring.hosts.index`) and Monitoring (`monitoring.websites.index`)
both lit up at the same time because the active-detection was matching on
just the first segment of the route name (`monitoring.*`). Switch to the
full prefix excluding the action segment — `monitoring.hosts.*` for Hosts,
`monitoring.websites.*` for Monitoring — so the two stop colliding.

Single-segment routes like `overview` keep the exact-match path; nothing
else regresses.
@Copxer Copxer merged commit db29317 into main May 2, 2026
1 check passed
@Copxer Copxer deleted the fix/wire-hosts-nav branch May 2, 2026 00:45
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.

1 participant