magi-code 0.96.1

Repository-aware CLI coding agent for terminal work
Documentation
# Render guide

Draws supplied display state without applying workflow changes.

## Where to look

| Change | Owner |
| --- | --- |
| Frame/shared scroll/pane helpers | `../render.rs` |
| Transcript and scroll labels | `transcript.rs` |
| Activity tree/details | `activity.rs` |
| Prompt/cursor/selection/completion | `prompt.rs` |
| Header/footer | `header.rs`, `prompt/footer.rs` |
| Top-modal dispatch/content geometry | `modals.rs`; shell: `../modal_container.rs` |
| Subagent/theme/side views | `modals/subagent_viewer.rs`, `modals/theme.rs`, `transcript_modal.rs` |

## Local contracts

- Layout depends deterministically on supplied state/rectangle. Guard empty/tiny areas and saturate coordinate/scroll arithmetic; geometry helpers also serve input hit testing.
- `render_scroll_view_persistent_impl` copies scroll state locally; widget-adjusted offsets never write back during draw. Shared renderer reserves gutter and disables native scrollbars beneath theme.
- System-prompt source cards paint visible viewport only. Loading/errors/previews use `render_text_scroll_view_with_theme`, not document-sized cell buffers. Retain Ratatui wrapping, shared card heights and plain-text trailing-line semantics; height/wrapped-prefix scans remain intentional.
- Keep windowed transcript projection; formatting belongs in `../transcript_cards/`, selection overlays in `../transcript_projection.rs`. Reuse semantic roles for Markdown/code/diffs/activity instead of repeated parsing per pane.
- Drawing/hit targets/list windows share modal geometry, including tiny areas. `draw_top_modal` follows `state.top_modal()`; modal rendering displays workflow state rather than changing it.
- Modal text remains bounded/redacted and help labels derive from input bindings.