quaex

AI Help System - Quaex Industrial Platform Quick Reference

Professional Troubleshooting Knowledge Base for UIP (Uniform Industrial Platform)

Cross-Reference: This help system is fully integrated with AI_TROUBLESHOOTING_FRAMEWORK.md - the Quaex Industrial Platform methodology


πŸ” QUICK DIAGNOSIS INDEX (QUAEX INDUSTRIAL CONTEXT)

Instant Problem Identification

# Run this first to identify the category (Quaex platform specific):
./docs/scripts/quick_diagnosis.sh

Problem Categories & Quick Access (Industrial Platform):


🚨 DEPENDENCY CONFLICTS

Symptoms

Because package_name requires SDK version >=X.Y.Z, version solving failed
The current Dart SDK version is A.B.C

Instant Solution

# 1. Quick diagnosis
flutter pub deps | grep -A 5 -B 5 "package_name"

# 2. Find compatible version
flutter pub downgrade package_name

# 3. Manual downgrade (recommended)
# Edit pubspec.yaml, change from ^X.Y.Z to compatible version

# 4. Validate fix
flutter pub get && flutter analyze && flutter test

Known Compatible Versions (Quaex Project)

# For Dart SDK 3.3.4 (Flutter 3.19.6):
flutter_riverpod: ^2.6.1  # NOT ^3.0.0
go_router: ^14.6.0        # NOT ^16.2.4  
mobile_scanner: ^5.1.0    # NOT ^7.1.2
shared_preferences: ^2.2.3 # NOT ^2.3.2
crypto: ^3.0.3            # NOT ^3.0.5
flutter_lints: ^4.0.0     # NOT ^6.0.0

Prevention Strategy

β†’ Framework Reference: Phase 2.1 - Critical Dependency Chains


πŸ’» COMPILATION ERRORS

Symptoms

Compilation failed
Error: The method 'methodName' isn't defined for the class 'ClassName'

API Compatibility Fixes

Common API Changes in Flutter/Dart:

Old API New API Dart Version Fix
withValues(alpha: 0.4) withOpacity(0.4) <3.4 Global replace
surfaceContainerHighest surface <3.4 Property replace
backgroundColor colorScheme.background 3.0+ Context update

Mass Fix Commands

# Fix withValues issues (proven solution)
find lib/ -name "*.dart" -exec sed -i 's/withValues(alpha: [0-9.]*)/withOpacity(0.4)/g' {} \;

# Fix surfaceContainerHighest issues
find lib/ -name "*.dart" -exec sed -i 's/surfaceContainerHighest/surface/g' {} \;

# Validate all changes
flutter analyze
flutter test

Build Reset Protocol

# Nuclear option - clean everything
flutter clean
rm -rf .dart_tool/ build/ .flutter-plugins .flutter-plugins-dependencies
rm pubspec.lock
flutter pub get
flutter packages upgrade --dry-run  # Check what would change

β†’ Framework Reference: Phase 3.1 - Pattern 2: API Compatibility Issues


πŸ§ͺ TEST FAILURES

Symptoms

Expected: findsOneWidget
Actual: findsNothing
Expected to find exactly one widget, but found none

Solution Strategy

# 1. Identify which tests are failing
flutter test --reporter expanded | grep -E "(FAIL|βœ—)"

# 2. Debug specific test
flutter test test/widget_test.dart --plain-name="test name here"

# 3. Update test expectations based on current UI

Common Test Updates Needed

After UI changes, update these in test files:

// OLD (might fail):
expect(find.text('Welcome to Karosuru'), findsOneWidget);
expect(find.text('Sign In'), findsOneWidget);

// NEW (structure-based, more reliable):
expect(find.byType(MaterialApp), findsOneWidget);
expect(find.byType(TabBar), findsOneWidget);
expect(find.text('Welcome to Karosuru'), findsOneWidget);

Test Debugging Script

#!/bin/bash
# test_debug.sh
echo "πŸ§ͺ Test Debugging Helper"
echo "Failed tests:"
flutter test --reporter json | jq -r '.[] | select(.type=="testDone" and .result=="error") | .test.name'
echo
echo "Passed tests:"  
flutter test --reporter json | jq -r '.[] | select(.type=="testDone" and .result=="success") | .test.name'

β†’ Framework Reference: Phase 5.2 - Test Failure Resolution


βš™οΈ CONFIGURATION ISSUES

Git Ownership (Container Environment)

Symptom:

fatal: detected dubious ownership in repository at '/workspaces/quaex'

Fix:

