Skip to content

gstack DashBoard Review#193

Open
GTC6244 wants to merge 6 commits intonextfrom
GTC6244/dashboard-ceo-review
Open

gstack DashBoard Review#193
GTC6244 wants to merge 6 commits intonextfrom
GTC6244/dashboard-ceo-review

Conversation

@GTC6244
Copy link
Copy Markdown
Contributor

@GTC6244 GTC6244 commented Mar 27, 2026

Summary

  • Split monolithic lit-static/dapps/dashboard/app.js (1553 lines) into 9 focused ES modules
  • auth.js — session management, cached API client singleton, theme, login flow
  • ui-utils.js — escapeHtml, clipboard, modals, error classification (formatError/logError)
  • billing.js — Stripe integration, payment integrity, balance display
  • groups.js — group CRUD, multi-select builders for permission modals
  • keys.js — usage key CRUD, 7-field permission modal
  • actions.js — IPFS action table, add/edit/delete
  • wallets.js — wallet table, create wallet
  • runner.js — Action Runner with CodeJar lazy loading
  • app.js — entry point orchestrating all modules
  • Zero behavior change — pure refactor with module-scoped state replacing globals
  • Includes bug fixes: Promise.allSettled for preload error visibility, "Balance unavailable" fallback, "Unable to connect to API" error wrapping, save button disable-on-click pattern

Test Coverage

Pure refactor — no new codepaths introduced. All functions moved without modification.
No JS test framework in this Rust monorepo (vanilla ES modules served statically).

Pre-Landing Review

No issues found. 2 informational dead exports (keyPreview, renderMetadataList) are pre-existing from the monolith.

Design Review

Design Review (lite): 0 findings. Pure refactor with no visual changes.

Plan Completion

Plan: 2026-03-26-dashboard-guided-onboarding.md (CEO plan)
All 17 PR1 items DONE: module split, error classification, preload error banner, billing balance fallback, client caching, save button disable pattern, structured logging.
PR2 (Permission Wizard) and PR3 (copy-as-curl, templates, shortcuts) are intentionally deferred to follow-up PRs.

QA Results

QA found 0 issues. Health score: 95/100.

  • All 9 ES modules load with HTTP 200
  • Zero console errors across all interactions
  • Login flow, tab switching, form validation all work
  • Theme toggle (light/dark) works
  • Mobile viewport (375x812) responsive
  • Action Runner validation works

TODOS

No TODO items completed in this PR.

Test plan

  • All 9 ES modules serve HTTP 200
  • Zero console errors
  • Login page renders and validates correctly
  • Theme toggle works (light ↔ dark)
  • Mobile viewport responsive
  • Action Runner validation (no auth, no code)

🤖 Generated with Claude Code

GTC6244 and others added 3 commits March 26, 2026 22:23
Split 1553-line monolith into focused modules:
- ui-utils.js: error classification, clipboard, modals, icons
- auth.js: session state, cached API client singleton, theme, login
- billing.js: Stripe integration with payment integrity fix
- groups.js: multi-select builders, table rendering, CRUD
- keys.js: usage key table, 7-field permission modal, CRUD
- actions.js: IPFS action table, CRUD
- wallets.js: wallet table, CRUD
- runner.js: CodeJar editor, execute/getCid
- app.js: entry point orchestrating init

Bug fixes included:
- getClient() now caches singleton instead of new instance per call
- preloadAllTables uses Promise.allSettled with error banner
- Payment flow: separate confirmPayment catch for integrity
- Billing amount validation: minimum $5.00 (500 cents)
- Error classification: auth/network/server user-friendly messages
- Unified copyToClipboard utility replacing 3 inline patterns
- Button disable-on-click during async operations
- loadBillingBalance shows "Balance unavailable" on error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-review

# Conflicts:
#	lit-static/dapps/dashboard/actions.js
#	lit-static/dapps/dashboard/auth.js
#	lit-static/dapps/dashboard/billing.js
#	lit-static/dapps/dashboard/groups.js
#	lit-static/dapps/dashboard/keys.js
#	lit-static/dapps/dashboard/runner.js
#	lit-static/dapps/dashboard/ui-utils.js
#	lit-static/dapps/dashboard/wallets.js
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 27, 2026 02:47
GTC6244 and others added 3 commits March 26, 2026 22:56
6 items from adversarial review during PR1 ship — mostly pre-existing
patterns from the monolith. P1: initLogin null check. P2: auth ordering,
confirm dialog race. P3: listener leak, form value ordering, async fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Change sed target from app.js to auth.js (where __LIT_API_BASE_URL__
  moved during the module refactor)
- Add actions/setup-node@v4 so npm is available for wrangler-action on
  the self-hosted runner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@GTC6244 GTC6244 changed the title refactor: split dashboard app.js into 9 ES modules gstack DashBoard Review Mar 28, 2026
@GTC6244 GTC6244 self-assigned this Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant