Note
Currently processing new changes in this PR. This may take a few minutes, please wait...
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
63f607c6-8f26-4c57-91cc-ada94affb727
📥 Commits
Reviewing files that changed from the base of the PR and between c97056f29b86d4e5fa9053f143f3948846d94499 and 0a47abf3b71b52d14295aea7437f66a2c4bb82b1.
⛔ Files ignored due to path filters (3)
docs/user/images/server-page.pngis excluded by!**/*.pngdocs/user/images/server-resources.pngis excluded by!**/*.pngdocs/user/images/server-running-here.pngis excluded by!**/*.png
📒 Files selected for processing (1)
dashboard/src/collections/data-boundaries.static.test.ts
| 1 | ___________________________________________________________________ |
| 2 | < Your PR title says 'refactor'. My diff viewer says 'crime scene'. > |
| 3 | ------------------------------------------------------------------- |
| 4 | \ |
| 5 | \ (\__/) |
| 6 | (•ㅅ•) |
| 7 | / づ |
📝 Summary
Summary by CodeRabbit
- New Features
- Server detail pages now show CPU, memory, network, and disk metrics, with selectable history ranges and current readings when available.
- “Running here” rows show per-service CPU and memory usage. Up to five services appear inline; larger lists link to a searchable full list.
- Server resource views distinguish unavailable, stale, and offline readings.
- Documentation
- Updated the server management guide to describe the resource metrics and service usage displays.
The server detail page adds resource charts and current usage, plus CPU and memory readings for services running on a server. The change adds a runtime-service metrics read path and freshness checks, updates verification fixtures, tests, and server documentation.
Changes: Server detail metrics
Layer / File(s) Summary Runtime-service metrics read path
dashboard/src/modules/metrics/metrics.ts,dashboard/src/modules/metrics/metrics.server.ts,dashboard/src/modules/metrics/metrics.functions.ts,dashboard/src/modules/metrics/metrics.queries.ts,dashboard/src/collections/data-boundaries.static.test.tsAdds a validated runtime-service metrics input, an access-checked history reader, a GET server function, and query options keyed by organization, service, and time range. Freshness and usage calculations
dashboard/src/routes/_protected/cloud/$organizationSlug/_org/~/servers/-components/server-now.ts,.../server-now.test.ts,.../server-meters.tsx,.../server-usage.ts,.../server-usage.test.tsserverNownow accounts for query age when checking freshness. New helpers calculate service usage for one server and produce disk breakdown segments.Server Resources panel
dashboard/src/routes/_protected/cloud/$organizationSlug/_org/~/servers/-components/server-resources.tsx,.../server-resources.test.tsxAdds selectable historical ranges and current CPU, memory, network, and disk displays. Tests cover fresh values, failed refreshes, and stale cached reads. Server detail and service rows
dashboard/src/routes/_protected/cloud/$organizationSlug/_org/~/servers/$serverId.tsx,.../service-usage.tsx,.../service-usage.test.tsx,dashboard/src/modules/metrics/metrics.verify-fixture.ts,.../metrics.verify-fixture.test.ts,dashboard/src/modules/runtime/runtime-watch.verify-fixture.ts,.agents/skills/verify-dashboard/SKILL.md,docs/user/servers/manage-servers.mdThe server page embeds Resources and shows up to five service rows, with a filtered list for additional services. Fixtures add no-reading and service/container states; tests and documentation cover the updated displays. Priority: ➖ Normal
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Feature
Sequence Diagram(s)
mermaid1 sequenceDiagram 2 participant ServiceRow 3 participant ServiceUsage 4 participant runtimeServiceMetricsQueryOptions 5 participant readRuntimeServiceMetricsServerFn 6 participant readRuntimeServiceMetrics 7 ServiceRow->>ServiceUsage: render usage for a service and server 8 ServiceUsage->>runtimeServiceMetricsQueryOptions: query service metrics 9 runtimeServiceMetricsQueryOptions->>readRuntimeServiceMetricsServerFn: send query input 10 readRuntimeServiceMetricsServerFn->>readRuntimeServiceMetrics: dispatch read through actor context 11 readRuntimeServiceMetrics-->>ServiceUsage: return service history 12 ServiceUsage-->>ServiceRow: display fresh CPU and memory or a dash - New Features
Merge Risk: 🔵 Low · up to 51035
Service usage on a page left open can appear current after its reading expires. This is a bounded display issue that should be fixed or accepted before merging.
Security architecture risk: 🔵 Low · up to 51035
The new read preserves authentication and organization-wide access checks. It can retrieve service history across the authorized organization’s servers, but no cross-organization access or increased privileges were established. Production exposure and some history-retention and cancellation behavior remain unverified.
Retained concerns No architecture-level concerns identified.
Security review details
Security Blast Radius
- inferred — The new endpoint expands selectable runtime-service identities beyond current configuration lookup. Its supported scope is matching service history across the authorized organization’s connected machines, not merely the server displayed by the page. Retention after service removal remains unresolved.
Trust Boundaries and Controls
- observed — Caller-controlled organization and service identifiers pass through actor resolution and organization authorization. The returned organization ID selects downstream runtime connections; namespace/name cannot select a different organization’s runtime session.
Resilience and Maintainability Implications
- observed — The new caller inherits the unchanged scoped read lifecycle. Each runtime session has independent registration and finalization, and pairing cancellation is scoped by organization and generation. Client closure provides cancellation containment, but exact transport-abort timing for metricHistory is not established.
Pre-merge checks · Passed 4 · Failed 1
Failed Failed checks (1 warning)
Check name Status Explanation Resolution Docstring Coverage Warning Docstring coverage is 53.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 18 files. (2 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold. Passed Passed checks (4 passed)
Check name Status Explanation Title check Passed The title clearly summarizes the main change: adding Server resource data and per-Service usage to the Server page. Description check Passed The description directly explains the new Resources section, live metrics, disk breakdown, and Running here Service usage shown by the changeset. Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 53.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 18 files. (2 skipped: 2 unsupported.)
- Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.