diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-24 21:01:37 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-24 21:01:54 -0300 |
| commit | e91261ff4f4602afec14d2fb958fd3e51a4dc62d (patch) | |
| tree | d9a50458be65477a0679159373d2e05eb4c1787f /core/ninep/ctl.zig | |
| parent | 1ebc8974489e46aee26409d54d7f1de567dbbb4a (diff) | |
| download | pardes-e91261ff4f4602afec14d2fb958fd3e51a4dc62d.tar.gz pardes-e91261ff4f4602afec14d2fb958fd3e51a4dc62d.zip | |
messages: a background question waits in its pane's tag and never takes the keyboard; SPC e gives it the keyboard, Esc leaves it waiting (pick-ui SPEC §10.2, §10.4, §3.2 asking, walk UI line C item 4): a file that changes on disk under unsaved text is now a question of its pane (one at a time: File.changed), its answers r Reload, k Keep mine and d Diff (Messages.Ask.answers); while the tag is at rest the question is drawn after the path as computed prefix text, 'changed on disk ▸ r Reload k Keep mine d Diff · SPC e to answer' (Messages.askingText; the tag's own words stay after it until the head of ruling R1 takes their place), its mark ? in the box and the notice row's '1 question · SPC e'; the keys stay the body's: View.answering (a pane's serial, the view's own keyboard state, ruling R4) is set by SPC e (item 5) and makes the answer's key answer it in handleKey's first slot, Esc leaving it waiting; the own-command questions (Del's side, a REPL's choice) keep that slot as they were; B2 on an answer's word in its tag answers it (exec.execute: Messages.answerWord); r reads the file again with the consent Get would ask for, k keeps the text and says so, d reads the disk's text (the host's read, taped) and shows where it parts from the buffer as ghost rows under that line, the disk's + lines first (Messages.diskDiff, Said.open: shown whatever the caret), d again hides them; an answer is logged ('... · answered Reload'); Messages.waitingAnswers is what a : lists first (for agent E); 9P /log says 'msg N changed on disk' (monkey9p's checker reads that); tests: Messages.zig 'a file changed on disk under unsaved text asks in its tag and never takes the keyboard: SPC e's keyboard answers, d shows the disk's lines as ghosts, Esc leaves it waiting, B2 on Reload reads it again', ninep/ctl.zig's disk-change test now finds the question; tui: core-test, shell-test, pane-test, behaviour-test pass; process-test: filewatch's golden takes the question (its tag row and its notice row), Restore's root-ctl case failed once under load and passes alone
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/ninep/ctl.zig')
| -rw-r--r-- | core/ninep/ctl.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/ninep/ctl.zig b/core/ninep/ctl.zig index c7f22b9a..e47aec94 100644 --- a/core/ninep/ctl.zig +++ b/core/ninep/ctl.zig @@ -2388,7 +2388,9 @@ test "a file changed on disk under unsaved edits is not reloaded: it says so, ge pardes.panes.File.changed(p, 0, "three\n"); try testing.expectEqualStrings("two\nmine\n", f.content); try testing.expect(f.revision != f.saved_revision); - try testing.expect(th.logHas(p, "changed on disk (get reloads it, Save overwrites it)")); + // ...and asks, in its tag (Messages.waiting), which /log hears. + try testing.expect(p.messages.waiting(p.panes[0].?) != null); + try testing.expect(th.logHas(p, "changed on disk\n")); var want: [32]u8 = undefined; try testing.expect(th.logHas(p, try std.fmt.bufPrint(&want, "changed {d}\n", .{serial}))); // Exit and get still ask about the edits. |
