chore: auto-commit (17 archivos)

- app.md
- applog.go
- frontend/package.json
- frontend/package.json.md5
- frontend/vite.config.ts
- go.mod
- main.go
- matrix_service.go
- sqlite_driver.go
- .wails_dev.log
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-26 19:38:16 +02:00
parent 23c933bfa2
commit 41bafa57cc
21 changed files with 1995 additions and 44 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Single-shot health check for E2E endpoints. Returns 0 if both up.
set -u
PID=$(tasklist.exe 2>/dev/null | awk '/matrix_client_pc\.exe/ {print $2; exit}')
echo "[e2e] PID: ${PID:-(not running)}"
if [ -z "$PID" ]; then
echo "[e2e] app not running"
exit 1
fi
E2E_OK=0
CDP_OK=0
PING=$(curl -sS --max-time 1 http://127.0.0.1:8767/ping 2>/dev/null) && E2E_OK=1
CDP=$(curl -sS --max-time 1 http://127.0.0.1:9222/json/version 2>/dev/null) && CDP_OK=1
echo "[e2e] :8767 (E2E API) -> ${E2E_OK} ${PING:-no response}"
echo "[e2e] :9222 (CDP) -> ${CDP_OK} $(echo "$CDP" | head -c 120)"
if [ $E2E_OK -eq 1 ] && [ $CDP_OK -eq 1 ]; then
exit 0
fi
exit 1
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Single-shot health check for wails dev mode.
set -u
APP_DIR="$(cd "$(dirname "$0")"/.. && pwd)"
PID_FILE="${APP_DIR}/.wails_dev.pid"
LOG="${APP_DIR}/.wails_dev.log"
if [ -f "$PID_FILE" ]; then
PID=$(cat "$PID_FILE")
if kill -0 "$PID" 2>/dev/null; then
echo "[wails-dev] PID $PID alive"
else
echo "[wails-dev] PID file stale (PID $PID dead)"
fi
else
echo "[wails-dev] no PID file"
fi
echo "[wails-dev] last log:"
tail -10 "$LOG" 2>/dev/null || echo "(no log)"
echo "---"
for port in 5173 34115; do
if curl -sS --max-time 1 "http://localhost:$port" -o /dev/null -w "[wails-dev] :$port -> HTTP %{http_code}\n" 2>/dev/null; then
:
else
echo "[wails-dev] :$port -> not responding"
fi
done
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Launch matrix_client_pc.exe on Windows with E2E mode enabled.
# Fire-and-forget — does NOT block waiting for confirmation.
# Use ./scripts/check_e2e.sh afterwards to verify endpoints.
set -euo pipefail
APP_DIR_WIN='C:\Users\lucas\Desktop\apps\matrix_client_pc'
echo "[e2e] killing existing matrix_client_pc.exe"
taskkill.exe /IM matrix_client_pc.exe /F 2>/dev/null || true
LAST_USER="/mnt/c/Users/lucas/AppData/Roaming/matrix_client_pc/last_user.txt"
if [ -f "$LAST_USER" ]; then
echo "[e2e] wiping last_user.txt"
rm -f "$LAST_USER"
fi
ADMIN_TOKEN=$(pass matrix/synapse-admin-token 2>/dev/null | head -n1 || true)
if [ -z "$ADMIN_TOKEN" ]; then
echo "[e2e] WARN: pass matrix/synapse-admin-token failed — /signin_admin will require body admin_token"
fi
echo "[e2e] launching via powershell with MATRIX_CLIENT_PC_E2E=1 + BIND_ALL=1 + admin token"
# MATRIX_CLIENT_PC_E2E_BIND_ALL=1 → E2E HTTP server binds 0.0.0.0 so WSL can
# curl it directly (Vite shim + tests). Without it, server only listens on
# 127.0.0.1 (production / single-machine testing).
# MATRIX_SYNAPSE_ADMIN_TOKEN → /signin_admin uses it as the default access
# token (resolves user_id + device_id via whoami).
powershell.exe -NoProfile -Command "\$env:MATRIX_CLIENT_PC_E2E='1'; \$env:MATRIX_CLIENT_PC_E2E_BIND_ALL='1'; \$env:MATRIX_SYNAPSE_ADMIN_TOKEN='$ADMIN_TOKEN'; Start-Process -FilePath '$APP_DIR_WIN\\matrix_client_pc.exe' -WorkingDirectory '$APP_DIR_WIN'" >/dev/null 2>&1 &
disown
echo "[e2e] fired. Use scripts/check_e2e.sh to verify endpoints."
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
# Launch `wails dev -browser=false` in background so Playwright can drive the
# real Wails frontend via its dev HTTP server.
#
# Wails dev exposes:
# - http://localhost:34115/ -> frontend with bindings injected (Wails proxy)
# - http://localhost:5173/ -> raw Vite dev server (no bindings)
# Playwright tests should target :34115 so bindings work.
#
# This launcher is fire-and-forget. Use scripts/check_wails_dev.sh to verify.
set -euo pipefail
APP_DIR="$(cd "$(dirname "$0")"/.. && pwd)"
LOG_FILE="${APP_DIR}/.wails_dev.log"
PID_FILE="${APP_DIR}/.wails_dev.pid"
# Kill any previous wails dev.
if [ -f "$PID_FILE" ]; then
OLD=$(cat "$PID_FILE")
if kill -0 "$OLD" 2>/dev/null; then
echo "[wails-dev] killing old PID $OLD"
kill "$OLD" 2>/dev/null || true
sleep 1
fi
rm -f "$PID_FILE"
fi
pkill -f 'wails dev' 2>/dev/null || true
# Also kill any matrix_client_pc.exe left over (wails dev launches one).
taskkill.exe /IM matrix_client_pc.exe /F 2>/dev/null || true
cd "$APP_DIR"
echo "[wails-dev] starting wails dev (logs: $LOG_FILE)"
nohup wails dev -browser=false -frontenddevserverurl=http://localhost:5173 > "$LOG_FILE" 2>&1 &
echo $! > "$PID_FILE"
echo "[wails-dev] PID $(cat "$PID_FILE")"
echo "[wails-dev] fire-and-forget. Frontend will be at http://localhost:34115"