58c39ebc91
When a deferred tool's schema auto-loaded after the model requested it, the resulting status toast (e.g. "Auto-loaded deferred tool 'edit_file' after model request.") could render at `footer_area.y - 1` — which on tight terminal layouts is the bottom row of the composer area. The toast then visibly overwrote the start of the user's typed text, corrupting the display until the next redraw. Root cause: `render_toast_stack_overlay` computed `max_above = footer_area.y.min(full_area.height)` — bounded only by the screen height, not by the composer's footprint. So on a 16-row terminal with composer rows 10–14 and footer at row 15, `max_above` resolved to 15 and the renderer happily placed a toast at row 14, on top of the composer. The fix threads `composer_area: Rect` into the renderer and clamps `max_above = footer_area.y.saturating_sub(composer_area.y + composer_area.height)`. When the composer and footer are adjacent (no gap), `max_above` collapses to 0 and the overlay returns early without drawing anything. Non-adjacent layouts — which arise on taller terminals where the composer and footer don't touch — render unchanged. Replaced the contributor's confused test commentary with a tight two-assertion pin: `max_above == 0` on an adjacent layout, plus a sanity `max_above <= gap` invariant so any future regression that re-introduces the overlap fails the test rather than the user's display. Harvested from PR #1485 by @MeAiRobot Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>