feat: implement budget utilization dynamic alert thresholds UI - #128
Conversation
|
@nobodieair 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! 🚀 |
|
@nobodieair is attempting to deploy a commit to the Cjay's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Needs changes BudgetMeters.tsx contains duplicate and syntactically invalid component declarations due to merging conflicts.
Reviewed commit: |
There was a problem hiding this comment.
Needs changes
The PR contains several syntax errors and invalid JSX/TypeScript constructs that will prevent compilation.
src/features/budgets/BudgetAlertSettings.tsx:54: Syntax error: unexpected comma in optional chaining or function call (onChange?.clamped, critical)src/features/budgets/BudgetAlertSettings.tsx:62: Syntax error: unexpected comma or invalid call syntax (onChange?.warning, clamped)src/features/budgets/BudgetAlertSettings.tsx:127: Syntax error: invalid template literal or object literal expression for className/style attributes ({gaugeColor}, {h-full}, etc.)src/features/budgets/BudgetMeters.tsx:139: Syntax error: undefined identifier 'track' in ternary expression (track ? dashOffset : dashOffset)src/features/budgets/BudgetMeters.tsx:327: Syntax error: invalid arrow function syntax in useMemo assignment (useMemo<BudgetMeterProps[]>() => ...)
Reviewed commit: a8376d14450895a934334eee30270b60fcf038d1.
There was a problem hiding this comment.
Needs changes
BudgetAlertSettings.tsx contains a syntax error with an unterminated/invalid useEffect hook declaration.
src/features/budgets/BudgetMeters.tsx:231: Syntax error in useEffect hook declaration: missing arrow function syntax (e.g., useEffect(() => { ... }, [thresholds]))
Reviewed commit: 3c869e01614c362f838a913fcefb4aaae516bc49.
There was a problem hiding this comment.
Needs changes
Fix TypeScript compilation errors in types.ts due to an extra quote in AssetCode and clean up file structure discrepancies.
src/features/budgets/types.ts:1: Syntax error: unexpected extra closing quote in AssetCode definition ('ASTRO''').src/features/budgets/BudgetAlertSettings.tsx: File implementation deviates from the required path structure or contains conflicting duplicate component definitions across BudgetAlertSettings.tsx and BudgetMeters.tsx.
Reviewed commit: 8b8653a9e665516850f6e02f47657e6c973fb84a.
|
MergeKeeper review Scope: in scope for linked issue The pull request successfully implements the budget utilization dynamic alert thresholds UI, including the configuration panel, preview gauge, active warnings card, store state management, and updated color tokens. Reviewed commit: |
There was a problem hiding this comment.
Needs changes
The PR contains several syntax errors and typos that prevent successful compilation and runtime execution.
src/features/budgets/types.ts:1: Syntax error: unexpected trailing quote in AssetCode definition ('ASTRO'').src/features/budgets/BudgetMeters.tsx:202: Syntax error: invalid useEffect syntax 'useEffect(() {' instead of 'useEffect(() => {'.plessrc/stores/budget-alert-store.ts:9: Typo in constant name 'DEFAULTHRESHOLDS' vs exported usage.
Reviewed commit: d086b6093c4c42d73224ee5cc196d2d9a99408f3.
|
MergeKeeper merge status Status: blocked Reason: One or more required CI checks failed. Failing checks:
Next steps:
|
There was a problem hiding this comment.
Needs changes
Fix TypeScript compilation errors in types.ts and mock-data.ts
src/features/budgets/types.ts:1: Unexpected extra single quote at the end of AssetCode union type definition ('ASTRO'' instead of 'ASTRO')src/features/budgets/mock-data.ts:3: Typo in constant name MOCK_DEPARTMENT_BuDGETS with lowercase 'u'
Reviewed commit: b39386c663529b7c6658ee34cfb2af9521d14eb5.
|
Needs review Linked to The pull request introduces changes to files outside the scope of issue #29, such as modifications to mock-data.ts, tokens.css, and multiple unrelated functions in BudgetMeters.tsx. Reviewed commit: |
There was a problem hiding this comment.
Needs changes
BudgetAlertSettings.tsx was modified incorrectly, duplicating file contents and containing syntax/compilation issues.
src/features/budgets/BudgetMeters.tsx:329: Malformed code block duplication or stray code found at the bottom of BudgetMeters.tsx causing syntax and build errors.
Reviewed commit: a9dbbdfe8cff1fe82e27d8a065a9a72ecb6491a1.
There was a problem hiding this comment.
Needs changes
The PR introduces compilation errors due to duplicate component definitions and syntax issues in BudgetMeters.tsx.
src/features/budgets/BudgetMeters.tsx:395: Duplicate export of BudgetWarningsCard and malformed JSX outside function body resulting in build syntax errors.
Reviewed commit: 559a4422aebaf89ca9920b34f38e40c4e7c310df.
|
MergeKeeper review unavailable AI provider review response did not contain valid JSON No approval or merge action was taken. |
There was a problem hiding this comment.
Needs changes
BudgetMeters.tsx contains duplicate export blocks and syntax errors due to duplicated JSX card rendering code at the bottom of the file.
src/features/budgets/BudgetMeters.tsx:394: Duplicate truncated JSX card rendering code appears outside of any function scope, causing syntax errors.
Reviewed commit: 64361d5adfeb1207b2693cda5617bff37010e7d1.
There was a problem hiding this comment.
Needs changes
BudgetMeters.tsx contains duplicate and syntactically invalid component declarations due to merging conflicts.
src/features/budgets/BudgetMeters.tsx:326: Syntax error: duplicate and truncated export declarations for BudgetWarningsCard and unclosed JSX fragments.
Reviewed commit: 40f0029242f73c82b5b451e65bd6cf790afdd4e4.
Overview
This PR adds a Budget Utilization Dynamic Alert Thresholds configuration panel and live alerting UI. Operators can configure Warning and Critical percentage limits, receive immediate validation when the thresholds are invalid, and observe budget meters update in real time across all tracked department budgets. The feature uses a lightweight Zustand store, precise percentage sliders, and semantic Tailwind alert tokens for consistent light/dark contrast.
Related Issue
Closes #
Changes
🚦 Dynamic Alert Thresholds & Live Budget Meters
[ADD]
src/stores/budget-alert-store.tswarningThreshold,criticalThreshold, and derived active warning state.[ADD]
src/features/budgets/BudgetAlertSettings.tsx[MODIFY]
src/features/budgets/BudgetMeters.tsx[MODIFY]
src/features/budgets/types.tsBudgetAlertThresholds,BudgetMeterStatus, andActiveBudgetWarningtypes.[MODIFY]
src/features/budgets/mock-data.ts[MODIFY]
src/styles/tokens.cssVerification Results
src/styles/tokens.cssfor consistent alert colorsCloses #29