diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-06 17:14:15 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-06 17:14:15 -0300 |
| commit | 1852dd3c1247ee66b4265b0a7ee8b3afd08a8fa5 (patch) | |
| tree | 34f9bfba7439f80dfdd2870c716924f89d4cbf9f /test/syntax.zig | |
| parent | 8f34d29cb7b480545d25c68a8a6146deefdf0523 (diff) | |
| download | pardes-1852dd3c1247ee66b4265b0a7ee8b3afd08a8fa5.tar.gz pardes-1852dd3c1247ee66b4265b0a7ee8b3afd08a8fa5.zip | |
messages: a fixed log of what the rows said, and a word to read it back
A message row is cleared by the next keystroke, so anything reported while you
were looking at another pane was gone before you could read it — a save that
failed, a watcher's reload, a builtin's complaint. `setMessage` now records
into a fixed ring first: no allocation and no failure path, because it sits
underneath `reportError`, which is reached from sites that are reporting an
allocation failure. `Messages` (`SPC h m`) reads it back oldest-first.
Three things an adversarial pass found, each of which defeated the feature:
PROGRESS IS NOT A MESSAGE. A language server emits `Indexing 47%` several
times a second, and every tick is a distinct string BY CONSTRUCTION, so no
de-duplication can collapse it: at the client's one-per-150ms throttle it
takes about nineteen seconds to push every real message out of the ring. A log
that one indexing run empties is not a log. That path is `setStatus` now —
the row, and nothing else.
THE CLOCK MADE EVERY HOST MESSAGE UNIQUE. `message.stamp` prefixes `HH:MM:SS`,
so `saved /x.zig` at 14:32:07 and at :09 compared unequal and the ring filled
with rows that look identical and each say (x1) — exactly the case the
de-duplication exists for. It compares `message.body` now, the row without its
clock, and the newest wording wins so the row carries the last time it
happened rather than the first. It also keys on the PANE (one pane's failure
must not be recorded as another's) and compares the truncated form, so two
identical messages over 256 bytes stop being two rows.
AND THE CAPACITY BELONGS IN limits.zig. 128 entries is 32.75 KiB that is
allocated whether or not anybody reads it — 8.5% of the ESP32-P4's whole
384 KiB heap, about the size of its effect ring. The board takes sixteen.
The builtins/leader goldens move because the listing gains a row, and
builtins.snap middle-clicks a SCREEN COORDINATE that Tutor moved out of; both
updated selectively and verified against a fresh run.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016Q4RATpafkwahrovHQLKRf
Diffstat (limited to 'test/syntax.zig')
0 files changed, 0 insertions, 0 deletions
