Skip to content

UI for reusing LVM volume groups#3330

Merged
joseivanlopez merged 28 commits intoagama-project:feature-reuse-vg-uifrom
joseivanlopez:reuse-vg-ui
Apr 13, 2026
Merged

UI for reusing LVM volume groups#3330
joseivanlopez merged 28 commits intoagama-project:feature-reuse-vg-uifrom
joseivanlopez:reuse-vg-ui

Conversation

@joseivanlopez
Copy link
Copy Markdown
Contributor

@joseivanlopez joseivanlopez commented Mar 24, 2026

Add complete UI support for reusing existing LVM volume groups in storage configuration. Users can now select and reuse existing volume groups from the system, configure their space policy, and manage logical volumes within them.

A new tabbed device selector is added:

  • Rewrote DeviceSelectorModal with three tabs: Disks, RAID, and LVM
  • Auto-selects first device on tab change with smart initial tab detection
  • Shows contextual side-effects alerts when changing devices
  • Dynamic confirm button labels: "Add", "Keep", or "Change to" based on state
  • Per-category empty states and intro text support

@joseivanlopez joseivanlopez force-pushed the reuse-vg-ui branch 7 times, most recently from f93f811 to 32ef892 Compare March 31, 2026 11:58
@joseivanlopez joseivanlopez force-pushed the reuse-vg-ui branch 9 times, most recently from 8a24fa2 to 4c20f4b Compare April 9, 2026 14:31
dgdavid and others added 7 commits April 9, 2026 15:51
Replace the flat single-table selector with a modal that categorizes
devices across three tabs: Disks, RAID, and LVM volume groups, each
backed by DrivesTable, MdRaidsTable, and VolumeGroupsTable respectively.

Other new features:
  - `intro` prop for contextual content above the tabs
  - `initialTab` and `selected` control which tab opens and what is
    pre-selected
  - Per-category side-effects alerts shown near the confirm button when
    the selection differs from the prior device
  - `newVolumeGroupLinkText` renders a creation link in the LVM tab, both
    as a tab intro sentence and in the empty state
  - `autoSelectOnTabChange` (default true) auto-selects the first device
    on tab switch, or clears the selection when the tab is empty
  - Confirm button label reflects the state: "Add X", "Keep X",
    "Change to X", or "Add"/"Change" when no device is selected
  - Sticky tabs and per-tab empty states
ConfigureDeviceMenu now passes devices split by category (disks,
mdRaids, volumeGroups) and uses the intro and newVolumeGroupLinkText
props.

SearchedDeviceMenu drops ReuseVgMenuItem and the ChangeDeviceDescription
component, which are no longer needed after the modal gained full tabbed
support and side-effects props.

SearchedVolumeGroupMenu replaces two separate selector modals with a
single unified DeviceSelectorModal covering all device categories
dgdavid and others added 15 commits April 9, 2026 21:04
Previously, activeTab was initialized before selectedDevices using
previousDevice, which is undefined when no selected prop is given.  When
no previous device exists, the first available device is auto-selected
across all tabs — but the tab still defaulted to 0 (Disks), leaving the
confirm button and the active tab out of sync.

Extract initialDevice as a plain variable shared by both state
initializers, so the initial tab always reflects where the actual
initial selection lives, regardless of whether a prior device was given.
Extend MdRaidsTable with a "Current content" column that shows the
content of each member device using the new DeviceContent component.

Add tests for both, fix the useFlattenDevices mock, and document
DeviceContent.
- Make sentence more generic (device vs disk).
By adding missing mocks needed after recent storage
refactoring for allowing to reuse LVM VGs.

Also please linters.
- The menu content was partially hidden
@joseivanlopez joseivanlopez marked this pull request as ready for review April 13, 2026 14:58
Copy link
Copy Markdown
Contributor

@ancorgs ancorgs left a comment

Choose a reason for hiding this comment

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

LGTM

@joseivanlopez joseivanlopez merged commit 118d021 into agama-project:feature-reuse-vg-ui Apr 13, 2026
5 checks passed
joseivanlopez added a commit that referenced this pull request Apr 14, 2026
Feature for reusing LVM volume groups:

* #3303
* #3333
* #3330
@imobachgs imobachgs mentioned this pull request Apr 14, 2026
imobachgs added a commit that referenced this pull request Apr 14, 2026
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.

3 participants