Skip to content

feat: the maintainer's console art in tiers on the usage screen - #16

Merged
marcos-mendez merged 1 commit into
masterfrom
feat/maintainer-console-art
Oct 2, 2026
Merged

marcos-mendez merged 1 commit into
masterfrom
feat/maintainer-console-art

Conversation

@marcos-mendez

Copy link
Copy Markdown
Collaborator

keelbanner.choose() picks the largest tier (wide, full, small, none) the dialog has room for, from the files keel-core installs in /etc/keel; UTF-8 tiers when the locale dialog inherits is UTF-8, ASCII otherwise.

Room is measured as dialog uses it (checked with dialog 1.3 on trixie): screen less backtitle and shadow (4 rows, 4 cols); the usage text wrapped at the box width plus 5 rows of frame, the blank row Console._wrapper adds, and the button. The box widens for the wide mark and grows by the mark's rows, never past the room. Replaces the 24 row floor and the fixed 25 row box.

At 80x24 a dual stack usage text (11 rows) leaves no room for any tier; the small one fits above 7 rows or fewer.

Needs Keel-Linux/keel-core#19, which installs the art.

Test plan

  • pytest, 682 tests; coverage 100 on the measured package
  • confconsole --usage in a trixie LXC at 80x24 and 160x45, UTF-8 and LC_ALL=C; screenshots rendered to PNG
  • rebuild an appliance with keel9 and the new core layer

keelbanner.choose() now picks the largest tier the dialog has room for,
wide, full, small, none, from the files keel-core installs in /etc/keel:
the UTF-8 ladder when the locale dialog inherits is UTF-8, the ASCII one
otherwise.

The room is measured as dialog uses it on trixie: the screen less the
backtitle and the shadow (four rows, four columns), and the usage text
wrapped at the box width plus five rows of frame, the blank row
Console._wrapper adds, and the button. The box widens for a mark wider
than it and grows by the mark's rows, never past the room. This replaces
the 24 row floor and the fixed 25 row box, which made the box overlap the
backtitle once a mark was added.

keelbanner.py stays at 100 percent; 682 tests.
@marcos-mendez
marcos-mendez merged commit 18c23de into master Oct 2, 2026
2 checks passed
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