Skip to content

Commit 30a475f

Browse files
committed
chore: add script to update PR #36, comment/close issues, and comment on PR #32
One-shot script for the maintainer to run after `gh auth login`: - Updates PR #36 title/body with full description and test plan - Comments + closes issues #35 (7z exit code), #33 (i18n), #31 (Pro tier) - Comments on issue #28 (GNOME shortcuts — left open, upstream limitation) - Comments on PR #32 acknowledging incorporated changes https://claude.ai/code/session_01KEMH5ikQUhR7CBwnBod6J9
1 parent 62719dc commit 30a475f

1 file changed

Lines changed: 98 additions & 0 deletions

File tree

.github/pr-and-issues.sh

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#!/bin/bash
2+
#
3+
# Run this script after authenticating with `gh auth login` to:
4+
# 1. Update PR #36 with full title and description
5+
# 2. Comment on and close resolved issues (#35, #33, #31)
6+
# 3. Comment on issue #28 (leave open — upstream GNOME limitation)
7+
# 4. Comment on PR #32 (acknowledge + recommend close)
8+
#
9+
# Usage:
10+
# gh auth login
11+
# bash .github/pr-and-issues.sh
12+
13+
set -euo pipefail
14+
15+
REPO="johnzfitch/claude-cowork-linux"
16+
17+
echo "=== Step 1: Update PR #36 ==="
18+
gh pr edit 36 --repo "$REPO" \
19+
--title "fix: resolve issues #28, #33, #35; update #31; incorporate PR #32 improvements" \
20+
--body "$(cat <<'PRBODY'
21+
## Summary
22+
23+
Addresses multiple open issues and incorporates key improvements from PR #32:
24+
25+
- **#35**: Tolerate 7z exit codes 1-2 during DMG extraction (macOS `/Applications` symlink warning is non-fatal on Linux)
26+
- **#34**: Remove all hardcoded `/home/zack` developer paths — use `SCRIPT_DIR` and `os.homedir()` instead
27+
- **#33**: Always create `resources/i18n/` directory and validate i18n JSON files exist post-extraction with clear warning
28+
- **#31**: Update README subscription requirement from "Claude account" to "Claude Pro (or higher)"
29+
- **#28**: Add runtime GNOME Wayland warning for GlobalShortcuts portal limitation; update README compatibility notes
30+
- **PR #32**: Incorporate openSUSE zypper package fixes (`7zip`, `nodejs-default`, `npm`), Linuxbrew/mise/asdf binary resolution paths, and missing Swift stub methods (`api.setCredentials()`, `quickAccess.overlay.*`, `quickAccess.dictation.*`)
31+
32+
### Files changed (7)
33+
34+
| File | Changes |
35+
|------|---------|
36+
| `install.sh` | 7z exit code tolerance, i18n validation, openSUSE zypper packages |
37+
| `test-flow.sh` | Replace hardcoded `/home/zack` with `SCRIPT_DIR` |
38+
| `test-launch.sh` | GNOME Wayland GlobalShortcuts warning |
39+
| `cowork/sdk_bridge.js` | `os.homedir()` fallback, Linuxbrew/mise/asdf binary paths |
40+
| `stubs/@ant/claude-swift/js/index.js` | Linuxbrew/mise/asdf paths, `api.setCredentials()`, `quickAccess.overlay.*`, `quickAccess.dictation.*` stubs |
41+
| `README.md` | Pro tier, openSUSE "Tested", GNOME shortcuts clarity, `7zip` note |
42+
| `docs/extensions.md` | Replace `/home/zack` with `/home/user` in examples |
43+
44+
## Test plan
45+
46+
- [x] `bash -n install.sh` / `bash -n test-flow.sh` / `bash -n test-launch.sh` — all pass
47+
- [x] `node -c stubs/@ant/claude-swift/js/index.js` / `node -c cowork/sdk_bridge.js` / `node -c linux-loader.js` — all pass
48+
- [x] `grep -rn "/home/zack"` across all `.js`, `.sh`, `.md` files — zero matches
49+
- [x] Security scan: no secrets, no `eval()`, no string-form `exec()`, `redactForLogs()` in use
50+
- [x] Cross-distro package verification: Arch (`p7zip`), Ubuntu (`p7zip-full`), Fedora (`p7zip`), openSUSE (`7zip` + `nodejs-default` + `npm`), NixOS (`nixpkgs.p7zip`)
51+
- [x] Wayland detection: `ELECTRON_OZONE_PLATFORM_HINT=wayland` set correctly; GNOME substring match handles `ubuntu:GNOME`
52+
- [x] Binary resolution: Swift stub and sdk_bridge.js candidate lists now consistent (8 paths each)
53+
54+
Closes #33, closes #35. Updates #31, #28.
55+
PRBODY
56+
)"
57+
58+
echo "=== Step 2: Comment + close issue #35 (7z exit code) ==="
59+
gh issue comment 35 --repo "$REPO" --body "Fixed in PR #36. The installer now tolerates 7z exit codes 1 and 2 (the macOS \`/Applications\` symlink warning is non-fatal on Linux). Exit codes >2 still fail. A warning is logged when codes 1 or 2 are encountered.
60+
61+
See: install.sh lines 314-323."
62+
gh issue close 35 --repo "$REPO"
63+
64+
echo "=== Step 3: Comment + close issue #33 (i18n ENOENT) ==="
65+
gh issue comment 33 --repo "$REPO" --body "Fixed in PR #36. The installer now:
66+
- Always creates \`resources/i18n/\` before attempting to move JSON files
67+
- Validates that at least one i18n JSON file exists after extraction
68+
- Warns with a clear message if files are missing, suggesting a fresh DMG download
69+
70+
This ensures the \`ENOENT\` for \`resources/i18n/en-US.json\` won't silently occur."
71+
gh issue close 33 --repo "$REPO"
72+
73+
echo "=== Step 4: Comment + close issue #31 (Claude Pro tier) ==="
74+
gh issue comment 31 --repo "$REPO" --body "Updated in PR #36. The README now reads \"Claude Pro (or higher) subscription for Cowork access\" in the requirements section. Thanks for catching this!"
75+
gh issue close 31 --repo "$REPO"
76+
77+
echo "=== Step 5: Comment on issue #28 (GNOME shortcuts — leave open) ==="
78+
gh issue comment 28 --repo "$REPO" --body "PR #36 adds a runtime warning when GNOME+Wayland is detected, informing users to configure shortcuts via GNOME Settings. The README compatibility table has also been updated with clearer guidance.
79+
80+
The underlying limitation remains an upstream GNOME issue (xdg-desktop-portal-gnome doesn't implement the GlobalShortcuts portal). The \`--enable-features=GlobalShortcutsPortal\` flag is included for KDE/Hyprland where it works. Keeping this open to track upstream GNOME progress."
81+
82+
echo "=== Step 6: Comment on PR #32 (acknowledge + recommend close) ==="
83+
gh pr comment 32 --repo "$REPO" --body "Thank you @alpham8 for the thorough openSUSE testing and the confirm-before-quit work!
84+
85+
PR #36 incorporates several key changes from this PR:
86+
- **openSUSE zypper packages**: \`7zip\` + \`nodejs-default\` + \`npm\` (added npm explicitly as a safety measure)
87+
- **Linuxbrew/mise/asdf binary resolution**: Added all fallback paths to both the Swift stub and sdk_bridge.js
88+
- **openSUSE status**: Updated from \"Untested\" to \"Tested\" in the README
89+
- **Swift stub methods**: Added \`api.setCredentials()\`, \`quickAccess.overlay.*\`, and \`quickAccess.dictation.*\`
90+
91+
The confirm-before-quit dialog is a larger behavioral change that could be submitted separately. Recommending this PR be closed in favor of #36 for the incorporated changes, and a follow-up PR for the quit dialog if desired."
92+
93+
echo ""
94+
echo "=== Done ==="
95+
echo "PR #36 updated, issues #35/#33/#31 closed, #28 commented, PR #32 commented."
96+
echo "Issue #28 left open (upstream GNOME limitation)."
97+
echo "Issue #37 left open (separate feature request, not in scope)."
98+
echo "PR #32 left open for maintainer/author to close."

0 commit comments

Comments
 (0)