fix(spaces): stop module settings selects from polluting scope overrides

Module settings selects (notebook-id, select types) shared the .scope-select
CSS class with actual data-scope selects, causing their values to be sent as
scopeOverrides — triggering "Invalid scope '' for rnotes" on save.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-03-21 16:49:17 -07:00
parent 448b68eb62
commit 64f9603e39
1 changed files with 2 additions and 2 deletions

View File

@ -970,7 +970,7 @@ export class RStackSpaceSwitcher extends HTMLElement {
html += ` html += `
<div class="scope-row"> <div class="scope-row">
<span class="scope-label">Data scope:</span> <span class="scope-label">Data scope:</span>
<select class="scope-select" data-mod-id="${m.id}"> <select class="scope-select data-scope-select" data-mod-id="${m.id}">
<option value="space" ${m.scoping.currentScope === "space" ? "selected" : ""}>Space</option> <option value="space" ${m.scoping.currentScope === "space" ? "selected" : ""}>Space</option>
<option value="global" ${m.scoping.currentScope === "global" ? "selected" : ""}>Global</option> <option value="global" ${m.scoping.currentScope === "global" ? "selected" : ""}>Global</option>
</select> </select>
@ -1068,7 +1068,7 @@ export class RStackSpaceSwitcher extends HTMLElement {
// Collect scope overrides // Collect scope overrides
const scopeOverrides: Record<string, string> = {}; const scopeOverrides: Record<string, string> = {};
container.querySelectorAll(".scope-select").forEach((sel) => { container.querySelectorAll(".data-scope-select").forEach((sel) => {
const el = sel as HTMLSelectElement; const el = sel as HTMLSelectElement;
scopeOverrides[el.dataset.modId!] = el.value; scopeOverrides[el.dataset.modId!] = el.value;
}); });