git config --global --add safe.directory /workspaces/quaex
git config --global --add safe.directory /opt/flutter  # If Flutter issues

Devcontainer Flutter Setup

Symptom:

bash: flutter: command not found
The SDK configured is not a valid SDK folder

Fix:

# 1. Check current Flutter installation
which flutter
echo $PATH

# 2. Add Flutter to PATH (if needed)
export PATH="$PATH:/usr/local/flutter/bin"
echo 'export PATH="$PATH:/usr/local/flutter/bin"' >> ~/.bashrc

# 3. Validate Flutter setup
flutter doctor
flutter --version

Environment Variable Issues

Supabase Configuration Debug:

// Add to main.dart for debugging:
print('SUPABASE_URL: ${dotenv.maybeGet('SURUCEAN_URL')}');
print('PLACEHOLDER_CONFIG: ${SuruceranConfig.isPlaceholderConfig}');

β†’ Framework Reference: Phase 1.3 - Known Issue Patterns


πŸƒ PERFORMANCE ISSUES

Slow Build Times

Analysis Commands:

# Profile build time
time flutter build web --debug --verbose

# Check cache size
du -sh .dart_tool/
du -sh build/

# Clean if excessive
flutter clean
flutter pub get

Memory Issues (Large Projects)

Symptoms:

Solutions:

# 1. Increase VM memory (temporary)
export DART_VM_OPTIONS="--max-heap-size=4096MB"

# 2. Exclude directories from analysis
# Edit analysis_options.yaml:
analyzer:
  exclude:
    - build/**
    - .dart_tool/**
    - flutter/**

# 3. Use build caching
flutter build web --dart-define=FLUTTER_WEB_USE_SKIA=true

β†’ Framework Reference: Phase 5.1 - Performance Benchmarks


πŸ“‹ QUICK REFERENCE COMMANDS

Daily Development Commands

# Health check (run before starting work)
flutter doctor && flutter analyze && flutter test

# Dependency refresh (weekly)
flutter pub outdated
flutter pub upgrade --dry-run

# Emergency reset (when things break)
flutter clean && rm pubspec.lock && flutter pub get

# Pre-commit validation
flutter analyze --fatal-infos && flutter test && flutter build web --debug

Advanced Diagnostic Commands

# Detailed dependency analysis
flutter pub deps --json | jq '.packages[] | {name: .name, version: .version, kind: .kind}'

# Find large files impacting build time
find build/ -type f -size +1M -exec ls -lh {} \; | sort -k5 -hr

# Analyze test performance
flutter test --reporter json | jq '.[] | select(.type=="testDone") | {name: .test.name, time: .time}'

οΏ½ SECURITY COMPLIANCE

Industrial Security Requirements (Quaex Platform)

Symptoms:

Instant Solutions:

# Check security compliance
flutter analyze | grep -i "security\|encrypt\|audit"

# Validate audit logging
grep -r "audit" lib/core/logging/

# Check encryption implementations
grep -r "encrypt\|crypto" lib/core/security/

Quaex Security Standards:

β†’ Framework Reference: Phase 1.2 - Quaex Impact Analysis Matrix


🏭 MODULE INTEGRATION

7 Core Module System (Quaex UIP)

Symptoms:

Module Validation:

# Test individual modules
flutter test test/modules/finance/
flutter test test/modules/hr/
flutter test test/modules/manufacturing/
flutter test test/modules/supply_chain/
flutter test test/modules/quality/
flutter test test/modules/analytics/
flutter test test/modules/copilot/

# Check module integration points
grep -r "modules/" lib/features/

External System Integration:

β†’ Framework Reference: Phase 2.1 - Quaex Module Dependency Chain Analysis


πŸ”— FRAMEWORK CROSS-REFERENCES

Quick Navigation to Detailed Methodology


πŸ“ž ESCALATION PATHS (INDUSTRIAL PLATFORM)

When Help System Isn’t Enough

  1. Check Framework: Detailed Quaex methodology in AI_TROUBLESHOOTING_FRAMEWORK.md
  2. Module Analysis: Identify which of 7 core modules are affected
  3. External System Check: Verify ERP/MES/SCADA/IoT connectivity
  4. Emergency Recovery: Use industrial safety protocols from Framework Emergency section
  5. Compliance Validation: Ensure 50-year longevity and regulatory requirements

Success Metrics (Quaex Industrial Standards)


This help system is continuously updated based on real-world problem resolution in the Quaex Uniform Industrial Platform (UIP) project, maintaining 50-year longevity and industrial compliance standards.