back button: Enable returning to server tab from Settings#1506
Open
Paperyduke6 wants to merge 1 commit intozulip:mainfrom
Open
back button: Enable returning to server tab from Settings#1506Paperyduke6 wants to merge 1 commit intozulip:mainfrom
Paperyduke6 wants to merge 1 commit intozulip:mainfrom
Conversation
When opening a functional tab (e.g. Settings), the back button was always disabled, giving users no way to return to the server they were viewing. Track the previously active tab index when entering a functional tab, and use it to re-enable the back button and navigate back on click. The button remains disabled only when there is no previous server tab to return to (e.g. on first launch). Fixes zulip#650.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #650
Problem
When a user opens Settings (or any functional tab), the back button in the sidebar is always disabled, even when they navigated there from an active server tab. There was no way to return without clicking the server icon directly.
Changes
All changes are in app/renderer/main.ts:
Track previousActiveTabIndex: saved when entering a functional tab from a server tab
Re-enable the back button when a valid previous tab exists
Handle the back button click for functional tabs by activating the previous tab and resetting the index
The back button remains disabled only when there is genuinely no previous tab to return to (e.g. first launch with no servers).
Testing
Add a Zulip server and open it
Click Settings: back button should now be enabled
Click back: should return to the server tab
Open the app fresh with no servers: back button should remain disabled in the Add Server view
Screen Capture
2026-03-27.09-48-14.mp4