Skip to content

fix(images): move PR identity off the boot-menu entry#55

Merged
phorcys420 merged 6 commits into
mainfrom
boot-labels-sgdm
Jun 30, 2026
Merged

fix(images): move PR identity off the boot-menu entry#55
phorcys420 merged 6 commits into
mainfrom
boot-labels-sgdm

Conversation

@phorcys420

@phorcys420 phorcys420 commented Jun 30, 2026

Copy link
Copy Markdown
Member

Problem

PR-preview ISOs built a boot-menu label like NixOS <ver> - Coder Box Installer - PR #N: <title>. That entry is a single, non-wrapping line in a fixed-width GRUB/isolinux menu, so a long PR title overflowed and got clipped. Widening the menu to fit it made the menu span the whole screen, which looks broken.

Change

The menu entry and ISO file name carry no PR identity — clean and constant:

  • Boot-menu entry is always Coder Box <flavour> (<rev>).
  • ISO file name is constant per flavour/arch, e.g. coder-box-installer-x86_64-linux.iso (a PR preview matches a release build; links/downloads never change).

The full PR #N: <title> is surfaced everywhere except the menu entry:

  • On the EFI/GRUB boot screen as a footer label (chrome, not a selectable entry). The stock theme's menu box is an opaque pixmap that GRUB paints over overlapping labels, so the label is placed in free space below the box — and since the menu only has a few entries, the box height is shrunk to make that room. Menu width is unchanged (stock 800px), so the menu doesn't blow up horizontally. PR builds only; non-PR builds use the stock theme verbatim.
  • /etc/coder-box-pr + the installer console banner (Image: PR #N: <title>), which also covers BIOS/isolinux (no GRUB theme there).

Removes the now-unused prMenuSuffix / prFileSuffix / slugify machinery. CI globs *.iso for upload, so the constant file name still matches. Also enables nix-command + flakes by default in the Makefile (additive; opt out with NIX_EXTRA_EXPERIMENTAL_FEATURES=).

Validation

  • make fmt / make lint / make check — all clean / passed.
  • Built the PR theme and confirmed theme.txt keeps width = 800, shrinks height to 62%-100-6%, and appends the footer + label with the full title (quote/$ sanitisation tested with a hostile title).
  • Non-PR theme resolves to the stock nixos-grub2-theme store path (untouched).

⚠️ Needs a QEMU/hardware boot to confirm the footer renders in the freed area — an earlier label attempt was hidden because it overlapped the opaque menu box (now fixed by moving it below the shrunk box).

@phorcys420 phorcys420 changed the title fix(installer): keep long boot-menu labels readable fix(images): keep PR title out of the boot menu, surface it off-menu Jun 30, 2026
@phorcys420 phorcys420 changed the title fix(images): keep PR title out of the boot menu, surface it off-menu fix(images): drop PR identity from boot menu + ISO file name Jun 30, 2026
@phorcys420 phorcys420 changed the title fix(images): drop PR identity from boot menu + ISO file name fix(images): move PR identity off the boot-menu entry Jun 30, 2026
A PR-preview boot-menu label ("NixOS <ver> - Coder Box Installer - PR
#N: <title>") overflowed the fixed-width, single-line GRUB/isolinux menu
entry and got clipped; widening the menu just made it span the whole
screen. So the menu entry and ISO file name now carry NO PR identity:

- Boot-menu entry is always "Coder Box <flavour> (<rev>)".
- ISO file name is constant per flavour/arch (e.g.
  coder-box-installer-x86_64-linux.iso) — a PR preview matches a release
  build, so links/downloads never change.

The full "PR #N: <title>" is surfaced everywhere EXCEPT the menu entry:

- On the EFI/GRUB boot screen as a footer label (boot-screen chrome, not
  a selectable entry). The stock theme's menu box is an opaque pixmap that
  GRUB paints over overlapping labels, so we shrink the (mostly empty)
  menu box height and place the label in the freed area below it. Menu
  WIDTH is unchanged (stock 800px), so the menu doesn't blow up. PR builds
  only; non-PR builds use the stock theme verbatim.
- Recorded at /etc/coder-box-pr and printed by the installer console
  banner (also covers BIOS/isolinux, which has no GRUB theme).

Removes the now-unused prMenuSuffix / prFileSuffix / slugify machinery;
CI globs *.iso for artifact upload so the constant name still matches.
Every make target drives the flake CLI, so enable the experimental
interface here instead of requiring each developer to set it in their
global nix.conf. Non-invasive by design:

- --extra-experimental-features is additive (ORs with the user's
  nix.conf) rather than overwriting their feature list.
- Appended to $(NIX) with += so an env-set NIX binary is preserved; a
  command-line `make NIX=...` still overrides outright.
- Opt out per-invocation with NIX_EXTRA_EXPERIMENTAL_FEATURES=.
The boot-screen footer now renders a single build-identity label on EVERY
build, not just CI PR previews (the previous gating meant a local
`make installer/iso` got the stock theme and showed nothing):

  with a PR:    Coder Box - PR #55: <title> (d02f0ac@my-branch)
  without a PR: Coder Box - d02f0ac@my-branch

- New coderBox.branch option, injected by the Makefile (GIT_BRANCH,
  preferring CODER_BOX_BRANCH so CI can pass github.head_ref past the
  detached-HEAD checkout). Branch "HEAD"/unknown is dropped from the stamp.
- New coderBox.bootLabel assembles "<short-sha>@<branch>" (conventional
  form; keeps a -dirty suffix) plus the optional PR prefix.
- base/iso.nix always builds the custom theme from bootLabel (shrunk menu
  box + footer), so the label is visible locally and testable without a
  PR env.
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

📀 ISO build artifacts

Kind Arch Size Download
Installer aarch64 3.49 GB ⬇️ coder-box-installer-aarch64-linux.iso
Installer x86_64 3.67 GB ⬇️ coder-box-installer-x86_64-linux.iso

↻ Updated for 4ed6209 · run #80 · artifacts expire in ~1 day · sign in to GitHub to download.

Match the footer label's width to the menu box (left = 50%-400, width =
800) so it lines up with the rectangle instead of spanning the full
screen, shrink the menu box a further ~1/3 (height 62% -> 46%), and move
the label up to just below the box (top 78% -> 50%).
The short-sha now lives in the boot-screen footer label
(coderBox.bootLabel), so the menu entry is just "… - Coder Box
Installer" with no "(<rev>)" suffix. Removes the now-unused boxRevShort.
@phorcys420 phorcys420 merged commit fd5b5a9 into main Jun 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant