feat(navegator_dashboard): v1+v2 — CDP HTTP client, real Tabs panel, full Network panel
CDP HTTP client (cdp_http.h/cpp): WinSock raw + crude_json. GET /json/version,
/json (list tabs), PUT /json/new (Chrome 137+), GET /json/activate/{id},
/json/close/{id}.
CDP WebSocket client (cdp_ws.h/cpp): RFC 6455 handshake + framing manual,
masked client frames, async dispatcher con queue + wait_response. Soporta
fragmentacion (FIN=0 + continuation), ping/pong, close frame. Stats bytes
in/out + frames in.
Cross-panel session (session_state.h/cpp): selected_browser_port +
selected_tab_id. Cambiar tab cierra/abre NetworkSession.
Tabs panel: real. List + filtro titulo/URL + Refresh + New tab + Focus +
Close + Select (alimenta Network panel).
Network panel: DevTools-like.
- Tabla: Name | Status (color) | Method | Type | Initiator | Size | Time | Waterfall
- Filtros: text + invert + chips (Doc/CSS/JS/XHR/Img/Media/Font/WS/Other) + All toggle
- Toggles: Preserve log, Disable cache, Hide data:, Only failed, Pause/Resume
- Detalle por request: Headers (general + req + res) | Payload | Response (lazy
Network.getResponseBody) | Cookies | Timing | WS Messages (frames in/out)
- Right-click row: Copy URL / Copy as cURL / Copy as fetch
- Status bar: N requests | bytes transferred | resources | Finish | DCL | Load
- Export HAR 1.2 a archivo junto al exe
NetworkSession parsea Network.requestWillBeSent + ExtraInfo, responseReceived
+ ExtraInfo, dataReceived, loadingFinished, loadingFailed, webSocketCreated,
webSocketFrameSent/Received/Closed, Page.frameNavigated (autoclear si !preserve),
domContentEventFired, loadEventFired.
API local extendida (local_api.cpp):
- GET /browser/{port}/version
- GET /browser/{port}/tabs
- POST /browser/{port}/tab/new?url=
- POST /browser/{port}/tab/{id}/focus
- POST /browser/{port}/tab/{id}/close
- GET /browser/{port}/har (HAR 1.2 export de la sesion activa)
Build:
- CMakeLists.txt linka imgui_node_editor solo para reusar crude_json (sin
codigo de node-editor en runtime).
- 15 MB exe Windows. Cross-compile mingw-w64 OK.
app.md: bump version 0.2.0 -> 0.3.0, panels matrix actualizado, e2e_checks
añade api_health + api_browsers (warning).
Issue 0002 (sub-issue del roadmap navegator_dashboard 0001).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,14 @@ e2e_checks:
|
||||
timeout_s: 600
|
||||
- id: exe_present
|
||||
cmd: "test -f /mnt/c/Users/lucas/Desktop/apps/navegator_dashboard/navegator_dashboard.exe"
|
||||
- id: api_health
|
||||
cmd: "curl -sf http://127.0.0.1:19333/health"
|
||||
timeout_s: 5
|
||||
severity: warning
|
||||
- id: api_browsers
|
||||
cmd: "curl -sf http://127.0.0.1:19333/browsers"
|
||||
timeout_s: 5
|
||||
severity: warning
|
||||
---
|
||||
|
||||
## Proposito
|
||||
@@ -55,24 +63,26 @@ Casos de uso:
|
||||
└──────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## Panels (v0 → v1)
|
||||
## Panels (v0 → v2)
|
||||
|
||||
| Panel | v0 | v1 | v2 |
|
||||
|---|---|---|---|
|
||||
| **Browsers** | scan + spawn + kill | filtro/search | grupos (perfiles favoritos) |
|
||||
| **Tabs** | stub | listar + navigate + close | drag&drop entre instancias |
|
||||
| **Tab Detail** | stub | HTML preview + screenshot + JS REPL | live mirror de pestaña (CDP screencast) |
|
||||
| **Network** | stub | request log + headers + body | timeline + waterfall + filtro |
|
||||
| Panel | v0 | v1 (issue 0002) | v1.5 | v2 (issue 0002) | v3 |
|
||||
|---|---|---|---|---|---|
|
||||
| **Browsers** | scan + spawn + kill | + Select row → cross-panel context | grupos (perfiles favoritos) | grupos | drag&drop |
|
||||
| **Tabs** | stub | list + Focus/Close/New + filter | — | — | drag&drop entre instancias |
|
||||
| **Tab Detail** | stub | placeholder upgrade | HTML preview + screenshot + REPL | — | live mirror (CDP screencast) |
|
||||
| **Network** | stub | — | — | DevTools-like: tabla + filtros (Doc/CSS/JS/XHR/Img/Media/Font/WS/Other) + waterfall + detalle (Headers/Payload/Response/Cookies/Timing/WS Messages) + Preserve log + Disable cache + Pause + Export HAR | extract endpoints |
|
||||
|
||||
## Stack
|
||||
|
||||
- `fn::run_app` (cpp/framework/app_base.h) — shell estandar (PATTERNS.md).
|
||||
- ImGui + ImPlot (chart Network).
|
||||
- ImGui + ImPlot.
|
||||
- ChromeScanner: `Get-CimInstance Win32_Process` invocado con `_popen`. Itera ~1 Hz.
|
||||
- ChromeLauncher: `CreateProcess` Windows. Argumentos derivados de `chrome_launch_go_browser` (registry).
|
||||
- CDP HTTP: GET `/json/version`, `/json` por puerto via WinSock raw o `WinHttp`. v1.
|
||||
- CDP WS: handshake RFC 6455 + framing manual (mismo esquema que `cdp_conn.go`). v1.
|
||||
- HTTP API local: `cpp-httplib` (header-only) bind 127.0.0.1. v0 stub, funcional v1.
|
||||
- **CDP HTTP** (`cdp_http.{h,cpp}`): WinSock raw, GET `/json/version`, `/json`, PUT `/json/new`, GET `/json/activate/{id}`, `/json/close/{id}`. v1 ✓.
|
||||
- **CDP WS** (`cdp_ws.{h,cpp}`): handshake RFC 6455 + framing manual. Async dispatcher con queue + wait_response. v2 ✓ (parser de mensajes Network.* en `network_state`).
|
||||
- **NetworkSession** (`network_state.{h,cpp}`): consume `Network.requestWillBeSent`, `responseReceived`, `dataReceived`, `loadingFinished/Failed`, `webSocketCreated/FrameSent/FrameReceived/Closed`, `Page.frameNavigated`, `Page.domContentEventFired`, `Page.loadEventFired`. Mantiene log + stats + export HAR 1.2.
|
||||
- **JSON parser**: crude_json del vendor `imgui-node-editor` (dual-license public domain). Linkado como dep estatica para reusar — sin codigo de node-editor en runtime.
|
||||
- HTTP API local: WinSock raw bind 127.0.0.1. v0+v1+v2 endpoints en `local_api.cpp`.
|
||||
|
||||
## Decisiones consciente (cpp_apps.md §9)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user