Skip to content

Color-code install preview: red for errors, yellow for warnings, green for ready#4512

Open
Softer wants to merge 2 commits intoarchlinux:masterfrom
Softer:colored-install-preview
Open

Color-code install preview: red for errors, yellow for warnings, green for ready#4512
Softer wants to merge 2 commits intoarchlinux:masterfrom
Softer:colored-install-preview

Conversation

@Softer
Copy link
Copy Markdown
Contributor

@Softer Softer commented May 1, 2026

Summary

  • Add preview_markup opt-in field to MenuItem - when True, the preview panel renders Rich markup; when False (default), text is auto-escaped so existing previews are unaffected
  • Move network warning from the confirmation dialog to the install preview, where the user sees it earlier - while still configuring, not after pressing Install
  • All other preview panels (profile, disk, locale, etc.) are unchanged - preview_markup=False by default escapes any [...] sequences in their output

Color codes

  • Red: missing mandatory configs, bootloader validation errors (blocking)
  • Yellow: warnings like "no network configuration selected" (non-blocking)
  • Green: "Ready to install"

Examples

image image image image

Test plan

  • Open archinstall, leave disk config empty - Install preview should show red "Missing configurations" list
  • Configure disk but skip network - Install preview should show green "Ready to install" + yellow "Warnings" with network message
  • Leave both disk and network unconfigured - should show red missing configs + yellow network warning together
  • Configure everything including network - green "Ready to install" + summary, no yellow
  • Check that other menu items (profile, locale, mirrors) still show plain-text previews without markup artifacts
  • Press Install, confirm dialog should no longer contain the network warning line

…n for ready

Add preview_markup opt-in field to MenuItem with automatic Rich markup
escaping for all existing previews. Show missing configs and bootloader
errors in red, network warning in yellow, "Ready to install" in green.
Move network warning from confirmation dialog to install preview so it
is visible earlier.
@Softer Softer requested a review from Torxed as a code owner May 1, 2026 22:29
@Softer Softer marked this pull request as draft May 2, 2026 01:35
@Softer
Copy link
Copy Markdown
Contributor Author

Softer commented May 2, 2026

Converted into draft because looks like I found an error. Will check a bit later...

Text.from_markup() replaces Label(markup=True) to avoid MarkupError
on strings containing ["
@Softer Softer marked this pull request as ready for review May 2, 2026 10:30
@Softer
Copy link
Copy Markdown
Contributor Author

Softer commented May 2, 2026

Done, now it works correctly :-)

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.

1 participant