Files
bzzz/NEXT_BUILD_NOTES.md
anthonyrawlins be761cfe20 Enhance deployment system with retry functionality and improved UX
Major Improvements:
- Added retry deployment buttons in machine list for failed deployments
- Added retry button in SSH console modal footer for enhanced UX
- Enhanced deployment process with comprehensive cleanup of existing services
- Improved binary installation with password-based sudo authentication
- Updated configuration generation to include all required sections (agent, ai, network, security)
- Fixed deployment verification and error handling

Security Enhancements:
- Enhanced verifiedStopExistingServices with thorough cleanup process
- Improved binary copying with proper sudo authentication
- Added comprehensive configuration validation

UX Improvements:
- Users can retry deployments without re-running machine discovery
- Retry buttons available from both machine list and console modal
- Real-time deployment progress with detailed console output
- Clear error states with actionable retry options

Technical Changes:
- Modified ServiceDeployment.tsx with retry button components
- Enhanced api/setup_manager.go with improved deployment functions
- Updated main.go with command line argument support (--config, --setup)
- Added comprehensive zero-trust security validation system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-31 10:23:27 +10:00

2.1 KiB

BZZZ Next.js Build Output Location Notes

Issue Description

The Next.js build process for BZZZ's web UI has inconsistent output locations, causing misalignment between generated files and where BZZZ expects them.

Correct Process

Build Output Location

  • Source directory: /home/tony/chorus/project-queues/active/BZZZ/install/config-ui/
  • Build command: npm run build (from config-ui directory)
  • Actual build output: /home/tony/chorus/project-queues/active/BZZZ/install/config-ui/pkg/web/static/
  • Expected by BZZZ embed: /home/tony/chorus/project-queues/active/BZZZ/pkg/web/static/

Correct Sync Command

# From BZZZ root directory
cp -r install/config-ui/pkg/web/static/* pkg/web/static/

Go Embed Configuration

  • Location: /home/tony/chorus/project-queues/active/BZZZ/pkg/web/embed.go
  • Directive: //go:embed *
  • Serves from: pkg/web/ directory (including static/ subdirectory)

Complete Build & Deploy Process

# 1. Clean and rebuild Next.js UI
cd install/config-ui
rm -rf .next pkg/
npm run build

# 2. Sync to Go embed location
cd ../..
cp -r install/config-ui/pkg/web/static/* pkg/web/static/

# 3. Rebuild Go binary with embedded files
go build -o build/bzzz-1.0.2 .

# 4. Deploy to cluster (if needed)
./deploy-cluster.sh

Known Issues

CSS Build Issues

  • Tailwind CSS purging may exclude custom classes not detected as used
  • CSS variables in globals.css may not appear in final build
  • Theme toggle component exists but may not be included in build

Troubleshooting

  1. Verify build output location: ls -la install/config-ui/pkg/web/static/
  2. Check embedded files: ls -la pkg/web/static/
  3. Verify CSS content: grep -l "input-field" pkg/web/static/_next/static/css/*.css
  4. Check for CSS variables: grep "--bg-secondary\|--border-defined\|--text-primary" pkg/web/static/_next/static/css/*.css

Historical Context

This alignment issue has occurred multiple times. The Next.js export process creates files in a nested pkg/web/static/ structure within the config-ui directory, not directly in the out/ directory as typically expected.

Date

2025-01-29