fix(hub): tests follow requirement 030 and the line comments, dead ask answer path removed
🧪 Test / 🧪 Lock + lint (push) Waiting to run
🧪 Test / 🧪 Lock + lint (push) Waiting to run
Requirement 030 answers a permission ask with Grant and Deny only, so the ask branch of choiceOf, answerAsk, askDialog, ALLOW and TELL had no caller left; they are removed. test_ask_answers_e2e now denies one ask with Deny and one through Deny via with a typed reason, both by post to the requester; test_stream_keeps_typing_e2e types into a named-option decision while an ask keeps its diff scroll. The grant-mode and inbox-gone harnesses load page-diff.js (and page-deny.js) instead of missing lineNotes, the slash marker test names the new Comment field, and the line-comment e2e expect the requester and radio commands the hub really sends. The help line no longer reads as an agent calling an agent and uses an ASCII minus for the zoom keys. Evidence: tests/e2e 146 OK, make test 2123 OK with ruff, shellcheck and markdownlint clean, MEDUSA 100 % over 624729d..this tree. 🎯 Fix: 96 % 💥 Break: 2 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 94 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2722cda1b5
commit
d3bc54f401
11 files changed
+45
-44
No files matched your search
@@ -154,13 +154,6 @@
|
||||
|
||||
const signsFor = (item) => `${item.agent} gets this answer as a call once your passkey signs it`;
|
||||
|
||||
/**
|
||||
* @param {Object} item a permission ask.
|
||||
* @param {string} answer the picked label, or the typed text.
|
||||
* @param {boolean} typed whether answer is typed text, which always denies with it as the reason.
|
||||
*/
|
||||
const answerAsk = (item, answer, typed) => (!typed && answer === ALLOW ? approveOne(item) : denyNow(item, lineNotes(keyOf(item)) ? "call" : "post", withNotes(item, typed ? answer : ""), item.to));
|
||||
|
||||
/**
|
||||
* @param {Object} item an inbox item.
|
||||
* @param {Function} after called before a picked answer is sent.
|
||||
@@ -174,9 +167,6 @@
|
||||
if (item.kind === "decision") {
|
||||
return choiceDialog(item, {pick: (label) => { after(); chooseOne(item, label); }, toggled: new Set(), chosen: ui.selected.has(keyOf(item)) ? grantLabel(item) : "", locked: item.held, hint: signsFor(item), group: "", other: OTHER_PROMPT});
|
||||
}
|
||||
if (item.kind === "ask") {
|
||||
return choiceDialog(askDialog(item.id), {pick: (answer, typed) => { after(); answerAsk(item, answer, typed); }, toggled: new Set(), chosen: ui.selected.has(keyOf(item)) ? ALLOW : "", locked: item.held, hint: `the answer goes to ${item.to || "its session"} once your passkey signs it`, group: "", other: TELL});
|
||||
}
|
||||
const shown = ui.selected.has(keyOf(item)) ? grantLabel(item) : "";
|
||||
return asked(item) ? [answerTo(item), choiceDialog(item, {pick: (label) => { after(); answerPick(item, label); }, toggled: new Set(), chosen: shown, locked: item.held, hint: signsFor(item), group: "", other: OTHER_PROMPT})] : null;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user