@kud/gh-cockpit 0.3.16 → 0.4.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.
@@ -2,7 +2,7 @@ import { useWindowSize, Box, Text, useInput } from 'ink';
2
2
  import { Panel, colors, FooterHints, useListCursor } from '@kud/ink-ui';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import { relativeTime, inboxConfig, clipboard, buildCheckoutCmd, runHere, openInTab, runInPane, runInPaneHorizontal } from '@kud/gh-ink';
5
- export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, HealthPanel, PIN_MARK, SIDEBAR_COLS, SidePanel, budgetNotice, buildActions, buildCheckoutCmd, checkoutDirs, clipboard, configureInbox, counts, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, layoutGHItems, matchesFilter, maxViewStart, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signatureOf, sortByRecency, sortItems, toCiStatusState, topLevelCount, truncate, useActionMenu, whoseMove, windowCount, withHeaders, withoutItem, writeCache } from '@kud/gh-ink';
5
+ export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, HealthPanel, PIN_MARK, SIDEBAR_COLS, SidePanel, budgetNotice, buildActions, buildCheckoutCmd, checkoutDirs, clipboard, configureInbox, counts, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, labelPriority, layoutGHItems, matchesFilter, maxViewStart, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signatureOf, sortByRecency, sortItems, toCiStatusState, topLevelCount, truncate, useActionMenu, whoseMove, windowCount, withHeaders, withoutItem, writeCache } from '@kud/gh-ink';
6
6
  import { mkdirSync } from 'fs';
7
7
  import { homedir } from 'os';
8
8
  import { join } from 'path';
@@ -1,4 +1,4 @@
1
- import { AiLauncher, seedPromptFor, CopyPromptNotice } from '../chunk-BQHT6J43.js';
1
+ import { AiLauncher, seedPromptFor, CopyPromptNotice } from '../chunk-FZ6D44AR.js';
2
2
  import { useEffect } from 'react';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
package/dist/index.d.ts CHANGED
@@ -1,15 +1,13 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { GHItem, RepoFilter, InboxExtension, DetailContext } from '@kud/gh-ink';
3
3
  export * from '@kud/gh-ink';
4
- export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, HealthPanel, PIN_MARK, SIDEBAR_COLS, SidePanel, budgetNotice, buildActions, buildCheckoutCmd, checkoutDirs, clipboard, configureInbox, counts, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, layoutGHItems, matchesFilter, maxViewStart, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signatureOf, sortByRecency, sortItems, toCiStatusState, topLevelCount, truncate, useActionMenu, whoseMove, windowCount, withHeaders, withoutItem, writeCache } from '@kud/gh-ink';
4
+ export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, HealthPanel, PIN_MARK, SIDEBAR_COLS, SidePanel, budgetNotice, buildActions, buildCheckoutCmd, checkoutDirs, clipboard, configureInbox, counts, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, labelPriority, layoutGHItems, matchesFilter, maxViewStart, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signatureOf, sortByRecency, sortItems, toCiStatusState, topLevelCount, truncate, useActionMenu, whoseMove, windowCount, withHeaders, withoutItem, writeCache } from '@kud/gh-ink';
5
5
  import { Health } from '@kud/gh';
6
6
  export { InboxSource, buildInboxQueries, buildInboxQuery, mergeInboxData } from '@kud/gh';
7
7
 
8
8
  declare const withRetry: <T>(fn: () => Promise<T>, attempts?: number, delayMs?: number) => Promise<T>;
9
9
  declare const computeHealth: (node: any) => Health;
10
- type CockpitItem = GHItem & {
11
- labels?: string[];
12
- };
10
+ type CockpitItem = GHItem;
13
11
  declare const toGHItem: (node: any, opts?: {
14
12
  indent?: boolean;
15
13
  }) => CockpitItem;
@@ -63,6 +61,17 @@ type CockpitConfig = {
63
61
  * one repo, so a repo can outrank the owner containing it.
64
62
  */
65
63
  repoPriority?: readonly string[];
64
+ /**
65
+ * Label ranking, best first — which two labels a row shows when it carries
66
+ * more than two. `plan` matches that label exactly; `app:*` matches every
67
+ * label starting `app:`. Unranked labels sort last, by name.
68
+ *
69
+ * Worth setting even when it looks like a nicety: with nothing here a row
70
+ * carrying `plan` and `app:cockpit` shows them in name order, so `app:*`
71
+ * takes the first slot and the label saying what KIND of thing the row is
72
+ * takes the second. On a worklist of plan issues that is the wrong way round.
73
+ */
74
+ labelPriority?: readonly string[];
66
75
  /** Default filter, which `--include` / `--exclude` override. */
67
76
  filter?: RepoFilter;
68
77
  /** Named filters, invoked as `gh-cockpit <name>`. */
@@ -103,7 +112,11 @@ type PromptContext = {
103
112
  /** `owner/name` of the repo the row belongs to. */
104
113
  repo: string;
105
114
  url: string;
106
- labels?: string[];
115
+ /**
116
+ * Readonly, matching `GHItem` — a prompt form reads the row's labels to word
117
+ * itself and has no business reordering the array it was handed.
118
+ */
119
+ labels?: readonly string[];
107
120
  };
108
121
  type PromptForms = {
109
122
  /**
@@ -147,7 +160,7 @@ declare const IssueView: ({ item, login, onBack, }: {
147
160
  repo: string;
148
161
  url: string;
149
162
  title?: string;
150
- labels?: string[];
163
+ labels?: readonly string[];
151
164
  };
152
165
  login: string;
153
166
  onBack: () => void;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useActionMenu, buildActions, AiLauncher, seedPromptFor, CopyPromptNotice, DrillView, ActionMenu, resolveRepoPath, openInTab } from './chunk-BQHT6J43.js';
2
- export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, DrillView, HealthPanel, PIN_MARK, SIDEBAR_COLS, SidePanel, budgetNotice, buildActions, buildCheckoutCmd, buildInboxQueries, buildInboxQuery, checkoutDirs, clipboard, computeHealth, configureInbox, counts, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, layoutGHItems, matchesFilter, maxViewStart, mergeInboxData, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, registerPrompts, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signalPath, signatureOf, sortByRecency, sortItems, toCiStatusState, toGHItem, topLevelCount, truncate, useActionMenu, whoseMove, windowCount, withHeaders, withRetry, withoutItem, writeCache } from './chunk-BQHT6J43.js';
1
+ import { useActionMenu, buildActions, AiLauncher, seedPromptFor, CopyPromptNotice, DrillView, ActionMenu, resolveRepoPath, openInTab } from './chunk-FZ6D44AR.js';
2
+ export { ActionMenu, App, COLS, CiStatusLine, CommentsPanel, DrillView, HealthPanel, PIN_MARK, SIDEBAR_COLS, SidePanel, budgetNotice, buildActions, buildCheckoutCmd, buildInboxQueries, buildInboxQuery, checkoutDirs, clipboard, computeHealth, configureInbox, counts, drillCmd, explainGhAction, explainItem, filterByOrigin, filterByRepos, filterBySearch, fitCount, gapsAbove, healthColor, healthDisplay, healthGlyph, healthLegend, inboxConfig, insertRepoHeaders, itermRun, jumpToRepo, jumpToRepoPane, labelPriority, layoutGHItems, matchesFilter, maxViewStart, mergeInboxData, moveCursor, openInTab, parsePatterns, profileOf, railCapacity, readCache, registerPrompts, relativeTime, renderMarkdown, repoPriority, reposInSections, resetInboxConfig, resolveRepoPath, runHere, runInPane, runInPaneHorizontal, sameCiStatusState, signalPath, signatureOf, sortByRecency, sortItems, toCiStatusState, toGHItem, topLevelCount, truncate, useActionMenu, whoseMove, windowCount, withHeaders, withRetry, withoutItem, writeCache } from './chunk-FZ6D44AR.js';
3
3
  import { parsePatterns, HealthPanel, CommentsPanel, inboxConfig } from '@kud/gh-ink';
4
4
  import { $ } from 'zx';
5
5
  import { useState, useEffect } from 'react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh-cockpit",
3
- "version": "0.3.16",
3
+ "version": "0.4.0",
4
4
  "description": "A configurable GitHub cockpit for the terminal — your PRs, reviews and issues in one Ink TUI, grouped by whose move it is.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@kud/gh": "0.9.0",
57
- "@kud/gh-ink": "0.43.3",
57
+ "@kud/gh-ink": "0.44.0",
58
58
  "@kud/ink-ui": "0.21.0",
59
59
  "zx": "8.8.5"
60
60
  },