From 0753b31990d7645930bfb54fbd51d7eef77bb51b Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Wed, 25 Mar 2026 15:15:33 -0700 Subject: [PATCH] fix(spaces): correct API paths for member/invite operations in settings panel All fetch calls in rstack-space-settings were missing the /api/spaces prefix, causing 404s for add-by-username, invite-by-email, change-role, remove-member, and load-invites. Also add color-scheme: light dark to fix native select dropdowns rendering in light mode on dark theme. Co-Authored-By: Claude Opus 4.6 --- shared/components/rstack-space-settings.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/shared/components/rstack-space-settings.ts b/shared/components/rstack-space-settings.ts index e4561b4..2bc9a2f 100644 --- a/shared/components/rstack-space-settings.ts +++ b/shared/components/rstack-space-settings.ts @@ -213,7 +213,7 @@ export class RStackSpaceSettings extends HTMLElement { // Load invites (admin only) if (this._isAdmin && token) { try { - const res = await fetch(`/${this._space}/invites`, { + const res = await fetch(`/api/spaces/${this._space}/invites`, { headers: { "Authorization": `Bearer ${token}` }, }); if (res.ok) { @@ -615,7 +615,7 @@ export class RStackSpaceSettings extends HTMLElement { if (!token) return; try { - const res = await fetch(`/${this._space}/members/add`, { + const res = await fetch(`/api/spaces/${this._space}/members/add`, { method: "POST", headers: { "Content-Type": "application/json", @@ -649,7 +649,7 @@ export class RStackSpaceSettings extends HTMLElement { if (!token) return; try { - const res = await fetch(`/${this._space}/invite`, { + const res = await fetch(`/api/spaces/${this._space}/invite`, { method: "POST", headers: { "Content-Type": "application/json", @@ -693,7 +693,7 @@ export class RStackSpaceSettings extends HTMLElement { if (!token) return; try { - await fetch(`/${this._space}/members/${encodeURIComponent(did)}`, { + await fetch(`/api/spaces/${this._space}/members/${encodeURIComponent(did)}`, { method: "PATCH", headers: { "Content-Type": "application/json", @@ -710,7 +710,7 @@ export class RStackSpaceSettings extends HTMLElement { if (!token) return; try { - await fetch(`/${this._space}/members/${encodeURIComponent(did)}`, { + await fetch(`/api/spaces/${this._space}/members/${encodeURIComponent(did)}`, { method: "DELETE", headers: { "Authorization": `Bearer ${token}` }, }); @@ -739,6 +739,7 @@ export class RStackSpaceSettings extends HTMLElement { const PANEL_CSS = ` :host { display: contents; + color-scheme: light dark; } .panel {