Skip to content

back button: Enable returning to server tab from Settings#1506

Open
Paperyduke6 wants to merge 1 commit intozulip:mainfrom
Paperyduke6:settings-back-button
Open

back button: Enable returning to server tab from Settings#1506
Paperyduke6 wants to merge 1 commit intozulip:mainfrom
Paperyduke6:settings-back-button

Conversation

@Paperyduke6
Copy link
Copy Markdown

@Paperyduke6 Paperyduke6 commented Mar 27, 2026

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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken back and forward when exiting settings UI

1 participant