gh-glance 0.18.1 → 0.19.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 +40 -1
  2. package/README.md +79 -26
  3. package/index.mjs +937 -126
  4. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.19.1] - 2026-11-04
11
+
12
+ ### Changed
13
+
14
+ - The tab bar shows full section names whenever they fit the pane, instead of
15
+ switching to short names below a fixed 98 columns. With few counts, full
16
+ names now appear from about 85 columns.
17
+ - The short name of the Notifications tab is now `Status` (was `Notices`).
18
+
19
+ ## [0.19.0] - 2026-11-02
20
+
21
+ ### Added
22
+
23
+ - A fifth section, `5:Notifications` (`Notices` on narrow panes), keeps an
24
+ in-memory history of status events for the pane: automatic waits, failed
25
+ refreshes, Security source notes, refreshes and cleared causes, newest
26
+ first. It starts with earlier recovery transitions from the shared journal.
27
+ The tab shows an unread count, red for problems and causes that need action,
28
+ yellow for waits.
29
+ - Notifications reports GitHub's platform status from githubstatus.com:
30
+ incidents and outages for API Requests, Actions, Issues, Pull Requests, Git
31
+ Operations and Webhooks. It checks every 10 minutes, on opening the view, on
32
+ `r` in the view and when a tab starts failing, spends no GitHub API quota,
33
+ runs only for `github.com`, and is off with `GH_GLANCE_GITHUB_STATUS=off`.
34
+ An incident posted without a component is a problem only when its name
35
+ names something the dashboard shows; otherwise it is listed as information.
36
+
37
+ ### Changed
38
+
39
+ - Lines above a table now appear only for causes that need you to act, such
40
+ as `gh-glance --doctor` or `gh auth status`. Waits such as "GitHub budget
41
+ evidence is old", `Waiting to update`, `Checked HH:MM`, `cached` ages and the
42
+ Security "not enabled" notes moved to Notifications, so the table no longer
43
+ moves when they start or end.
44
+ - The tab bar fits five sections on one row: full names from about 98
45
+ columns, short names below that, digits with counts on narrow panes, and
46
+ bare digits (keeping the Notifications count) below about 30 columns.
47
+
10
48
  ## [0.18.1] - 2026-10-31
11
49
 
12
50
  ### Fixed
@@ -1392,7 +1430,8 @@ engineering, security, QA and UX. What follows is what changed as a result.
1392
1430
  - The `main` field from `package.json`. It advertised the file as importable,
1393
1431
  but importing it took over the terminal or exited the host process.
1394
1432
 
1395
- [Unreleased]: https://github.com/juan294/gh-glance/compare/v0.18.1...HEAD
1433
+ [Unreleased]: https://github.com/juan294/gh-glance/compare/v0.19.0...HEAD
1434
+ [0.19.0]: https://github.com/juan294/gh-glance/compare/v0.18.1...v0.19.0
1396
1435
  [0.18.1]: https://github.com/juan294/gh-glance/compare/v0.18.0...v0.18.1
1397
1436
  [0.18.0]: https://github.com/juan294/gh-glance/compare/v0.17.1...v0.18.0
1398
1437
  [0.17.1]: https://github.com/juan294/gh-glance/compare/v0.17.0...v0.17.1
package/README.md CHANGED
@@ -20,15 +20,15 @@ pane next to your editor) where you want an always-on glance at repo activity
20
20
  without switching to the browser.
21
21
 
