Repository navigation
fix: hide broken-config banner for new workspaces and reject empty names on save - #50
Merged
Merged
Conversation
CreateItem persists the initial placeholder item (name 'Enter a name', empty home address) per the MIP add-item pattern, and the shell then fills the detail page from that same item. FillUserControl re-ran DetectError over the empty blob and the ticket #27 banner painted 'Saved configuration is broken' before the user ever had a chance to save. The placeholder name distinguishes a never-completed new item from a genuinely corrupt definition: admin fills now suppress the banner for it while still marking the page dirty, so Save stays enabled while the user completes name and home address.
ValidateAndSaveUserControl wrote _userControl.WorkspaceName straight into CurrentItem.Name with only a null-coalesce fallback, so clearing the name box persisted a nameless item the tree can only render as a blank node. The save now gates on WorkspaceNameValidation.IsEmpty first (matching the home-address gate below it): empty or whitespace-only names are rejected with a dialog, the log names the FQID, and CurrentItem is left untouched. The placeholder name itself is not banned -- a completed workspace that kept 'Enter a name' remains a legitimate state.
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
Two Management Client workspace-page fixes in one branch.
1. False broken-config banner on a brand-new workspace
CreateItempersists a placeholder item namedEnter a namewith an empty home address, and the MIP shell then fills the page for that same item.DetectErroron the empty config blob reportsMissingBrowserConfig, which raises ticket #27's red "Saved configuration is broken" banner on an item the user never had a chance to save.The banner is correct for genuinely corrupt definitions, but an empty-address initial item is the MIP add-item pattern: the state is unfinished, not broken. The placeholder name is the discriminator.
2. Empty-name gate
Previously, clearing the name box persisted a nameless item that the tree renders as a blank node. The placeholder name itself is not banned: a completed workspace that kept
Enter a nameremains a legitimate definition.Test evidence
Behavior before this branch, as verified live in Management Client:
Behavior after, on a deployed build whose hash matches the branch tip:
Unit tests:
MSBuild x64 Debug plugin build, exit code 0.
Merge risk
Reverting is two-way: a revert drops the placeholder-name check and the name gate. There are no persisted-data or config-format changes.
Blast radius: the Management Client workspace page only. Genuinely broken definitions (any name other than the untouched placeholder) keep the ticket #27 banner, and Smart Client behavior (ticket #9 notifications) is untouched. Verified: the MC tree Rename command rejects an empty rename shell-side (a no-op), so the detail-page gate is the only guard the plugin needs.