From c874999bc5acc240119865b478e36aca82d2c9d6 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Tue, 30 Jun 2026 15:41:44 -0500 Subject: [PATCH] feat(tui): add $petBox store for the pet's footprint Publishes the floating pet's width/height in cells so the transcript can keep its text clear of it without the pet knowing anything about layout. --- ui-tui/src/app/petFlashStore.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui-tui/src/app/petFlashStore.ts b/ui-tui/src/app/petFlashStore.ts index 328fcfc8b04..b1ecf97e995 100644 --- a/ui-tui/src/app/petFlashStore.ts +++ b/ui-tui/src/app/petFlashStore.ts @@ -13,3 +13,9 @@ interface PetFlash { export const $petFlash = atom(null) export const flashPet = (state: PetState, ms = 1600) => $petFlash.set({ state, until: Date.now() + ms }) + +// The floating pet's footprint, or null when no pet is shown. The transcript +// keeps its text clear of the pet responsively: on wide terminals it reserves a +// right gutter (`width`) so lines wrap to the pet's LEFT; on narrow terminals it +// reserves bottom rows (`height`) so lines stay full-width and sit ABOVE it. +export const $petBox = atom<{ width: number; height: number } | null>(null)