22
22
  ```
23
- [1:Actions (4)] 2:Issues 3:PRs 4:Security
23
+ [1:Actions (4)] 2:Issues 3:PRs 4:Security 5:Status
24
24
  ───────────────────────────────────────────────────────────────────────────
25
25
  ╭─ Actions · owner/repo ──────────────────────────────────────────────────╮
26
26
  │ TITLE │WORKFLOW │BRANCH │TIME │UPDATED │
27
27
  │ ─────────────────────────────────────────────────────────────────────── │
28
- │ >+ ci: pin actions to com… #443 CI develop 1m20s 85d ago │
29
- │ x fix: restore the prima… #442 Code… develop 1m28s 85d ago │
30
- │ + chore: bump dependenci… #441 CI dependa…int-10 30s 85d ago │
31
- │ - docs: update the readme #440 CI develop 15s 86d ago │
28
+ │ >+ ci: pin actions to com… #443 CI develop 1m20s 93d ago │
29
+ │ x fix: restore the prima… #442 Code… develop 1m28s 93d ago │
30
+ │ + chore: bump dependenci… #441 CI dependa…int-10 30s 93d ago │
31
+ │ - docs: update the readme #440 CI develop 15s 94d ago │
32
32
  │ │
33
33
  │ │
34
34
  ╰──────────────────────────────────────────────────────────────── 4 of 4 ─╯
@@ -47,7 +47,9 @@ without switching to the browser.
47
47
  > red" is answerable without switching to that tab — an `x` means the tab's
48
48
  > latest fetch failed, and a `?` in place of the Security count means its
49
49
  > endpoints could not be read, which is not the same as there being nothing to
50
- > report.
50
+ > report. `5:Status` (`5:Notifications` when the full names fit) gains an
51
+ > unread count such as `(3)` when waits or problems arrive while it is closed;
52
+ > see [Notifications](#notifications).
51
53
 
52
54
  <!-- contract:allow-emoji -- the check/cross above stand in for Nerd Font
53
55
  Octicons the app actually draws; they are literal examples, not decoration. -->
@@ -86,7 +88,10 @@ current.
86
88
  set may still be incomplete. Code and secret scanning require GitHub Advanced
87
89
  Security -- see [Limitations](#limitations).
88
90
  - Tab bar with live counts, pinned to the top of the pane above a divider,
89
- switchable via `1`-`4`, arrow keys, or `Tab`/`Shift+Tab`
91
+ switchable via `1`-`5`, arrow keys, or `Tab`/`Shift+Tab`
92
+ - **[Notifications](#notifications)** -- `5` opens the pane's status history:
93
+ automatic waits, failed refreshes, Security source notes, cleared causes and
94
+ GitHub's own platform status. Only causes that need you stay above a table
90
95
  - Adjustable full-table columns, with visible header grips, a keyboard width
91
96
  mode, and preferences kept separately for each tab
92
97
  - `lazygit`-style panel frame: the tab name sits in the top border, the
@@ -302,7 +307,8 @@ stdout isn't a terminal rather than streaming redraw frames into a pipe.
302
307
  | Key | Action |
303
308
  |---|---|
304
309
  | `1` `2` `3` `4` | Jump to Actions / Issues / Pull Requests / Security |
305
- | `←` / `→` | Previous / next tab |
310
+ | `5` | Open Notifications, the pane's status history. `↑` / `↓` and `PgUp` / `PgDn` scroll it, `r` checks GitHub's status page, and `1`-`4` or `Esc` return to a section. |
311
+ | `←` / `→` | Previous / next tab (Notifications is the fifth position) |
306
312
  | `Tab` / `Shift+Tab` | Next / previous tab |
307
313
  | `↑` / `↓` or `j` / `k` | Move the cursor between rows |
308
314
  | `PgUp` / `PgDn` | Move a page at a time |
@@ -322,6 +328,47 @@ stdout isn't a terminal rather than streaming redraw frames into a pipe.
322
328
  | `?` | Open or close contextual help; `n` / `p` moves through its pages |
323
329
  | `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. |
324
330
 
