Skip to content

UI: Centralize alerts, field errors, and status dots - #233

Merged
GitGab19 merged 3 commits into
stratum-mining:mainfrom
Ayush4958:fix/issue-178-ui-refactoring
Aug 11, 2026
Merged

UI: Centralize alerts, field errors, and status dots #233
GitGab19 merged 3 commits into
stratum-mining:mainfrom
Ayush4958:fix/issue-178-ui-refactoring

Conversation

@Ayush4958

@Ayush4958 Ayush4958 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

It solves the issue by centralizing the duplicated UI components scattered across the setup wizard, settings & dashboard. It introduces a unified, scalable design system using class-variance (CV) to eliminate raw Tailwind class duplication.

Closes :- #178

Changes Made

  • New Components :-
    • <Alert>: Replaces 15+ duplicated warning/success/error banners. Supports neutral, info, warning, destructive & success variants with automatic ARIA roles.
    • <FieldError>: Replaces 20+ inline <p className="text-destructive"> form validation error messages across the setup forms.
    • <StatusDot>: Unifies the connection status indicators in the Shell, ConfigurationTab, and ConnectionStatus components.
  • Refactoring: Migrated all Setup Wizard steps, Configuration Tab, and the Unified Dashboard to use the new component suite.

Validation

  • npm run typecheck passes with no unused imports.
  • npm run lint passes with 0 warnings.
  • Tested locally.

@Ayush4958

Copy link
Copy Markdown
Contributor Author

@pavlenex @lucasbalieiro

I had refactored it and check it manually and it works fine
I had not touch any functionality / working function
I purely focused on refactoring the ui component and tried to make them re-usable

PR is ready for review, take time for it
Thanks ....

@lucasbalieiro

Copy link
Copy Markdown
Collaborator

@Ayush4958, thanks. I'll start reviewing it today.

In the meantime, could you rebase the PR and solve the conflicts to avoid adding this merge commits: Merge branch 'main' of https://github.com/stratum-mining/sv2-ui

Because they are polluting the diff that I want to review.

@Ayush4958
Ayush4958 force-pushed the fix/issue-178-ui-refactoring branch from 732219b to 91bb24f Compare August 4, 2026 18:24
@Ayush4958

Copy link
Copy Markdown
Contributor Author

sorry @lucasbalieiro for late reply
I had rebased the PR, Its ready for review
thanks ..

Comment thread src/pages/UnifiedDashboard.tsx
Comment thread src/components/setup/SetupWizard.tsx
Comment thread src/components/setup/SetupWizard.tsx

@lucasbalieiro lucasbalieiro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going in the right direction. I've left a few comments regarding some changes around the drop of the alert for "Review your setup to continue mining. Your saved settings are prefilled".

This might introduce a regression that was fixed in #234.

Please avoid dropping the error messages even if they seem alike, let's focus only on reorganizing the ui components

@Ayush4958

Copy link
Copy Markdown
Contributor Author

thanks for catching,
I had fixes everything and changes are ready to review

@lucasbalieiro
lucasbalieiro force-pushed the fix/issue-178-ui-refactoring branch from e9f2ac1 to 176860e Compare August 10, 2026 16:24

@lucasbalieiro lucasbalieiro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@GitGab19
GitGab19 merged commit ba9d735 into stratum-mining:main Aug 11, 2026
6 checks 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.

3 participants