Conversation
sshd enabling - fix: install desktop env packages/login manager/polkit only in Desktop mode - fix: switch systemd-boot or efistub to GRUB automatically on legacy (non-UEFI) - fix: enable sshd service when the `sshd` server type is selected - test: add regression tests for desktop bleed, legacy GRUB switching, and sshd enablement
- feat: detect system RAM and compute recommended swap size (max 16GiB) - change: use dynamic swap size in storage planner and partitioning service - change: show detected RAM and planned swap size in swap + disk info screens - test: add swap sizing formula tests
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves installer correctness and UX by introducing RAM-based swap sizing (used consistently across planning/partitioning/UI), tightening package selection based on install mode, and adding install-time safety fixes (legacy bootloader auto-correction, sshd enablement) with accompanying logic tests.
Changes:
- Detect RAM and compute a recommended swap size (capped), then use it across storage planning/partitioning and display it in the TUI.
- Gate desktop environment/login manager/polkit packages to Desktop mode only.
- Auto-switch invalid legacy bootloader selections to GRUB and enable
sshdwhen thesshdserver type is selected; add/extend logic tests.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/logic.rs | Adds logic tests for sshd enablement, desktop package gating, legacy bootloader auto-switching, and swap sizing formula. |
| src/render/sections/info/swap.rs | Displays detected RAM and planned swap size in the swap info panel. |
| src/render/sections/info/disks.rs | Shows planned swap size in the planned disk layout preview. |
| src/core/storage/planner.rs | Uses swap_size_mib to size the planned swap partition and adjust root start. |
| src/core/state.rs | Adds detected_ram_mib and swap_size_mib to app state and initializes them at startup. |
| src/core/services/system.rs | Prevents desktop-only packages (DE/LM/polkit) from being included outside Desktop mode. |
| src/core/services/sysconfig.rs | Enables sshd based on selected server type. |
| src/core/services/partitioning.rs | Uses swap_size_mib for swap end calculation in the legacy partitioning service. |
| src/common/utils.rs | Adds /proc/meminfo RAM detection and swap sizing helper function. |
| src/app/swap_partition.rs | Displays detected RAM and planned swap size on the swap screen. |
| src/app/install/flow.rs | Auto-corrects legacy bootloader selection to GRUB at install start. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- fix: revert legacy bootloader auto-correction when install exits early - fix: enable sshd only when openssh is planned for installation - fix: use partition path helper in auto partitioning for NVMe-style devices - test: add regression tests for early-return bootloader revert, sshd gating, and NVMe partition paths
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
sshdwhen thesshdserver type is selected.sshdwhenopensshis actually planned for installation (avoid enabling a missing unit)./dev/nvme0n1p2).Type of change
Related issues
Closes #
How to test
cargo fmt --all cargo clippy --all-targets --all-features -- -D warnings cargo test -- --test-threads=1 cargo run -- --dry-runcargo test -- --test-threads=1should cover swap sizing, legacy bootloader auto-switching, desktop package gating, andsshdenabling.sshdenabling is gated onopenssh, and auto partitioning uses correct NVMe partition paths.On a live Arch ISO (when your change touches partitioning, mounts, or install): describe the disk layout and menu path you used.
Screenshots / recordings (if UI changes)
Checklist
Code quality
cargo checksucceedscargo fmt --allproduces no diffcargo clippy --all-targets --all-features -- -D warningsis cleancargo test -- --test-threads=1passesTesting
Documentation
arch_manual.md, plans) if installer steps or constraints changedInstaller safety
--dry-runwhere applicable (no destructive commands without user confirmation)pacstrappaths reviewed for wrong-device or ordering mistakesScope
Notes for reviewers
0.2.3->0.2.2) and removesDocuments/RELEASE_v0.2.3.md. If that’s unintended, we should revert those before merging.Breaking changes
None intended.
Additional context
N/A