Skip to content

feat: add performance budget review for Aegis Dashboard (#44) - #185

Merged
El-swaggerito merged 1 commit into
Raegis-RWA:mainfrom
anthonia01-dev:feature/performance-budget-review
Jul 29, 2026
Merged

feat: add performance budget review for Aegis Dashboard (#44)#185
El-swaggerito merged 1 commit into
Raegis-RWA:mainfrom
anthonia01-dev:feature/performance-budget-review

Conversation

@anthonia01-dev

Copy link
Copy Markdown
Contributor

Description

Implements the performance budget review feature for the Aegis Dashboard (Issue #44).

Changes

Core Logic

  • src/lib/performanceBudget.ts — Typed data model and pure functions for performance budget review:
    • BudgetCheck, BudgetReviewResult, BudgetReviewState types
    • deriveBudgetStatus — maps check results to compliant | warning | breached | unknown
    • filterBudgetResults, tallyBudgetResults, validateBudgetChecks
    • Bulk actions: approve | reject | flag-for-review | clear
    • budgetResultLabel with compliance-safe disclaimer integration

Tests

  • src/lib/performanceBudget.test.ts — 30 unit tests covering all status derivations, custom rules, filtering, tally, selection helpers, bulk actions, value formatting, label generation, and check validation

Fixtures

  • src/lib/fixtures/performanceBudget.ts — 4-row sample queue exercising all statuses

UI Component

  • src/features/diagnostics/components/PerformanceBudgetPanel.tsx — Reusable table with filtering, sorting, saved views, bulk action bar with confirmation flow, and COMPLIANCE_DISCLAIMER on header and action confirmations

SDK Integration

  • Extended IAegisProvider with getPerformanceBudget method
  • Implemented in MockAegisProvider and LiveAegisProvider
  • Mock client in src/lib/aegis/client.ts

Feature Flag

  • Added performanceBudgetReview flag in useFeatureFlags

Documentation

  • docs/performance-budget-review.md — Full contributor guidance with data model, behaviour, edge cases, security assumptions, tests/fixtures checklist, and compliance-safe wording guidance
  • Updated README.md and docs/README.md with links

Acceptance Criteria

  • ✅ Performance budget review is implemented with typed behaviour
  • ✅ Relevant edge cases and failure states are handled (empty checks, unknown results, no selection, duplicate keys, missing fields)
  • ✅ Security and compliance-sensitive assumptions are documented
  • ✅ Tests (30) and fixtures added
  • ✅ README/docs link to the new guidance
  • ✅ Compatible with the rest of the Aegis ecosystem (SDK abstraction, feature flags, compliance disclaimer)

Verification

  • All 455 tests pass
  • Build succeeds with no errors
  • No lint errors

Closes #44

- Add typed performance budget review data model in src/lib/performanceBudget.ts
  - BudgetCheck, BudgetReviewResult, BudgetReviewState types
  - deriveBudgetStatus, filterBudgetResults, tallyBudgetResults pure functions
  - Bulk actions: approve, reject, flag-for-review, clear
  - validateBudgetChecks for internal consistency validation
  - budgetResultLabel with compliance-safe disclaimer integration

- Add unit tests in src/lib/performanceBudget.test.ts (30 tests)
  - Status derivation for all four outcomes
  - Custom rule override, severity ranking, filtering, tally
  - Selection helpers, bulk actions, value formatting
  - Fixture sanity checks

- Add fixtures in src/lib/__fixtures__/performanceBudget.ts
  - 4-row sample queue exercising all statuses and check results

- Add PerformanceBudgetPanel component in src/features/diagnostics/components/
  - Reusable table with filtering, sorting, saved views
  - Bulk action bar with confirmation flow
  - COMPLIANCE_DISCLAIMER on header and action confirmations
  - Empty state with docs link

- Extend SDK provider interface (IAegisProvider) with getPerformanceBudget
  - Implemented in MockAegisProvider and LiveAegisProvider
  - Mock client in src/lib/aegis/client.ts

- Add performanceBudgetReview feature flag in useFeatureFlags

- Add docs/performance-budget-review.md with full contributor guidance
  - Data model, behaviour, edge cases, security assumptions
  - Tests, fixtures, and reviewer checklist
  - Compliance-safe wording guidance

- Update README.md and docs/README.md with links to new documentation

- All 455 tests pass, build succeeds, no lint errors
@El-swaggerito
El-swaggerito merged commit 6e6d7e6 into Raegis-RWA:main Jul 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dashboard performance budget review

2 participants