@modelstatus/cli 0.1.53 → 0.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tui/app.js +12 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelstatus/cli",
3
- "version": "0.1.53",
3
+ "version": "0.1.54",
4
4
  "description": "Track which AI models you use, where, and never get surprised by a retirement. Free offline model-health for any repo (mm status), browser sign-in for cloud inventory + alerts.",
5
5
  "keywords": [
6
6
  "llm",
package/src/tui/app.js CHANGED
@@ -305,14 +305,21 @@ export const appController = {
305
305
  try { this._instance && this._instance.unmount(); } catch { /* already gone */ }
306
306
  this._instance = null;
307
307
  },
308
- /** Mount a fresh Ink tree, merging the base opts with `next` (e.g. a tab). */
308
+ /** Mount a fresh Ink tree, merging the base opts with `next` (e.g. a tab).
309
+ * Only called after the in-TUI game (launch.js). */
309
310
  remount(next = {}) {
310
311
  const opts = { ...(this._opts || {}), ...next };
311
312
  this._opts = opts;
312
- // We're still in the alt screen (entered by runApp; the game kept it). Clear +
313
- // home so the fresh Ink tree paints the whole screen from the top with no
314
- // leftover game frame and no inline-cursor drift.
315
- try { process.stdout.write("\x1b[2J\x1b[H"); } catch { /* ignore */ }
313
+ // RECYCLE the alt screen: leave (?1049l) then re-enter (?1049h) + clear + home.
314
+ // We're still in the alt screen the game kept, but block-model terminals (Warp)
315
+ // drop their clean full-screen presentation during the game round-trip and the
316
+ // host's block header bleeds back over the top rows. A plain clear can't undo
317
+ // that. Leaving + re-entering reproduces the EXACT main→alt transition that
318
+ // runApp does on first launch (which renders perfectly), so Warp re-enters
319
+ // full-screen mode and the window paints flush from the top again. The two
320
+ // sequences are written together with no render between them, so there's no
321
+ // visible flash of the host screen.
322
+ try { process.stdout.write("\x1b[?1049l\x1b[?1049h\x1b[2J\x1b[H"); } catch { /* ignore */ }
316
323
  this._instance = render(h(Bootstrap, opts));
317
324
  return this._instance;
318
325
  },