Skip to content

alacrittyForge v0.1.1 - Hardening + first AUR release

Latest

Choose a tag to compare

@jetomev jetomev released this 28 May 20:58

alacrittyForge v0.1.1 — Hardening batch + first AUR release

Closes 6 findings (A1–A6) from a systematic audit borrowing the grubForge hardening playbook. Shipped in four thematic groups.

🔒 G1 — Pending safety + refresh-on-show split (A1)

on_show() on Config Editor and Fonts used to call _load_settings(), which begins with self._pending = {} — so staging an edit, switching screens, and coming back silently wiped the stage. Split into _reload_view() (silent re-read; preserves _pending and selection) and _load_settings() (full reset; used by on_mount and as a hard-reset). on_show / action_refresh / post-save now route through the silent path.

💬 G2 — Unified feedback surface (A3, A6)

New widgets/status.py::StatusMixin provides one _set_status(msg, level, popup=True) that writes a colored icon + message to a per-screen status line and fires an app-level toast. popup=False for passive mount-time hints — without it, every screen's on_mount would spray notifications at app launch. Dashboard gains an R action with toast. Redundant duplicate status labels in Fonts and Key Bindings are gone. Icons consolidated to the unicode set used in grubForge: ✓ ● ⚠ ✗.

❓ G3 — Help modal hardening (A2)

The help overlay used to be an inline-nested ModalScreen class defined inside action_show_help, which push_screen'd on every keypress — pressing ? twice stacked two help modals. Extracted to widgets/help_screen.py; the app now toggles (pop if already on top, else push). The modal binds ? itself so a second ? while open closes it directly; q stays bound on the modal so it shadows the app-level quit.

🎯 G4 — Focus-on-show + ConfirmDialog keys (A4, A5)

Screen bindings used to be inert until the user clicked into a panel — ContentSwitcher doesn't move focus on its own. Each action screen now declares DEFAULT_FOCUS (#settings-table, #themes-list, #fonts-table, #keys-table) and App.action_show_screen focuses it after on_show. ConfirmDialog gains escape → cancel, enter → confirm so keyboard users don't have to Tab+Space onto a button.

📦 Packaging

  • Published on the AUR (alacrittyforge).
  • The PKGBUILD's check() step runs a headless mount smoke under Textual's run_test harness — catches CSS-parse and on_mount failures at build time, not just import breaks.
  • PYTHONDONTWRITEBYTECODE=1 + defensive __pycache__ cleanup in package() — won't ship the .pyc install-conflict class that bit grubForge v1.0.2.

No dependency changes. Same python, python-textual, python-rich, python-tomli-w.


Co-developed by Javier (@jetomev) and Claude (Anthropic).