Commit Graph

4 Commits

  • fix(tui): sync test awaits with throttled render pipeline (#3076)
    Tests assumed renders complete synchronously after requestRender() +
    nextTick + flush(), but commit 6f5f37f8 changed requestRender() to
    schedule via setTimeout with a 16ms minimum interval. Tests reading
    viewport state before doRender() runs saw stale data.
    
    Add VirtualTerminal.waitForRender() helper that waits for the throttled
    render to settle (nextTick + 20ms + xterm flush), and replace all
    terminal.flush() calls after render-triggering actions with it.
    
    Fixes 8 failing tests across overlay-short-content, tui-render, and
    markdown test suites.
  • feat(tui): overlay positioning API with CSS-like values
    Add OverlayOptions for configurable positioning (anchor, margins, offsets,
    percentages). Add OverlayHandle for programmatic visibility control with
    hide/setHidden/isHidden. Add visible callback for responsive overlays.
    
    Extension API: ctx.ui.custom() now accepts overlayOptions and onHandle callback.
    
    Examples: overlay-qa-tests.ts (10 test commands), doom-overlay (DOOM at 35 FPS).
  • feat(tui): add OverlayOptions API and fix width overflow crash
    Adds positioning/sizing options for overlays and fixes crash when compositing
    lines with complex ANSI sequences exceed terminal width.