gh-glance 0.4.0 → 0.4.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.
- package/CHANGELOG.md +21 -0
- package/README.md +4 -2
- package/index.mjs +30 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ All notable changes to this project are documented here.
|
|
|
5
5
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.1] - 2026-08-04
|
|
9
|
+
|
|
10
|
+
Two fixes to the interactive surface: a selection marker that outlived its
|
|
11
|
+
usefulness, and a key hint that named the wrong keys.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **The row cursor clears itself after 60s without movement.** Once you pressed
|
|
16
|
+
a movement key the selection marker stayed on screen until you quit, so a pane
|
|
17
|
+
left in the corner of a screen sat there marked at something you had stopped
|
|
18
|
+
caring about an hour ago. Any movement key rearms the timer; expiry clears the
|
|
19
|
+
cursor on every tab, not just the visible one.
|
|
20
|
+
- **The `Move` hint in the status bar reads `↑↓` rather than `jk`.** The hints
|
|
21
|
+
are otherwise strictly width-1 ASCII, because East-Asian-Ambiguous glyphs
|
|
22
|
+
measure as two columns in ink's width model and overflowed an 80-column
|
|
23
|
+
terminal once before. The arrow pair is a deliberate exception: the pty suite
|
|
24
|
+
asserts the rendered frame stays inside the terminal width, so a font that
|
|
25
|
+
renders them double-width fails there loudly instead of shifting columns
|
|
26
|
+
silently.
|
|
27
|
+
|
|
8
28
|
## [0.4.0] - 2026-08-04
|
|
9
29
|
|
|
10
30
|
Correctness on GitHub Enterprise and Enterprise Managed Users tenants, and a
|
|
@@ -309,6 +329,7 @@ engineering, security, QA and UX. What follows is what changed as a result.
|
|
|
309
329
|
- The `main` field from `package.json`. It advertised the file as importable,
|
|
310
330
|
but importing it took over the terminal or exited the host process.
|
|
311
331
|
|
|
332
|
+
[0.4.1]: https://github.com/juan294/gh-glance/releases/tag/v0.4.1
|
|
312
333
|
[0.4.0]: https://github.com/juan294/gh-glance/releases/tag/v0.4.0
|
|
313
334
|
[0.3.1]: https://github.com/juan294/gh-glance/releases/tag/v0.3.1
|
|
314
335
|
[0.3.0]: https://github.com/juan294/gh-glance/releases/tag/v0.3.0
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ without switching to the browser.
|
|
|
30
30
|
│ │
|
|
31
31
|
│ │
|
|
32
32
|
╰───────────────────────────────────────────────────────────────── 4 of 4 ─╯
|
|
33
|
-
⣾ Fetching
|
|
33
|
+
⣾ Fetching Move: ↑↓ | Open: Ent | Refresh: r | Quit: q
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
> Captured from a real run at 76 columns with `GH_GLANCE_ICONS=unicode`, so the
|
|
@@ -191,7 +191,9 @@ stdout isn't a terminal rather than streaming redraw frames into a pipe.
|
|
|
191
191
|
|
|
192
192
|
The cursor tracks the *item*, not the row position, so it stays on what you
|
|
193
193
|
selected as new rows arrive above it. `Enter` works on Actions, Issues and Pull
|
|
194
|
-
Requests; the Security tab has no per-alert `gh` command to open.
|
|
194
|
+
Requests; the Security tab has no per-alert `gh` command to open. It clears
|
|
195
|
+
itself after 60s with no cursor movement, so a pane left idle in the corner of
|
|
196
|
+
a screen doesn't sit there marked forever.
|
|
195
197
|
|
|
196
198
|
If `gh-glance` is started without an interactive stdin (for example with stdin
|
|
197
199
|
redirected), the key handlers cannot run and the status bar shows only `Quit: ^C`
|
package/index.mjs
CHANGED
|
@@ -47,6 +47,12 @@ const IS_MAIN = detectMainModule();
|
|
|
47
47
|
|
|
48
48
|
const REFRESH_MS = 5000;
|
|
49
49
|
|
|
50
|
+
// The row cursor otherwise persists forever once you touch a movement key --
|
|
51
|
+
// useful while you're actually scanning a list, noise once you've moved on and
|
|
52
|
+
// left the pane running in a corner of the screen. 60s idle (measured from the
|
|
53
|
+
// last movement, not from tab switches or Enter) quietly drops it.
|
|
54
|
+
const SELECTION_IDLE_MS = 60_000;
|
|
55
|
+
|
|
50
56
|
// `gh run list` costs roughly linearly in --limit (measured: ~1.2s at 20 runs,
|
|
51
57
|
// ~3.0s at 100, ~4.9s at 150), so asking for a fixed 150 to render ~35 visible
|
|
52
58
|
// rows was paying several seconds per refresh for rows nobody sees. Actions is
|
|
@@ -1159,6 +1165,8 @@ Keys:
|
|
|
1159
1165
|
r Refresh the current tab now
|
|
1160
1166
|
q / Esc / Ctrl+C Quit
|
|
1161
1167
|
|
|
1168
|
+
The cursor clears itself after 60s with no movement.
|
|
1169
|
+
|
|
1162
1170
|
Environment:
|
|
1163
1171
|
GH_REPO=owner/name Watch a specific repository (--repo takes precedence)
|
|
1164
1172
|
GH_HOST=host GitHub Enterprise or EMU host to send every call to.
|
|
@@ -1792,18 +1800,22 @@ function TabBar({ activeIndex, counts, firstLoad, failed, spin, useShort }) {
|
|
|
1792
1800
|
|
|
1793
1801
|
// ---------- Status bar ----------
|
|
1794
1802
|
|
|
1795
|
-
// Every glyph here is width-1 ASCII, deliberately
|
|
1796
|
-
// symbol and the box-drawing separator are
|
|
1797
|
-
//
|
|
1798
|
-
//
|
|
1799
|
-
//
|
|
1800
|
-
// narrow ASCII
|
|
1803
|
+
// Every glyph here is width-1 ASCII, deliberately, with one exception: the
|
|
1804
|
+
// Move arrows. The return symbol and the box-drawing separator are still
|
|
1805
|
+
// East-Asian-Ambiguous and stay out for that reason -- ink measures them as
|
|
1806
|
+
// two columns in its width model, and a status bar built from them overflowed
|
|
1807
|
+
// an 80-column terminal by six columns once selection added a hint. Same trap
|
|
1808
|
+
// the unicode icon table already documents -- prefer strictly narrow ASCII
|
|
1809
|
+
// over pretty-but-ambiguous. The arrow pair is a deliberate, tested exception:
|
|
1810
|
+
// `npm run test:pty` asserts the rendered frame stays within the terminal
|
|
1811
|
+
// width, so a font/terminal combo that renders them double-width fails loudly
|
|
1812
|
+
// there instead of silently shifting columns.
|
|
1801
1813
|
//
|
|
1802
1814
|
// Tab switching is not listed: the tab bar already renders "1:Actions", so the
|
|
1803
1815
|
// digits document themselves, and the arrow keys are in --help. The hints that
|
|
1804
1816
|
// survive are the ones nothing else on screen reveals.
|
|
1805
1817
|
const KEY_HINTS = [
|
|
1806
|
-
{ label: "Move", keys: "
|
|
1818
|
+
{ label: "Move", keys: "↑↓" },
|
|
1807
1819
|
{ label: "Open", keys: "Ent" },
|
|
1808
1820
|
{ label: "Refresh", keys: "r" },
|
|
1809
1821
|
{ label: "Quit", keys: "q" },
|
|
@@ -2010,6 +2022,17 @@ function App() {
|
|
|
2010
2022
|
});
|
|
2011
2023
|
}
|
|
2012
2024
|
|
|
2025
|
+
// Rearms on every call to moveSelection (it's the only thing that changes
|
|
2026
|
+
// `selected`), so this fires exactly 60s after the *last* movement -- tab
|
|
2027
|
+
// switches and Enter don't count as activity and don't push it back. Clears
|
|
2028
|
+
// every tab's cursor at once rather than just the visible one, so a tab you
|
|
2029
|
+
// switch back to after being idle doesn't still show a stale row marked.
|
|
2030
|
+
useEffect(() => {
|
|
2031
|
+
if (Object.keys(selected).length === 0) return;
|
|
2032
|
+
const timer = setTimeout(() => setSelected({}), SELECTION_IDLE_MS);
|
|
2033
|
+
return () => clearTimeout(timer);
|
|
2034
|
+
}, [selected]);
|
|
2035
|
+
|
|
2013
2036
|
function openSelected() {
|
|
2014
2037
|
const { items, key: currentKey, tabKey } = navRef.current;
|
|
2015
2038
|
const item = items.find((i) => itemKey(i) === currentKey);
|
package/package.json
CHANGED