PROBLEMA DETECTADO:
- Existían dos sistemas de focus paralelos que no se comunicaban
- FocusManager (widgets/focus.zig) usaba IDs u32
- FocusGroupManager (core/focus_group.zig) usaba IDs u64
- Esto causaba que Tab no funcionara y clics no cambiaran focus
SOLUCIÓN CONSENSUADA:
- Usar SOLO FocusGroupManager como fuente de verdad
- Integrar en Context con métodos públicos
- Widgets se auto-registran en el grupo activo al dibujarse
- Tab navega DENTRO del grupo activo
- F6 (u otro) cambia entre grupos/paneles
CAMBIOS:
- context.zig: Añadidos createFocusGroup(), setActiveFocusGroup(),
hasFocus(), requestFocus(), registerFocusable(), handleTabKey()
- text_input.zig: Usa @intFromPtr para ID único, se auto-registra
- table.zig: Ahora se registra como widget focusable
- widgets.zig/zcatgui.zig: Eliminadas referencias antiguas a FocusManager
- CLAUDE.md: Documentado el trabajo en progreso
ESTADO: EN PROGRESO - Compila pero requiere más testing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
For solid colors (alpha=255), use @memset per row instead of
pixel-by-pixel loop. @memset is SIMD-optimized by the compiler
(uses SSE/AVX on x86-64).
Result: Render time 1.4ms → 1.0ms (28% faster in Release build)
Also cleaner code separation between solid color fast path
and alpha blending slow path.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Framebuffer:
- Add clearRect() for clearing specific rectangular regions
SoftwareRenderer:
- Add executeWithDirtyRegions() for optimized partial rendering
- Add clearRect() convenience method
- Add commandBounds() to extract bounding box from draw commands
- Add rectsIntersect() helper for intersection testing
This enables applications to:
1. Clear only dirty regions instead of full screen
2. Skip rendering commands outside dirty areas
3. Significantly reduce CPU when only small areas change
Usage: Pass dirty_regions from Context.getDirtyRects() to
executeWithDirtyRegions() instead of using clear()+executeAll().
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add waitEvent() and waitEventTimeout() to Backend abstract interface
- Implement SDL_WaitEvent and SDL_WaitEventTimeout in SDL2 backend
- Refactor translateEvent into shared function
- Optional vtable entries with fallback to pollEvent for compatibility
This enables progressive sleep patterns:
- Phase 1: Short sleep (8ms) for quick response
- Phase 2: Medium sleep (33ms) for moderate idle
- Phase 3: SDL_WaitEventTimeout for 0% CPU in deep idle
Result: CPU 92% → 1.9% in idle applications.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Early out para caracteres completamente fuera del clip
- Fast path para caracteres 100% visibles (caso común)
- Escritura directa al buffer de píxeles sin setPixel
- Loop optimizado para fuentes de 8px de ancho
- Unroll de los 8 bits del glyph byte
Resultados:
- Debug: 40ms → 32ms por frame
- Release: 40ms → 1.5ms por frame (~26x más rápido)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Cambio de SDL_RENDERER_SOFTWARE a SDL_RENDERER_ACCELERATED | PRESENTVSYNC:
- VSync sincroniza con el refresco del monitor (~60Hz)
- SDL_RenderPresent() ahora bloquea hasta el próximo frame
- Elimina necesidad de sleep manual en aplicaciones
- CPU de ~70% a ~1-5% en idle
Fallback a software renderer si GPU no disponible.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
El widget TextInput ahora procesa internamente:
- Backspace/Delete: borrar caracteres
- Flechas izq/der: mover cursor
- Home/End: inicio/fin del texto
- Shift+movimiento: selección
- Ctrl+A: seleccionar todo
- Enter: submit
Esto hace que el widget sea auto-contenido y reutilizable,
sin requerir manejo de teclas en la aplicación.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- REFERENCE.md: Nueva sección "UTF-8 Text Rendering" explicando:
- Cómo funciona la decodificación UTF-8 → Latin-1
- Caracteres soportados (ASCII + Latin-1 Supplement)
- Por qué UTF-8 es el estándar correcto para BD/archivos
- Ejemplo de uso con texto español
- software.zig: Doc comments explicando el sistema UTF-8
El renderer ahora maneja texto UTF-8 automáticamente,
permitiendo mostrar correctamente: ñ, á, é, í, ó, ú, ¿, ¡, €, etc.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
El renderer iteraba byte por byte, causando que caracteres UTF-8
multi-byte (como ñ, á, é) se mostraran incorrectamente.
Cambios:
- Decodificación completa de UTF-8 (1-4 bytes)
- Mapeo de codepoints a Latin-1 para renderizado
- Caracteres fuera de Latin-1 se muestran como '?'
Esto permite mostrar correctamente texto en español y otros
idiomas europeos que usan caracteres Latin-1.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New Core Modules (4):
Clipboard - System clipboard integration
- getText()/setText() via SDL2 clipboard API
- hasText() and clear() utilities
- Cross-platform support
DragDrop - Drag and drop system
- DragData with typed data transfer
- DropZone registration with type filtering
- DragDropManager for coordinating operations
- Hover detection and drop results
- Helper functions: makeDraggable(), makeDropZone()
Shortcuts - Keyboard shortcuts system
- Shortcut struct with key + modifiers
- ShortcutManager for registration and checking
- Common shortcuts (Ctrl+C/V/X/Z, etc.)
- Human-readable formatting (formatShortcut)
- Enable/disable individual shortcuts
FocusGroup - Focus group management
- FocusGroup for widget tab order
- focusNext/Previous with wrap support
- FocusGroupManager for multiple groups
- Group switching (focusNextGroup)
- Tab/Shift+Tab navigation
All tests passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New Widgets:
- TextArea: Multi-line text editor with cursor navigation,
line numbers, selection, and scrolling support
- Tree: Hierarchical tree view with expand/collapse,
keyboard navigation, and selection
- Badge: Status labels with variants (primary, success,
warning, danger, info, outline), dismissible option
- TagGroup: Multiple badges in a row with wrapping
From previous session (v0.7.0):
- Progress: Bar (solid, striped, gradient, segmented),
Circle, Spinner (circular, dots, bars, ring)
- Tooltip: Hover tooltips with smart positioning
- Toast: Non-blocking notifications with auto-dismiss
Widget count: 23 widgets
Test count: 163 tests passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New Widgets (3):
- Progress: Bar, Circle, Spinner with multiple styles
- Bar styles: solid, striped, gradient, segmented
- Spinner styles: circular, dots, bars, ring
- Animated spinners with configurable speed
- Tooltip: Hover tooltips with smart positioning
- Auto-position to stay within screen bounds
- Arrow pointing to target element
- Multi-line text support with wrapping
- Configurable delay and styling
- Toast: Non-blocking notifications
- Types: info, success, warning, error
- Configurable position (6 positions)
- Auto-dismiss with countdown
- Action buttons support
- Stack multiple toasts
Widget count: 20 widgets
Test count: 140 tests passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Apply TEAM_STANDARDS Norma #25: project names use lowercase
everywhere - repo, directory, module, documentation, imports.
No CamelCase in project names. Consistency = less cognitive friction.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>