from __future__ import annotations from .genome import Genome def genome_card_html(g: Genome, *, compact: bool = False) -> str: parts = ", ".join(f"{p.count}× {p.kind}" if p.count > 1 else p.kind for p in g.parts) # Compact variant for the Splice Bench: name + one parts line only. Dropping the # traits list and story keeps both A/B cards a fixed short height so the two # columns (and the Tweak/Apply rows below them) stay symmetric. The palette # swatches were removed from the reveal card (visual clutter under the name). if compact: return (f'
{parts}
{parts}
' f'{g.story}