Repository navigation
PR-Review #377: untested provider SQL, undefined np-input class, duplicated duration-trend query #379
Description
PR: #377
Author: @Sev7eNup — status: merged (2026-09-15, commits 42f2918…cd7c48f)
Automated review findings, severity high/medium only. Low-severity notes were left out on purpose.
-
high —
src/NodePilot.Api/Services/DashboardDurationTrend.cs: the new query is hand-written per provider (three dialects:EXTRACT(EPOCH …)/DATEDIFF_BIG/julianday, plusjsonb_array_elements_text/OPENJSON/json_eachfor the folder scope), buttests/NodePilot.Api.Tests/Controllers/DashboardDurationTrendTests.csusesTestDbFactory.Create()(SQLite in-memory) exclusively and carries noDatabaseIntegrationtrait. The PostgreSQL branch — the production default — and the SQL Server branch are executed by no test anywhere, not even byscripts/Test-DatabaseProviders.ps1(which filtersCategory=DatabaseIntegration). A dialect or quoting mistake breaksGET /api/stats/duration-trend(including its RBAC folder-scope predicate) and is only discoverable on a real deployment. Suggestion: give the test a[Trait("Category","DatabaseIntegration")]theory overpostgres/sqlserverviaProviderTestDatabase, mirroringExecutionDispatchOutboxClaimerTests. -
medium — CI wiring for the new provider tests (
.github/workflows/ci.ymluntouched):ExecutionDispatchOutboxClaimerTests,ProviderMigrationTestsandStartupRecoveryProviderTestsallAssert.Skip/SkipUnlessunlessNODEPILOT_TEST_POSTGRES/NODEPILOT_TEST_SQLSERVERare set. CI sets neither, andscripts/nightly-tests.ps1does not invokescripts/Test-DatabaseProviders.ps1. So the atomic claim SQL (ExecutionDispatchOutboxClaimer,FOR UPDATE SKIP LOCKED/UPDLOCK,READPAST,READCOMMITTEDLOCK) and the consolidated20260915180058_InitialBaselineare verified only when someone remembers to start Docker locally. Suggestion: run theDatabaseIntegrationcategory in CI against a PostgreSQL instance (the Windows runner image ships one, stopped by default), or at minimum wire the script into the nightly. -
medium —
src/nodepilot-ui/src/components/dashboard/DurationTrend.tsx:82: the workflow selector usesclassName="np-input w-full text-xs mb-2", butnp-inputis not defined anywhere in the repo — this line is its only occurrence (np-btn/np-btn-secondaryin the same file do exist inindex.css). The<select>therefore renders with browser-default styling and breaks in the dark skins. Suggestion: use.input-field(the element sits on an elevated.np-card) or the outline chain plusbg-surface-lowest, persrc/nodepilot-ui/CLAUDE.md. -
medium —
DurationTrend.tsx:37:useQuery(durationTrendQuery(windowHours))is issued unconditionally in addition to the filtered query, only to keep the workflow option list alive. With a workflow selected this runs the full percentile aggregation twice per refresh (once scoped, once across every workflow), and the second result's bucket series is discarded. Suggestion: keep the previous options viaplaceholderData, or read the names from the workflow list the page already has. -
medium —
docs/images/og-image.png(commite603733, "Reduce the og-image file size"): the file grew from 367,397 to 380,187 bytes (+12.8 KB) at unchanged 1280×640 dimensions, so the commit does the opposite of what its message states and the message has no body explaining it. Either the optimizer output was never picked up or the wrong file was committed. Suggestion: re-run the optimization and verify the byte count, or correct the history note.
Automatic review finding — needs triage. Please verify before acting; low-severity observations were deliberately omitted.
Activity
Run the duration-trend query against real providers and style its filter
Sev7eNup commentedon Sep 16, 2026
Addressed in 12f874b (#382, released in 1.4.0): DashboardDurationTrend now runs its scenarios as a DatabaseIntegration theory on real PostgreSQL and SQL Server (passed against PostgreSQL 16 and SQL Server 2022 containers), the filter uses .input-field, and the unfiltered options query only runs while a selected series loads. Still open: running the DatabaseIntegration category in CI or the nightly, and the og-image size note.
Sev7eNup commentedon Sep 22, 2026
Worked through:
DashboardDurationTrendTests.Provider_MatchesTheSqliteScenariosalready carries theDatabaseIntegrationtrait and the postgres/sqlserver theory; what was missing was a CI that sets the environment variable. Run the database provider tests in CI against PostgreSQL #409 adds adatabasejob that starts the Windows runner's PostgreSQL and runs the whole category against it. SQL Server is not on that image, so its cases stay a local concern throughscripts/Test-DatabaseProviders.ps1.np-inputis gone. The class appears only inDashboardPage.test.tsx, asserting it is not used.enabled: !query.data.Everything in this issue is now either done or deliberately out of scope. Closing.