fix(chat): refresh tab title on space switch (JS-9828)#2292
Merged
Conversation
Chat-layout objects intentionally skip C.ObjectOpen (their change-tree is the full message history), loading details via a lightweight subscribeIds instead. As a side effect the onObjectView -> keyboard.setWindowTitle() retry never runs for chat pages, so after switching space the tab kept the previous space's name until the user opened a regular object. Refresh the window/tab title in the chat page's load callback, once the object details are available. Fires once per open (incl. every space switch), no ongoing overhead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When using tabs, switching space (channel) in the vault didn't update the tab name — it only updated after opening a different object.
Cause
Chat-layout objects skip
C.ObjectOpen(their change-tree is the full message history), loading details via a lightweightsubscribeIdsinstead. As a side effect theonObjectView → keyboard.setWindowTitle()retry never runs for chat pages, so the landing chat's initialsetWindowTitle()no-ops (details not loaded yet) and nothing refreshes it afterward.Fix
Call
keyboard.setWindowTitle()in the chat page's load callback, once details are available. Fires once per open (incl. every space switch); no ongoing overhead.Closes JS-9828.