5f46b9b105
Adds e2e_checks block with 2 checks: - build: cmake --build cpp/build/windows --target chart_demo -j (timeout 300s) - binary_exists: test -f cpp/build/windows/apps/chart_demo/chart_demo.exe (timeout 5s) Part of autonomous task_run task_b3069559f34415c3 for issue 0120. Co-Authored-By: fn-orquestador <noreply@anthropic.com>
82 lines
2.6 KiB
Markdown
82 lines
2.6 KiB
Markdown
---
|
|
name: chart_demo
|
|
lang: cpp
|
|
domain: viz
|
|
version: 0.1.0
|
|
description: "Demo ImGui de primitivos viz del registry: line_plot, scatter_plot, bar_chart, heatmap. Cada chart en su propia tab del TabBar. Usado como showcase y como build gate de las funciones viz/."
|
|
tags: [imgui, demo, charts, viz, showcase]
|
|
uses_functions:
|
|
- line_plot_cpp_viz
|
|
- scatter_plot_cpp_viz
|
|
- bar_chart_cpp_viz
|
|
- heatmap_cpp_viz
|
|
# logger, app_menubar viven en fn_framework — no se listan aqui
|
|
uses_types: []
|
|
framework: "imgui"
|
|
entry_point: "main.cpp"
|
|
dir_path: "apps/chart_demo"
|
|
repo_url: ""
|
|
icon:
|
|
phosphor: "chart-bar"
|
|
accent: "#0ea5e9"
|
|
e2e_checks:
|
|
- id: build
|
|
cmd: "cmake --build cpp/build/windows --target chart_demo -j"
|
|
timeout_s: 300
|
|
- id: binary_exists
|
|
cmd: "test -f cpp/build/windows/apps/chart_demo/chart_demo.exe"
|
|
timeout_s: 5
|
|
---
|
|
|
|
## Que hace
|
|
|
|
App de una sola ventana con cuatro tabs (Line / Scatter / Bar / Heatmap) que
|
|
renderiza datos sinteticos para mostrar el aspecto y la API de los primitivos
|
|
viz del registry. Sirve como:
|
|
|
|
- **Showcase visual** de las funciones viz existentes — al añadir una nueva
|
|
primitiva, anadir su tab aqui es la forma natural de probar el binding.
|
|
- **Build gate**: si una de las funciones rompe API, esta app deja de
|
|
compilar y lo cazamos sin tener que tocar `registry_dashboard` o
|
|
`graph_explorer`.
|
|
|
|
## Estructura
|
|
|
|
`main.cpp` (~93 lineas):
|
|
|
|
- `init_data()` — genera arrays sinteticos una vez (estado modulo).
|
|
- `render()` — DockSpaceOverViewport + TabBar con 4 tabs, cada una invoca
|
|
un primitivo del registry.
|
|
- `main()` → `fn::run_app(...)` con AppConfig estandar (titulo, tamaño,
|
|
about, log).
|
|
|
|
## Build
|
|
|
|
```bash
|
|
# Linux
|
|
cd cpp && cmake -B build/linux -S . && cmake --build build/linux --target chart_demo
|
|
|
|
# Windows (cross-compile)
|
|
cd cpp && cmake -B build/windows -S . -DCMAKE_TOOLCHAIN_FILE=toolchains/mingw-w64.cmake \
|
|
&& cmake --build build/windows --target chart_demo
|
|
```
|
|
|
|
## Decisiones
|
|
|
|
- `viewports = true` (default de `fn::run_app`): las ventanas se pueden
|
|
arrastrar fuera del main window.
|
|
- `init_gl_loader = false`: solo usa ImGui/ImPlot, sin gl* directo.
|
|
- Sin persistencia propia (no abre BD).
|
|
- `log: file_path = "chart_demo.log"` con nivel Debug — el `init_data`
|
|
emite info+debug para verificar que el logger funciona.
|
|
|
|
|
|
## Capability growth log
|
|
|
|
Una linea por bump SemVer. Bump-type segun `.claude/commands/version.md`:
|
|
- `major`: breaking observable (CLI args, schema BBDD propia, formato wire).
|
|
- `minor`: feature aditiva (nuevo panel, endpoint, opcion).
|
|
- `patch`: bugfix sin cambio observable.
|
|
|
|
- v0.1.0 (2026-05-18) — baseline.
|