You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6820015
Browse filesBrowse the repository at this point in the historyBrowse files
fix(web/shell): #107 review — a refused commit's "NONE … applied" line is always shown in a terminal
The bug: both tabs showed only the first 8 notes of a run. A refusal is eight notes on its own (six
reasons, "and N more refused", then "NONE of this command's file changes were applied"), from the
terminal's commit (web/shell/src/commit.js) and from levelcode-ai's review (shellCommit.js) alike, and
the runtime puts the notes the run already had in front of it: a moved folder (said on every run), an
emptied /tmp or /home/user, the engine's own notes, variables not kept. With one of those the NONE line
was the ninth note and was cut, so the visitor saw six refusals and never read that nothing was applied.
The fix: notesShown() in output-sink.js, used by pty.js and agent-tab.js. Still at most 8 notes in their
order; when there are more, a note that says the changes were NOT applied ("NONE of …", "… were/was NOT
applied") takes the place of the last of the others. The agent's tab drops non-string notes before the
cap instead of letting them use a place. README section 7 and terminal/NOTES.md say so.
Tests: shell-terminal-pty ("a refused commit's NONE … line is shown behind a note the run already had")
feeds the terminal commit's real refusal notes behind an emptied-/tmp note; shell-terminal-agent-tab
("a refused review's NONE … line …") feeds levelcode-ai's real refusal notes behind one and three notes;
shell-terminal-sink pins notesShown() itself (the runtime's own NOT applied endings, a plain cut without
one, a file name with "none" in it). All three fail on the unfixed code (the NONE line missing; notesShown
not a function) and pass now.
Copy file name to clipboardExpand all lines: web/test/unit/shell-terminal-agent-tab.test.js
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -322,6 +322,33 @@ test('at most 8 notes of a run are shown', () => {
322
322
assert.ok(!s.includes('note 9'));
323
323
});
324
324
325
+
test('a refused review\'s "NONE of this command\'s file changes were applied" is shown behind the notes the run already had; still at most 8',async()=>{
326
+
// What levelcode-ai's review says when it refuses an agent's set (six reasons, the count of the rest, then the NONE
327
+
// line), behind what the runtime says on every run of a folder it had to move. The NONE line was the ninth note.
// a test that awaits something that never settles leaves nothing to keep the process alive: it would exit 0, silently
179
202
process.on('exit',(code)=>{if(code===0&&!finished){console.error('the tests did not finish: one of them waits for something that never happens');process.exitCode=1;}});
0 commit comments