gh-glance 0.17.0 → 0.18.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.
Files changed (4) hide show
  1. package/CHANGELOG.md +82 -1
  2. package/README.md +133 -6
  3. package/index.mjs +1971 -160
  4. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,85 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.18.0] - 2026-10-29
11
+
12
+ ### Added
13
+
14
+ - Local Focus searches loaded Issues and PRs with `/`, topic words and exact
15
+ number, author, branch and updated-date filters, without extra GitHub requests.
16
+ Optional semantic Focus uses `--jev`, `TYPESAFE_API_KEY` and scoped consent;
17
+ `m` evaluates more loaded candidates. Model calls share a session cap and
18
+ four-second action deadline; results stay in memory. Live provider behavior,
19
+ semantic accuracy and developer benefit remain unqualified or unmeasured.
20
+ - Standalone `a` shows exact personal review, assignment and authored-PR
21
+ attention among loaded rows, with explicit 25-item detail batches, unknown
22
+ relationship coverage and refresh/retry controls. Optional `J` metadata
23
+ badges preserve deterministic membership/order; `x` revokes permission.
24
+
25
+ - Actions `d` opens exact run/attempt/job evidence in standalone mode; `l`
26
+ explicitly captures a bounded failed/timed-out job log. Enter opens the exact
27
+ selected job. Coverage and unsupported proxy/storage limitations are visible.
28
+ - Optional CI `J` previews sanitized bounded log text before every send, then
29
+ reports six independent observations with existing original-line evidence.
30
+ `e` selects a clean smaller range; `x` revokes permission and clears active
31
+ log/excerpt/results. Exact GitHub facts stay authoritative; live semantic
32
+ qualification and developer benefit remain unmeasured.
33
+
34
+ ### Changed
35
+
36
+ - Sutura's protected native-proof pilot records exact checkout evidence and
37
+ selects full native verification for repair proposals and authenticated exact
38
+ repair merges. Ordinary development checks and release publication authority
39
+ remain separate.
40
+ - Shared quota protocol 8 upgrades the same ledger path with a private exact
41
+ `.pre-v8.backup`. Restart all gh-glance panes with this version; keep the
42
+ shared quota ledger. Never clear, delete or downgrade it for a version
43
+ mismatch. A future protocol requires updating every pane. Preserve a
44
+ conflicting backup under an unused archival filename before retrying;
45
+ recovery help/doctor reports its exact path. An unverified native connection
46
+ keeps its charge until the ledger's computed uncertainty-window recovery.
47
+
48
+ ### Fixed
49
+
50
+ - Collector readiness now guarantees shutdown handlers are installed, so an
51
+ immediate stop closes the socket and lock cleanly.
52
+ - Attention refresh compares live and cached metadata consistently, so an
53
+ unchanged unknown PR review value cannot invalidate its source binding.
54
+ Real metadata changes still retire the prior view and require explicit restart.
55
+
56
+ ## [0.17.1] - 2026-10-26
57
+
58
+ ### Fixed
59
+
60
+ - A full debt-group journal no longer pins every pane of an account behind
61
+ "Local coordination accounting overflow". Quiescent groups now merge once the
62
+ journal is half full, after any active probe finishes or expires, so the
63
+ journal can free space for retiring a control receipt. Ledgers already wedged
64
+ in this state recover automatically after upgrading.
65
+ - Pasted or multi-character input such as `12` is ignored instead of being read
66
+ as a tab number. Single-digit tab keys are unchanged.
67
+ - Webhook events now match configured targets whose repository name differs in
68
+ case from the name GitHub sends, including access-removal events that fence
69
+ cached data. Ambiguity across hosts is still rejected.
70
+ - A collector view with an old snapshot shows `Stale` or `Cached` with its
71
+ source age. It shows `Disconnected`, still with that age, only when the
72
+ collector connection or its app authorization is lost.
73
+
74
+ ### Changed
75
+
76
+ - Updated React to 19.3.0 and refreshed existing tooling/action versions.
77
+ Patched the development-only brace-expansion and Zod vulnerabilities.
78
+ - README: Homebrew installation (`brew install juan294/tap/gh-glance`) is
79
+ documented, with a note to use one installation method.
80
+ - Development CI monitoring uses Sutura v0.4.0.
81
+ - A journal that is genuinely full of unsettled requests reports "Local
82
+ coordination journal is full" with an automatic retry instead of the hard
83
+ accounting-overflow notice.
84
+ - `gh-glance --doctor` reports debt-journal occupancy as `debt groups`, and
85
+ for a hard coordination failure, including a ledger that is missing or
86
+ unreadable, names the state file and the `repair`: quit every pane, move the
87
+ ledger, its recovery journal and `registry.json` aside, relaunch.
88
+
10
89
  ## [0.17.0] - 2026-10-25
