Skip to content

Fix #20254 - Tree collapses when clicking on a column in nav tree#20292

Open
predictor2718 wants to merge 1 commit into
phpmyadmin:masterfrom
predictor2718:fix/20254-nav-tree-collapse
Open

Fix #20254 - Tree collapses when clicking on a column in nav tree#20292
predictor2718 wants to merge 1 commit into
phpmyadmin:masterfrom
predictor2718:fix/20254-nav-tree-collapse

Conversation

@predictor2718

Copy link
Copy Markdown
Contributor

Closes #20254.

CommonParams.get('server') returns a number (1); sessionStorage
stringifies values, so storage.server is "1". Strict equality on
number vs string always fails, so the page-load logic in
event-loader.ts falls into the else branch on every reload — it wipes
the saved tree paths via treeStateUpdate() and calls Navigation.reload()
without them, collapsing the tree.

The bug was latent until 38b796f added disableAjax to all nav-tree
links and made every click trigger a full page reload.

Fix: coerce to string before comparing.

Verified end-to-end with Playwright against MySQL 8.

…v tree

Signed-off-by: Nicolai Ehrhardt <245527909+predictor2718@users.noreply.github.com>
@codecov

codecov Bot commented Apr 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.53%. Comparing base (e18b197) to head (0ec9412).
⚠️ Report is 56 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20292      +/-   ##
============================================
+ Coverage     63.48%   63.53%   +0.05%     
- Complexity    16077    16081       +4     
============================================
  Files           676      676              
  Lines         59905    59928      +23     
============================================
+ Hits          38033    38078      +45     
+ Misses        21872    21850      -22     
Flag Coverage Δ
dbase-extension 63.52% <ø> (?)
unit-8.2-ubuntu-latest 63.45% <ø> (?)
unit-8.3-ubuntu-latest 63.49% <ø> (?)
unit-8.4-ubuntu-latest 63.50% <ø> (?)
unit-8.5-ubuntu-latest 63.45% <ø> (-0.04%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

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.

[Bug]: Tree collapses when clicking

1 participant