rex-worktrees 0.4.4 → 0.4.5

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.
package/README.md CHANGED
@@ -42,6 +42,8 @@ rex do worktrees_open
42
42
 
43
43
  **Mode** reuses a matching tab by default; choose a new tab or split instead. New Git checkouts can have a custom **Directory** name, separate from the branch.
44
44
 
45
+ The underlined `REX / WORKTREES` header and fields keep fixed positions; unavailable fields stay disabled. Editors and messages reuse the same details area, so only choice lists and long details scroll.
46
+
45
47
  Shells and interactive Git/JJ clones stay attached to the destination terminal. The shell comes from `$SHELL`, falling back to `/bin/sh`.
46
48
 
47
49
  | Key | Action |
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/rex-worktrees
3
3
  size: 64491792 bytes
4
- sha256: 3b5a2d72d0cdaf0ae7a5740652b6c35fbefcb5dc70443b7fc4da973ff1f36937
4
+ sha256: 5a846578510c7d9cb4cba959a7bdaf9733ab236baae0cf7467c4a94c98916aea
@@ -33803,12 +33803,34 @@ var RexWindowsSchema = exports_Schema.Struct({
33803
33803
  layers: exports_Schema.Array(exports_Schema.Struct({ blocks: exports_Schema.optional(exports_Schema.Array(exports_Schema.Struct({ block_id: BlockIdSchema, host_id: ServerHostIdSchema }))) }))
33804
33804
  }))
33805
33805
  });
33806
+ var popupSize = { columns: 80, rows: 16 };
33807
+ var RexTerminalSizeSchema = exports_Schema.Struct({
33808
+ columns: exports_Schema.Int.check(exports_Schema.isGreaterThan(0)),
33809
+ rows: exports_Schema.Int.check(exports_Schema.isGreaterThan(0))
33810
+ });
33811
+
33812
+ class RexLayoutNode extends exports_Schema.Class("RexLayoutNode")({
33813
+ rect: exports_Schema.Tuple([exports_Schema.Finite, exports_Schema.Finite, exports_Schema.Finite, exports_Schema.Finite]),
33814
+ block_id: exports_Schema.optional(exports_Schema.NullOr(BlockIdSchema)),
33815
+ split: exports_Schema.optional(exports_Schema.NullOr(exports_Schema.Struct({
33816
+ before: exports_Schema.suspend(() => RexLayoutNode),
33817
+ after: exports_Schema.suspend(() => RexLayoutNode)
33818
+ })))
33819
+ }) {
33820
+ }
33806
33821
  var RexViewSchema = exports_Schema.Struct({
33807
33822
  active_window_id: exports_Schema.NullOr(WindowIdSchema),
33808
33823
  windows: exports_Schema.Array(exports_Schema.Struct({
33809
33824
  window_id: WindowIdSchema,
33825
+ focused_block_id: exports_Schema.optional(exports_Schema.NullOr(BlockIdSchema)),
33826
+ zoomed_block_id: exports_Schema.optional(exports_Schema.NullOr(BlockIdSchema)),
33810
33827
  layers: exports_Schema.Array(exports_Schema.Struct({
33811
- blocks: exports_Schema.Array(exports_Schema.Struct({ block_id: BlockIdSchema, owner: exports_Schema.optional(exports_Schema.NullOr(ClientIdSchema)) }))
33828
+ layout: exports_Schema.NullOr(RexLayoutNode),
33829
+ blocks: exports_Schema.Array(exports_Schema.Struct({
33830
+ block_id: BlockIdSchema,
33831
+ flavor: exports_Schema.String,
33832
+ owner: exports_Schema.optional(exports_Schema.NullOr(ClientIdSchema))
33833
+ }))
33812
33834
  }))
33813
33835
  }))
33814
33836
  });
@@ -34636,29 +34658,43 @@ var focus = exports_Effect.fnUntraced(function* (sessionId, windowId, clientId,
34636
34658
  }
34637
34659
  return warnings.length ? warnings.join("; ") : undefined;
34638
34660
  });
34661
+ var findPane = (node, blockId) => !node ? undefined : node.block_id === blockId ? node : node.split ? findPane(node.split.before, blockId) ?? findPane(node.split.after, blockId) : undefined;
34639
34662
  var openPopup = exports_Effect.fnUntraced(function* (command, sessionId, origin2 = {}) {
34640
34663
  const path = yield* exports_Path.Path;
34641
34664
  const endpoint = (yield* localIdentity).endpoint;
34642
34665
  const program = yield* binary(path);
34643
34666
  const localRex = (args3) => run4(program, ["-S", endpoint, "--autostart=false", ...args3], undefined, nativeEnv());
34644
34667
  const view = yield* parse3(RexViewSchema, yield* localRex(["api", "call", "-s", sessionId, "session.view", JSON.stringify({ session_id: sessionId })]));
34645
- const source = origin2.blockId ? view.windows.find((window) => window.layers.some((layer12) => layer12.blocks.some((block) => block.block_id === origin2.blockId))) : undefined;
34668
+ const source = origin2.blockId ? view.windows.find((window2) => window2.layers.some((layer12) => layer12.blocks.some((block) => block.block_id === origin2.blockId))) : undefined;
34646
34669
  if (origin2.blockId && !source)
34647
34670
  return yield* exports_Effect.fail(new AppError({ message: "Source pane is no longer in the selected Rex session" }));
34648
34671
  const windowId = source?.window_id ?? view.active_window_id;
34649
- if (!windowId || !view.windows.some((window) => window.window_id === windowId)) {
34672
+ const window = view.windows.find((window2) => window2.window_id === windowId);
34673
+ if (!windowId || !window) {
34650
34674
  return yield* exports_Effect.fail(new AppError({ message: "No active Rex window for the popup" }));
34651
34675
  }
34652
34676
  const sourceOwner = source?.layers.flatMap((layer12) => layer12.blocks).find((block) => block.block_id === origin2.blockId)?.owner;
34653
34677
  const clients = (yield* parse3(RexClientsSchema, yield* localRex(["client", "ls", "--json"]))).clients.filter((client) => client.info?.kind === "app" && client.connection_state === "connected");
34654
34678
  const clientId = [sourceOwner, origin2.clientId].find((id2) => id2 && clients.some((client) => client.client_id === id2));
34655
34679
  const popupCommand = clientId ? [...command, "--managed-popup", "--origin-client", clientId] : [...command, "--managed-popup"];
34656
- const width2 = 0.68, height = 0.24;
34680
+ const blocks = window.layers.flatMap((layer12) => layer12.blocks);
34681
+ const terminals = blocks.filter((block) => block.flavor === "com.superlogical.terminal.shell");
34682
+ const terminal = terminals.find((block) => block.block_id === origin2.blockId) ?? terminals.find((block) => block.block_id === window.focused_block_id) ?? terminals[0];
34683
+ let width2 = 1, height = 1;
34684
+ if (terminal) {
34685
+ const pane = window.layers.map((layer12) => findPane(layer12.layout, terminal.block_id)).find((node) => node !== undefined);
34686
+ if (!pane)
34687
+ return yield* exports_Effect.fail(new AppError({ message: "Rex terminal geometry changed before opening the popup" }));
34688
+ const size8 = yield* parse3(RexTerminalSizeSchema, yield* localRex(["block", "call", "-s", sessionId, "-b", terminal.block_id, "size"]));
34689
+ const zoomed = window.zoomed_block_id === terminal.block_id;
34690
+ width2 = Math.min(1, (popupSize.columns + 2) * (zoomed ? 1 : pane.rect[2]) / size8.columns);
34691
+ height = Math.min(1, (popupSize.rows + 3) * (zoomed ? 1 : pane.rect[3]) / size8.rows);
34692
+ }
34657
34693
  const args2 = {
34658
34694
  session_id: sessionId,
34659
34695
  window_id: windowId,
34660
34696
  bounds: [(1 - width2) / 2, (1 - height) / 2, width2, height],
34661
- layout: { block: { flavor: "com.superlogical.terminal.shell", options: { command: commandWithPath(popupCommand), shell: "none", cwd: process.cwd(), exit: { on_completion: true } } } },
34697
+ layout: { block: { flavor: "com.superlogical.terminal.shell", options: { command: commandWithPath(popupCommand), shell: "none", cwd: process.cwd(), size: popupSize, exit: { on_completion: true } } } },
34662
34698
  focus: true
34663
34699
  };
34664
34700
  const created = yield* parse3(RexLayerSchema, yield* localRex(["api", "call", "-s", sessionId, "session.new_layer", JSON.stringify(args2)]));
@@ -38517,59 +38553,53 @@ var safeDisplayText = (text, preserveWhitespace = false) => {
38517
38553
  };
38518
38554
  var fit = (text, width2) => Bun.stringWidth(text) > width2 ? Bun.sliceAnsi(text, 0, Math.max(0, width2), { ellipsis: "\u2026" }) : text;
38519
38555
  var pad = (text, width2) => text + " ".repeat(Math.max(0, width2 - Bun.stringWidth(text)));
38556
+ var formRows = [
38557
+ { id: "project", label: "Project", value: "\u2014", disabled: true },
38558
+ { id: "machine", label: "Machine", value: "\u2014", disabled: true },
38559
+ { id: "destination", label: "Checkout", value: "\u2014", disabled: true },
38560
+ { id: "branch", label: "Branch", value: "\u2014", disabled: true },
38561
+ { id: "checkoutName", label: "Directory", value: "\u2014", disabled: true },
38562
+ { id: "session", label: "Session", value: "\u2014", disabled: true },
38563
+ { id: "mode", label: "Mode", value: "\u2014", disabled: true }
38564
+ ];
38565
+ var choiceCount = popupSize.rows - formRows.length - 6;
38520
38566
  var renderFormFrame = (view, focused, columns, rows2, colors2 = !process.env.NO_COLOR, options = {}) => {
38521
38567
  const width2 = Math.max(2, columns);
38522
- const inside = width2 - 2;
38568
+ if (rows2 < popupSize.rows)
38569
+ return fit(`Rex Worktrees needs ${popupSize.rows} terminal rows. Resize this pane; Esc closes.`, width2);
38570
+ const detailCount = rows2 - formRows.length - 4;
38523
38571
  const screen = [];
38524
- const border = (body) => `${color("\u2502", "muted", colors2)}${pad(fit(body, inside), inside)}${color("\u2502", "muted", colors2)}`;
38525
- const line = (left, right, title = "") => {
38526
- const text = fit(safeDisplayText(title), inside);
38527
- return color(`${left}${text}${"\u2500".repeat(Math.max(0, inside - Bun.stringWidth(text)))}${right}`, "muted", colors2);
38528
- };
38529
- const add4 = (text) => screen.push(border(text));
38530
- screen.push(line("\u250C", "\u2510"));
38572
+ const add4 = (text) => screen.push(pad(fit(text, width2), width2));
38531
38573
  add4(`${color("REX", "cyan", colors2)} ${color("/ WORKTREES", "bold", colors2)}`);
38532
- screen.push(line("\u251C", "\u2524"));
38533
- const fieldCount = Math.max(1, Math.min(5, rows2 - 11));
38534
- const detailCount = Math.max(3, rows2 - fieldCount - 8);
38535
- const focusIndex = view.rows.findIndex((row) => row.id === focused);
38536
- const start = Math.max(0, Math.min(focusIndex - fieldCount + 1, view.rows.length - fieldCount));
38537
- for (let index2 = 0;index2 < fieldCount; index2++) {
38538
- const row = view.rows[start + index2];
38539
- if (!row) {
38540
- add4("");
38541
- continue;
38542
- }
38574
+ add4(color("\u2500".repeat(width2), "muted", colors2));
38575
+ for (const slot of formRows) {
38576
+ const row = view.rows.find((row2) => row2.id === slot.id) ?? slot;
38543
38577
  const active = focused === row.id;
38544
38578
  const tone = row.disabled ? "muted" : active ? "cyan" : "bold";
38545
- const indicator = index2 === 0 && start > 0 ? "\u2191" : index2 === fieldCount - 1 && start + fieldCount < view.rows.length ? "\u2193" : active ? "\u203A" : " ";
38546
- add4(`${color(indicator, tone, colors2)} ${color(pad(fit(safeDisplayText(row.label).toUpperCase(), 13), 13), tone, colors2)} ${color(fit(safeDisplayText(row.value) || "\u2014", Math.max(1, inside - 17)), tone, colors2)}`);
38579
+ const indicator = active ? "\u203A" : " ";
38580
+ add4(`${color(indicator, tone, colors2)} ${color(pad(fit(safeDisplayText(row.label).toUpperCase(), 13), 13), tone, colors2)} ${color(fit(safeDisplayText(row.value) || "\u2014", Math.max(1, width2 - 17)), tone, colors2)}`);
38547
38581
  }
38548
- add4("");
38549
38582
  const current = view.rows.find((row) => row.id === focused);
38550
- screen.push(line("\u251C", "\u2524", ` ${options.editor?.title ?? current?.label ?? "Details"} `));
38583
+ const heading = fit(safeDisplayText(options.editor?.title ?? current?.label ?? "Details") + " ", width2);
38584
+ add4(color(`${heading}${"\u2500".repeat(Math.max(0, width2 - Bun.stringWidth(heading)))}`, "muted", colors2));
38551
38585
  const subtitle = current?.detail ?? view.rows.find((row) => row.id === "destination")?.detail ?? "";
38552
- const wrapped = [view.error, view.notice, subtitle].filter(Boolean).flatMap((message) => Bun.wrapAnsi(safeDisplayText(message), Math.max(1, inside - 10), { hard: true }).split(`
38586
+ const wrapped = [view.error, view.notice, subtitle].filter(Boolean).flatMap((message) => Bun.wrapAnsi(safeDisplayText(message), Math.max(1, width2 - 8), { hard: true }).split(`
38553
38587
  `));
38554
38588
  const visible = options.editor ? 1 : detailCount;
38555
38589
  const offset = Math.max(0, Math.min(options.detailOffset ?? 0, wrapped.length - visible));
38556
38590
  const detailLine = (index2) => `${index2 === 0 && offset > 0 ? "\u2191 " : ""}${wrapped[offset + index2] ?? ""}${index2 === visible - 1 && offset + visible < wrapped.length ? " \u2193 PgDn" : ""}`;
38557
38591
  if (options.editor) {
38558
- const errorRows = view.error ? 1 : 0;
38559
- for (let index2 = 0;index2 < detailCount - errorRows; index2++)
38592
+ for (let index2 = 0;index2 < detailCount - 1; index2++)
38560
38593
  add4(options.editor.lines[index2] ?? "");
38561
- if (errorRows)
38562
- add4(color(detailLine(0), "red", colors2));
38594
+ add4(view.error ? color(detailLine(0), "red", colors2) : "");
38563
38595
  } else {
38564
38596
  for (let index2 = 0;index2 < detailCount; index2++)
38565
38597
  add4(color(detailLine(index2), view.error ? "red" : view.notice ? "amber" : "muted", colors2));
38566
38598
  }
38567
- screen.push(line("\u251C", "\u2524"));
38568
38599
  const hint = (key5, label) => `${color(key5, "bold", colors2)} ${color(label, "muted", colors2)}`;
38569
38600
  const button = (label, active, primary = false, disabled = false) => color(`${active ? "\u203A" : " "}[ ${safeDisplayText(label)} ]`, disabled ? "muted" : active ? "cyan" : primary ? "bold" : "muted", colors2);
38570
38601
  add4(options.footer ? color(options.footer, "muted", colors2) : options.editor ? `${hint("Enter", "accept")} \xB7 ${hint("Esc", "back")} \xB7 ${hint("\u2191\u2193", "choices")} \xB7 ${hint("PgUp/PgDn", "details")}` : `${button(`${view.submitLabel} \xB7 Ctrl+S`, focused === "submit", true, view.submitDisabled)} ${button("Cancel \xB7 Esc", focused === "cancel")} ${hint("Tab", "next")}`);
38571
- screen.push(line("\u2514", "\u2518"));
38572
- return screen.slice(0, Math.max(1, rows2)).join(`\r
38602
+ return screen.join(`\r
38573
38603
  `);
38574
38604
  };
38575
38605
  var matchingChoices = (choices, text) => {
@@ -38612,8 +38642,8 @@ var advanceInputChoice = (state, event, choices, selectionOnly = false) => {
38612
38642
  return { _tag: "Beep" };
38613
38643
  return { _tag: "NextFrame", state: { text: state.text + text, selected: selectionOnly ? state.selected : null } };
38614
38644
  };
38615
- var renderInputChoice = (state, choices, columns, rows2, colors2 = !process.env.NO_COLOR, selectionOnly = false, count2 = Math.max(2, rows2 - 14)) => {
38616
- const width2 = Math.max(20, columns) - 2;
38645
+ var renderInputChoice = (state, choices, columns, colors2 = !process.env.NO_COLOR, selectionOnly = false, count2 = choiceCount) => {
38646
+ const width2 = Math.max(20, columns);
38617
38647
  const matches = matchingChoices(choices, state.text);
38618
38648
  const selected = matches.indexOf(state.selected ?? -1);
38619
38649
  const start = selected < 0 ? 0 : Math.max(0, Math.min(selected, matches.length - count2));
@@ -38631,7 +38661,7 @@ var acknowledge = (title, lines2, tone, view = { rows: [], submitLabel: "Close"
38631
38661
  render: (detailOffset, action) => action._tag === "Submit" ? exports_Effect.succeed("") : exports_Effect.gen(function* () {
38632
38662
  const terminal = yield* exports_Terminal.Terminal;
38633
38663
  const notice = `${title} \xB7 ${lines2.join(" \xB7 ")}`;
38634
- return `\x1B[H\x1B[2J${renderFormFrame({ ...view, error: tone === "error" ? notice : undefined, notice: tone !== "error" ? notice : undefined }, "submit", yield* terminal.columns, yield* terminal.rows, !process.env.NO_COLOR, { detailOffset, footer: "Enter / Space close \xB7 Esc close \xB7 PgUp/PgDn details" })}`;
38664
+ return `\x1B[?25l\x1B[H\x1B[2J${renderFormFrame({ ...view, error: tone === "error" ? notice : undefined, notice: tone !== "error" ? notice : undefined }, "submit", yield* terminal.columns, yield* terminal.rows, !process.env.NO_COLOR, { detailOffset, footer: "Enter / Space close \xB7 Esc close \xB7 PgUp/PgDn details" })}\x1B[0J`;
38635
38665
  }),
38636
38666
  clear: () => exports_Effect.succeed(""),
38637
38667
  process: (input, offset) => exports_Effect.succeed(input.key.name === "pageup" || input.key.name === "pagedown" ? { _tag: "NextFrame", state: Math.max(0, offset + (input.key.name === "pageup" ? -1 : 1)) } : input.key.name === "enter" || input.key.name === "return" || input.key.name === "space" || input.key.name === "escape" || input.key.ctrl && input.key.name === "c" ? { _tag: "Submit", value: undefined } : { _tag: "Beep" })
@@ -38742,7 +38772,7 @@ var popup = (command, context3, origin2 = {}, preferredMachine) => exports_Effec
38742
38772
  let launchAcknowledged = false;
38743
38773
  return exports_Effect.gen(function* () {
38744
38774
  const terminal = yield* exports_Terminal.Terminal;
38745
- yield* exports_Effect.acquireRelease(terminal.display("\x1B[?1049h"), () => terminal.display("\x1B[?25h\x1B[?1049l").pipe(exports_Effect.orDie));
38775
+ yield* exports_Effect.acquireRelease(terminal.display("\x1B[?1049h\x1B[?25l"), () => terminal.display("\x1B[?25h\x1B[?1049l").pipe(exports_Effect.orDie));
38746
38776
  let machines = [];
38747
38777
  let draft = { mode: "auto" };
38748
38778
  let sessions = [];
@@ -38761,25 +38791,29 @@ var popup = (command, context3, origin2 = {}, preferredMachine) => exports_Effec
38761
38791
  });
38762
38792
  const chooseField = exports_Effect.fnUntraced(function* (view, initialFocus) {
38763
38793
  let detailOffset = 0;
38764
- const fields = [...view.rows.map((row) => row.id), "submit", "cancel"];
38794
+ let visibleRows = popupSize.rows;
38795
+ const fields = [...formRows.filter((slot) => view.rows.some((row) => row.id === slot.id)).map((row) => row.id), "submit", "cancel"];
38765
38796
  const initial = Math.max(0, fields.indexOf(initialFocus));
38766
38797
  const prompt = exports_Prompt.Custom(initial, yield* resizeEvents, {
38767
38798
  render: (index2, action) => action._tag === "Submit" ? exports_Effect.succeed("") : exports_Effect.gen(function* () {
38768
38799
  const columns = yield* terminal.columns;
38769
38800
  const rows2 = yield* terminal.rows;
38770
- return `\x1B[H\x1B[2J${renderFormFrame(view, fields[index2], columns, rows2, !process.env.NO_COLOR, { detailOffset })}`;
38801
+ visibleRows = rows2;
38802
+ return `\x1B[?25l\x1B[H\x1B[2J${renderFormFrame(view, fields[index2], columns, rows2, !process.env.NO_COLOR, { detailOffset })}\x1B[0J`;
38771
38803
  }),
38772
38804
  clear: () => exports_Effect.succeed(""),
38773
38805
  process: (event, index2) => {
38774
38806
  if (event._tag === "Event")
38775
38807
  return exports_Effect.succeed({ _tag: "NextFrame", state: index2 });
38776
38808
  const { key: key5 } = event.input;
38809
+ if (key5.name === "escape" || key5.ctrl && key5.name === "c")
38810
+ return exports_Effect.succeed({ _tag: "Submit", value: "cancel" });
38811
+ if (visibleRows < popupSize.rows)
38812
+ return exports_Effect.succeed({ _tag: "Beep" });
38777
38813
  if (key5.name === "pageup" || key5.name === "pagedown") {
38778
38814
  detailOffset = Math.max(0, detailOffset + (key5.name === "pageup" ? -1 : 1));
38779
38815
  return exports_Effect.succeed({ _tag: "NextFrame", state: index2 });
38780
38816
  }
38781
- if (key5.name === "escape" || key5.ctrl && key5.name === "c")
38782
- return exports_Effect.succeed({ _tag: "Submit", value: "cancel" });
38783
38817
  if (key5.ctrl && key5.name === "s")
38784
38818
  return exports_Effect.succeed(view.submitDisabled ? { _tag: "Beep" } : { _tag: "Submit", value: "submit" });
38785
38819
  if (key5.name === "enter" || key5.name === "return") {
@@ -38795,18 +38829,22 @@ var popup = (command, context3, origin2 = {}, preferredMachine) => exports_Effec
38795
38829
  }, exports_Effect.scoped);
38796
38830
  const inputChoice = exports_Effect.fnUntraced(function* (options) {
38797
38831
  let detailOffset = 0;
38832
+ let visibleRows = popupSize.rows;
38798
38833
  const result4 = yield* exports_Prompt.run(exports_Prompt.Custom({ text: "", selected: options.selected === undefined || options.selected < 0 ? null : options.selected }, yield* resizeEvents, {
38799
38834
  render: (state, action) => action._tag === "Submit" ? exports_Effect.succeed("") : exports_Effect.gen(function* () {
38800
38835
  const columns = yield* terminal.columns;
38801
38836
  const rows2 = yield* terminal.rows;
38837
+ visibleRows = rows2;
38802
38838
  const view = activeView;
38803
- const editor = renderInputChoice(state, options.choices, columns, rows2, !process.env.NO_COLOR, options.selectionOnly, Math.max(2, rows2 - 14) - (view?.error ? 1 : 0));
38839
+ const editor = renderInputChoice(state, options.choices, columns, !process.env.NO_COLOR, options.selectionOnly, Math.max(1, rows2 - formRows.length - 6));
38804
38840
  if (!view)
38805
38841
  return "";
38806
- return `\x1B[H\x1B[2J${renderFormFrame(view, focused, columns, rows2, !process.env.NO_COLOR, { editor: { title: options.message, lines: editor }, detailOffset })}`;
38842
+ return `\x1B[?25l\x1B[H\x1B[2J${renderFormFrame(view, focused, columns, rows2, !process.env.NO_COLOR, { editor: { title: options.message, lines: editor }, detailOffset })}\x1B[0J`;
38807
38843
  }),
38808
38844
  clear: () => exports_Effect.succeed(""),
38809
38845
  process: (event, state) => {
38846
+ if (event._tag !== "Event" && visibleRows < popupSize.rows && event.input.key.name !== "escape" && !(event.input.key.ctrl && event.input.key.name === "c"))
38847
+ return exports_Effect.succeed({ _tag: "Beep" });
38810
38848
  if (event._tag !== "Event" && (event.input.key.name === "pageup" || event.input.key.name === "pagedown")) {
38811
38849
  detailOffset = Math.max(0, detailOffset + (event.input.key.name === "pageup" ? -1 : 1));
38812
38850
  return exports_Effect.succeed({ _tag: "NextFrame", state });
@@ -38938,7 +38976,7 @@ var popup = (command, context3, origin2 = {}, preferredMachine) => exports_Effec
38938
38976
  if (showLoading) {
38939
38977
  const pending = { ...formView(true), notice: `Connecting to ${machine.label}\u2026` };
38940
38978
  activeView = pending;
38941
- yield* terminal.display(`\x1B[H\x1B[2J${renderFormFrame(pending, "machine", yield* terminal.columns, yield* terminal.rows)}`);
38979
+ yield* terminal.display(`\x1B[?25l\x1B[H\x1B[2J${renderFormFrame(pending, "machine", yield* terminal.columns, yield* terminal.rows)}\x1B[0J`);
38942
38980
  }
38943
38981
  const connected = yield* exports_Effect.result(connectAndDiscover(machine, command, discoveredContext));
38944
38982
  if (exports_Result.isFailure(connected)) {
@@ -39039,7 +39077,7 @@ var popup = (command, context3, origin2 = {}, preferredMachine) => exports_Effec
39039
39077
  };
39040
39078
  const initialView = { ...formView(true), notice: "Discovering projects and Rex sessions\u2026" };
39041
39079
  activeView = initialView;
39042
- yield* terminal.display(`\x1B[H\x1B[2J${renderFormFrame(initialView, "project", yield* terminal.columns, yield* terminal.rows)}`);
39080
+ yield* terminal.display(`\x1B[?25l\x1B[H\x1B[2J${renderFormFrame(initialView, "project", yield* terminal.columns, yield* terminal.rows)}\x1B[0J`);
39043
39081
  const initialize = exports_Effect.gen(function* () {
39044
39082
  contextPath = yield* context3;
39045
39083
  yield* loadMachines;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rex-worktrees",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Git worktrees and Jujutsu workspaces for Rex",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Ho",