@kud/gh-ink 0.23.3 → 0.24.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/dist/index.d.ts CHANGED
@@ -199,8 +199,8 @@ declare const sortItems: (items: GHItem[]) => GHItem[];
199
199
  declare const sortByRecency: (items: GHItem[]) => GHItem[];
200
200
  declare const insertRepoHeaders: (items: GHItem[]) => AnyItem[];
201
201
  type Standing = "authored" | "queued" | "spoken";
202
- declare const whoseMove: (health: Health, sectionId: string, standing?: Standing) => "you" | "them";
203
- declare const layoutGHItems: (items: GHItem[], sectionId: string) => AnyItem[];
202
+ declare const whoseMove: (health: Health, sectionId: string, standing?: Standing, theySpokeLast?: boolean) => "you" | "them";
203
+ declare const layoutGHItems: (items: GHItem[], sectionId: string, login?: string) => AnyItem[];
204
204
  /**
205
205
  * A two-way repo split, when a host has one. `undefined` — the ordinary case —
206
206
  * means no split at all: every row stands.
package/dist/index.js CHANGED
@@ -919,18 +919,38 @@ var YOURS = {
919
919
  queued: ["waiting", "pending", "threads", "approved"],
920
920
  spoken: ["threads"]
921
921
  };
922
- var whoseMove = (health, sectionId, standing) => YOURS[standing ?? STANDING[sectionId] ?? "queued"].includes(health) ? "you" : "them";
922
+ var whoseMove = (health, sectionId, standing, theySpokeLast) => (
923
+ // Somebody else having the last word outranks every review state below. It is
924
+ // the plainest claim on you there is — a question asked, an objection raised,
925
+ // a "can you rebase" — and none of it shows up as a health, because a bare
926
+ // comment approves nothing, fails nothing and opens no thread.
927
+ //
928
+ // The row already SAID this and the band disagreed with it: the turn arrow
929
+ // reads lastActor and drew `←`, and the explain panel spelled out "X spoke
930
+ // last, your reply is owed", while the band filed it under Their move. Two
931
+ // signals on one row, pointing opposite ways, until 2026-08-27.
932
+ //
933
+ // Only in that direction. YOU having spoken last does not hand the row over —
934
+ // red CI on your own PR is yours whether or not you commented after it — so
935
+ // that case falls through to the table.
936
+ theySpokeLast ? "you" : YOURS[standing ?? STANDING[sectionId] ?? "queued"].includes(health) ? "you" : "them"
937
+ );
923
938
  var BAND_LABEL = {
924
939
  you: "Your move",
925
940
  them: "Their move"
926
941
  };
927
- var layoutGHItems = (items, sectionId) => {
942
+ var layoutGHItems = (items, sectionId, login) => {
928
943
  if (sectionId === "done") return insertRepoHeaders(sortByRecency(items));
929
944
  const sorted = sortItems(items);
930
945
  const bands = ["you", "them"].map((side) => ({
931
946
  side,
932
947
  rows: sorted.filter(
933
- (i) => whoseMove(i.health, sectionId, i.standing) === side
948
+ (i) => whoseMove(
949
+ i.health,
950
+ sectionId,
951
+ i.standing,
952
+ !!login && !!i.lastActor && i.lastActor !== login
953
+ ) === side
934
954
  )
935
955
  }));
936
956
  const filled = bands.filter((b) => b.rows.length > 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh-ink",
3
- "version": "0.23.3",
3
+ "version": "0.24.0",
4
4
  "description": "Ink components for rendering GitHub PR review comments and health — controlled, presentation-only, built on @kud/ink-ui and fed by @kud/gh.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",