docs: Actualizar CLAUDE.md con protocolo documentación y tarea TTF
- Añadir sección PROTOCOLO DE DOCUMENTACIÓN (2025-12-16) - Agenda = índice, detalles en hitos/ - Límite ~300 líneas por archivo - Añadir sección TAREA ACTUAL: Fuentes TTF con Antialiasing - Estado de ttf.zig y fases de implementación - TextInput: añadir text_color/border_color para validación 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
1a5529dd5b
commit
54626c8edf
2 changed files with 66 additions and 2 deletions
59
CLAUDE.md
59
CLAUDE.md
|
|
@ -40,6 +40,65 @@ Una vez verificado el estado, continúa desde donde se dejó.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## REGLA CRÍTICA: NO EJECUTAR BINARIOS GUI
|
||||||
|
|
||||||
|
**NUNCA ejecutar programas GUI directamente con `./programa` o en background**
|
||||||
|
|
||||||
|
Los procesos GUI no terminan correctamente desde Claude Code y dejan shells zombie que:
|
||||||
|
1. Consumen contexto de la conversación con mensajes "Background Bash running"
|
||||||
|
2. Fuerzan compactaciones prematuras del contexto
|
||||||
|
3. Degradan severamente la calidad de la sesión de trabajo
|
||||||
|
|
||||||
|
**Alternativas:**
|
||||||
|
- Para verificar que compila: `zig build` (sin ejecutar)
|
||||||
|
- Para probar muy brevemente: `timeout 2s ./programa 2>&1 || true`
|
||||||
|
- **Mejor opción**: Pedir al usuario que lo pruebe y reporte
|
||||||
|
|
||||||
|
Esta regla está documentada en teamdocs desde 2025-11-30.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## PROTOCOLO DE DOCUMENTACIÓN (2025-12-16)
|
||||||
|
|
||||||
|
**LEER PRIMERO**: `/mnt/cello2/arno/re/recode/teamdocs/ESTRUCTURA_DOCUMENTACION.md`
|
||||||
|
|
||||||
|
### Principios clave:
|
||||||
|
- **Agenda = ÍNDICE** (QUÉ + CUÁNDO + link), NO documento técnico
|
||||||
|
- **Detalles técnicos → `agenda/hitos/`**
|
||||||
|
- **Límite ~300 líneas** por archivo
|
||||||
|
- Si necesita más de 5 líneas de explicación → crear hito en `hitos/`
|
||||||
|
|
||||||
|
### Al documentar:
|
||||||
|
1. Entrada breve en agenda (3-5 líneas máx)
|
||||||
|
2. Link a hito si hay detalles técnicos
|
||||||
|
3. Nomenclatura: `hitos/YYYY-MM-DD_nombre_proyecto.md`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## TAREA ACTUAL: Fuentes TTF con Antialiasing
|
||||||
|
|
||||||
|
**Documento completo**: `/mnt/cello2/arno/re/recode/teamdocs/Conversaciones/TAREA_TTF_ZCATGUI.md`
|
||||||
|
|
||||||
|
### Problema
|
||||||
|
zsimifactu se ve "años 90" con fuentes bitmap 8x16. Necesitamos TTF con antialiasing.
|
||||||
|
|
||||||
|
### Estado de ttf.zig (637 líneas)
|
||||||
|
- ✅ Parsing TTF completo
|
||||||
|
- ✅ Lookup de glyphs
|
||||||
|
- ✅ Métricas
|
||||||
|
- ❌ `drawGlyphPlaceholder()` solo dibuja rectángulos, NO renderiza contornos
|
||||||
|
|
||||||
|
### Fases de implementación
|
||||||
|
1. Parsear contornos (puntos + Bezier cuadráticas)
|
||||||
|
2. Rasterización básica (scanline)
|
||||||
|
3. Antialiasing (coverage-based)
|
||||||
|
4. Integración con SoftwareRenderer
|
||||||
|
|
||||||
|
### Referencia
|
||||||
|
- **stb_truetype.h** (~5000 líneas C) - implementación de referencia
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## INFORMACIÓN DEL PROYECTO
|
## INFORMACIÓN DEL PROYECTO
|
||||||
|
|
||||||
| Campo | Valor |
|
| Campo | Valor |
|
||||||
|
|
|
||||||
|
|
@ -211,6 +211,10 @@ pub const TextInputConfig = struct {
|
||||||
password: bool = false,
|
password: bool = false,
|
||||||
/// Padding inside the input
|
/// Padding inside the input
|
||||||
padding: u32 = 4,
|
padding: u32 = 4,
|
||||||
|
/// Override text color (for validation feedback). If null, uses theme default.
|
||||||
|
text_color: ?Style.Color = null,
|
||||||
|
/// Override border color (for validation feedback). If null, uses theme default.
|
||||||
|
border_color: ?Style.Color = null,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Result of text input widget
|
/// Result of text input widget
|
||||||
|
|
@ -275,8 +279,9 @@ pub fn textInputRect(
|
||||||
// Theme colors
|
// Theme colors
|
||||||
const theme = Style.Theme.dark;
|
const theme = Style.Theme.dark;
|
||||||
const bg_color = if (has_focus) theme.input_bg.lighten(5) else theme.input_bg;
|
const bg_color = if (has_focus) theme.input_bg.lighten(5) else theme.input_bg;
|
||||||
const border_color = if (has_focus) theme.primary else theme.input_border;
|
// Use override colors if provided, otherwise use theme defaults
|
||||||
const text_color = theme.input_fg;
|
const border_color = config.border_color orelse (if (has_focus) theme.primary else theme.input_border);
|
||||||
|
const text_color = config.text_color orelse theme.input_fg;
|
||||||
const placeholder_color = theme.secondary;
|
const placeholder_color = theme.secondary;
|
||||||
|
|
||||||
// Draw background
|
// Draw background
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue