feat: allowlist tests, migration split, freshness memoization, sidebar widget collapse - #1008
Open
wheval wants to merge 1 commit into
Open
feat: allowlist tests, migration split, freshness memoization, sidebar widget collapse#1008wheval wants to merge 1 commit into
wheval wants to merge 1 commit into
Conversation
…r widget collapse - test(provider-allowlist): add unit tests covering allow/deny/edge cases for the ProviderAllowlist service (StellaBridge#970) - refactor(migrations): split the metrics aggregation pipeline migration into one timestamped file per table under migrations/ (StellaBridge#971) - fix(useFreshness): memoize the composite freshness hook and stabilize the refetch callback so consumers stop re-rendering infinitely (StellaBridge#972) - feat(metrics-sidebar): allow collapsing individual pinned metric widgets with persisted per-widget state (StellaBridge#973)
|
@wheval Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
This PR addresses four issues in one changeset. Each area is self-contained and independently tested.
Closes #970
Closes #971
Closes #972
Closes #973
#970 — test: unit tests for ProviderAllowlist service
Adds
backend/tests/services/providerAllowlist.service.test.tswith focused coverage of allow, deny, and edge cases (empty/duplicate entries, case handling, cache refresh, and audit/logging side effects) using an in-memory knex fake and mocked audit + logger dependencies. No production code changes.#971 — refactor: modularize schema migrations under migrations/
Splits the single
038_metrics_aggregation_pipeline.tsmigration (which created three independent tables) into one timestamped migration per table, following the repo'smigrate:makenaming convention:metric_data_pointsmetric_rollupsmetric_retention_policies(retains the retention-policy seed)Column definitions, indexes, and seed data are preserved exactly.
migrate:validatereports all migration files OK.#972 — fix: infinite re-render in useFreshness hook
Introduces a memoized composite
useFreshnesshook whose returned object keeps a stable identity across renders: derived values are computed withuseMemo,refetchis wrapped inuseCallback, and empty collections reuse module-level constants so identity is stable while loading.FreshnessMonitoringis updated to consume the composite hook and to memoize thetargetsarrays it forwards intouseRefreshControls/RefreshControls, removing the unstable array-literal churn that fed the re-render loop. Adds a referential-stability regression test.#973 — feat: collapse Metrics Sidebar widgets
Adds per-widget collapse to the Metrics Sidebar. The store tracks a persisted
collapsedIdslist with atoggleWidgetCollapse(id)action (cleaned up on unpin); eachPinnedMetricCardgains an accessible chevron toggle (aria-expanded, descriptivearia-label) that hides the value/trend/category while keeping the label. New props are optional, so other consumers of the card are unaffected.Validation
migrate:validatepasses.