fix(room): make the members-panel filter work and stop the self-row 404 (LC-689) #658

Merged
longjacksonle merged 1 commit from fix/LC-689-members-filter into main 2026-08-09 06:10:56 +02:00

Two bugs in the LC-683 room members panel (opened from the header avatar cluster).

1. The filter did nothing

The inline oninput set row.hidden = true on non-matching rows, but each row is <a class="lc-member-row flex …">, and Tailwind's .flex { display: flex } (author) beats [hidden] { display: none } (UA) regardless of specificity - so hidden was inert and every row stayed visible. Same cascade trap as LC-678 / LC-686.

Fix: toggle style.display ('none' / '') instead of the hidden attribute - an inline style beats the class, and clearing it restores the .flex display. Filtering stays client-side over the rendered rows (bounded rooms, no round-trip).

2. Clicking your own row 404'd

Every row is a DM deep-link (href=/dm/{user_id}), so your own row pointed at /dm/{your-id} → 404 (you can't DM yourself). The viewer's own row now renders without a DM href (and without the hovercard) and is marked "You", so it doesn't navigate. An <a> with no href is valid and non-navigating, so self and non-self rows share one element; everyone else keeps the DM link + hovercard. Adds is_self to MemberRow and a members-you string (en + es).

Tests

Full lib suite (317, incl. members unit tests + i18n en/es parity). cargo fmt + clippy clean. No new CSS classes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PBAyCesyqJkZ5JgixXf9Lf

Two bugs in the LC-683 room members panel (opened from the header avatar cluster). ## 1. The filter did nothing The inline `oninput` set `row.hidden = true` on non-matching rows, but each row is `<a class="lc-member-row flex …">`, and Tailwind's `.flex { display: flex }` (author) beats `[hidden] { display: none }` (UA) regardless of specificity - so `hidden` was inert and every row stayed visible. **Same cascade trap as LC-678 / LC-686.** Fix: toggle `style.display` (`'none'` / `''`) instead of the `hidden` attribute - an inline style beats the class, and clearing it restores the `.flex` display. Filtering stays client-side over the rendered rows (bounded rooms, no round-trip). ## 2. Clicking your own row 404'd Every row is a DM deep-link (`href=/dm/{user_id}`), so your own row pointed at `/dm/{your-id}` → 404 (you can't DM yourself). The viewer's own row now renders **without** a DM href (and without the hovercard) and is marked **"You"**, so it doesn't navigate. An `<a>` with no href is valid and non-navigating, so self and non-self rows share one element; everyone else keeps the DM link + hovercard. Adds `is_self` to `MemberRow` and a `members-you` string (en + es). ## Tests Full lib suite (317, incl. members unit tests + i18n en/es parity). `cargo fmt` + `clippy` clean. No new CSS classes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PBAyCesyqJkZ5JgixXf9Lf
fix(room): make the members-panel filter work and stop the self-row 404 (LC-689)
All checks were successful
check-secrets / TruffleHog (pull_request) Successful in 4s
check-secrets / Kingfisher (pull_request) Successful in 5s
Create release / Create release from merged PR (pull_request) Has been skipped
check-secrets / Kingfisher (push) Successful in 5s
check-secrets / TruffleHog (push) Successful in 5s
check-secrets / Nosey parker (push) Successful in 5s
check-secrets / Nosey parker (pull_request) Successful in 7s
Check / clippy + fmt + tests (pull_request) Successful in 4m21s
4c0322e7d5
Two bugs in the LC-683 room members panel.

1. The filter did nothing. The inline oninput set `row.hidden = true` on non-matching rows, but each row is `<a class="lc-member-row flex ...">`, and Tailwind's `.flex { display: flex }` (author stylesheet) beats `[hidden] { display: none }` (UA stylesheet) regardless of specificity - so the hidden attribute was inert and every row stayed visible. Same cascade trap as LC-678 / LC-686. Fixed by toggling style.display ('none' / '') instead of the hidden attribute; an inline style beats the class, and clearing it restores the flex display.

2. Clicking your own row 404'd. Every row is a DM deep-link (href=/dm/{user_id}), so your own row pointed at /dm/{your-id}, which 404s because you cannot DM yourself. The viewer's own row now renders without a DM href (and without the profile hovercard) and is marked "You", so it simply does not navigate. An <a> with no href is valid and non-navigating, so self and non-self rows still share one element; everyone else keeps the DM link + hovercard. Adds is_self to MemberRow and a members-you string (en + es).

Full lib suite (317, incl. the members unit tests + i18n en/es parity); fmt + clippy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PBAyCesyqJkZ5JgixXf9Lf
longjacksonle scheduled this pull request to auto merge when all checks succeed 2026-08-09 06:08:12 +02:00
longjacksonle deleted branch fix/LC-689-members-filter 2026-08-09 06:10:56 +02: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
psa-systems/lets-chat!658
No description provided.