# astro-welcome

A short astro-themed welcome screen rendered as the pi startup header on every fresh session.

- Pixel-art astronaut (Unicode halfblocks + 24-bit colour) — two variants rotated per session
- Twinkling starfield in the background, deterministically seeded from session-start time
- Funny tagline rotated from a pool of ~12
- Live stats: model, context-window total, extension count, current caveman level
- Auto-dismisses after 6 seconds, on the first keystroke, or when you submit your first prompt — whichever comes first

Ships as part of [`@astrofoundry/pi-astro`](../../README.md). No extra install, no command — activates automatically on `session_start` with reason `startup`. Reload and resume don't trigger the splash.

## Behaviour

| Event | Action |
|---|---|
| `session_start` (`startup`) | Render via `ctx.ui.setHeader(…)`, arm 6 s timeout, register raw-input listener |
| 6 s elapsed | Auto-dismiss |
| any keystroke | Dismiss (keystroke passes through to the editor — not consumed) |
| `before_agent_start` | Dismiss (covers the pasted-prompt-then-Enter case) |
| dismissed once | Idempotent — further triggers are no-ops |

## Layout

```
                            ★ ASTRO PI ★

                          [pixel-art astronaut]

           Welcome aboard, Astronaute. <funny tagline>

   ◈ <model>     ◫ <ctx window>     ⚙ <N> extensions     ✦ caveman: <level>

                Press any key to launch · auto-dismiss in 6s
```

The astronaut and starfield use raw 24-bit ANSI colour escapes so the look is the same across iTerm2 / Ghostty / WezTerm / Kitty / Alacritty.

## Customising

There's no config surface at the moment. To tweak:

- **Taglines**: edit `messages.ts` — array `MESSAGES`. Add or remove freely.
- **Astronaut variants**: edit `art.ts` — `ASTRONAUT_FLOATING` and `ASTRONAUT_FLAG` are pixel grids where each character maps to a colour key (`S`, `X`, `D`, `M`, `W`, `Y`, `G`, `T`, `E`, `F`, `O`, `R`). Each grid is rendered with halfblocks, doubling vertical resolution.
- **Palette**: `colors.ts` exports `PALETTE` — every colour is a `[R, G, B]` triple. Tweak in place.
- **Dismiss timeout**: `DISMISS_AFTER_MS` in `index.ts`.