11
90
 
12
91
  ### Added
@@ -1282,7 +1361,9 @@ engineering, security, QA and UX. What follows is what changed as a result.
1282
1361
  - The `main` field from `package.json`. It advertised the file as importable,
1283
1362
  but importing it took over the terminal or exited the host process.
1284
1363
 
1285
- [Unreleased]: https://github.com/juan294/gh-glance/compare/v0.17.0...HEAD
1364
+ [Unreleased]: https://github.com/juan294/gh-glance/compare/v0.18.0...HEAD
1365
+ [0.18.0]: https://github.com/juan294/gh-glance/compare/v0.17.1...v0.18.0
1366
+ [0.17.1]: https://github.com/juan294/gh-glance/compare/v0.17.0...v0.17.1
1286
1367
  [0.17.0]: https://github.com/juan294/gh-glance/compare/v0.16.2...v0.17.0
1287
1368
  [0.16.2]: https://github.com/juan294/gh-glance/compare/v0.16.1...v0.16.2
1288
1369
  [0.16.1]: https://github.com/juan294/gh-glance/compare/v0.16.0...v0.16.1
package/README.md CHANGED
@@ -69,6 +69,14 @@ current.
69
69
  - **Issues** -- open issues: title, author, first label, age
70
70
  - **Pull Requests** -- open PRs: title, author, branch, review status
71
71
  (approved / changes requested / pending), age
