fix(spaces): Members button hidden in spaces by hardcoded data-space=personal (#311 follow-up) #314

Merged
Cordy merged 5 commits from fix/spacemembers into main 2026-08-26 14:57:28 +00:00
Owner

Symptom

The Members button (#spacemembers) disappeared inside spaces on the deployment.

Root cause (not a redesign logic change)

The button's show-condition is byte-identical before PR1, in PR1, and now: sm.hidden = !(feat.spaceMembers && cwd matches /spaces/<name>). PR1 did not touch it.

What PR1 did add was a one-time init line:

document.body.setAttribute("data-space", "personal");  // "Personal space by default … until PR2/PR3"

plus the CSS body[data-space="personal"] #spacemembers{display:none}. Because data-space is hardcoded to personal and never updated per-view, that CSS rule fires in every view — so the Members button is display:none even in a space (overriding the JS that correctly un-hides it). Before PR1 the attribute was never set, so the rule never matched and the button showed.

Fix

Delete the redundant body[data-space="personal"] #spacemembers{display:none} rule. The button's own JS gate already hides it in personal space (not at a /spaces/<name> root) and shows it in a space — so removing the rule restores correct behaviour without reintroducing the empty Owner column (which stays hidden via the still-hardcoded data-space="personal", as intended until per-item owner data exists).

One-line CSS removal; anchored splice (assert count==1), node --check on the app scripts, members JS gate asserted still present.

## Symptom The **Members** button (`#spacemembers`) disappeared inside spaces on the deployment. ## Root cause (not a redesign logic change) The button's show-condition is byte-identical before PR1, in PR1, and now: `sm.hidden = !(feat.spaceMembers && cwd matches /spaces/<name>)`. PR1 did **not** touch it. What PR1 *did* add was a one-time init line: ```js document.body.setAttribute("data-space", "personal"); // "Personal space by default … until PR2/PR3" ``` plus the CSS `body[data-space="personal"] #spacemembers{display:none}`. Because `data-space` is hardcoded to `personal` and never updated per-view, that CSS rule fires in **every** view — so the Members button is `display:none` even in a space (overriding the JS that correctly un-hides it). Before PR1 the attribute was never set, so the rule never matched and the button showed. ## Fix Delete the redundant `body[data-space="personal"] #spacemembers{display:none}` rule. The button's own JS gate already hides it in personal space (not at a `/spaces/<name>` root) and shows it in a space — so removing the rule restores correct behaviour without reintroducing the empty Owner column (which stays hidden via the still-hardcoded `data-space="personal"`, as intended until per-item owner data exists). One-line CSS removal; anchored splice (assert count==1), `node --check` on the app scripts, members JS gate asserted still present.
Cordy merged commit 7475a271d8 into main 2026-08-26 14:57:28 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#314
No description provided.