webclient: a stale session list no longer erases a session just created
Starting a session from the welcome screen sets selectedProfileId and
then awaits the create POST. The profile watcher fires on the microtask
that the await yields, so the list refetch is issued while the POST is
still in flight — it returns a page that predates the new session, and
fetchSessions replaced the whole array, so the placeholder createSession
had just inserted was gone. The session only came back on a manual
refresh. Reproduced in a store test.

sessions.js now remembers a session it created along with the id of the
last list request that had already started at that moment, and a page
that started after the creation is still believed. So the rescue is
bounded by one round trip — it cannot turn into a ghost row: a request
that left once the session existed reports it missing and it goes, and
deleteSession clears the mark outright. Search and special-list pages
are never padded this way, since they answer a different question.
1 parent b62b0c8 commit b60411a86f86024385ed74ec212d29aa35cc5f47
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 12 hours ago
Showing 6 changed files
View
webclient/dist/assets/index-BhdS4ahi.js 0 → 100644
Not supported
View
webclient/dist/assets/index-CyXHlAJP.js 100644 → 0
Not supported
View
webclient/dist/index.html
View
webclient/dist/sw.js
View
webclient/src/stores/sessions.js
View
webclient/tests/unit/stores/sessions.test.js