gh-glance 0.17.1 → 0.18.1

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 +80 -1
  2. package/README.md +122 -14
  3. package/index.mjs +2057 -141
  4. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,83 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.18.1] - 2026-10-31
11
+
12
+ ### Fixed
13
+
14
+ - A collector that serves several repositories through one provider gives each
15
+ target its own immutable request scope, so one repository's rows can no
16
+ longer be fetched or published under another (#163). Security capability
17
+ backoff is now scoped by host and repository, so one repository's disabled
18
+ feature no longer hides another's alerts or resets its backoff ladder (#165).
19
+ - A secondary rate limit no longer blocks a resource until the hourly primary
20
+ reset; it stays under the shared transport cooldown (#164). A transport paused
21
+ after repeated throttles now recovers on `r` or after the primary reset, and
22
+ recovery never shortens a server-supplied Retry-After (#164).
23
+ - A GraphQL observer claim no longer delays core-only work, and the reverse
24
+ (#169). Governor waits that change nothing no longer rewrite the ledger (#174).
25
+ - Collector Issues and PR results compare as unchanged when their rows are the
26
+ same, so quiet queries reach the quiet cadence instead of polling at the
27
+ floor (#166). Adopting a peer's snapshot updates the local unchanged sentinel
28
+ (#167).
29
+ - A Security batch that only replayed capability backoff no longer advances the
30
+ success time or completes webhook refresh work (#168).
31
+ - A same-epoch collector reconnect shows Connected again without waiting for a
32
+ newer generation (#170), and followers no longer re-send unchanged snapshots
33
+ (#173).
34
+ - The Actions clock advances in collector mode, and collector source age counts
35
+ time spent suspended (#171).
36
+ - The inferred display cache is keyed by the repository resolved from the
37
+ remote, so a changed remote in the same directory no longer restores another
38
+ repository's rows (#172). Existing directory-only cache entries start cold
39
+ once.
40
+
41
+ ## [0.18.0] - 2026-10-29
42
+
43
+ ### Added
44
+
45
+ - Local Focus searches loaded Issues and PRs with `/`, topic words and exact
46
+ number, author, branch and updated-date filters, without extra GitHub requests.
47
+ Optional semantic Focus uses `--jev`, `TYPESAFE_API_KEY` and scoped consent;
48
+ `m` evaluates more loaded candidates. Model calls share a session cap and
49
+ four-second action deadline; results stay in memory. Live provider behavior,
50
+ semantic accuracy and developer benefit remain unqualified or unmeasured.
51
+ - Standalone `a` shows exact personal review, assignment and authored-PR
52
+ attention among loaded rows, with explicit 25-item detail batches, unknown
53
+ relationship coverage and refresh/retry controls. Optional `J` metadata
54
+ badges preserve deterministic membership/order; `x` revokes permission.
55
+
56
+ - Actions `d` opens exact run/attempt/job evidence in standalone mode; `l`
57
+ explicitly captures a bounded failed/timed-out job log. Enter opens the exact
58
+ selected job. Coverage and unsupported proxy/storage limitations are visible.
59
+ - Optional CI `J` previews sanitized bounded log text before every send, then
60
+ reports six independent observations with existing original-line evidence.
61
+ `e` selects a clean smaller range; `x` revokes permission and clears active
62
+ log/excerpt/results. Exact GitHub facts stay authoritative; live semantic
63
+ qualification and developer benefit remain unmeasured.
64
+
65
+ ### Changed
66
+
67
+ - Sutura's protected native-proof pilot records exact checkout evidence and
68
+ selects full native verification for repair proposals and authenticated exact
69
+ repair merges. Ordinary development checks and release publication authority
70
+ remain separate.
71
+ - Shared quota protocol 8 upgrades the same ledger path with a private exact
72
+ `.pre-v8.backup`. Restart all gh-glance panes with this version; keep the
73
+ shared quota ledger. Never clear, delete or downgrade it for a version
74
+ mismatch. A future protocol requires updating every pane. Preserve a
75
+ conflicting backup under an unused archival filename before retrying;
76
+ recovery help/doctor reports its exact path. An unverified native connection
77
+ keeps its charge until the ledger's computed uncertainty-window recovery.
78
+
79
+ ### Fixed
80
+
81
+ - Collector readiness now guarantees shutdown handlers are installed, so an
82
+ immediate stop closes the socket and lock cleanly.
83
+ - Attention refresh compares live and cached metadata consistently, so an
84
+ unchanged unknown PR review value cannot invalidate its source binding.
85
+ Real metadata changes still retire the prior view and require explicit restart.
86
+
10
87
  ## [0.17.1] - 2026-10-26
11
88
 
12
89
  ### Fixed
@@ -1315,7 +1392,9 @@ engineering, security, QA and UX. What follows is what changed as a result.
1315
1392
  - The `main` field from `package.json`. It advertised the file as importable,
1316
1393
  but importing it took over the terminal or exited the host process.
1317
1394
 
1318
- [Unreleased]: https://github.com/juan294/gh-glance/compare/v0.17.1...HEAD
1395
+ [Unreleased]: https://github.com/juan294/gh-glance/compare/v0.18.1...HEAD
1396
+ [0.18.1]: https://github.com/juan294/gh-glance/compare/v0.18.0...v0.18.1
1397
+ [0.18.0]: https://github.com/juan294/gh-glance/compare/v0.17.1...v0.18.0
1319
1398
  [0.17.1]: https://github.com/juan294/gh-glance/compare/v0.17.0...v0.17.1
1320
1399
  [0.17.0]: https://github.com/juan294/gh-glance/compare/v0.16.2...v0.17.0
1321
1400
  [0.16.2]: https://github.com/juan294/gh-glance/compare/v0.16.1...v0.16.2
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.
@@ -303,9 +311,16 @@ stdout isn't a terminal rather than streaming redraw frames into a pipe.
303
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. |
304
312
  | `s` | On Actions, request or reuse a read-only setup check (standalone only) |
305
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 |
306
321
  | `w` | Adjust table column widths |
307
322
  | `?` | Open or close contextual help; `n` / `p` moves through its pages |
308
- | `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. |
309
324
 
310
325
  ### Adjusting column widths
311
326
 
@@ -382,6 +397,8 @@ pane definition. Flags are there when you want them:
382
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. |
383
398
  | `--tab <name>` | Start on `actions`, `issues`, `prs` or `security`. |
384
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`. |
385
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`. |
386
403
  | `--doctor` | Print a diagnostic report and exit. See [Diagnostics](#diagnostics). |
387
404
  | `--doctor --probe` | Add bounded, admitted GitHub capability probes to the local diagnostic report. |
@@ -608,6 +625,7 @@ Environment variables work too, and the flags take precedence:
608
625
 
609
626
  | Variable | Effect |
610
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. |
611
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. |
612
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`. |
613
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. |
@@ -655,14 +673,15 @@ $XDG_CONFIG_HOME/gh-glance/dashboard-cache.json
655
673
  ```
656
674
 
657
675
  The cache is scoped to the repository, host, provider, and effective access
658
- partition. In inferred standalone mode, the host and current working directory
659
- also form the identity, so rows from one checkout or credential context cannot
660
- appear in another. Human-provider access includes one-way digests of the
661
- selected credential and its authorization generation; App-provider access also
662
- binds the configured repository and permission restrictions. Raw credentials
663
- are never stored. It retains at most 32 recent targets and 60 rows per tab; a
664
- shortened cached tab keeps its `+` marker rather than presenting the saved count
665
- as exact.
676
+ partition. In inferred standalone mode, the host, the current working directory
677
+ and the repository resolved offline from its git remote form the identity, so
678
+ rows from one checkout, remote or credential context cannot appear in another.
679
+ A directory whose remote now names a different repository starts cold.
680
+ Human-provider access includes one-way digests of the selected credential and
681
+ its authorization generation; App-provider access also binds the configured
682
+ repository and permission restrictions. Raw credentials are never stored. It
683
+ retains at most 32 recent targets and 60 rows per tab; a shortened cached tab
684
+ keeps its `+` marker rather than presenting the saved count as exact.
666
685
 
667
686
  Only successfully parsed, non-blind observations replace saved rows. A failed
668
687
  request can add a live error or `?` marker, but it cannot turn known Security
@@ -927,10 +946,12 @@ After a sustained hold, the notice names the Core or GraphQL cause, the next
927
946
  automatic retry or required action, and the age of the last complete source
928
947
  observation. A successful budget check, cache load, or heartbeat cannot make
929
948
  old rows fresh. A validated unchanged `304` response does count as a new source
930
- observation. Unknown older spend remains charged until owner/child quiescence
931
- and a later matching observer establish safe retirement. A verified new system
932
- boot can establish that boundary for otherwise unidentifiable older children;
933
- the app does not assume a restart or reset alone refunded the charge.
949
+ observation. A Security check answered only from capability backoff sends no
950
+ request and does not count. Unknown older spend remains charged until
951
+ owner/child quiescence and a later matching observer establish safe retirement.
952
+ A verified new system boot can establish that boundary for otherwise
953
+ unidentifiable older children; the app does not assume a restart or reset alone
954
+ refunded the charge.
934
955
 
935
956
  The enforceable boundary is admission from fresh, conservatively debited
936
957
  evidence. Another program can spend after the probe, and standalone panes in a
@@ -1147,7 +1168,7 @@ GH_GLANCE_ICONS=ascii gh-glance
1147
1168
  | `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`. |
1148
1169
  | `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. |
1149
1170
  | `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. |
1150
- | `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. |
1171
+ | `GitHub request limit` | A shared secondary hold preserves GitHub's retry deadline and does not block the resource until the hourly reset. Wait for the shown time. After repeated limits the transport pauses: press `r` (or `R`) once to resume it, or wait for the primary reset, after which one pane resumes it. Resuming never shortens GitHub's retry deadline, and repeated refresh cannot bypass a hold. |
1151
1172
  | `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. |
1152
1173
  | `Shared HTTP request or cooldown in progress` | Panes share up to three admitted requests per host, FIFO starts with at least 250 ms spacing, and one cooldown. The pool is full, a queued request is ahead, or a server-sent `Retry-After` is still running. Normal pacing, not an error. |
1153
1174
  | `Verified identity unavailable; waiting to retry` | The account behind your credential has not been confirmed yet -- not signed in, a denied or malformed proof, or a slow credential helper. Check `gh auth status`. Retries are rate-limited, so this clears on its own rather than immediately. |
@@ -1165,3 +1186,90 @@ See [SECURITY.md](./SECURITY.md).
1165
1186
  ## License
1166
1187
 
1167
1188
  [MIT](./LICENSE)
1189
+
1190
+ ### Focus loaded work
1191
+
1192
+ 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.
1193
+
1194
+ 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.
1195
+
1196
+ 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.
1197
+
1198
+ ### Selected CI evidence
1199
+
1200
+ On Actions, select a run and press `d` to inspect its exact run ID, attempt,
1201
+ head SHA, jobs and step facts. Failed and timed-out jobs appear first. Up/Down
1202
+ selects a job; `l` explicitly captures a selected failed/timed-out job's plaintext
1203
+ log, and Enter opens
1204
+ that exact job on GitHub. Escape returns to ordinary Actions. This view is
1205
+ standalone only; connected collectors offer the selected run's browser link.
1206
+ Nothing is acquired for this feature during ordinary polling or idle time.
1207
+
1208
+ The view loads one page of at most 100 jobs and 100 steps per job, and displays
1209
+ loaded/total coverage. Metadata has a 2 MiB aggregate bound and 45-second total
1210
+ deadline. A selected log has a 1 MiB cumulative bound and 20-second total
1211
+ deadline: one admitted GitHub API GET and at most one credential-free HTTPS
1212
+ storage GET, with no automatic retries or pagination. Actions read permission
1213
+ is required. Unsupported proxies or storage redirects offer Open GitHub.
1214
+ Step metadata does not imply a step-to-log-line association. Log text stays in
1215
+ session memory and never enters dashboard/collector caches.
1216
+
1217
+ This version upgrades the shared quota protocol from 7 to 8 at the same ledger
1218
+ path. **Restart all gh-glance panes with this version; keep the shared quota
1219
+ ledger. Never clear, delete, downgrade or replace it to resolve a version
1220
+ mismatch.** Live old leases hold the upgrade until they close or expire. The
1221
+ upgrade saves an exact private `.pre-v8.backup` before its first write. A
1222
+ conflicting backup names its path in recovery help/doctor: preserve it under an
1223
+ unused archival filename before retrying. Storage failures refuse new admission.
1224
+ A future protocol requires updating and restarting every pane.
1225
+
1226
+ An unverified native connection closure retains its quota charge and displays
1227
+ the computed uncertainty-window deadline. Restarting a pane does not refund that
1228
+ charge. The ledger's existing verified closure/boot/window recovery rules apply;
1229
+ Open GitHub remains available while waiting.
1230
+
1231
+ ### Optional CI log observations
1232
+
1233
+ 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.
1234
+
1235
+ 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.
1236
+
1237
+ 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.
1238
+
1239
+ `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.
1240
+
1241
+ ### Personal attention
1242
+
1243
+ Press `a` in standalone mode to inspect direct review requests, assignments and
1244
+ viewer-authored PRs among the currently loaded Issues and PRs. The account must
1245
+ be a verified human GitHub user. Cached identities without a human proof offer
1246
+ `r` to verify `/user` explicitly; connected views and GitHub App installations
1247
+ explain how to use standalone user authentication.
1248
+
1249
+ Opening requests at most 25 details. `m` explicitly requests the next 25, up to
1250
+ 300 frozen candidates; it never drains the list automatically. `r` refreshes the
1251
+ first source page for Issues and PRs, rebuilds the manifest, and requests one
1252
+ batch. Empty/unloaded lists require that explicit action. Source coverage/age
1253
+ and each detail batch's age remain separate. Details expire after five minutes;
1254
+ changed source metadata or account scope requires an explicit refresh/restart.
1255
+ Errors retain prior same-scope facts as partial/as-of and show retry controls.
1256
+
1257
+ The fixed order is direct personal review requests, assigned Issues, changes
1258
+ requested on your non-draft PRs, assigned PRs, then other authored PRs under
1259
+ Following. Draft badges and all exact reasons remain visible. Within a tier,
1260
+ items use their update time, oldest first; this is not request age or an overdue
1261
+ claim. `u` inspects unknown/unqueried relationships. Truncated nested lists cannot
1262
+ prove absence; team review requests do not establish personal membership.
1263
+ PgUp/PgDn scroll disclosures, arrows select, Enter opens the original Issue/PR
1264
+ URL, and Escape returns to ordinary navigation.
1265
+
1266
+ With `--jev`, `J` optionally annotates current unchanged attention metadata with
1267
+ “Reports regression” and “Describes user impact.” Review the TypeSafe destination,
1268
+ exact repository/access scope and title/label/branch disclosure, then Enter Send
1269
+ or Escape Cancel. Badges cannot change queue membership, reasons, tier, order or
1270
+ navigation. Each explicit `J` covers at most 60 eligible rows, using at most 15
1271
+ rows per HTTP request and complete badge pairs packed within 24 KiB. Repeated
1272
+ `J` advances remaining rows; `m` remains GitHub detail pagination. `x` revokes
1273
+ permission and clears badges while retaining exact facts. The shared deadline,
1274
+ call cap, cooldown and memory limits apply. The live provider contract, badge
1275
+ accuracy and developer benefit remain unverified or unmeasured.