Skip to content

keep the ui theme when the theme lookup fails on logout - #14962

Open
Damans227 wants to merge 1 commit into
apache:mainfrom
Damans227:fix-gui-theme-lost-on-logout
Open

Damans227 wants to merge 1 commit into
apache:mainfrom
Damans227:fix-gui-theme-lost-on-logout

Conversation

@Damans227

@Damans227 Damans227 commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #14961

The custom UI theme disappears after logout when the session has already expired. Logout stops all open requests, so the theme lookup fails, and the UI treated a failed lookup as "no theme" and applied an empty one. This makes a failed lookup move on to the next one, and if a lookup failed and no theme was found, the UI keeps the theme it already had.

Test:

On 4.22.1.1 with this change applied to the UI. Create a default theme with some css, log in, end the session on the server, then click logout. Ran each 3 times.

Before: the theme is gone after logout, 3 out of 3.

before

Full video: before.mp4

FAILED   listonlydefaulttheme=true&command=listGuiThemes  (net::ERR_ABORTED)
theme css length after logout: 0

After: the same request still gets cancelled, but the theme stays, 3 out of 3. A normal logout also keeps the theme.

after

Full video: after.mp4

FAILED   listonlydefaulttheme=true&command=listGuiThemes  (net::ERR_ABORTED)
theme css length after logout: 61991

@codecov

codecov Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.17%. Comparing base (937aa0f) to head (f4a15b0).

Additional details and impacted files
@@             Coverage Diff              @@
##              main   #14962       +/-   ##
============================================
+ Coverage     3.86%   21.17%   +17.30%     
- Complexity       0    21572    +21572     
============================================
  Files          499     6080     +5581     
  Lines        43154   552004   +508850     
  Branches      8205    73973    +65768     
============================================
+ Hits          1670   116862   +115192     
- Misses       41249   421338   +380089     
- Partials       235    13804    +13569     
Flag Coverage Δ
uitests 3.87% <ø> (+<0.01%) ⬆️
unittests 22.63% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Damans227
Damans227 marked this pull request as ready for review December 2, 2026 20:56

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui theme disappears after logout when the session has expired

1 participant