# Codex: Info Box

**Migration:** 2026-08-14 B4 update (legacy → v9 GOLD 11-file structure)
**Source of truth:** module-meta.json + recipe.md (both kept verbatim from legacy)

## State

The Info Box block holds its UI state in:
- A local `state` object (set during `init()`)
- The freshvibe-cms runtime store (cross-block state, see `dependencies: [freshvibe-cms:runtime:store, freshvibe-cms:runtime:scope]`)

State changes flow through the runtime's pub-sub. The block does NOT mutate global state directly.

## DOM Mount Point

The block mounts to a target element passed in `props.target`. The block does not choose its own position; the host region does.

## Failure modes

1. **Missing target** — log a warning, do not throw. The host region is expected to provide a valid target.
2. **Bad data** — fall back to the default props (see recipe.md B section). Never render an unhandled exception to the operator.
3. **Runtime store unavailable** — render in read-only mode (no event emission, no save).

## Cross-block coordination

If the host region has more than one block, each block is given a unique `instanceId` in `props`. Use this for store keys so two Info Box blocks on the same page do not stomp each other.

## Codex event format

Every state change emits a codex event in the format:

```
[YYYY-MM-DD HH:MM] [TIER-2] [BLOCK:Info Box] [INSTANCE:<id>] ACTION: <verb> <noun>
```

These are appended to the block's local codex (this file) and to the global codex via the runtime.
