This MVP release provides a complete full-stack solution for managing action mappings in Geutebruck's GeViScope and GeViSoft video surveillance systems. ## Features ### Flutter Web Application (Port 8081) - Modern, responsive UI for managing action mappings - Action picker dialog with full parameter configuration - Support for both GSC (GeViScope) and G-Core server actions - Consistent UI for input and output actions with edit/delete capabilities - Real-time action mapping creation, editing, and deletion - Server categorization (GSC: prefix for GeViScope, G-Core: prefix for G-Core servers) ### FastAPI REST Backend (Port 8000) - RESTful API for action mapping CRUD operations - Action template service with comprehensive action catalog (247 actions) - Server management (G-Core and GeViScope servers) - Configuration tree reading and writing - JWT authentication with role-based access control - PostgreSQL database integration ### C# SDK Bridge (gRPC, Port 50051) - Native integration with GeViSoft SDK (GeViProcAPINET_4_0.dll) - Action mapping creation with correct binary format - Support for GSC and G-Core action types - Proper Camera parameter inclusion in action strings (fixes CrossSwitch bug) - Action ID lookup table with server-specific action IDs - Configuration reading/writing via SetupClient ## Bug Fixes - **CrossSwitch Bug**: GSC and G-Core actions now correctly display camera/PTZ head parameters in GeViSet - Action strings now include Camera parameter: `@ PanLeft (Comment: "", Camera: 101028)` - Proper filter flags and VideoInput=0 for action mappings - Correct action ID assignment (4198 for GSC, 9294 for G-Core PanLeft) ## Technical Stack - **Frontend**: Flutter Web, Dart, Dio HTTP client - **Backend**: Python FastAPI, PostgreSQL, Redis - **SDK Bridge**: C# .NET 8.0, gRPC, GeViSoft SDK - **Authentication**: JWT tokens - **Configuration**: GeViSoft .set files (binary format) ## Credentials - GeViSoft/GeViScope: username=sysadmin, password=masterkey - Default admin: username=admin, password=admin123 ## Deployment All services run on localhost: - Flutter Web: http://localhost:8081 - FastAPI: http://localhost:8000 - SDK Bridge gRPC: localhost:50051 - GeViServer: localhost (default port) Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
146 lines
3.9 KiB
Markdown
146 lines
3.9 KiB
Markdown
# PERMANENT SOLUTION TO REBUILD PROBLEM
|
|
|
|
## THE ROOT CAUSE
|
|
|
|
The issue you're experiencing is caused by **multiple factors**:
|
|
|
|
### 1. **Flutter Hot Reload Limitations**
|
|
- Hot reload (⚡ in IDE) only works for UI changes
|
|
- **Structural changes** (new files, imports, class changes) require **full rebuild**
|
|
- You were seeing old code because the app wasn't fully rebuilt
|
|
|
|
### 2. **Multiple Running Instances**
|
|
- Flutter can run on Windows, Chrome, Edge simultaneously
|
|
- **You were looking at a different instance** than the one I rebuilt
|
|
- Old instances cached old code
|
|
|
|
### 3. **Background Processes**
|
|
- Dart VM processes stay running even after "stop"
|
|
- These hold file locks and prevent clean rebuild
|
|
- Must be **killed forcefully** before rebuild
|
|
|
|
### 4. **My Rebuild Attempts Were Invisible to You**
|
|
- I rebuilt in background (Chrome)
|
|
- You were looking at Windows desktop app
|
|
- **Different targets = different code versions**
|
|
|
|
## THE PERMANENT SOLUTION
|
|
|
|
### Option 1: Use the Batch File (EASIEST)
|
|
**Double-click this file:**
|
|
```
|
|
C:\DEV\COPILOT\REBUILD_AND_RUN_APP.bat
|
|
```
|
|
|
|
What it does:
|
|
1. Kills ALL Flutter/Dart processes
|
|
2. Cleans build artifacts
|
|
3. Gets dependencies
|
|
4. Runs app on Chrome
|
|
5. Opens Chrome automatically
|
|
|
|
### Option 2: Use the PowerShell Script (BETTER)
|
|
**Right-click and "Run with PowerShell":**
|
|
```
|
|
C:\DEV\COPILOT\Rebuild-FlutterApp.ps1
|
|
```
|
|
|
|
Same as batch file but with color output and better error handling.
|
|
|
|
### Option 3: Manual Steps (IF YOU PREFER IDE)
|
|
If you want to use VS Code/Android Studio:
|
|
|
|
1. **STOP** the app completely (don't just pause)
|
|
2. **Open Task Manager** (Ctrl+Shift+Esc)
|
|
3. **Kill processes**:
|
|
- Find "dart.exe" → End Task
|
|
- Find "flutter.exe" → End Task
|
|
4. **In IDE terminal**:
|
|
```bash
|
|
flutter clean
|
|
flutter pub get
|
|
```
|
|
5. **Run** the app (F5 or green arrow)
|
|
6. **Wait** for full compile (30-60 seconds)
|
|
|
|
## HOW TO VERIFY IT WORKED
|
|
|
|
After rebuild, go to Action Mappings form:
|
|
|
|
**OLD UI (before changes):**
|
|
```
|
|
Output Action 1: [Dropdown ▼]
|
|
- PanLeft
|
|
- PanRight
|
|
- SystemWarning
|
|
...
|
|
```
|
|
|
|
**NEW UI (after changes):**
|
|
```
|
|
Output Actions * [Add Output Action]
|
|
|
|
[Empty state or list of added actions]
|
|
```
|
|
|
|
When you click **"Add Output Action"**, you should see:
|
|
- Large dialog (800x600px)
|
|
- Left: Category dropdown + action list
|
|
- Right: Parameter fields with checkboxes
|
|
|
|
## WHY THIS HAPPENS
|
|
|
|
Flutter's development workflow:
|
|
- **Hot reload** → Fast (1-2 sec) but limited
|
|
- **Hot restart** → Medium (5-10 sec) but still cached
|
|
- **Full rebuild** → Slow (30-60 sec) but guaranteed fresh
|
|
|
|
**Code changes we made require full rebuild:**
|
|
- Added new files (3 new .dart files)
|
|
- Modified imports
|
|
- Changed state management
|
|
- Added new dependencies
|
|
|
|
## GOING FORWARD
|
|
|
|
**Every time I make changes to the code:**
|
|
|
|
1. I'll tell you: **"Run the rebuild script"**
|
|
2. You double-click: `REBUILD_AND_RUN_APP.bat`
|
|
3. Wait for Chrome to open
|
|
4. Test the new features
|
|
|
|
**NO MORE:**
|
|
- ❌ "Hot reload should work"
|
|
- ❌ "Try restarting VS Code"
|
|
- ❌ "It should show up now"
|
|
- ❌ Multiple confusing attempts
|
|
|
|
**YES:**
|
|
- ✅ **One script, guaranteed fresh build**
|
|
- ✅ **Kills everything first**
|
|
- ✅ **Opens in known location (Chrome)**
|
|
- ✅ **You see exactly what I built**
|
|
|
|
## FILES CREATED FOR YOU
|
|
|
|
1. **`REBUILD_AND_RUN_APP.bat`** - Double-click to rebuild
|
|
2. **`Rebuild-FlutterApp.ps1`** - PowerShell version (better output)
|
|
3. **`SOLUTION_TO_REBUILD_PROBLEM.md`** - This file
|
|
4. **`HOW_TO_TEST_NEW_FEATURES.md`** - Testing guide
|
|
|
|
## TEST IT NOW
|
|
|
|
1. Double-click: `C:\DEV\COPILOT\REBUILD_AND_RUN_APP.bat`
|
|
2. Wait for Chrome to open (30-60 seconds)
|
|
3. Login to the app
|
|
4. Go to: Action Mappings → Create/Edit
|
|
5. Look for: **"Add Output Action"** button
|
|
|
|
If you see the button → **PROBLEM SOLVED FOREVER**
|
|
If you don't → Tell me and I'll investigate further
|
|
|
|
---
|
|
|
|
**The key insight:** We're not synced on which app instance you're looking at. The script ensures we're both looking at the same freshly-built Chrome instance.
|