Skip to content

Remove the leftover draft mode - #134

Merged
A21-devs merged 2 commits into
mainfrom
chore/remove-draft-mode
Dec 2, 2026
Merged

A21-devs merged 2 commits into
mainfrom
chore/remove-draft-mode

Conversation

@A21-devs

@A21-devs A21-devs commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Closes #82

Since the new VM wizard (#73) a new VM is never shown as an unsaved draft. App always passed isDraft={false}, draftName={null} and a no-op onCancelDraft, so this code could never run:

  • VmDetail: the "Not created yet" status, tabs disabled for a draft, opening on Hardware, dirty forced true, the Cancel path of Revert.
  • Hardware: the Cancel/Create button labels, the draft disk size hint, and the conditions around Disk tools and Remove from library (both now always shown, as they already were).
  • Sidebar: the draftName row, and its .row.draft style.

The props go too. No behavior change. Two commits, and the first one typechecks on its own.

Testing

  • npm run typecheck (also on the first commit alone), npm test (143 passed), npm run build
  • dev:web: Hardware tab on Kali. Revert and Save are disabled until a change, a change enables them and shows the unsaved dot on the tab, Revert puts it back. Disk tools and Remove from library are there, all four tabs are enabled.

Since the new VM wizard a new VM is never shown as an unsaved draft.
App always passed isDraft={false} and a no-op onCancelDraft, so the Not
created yet state, the disabled tabs, the Cancel/Create labels and the
draft disk size hint could never show. No behavior change.
draftName was always null. The .row.draft style goes with it.
@A21-devs A21-devs added the ui label Dec 2, 2026

@A21-devs A21-devs left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the whole diff. Every removed branch was behind isDraft or draftName, which App hard-coded to false / null, so what's left is exactly what ran before. Checked that nothing else read the props (no hits for isDraft, draftName, onCancelDraft or .draft left in src) and that the first commit builds without the second.

The one leftover I looked at is form.name || 'Untitled' in the heading. It looks draft-era, but it still matters: clearing the Name field on an existing VM would otherwise leave an empty heading while the name error shows. Keeping it is right. Clean.

@A21-devs
A21-devs merged commit 9a97f48 into main Dec 2, 2026
1 check passed
@A21-devs
A21-devs deleted the chore/remove-draft-mode branch December 2, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the leftover draft mode from VmDetail, Hardware and Sidebar

1 participant