fix(monitoring): wire project Monitoring tab + reconcile phase-5 placeholders#71
Merged
Merged
Conversation
…eholders
Phase 5 just shipped its first spec (023 — website monitor MVP), but
the codebase still referenced "Phase 5 — coming soon" in several
places where the underlying functionality now exists. This non-spec
fix plugs those gaps + adds a small dev-server self-probe deadlock
warning on the Create form.
- ProjectController::show payload extended with projectMonitors
(websites scoped to the project, capped at 20). Projects/Show.vue
Monitoring tab pendingPhase flipped from 'phase 5' → null and
rendered with a real list, "Add monitor" + "Browse all" CTAs, and
status badges. The MonitorRow shape mirrors the Index/Show pages.
- Monitoring/Websites/Create.vue: small "Tip: monitor /up" hint under
the URL field, plus a self-probe warning that fires when the
entered URL hostname matches window.location.hostname (php artisan
serve's default single-process worker deadlocks on a self-probe;
the hint nudges the user to --workers=4 or a different URL).
- Three command palette entries graduated from disabled → real run
callbacks: go-issues-prs (Phase 2), go-deployments (Phase 4),
go-monitoring (Phase 5 — this PR's primary scope). go-pipelines
stays disabled but its stale "Phase 4" pin becomes a generic "Soon"
since Phase 4 shipped Deployments and Pipelines hasn't been spec'd.
- Welcome.vue: dropped the "— coming with phase 5" qualifier from
the Website performance feature card.
- Extracted websiteStatusTone to resources/js/lib/websiteStyles.ts —
three consumers (Index, Show, Projects/Show Monitoring tab) now
share one source of truth, mirroring the workflowRunStyles pattern
from the project-tabs fix.
Tests: extended test_show_renders_the_project with a projectMonitors
prop assertion + new test_show_scopes_monitors_to_this_project
proving sibling-project monitors don't leak.
Self-review pass via superpowers:code-reviewer; addressed both
substantive recommendations (extract websiteStyles since this is the
3rd consumer, reconcile go-pipelines stale label).
Self-probe warning is non-blocking — the deadlock is recoverable (just
times out), the warning is environment-specific (only --workers=1
defaults), and blocking would frustrate anyone running --workers=4 or
Octane.
Cross-tenant scoping note: projectMonitors uses where('project_id',
\$project->id) without an additional owner check — matches the
existing repository / activity / deployments scoping pattern on the
project show page. Uniform fix when teams ship.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 5 just shipped its first spec (023 — website monitor MVP), but the codebase still referenced "Phase 5 — coming soon" in several places where the underlying functionality now exists. Plus a small dev-server self-probe deadlock warning that came up while testing 023 against a cloudflared tunnel pointing at the same Nexus instance. Non-spec follow-up branch.
Summary
ProjectController::shownow exposesprojectMonitors;Projects/Show.vueflips themonitoringtabpendingPhasetonulland renders a real panel with status badges + "Add monitor" / "Browse all" CTAs.window.location.hostname. Non-blocking hint nudges the user to--workers=4or a different URL sincephp artisan serve's single worker deadlocks when a probe loops back through cloudflared. Plus a new "Tip: monitor/up" hint under the URL field — Laravel ships/upas the framework health endpoint and it's the right URL to monitor.run:go-issues-prs(Phase 2 ✅),go-deployments(Phase 4 ✅),go-monitoring(Phase 5 ✅).go-pipelines's stale "Phase 4" pin became a generic "Soon" since Phase 4 shipped Deployments and Pipelines hasn't been spec'd.@/lib/websiteStyles.ts— three consumers (Index, Show, project-tab Monitoring) now sharewebsiteStatusTone, mirroring theworkflowRunStyles.tspattern from the previous project-tabs fix. The next timeWebsiteStatusgains a case, only one file changes.Test plan
vendor/bin/pint --testpasses.php artisan test— 1 net new passing test (test_show_scopes_monitors_to_this_project); existingtest_show_renders_the_projectextended with ahas('projectMonitors')assertion. Full suite 312 passed (was 310). The 50 failures are env-only POST CSRF (419) baseline; CI passes them.npm run buildclean./projects/{slug}, click Monitoring tab → see the project's monitors with status badges; click Add monitor → URL field shows/uphint + self-probe warning when typing a self-loop URL; ⌘K → Issues / Deployments / Monitoring entries are now active.Self-review notes
Self-review pass via
superpowers:code-reviewer; addressed both substantive recommendations:websiteStyles.ts— reviewer flagged this as the third consumer (the threshold for extraction per the workflowRunStyles precedent).go-pipelinesstale label — was pinned to "Phase 4" even though Phase 4 fully shipped; now reads generic "Soon" since the Pipelines surface (CI-only filter view of workflow runs) hasn't been spec'd. Doing it here keeps the PR's "reconcile stale phase references" theme coherent.Phase 1 caveats deliberately left:
:5173vs Laravel at:8000). The warning surfaces in that case too even though the deadlock is Laravel-only. Cheap (it's just a hint), so the false-positive rate is acceptable.projectMonitorsuseswhere('project_id', $project->id)without an additional owner check. Matches the existing repository / activity / deployments scoping on the project show page; uniform fix when teams ship.disabled: true, soonLabel: 'Phase 4'— still pinned to Phase 4 in the sidebar) and a command palette entry (now generic "Soon"). The sidebar inconsistency is an honest stale carryover but felt out-of-scope for this fix; flag for a future smallchore/PR if it bothers anyone.