Skip to content

Auto-starts DOOM fire sixel animation in UICatalog About Box#5482

Closed
tig wants to merge 3 commits into
developfrom
feature/about-box-fire
Closed

Auto-starts DOOM fire sixel animation in UICatalog About Box#5482
tig wants to merge 3 commits into
developfrom
feature/about-box-fire

Conversation

@tig

@tig tig commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

The UICatalog About Box now auto-starts the DOOM fire sixel animation at the bottom of the dialog when the terminal supports sixel — reusing DoomFire/ConstPalette from the Images scenario with the same encoder setup (AvoidBottomScroll, palette clamped to MaxPaletteColors, 30ms timer, every-2nd-frame encode).

Behavior

  • Starts automatically when App.Driver.SixelSupport.IsSupported is true; silently skipped otherwise — the About Box is unchanged on non-sixel terminals.
  • The fire is sized to the dialog frame at first layout and bottom-aligned via FrameToScreen (), recomputed every frame so it follows the (movable) dialog.
  • On close, the timer stops and the SixelToRender is removed from the driver queue (rebuild — ConcurrentQueue has no Remove) so the last frame does not linger.
  • UICATALOG_FORCE_ABOUT_FIRE=1 forces the fire where the PTY cannot advertise sixel — needed for recording/verification through Windows ConPTY, which strips sixel DCS.

Verification (tuirec, per Scripts/tuirec/README.md)

Recorded UICatalog with tuirec v0.8.1 and read the .cast back:

  1. Non-sixel path (ConPTY does not advertise sixel): About opens via Help→About, renders normally, closes cleanly, app quits — no fire, no crash. Driver log confirms Sixel support: False and the guard short-circuits.
  2. Fire path (--env UICATALOG_FORCE_ABOUT_FIRE=1): cast event timeline shows a steady ~21 output events/sec for the full 5s the dialog is open (the animation encode/redraw loop), dropping to zero immediately after Esc — confirming the timer stops and cleanup runs. 0 exceptions.

The flame pixels themselves cannot be captured on Windows (ConPTY strips sixel DCS — see tuirec agent-guide); a hero GIF needs a Linux/macOS recording, same as the Mandelbrot GIF in #5471.

🤖 Generated with Claude Code

tig and others added 2 commits June 9, 2026 17:36
When the About Box opens and the terminal supports sixel, the DOOM fire
animation (from the Images scenario) now starts automatically, bottom-
aligned to the dialog frame. The overlay tracks the dialog if moved,
and is removed from the driver sixel queue when the dialog closes.

Silently skipped when the terminal does not advertise sixel support.
Set UICATALOG_FORCE_ABOUT_FIRE=1 to force it where the PTY cannot
advertise sixel (e.g., Windows ConPTY recording, which strips sixel DCS).

Verified with tuirec recordings (Scripts/tuirec/README.md workflow):
- Unsupported terminal: dialog opens/closes cleanly, no fire, no crash
- Forced: cast shows ~21 redraw events/sec while the dialog is open,
  stopping immediately on close (timer + queue cleanup confirmed)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 43b6894e67

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

support = new () { IsSupported = true, SupportsTransparency = true };
}

if (support is not { IsSupported: true })

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Skip fire when sixel transparency is unsupported

In terminals where SixelSupportResult reports IsSupported = true but SupportsTransparency = false, this still starts the fire. The fire image relies on alpha-zero background pixels, and it is sized to the whole dialog, so terminals that do not honor sixel transparency can render an opaque background over the About dialog instead of leaving the non-fire area visible; the Images scenario guards this case before starting the same animation.

Useful? React with 👍 / 👎.

The previous GetAboutFireScreenPosition bottom-align math collapsed to
top-align: pixelHeight was derived from the full dialog height, so
cellHeight == dialog height and (Bottom - cellHeight) == Top. Combined
with sizing the raster to the whole dialog, the fire filled the entire
dialog and rode up over the logo and links.

Now the raster is sized to a fixed ABOUT_FIRE_ROWS (6) band spanning the
dialog interior width, positioned inset one cell from the left border
with its bottom edge just above the bottom border. Verified by tuirec
recording in WSL: cursor moved from row 8;col 20 (dialog top-left,
496x264) to row 16;col 21 (480x102 band) — the fire now sits cleanly at
the bottom of the dialog with the text legible above it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tig

tig commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

this was just a test. closing.

@tig tig closed this Jun 10, 2026
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