NAS-143761 / 26.0.0-RC.1 / Keep the Hosts dialog usable when editing or adding a host (by AlexKarpov98) - #14134
Merged
Merged
Conversation
You should reset it
Contributor
Author
|
Automatic cherry-pick failed. Please resolve conflicts by running: If the original PR was merged via a squash, you can just cherry-pick the squashed commit: |
Contributor
Author
…a host Backport of #14131 to 26.0.0-RC.1, where the side-panel forms it was written against do not exist. The dialog closed itself before opening the slide-in, so closing the form landed the user back on the subsystem instead of the host list. The slide-in is a CDK overlay created after the dialog's, so it already paints above it — as the Manage Ports dialog has always relied on. Drops the form-side-panel and tn-side-panel stacking changes, which have no counterpart on this branch. Claude-Session: https://claude.ai/code/session_01YWb7ZvZPxunLPDKRaBnce9
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/26.0.0-RC.1 #14134 +/- ##
======================================================
Coverage ? 87.61%
======================================================
Files ? 1930
Lines ? 75206
Branches ? 8939
======================================================
Hits ? 65894
Misses ? 9312
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
This PR has been merged and conversations have been locked. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Preview:
Screen.Recording.2026-09-15.at.13.35.05.mov
Change
Editing or adding a host from the NVMe-oF Hosts management dialog dropped the user back on the
Subsystems screen instead of returning them to the list.
The reported cause was already gone. In 26.0.0-RC.1
ManageHostsDialog.onAdd()/onEdit()calledthis.dialogRef.close()before opening the slide-in — with a comment saying it was to stop thedialog appearing behind the form.
ManagePortsDialognever did this, which is exactly why Portsbehaved correctly. That call was removed in 08da727 when the slide-in became
FormSidePanelService.What is still broken — and for both dialogs — is the layer underneath. That migration came with
the comment "the side panel … paints on top of this dialog's backdrop", but the premise was
already false: three weeks earlier e69bcee had added
.tn-side-panel__overlay { z-index: 999 !important }to_tn-styles.scss, dropping the panel belowthe CDK overlay layer (1000).
tn-side-panelportals its overlay todocument.body, and.cdk-overlay-containeris a body sibling — so Edit / Add New opened the host form behind thedialog's dark backdrop: invisible and click-blocked.
The container is a single element with a single
z-index, so no one value can order thepanel correctly in both directions at once:
z-index: 1000z-index: 999(before this PR)So
FormSidePanelContainerComponentnow re-homes its portaled overlay intoOverlayContainer.getContainerElement(), where panel and CDK panes are siblings at the samez-indexand DOM order — i.e. open order — arbitrates. Both columns above become ✅.afterNextRender({ read: … }): the library's own body-append runs in the defaultmixedReadWritephase, so thereadphase is guaranteed to follow it in the same render cycle.data-tn-panelid the library puts on both thetn-side-panelhost and the portaled overlay — the correlation it documents for exactly this.
_tn-styles.scsskeeps the999rule for the ~6<tn-side-panel>s declared in templates(dataset-form, zvol-form, vm-wizard, …), plus a scoped rule restoring
1000inside the container.Two notes on scope: this fixes Ports identically, since it carries the same latent problem; and
the only other dialog that opens a side panel,
session-expiring-dialog, closes itself first andwas never affected.
Testing
The appliance was unreachable, so the stacking was verified in a real browser against a synthetic
page built from the verbatim CDK and
tn-side-panelCSS, probing withelementFromPoint:before — top element at the panel's centre is
cdk-overlay-backdrop, panel not hit-testable;after — top element is
tn-side-panel__panel, and a CDK pane appended later still sits aboveit.
yarn test src/app/modules/slide-ins→ 36 passing,src/app/pages/sharing/nvme-of→ 155 passingtsc -p src/tsconfig.app.jsonclean; eslint and stylelint cleanNew spec in
form-side-panel.service.spec.tsasserts the overlay lands in the CDK containerafter a pane that was already open — confirmed to fail when the fix is reverted
expect(DialogRef.close).not.toHaveBeenCalled()added to the manage-hosts Add/Edit tests, pinningthe originally reported regression directly
Heads-up for reviewers:
node_moduleshad@truenas/ui-componentsat 0.1.57 against~0.7.6inpackage.json; runyarn installbefore the specs or everytn-*spec fails.Original PR: #14131