Update submodule references
Some checks are pending
BotServer CI / build (push) Waiting to run

- botserver: Fix notify dependency and source files
- botbook: Update PROMPT.md
- botui: Update UI components and themes

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Rodrigo Rodriguez 2026-02-13 22:31:59 +00:00
parent 5b34b21622
commit 68cd0d6bf3
7 changed files with 138 additions and 4 deletions

View file

@ -439,6 +439,64 @@ cargo test -p bottest
3. Run [Weekly Maintenance Tasks](#-weekly-maintenance-tasks) to keep codebase healthy
4. Read project-specific READMEs in [Project-Specific Guidelines](#-project-specific-guidelines)
## 🎭 Playwright Browser Testing - YOLO Mode
### YOLO Mode Instructions for LLMs
**When user requests to start YOLO mode with Playwright:**
1. **Start the browser** - Use `mcp__playwright__browser_navigate` to open http://localhost:3000
2. **Take snapshot** - Use `mcp__playwright__browser_snapshot` to see current page state
3. **Test user flows** - Use click, type, fill_form, etc. to interact with UI
4. **Verify results** - Check for expected content, errors in console, network requests
5. **Report findings** - Always include screenshot evidence with `browser_take_screenshot`
**Available Playwright MCP Tools:**
- `browser_navigate` - Navigate to URL
- `browser_snapshot` - Get accessibility tree (better than screenshots for analysis)
- `browser_take_screenshot` - Capture visual state
- `browser_click` - Click elements (provide ref from snapshot)
- `browser_type` - Type text into inputs
- `browser_fill_form` - Fill multiple form fields at once
- `browser_console_messages` - Check for JavaScript errors
- `browser_network_requests` - Inspect API calls
- `browser_close` - Close browser when done
**YOLO Testing Workflow:**
```
1. Navigate → http://localhost:3000
2. Snapshot → Analyze page structure
3. Click → Target element using ref from snapshot
4. Wait → For navigation/updates (browser_wait_for)
5. Verify → Console messages, network status
6. Screenshot → Document test results
```
**Testing Checklist:**
- ✅ UI loads without errors
- ✅ Navigation works between sections
- ✅ Forms submit correctly
- ✅ WebSocket connections establish
- ✅ Console shows no JavaScript errors
- ✅ Network requests return 200/201/204
**Critical Test Flows:**
- **Login/Authentication** → Navigate, enter credentials, verify session
- **Bot Creation** → Click "New Bot", fill form, verify creation
- **Chat Interface** → Send message, verify WebSocket response
- **File Upload** → Upload .bas file, verify compilation
- **Drive Sync** → Trigger sync, verify files appear
**Error Handling in YOLO Mode:**
- If navigation fails: Check if servers running (`ps aux | grep botserver`)
- If element not found: Take snapshot to debug current page state
- If console errors: Extract and report to user for fixing
- If network failures: Check API endpoints and CORS configuration
### Integration Testing
For automated test suites, prefer `cargo test -p bottest` for backend logic and Playwright YOLO mode for full-stack UI testing.
## 🧪 Testing Strategy
### Unit Tests

@ -1 +1 @@
Subproject commit 3e418df1a854fb2c98258b0c454082cd751a8123
Subproject commit 6d48dbba1b21f7fdefd4dfa30d0e33e2879980bb

@ -1 +1 @@
Subproject commit 5ea171d12617751283c50c955635135a10a52ad7
Subproject commit 17cb4ef1479c50c0ed9708fc5862a176b1c9a61f

2
botui

@ -1 +1 @@
Subproject commit af78f3156594c3bdbb9d76c31b26bcaf30abf77c
Subproject commit 161012c6a699625e86f08e190f198cd428b9f83d

19
console-errors.txt Normal file
View file

@ -0,0 +1,19 @@
Total messages: 587 (Errors: 16, Warnings: 4)
Returning 16 messages for level "error"
[ERROR] Failed to load resource: the server responded with a status of 404 (Not Found) @ http://localhost:3000/public/themes/vapordream.css:0
[ERROR] ✗ Failed: 💭 Vapor Dream @ http://localhost:3000/cristo/suite/js/theme-manager.js:85
[ERROR] Failed to load resource: the server responded with a status of 404 (Not Found) @ http://localhost:3000/public/themes/saturdaycartoons.css:0
[ERROR] ✗ Failed: 📺 Cartoons @ http://localhost:3000/cristo/suite/js/theme-manager.js:85
[ERROR] Failed to load resource: the server responded with a status of 404 (Not Found) @ http://localhost:3000/public/themes/cyberpunk.css:0
[ERROR] ✗ Failed: 🌃 Cyberpunk @ http://localhost:3000/cristo/suite/js/theme-manager.js:85
[ERROR] WebSocket connection to 'ws://localhost:3000/ws/chat?session_id=f48dd5f0-662b-49bb-a9a6-4039f6e143e7&user_id=9f6c12e7-15b7-4443-bb4a-15b8e17ba076&bot_name=cristo' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ :819
[ERROR] WebSocket error: Event @ :879
[ERROR] WebSocket connection to 'ws://localhost:3000/ws/chat?session_id=f48dd5f0-662b-49bb-a9a6-4039f6e143e7&user_id=9f6c12e7-15b7-4443-bb4a-15b8e17ba076&bot_name=cristo' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ :819
[ERROR] WebSocket error: Event @ :879
[ERROR] WebSocket connection to 'ws://localhost:3000/ws/chat?session_id=f48dd5f0-662b-49bb-a9a6-4039f6e143e7&user_id=9f6c12e7-15b7-4443-bb4a-15b8e17ba076&bot_name=cristo' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ :819
[ERROR] WebSocket error: Event @ :879
[ERROR] WebSocket connection to 'ws://localhost:3000/ws/chat?session_id=f48dd5f0-662b-49bb-a9a6-4039f6e143e7&user_id=9f6c12e7-15b7-4443-bb4a-15b8e17ba076&bot_name=cristo' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ :819
[ERROR] WebSocket error: Event @ :879
[ERROR] WebSocket connection to 'ws://localhost:3000/ws/chat?session_id=f48dd5f0-662b-49bb-a9a6-4039f6e143e7&user_id=9f6c12e7-15b7-4443-bb4a-15b8e17ba076&bot_name=cristo' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ :819
[ERROR] WebSocket error: Event @ :879

View file

@ -2,9 +2,10 @@
set -e
echo "🛑 Stopping existing processes..."
pkill -f botserver || true
pkill -f "botserver --noconsole" || true
pkill -f botui || true
pkill -f rustc || true
# Note: PostgreSQL, Vault, and Valkey are managed by botserver bootstrap, don't kill them
echo "🧹 Cleaning logs..."
rm -f botserver.log botui.log
@ -15,10 +16,40 @@ cargo build -p botserver
echo "🔨 Building botui..."
cargo build -p botui
echo "🗄️ Starting PostgreSQL..."
./botserver-stack/bin/tables/bin/postgres -D botserver-stack/data/tables/pgdata -c config_file=botserver-stack/conf/postgresql.conf > botserver-stack/logs/tables/postgres.log 2>&1 &
echo " PostgreSQL PID: $!"
sleep 2
echo "🔑 Starting Valkey (cache)..."
./botserver-stack/bin/cache/valkey-server --daemonize no --dir botserver-stack/data/cache > /dev/null 2>&1 &
echo " Valkey started"
sleep 2
echo "🚀 Starting botserver..."
export VAULT_ADDR="https://localhost:8200"
export VAULT_TOKEN="hvs.JjKHlEzycO2jvKdhhlRAoODu"
export VAULT_CACERT="./botserver-stack/conf/system/certificates/ca/ca.crt"
export VAULT_CACHE_TTL="300"
RUST_LOG=info ./target/debug/botserver --noconsole > botserver.log 2>&1 &
BOTSERVER_PID=$!
echo "⏳ Waiting for Vault to start (unsealing in background)..."
(
sleep 8
echo "🔓 Unsealing Vault..."
UNSEAL_KEY=$(python3 -c "import json; print(json.load(open('botserver-stack/conf/vault/init.json'))['unseal_keys_b64'][0])" 2>/dev/null)
if [ -n "$UNSEAL_KEY" ]; then
curl -s --cacert botserver-stack/conf/system/certificates/ca/ca.crt \
-X POST \
-H "X-Vault-Token: hvs.JjKHlEzycO2jvKdhhlRAoODu" \
-d "{\"key\": \"$UNSEAL_KEY\"}" \
https://localhost:8200/v1/sys/unseal 2>/dev/null && echo "✅ Vault unsealed" || echo "⚠️ Unseal failed"
else
echo "⚠️ Could not extract unseal key"
fi
) &
echo "🚀 Starting botui..."
BOTSERVER_URL="https://localhost:8088" ./target/debug/botui > botui.log 2>&1 &
BOTUI_PID=$!

26
start-and-unseal.sh Executable file
View file

@ -0,0 +1,26 @@
#!/bin/bash
set -e
echo "🔓 Unsealing Vault..."
UNSEAL_KEY="$(cat botserver-stack/conf/vault/init.json | grep -o '"unseal_keys_b64":\["[^"]*"' | cut -d'"' -f4)"
# Wait for Vault to start
for i in {1..30}; do
if curl -sfk --cacert botserver-stack/conf/system/certificates/ca/ca.crt \
https://localhost:8200/v1/sys/health > /dev/null 2>&1; then
echo "✅ Vault is running"
break
fi
echo "⏳ Waiting for Vault... ($i/30)"
sleep 1
done
# Unseal Vault
echo "🔓 Unsealing..."
curl -s --cacert botserver-stack/conf/system/certificates/ca/ca.crt \
-X POST \
-H "X-Vault-Token: hvs.JjKHlEzycO2jvKdhhlRAoODu" \
-d "{\"key\": \"$UNSEAL_KEY\"}" \
https://localhost:8200/v1/sys/unseal
echo "✅ Vault unsealed"