331
+ ### Notifications
332
+
333
+ Lines above a table appear only when you must act: a local coordination store
334
+ that needs `gh-glance --doctor`, a lost GitHub login, an inaccessible
335
+ repository, or a repeated request limit that waits for `r`. Everything else
336
+ goes to the fifth section, `5:Notifications`: automatic waits (budget checks,
337
+ quota pacing, other panes), failed refreshes with their raw text, Security
338
+ sources that are not enabled or not available, refreshes, and the moment each
339
+ cause cleared. The table no longer moves when a wait starts or ends.
340
+
341
+ Events are listed newest first, with the time, a level glyph, the source and
342
+ the text; repeats are counted (`x12`), and an open wait shows its next retry.
343
+ History is in memory for the pane, starts with the earlier recovery
344
+ transitions from the shared journal (dimmed, `Earlier session`), and keeps the
345
+ latest 500 events.
346
+
347
+ The first row of the view is GitHub's own platform status, read from
348
+ `https://www.githubstatus.com/api/v2/summary.json` every 10 minutes (15 after
349
+ a failure), when you open the view, when you press `r` in it, and when a tab
350
+ starts failing (at most once a minute). It is a plain HTTPS request with a
351
+ validator, outside `gh` and the API governor, so it spends no GitHub API
352
+ quota. Incidents and outages that touch API Requests, Actions, Issues, Pull
353
+ Requests, Git Operations or Webhooks are problems: each keeps the badge red
354
+ until it resolves. About a third of GitHub's incidents are posted without a
355
+ component; those count as problems when the name names something the
356
+ dashboard shows (Actions, runners, requests, the API, Git, repositories,
357
+ Dependabot, code or secret scanning, or "GitHub services"), and are listed as
358
+ information otherwise, so a Copilot or billing incident never turns the badge
359
+ red. Incidents tagged only with other products are not listed. The check runs only
360
+ when the target host is `github.com` and is off with
361
+ `GH_GLANCE_GITHUB_STATUS=off` (see [Configuration](#configuration)). The
362
+ request uses Node's built-in `fetch`, which does not read `HTTPS_PROXY`; where
363
+ only a proxy reaches the internet the row reads "GitHub status unavailable",
364
+ and `GH_GLANCE_GITHUB_STATUS=off` turns it off.
365
+
366
+ The tab label shows how many waits and problems arrived since you last opened
367
+ the view, for example `5:Notifications (3)`: red when any is a problem or needs
368
+ action, yellow when all are waits. Routine refreshes never change the badge, so
369
+ an idle pane still redraws nothing. The status bar keeps its one-row state
370
+ (`Paused`, `Stale`, ...) as before.
371
+
325
372
  ### Adjusting column widths
326
373
 
327
374
  Press `w` to adjust the named fixed-width columns in the visible full table.
@@ -631,6 +678,7 @@ Environment variables work too, and the flags take precedence:
631
678
  | `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. |
632
679
  | `GH_CONFIG_DIR` | Selects `gh`'s account configuration and contributes its normalized identity to the cache and governor namespaces. Separate values can isolate simultaneous panes on different accounts; see [No account pinning](#limitations). |
633
680
  | `GH_GLANCE_REFRESH=<seconds>` | Minimum active-tab poll interval, 2-3600. Sets the floor for every pane in a shell; `--refresh` takes precedence. See [Rate limit](#rate-limit). |
681
+ | `GH_GLANCE_GITHUB_STATUS=off` | Turn off the GitHub platform status check in Notifications. An `http(s)` URL instead points it at another Statuspage `summary.json` endpoint. Any other value also turns it off and says so in the view. |
634
682
  | `GH_GLANCE_ICONS=unicode` | Unicode status glyphs and single-cell text substitutes for Nerd Font row icons |
635
683
  | `GH_GLANCE_ICONS=ascii` | ASCII-only status and row icons |
636
684
  | `GH_GLANCE_NO_ANIMATION=1` | Stop status and run-state motion. Semantic words such as Watching, Checking, and Paused still report what is happening. |
@@ -936,18 +984,20 @@ recurring polling interval. When another live local pane alone owns the lane
936
984
  ahead of this pane, the detail says `sharing N` instead. The detail is capped
937
985
  at `99m+`.
938
986
 
939
- When a refresh fails, the last successful rows stay visible below the live
940
- error instead of disappearing. If gh-glance is restarted while GitHub is still
941
- rate-limiting, it loads the saved rows for that same target immediately. Their
942
- age remains explicit through the `stale` label, and the rate-limit banner still
943
- describes the current failed request; cached data never turns a failure into a
944
- false success.
945
- After a sustained hold, the notice names the Core or GraphQL cause, the next
946
- automatic retry or required action, and the age of the last complete source
947
- observation. A successful budget check, cache load, or heartbeat cannot make
948
- old rows fresh. A validated unchanged `304` response does count as a new source
949
- observation. A Security check answered only from capability backoff sends no
950
- request and does not count. Unknown older spend remains charged until
987
+ When a refresh fails, the last successful rows stay visible instead of
988
+ disappearing. If gh-glance is restarted while GitHub is still rate-limiting, it
989
+ loads the saved rows for that same target immediately. Their age remains
990
+ explicit through the `stale` label, and the footer still reports the current
991
+ hold; cached data never turns a failure into a false success. A rate limit
992
+ retries automatically, so it does not take rows from the table: a sustained
993
+ hold is listed in [Notifications](#notifications) with its cause (Core,
994
+ GraphQL, or the tab that hit it) and next automatic retry, and the badge turns
995
+ yellow. Only a hold that needs you, such as a repeated limit that waits for
996
+ `r`, stays above the table with its action and the age of the last complete
997
+ source observation. A successful budget check, cache load, or heartbeat cannot
998
+ make old rows fresh. A validated unchanged `304` response does count as a new
999
+ source observation. A Security check answered only from capability backoff
1000
+ sends no request and does not count. Unknown older spend remains charged until
951
1001
  owner/child quiescence and a later matching observer establish safe retirement.
952
1002
  A verified new system boot can establish that boundary for otherwise
953
1003
  unidentifiable older children; the app does not assume a restart or reset alone
@@ -1056,9 +1106,12 @@ monitor makes no GitHub request or coordination write.
1056
1106
  - **Security tab**: code scanning and secret scanning alerts require [GitHub
1057
1107
  Advanced Security](https://docs.github.com/en/code-security/getting-started/github-security-features).
1058
1108
  On repos/plans without it, `gh-glance` doesn't crash or spam errors -- it
1059
- says so in a single collapsed line -- `Code scanning, Secret scanning: not
1060
- enabled here` -- and still displays whatever it *can* get (Dependabot alerts
1061
- work independently of GHAS). If your repo has GHAS enabled, those alerts just
1109
+ lists each disabled source, such as `Code scanning: not enabled (needs GitHub
1110
+ Advanced Security)`, in [Notifications](#notifications) instead of above the
1111
+ table (when no alerts are shown, the Security panel collapses them into one
1112
+ line such as `Code scanning, Secret scanning: not enabled here`), and still
1113
+ displays whatever it *can* get (Dependabot alerts work independently of
1114
+ GHAS). If your repo has GHAS enabled, those alerts just
1062
1115
  show up automatically -- no configuration needed.
1063
1116
 
1064
1117
  If the alert endpoints cannot be read at all -- an expired SAML session, a
@@ -1143,11 +1196,11 @@ GH_GLANCE_ICONS=ascii gh-glance
1143
1196
  | `GraphQL: Could not resolve to a Repository...` in older gh-glance versions | The response has the same ambiguity: a missing or renamed target, or a private repository not visible to the active account. Run `gh-glance --doctor --probe`. |
1144
1197
  | Actions says `not available for this repository` while Repository access is `ok` | The repository resolved, but that endpoint is unavailable; inspect the corresponding `--doctor --probe` block. |
1145
1198
  | Row icons are blank boxes | Your terminal font is not a Nerd Font. Use `GH_GLANCE_ICONS=unicode`. |
1146
- | Security tab shows a "not enabled" note | Code scanning and secret scanning need GitHub Advanced Security. Dependabot alerts work independently. The note now appears only when the feature genuinely is unavailable: auth, SSO and network failures show the real error instead. |
1199
+ | Notifications lists a Security "not enabled" note | Code scanning and secret scanning need GitHub Advanced Security. Dependabot alerts work independently. The note appears only when the feature genuinely is unavailable: auth, SSO and network failures show the real error instead. |
1147
1200
  | `none of the git remotes ... point to a known GitHub host` | `gh` is not authenticated for that host. Run `gh auth login --hostname <host>`. |
1148
1201
  | Security tab empty on an enterprise host in an older gh-glance version | Older versions could route alert endpoints separately. Current gh-glance routes every API call and the governor to one effective host; use `--repo host/owner/name`, `GH_HOST`, or a qualified `GH_REPO`, then confirm the resolved host with `--doctor`. |
1149
1202
  | Tabs start failing after working for a while | The enterprise SAML session lapsed. Re-authorize in the browser; the dashboard recovers within about 30 seconds. Run `gh-glance --doctor --probe` to confirm. |
1150
- | A tab's count is red | That tab's last fetch failed. The error itself is shown when you switch to it, translated into what to do about it where `gh-glance` recognises the failure. |
1203
+ | A tab's count is red | That tab's last fetch failed. The error is listed in Notifications (`5`); when it needs you (login, repository or endpoint access), it also stays above that tab's table, translated into what to do about it where `gh-glance` recognises the failure. |
1151
1204
  | Security tab shows `?` instead of a number | The alert endpoints could not be read at all -- an expired SAML session, a token without `security_events`, or an org OAuth restriction. `?` means "unknown", not "zero"; run `gh-glance --doctor --probe` to see which probe failed and how it was classified. |
1152
1205
  | `Watching` with `next 2m` | The active tab has a shared budget probe or safe grant scheduled. The interval names this grant only; it is not a recurring polling interval. Pressing `r` raises safe priority but cannot bypass the lane or reserve. |
1153
1206
  | `Shared` | This pane is using a generation acquired for matching local subscribers. This is coalescing, not quota scarcity. |
@@ -1155,7 +1208,7 @@ GH_GLANCE_ICONS=ascii gh-glance
1155
1208
  | `Paused` without a reset time | Budget or coordinator evidence is unknown, corrupt, locked, or unwritable. No data call is started. Run `gh-glance --doctor`; also check the config directory permissions and whether another live process owns its private lock. |
1156
1209
  | `--doctor` reports an acquisition lock as `orphaned` | A dead owner or an aged incomplete lock record was found. A running pane retries recovery through the private lock protocol; plain doctor only inspects it. If the state does not change, inspect the reported lock age and the config directory permissions. |
1157
1210
  | `--doctor` reports an acquisition lock as `busy` | A live or unconfirmed owner, or a recent incomplete lock record, is present. Keep the other pane running and check again after the reported age advances; plain doctor does not steal a lock. |
1158
- | Rows stay old while the footer shows a coordination reason | The rows remain last-known-good data. The reason persists until a valid shared snapshot or completed cleanup clears that acquisition failure; a healthy rate-budget probe alone does not prove that acquisition succeeded. The footer shows the source age and the notice line gives the longer reason. |
1211
+ | Rows stay old while the footer shows a coordination reason | The rows remain last-known-good data. The reason persists until a valid shared snapshot or completed cleanup clears that acquisition failure; a healthy rate-budget probe alone does not prove that acquisition succeeded. The footer shows the source age and Notifications (`5`) gives the longer reason. |
1159
1212
  | A failing tab seems to have stopped retrying | Recognized endpoint failures back off rather than re-spawning `gh` at the floor. Press `r` to request a higher-priority retry, or `R` to also clear the endpoint backoff; either way the retry waits for a safe grant, so the tab remains Watching or Paused. |
1160
1213
  | `unknown argument: -v` | `-v` used to mean `--version` and no longer does, because this CLI also has `--verbose`. Use `--version` or `--verbose` explicitly. |
1161
1214
  | Cached rows plus `Paused`, `Stale`, or `Disconnected` | The rows are last-known-good data while the live source is blocked, overdue, or unavailable. A cache read never advances source success. The footer never calls stale or disconnected rows `Watching`. |