kRedrawDivider top-level constant

String const kRedrawDivider

The rule a pane draws where a child cleared its own screen.

A child emitting kClearScreen is not a request to throw anything away. It is revali dev redrawing the screen it believes it owns — _wipeOrDivide in vm_service_handler.dart writes it on every reload, on every status board and on c — and the three are indistinguishable in the byte stream, because they are the same two bytes.

Obeying it cost a developer the one thing they needed. A service that fails to bind shows needs fix; pressing r reloads it; the reload's first act is to clear, and the bind error that explained the row went with it, leaving a pane that said only what the reload had managed so far.

So the sequence becomes a divider and the history stays. The pane scrolls now, which is what settles the argument: keeping the lines is not hoarding them off-screen, it is leaving them somewhere k and PageUp can reach.

A real clear still exists and still empties the pane — ServiceSession.clear, called from the c key. It is the only place it can live, and the reason is the paragraph above: c is a keystroke the parent handles, so the parent is the one side that can tell a clear someone asked for from a redraw nobody did.

Coloured here, at the source, rather than special-cased in the renderer: it travels as an ordinary line through an ordinary buffer, and a line that needed the pane to recognise it would be one the pane could get wrong.

Implementation

const kRedrawDivider = '\x1B[90m── redraw ──\x1B[0m';