messaging: open chat lost on page reload — chat SID never written to URL #185

Open
opened 2026-04-29 13:24:06 +00:00 by rawdaGastan · 0 comments
Member

Problem

Opening a chat updates the in-memory route signal but never writes to the URL. After F5 the user is dumped back to the empty 'Select a conversation' state.

The deserializer already supports it: Route::from_view at archipelagos/messaging/src/archipelago.rs:42-66 accepts a chat:<sid>:<name> view encoding. The serializer side just isn't wired.

Repro

  1. Open /space/default/messaging, click any conversation.
  2. URL stays at …/messaging (no view= segment, no +chat:… suffix).
  3. F5 → list view, conversation closed.

Where

archipelagos/messaging/src/archipelago.rs:263-270handle_chat_click:

let handle_chat_click = move |(sid, name): (String, String)| {
    active_chat.set(None);
    active_messages.set(vec![]);
    error.set(None);
    sending.set(false);
    route.set(Route::Chat { sid, name });   // ← only updates the in-memory signal
};

Suggested fix

When route.set(Route::Chat { … }) fires, also update the IslandContext view via the navigation API so the URL reflects chat:<sid>:<name>. Route::from_view will then restore on reload.

Found via QA session 2026-04-29.

## Problem Opening a chat updates the in-memory `route` signal but never writes to the URL. After F5 the user is dumped back to the empty 'Select a conversation' state. The deserializer already supports it: `Route::from_view` at `archipelagos/messaging/src/archipelago.rs:42-66` accepts a `chat:<sid>:<name>` view encoding. The serializer side just isn't wired. ## Repro 1. Open `/space/default/messaging`, click any conversation. 2. URL stays at `…/messaging` (no `view=` segment, no `+chat:…` suffix). 3. F5 → list view, conversation closed. ## Where `archipelagos/messaging/src/archipelago.rs:263-270` — `handle_chat_click`: ```rust let handle_chat_click = move |(sid, name): (String, String)| { active_chat.set(None); active_messages.set(vec![]); error.set(None); sending.set(false); route.set(Route::Chat { sid, name }); // ← only updates the in-memory signal }; ``` ## Suggested fix When `route.set(Route::Chat { … })` fires, also update the IslandContext view via the navigation API so the URL reflects `chat:<sid>:<name>`. `Route::from_view` will then restore on reload. Found via QA session 2026-04-29.
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
lhumina_code/hero_archipelagos#185
No description provided.