@celljs/ta-dash 4.41.0 → 4.42.0

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/host/index.mjs CHANGED
@@ -4016,6 +4016,9 @@ class DashHost {
4016
4016
  if (event.type !== "turn_end" || event.error || event.aborted || event.group) {
4017
4017
  return;
4018
4018
  }
4019
+ if (event.actors?.some((actor) => actor !== TA_OWNER)) {
4020
+ return;
4021
+ }
4019
4022
  const cwd = this.local(event.cwd);
4020
4023
  const text2 = (await this.host.getLastAssistantText(event.sessionId)).text ?? "";
4021
4024
  let allowed = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-dash",
3
- "version": "4.41.0",
3
+ "version": "4.42.0",
4
4
  "description": "A pi package for Ta: dashboards of replies whose numbers come from queries run on the user's computer, kept current, each showing the query behind it",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -27,9 +27,9 @@
27
27
  "watch": "tsc -b -w --preserveWatchOutput"
28
28
  },
29
29
  "devDependencies": {
30
- "@celljs/core": "4.41.0",
31
- "@celljs/ta-protocol": "4.41.0",
32
- "@celljs/ta-web": "4.41.0",
30
+ "@celljs/core": "4.42.0",
31
+ "@celljs/ta-protocol": "4.42.0",
32
+ "@celljs/ta-web": "4.42.0",
33
33
  "@types/node": "^24.0.0",
34
34
  "@types/react": "^19.3.3"
35
35
  },