72
+ - **[Focus](#focus-loaded-work)** -- `/` searches loaded Issues and PRs locally;
73
+ optional `J` adds semantic matching after explicit consent
74
+ - **[Selected CI evidence](#selected-ci-evidence)** -- `d` opens exact run/job
75
+ facts and `l` loads a failed-job log in standalone mode; optional
76
+ [CI observations](#optional-ci-log-observations) cite original log lines
77
+ - **[Personal attention](#personal-attention)** -- `a` shows personal review,
78
+ assignment and authored-PR facts in standalone mode; optional metadata badges
79
+ leave the exact queue and order unchanged
72
80
  - **Security** -- open Dependabot, code-scanning, and secret-scanning alerts,
73
81
  sorted with the most severe first and with severity spelled out rather than
74
82
  carried by colour alone. Each source starts with its newest 100 open alerts.
@@ -121,10 +129,28 @@ current.
121
129
 
122
130
  ## Install
123
131
 
132
+ With Homebrew on macOS or Linux:
133
+
134
+ ```bash
135
+ brew install juan294/tap/gh-glance
136
+ ```
137
+
138
+ Future updates use your normal `brew upgrade`. The
139
+ [Homebrew tap](https://github.com/juan294/homebrew-tap) follows published npm
140
+ releases automatically and supplies its own Node runtime. If moving from npm,
141
+ remove existing npm copies first; the tap README includes migration commands.
142
+ Restart running dashboard panes after upgrading.
143
+
144
+ Alternatively, install with npm (Node.js 22 or newer):
145
+
124
146
  ```bash
125
147
  npm install -g gh-glance
126
148
  ```
127
149
 
150
+ Use one installation method. NVM keeps global npm packages separate for each
151
+ Node installation, so an npm update may not affect a copy launched from another
152
+ prefix.
153
+
128
154
  That is the whole install for the default standalone dashboard. `gh-glance`
129
155
  ships as a single `index.mjs` with no build step, so there is nothing to
130
156
  compile. The optional collector, SSH, webhook, and GitHub App modes use the
@@ -285,9 +311,16 @@ stdout isn't a terminal rather than streaming redraw frames into a pipe.
285
311
  | `R` | Resynchronize the current tab: one generation without validators, and the only key that clears a negative capability backoff. Still subject to the budget and the secondary cooldown. |
286
312
  | `s` | On Actions, request or reuse a read-only setup check (standalone only) |
287
313
  | `g` | On Actions, open the selected repository’s Actions page |
314
+ | `/` | Search loaded Issues or Pull requests with Focus |
315
+ | `d` | On Actions, inspect the selected run and jobs (standalone only) |
316
+ | `a` | Open personal attention for a verified human user (standalone only) |
317
+ | `J` | In Focus, a loaded CI log or attention, request optional Jev interpretation; requires `--jev`, an API key and scoped consent |
318
+ | `m` | In semantic Focus, evaluate more loaded candidates; in attention, request the next GitHub detail batch |
319
+ | `l` / `e` | In CI details, load the selected failed/timed-out job log / edit its excerpt range |
320
+ | `x` | Revoke the current scope's Jev permission and clear its semantic results; in CI, also clear the active log and excerpt |
288
321
  | `w` | Adjust table column widths |
289
322
  | `?` | Open or close contextual help; `n` / `p` moves through its pages |
290
- | `q` / `Esc` / `Ctrl+C` | Quit (`Esc` leaves width mode) |
323
+ | `q` / `Esc` / `Ctrl+C` | Quit from ordinary navigation; `Esc` leaves feature views, editors and width mode. While editing a query or range, `q` is text and `Ctrl+C` quits. |
291
324
 
292
325
  ### Adjusting column widths
293
326
 
@@ -364,6 +397,8 @@ pane definition. Flags are there when you want them:
364
397
  | `--refresh <seconds>` | Minimum automatic poll interval, 2-3600, default 5. A floor, never a ceiling: a tab whose content is unchanged twice in a row slows to 30 seconds (60 for Security), and Actions with a running or queued job is checked every 5. Safe shared grants can make any check later. |
365
398
  | `--tab <name>` | Start on `actions`, `issues`, `prs` or `security`. |
366
399
  | `--background <mode>` | `on-demand` (default): active Actions updates automatically; Issues, PRs and Security use cached data and check when opened or refreshed with `r`. Unopened tabs make no data requests. `all` continuously polls active and inactive tabs; `off` continuously polls only the selected tab. |
400
+ | `--jev` | Enable optional semantic Focus, CI observations and attention badges in an interactive standalone dashboard. Requires `TYPESAFE_API_KEY` and explicit scoped consent; startup and ordinary refresh send no model requests. |
401
+ | `--jev-max-requests <n>` | Set the per-process model-call cap, 1-10000 (default 100); requires `--jev`. |
367
402
  | `--verbose` | Log one line per dashboard `gh` call to stderr, with timing and outcome. Credential lookup and the account-identity proof are deliberately excluded, so that they cannot log anything derived from a token. stderr must be redirected: `gh-glance --verbose 2>gh-glance.log`. |
368
403
  | `--doctor` | Print a diagnostic report and exit. See [Diagnostics](#diagnostics). |
369
404
  | `--doctor --probe` | Add bounded, admitted GitHub capability probes to the local diagnostic report. |
@@ -590,6 +625,7 @@ Environment variables work too, and the flags take precedence:
590
625
 
591
626
  | Variable | Effect |
592
627
  |---|---|
628
+ | `TYPESAFE_API_KEY` | TypeSafe credential used only with `--jev` and explicit scoped consent. Removed from child-process environments; never saved in dashboard or collector state. |
593
629
  | `GH_REPO=[host/]owner/name` | Watch a specific repository instead of the current directory's. A qualified value supplies the host; an unqualified value means `github.com`. An explicit `--repo` wins. |
594
630
  | `GH_HOST=<host>` | When no explicit `--repo` overrides it, send every call and the account governor to a GitHub Enterprise or EMU host instead of `github.com`. |
595
631
  | `GH_TOKEN`, `GITHUB_TOKEN`, `GH_ENTERPRISE_TOKEN`, `GITHUB_ENTERPRISE_TOKEN` | Used by the default `gh` provider with `gh`'s host-specific precedence. gh-glance never logs or stores the raw values. One-way credential digests keep private rows access-partitioned; credentials GitHub verifies as the same principal share its quota ledger. App-provider children remove these variables before setting their memory-only installation token. |
@@ -765,11 +801,14 @@ and the lock path separately. A readable metadata file does not make an aged
765
801
  orphan lock or invalid snapshot healthy; plain doctor never repairs either.
766
802
  When one cached identity names the selected host, plain doctor also reads its
767
803
  quota ledger without changing it or contacting GitHub. It reports receipt and
768
- debt totals, observer age, the current recovery cause, and an actual retry time
769
- when one is known. If several cached identities match, it says the scope is
770
- unavailable instead of choosing an account. For a corrupt or unreadable quota
804
+ debt totals, debt-group occupancy (`debt groups`), observer age, the current
805
+ recovery cause, and an actual retry time when one is known. If several cached
806
+ identities match, it says the scope is unavailable instead of choosing an
807
+ account. For a corrupt or unreadable quota
771
808
  file, it names the coordination directory and a `quota-[redacted].json` file
772
- pattern with the cause. The private quota fingerprint stays out of reports.
809
+ pattern with the cause. For a hard coordination failure it also prints a
810
+ `repair` line with the manual steps. The private quota fingerprint stays out of
811
+ reports.
773
812
 
774
813
  Use `gh-glance --doctor --probe` when live capability evidence is needed. Probe
775
814
  mode uses an ephemeral governor lease and admits every quota-consuming endpoint
@@ -1123,7 +1162,8 @@ GH_GLANCE_ICONS=ascii gh-glance
1123
1162
  | `Upgrade waiting for legacy quota reset` | The older panes are gone, but left spend that cannot be proven settled. It waits for the affected rate-limit window to reset rather than assume the quota is free. This one has a deadline and clears itself. |
1124
1163
  | `Upgrade blocked: older spend cannot be settled or waited out` | Older spend has no reliable reset or child evidence. Verify old children ended and use `gh-glance --doctor` to inspect reserved units. An unidentifiable old child may require a verified system restart before a later observer can retire its charge. Keep the quota files as accounting evidence. |
1125
1164
  | `Coordination state unavailable; evidence preserved` | Coordination state could not be read and was deliberately not overwritten, so nothing is lost. Run `gh-glance --doctor` and check the config directory's permissions. |
1126
- | `Local coordination` corruption, overflow, full storage, or unsafe permissions | Run `gh-glance --doctor`; its read-only report gives the exact cause and redacted local file location when known. Repair storage or permissions, then let the app retry. Preserve corrupt and overflow evidence for diagnosis. |
1165
+ | `Local coordination journal is full` | Every slot for unsettled or recently settled requests is in use. The app retries by itself, and older requests settle after about an hour. Nothing needs repair. `gh-glance --doctor` shows the occupancy as `debt groups`. |
1166
+ | `Local coordination` corruption, overflow, full storage, or unsafe permissions | Run `gh-glance --doctor`; its read-only report gives the exact cause and redacted local file location when known. For a hard failure it also prints a `repair` line: quit every pane, move the state file, its `.recovery.json` and `registry.json` aside, then relaunch. Otherwise repair storage or permissions and let the app retry. Preserve corrupt and overflow evidence for diagnosis. |
1127
1167
  | `Saving request result` or `Recovering interrupted request` | The original request may have consumed quota. The app keeps its charge, retries settlement without repeating HTTP, and waits for safe observer evidence before retiring uncertain debt. |
1128
1168
  | `GitHub request limit` | A shared secondary hold preserves GitHub's retry deadline. Wait for the shown time; if the repeated-limit circuit explicitly asks, press `r` once to retry. Repeated refresh cannot bypass a hold. |
1129
1169
  | `Collector connection unavailable` or `GitHub App authorization unavailable` | Restore the selected collector connection or App authorization. The mode does not switch to independent requests. Cached rows remain labeled with their source age. |
@@ -1143,3 +1183,90 @@ See [SECURITY.md](./SECURITY.md).
1143
1183
  ## License
1144
1184
 
1145
1185
  [MIT](./LICENSE)
1186
+
1187
+ ### Focus loaded work
1188
+
1189
+ On Issues or Pull requests, press `/`, type a query, and press Enter. Focus searches loaded titles, available labels and PR branches locally. Exact filters are `#123`, `author:alice`, `branch:fix/session` (case sensitive), and `updated:>=2026-10-01`. Filters and topic words are combined. Prefixes and a single edit in words of five or more characters can match; no additional GitHub request is made. Counts and source age describe only loaded metadata. Press `/` to edit, Escape to cancel an edit or return to the ordinary list, and Enter on a selected result to open GitHub. While editing, `q` is text; Ctrl-C quits.
1190
+
1191
+ For optional semantic Focus, set `TYPESAFE_API_KEY` in your shell and start `gh-glance --jev` in an interactive standalone terminal. A key alone enables nothing. Press `J` on submitted Focus results, review the exact repository/access scope and metadata disclosure, then Enter to send or Escape to cancel. TypeSafe receives the topic, titles, available labels and PR branches; separate repository/account identity, author, body and URL fields are omitted. Query and metadata text remain literal supplied text. Public metadata also needs permission. `x` revokes that scope's permission, cancels work and clears its results. Permission and normalized results remain in memory for this session only.
1192
+
1193
+ Semantic Focus uses pinned `jev-1.14.0`, a four-second action deadline and at most 60 uncached eligible rows per explicit action. Exact filters still run locally, and all filter-eligible rows can be considered, including synonyms absent from local results. `m` evaluates the next loaded candidates. Coverage distinguishes matches, uncertain answers and unevaluated rows; all remain inspectable and Escape returns to the ordinary list. Filter-only queries send nothing. No automatic model requests or retries occur on startup, typing, polling or refresh. The session defaults to 100 dispatched calls; `--jev-max-requests 1..10000` changes that per-process cap. Errors, cooldowns and exhaustion retain local Focus and show the next explicit action. No account retention guarantee is implied. The live provider contract and semantic accuracy are not yet qualified.
1194
+
1195
+ ### Selected CI evidence
1196
+
1197
+ On Actions, select a run and press `d` to inspect its exact run ID, attempt,
1198
+ head SHA, jobs and step facts. Failed and timed-out jobs appear first. Up/Down
1199
+ selects a job; `l` explicitly captures a selected failed/timed-out job's plaintext
1200
+ log, and Enter opens
1201
+ that exact job on GitHub. Escape returns to ordinary Actions. This view is
1202
+ standalone only; connected collectors offer the selected run's browser link.
1203
+ Nothing is acquired for this feature during ordinary polling or idle time.
1204
+
1205
+ The view loads one page of at most 100 jobs and 100 steps per job, and displays
1206
+ loaded/total coverage. Metadata has a 2 MiB aggregate bound and 45-second total
1207
+ deadline. A selected log has a 1 MiB cumulative bound and 20-second total
1208
+ deadline: one admitted GitHub API GET and at most one credential-free HTTPS
1209
+ storage GET, with no automatic retries or pagination. Actions read permission
1210
+ is required. Unsupported proxies or storage redirects offer Open GitHub.
1211
+ Step metadata does not imply a step-to-log-line association. Log text stays in
1212
+ session memory and never enters dashboard/collector caches.
1213
+
1214
+ This version upgrades the shared quota protocol from 7 to 8 at the same ledger
1215
+ path. **Restart all gh-glance panes with this version; keep the shared quota
1216
+ ledger. Never clear, delete, downgrade or replace it to resolve a version
1217
+ mismatch.** Live old leases hold the upgrade until they close or expire. The
1218
+ upgrade saves an exact private `.pre-v8.backup` before its first write. A
1219
+ conflicting backup names its path in recovery help/doctor: preserve it under an
1220
+ unused archival filename before retrying. Storage failures refuse new admission.
1221
+ A future protocol requires updating and restarting every pane.
1222
+
1223
+ An unverified native connection closure retains its quota charge and displays
1224
+ the computed uncertainty-window deadline. Restarting a pane does not refund that
1225
+ charge. The ledger's existing verified closure/boot/window recovery rules apply;
1226
+ Open GitHub remains available while waiting.
1227
+
1228
+ ### Optional CI log observations
1229
+
1230
+ With `--jev` and `TYPESAFE_API_KEY`, press `J` after explicitly loading a selected failed/timed-out job log. Every send opens a TypeSafe preview of the exact sanitized state, even when this session already has permission or the answer is cached. PgUp/PgDn reviews the complete preview; Enter sends and Escape cancels without sending. Separate repository/account/run identity fields and step names stay local. Log text can still contain private or identifying content; redaction does not guarantee that it is secret-free.
1231
+
1232
+ Known credentials, authorization/cookie headers, private-key blocks and signed links are redacted locally and block cloud submission for the selected range. Press `e`, type an existing `start-end` line range, one line number, or `all`, and Enter to apply it. A clean smaller range can reach a new preview. While editing, `q` is text and Ctrl-C quits. Excerpts retain original line numbers, contain at most 40 spans/8 KiB, and disclose omitted or truncated lines. Source log capture and GitHub facts remain independent of inference.
1233
+
1234
+ The six independent observations are assertion mismatch, dependency-download failure, explicit permission denial, reported execution timeout, explicit memory exhaustion, and concrete static-check diagnostics. A positive observation must point to an existing span in this exact run/attempt/SHA/job/excerpt. These are reported log observations rather than proven root causes or generated fixes. “No listed observation found” applies only to this excerpt; uncertain or missing evidence does not mean healthy CI. GitHub's conclusion is always retained. Results are invalidated by source, account, job, log or range changes and expire after ten minutes.
1235
+
1236
+ `x` revokes this scope's Jev permission, cancels work and clears the active log/excerpt/results; press `l` to load a log again. Requests use the shared four-second deadline, call cap and bounded memory-only cache. Typing, refreshing, polling and opening a view never send model requests. Errors retain local evidence and show an explicit review/retry or smaller-range action. The live Jev contract, semantic accuracy and developer benefit remain unverified or unmeasured.
1237
+
1238
+ ### Personal attention
1239
+
1240
+ Press `a` in standalone mode to inspect direct review requests, assignments and
1241
+ viewer-authored PRs among the currently loaded Issues and PRs. The account must
1242
+ be a verified human GitHub user. Cached identities without a human proof offer
1243
+ `r` to verify `/user` explicitly; connected views and GitHub App installations
1244
+ explain how to use standalone user authentication.
1245
+
1246
+ Opening requests at most 25 details. `m` explicitly requests the next 25, up to
1247
+ 300 frozen candidates; it never drains the list automatically. `r` refreshes the
1248
+ first source page for Issues and PRs, rebuilds the manifest, and requests one
1249
+ batch. Empty/unloaded lists require that explicit action. Source coverage/age
1250
+ and each detail batch's age remain separate. Details expire after five minutes;
1251
+ changed source metadata or account scope requires an explicit refresh/restart.
1252
+ Errors retain prior same-scope facts as partial/as-of and show retry controls.
1253
+
1254
+ The fixed order is direct personal review requests, assigned Issues, changes
1255
+ requested on your non-draft PRs, assigned PRs, then other authored PRs under
1256
+ Following. Draft badges and all exact reasons remain visible. Within a tier,
1257
+ items use their update time, oldest first; this is not request age or an overdue
1258
+ claim. `u` inspects unknown/unqueried relationships. Truncated nested lists cannot
1259
+ prove absence; team review requests do not establish personal membership.
1260
+ PgUp/PgDn scroll disclosures, arrows select, Enter opens the original Issue/PR
1261
+ URL, and Escape returns to ordinary navigation.
1262
+
1263
+ With `--jev`, `J` optionally annotates current unchanged attention metadata with
1264
+ “Reports regression” and “Describes user impact.” Review the TypeSafe destination,
1265
+ exact repository/access scope and title/label/branch disclosure, then Enter Send
1266
+ or Escape Cancel. Badges cannot change queue membership, reasons, tier, order or
1267
+ navigation. Each explicit `J` covers at most 60 eligible rows, using at most 15
1268
+ rows per HTTP request and complete badge pairs packed within 24 KiB. Repeated
1269
+ `J` advances remaining rows; `m` remains GitHub detail pagination. `x` revokes
1270
+ permission and clears badges while retaining exact facts. The shared deadline,
1271
+ call cap, cooldown and memory limits apply. The live provider contract, badge
1272
+ accuracy and developer benefit remain unverified or unmeasured.