pi-better-background-tasks 0.21.2 → 0.21.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-better-background-tasks",
3
- "version": "0.21.2",
3
+ "version": "0.21.3",
4
4
  "description": "Pi extension for durable background shell tasks, watchers, logs, and status inspection.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"c02d951603064af3401fd640dfd2c05b18ae97299509a55db82d58aa5c69a2f0","piSdkVersion":"1.4.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"300f19071b0e3f4e68220f42d7976b92dc6a629dd2719325fb7fad41781164c8","protocolVersion":1,"serverVersion":"0.8.2","contentId":"d72a5f1211f34ae97dc84b1c891a38714ab7c41c429332549d4a115af142cd9c"},"sha256":"0286673fe48ab8553727b4794b39721ddb96573b9c31b885918ee4d1df0c1a68"}
1
+ {"build":{"format":1,"sourceDigest":"08cb279e914bbe738d67b80f5353c4598b0fbf3080aabb2314245c6df11a4a19","piSdkVersion":"1.4.0","nodeVersion":"24.14.1","platform":"darwin-arm64","dependencyLockDigest":"300f19071b0e3f4e68220f42d7976b92dc6a629dd2719325fb7fad41781164c8","protocolVersion":1,"serverVersion":"0.8.3","contentId":"91ace24a155015862688e9e8915cd9d4c539361678ec0dc2bcd535c6272a1471"},"sha256":"c89d05a92be25c260fb2c768f9ae4a1be98e16a59ceb18654bbc75be7d8e7975"}
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"c02d951603064af3401fd640dfd2c05b18ae97299509a55db82d58aa5c69a2f0","piSdkVersion":"1.4.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"300f19071b0e3f4e68220f42d7976b92dc6a629dd2719325fb7fad41781164c8","protocolVersion":1,"serverVersion":"0.8.2","contentId":"0357f903ca7cbcc813194f224e3e1816c0abade6322e8d1321f4b07c8df4a08c"},"sha256":"3f9e9896c4c7b46b6a147e618883616aef287eb5c5a54cb214175354a4741d9b"}
1
+ {"build":{"format":1,"sourceDigest":"08cb279e914bbe738d67b80f5353c4598b0fbf3080aabb2314245c6df11a4a19","piSdkVersion":"1.4.0","nodeVersion":"24.14.1","platform":"darwin-x64","dependencyLockDigest":"300f19071b0e3f4e68220f42d7976b92dc6a629dd2719325fb7fad41781164c8","protocolVersion":1,"serverVersion":"0.8.3","contentId":"f4adba6bea8907cf93e48ca7ff41be8d79a1cdce398611d8b3169ea0e4275ac9"},"sha256":"a9dffe4d9819282a8a8d882bad6fd7159f16605fc15f51cd9bcc24f0f5dfe360"}
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"c02d951603064af3401fd640dfd2c05b18ae97299509a55db82d58aa5c69a2f0","piSdkVersion":"1.4.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"300f19071b0e3f4e68220f42d7976b92dc6a629dd2719325fb7fad41781164c8","protocolVersion":1,"serverVersion":"0.8.2","contentId":"9f205935cb4aee5fb4d817661f86939716c909213b47775c2dcf83f9755122d1"},"sha256":"e02abd34422fba070bc44c59ab190ee61f69b9f2a6c9d926e64485461bfb48ad"}
1
+ {"build":{"format":1,"sourceDigest":"08cb279e914bbe738d67b80f5353c4598b0fbf3080aabb2314245c6df11a4a19","piSdkVersion":"1.4.0","nodeVersion":"24.14.1","platform":"linux-arm64","dependencyLockDigest":"300f19071b0e3f4e68220f42d7976b92dc6a629dd2719325fb7fad41781164c8","protocolVersion":1,"serverVersion":"0.8.3","contentId":"a136cef5d5ebb67cca1c7f2e1da9e25fde09fe851d6cbe48dd9400ae2fd06ff1"},"sha256":"ca9aa52c31521c63682ae959c96f18f3fc92233cad6f1a51168f4b4e3fa601c2"}
@@ -1 +1 @@
1
- {"build":{"format":1,"sourceDigest":"c02d951603064af3401fd640dfd2c05b18ae97299509a55db82d58aa5c69a2f0","piSdkVersion":"1.4.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"300f19071b0e3f4e68220f42d7976b92dc6a629dd2719325fb7fad41781164c8","protocolVersion":1,"serverVersion":"0.8.2","contentId":"36ab9cbfc092b10d96f6d83473057fd4552929ff53ec3972caee1ed83ef50242"},"sha256":"2cfa925caa8783e13a9b92dbe0e8fcac28bbe048978bbdbb08c9f4de78ab2bf1"}
1
+ {"build":{"format":1,"sourceDigest":"08cb279e914bbe738d67b80f5353c4598b0fbf3080aabb2314245c6df11a4a19","piSdkVersion":"1.4.0","nodeVersion":"24.14.1","platform":"linux-x64","dependencyLockDigest":"300f19071b0e3f4e68220f42d7976b92dc6a629dd2719325fb7fad41781164c8","protocolVersion":1,"serverVersion":"0.8.3","contentId":"1ef982714feb775d391396c517e500520bb9b39d9c6e389f95e61312d5b67257"},"sha256":"c6a13e37423ca2543782f68486ed354605082263db2e40121b7f6cedb7cce4c5"}
@@ -778,21 +778,22 @@ function providerGroupLabel(label: string, fg: (color: string, value: string) =>
778
778
 
779
779
  function formatMainListRow(row: InternalRow, selected: boolean, fg: (color: string, value: string) => string, width: number): string {
780
780
  const prefix = (selected ? fg("accent", "› ") : " ") + (row.treeDepth === 1 ? dim(` ${row.lastChild ? "└─" : "├─"} `, fg) : "");
781
- const name = row.name || row.id;
781
+ const name = rowDisplayName(row);
782
+ const summary = singleLine(rowSummary(row));
782
783
  const indicator = statusIndicator(row);
783
784
  const status = fg(indicator.color, indicator.glyph);
784
785
  const elapsed = singleLine(row.elapsed || "-");
785
- const available = Math.max(24, width || MAIN_LIST_FALLBACK_WIDTH);
786
786
  const elapsedWidth = Math.min(Math.max(piVisibleWidth(elapsed), 4), 12);
787
787
  const statusWidth = 2;
788
788
  const leftPrefixWidth = piVisibleWidth(prefix) + statusWidth + 1;
789
- const maxNameWidth = Math.max(8, Math.floor(available * 0.36));
790
- const nameWidth = Math.max(8, Math.min(44, maxNameWidth, available - leftPrefixWidth - elapsedWidth - 10));
791
- const rightWidth = Math.max(8, available - leftPrefixWidth - nameWidth - 1);
792
- const summaryWidth = Math.max(1, rightWidth - elapsedWidth - 1);
793
- const left = `${prefix}${fit(status, statusWidth)} ${fit(name, nameWidth)}`;
794
- const right = `${dim(fitRight(rowSummary(row), summaryWidth), fg)} ${fitRight(elapsed, elapsedWidth)}`;
795
- const gap = Math.max(1, available - piVisibleWidth(left) - piVisibleWidth(right));
789
+ const textWidth = Math.max(0, width - leftPrefixWidth - elapsedWidth - 2);
790
+ // Reserve a readable title when both texts are long. Each side can use the other's spare cells.
791
+ const preferredNameWidth = Math.max(8, Math.ceil(textWidth / 3), textWidth - piVisibleWidth(summary));
792
+ const nameWidth = Math.min(piVisibleWidth(name), textWidth, preferredNameWidth);
793
+ const summaryWidth = textWidth - nameWidth;
794
+ const left = `${prefix}${fit(status, statusWidth)} ${piTruncateToWidth(name, nameWidth)}`;
795
+ const right = `${dim(fitRight(summary, summaryWidth), fg)} ${fitRight(elapsed, elapsedWidth)}`;
796
+ const gap = Math.max(1, width - piVisibleWidth(left) - piVisibleWidth(right));
796
797
  return `${left}${" ".repeat(gap)}${right}`;
797
798
  }
798
799