summaryrefslogtreecommitdiff
path: root/test/snapshots
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-06 17:14:15 -0300
committerGabriel Schneider <[email protected]>2026-09-06 17:14:15 -0300
commit1852dd3c1247ee66b4265b0a7ee8b3afd08a8fa5 (patch)
tree34f9bfba7439f80dfdd2870c716924f89d4cbf9f /test/snapshots
parent8f34d29cb7b480545d25c68a8a6146deefdf0523 (diff)
downloadpardes-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/snapshots')
-rw-r--r--test/snapshots/builtins.golden70
-rw-r--r--test/snapshots/builtins.snap4
-rw-r--r--test/snapshots/leader.golden6
3 files changed, 40 insertions, 40 deletions
diff --git a/test/snapshots/builtins.golden b/test/snapshots/builtins.golden
index 555a6fc4..a9a34616 100644
--- a/test/snapshots/builtins.golden
+++ b/test/snapshots/builtins.golden
@@ -39,40 +39,40 @@
|61: 27 SPC f n New topbar
|62: 28 SPC f s Save
|63: 29 SPC h c Changelog topbar
-|64: 30 SPC h t Tutor topbar
-|65: 31 SPC j i Forward C-i
+|64: 30 SPC h m Messages
+|65: 31 SPC h t Tutor topbar
== snap index-tail grid=120x66 cursor=7,64
-|35: 66 SPC t w Wrap
-|36: 67 SPC t z PdfFit
-|37: 68 SPC w h Left C-w h, C-w left
-|38: 69 SPC w j Down C-w j, C-w down
-|39: 70 SPC w k Up C-w k, C-w up
-|40: 71 SPC w l Right C-w l, C-w right
-|41: 72 SPC y ClipYank
-|42: 73 Look enter, right-click
-|43: 74 Exec tab, middle-click
-|44: 75 Msg
-|45: 76 ThemeFile
-|46: 77 DumpThemes
-|47: 78 Filter
-|48: 79 EffectCode
-|49: 80 9p
-|50: 81 Theme
-|51: 82 Shell
-|52: 83
-|53: 84 language keys (motions, not words):
-|54: 85 gd gD gy gi gr goto: definition,
-|55: 86 declaration, type-def,
-|56: 87 implementation, refs
-|57: 88 ]d [d ]D [D diagnostics: next,
-|58: 89 prev, last, first
-|59: 90 = format (applies, one
-|60: 91 undo step)
-|61: 92 Tab after a . completion, in insert
-|62: 93 C-left-click definition, by mouse
-|63: 94 SPC l ... hover, rename, symbols,
-|64: 95 calls, types: above
-|65: 96
+|35: 67 SPC t w Wrap
+|36: 68 SPC t z PdfFit
+|37: 69 SPC w h Left C-w h, C-w left
+|38: 70 SPC w j Down C-w j, C-w down
+|39: 71 SPC w k Up C-w k, C-w up
+|40: 72 SPC w l Right C-w l, C-w right
+|41: 73 SPC y ClipYank
+|42: 74 Look enter, right-click
+|43: 75 Exec tab, middle-click
+|44: 76 Msg
+|45: 77 ThemeFile
+|46: 78 DumpThemes
+|47: 79 Filter
+|48: 80 EffectCode
+|49: 81 9p
+|50: 82 Theme
+|51: 83 Shell
+|52: 84
+|53: 85 language keys (motions, not words):
+|54: 86 gd gD gy gi gr goto: definition,
+|55: 87 declaration, type-def,
+|56: 88 implementation, refs
+|57: 89 ]d [d ]D [D diagnostics: next,
+|58: 90 prev, last, first
+|59: 91 = format (applies, one
+|60: 92 undo step)
+|61: 93 Tab after a . completion, in insert
+|62: 94 C-left-click definition, by mouse
+|63: 95 SPC l ... hover, rename, symbols,
+|64: 96 calls, types: above
+|65: 97
== snap not-a-picker grid=120x66 cursor=19,61
== snap window-group grid=120x66 cursor=19,35
|35: 1 pardes builtins under SPC w
@@ -152,5 +152,5 @@
|61: 27 SPC f n New topbar
|62: 28 SPC f s Save
|63: 29 SPC h c Changelog topbar
-|64: 30 SPC h t Tutor topbar
-|65: 31 SPC j i Forward C-i
+|64: 30 SPC h m Messages
+|65: 31 SPC h t Tutor topbar
diff --git a/test/snapshots/builtins.snap b/test/snapshots/builtins.snap
index 4eaa3543..95db3fd9 100644
--- a/test/snapshots/builtins.snap
+++ b/test/snapshots/builtins.snap
@@ -65,8 +65,8 @@ key space ?
wait 10000 SPC c n
key g g
stable 700 15000
-press middle 20 65
-release middle 20 65
+press middle 20 66
+release middle 20 66
wait 10000 PARDES TUTOR
stable 700 15000
snap tutor-from-index
diff --git a/test/snapshots/leader.golden b/test/snapshots/leader.golden
index 5d3adba2..d2068e8d 100644
--- a/test/snapshots/leader.golden
+++ b/test/snapshots/leader.golden
@@ -68,9 +68,9 @@
|22: 1 pardes builtins under SPC h
|23: 2
|24: 3 SPC h c Changelog topbar
-|25: 4 SPC h t Tutor topbar
-|26: 5
-|27:
+|25: 4 SPC h m Messages
+|26: 5 SPC h t Tutor topbar
+|27: 6
|28:
|29:
|30: