# Lessons

- When the user says they "made code read global .env", verify that behavior as the intended goal instead of assuming they want global `.env` access removed.
- After a PR is merged, verify the actual latest `main` GitHub Actions run before saying CI is safe; PR checks alone are not enough if follow-up commits land.
- For TUI "selecting X does nothing" bugs, identify the *exact* component the user interacts with before fixing. The roach-code `/resume` flow has TWO selectors — the inline `compSlashArg` completion menu (auto-opens on `/resume `, hint "Tab/Enter select") and the modal `resumePicker` overlay (hint "Enter resume"). I fixed the picker first; the user was using the completion menu. Tell them apart by the footer hint text; ask which footer they see when a fix "doesn't show up."
- In an autocomplete menu, accepting an item that is *terminal* (selecting it is the whole action, e.g. a `/resume <session>` row) should accept-AND-submit on Enter, not just insert the token. Insert-only forces a second Enter and reads as "nothing happened" — worse when the token is a prefix of another item (`1` vs `10`), where the menu re-captures Enter forever. Keep Tab as insert-only for editing.
- roach-code's chat View renders the LIVE welcome banner (`renderWelcomeBanner`) INSTEAD of the transcript viewport whenever `m.bannerLive` is true; `bannerLive` was only cleared in `startMessageTurnWithRaw` (a real model turn). So any flow that fills the transcript WITHOUT starting a turn — `replayActiveBranch` (resume/branch/switch) — left `bannerLive=true` and the committed history stayed invisible behind the empty welcome screen when invoked from a fresh start. Fix: such flows must set `bannerLive=false` (+ `transcriptDirty=true`). Lesson: when adding a path that commits to the transcript, check every flag that gates whether the viewport is shown, not just that the lines were appended.
