Merged
Conversation
- Introduced functionality to handle Artix Linux repositories, including checks for repository names and UI filters. - Updated the application state to manage visibility of Artix packages. - Enhanced UI components to display Artix filter options and results. - Added tests to validate Artix repository heuristics and integration with existing features.
- Updated German and English locale files to include Artix in the package filter options. - Adjusted filter descriptions to reflect the addition of Artix alongside other distributions.
- Introduced new filters for Artix repositories: omniverse, universe, lib32, galaxy, world, and system. - Updated localization files for German and English to include new Artix filter labels. - Enhanced application state management to support visibility toggles for new Artix filters. - Modified UI components to display and handle interactions for the new Artix filters. - Updated tests to validate the integration of Artix filters in the application.
- Changed Artix filter labels in German and English locale files from uppercase to lowercase for consistency. - Updated UI components and tests to reflect the new lowercase labels for Artix filters: omniverse, universe, lib32, galaxy, world, and system.
…ents - Changed Artix filter labels in German and English locale files to uppercase: OMNI, UNI, LIB32, GALAX, WORLD, and SYSTEM. - Updated UI components and tests to reflect the new uppercase labels for Artix filters.
…iles and UI components - Updated the German and English locale files to reflect the correct label for Artix Galaxy. - Adjusted UI components and tests to ensure consistency with the updated label.
- Updated the mirror update command to include Artix-specific handling for mirror updates. - Added checks for the installation of `rate-mirrors` and AUR helpers (yay/paru), with prompts for installation if not found. - Implemented country validation for Artix, ensuring only one country is allowed for mirror updates. - Created a backup of the existing mirrorlist before executing updates. - Added tests to verify Artix detection, installation checks, and command execution for both Worldwide and regional updates.
…available space - Removed hardcoded checks for Artix filters and implemented dynamic visibility based on available space in the UI. - Updated logic to calculate consumed space and determine whether to display Artix-specific filters. - Enhanced the rendering of Artix filters to ensure they only appear when there is sufficient space, improving UI responsiveness. - Adjusted related UI components to reflect these changes and maintain consistency in filter display.
- Added functionality to manage the visibility of the Artix filter dropdown based on the state of specific repo filters. - Updated mouse and keyboard event handlers to toggle the Artix filter menu and handle interactions within the dropdown. - Enhanced the rendering logic to display the Artix filter dropdown only when necessary, improving user experience. - Adjusted application state to track the visibility and dimensions of the Artix filter menu.
…wn rendering - Implemented a toggle for all Artix filters in the mouse event handler, allowing users to enable or disable all filters simultaneously. - Updated the dropdown rendering logic to reflect the combined state of individual Artix filters, improving user feedback on filter status. - Ensured that changes to filter states trigger the appropriate sorting and filtering logic, maintaining application responsiveness.
…ancing clarity and functionality.
…handling - Included 'rate-mirrors' as an optional dependency in both PKGBUILD-bin and PKGBUILD-git. - Updated global and mouse event handling to recognize Artix and utilize 'rate-mirrors' for mirror management, enhancing functionality for Artix users.
- Added handling for the 'rate-mirrors' package in the modal key event, allowing for a custom installation command that includes a user-friendly completion message. - Made the `aur_install_body` function public to facilitate broader access within the codebase.
- Updated the installation key event to skip preflight checks when SystemUpdate or OptionalDeps modals are active, ensuring smoother user experience during installations. - Introduced a new condition to determine when to bypass preflight based on the current modal state.
- Added return statements in the modal key event handler to manage event propagation more effectively. - Ensured that the Alert modal can handle further events when no actions are selected, and prevented preflight checks from being triggered during specific modal states.
- Updated test assertions to separate the Artix argument for improved clarity in command validation. - Reformatted the installation command for 'rate-mirrors' in the modal key event to enhance readability and maintainability.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive Artix Linux support to Pacsea, a TUI package manager for Arch-based distributions. Artix is an Arch derivative that uses init systems other than systemd (runit, OpenRC, or s6). The implementation follows existing patterns for EndeavourOS and CachyOS support, providing repository detection, filtering UI, and mirror management for all six Artix repositories.
Key Changes:
- Repository detection for 6 Artix repos (omniverse, universe, lib32, galaxy, world, system) with case-insensitive matching
- UI filter chips and dropdown menu system for Artix packages with space-aware layout
- Mirror update integration using
rate-mirrorsfrom AUR with automatic installation prompts and country filtering
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/index/distro.rs | Core repository detection functions for all Artix repos with case-insensitive matching |
| src/index/fetch.rs | Integration of Artix repos into package index fetching via pacman -Sl |
| src/index/mod.rs | Exports for new Artix detection functions |
| src/state/app_state.rs | State management for Artix filter flags and dropdown menu |
| src/logic/distro.rs | Filter toggle logic and package labels for Artix repos |
| src/ui/results/utils.rs | Detection of Artix packages in results for showing filter chips |
| src/ui/results/title.rs | Space-aware rendering of Artix filter chips with dropdown indicator |
| src/ui/results/dropdowns.rs | Artix filter dropdown menu when specific repo filters are hidden |
| src/ui/results/mod.rs | Integration of Artix filters into results panel rendering |
| src/ui/helpers.rs | Test translation setup for Artix filter labels |
| src/ui.rs | Test translation setup for Artix filter labels |
| src/events/mouse.rs | Click handling for Artix filter chips and dropdown menu interactions |
| src/events/global.rs | Keyboard handling and Artix detection for Optional Deps modal |
| src/events/modals.rs | Preflight prevention and AUR installation support for rate-mirrors |
| src/events/install.rs | Preflight skip logic for SystemUpdate and OptionalDeps modals |
| src/events/distro.rs | Mirror update commands for Artix using rate-mirrors with country validation |
| src/install/command.rs | Made aur_install_body public for rate-mirrors installation |
| config/locales/en-US.yml | English translations for Artix filter labels |
| config/locales/de-DE.yml | German translations for Artix filter labels |
| PKGBUILD-bin | Added rate-mirrors to optional dependencies |
| PKGBUILD-git | Added rate-mirrors to optional dependencies |
| tests/ui_integration.rs | Test translation setup for Artix filters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
19 tasks
This comment was marked as resolved.
This comment was marked as resolved.
…tter UX Co-authored-by: Firstp1ck <159012644+Firstp1ck@users.noreply.github.com>
Move Artix country validation before rate-mirrors installation
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
This PR adds comprehensive Artix Linux support to Pacsea, including repository detection, filtering, UI integration, and mirror update functionality. Artix Linux is an Arch-based distribution that uses runit, OpenRC, or s6 instead of systemd. The implementation follows the same patterns used for EndeavourOS and CachyOS support, adding detection and filtering for all six Artix repositories: omniverse, universe, lib32, galaxy, world, and system.
Key Features:
rate-mirrorsfrom AUR with automatic installation promptsrate-mirrorscan be installed directly from Optional Deps modal using AUR helpersType of change
Related issues
Closes #32
How to test
List exact steps and commands to verify the change. Include flags like
--dry-runwhen appropriate.Checklist
cargo fmt --allran without changescargo clippy --all-targets --all-features -- -D warningsis cleancargo test -- --test-threads=1passes (for Artix-related tests)Images/if applicable--dry-runand degrade gracefully ifpacman/paru/yayare unavailablesettings.conf,theme.conf, andkeybinds.confpacsea-binorpacsea-gitrepos)Notes for reviewers
Architecture
src/index/distro.rs): Added functionsis_artix_repo(),is_artix_omniverse(),is_artix_universe(),is_artix_lib32(),is_artix_galaxy(),is_artix_world(),is_artix_system(), andartix_repo_names()following the same pattern as EOS/CachyOS detectionsrc/state/app_state.rs): Added boolean flags for each Artix repository filter toggle, plusartix_filter_menu_openandartix_filter_menu_rectfor dropdown functionalitysrc/logic/distro.rs): Extendedrepo_toggle_for()andlabel_for_official()to handle Artix repos with specific labelssrc/events/distro.rs): Added Artix-specific mirror update logic usingrate-mirrorswith AUR helper detection, installation prompts, and country filteringsrc/events/global.rs,src/events/mouse.rs): Added Artix detection andrate-mirrorsdisplay in Optional Deps modal, replacingreflectorfor Artix systemssrc/events/modals.rs,src/install/command.rs): Enhanced Optional Deps modal to support AUR package installation viaaur_install_bodyfunction (made public)src/events/install.rs,src/events/modals.rs): Added safeguards to prevent preflight from being triggered during SystemUpdate and OptionalDeps modal operationssrc/ui/results/title.rs): Implemented space-aware rendering that hides Artix-specific filter chips when space is tight, ensuring dropdown buttons remain visiblesrc/ui/results/dropdowns.rs): Added Artix filter dropdown that appears when specific filters are hidden, providing access to all Artix repository filtersPKGBUILD-bin,PKGBUILD-git): Addedrate-mirrorsto optional dependencies for both binary and git package buildsLabel System
The
label_for_official()function prioritizes specific Artix repo checks before the generic fallback:omniverse→"OMNI"universe→"UNI"lib32→"LIB32"galaxy→"GALAXY"world→"WORLD"system→"SYSTEM""Artix"(fallback)Commit History
rate-mirrorsfrom AURrate-mirrorscommand syntax (global options must come before theartixcommand)rate-mirrorsto PKGBUILD optional dependencies and TUI Optional Deps integration for Artix systemsrate-mirrorsin Optional Deps modal (madeaur_install_bodypublic)Testing
Breaking changes
None - this is a purely additive feature that doesn't change existing behavior.
Additional context
Artix Linux Repositories
Artix Linux uses six main repositories:
Implementation Details
eq_ignore_ascii_case)Mirror Update Implementation
rate-mirrorsinstallation usingpacman -Qifirst, thencommand -vas fallbackyayorparubefore prompting for installationrate-mirrorsfrom AUR/etc/pacman.d/mirrorlistbefore updating--entry-countryoption (global option placed beforeartixcommand)UI Layout Improvements
TUI Optional Deps Integration
/etc/os-releasefor "Artix"rate-mirrorsinstallation using bothcommand_on_path()andis_installed()functionsaur_install_body()function to installrate-mirrorsvia AUR helpers (paru/yay) with proper error handlingrate-mirrorsto optional dependencies in bothPKGBUILD-binandPKGBUILD-gitfilesPreflight Prevention
trueafter handling Enter key to stop event propagation