Skip to content

Add np settings effective-sizing, and pin the heatmap axis order - #176

Merged
Sev7eNup merged 1 commit into
mainfrom
feat/cli-effective-sizing
Aug 9, 2026
Merged

Add np settings effective-sizing, and pin the heatmap axis order#176
Sev7eNup merged 1 commit into
mainfrom
feat/cli-effective-sizing

Conversation

@Sev7eNup

@Sev7eNup Sev7eNup commented Aug 9, 2026

Copy link
Copy Markdown
Owner

np settings effective-sizing (#89)

The effective-sizing endpoint shipped with a frontend client only. CLAUDE.md requires both clients, and this endpoint earns it more than most read-only routes: with Performance:ManualTuning false (the default), np settings get Engine reports the inert preset from configuration rather than the numbers the process is running on. There was no way to answer "what is this host actually sized to" without a browser.

MCP stays out deliberately — it has no admin-settings tools at all, and the endpoint is already recorded in that known-gaps list.

The table renders each resolved value next to the constraint that produced it (Cpu/Ram/Floor/Ceiling/Manual), surfaces the pending mode only when the saved switch differs from the booted one, and prints undetected memory as CPU-only sizing rather than 0 GB — a degraded plan that ignored RAM reads nothing like a host with no memory.

Heatmap regression test (#77)

The numeric-sort fix shipped without one. The axis was ordered with a bare .sort(), so [1, 2, 10] came out as [1, 10, 2] and every heatmap crossing a digit boundary drew its cells under the wrong time. The existing heatmap fixture uses a single timestamp and passes against the buggy code; the new test fails against it (verified by reverting the fix).

Note for triage — a guard that should have caught #89

EndpointClientCoverageTests exists precisely to enforce "every endpoint needs both clients", and it passed. IsCovered lets a client-side wildcard satisfy an endpoint's literal segment, so the CLI's parameterized api/admin/settings/{section} call silently "covered" every literal sub-route beneath it.

I measured a strict fix (client * only matches endpoint *): it surfaces ~7 more routes, but a mix of real gaps and false positives needing per-route investigation. That is its own change, not part of this one, so it is not included here — worth a separate issue.

Verification

  • dotnet test tests/NodePilot.Cli.Tests — 484 passed.
  • npx vitest run src/__tests__/pages/MetricsPage.test.tsx — 8 passed; the new case fails against the pre-fix sort.

Closes #89
Closes #77

… order

The effective-sizing endpoint shipped with a frontend client only. CLAUDE.md
requires every API endpoint to have both clients, and this one is worth more
from the CLI than most read-only endpoints: with Performance:ManualTuning
false (the default), `np settings get Engine` reports the inert preset from
configuration rather than the numbers the process is running on, so there was
no way to answer "what is this host actually sized to" without a browser.

MCP stays out deliberately - it has no admin-settings tools at all, and the
endpoint is already recorded in that known-gaps list.

The table renders the resolved value next to the constraint that produced it,
and surfaces the pending mode only when the saved switch differs from the
booted one, which is the only case where two numbers are in play. Undetected
memory prints as CPU-only sizing rather than 0 GB - a degraded plan that
ignored RAM reads nothing like a host with no memory.

Also add the regression test the heatmap sort fix shipped without: the axis
was ordered with a bare .sort(), so [1, 2, 10] came out as [1, 10, 2] and
every heatmap crossing a digit boundary drew its cells under the wrong time.
The existing heatmap fixture uses a single timestamp and passes against the
buggy code; this one fails against it.

Closes #89
Closes #77
.RespondWith(Response.Create().WithStatusCode(200).WithBodyAsJson(new
{
manualTuning = false, desiredManualTuning = false,
processorCount = 2, usableMemoryBytes = (long?)null, isDesktop = true,
.RespondWith(Response.Create().WithStatusCode(200).WithBodyAsJson(new
{
manualTuning = false, desiredManualTuning = true,
processorCount = 4, usableMemoryBytes = (long?)null, isDesktop = true,
@Sev7eNup
Sev7eNup merged commit c814694 into main Aug 9, 2026
8 checks passed
@Sev7eNup
Sev7eNup deleted the feat/cli-effective-sizing branch August 11, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants