Skip to content

DevX audit cleanup — UI overhaul, transactions, GovernanceSync, localnet#262

Merged
jorgecuesta merged 2 commits intostagingfrom
feature/devx-audit-cleanup
Mar 29, 2026
Merged

DevX audit cleanup — UI overhaul, transactions, GovernanceSync, localnet#262
jorgecuesta merged 2 commits intostagingfrom
feature/devx-audit-cleanup

Conversation

@jorgecuesta
Copy link
Copy Markdown
Contributor

Summary

Comprehensive DevX audit covering UI consistency, new features, workflow automation, and local development infrastructure across both Provider and Middleman apps.

Transactions System (Provider)

  • New transactions DB table with type/status/trigger enums and migration
  • Workflow wiring: remediateSupplier inserts tx records, transactions table is now source of truth
  • /admin/transactions page with DataTable, search, count chip, +N new polling, migrate history button
  • Request Remediation progress dialog with live polling

GovernanceSync Workflows

  • New GovernanceSync Temporal workflow in both provider-workflows (delegators) and middleman-workflows (providers)
  • Scheduled every 5 minutes, new entries enabled/visible by default, removed entries disabled/hidden
  • Reload button triggers workflow manually via Temporal schedule
  • CDN URL injected via Tiltfile from governance-nginx in dev

UI Polish (Both Apps)

  • Consistent page headers (title + subtitle + border-b) across all admin pages
  • Sidebar: reduced width 16rem → 13rem, reordered routes, consistent active state colors
  • All tables: search with clear X, count chip (countLabel), searchableColumns
  • +N new count polling on: provider keys/delegators/transactions, middleman providers/transactions/suppliers
  • Buttons: descriptive labels, blue filled CTA, mint secondary, red outline destructive

Middleman-Specific

  • New /admin/suppliers page showing all suppliers across all providers with filters by status/provider
  • Settings form redesigned: sections (General, Gateway, Blockchain, Indexer), fixed-width labels, dividers, read-only derived fields, debounced live validation
  • Suppliers route renamed from /app/nodes to /app/suppliers

Provider-Specific

  • Address Group dialog redesign: two-panel layout, endpoint overrides with template interpolation, live validation, collapsible service cards
  • Settings form redesign: sections with reward addresses management, operational funds, read-only blockchain derived fields
  • Login page: particles background, gradient card
  • Delegators: Switch toggle instead of Button

Auth & Wallet

  • Provider: only owner can signIn; Middleman: anyone can signIn (public app)
  • WalletConnection: 15s/60s timeouts, reconnect calls onDisconnect on failure
  • PocketWalletConnection: getBalance now uses app RPC proxy instead of wallet extension

Localnet

  • Full localnet infrastructure: validator, account-init, owner-fund in k8s/tools/localnet/
  • Genesis with 15 staked suppliers, 4 services, 50 generated keys
  • /api/rpc proxy route in both apps, PostgreSQL memory bumped to 1Gi

Shared (packages/ui)

  • Gradient borders → solid borders, service chips single neutral style
  • ServerSummary: DB data overrides indexer, N/A when indexer unavailable
  • OverrideSidebar scroll fix, hydration fix for locale

Test plan

  • Provider admin: verify all pages have consistent headers, search, count chips
  • Provider transactions: verify +N new polling, migrate history button
  • Middleman admin: verify settings form sections, providers table with search/count
  • Middleman admin/suppliers: verify table loads all suppliers with filters
  • GovernanceSync: verify workflow runs on schedule (check Temporal UI), Reload button triggers it
  • Localnet: LOCALNET_ENABLED=true → validator, accounts, owner-fund all start correctly
  • Wallet: verify balance displays correctly via RPC proxy

…vernanceSync, localnet, auth & wallet fixes

Transactions System (Provider)
- New transactions DB table with enums (tx_type, tx_status, tx_trigger)
- Workflow wiring: remediateSupplier inserts tx records, clears remediation on success
- /admin/transactions page with DataTable, search, count chip, +N new polling
- Migrate History button for legacy remediationHistory entries
- Request Remediation progress dialog with polling

Workflow Fixes
- upsertSupplierStatus clears stale ServiceMismatch entries when services match
- remediateSupplier no longer writes txResult to remediationHistory — transactions table is source of truth
- SupplierRemediation child workflow ID includes reasons to prevent collision
- AutoStakeToggle invalidates React Query cache on toggle

GovernanceSync Workflows
- New GovernanceSync Temporal workflow in both provider-workflows (delegators) and middleman-workflows (providers)
- Scheduled every 5 minutes via bootstrap, new entries enabled/visible by default
- Reload button triggers workflow manually via Temporal schedule trigger
- Replaced inline CDN fetch logic in server actions with workflow delegation
- Tiltfile patches CDN URL from governance-nginx for workflow pods

UI Polish (Provider — All Pages)
- Consistent headers: title + subtitle + border-b separator across all admin pages
- Sidebar: reordered routes, active state uses bg-sidebar-active-bg/text-sidebar-active-text
- ThemeToggle added to provider topbar
- All tables: search input with clear X button, count chip (countLabel), searchableColumns
- DataTable: new props headerLeft, countLabel, clear button, array/object search in globalFilterFn
- Buttons: all "Add New" → descriptive labels, blue filled CTA
- Keys page: Import/Export/Request Remediation/Clear Remediation/Auto Stake pill layout
- Delegators: Switch toggle instead of Button for enable/disable
- Services table: added Service ID column, protocol chips restyled

UI Polish (Middleman — All Pages)
- Consistent page headers with border-b, title, subtitle across admin pages
- Settings form fully redesigned: sections (General, Gateway, Blockchain, Indexer), fixed-width labels, dividers, read-only derived fields as spans, debounced live validation for RPC/Indexer
- Suppliers route renamed from /app/nodes to /app/suppliers, sidebar active state fixed
- New /admin/suppliers page showing all suppliers across all providers with filters, search, +N new polling
- DataTable props added to providers and transactions tables
- Buttons: New Stake (blue) | Import Suppliers (mint) | Unstake (red outline)

+N New Count Polling
- Added to: provider keys, provider delegators, provider transactions, middleman providers, middleman transactions, middleman admin suppliers
- Count query every 10s, blue pulsing "+N new" button to refresh

Address Group Dialog Redesign (Provider)
- Two-panel layout (10/14 cols), 1100px wide, border separator, fixed footer
- Endpoint overrides: editable inputs per endpoint per service, template interpolation, unresolved variable warnings
- endpointOverrides field added to address_group_services table (JSON), wired through DAL, domain handler, form
- Service cards: collapsible with chevron animation, flash effect on new service
- Live validation: address format, duplicates, total <= 100%, URL schemes
- Default propagation: changing default supplier share/rev shares propagates to uncustomized services
- Dirty detection: JSON compare (not react-hook-form isDirty which misses array changes)

Settings Form Redesign (Provider)
- Sections: General, Reward Addresses, Operational Funds, Blockchain, Indexer
- New fields: ownerEmail (editable), ownerIdentity (read-only), initialOperationalFunds, minimumOperationalFunds
- Reward addresses: individual inputs with live validation, add/remove
- Blockchain derived: Chain ID, Min Stake, App Identity, Height as read-only text
- Save button disabled when no changes or has errors

Auth & Security
- Provider auth: only owner can signIn
- Middleman auth: anyone can signIn (public app UI), removed signIn check
- Provider CurrentUser: shows "Access denied" toast when non-owner tries to sign in
- WalletConnection: reconnect calls onDisconnect when reconnect fails, 15s/60s timeouts
- PocketWalletConnection: getBalance now uses app RPC proxy instead of wallet extension

Localnet Setup
- Validator, account-init, owner-fund infrastructure in k8s/tools/localnet/
- Genesis with 15 staked suppliers, 4 services, min_stake 10 POKT
- 50 generated keys, import files for UI upload
- LOCALNET_ENABLED toggle, conditional Tiltfile includes
- /api/rpc proxy route in both apps for client-side RPC calls
- PostgreSQL memory bumped to 1Gi, pool.on('error') for PG disconnect resilience
- Governance nginx serves local delegator.json and provider.json

Shared (packages/ui)
- Sidebar width reduced from 16rem to 13rem, mobile from 18rem to 16rem
- Gradient borders replaced with solid borders throughout
- Service chips: single neutral style
- Connect Wallet button: secondary → default (blue filled)
- AppTopBar gap reduced, hydration fix for roundAndSeparate locale
- OverrideSidebar: h-[100vh] overflow-auto for scroll fix, offset updated for new sidebar width
- ServerSummary: DB data always overrides indexer data, rewards show N/A when indexer unavailable
@jorgecuesta jorgecuesta self-assigned this Mar 28, 2026
@jorgecuesta jorgecuesta added bug Something isn't working enhancement New feature or request provider database middleman release Trigger staging deploy on merge to staging labels Mar 28, 2026
@jorgecuesta jorgecuesta merged commit ee5acec into staging Mar 29, 2026
6 checks passed
@jorgecuesta jorgecuesta deleted the feature/devx-audit-cleanup branch March 29, 2026 03:39
jorgecuesta added a commit that referenced this pull request Mar 29, 2026
* feat: comprehensive DevX audit — UI overhaul, transactions system, GovernanceSync, localnet, auth & wallet fixes (#262)

* feat: comprehensive DevX audit — UI overhaul, transactions system, GovernanceSync, localnet, auth & wallet fixes

Transactions System (Provider)
- New transactions DB table with enums (tx_type, tx_status, tx_trigger)
- Workflow wiring: remediateSupplier inserts tx records, clears remediation on success
- /admin/transactions page with DataTable, search, count chip, +N new polling
- Migrate History button for legacy remediationHistory entries
- Request Remediation progress dialog with polling

Workflow Fixes
- upsertSupplierStatus clears stale ServiceMismatch entries when services match
- remediateSupplier no longer writes txResult to remediationHistory — transactions table is source of truth
- SupplierRemediation child workflow ID includes reasons to prevent collision
- AutoStakeToggle invalidates React Query cache on toggle

GovernanceSync Workflows
- New GovernanceSync Temporal workflow in both provider-workflows (delegators) and middleman-workflows (providers)
- Scheduled every 5 minutes via bootstrap, new entries enabled/visible by default
- Reload button triggers workflow manually via Temporal schedule trigger
- Replaced inline CDN fetch logic in server actions with workflow delegation
- Tiltfile patches CDN URL from governance-nginx for workflow pods

UI Polish (Provider — All Pages)
- Consistent headers: title + subtitle + border-b separator across all admin pages
- Sidebar: reordered routes, active state uses bg-sidebar-active-bg/text-sidebar-active-text
- ThemeToggle added to provider topbar
- All tables: search input with clear X button, count chip (countLabel), searchableColumns
- DataTable: new props headerLeft, countLabel, clear button, array/object search in globalFilterFn
- Buttons: all "Add New" → descriptive labels, blue filled CTA
- Keys page: Import/Export/Request Remediation/Clear Remediation/Auto Stake pill layout
- Delegators: Switch toggle instead of Button for enable/disable
- Services table: added Service ID column, protocol chips restyled

UI Polish (Middleman — All Pages)
- Consistent page headers with border-b, title, subtitle across admin pages
- Settings form fully redesigned: sections (General, Gateway, Blockchain, Indexer), fixed-width labels, dividers, read-only derived fields as spans, debounced live validation for RPC/Indexer
- Suppliers route renamed from /app/nodes to /app/suppliers, sidebar active state fixed
- New /admin/suppliers page showing all suppliers across all providers with filters, search, +N new polling
- DataTable props added to providers and transactions tables
- Buttons: New Stake (blue) | Import Suppliers (mint) | Unstake (red outline)

+N New Count Polling
- Added to: provider keys, provider delegators, provider transactions, middleman providers, middleman transactions, middleman admin suppliers
- Count query every 10s, blue pulsing "+N new" button to refresh

Address Group Dialog Redesign (Provider)
- Two-panel layout (10/14 cols), 1100px wide, border separator, fixed footer
- Endpoint overrides: editable inputs per endpoint per service, template interpolation, unresolved variable warnings
- endpointOverrides field added to address_group_services table (JSON), wired through DAL, domain handler, form
- Service cards: collapsible with chevron animation, flash effect on new service
- Live validation: address format, duplicates, total <= 100%, URL schemes
- Default propagation: changing default supplier share/rev shares propagates to uncustomized services
- Dirty detection: JSON compare (not react-hook-form isDirty which misses array changes)

Settings Form Redesign (Provider)
- Sections: General, Reward Addresses, Operational Funds, Blockchain, Indexer
- New fields: ownerEmail (editable), ownerIdentity (read-only), initialOperationalFunds, minimumOperationalFunds
- Reward addresses: individual inputs with live validation, add/remove
- Blockchain derived: Chain ID, Min Stake, App Identity, Height as read-only text
- Save button disabled when no changes or has errors

Auth & Security
- Provider auth: only owner can signIn
- Middleman auth: anyone can signIn (public app UI), removed signIn check
- Provider CurrentUser: shows "Access denied" toast when non-owner tries to sign in
- WalletConnection: reconnect calls onDisconnect when reconnect fails, 15s/60s timeouts
- PocketWalletConnection: getBalance now uses app RPC proxy instead of wallet extension

Localnet Setup
- Validator, account-init, owner-fund infrastructure in k8s/tools/localnet/
- Genesis with 15 staked suppliers, 4 services, min_stake 10 POKT
- 50 generated keys, import files for UI upload
- LOCALNET_ENABLED toggle, conditional Tiltfile includes
- /api/rpc proxy route in both apps for client-side RPC calls
- PostgreSQL memory bumped to 1Gi, pool.on('error') for PG disconnect resilience
- Governance nginx serves local delegator.json and provider.json

Shared (packages/ui)
- Sidebar width reduced from 16rem to 13rem, mobile from 18rem to 16rem
- Gradient borders replaced with solid borders throughout
- Service chips: single neutral style
- Connect Wallet button: secondary → default (blue filled)
- AppTopBar gap reduced, hydration fix for roundAndSeparate locale
- OverrideSidebar: h-[100vh] overflow-auto for scroll fix, offset updated for new sidebar width
- ServerSummary: DB data always overrides indexer data, rewards show N/A when indexer unavailable

* fix(ci): branch-gate always passes for non-main PRs, remove standalone workflow

* chore(deploy): update staging image to ee5acec

* feat(keys): enhance filters, export tracking, key generation, and UI overhaul (#261)

* feat(keys): enhance filters, export tracking, and key generation

- Add owner/delegator filters to keys table with "None" option and combinable filter support
- Fix FilterDropdown to upsert per-column filters instead of replacing all
- Add search input across key address, owner, and delegator fields
- Show filtered key count in table header
- Redesign export form with multi-filter support (states, owner, delegator, date range, export status)
- Add exportedAt/exportCount columns to keys table with migration
- Add key generation flow (select address group + count, download JSON)
- Add showAvatar prop to Address component; apply to Owner column and key detail
- Fix OverrideSidebar scroll by switching from absolute to fixed positioning

* fix(keys): code review fixes, UI overhaul for import/export/generate modals

- Add zod validation on CountKeysForExport/ExportKeys server actions
- Fix useEffect infinite loop: debounce + serialize selectedStates in ExportForm
- Filter empty ownerAddress strings in listDistinctOwnerAddresses query
- Simplify Key type (remove unnecessary Omit hack), fix fixture
- Convert Import/Export/Generate from route-based OverrideSidebar to true Dialog modals
- 2-column layout (label left, input right) across all 3 forms
- Import: redesigned dropzone with state feedback (blue=loaded, red=error)
- Export: collapsible example output, summary card with green/yellow border state
- Generate: collapsible example output with syntax-highlighted JSON
- Remove toast notifications from ImportProcess, show errors inline
- Disable Import Keys button until address group and file are selected
- Client-side data fetching in modals (no more route navigation)

---------

Co-authored-by: Jorge Cuesta <jorge.s.cuesta@gmail.com>

* chore(deploy): update staging image to 2c90d8f

* chore(release): prepare v0.8.0 mainnet overlays [skip ci]

---------

Co-authored-by: Jorge S. Cuesta <jorge.s.cuesta@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alan Rojas <alan2rm7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working database enhancement New feature or request middleman provider release Trigger staging deploy on merge to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant