fix(hub): sign the grant label the bulk grant shows
bulk() computed each item's grant label twice, once for the shown pick and once for the entry the passkey signs. One map now feeds both. The grant-mode harness gains the missing base line. Origins:14bb4f3,0fa05c5. 🎯 Fix: 92 % 💥 Break: 3 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 89 🚦 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
b5cfa6e2c1
commit
454e1fd731
2 files changed
+4
-3
No files matched your search
@@ -185,8 +185,9 @@
|
|||||||
toast(`${label}: nothing to ${deny ? "deny" : "grant"}`, [], false);
|
toast(`${label}: nothing to ${deny ? "deny" : "grant"}`, [], false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const labels = new Map([...usable, ...alone].map((item) => [keyOf(item), deny ? "" : grantLabel(item)]));
|
||||||
const rows = [...usable, ...alone].map((item) => h("li", {},
|
const rows = [...usable, ...alone].map((item) => h("li", {},
|
||||||
h("div", {class: "row"}, pill(ITEM_LABELS[item.kind], KIND_TONES[item.kind]), !deny && grantLabel(item) ? h("span", {class: "muted"}, revealed(`→ ${shownPick(grantLabel(item))}`)) : null),
|
h("div", {class: "row"}, pill(ITEM_LABELS[item.kind], KIND_TONES[item.kind]), labels.get(keyOf(item)) ? h("span", {class: "muted"}, revealed(`→ ${shownPick(labels.get(keyOf(item)))}`)) : null),
|
||||||
h("strong", {}, revealed(item.title)),
|
h("strong", {}, revealed(item.title)),
|
||||||
item.kind === "operator" ? h("div", {class: "command"}, h("code", {}, revealed(item.command))) : null,
|
item.kind === "operator" ? h("div", {class: "command"}, h("code", {}, revealed(item.command))) : null,
|
||||||
item.kind === "operator" ? h("span", {class: "muted"}, revealed(`in ${item.directory}`)) : null,
|
item.kind === "operator" ? h("span", {class: "muted"}, revealed(`in ${item.directory}`)) : null,
|
||||||
@@ -201,7 +202,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (usable.length) {
|
if (usable.length) {
|
||||||
await submit(usable.map((item) => (deny ? denialOf(item, reason.value) : entryOf(item, "approve", grantLabel(item)))), `${label}: ${usable.length} entries`);
|
await submit(usable.map((item) => (deny ? denialOf(item, reason.value) : entryOf(item, "approve", labels.get(keyOf(item))))), `${label}: ${usable.length} entries`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openSheet(label, [h("p", {class: "muted"}, deny ? DENY_NOTE : grantNote(alone.length, usable.length)), h("ul", {class: "mini"}, rows), ...(deny ? [reasonChips(reason), h("label", {class: "deny-reason"}, "Reason (optional, every requester reads it)", reason)] : []),
|
openSheet(label, [h("p", {class: "muted"}, deny ? DENY_NOTE : grantNote(alone.length, usable.length)), h("ul", {class: "mini"}, rows), ...(deny ? [reasonChips(reason), h("label", {class: "deny-reason"}, "Reason (optional, every requester reads it)", reason)] : []),
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ const context = {
|
|||||||
known: {batches: new Set()},
|
known: {batches: new Set()},
|
||||||
ViewStore: {get: (path) => (path === "approval.mode" ? mode.value : null), set: (path, value) => { sets.push([path, value]); mode.value = value; }, on: (path, callback) => listeners.push([path, callback])},
|
ViewStore: {get: (path) => (path === "approval.mode" ? mode.value : null), set: (path, value) => { sets.push([path, value]); mode.value = value; }, on: (path, callback) => listeners.push([path, callback])},
|
||||||
denySplit: () => new El("deny"), jobOpen: () => false, load: async () => {}, openItem: () => {},
|
denySplit: () => new El("deny"), jobOpen: () => false, load: async () => {}, openItem: () => {},
|
||||||
items, mode, sets, listeners, all, text, buttons,
|
base, items, mode, sets, listeners, all, text, buttons,
|
||||||
};
|
};
|
||||||
const source = names.map((name) => fs.readFileSync(`${dir}/${name}`, "utf8")).join("\n");
|
const source = names.map((name) => fs.readFileSync(`${dir}/${name}`, "utf8")).join("\n");
|
||||||
const probe = `
|
const probe = `
|
||||||
|
|||||||
Reference in new issue
Block a user