Dashboard › cli › InkUI teardown order — 6 steps, all try…
019e6874-7d53-7c57-8cac-6867f05f5309| Project | Hits | Last recalled |
|---|---|---|
| opencode-lore | 2 | 2026-07-28 |
InkUI.tearDown() must follow this order: (1) stop tip-rotation interval; (2) detach SIGINT listener + store.setRequestCancel(undefined); (3) instance.clear(); (4) instance.unmount(); (5) restore alternate screen \x1b[?1049l; (6) freshStdin.setRawMode(false) + .pause() + .destroy(). torndown: boolean guard prevents double-unmount (throws on some platforms). cancelRequested guard: second Ctrl+C → process.exit(130). Every step wrapped in try/catch.