Board switcher doesn't work #84

Closed
opened 2026-08-14 15:57:40 +00:00 by Grandiras · 2 comments
Owner

Need to refresh after using the board switcher for the board to actually appear

Need to refresh after using the board switcher for the board to actually appear
Collaborator

🤖 On it — follow along in the action run; the reply will link the full session transcript.

📜 Live transcript — updating every ~5 minutes while the task runs.

🤖 On it — follow along in [the action run](https://git.grandiras.net/Grandiras/claude-bot/actions/runs/225); the reply will link the full session transcript. 📜 [Live transcript](https://git.grandiras.net/Grandiras/claude-bot/src/branch/claude-logs/transcripts/Grandiras/Ponente/issue-84/run-225.md) — updating every ~5 minutes while the task runs.
Collaborator

Pushed to claude/issue-84.

What was actually wrong

The switcher navigates fine — the URL changes, the header updates. What doesn't appear is the board, and the cause is the entrance gate, which is two halves where only one was being reset.

js/auth-enter.js hooks pushState/replaceState, so any change of path drops data-board-entered from <html>. That re-arms this rule in app.css:

html.js:not([data-board-entered]) .board > .column { opacity: 0; }

and then it waits for the page to call ponenteEntrance.playBoard() back. But BoardPage.razor's _entrancePlayed is component state, and Blazor reuses the component across /board/3/board/7 — same page, different route parameter. So the flag was still true from the first load, OnAfterRenderAsync skipped the callback, the attribute was never restored, and the new board rendered at opacity: 0 until auth-enter.js's 5 s unblock timer gave up. Reloading builds a fresh component, which is why a refresh "fixed" it.

Calendar.razor has the identical shape on /calendar/board/{id} (data-calendar-entered, _entrancePlayed), so switching board from the calendar was blank in the same way.

The fix

_entrancePlayed = false in OnParametersSetAsync on both pages, beside the rest of the outgoing board's state that's already cleared there — the two halves of the gate now reset together, and the switch replays the entrance instead of swallowing it.

Why the existing test didn't catch it

boards.spec.js asserted the URL and the .nav-boards-toggle label, and both of those are derived from the URL — they were correct the entire time the board was invisible. Added expectVisibleSoon, which polls the computed opacity of .board > .column and .calendar-week after each switch on a 3 s deadline, deliberately under the 5 s unblock timer so the test can't pass by simply waiting the bug out.

Verified

  • dotnet build Ponente.sln — succeeded, 0 warnings (installed the .NET 10 SDK in the container; it wasn't present).
  • dotnet test Ponente.sln165 passed, 0 failed.
  • The e2e suite could not be run here: this CI container has no container engine (docker/podman both absent), and the Playwright suite needs the compose stack on :8090 plus podman exec into the db for teardown. The new assertions are syntax-checked and follow the file's existing helpers.
  • Also added a bullet to CLAUDE.md under the entrance notes recording that the gate is two halves and both must be reset wherever the path can change without the component being rebuilt.

⏱ 5m 47s · 39 turns · tokens: 96.6k in / 21.0k out (+3387.9k cache-read)
📜 Full session transcript
→ Opened PR: #86

Pushed to **`claude/issue-84`**. ## What was actually wrong The switcher navigates fine — the URL changes, the header updates. What doesn't appear is the board, and the cause is the **entrance gate**, which is two halves where only one was being reset. `js/auth-enter.js` hooks `pushState`/`replaceState`, so any change of path drops `data-board-entered` from `<html>`. That re-arms this rule in `app.css`: ```css html.js:not([data-board-entered]) .board > .column { opacity: 0; } ``` and then it waits for the page to call `ponenteEntrance.playBoard()` back. But `BoardPage.razor`'s `_entrancePlayed` is component state, and Blazor **reuses** the component across `/board/3` → `/board/7` — same page, different route parameter. So the flag was still `true` from the first load, `OnAfterRenderAsync` skipped the callback, the attribute was never restored, and the new board rendered at `opacity: 0` until `auth-enter.js`'s 5 s unblock timer gave up. Reloading builds a fresh component, which is why a refresh "fixed" it. `Calendar.razor` has the identical shape on `/calendar/board/{id}` (`data-calendar-entered`, `_entrancePlayed`), so switching board from the calendar was blank in the same way. ## The fix `_entrancePlayed = false` in `OnParametersSetAsync` on both pages, beside the rest of the outgoing board's state that's already cleared there — the two halves of the gate now reset together, and the switch replays the entrance instead of swallowing it. ## Why the existing test didn't catch it `boards.spec.js` asserted the URL and the `.nav-boards-toggle` label, and **both of those are derived from the URL** — they were correct the entire time the board was invisible. Added `expectVisibleSoon`, which polls the computed opacity of `.board > .column` and `.calendar-week` after each switch on a **3 s** deadline, deliberately under the 5 s unblock timer so the test can't pass by simply waiting the bug out. ## Verified - `dotnet build Ponente.sln` — succeeded, 0 warnings (installed the .NET 10 SDK in the container; it wasn't present). - `dotnet test Ponente.sln` — **165 passed, 0 failed**. - The e2e suite could not be run here: this CI container has no container engine (`docker`/`podman` both absent), and the Playwright suite needs the compose stack on `:8090` plus `podman exec` into the db for teardown. The new assertions are syntax-checked and follow the file's existing helpers. - Also added a bullet to `CLAUDE.md` under the entrance notes recording that the gate is two halves and both must be reset wherever the path can change without the component being rebuilt. --- ⏱ 5m 47s · 39 turns · tokens: 96.6k in / 21.0k out (+3387.9k cache-read) 📜 [Full session transcript](https://git.grandiras.net/Grandiras/claude-bot/src/branch/claude-logs/transcripts/Grandiras/Ponente/issue-84/run-225.md) → Opened PR: https://git.grandiras.net/Grandiras/Ponente/pulls/86
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
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
Grandiras/Ponente#84
No description provided.