The app does not reopen on the server and channel that were open when it was closed #615

Closed
opened 2026-11-15 08:49:55 +00:00 by charles · 5 comments
Owner

Reported by Rhadamanthus in #flaxative-bug-reports (https://fluxer.forked.io/channels/1554245914976059392/1571415519456657408). Platform: Windows.

Report. "When launching the app, I expect it to launch at the last server and channel I was viewing"

Steps. Open a channel in some server, quit the app, start it again.

Notes. Already implemented on the dailyuse branch (Daily use 7, chat navigation persistence, #491) and not yet in a nightly. Close this once a nightly with Daily use is published and the reporter confirms.

**Reported by** Rhadamanthus in #flaxative-bug-reports (https://fluxer.forked.io/channels/1554245914976059392/1571415519456657408). Platform: Windows. **Report.** "When launching the app, I expect it to launch at the last server and channel I was viewing" **Steps.** Open a channel in some server, quit the app, start it again. **Notes.** Already implemented on the `dailyuse` branch (Daily use 7, chat navigation persistence, #491) and not yet in a nightly. Close this once a nightly with Daily use is published and the reporter confirms.
Author
Owner

Fixed in nightly 2026.1115.314.

Fixed in nightly 2026.1115.314.
charles reopened this issue 2026-11-15 19:14:57 +00:00
Author
Owner

Reopened 2026-11-15. Reporter (Windows, after nightly 314+): "The app now remembers where it left off in the server if I open that server, but it starts on the home view instead of that server's view. Is that by design?" — so the per-community last channel is restored, but the app does not start on the last community + channel (or DM) that was on screen at quit. Check what the original does at start (last route restore) in ~/src/fluxer-soundboard and match it.

**Reopened 2026-11-15.** Reporter (Windows, after nightly 314+): "The app now remembers where it left off in the server if I open that server, but it starts on the home view instead of that server's view. Is that by design?" — so the per-community last channel is restored, but the app does not start on the last community + channel (or DM) that was on screen at quit. Check what the original does at start (last route restore) in `~/src/fluxer-soundboard` and match it.
Author
Owner

In nightly 2026.1115.335.

In nightly 2026.1115.335.
Author
Owner

Reopened again 2026-11-16 (Charles, Linux AppImage, nightly 2026.1115.335, which contains PR #708): "it's still not resuming: it doesn't reconnect/show the server we were last on on a restart".

Evidence from that machine (read by the orchestrator; ids are the community's and a channel's):

  • The settings file does hold the place: [navigation.last_location] with guild_id and channel_id set, and [navigation.selected_channels] maps that guild to the same channel. So saving works; restoring does not.
  • The log of that start, in order (same second unless noted):
    1. discovering the instance …; gateway disconnected; 1 guilds, 13 channels (cached)
    2. logging in …; gateway disconnected; 1 guilds, 13 channels (cached)
    3. logged in as … ; gateway disconnected; 1 guilds, 13 channels (cached)
    4. … gateway connecting … → gateway identifying → gateway ready; 1 guilds, 14 channels (about 180 ms after step 1)
    5. gateway ready; 1 guilds, 15 channels (2 s later), gateway ready; 1 guilds, 21 channels (6 s later)
      There is no log line about a start place at all.
  • So this is the stored-session start with a cached READY (token and cache on disk, no login screen): the path PR #708 said was "covered by core tests only" because the dev server's demo login never stores a token or a cache. The app-level test added there (starts_on_the_channel_it_was_closed_on) does not go through it.

To find out, not assumed: is the restore armed before the cached state is loaded or only by a login that never happens on this path; does the "only if the home is still shown" check or the "restore once" flag get consumed by the cached READY before the settings' last_location has been handed to the core; does the channel count growing after READY (13 → 14 → 15 → 21: threads / lazily loaded channels) matter; is the restored selection then overwritten by something at start (e.g. the window's initial route, the updater, a SelectGuild(None)).

**Reopened again 2026-11-16 (Charles, Linux AppImage, nightly 2026.1115.335, which contains PR #708):** "it's still not resuming: it doesn't reconnect/show the server we were last on on a restart". Evidence from that machine (read by the orchestrator; ids are the community's and a channel's): - The settings file does hold the place: `[navigation.last_location]` with `guild_id` and `channel_id` set, and `[navigation.selected_channels]` maps that guild to the same channel. So **saving works; restoring does not**. - The log of that start, in order (same second unless noted): 1. `discovering the instance …; gateway disconnected; 1 guilds, 13 channels (cached)` 2. `logging in …; gateway disconnected; 1 guilds, 13 channels (cached)` 3. `logged in as … ; gateway disconnected; 1 guilds, 13 channels (cached)` 4. `… gateway connecting …` → `gateway identifying` → `gateway ready; 1 guilds, 14 channels` (about 180 ms after step 1) 5. `gateway ready; 1 guilds, 15 channels` (2 s later), `gateway ready; 1 guilds, 21 channels` (6 s later) There is no log line about a start place at all. - So this is the **stored-session start with a cached READY** (token and cache on disk, no login screen): the path PR #708 said was "covered by core tests only" because the dev server's demo login never stores a token or a cache. The app-level test added there (`starts_on_the_channel_it_was_closed_on`) does not go through it. To find out, not assumed: is the restore armed before the cached state is loaded or only by a login that never happens on this path; does the "only if the home is still shown" check or the "restore once" flag get consumed by the cached READY before the settings' `last_location` has been handed to the core; does the channel count growing after READY (13 → 14 → 15 → 21: threads / lazily loaded channels) matter; is the restored selection then overwritten by something at start (e.g. the window's initial route, the updater, a `SelectGuild(None)`).
charles reopened this issue 2026-11-16 03:22:42 +00:00
Author
Owner

PR #742 (merged). The reported failure on a stored-session start did not reproduce: a new app-level test starts with a stored token, a cached READY and a saved place, and the place is on screen from the first logged-in snapshot on unchanged textchat. The reporter has since said it may have worked.

What #742 does change:

  • Bug fixed: when the last place was a thread, the cached READY (which holds no threads) made the client treat it as gone, open the community's default channel and overwrite the saved place. It now waits for the live READY.
  • Logging: INFO lines beginning start place say whether a place was restored (and from which READY) or given up and why.
  • Tests for the stored-session start (channel and thread), threads and voice channels.

Closing. If a start still opens on the home, reopen with the start place lines of that start from the log.

Known, not fixed here: the friends page opened over a DM restores to the DM; the thread side panel is not reopened (its parent channel is).

PR #742 (merged). The reported failure on a stored-session start **did not reproduce**: a new app-level test starts with a stored token, a cached READY and a saved place, and the place is on screen from the first logged-in snapshot on unchanged `textchat`. The reporter has since said it may have worked. What #742 does change: - **Bug fixed:** when the last place was a thread, the cached READY (which holds no threads) made the client treat it as gone, open the community's default channel and overwrite the saved place. It now waits for the live READY. - **Logging:** INFO lines beginning `start place` say whether a place was restored (and from which READY) or given up and why. - Tests for the stored-session start (channel and thread), threads and voice channels. Closing. If a start still opens on the home, reopen with the `start place` lines of that start from the log. Known, not fixed here: the friends page opened over a DM restores to the DM; the thread side panel is not reopened (its parent channel is).
Sign in to join this conversation.
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
charles/fluxer-native#615
No description provided.