Repository navigation
Conversation
Reloading the admin Settings page always went back to the first tab. Store the tab the admin clicks in localStorage and reopen it once the settings load, but only if the current backend mode shows that tab (Authentication exists only in Audiobookshelf mode), else the first tab. The tab is saved on click, not from an effect, so the default tab rendered on mount never overwrites the stored one. The two indexer tab tests now clear localStorage so one test's tab doesn't leak into the next.
Owner
|
@NichCodes thanks for this. I'm bringing it in with you as co-author, with one change: the tab goes in the page address ( I'll close this one when it lands. |
kikootwo
added a commit
that referenced
this pull request
Nov 2, 2026
) Reloading the admin Settings page always went back to the first tab. The open tab now lives in the address, `?tab=`: a reload keeps it, back and forward move between tabs, and a link can open a specific tab. A click pushes a history entry with the native History API (synced by Next.js, no server round trip), so switching stays instant and unsaved edits are kept. An unknown tab, or one the backend mode does not show, shows the first tab and leaves the address alone. Based on #517 by @NichCodes. Co-authored-by: NichCodes <90598280+NichCodes@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
@NichCodes thanks again. It's in now as #534 with you as co-author: the Settings tab is kept in the page address ( |
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.
Summary
Reloading the admin Settings page always went back to the first tab. The page now remembers the last tab you opened.
How it works
localStorage(adminSettingsActiveTab).localStorageis unavailable (private mode, blocked storage), the page behaves as before.Testing
tests/app/admin-settings.page.test.tsx:admin-settings-indexers-lockedandadmin-settings-indexer-roundtripnow clearlocalStorageinbeforeEach. Otherwise one test's saved tab would carry into the next.docker compose buildsucceeds.documentation/settings-pages.md.