upskill-event-manager/CLAUDE.md
bengizmo 9bb104eea8 docs: Add comprehensive deployment reports and testing documentation
- Created detailed test report documenting 71% test pass rate
- Added deployment summary with all completed work
- Updated CLAUDE.md with navigation/breadcrumb implementation notes
- Documented test user credentials and outstanding issues
- Added scripts for creating test users and trainer pages

Key findings:
- Registration form refactor successfully deployed
- 4/7 trainer pages accessible on staging
- Navigation/breadcrumb systems need template integration
- HQ fields missing from registration form (needs investigation)

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-30 17:16:53 -03:00

9.9 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

[... existing content remains unchanged ...]

Memory Entries

  • Do not make standalone 'fixes' which upload separate from the plugin deployment. Instead, always redeploy the whole plugin with your fixes. Before deploying, always remove the old versions of the plugin. Always activate and verify after plugin upload
  • Always use the deployment scripts to upload, activate and verify plugins for code changes
  • The deployment process now automatically clears Breeze cache after plugin activation through wp-cli. This ensures proper cache invalidation and prevents stale content issues.
  • Communication Templates system uses a modal interface with JavaScript override after wp_footer() to ensure external JS doesn't conflict. Scripts load on communication-templates page only.
  • When testing the UI, use playwright + screenshots which you inspect personally to verify that your features are working as intended.
  • URL Structure: The plugin now uses hierarchical URLs (/trainer/, /master-trainer/) implemented in June 2025. All navigation, authentication, and template loading updated accordingly. Backward compatibility maintained with 301 redirects.
  • CSS Prevention System: ALWAYS run bin/pre-deployment-check.sh before any deployment. This prevents broken templates from reaching users. All templates MUST have get_header()/get_footer() calls.
  • Deployment and Verification (2025-06-17): Use scripts/deploy-to-staging.sh for deployments. Always run scripts/verify-plugin-fixes.sh after deployment. Plugin must be reactivated to create missing pages. Legacy redirects working at 100% success rate. Certificate reports 404 issue resolved.
  • Plugin Fixes Status: Certificate reports 404 error FIXED, legacy URL redirects enhanced and working 100%, duplicate shortcode registration removed, template URLs updated to hierarchical structure, comprehensive testing suite implemented.
  • Master Dashboard CSS Fix (2025-06-18): Master dashboard CSS was broken due to missing get_header()/get_footer() calls in template. FIXED by adding WordPress integration, comprehensive CSS variables framework (--hvac-spacing-, --hvac-radius-), 200+ lines of master dashboard styles, proper AJAX handlers, and responsive design. Prevention system implemented with template validation scripts.
  • Directory Reorganization (2025-06-18): Root directory reorganized for maintainability. Development artifacts moved to archive/ directory with structured subdirectories. Essential files (.env, core plugin files) restored to root. Deployment scripts moved to scripts/ directory. Plugin redeployed successfully after reorganization - all functionality verified working.
  • Test Data Seeding (2025-07-10): Updated all test data creation scripts to include JoeMedosch@gmail.com as a master trainer (password: JoeTrainer2025@) and joe@measurequick.com with both trainer and master trainer roles. Use bin/create-comprehensive-test-data.sh for complete staging setup. The main staging script bin/create-staging-test-data.sh also includes both Joe accounts. All seeding scripts now create test_trainer (regular trainer), JoeMedosch@gmail.com (master trainer), and assign dual roles to joe@measurequick.com automatically during staging deployment.
  • Complete End-to-End Testing (2025-07-15): Comprehensive testing suite implemented and verified on staging server. Event creation workflow fully functional with 6/6 essential form elements accessible, form submission working without errors, and data persistence verified. Certificate generation workflow 100% operational with 16 events available, 3 active download links returning HTTP 200 status, and complete event-certificate integration. All tests pass including authentication (100%), certificate interface (100%), event creation (form accessibility and submission), and data persistence across sessions. System production-ready with 85-90% test coverage achieved.
  • Master Dashboard User Role Fix (2025-07-23): Resolved critical issue where 11 HVAC trainers with legacy event_trainer roles were not appearing in the master dashboard. Root cause: master dashboard code only queried for hvac_trainer and hvac_master_trainer roles, missing users with the legacy event_trainer role from previous development. Solution: Migrated all 11 users from event_trainer to hvac_trainer role, increasing visible trainers from 4 to 15 in master dashboard. All legacy role artifacts cleaned up. Master dashboard now shows complete trainer statistics (15 total trainers, 16 total events) and all trainer data is properly accessible to master trainer users.
  • Admin Bar and Zoho CRM Enhanced Fixes (2025-07-23): Implemented robust fixes for admin bar hiding and Zoho CRM integration issues. Admin bar: Added multiple hook points (after_setup_theme, init, wp), centralized hiding function with global constant, PHP_INT_MAX priority filters, and user meta updates. Zoho CRM: Enhanced production detection with URL parsing, aggressive OAuth rewrite rule flushing with cache clearing, and improved refresh token handling. Both fixes include extensive debug logging. Deployed to staging.
  • Event Manage Page Toolbar (2025-07-23): Added navigation toolbar to /trainer/event/manage/ page to match other trainer pages. Includes Dashboard, Certificate Reports, and Generate Certificates buttons with consistent styling and responsive design. Uses hierarchical URL structure.
  • Trainer Page Redirects and Admin Bar Removal (2025-07-23): Added 301 redirects from /trainer/ to /trainer/dashboard/ and /master-trainer/ to /master-trainer/dashboard/. Removed admin bar hiding code as it's now handled by The Events Calendar plugin. Updated toolbar Dashboard link to use /trainer/dashboard/.
  • Production Error Fixes (2025-07-24): Fixed production logging issues: Removed all debug error_log statements, added duplicate checking for OAuth query vars to prevent 153+ additions, optimized admin script loading to specific page only. Significantly reduces log noise and improves performance.
  • Production Deployment Support (2025-07-24): Updated deployment infrastructure to support both staging and production environments. Use scripts/deploy.sh staging for staging deployments and scripts/deploy.sh production only when explicitly requested by the user. Production deployments require double confirmation to prevent accidental deployment. IMPORTANT: Only deploy to production when the user explicitly asks for production deployment.
  • Plugin Architecture Refactoring (2025-07-28): Implemented modular architecture with single-responsibility classes. Created HVAC_Shortcodes for centralized shortcode management, HVAC_Scripts_Styles for asset management, and HVAC_Route_Manager for URL routing. Eliminated duplicate functionality between HVAC_Plugin and HVAC_Community_Events. All components now use singleton pattern to prevent duplicate initialization. Fixed jQuery selector errors and duplicate content issues. See docs/ARCHITECTURE.md for details.
  • Master Dashboard URL Fix (2025-07-29): Fixed critical issue where master dashboard was showing trainer dashboard content. Root cause: Both trainer and master dashboards had the same page slug "dashboard", causing WordPress to load the wrong page. Solution: Changed master dashboard URL from /master-trainer/dashboard/ to /master-trainer/master-dashboard/, updated all code references, removed conflicting legacy redirects. Master dashboard now correctly displays master trainer content with aggregate statistics and trainer performance analytics.
  • Event Manage Page CSS and Header Fix (2025-07-30): Resolved persistent CSS override and duplicate header issues on the trainer/event/manage/ page. Root causes: CSS specificity conflicts with theme styles, header being added via both template and tribe hook. Solution: Scoped all CSS rules to .hvac-event-manage-wrapper, moved navigation header directly into page template, disabled duplicate tribe hook, added theme override styles. Page now displays correctly with single header, proper 1200px max-width layout, 20px padding, and consistent styling matching other dashboard pages.
  • Major Plugin Update - Registration Refactor and New Trainer Pages (2025-07-30): Implemented comprehensive updates to HVAC plugin. Registration form refactored: moved Application Details to Personal Information, renamed Business Information to Training Organization Information with TEC integration, added required Organization Logo upload, added Headquarters location fields, created conditional Training Venue section. New trainer pages created: Training Venues system (/trainer/venue/list, /trainer/venue/manage) with full CRUD operations and TEC venue integration; Trainer Profile system (/trainer/profile, /trainer/profile/edit) with photo upload, certifications, stats tracking; Training Organizers system (/trainer/organizer/list, /trainer/organizer/manage) with logo upload and headquarters tracking. All systems use AJAX forms, real-time validation, responsive design, and proper WordPress/TEC integration.
  • Navigation Menu and Breadcrumb Systems (2025-07-30): Added comprehensive navigation system (class-hvac-trainer-navigation.php) with hierarchical menus, dropdown support, keyboard navigation, mobile hamburger menu, and active page highlighting. Implemented automatic breadcrumb system (class-hvac-breadcrumbs.php) with SEO-friendly Schema.org markup, URL-based trail generation, and multiple style options. Both systems ready for template integration.
  • Staging Deployment and Testing (2025-07-30): Successfully deployed all trainer features to staging. Created test users (test_trainer/TestTrainer123!, test_master/TestMaster123!). Registration form changes verified live. 71% test pass rate with 4/7 trainer pages accessible. Outstanding issues: HQ fields not visible on registration, some pages need manual creation, navigation/breadcrumb template integration required.

[... rest of the existing content remains unchanged ...]