package/web/index.js CHANGED
@@ -727,9 +727,11 @@ function dashView(pi) {
727
727
  open,
728
728
  onOpen,
729
729
  props,
730
- title
730
+ title,
731
+ shared
731
732
  }) {
732
733
  const result = answer?.result;
734
+ const ago = result && !result.error ? DashWords.ago(words, result.at) : undefined;
733
735
  const query = dash.sources.find((source) => source.name === tile2.source)?.run ?? "";
734
736
  let body;
735
737
  if (!result) {
@@ -786,9 +788,9 @@ function dashView(pi) {
786
788
  className: "tdash-tile-head"
787
789
  }, /* @__PURE__ */ React.createElement("span", {
788
790
  className: "tdash-label"
789
- }, tile2.label), result && !result.error && /* @__PURE__ */ React.createElement("span", {
791
+ }, tile2.label), ago && ago !== shared && /* @__PURE__ */ React.createElement("span", {
790
792
  className: "tdash-ago"
791
- }, DashWords.ago(words, result.at))), body, tile2.note && /* @__PURE__ */ React.createElement("div", {
793
+ }, ago)), body, tile2.note && /* @__PURE__ */ React.createElement("div", {
792
794
  className: "tdash-note"
793
795
  }, tile2.note), open && /* @__PURE__ */ React.createElement(Detail, {
794
796
  tile: tile2,
@@ -953,7 +955,8 @@ function dashView(pi) {
953
955
  open: open === index,
954
956
  onOpen: () => setOpen(open === index ? undefined : index),
955
957
  props,
956
- title
958
+ title,
959
+ shared: oldest !== undefined ? DashWords.ago(words, oldest) : undefined
957
960
  }))), props.send && times.length > 0 && /* @__PURE__ */ React.createElement("div", {
958
961
  className: "tdash-next"
959
962
  }, /* @__PURE__ */ React.createElement("button", {
@@ -996,7 +999,11 @@ function dashView(pi) {
996
999
 
997
1000
  // web-src/style.ts
998
1001
  var STYLE = `
999
- /* A dashboard of a reply (\`\`\`ta-dash): a head with when it was fetched, tiles in a grid, the query behind a tile once tapped. */
1002
+ /*
1003
+ * A dashboard of a reply (\`\`\`ta-dash): a head with when it was fetched, tiles in a grid, the query behind a tile once
1004
+ * tapped. One frame, the card's (AGENTS.md "A block has one frame"): a tile is a fill, a chart in it has no frame of its
1005
+ * own, the query is a fill on the tile, its buttons are chips.
1006
+ */
1000
1007
  .tdash-card {
1001
1008
  --tdash-s: var(--ta-font-scale, 1);
1002
1009
  margin: 2px 0 12px;
@@ -1012,18 +1019,18 @@ var STYLE = `
1012
1019
  }
1013
1020
  .ta-code-embedded > .tdash-card { margin: 0; padding: 0; max-width: none; border: 0; background: none; }
1014
1021
  .tdash-making, .tdash-failed { color: var(--ta-muted); }
1015
- .tdash-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
1022
+ .tdash-head { display: flex; align-items: center; gap: 8px; margin: -2px -4px 10px 0; }
1016
1023
  .tdash-title { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1017
1024
  .tdash-fresh { flex: 1; min-width: 0; color: var(--ta-muted); font-size: calc(12px * var(--tdash-s)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1018
1025
  .tdash-refresh {
1019
1026
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
1020
- border: 1px solid var(--ta-border); border-radius: 8px; background: transparent; color: var(--ta-muted); cursor: pointer;
1027
+ border: 0; border-radius: 8px; background: transparent; color: var(--ta-muted); cursor: pointer;
1021
1028
  }
1022
1029
  .tdash-refresh:hover { color: var(--ta-text); background: var(--ta-hover); }
1023
1030
  .tdash-refresh[data-busy] svg { animation: tdash-spin 0.9s linear infinite; }
1024
1031
  @keyframes tdash-spin { to { transform: rotate(360deg); } }
1025
1032
  .tdash-banner { margin-bottom: 10px; color: var(--ta-muted); font-size: calc(12px * var(--tdash-s)); }
1026
- .tdash-ask { margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--ta-border); border-radius: 10px; background: var(--ta-hover); }
1033
+ .tdash-ask { margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; background: var(--ta-raised); }
1027
1034
  .tdash-ask-title { font-weight: 600; margin-bottom: 6px; }
1028
1035
  .tdash-ask-hint { color: var(--ta-muted); font-size: calc(12px * var(--tdash-s)); margin: 6px 0 8px; }
1029
1036
  .tdash-allow {
@@ -1031,17 +1038,21 @@ var STYLE = `
1031
1038
  }
1032
1039
  .tdash-allow:disabled { opacity: 0.6; }
1033
1040
  .tdash-query {
1034
- margin: 4px 0 0; padding: 6px 8px; border-radius: 6px; background: var(--ta-card); border: 1px solid var(--ta-border);
1035
- font-family: var(--ta-mono, ui-monospace, monospace); font-size: calc(11.5px * var(--tdash-s));
1036
- white-space: pre-wrap; word-break: break-all; max-height: 140px; overflow: auto;
1041
+ margin: 4px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--ta-card); color: var(--ta-body, var(--ta-text));
1042
+ font-family: var(--ta-mono, ui-monospace, monospace); font-size: calc(11.5px * var(--tdash-s)); line-height: 1.55;
1043
+ white-space: pre-wrap; overflow-wrap: anywhere; max-height: 140px; overflow: auto;
1037
1044
  }
1038
1045
  .tdash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
1039
1046
  .tdash-tile {
1040
- min-width: 0; padding: 10px 12px; border: 1px solid var(--ta-border); border-radius: 10px; cursor: pointer;
1041
- transition: border-color 0.15s;
1047
+ min-width: 0; padding: 10px 12px; border-radius: 10px; background: var(--ta-raised); cursor: pointer;
1048
+ transition: background 0.15s;
1042
1049
  }
1043
- .tdash-tile:hover, .tdash-tile[data-open] { border-color: var(--ta-accent); }
1050
+ .tdash-tile:hover { background: var(--ta-hover); }
1051
+ .tdash-tile:focus-visible { outline: 2px solid var(--ta-border-focus); outline-offset: 1px; }
1052
+ .tdash-tile[data-open] { background: var(--ta-raised); cursor: default; }
1044
1053
  .tdash-tile:not([data-kind="stat"]) { grid-column: span 2; }
1054
+ /* Opened, a tile takes the whole row: its query reads in full, the tile beside it does not stretch to its height. */
1055
+ .tdash-tile[data-open] { grid-column: 1 / -1; }
1045
1056
  @container (max-width: 340px) { .tdash-tile:not([data-kind="stat"]) { grid-column: 1 / -1; } }
1046
1057
  .tdash-tile-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
1047
1058
  .tdash-label { flex: 1; min-width: 0; color: var(--ta-muted); font-size: calc(12px * var(--tdash-s)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@@ -1056,15 +1067,18 @@ var STYLE = `
1056
1067
  .tdash-pending { color: var(--ta-muted); padding: 6px 0; }
1057
1068
  .tdash-error { color: var(--ta-red, #dc2626); font-size: calc(12px * var(--tdash-s)); word-break: break-word; }
1058
1069
  .tdash-note { margin-top: 4px; color: var(--ta-muted); font-size: calc(11.5px * var(--tdash-s)); }
1059
- .tdash-detail { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--ta-border); cursor: default; }
1070
+ .tdash-detail { margin-top: 10px; cursor: default; }
1060
1071
  .tdash-detail-head { color: var(--ta-muted); font-size: calc(11.5px * var(--tdash-s)); }
1061
1072
  .tdash-facts { margin-top: 6px; color: var(--ta-muted); font-size: calc(11.5px * var(--tdash-s)); }
1062
1073
  .tdash-actions, .tdash-next { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
1063
1074
  .tdash-actions button, .tdash-next button {
1064
- display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--ta-border); border-radius: 999px;
1065
- background: transparent; color: var(--ta-text); font: inherit; font-size: calc(12px * var(--tdash-s)); cursor: pointer;
1075
+ display: inline-flex; align-items: center; gap: 5px; height: calc(28px * var(--tdash-s)); padding: 0 12px 0 10px; border: 0; border-radius: 999px;
1076
+ background: var(--ta-chip); color: var(--ta-text); font: inherit; font-size: calc(12px * var(--tdash-s)); cursor: pointer;
1077
+ transition: background 0.15s;
1066
1078
  }
1067
- .tdash-actions button:hover, .tdash-next button:hover { background: var(--ta-hover); }
1079
+ .tdash-actions button { background: var(--ta-card); }
1080
+ .tdash-actions button svg, .tdash-next button svg { color: var(--ta-muted); }
1081
+ .tdash-actions button:hover, .tdash-next button:hover { background: var(--ta-hover-strong); }
1068
1082
  .tdash-next { margin-top: 10px; }
1069
1083
  `;
1070
1084
  function injectStyle() {