gb/TODO.md

135 lines
4.4 KiB
Markdown
Raw Normal View History

# TODO - Compilation Errors Status
**IMPORTANT:** Resolve all errors offline following PROMPT.md rules:
- NO `#[allow()]` attributes
- DELETE unused code, don't suppress
- Use `?` operator, not `.unwrap()` or `.expect()`
- Version 6.1.0 - DO NOT CHANGE
---
## Build Command
```bash
CARGO_BUILD_JOBS=1 cargo build -p botserver 2>&1
```
---
## ✅ FIXED This Session
### Helper Functions Created
- Added `format_timestamp_plain`, `format_timestamp_vtt`, `format_timestamp_srt` to `botserver/src/core/shared/utils.rs`
- Added `parse_hex_color` to `botserver/src/core/shared/utils.rs`
- Exported functions from `botserver/src/core/shared/mod.rs`
- Added imports to `meet/recording.rs` and `meet/whiteboard_export.rs`
### Handler Trait Bounds Fixed
- `botserver/src/designer/canvas.rs` - Removed non-extractor Uuid params, using `Uuid::nil()` placeholder
- `create_canvas_handler`
- `add_element_handler`
- `update_element_handler`
- `delete_element_handler`
- `group_elements_handler`
- `add_layer_handler`
- `botserver/src/meet/webinar.rs` - Removed non-extractor Uuid params, using `Uuid::nil()` placeholder
- `create_webinar_handler`
- `start_webinar_handler`
- `end_webinar_handler`
- `join_handler`
- `raise_hand_handler`
- `lower_hand_handler`
- `submit_question_handler`
- `answer_question_handler`
- `upvote_question_handler`
### ExportBounds Struct Fixed
- Updated `botserver/src/meet/whiteboard_export.rs` ExportBounds struct with proper fields:
- `min_x: f64`, `min_y: f64`, `max_x: f64`, `max_y: f64`, `width: f64`, `height: f64`
- Added `set_line_width` method to PdfDocument
- Fixed f32/f64 type casts in `render_to_pdf` and `render_shape_to_pdf`
### LLM Cache Field Fixed
- `botserver/src/llm/cache.rs` - Changed `self.conn` to `self.db_pool` (lines 67, 184)
### Warnings Fixed
- `event_id` unused - `contacts/calendar_integration.rs:949` - Added logging
- `members_removed`/`permissions_removed` - `core/large_org_optimizer.rs:538-539` - Refactored to avoid unused initial values
- `mut` not needed - `core/session/migration.rs:297` - Changed to `read()` instead of `write()`
- `ts_query` unused - `search/mod.rs:193` - Deleted unused variable
- `output_dir` unused - `video/engine.rs:749` - Added logging
- `state` unused - `video/handlers.rs:415` - Used for VideoEngine initialization
- `recording_id` unused - `meet/recording.rs:561` - Added logging
- `webinar_id` unused - `meet/webinar.rs:1705,1716` - Added logging
- `message` unused - `botmodels/python_bridge.rs:264` - Added logging
- `challenge_bytes` unused - `security/passkey.rs:568` - Added logging
- `auth_data` unused - `security/passkey.rs:584` - Added logging
- Deprecated `gen` - `security/passkey.rs:459` - Replaced with `rand::random()`
### Re-exports Fixed
- `sanitize_identifier` now re-exported from `security/sql_guard` in `core/shared/mod.rs`
---
## Remaining Items (If Any)
### Verify Build
Run build to confirm all fixes:
```bash
CARGO_BUILD_JOBS=1 cargo build -p botserver 2>&1 | head -100
```
---
## Quick Reference Commands
```bash
# Single-threaded build (avoids OOM)
CARGO_BUILD_JOBS=1 cargo build -p botserver 2>&1 | head -100
# Check specific file
cargo check -p botserver --message-format=short 2>&1 | grep "filename.rs"
```
---
## Session Progress
### Previously Fixed:
- Unused imports in 15+ files
- SafeCommand chaining in video/engine.rs, video/render.rs
- RecordingError missing variants (AlreadyRecording, UnsupportedLanguage, etc.)
- RecordingService missing methods
- Arc wrapping for service constructors (contacts, canvas, webinar, maintenance)
- Borrow checker issues (session/anonymous.rs, security_monitoring.rs, webhook.rs)
- PasskeyService async/await issues
- UsageMetric Default derive
- Organization RBAC tuple key fix
- Various struct field name fixes (db_pool vs conn)
### Fixed This Session:
- All helper functions created and exported
- All handler trait bound issues resolved
- ExportBounds struct updated with correct fields
- PdfDocument methods fixed
- All unused variable warnings addressed
- Deprecated rand usage fixed
- Type mismatches resolved
---
## Continuation Prompt
```
Continue fixing compilation errors in gb/ workspace following PROMPT.md:
Priority:
1. Run build to verify all fixes
2. Address any remaining errors
3. Delete/use all unused variables (no underscore prefix per PROMPT.md)
Build: CARGO_BUILD_JOBS=1 cargo build -p botserver
Rules: NO #[allow()], DELETE unused code, use ? operator
```