Board switcher doesn't work #84
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/Ponente#84
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Need to refresh after using the board switcher for the board to actually appear
🤖 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.
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.jshookspushState/replaceState, so any change of path dropsdata-board-enteredfrom<html>. That re-arms this rule inapp.css:and then it waits for the page to call
ponenteEntrance.playBoard()back. ButBoardPage.razor's_entrancePlayedis component state, and Blazor reuses the component across/board/3→/board/7— same page, different route parameter. So the flag was stilltruefrom the first load,OnAfterRenderAsyncskipped the callback, the attribute was never restored, and the new board rendered atopacity: 0untilauth-enter.js's 5 s unblock timer gave up. Reloading builds a fresh component, which is why a refresh "fixed" it.Calendar.razorhas 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 = falseinOnParametersSetAsyncon 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.jsasserted the URL and the.nav-boards-togglelabel, and both of those are derived from the URL — they were correct the entire time the board was invisible. AddedexpectVisibleSoon, which polls the computed opacity of.board > .columnand.calendar-weekafter 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.docker/podmanboth absent), and the Playwright suite needs the compose stack on:8090pluspodman execinto the db for teardown. The new assertions are syntax-checked and follow the file's existing helpers.CLAUDE.mdunder 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