|
1 | | -# Session Handoff: Dotfiles EDITOR/PATH Fix for Issue maxrantil/vm-infra#115 |
| 1 | +# Session Handoff: VM Issues - Gruvbox, Starship, Browser Fixes |
2 | 2 |
|
3 | 3 | **Date**: 2025-11-17 |
4 | | -**Issue**: maxrantil/vm-infra#115 - Missing EDITOR/VISUAL/PATH in .zshenv breaks aliases |
5 | | -**PR**: maxrantil/dotfiles#73 |
6 | | -**Branch**: fix/issue-115-editor-path-zshenv |
| 4 | +**PR**: maxrantil/dotfiles#74 |
| 5 | +**Branch**: fix/vm-issues-gruvbox-starship-browser |
7 | 6 |
|
8 | 7 | ## ✅ Completed Work |
9 | 8 |
|
10 | | -### Issue Discovery |
11 | | -- User reported `v` alias not working in VM SSH sessions |
12 | | -- Investigation revealed `EDITOR` variable was empty |
13 | | -- Root cause: PR #72 moved `ZDOTDIR` to `.zshenv` but missed `EDITOR`, `VISUAL`, `BROWSER`, and `PATH` |
| 9 | +### Issues Fixed |
| 10 | +1. **Gruvbox colorscheme error in VMs**: Disabled gruvbox for minimal VM setup |
| 11 | +2. **Starship git_status warnings**: Fixed format string syntax |
| 12 | +3. **BROWSER not found for gh CLI**: Auto-detect available browser |
14 | 13 |
|
15 | 14 | ### Changes Implemented |
16 | | -1. **Moved to `.zshenv`**: |
17 | | - - `EDITOR="nvim"` (needed for aliases like `v=$EDITOR`, `e=$EDITOR`) |
18 | | - - `VISUAL="nvim"` |
19 | | - - `BROWSER="firefox"` |
20 | | - - `PATH="$HOME/.local/bin:$PATH"` (needed to find user scripts) |
21 | | - |
22 | | -2. **Updated `.zprofile`**: |
23 | | - - Added shellcheck directive |
24 | | - - Fixed SC2155 warnings (separate declare/export for command substitutions) |
25 | | - - Added explanatory comment about variable locations |
26 | | - - Kept less critical variables (LESSHISTFILE, CARGO_HOME, GOPATH, etc.) |
| 15 | +1. **init.vim**: |
| 16 | + - Commented out gruvbox plugin line |
| 17 | + - Removed gruvbox configuration |
| 18 | + - Added comment explaining it's disabled for minimal VM setup |
| 19 | + |
| 20 | +2. **starship.toml**: |
| 21 | + - Fixed format strings to consistently use `${count}` placeholder |
| 22 | + - Updated conflicted, stashed, renamed indicators |
| 23 | + |
| 24 | +3. **.zshenv**: |
| 25 | + - Changed from hardcoded `BROWSER="firefox"` |
| 26 | + - Now auto-detects: chromium-browser > firefox > chromium > xdg-open |
| 27 | + - Prioritizes chromium-browser for VM usage |
27 | 28 |
|
28 | 29 | ### Testing Results |
29 | | -✅ Verified in VM via SSH (non-login shell): |
30 | | -- `EDITOR=nvim` (set correctly) |
31 | | -- `v is an alias for nvim` (alias expands correctly) |
32 | | -- `e is an alias for nvim` (alias expands correctly) |
33 | | -- `v --version` opens nvim successfully |
34 | | -✅ All pre-commit hooks passing |
35 | | -✅ Shellcheck warnings fixed |
36 | | -✅ PR created and pushed to GitHub |
| 30 | +✅ init.vim: No errors when opening vim |
| 31 | +✅ starship: No warnings in git directories |
| 32 | +✅ BROWSER: Auto-detects available browser (falls back gracefully) |
37 | 33 |
|
38 | 34 | ## 🎯 Current Project State |
39 | 35 |
|
40 | | -**Tests**: ✅ Manual testing complete in VM |
41 | | -**Branch**: fix/issue-115-editor-path-zshenv |
42 | | -**CI/CD**: 🔄 Running (PR #73) |
43 | | -**Related Issues**: |
44 | | -- #115 - This fix (EDITOR/PATH missing) |
45 | | -- #114 - Original bug (ZDOTDIR missing) |
46 | | -- #72 - First fix (ZDOTDIR added) |
| 36 | +**Tests**: ✅ All pre-commit hooks passing locally |
| 37 | +**Branch**: fix/vm-issues-gruvbox-starship-browser |
| 38 | +**CI/CD**: 🔄 Running (PR #74) |
| 39 | +**Status**: Ready for merge after session handoff doc |
47 | 40 |
|
48 | 41 | ## 📋 Next Session Priorities |
49 | 42 |
|
50 | 43 | **Immediate Next Steps:** |
51 | | -1. Monitor CI/CD checks on PR #73 |
52 | | -2. Merge PR once all checks pass |
53 | | -3. Test in fresh VM or update existing VM |
54 | | -4. Close maxrantil/vm-infra#115 |
55 | | -5. Consider closing maxrantil/vm-infra#114 (fully resolved now) |
| 44 | +1. Merge PR #74 after CI passes |
| 45 | +2. Test in VM to verify fixes work |
| 46 | +3. Document X11 forwarding setup for gh CLI |
| 47 | +4. Consider adding chromium-browser to Ansible playbook |
| 48 | + |
| 49 | +**VM Browser Setup:** |
| 50 | +For gh CLI web auth to work: |
| 51 | +```bash |
| 52 | +# Install chromium |
| 53 | +sudo apt install chromium-browser |
| 54 | + |
| 55 | +# SSH with X11 forwarding |
| 56 | +ssh -X -i ~/.ssh/vm_key user@vm-ip |
56 | 57 |
|
57 | | -**Lessons Learned:** |
58 | | -- When adding `.zshenv`, must move ALL essential variables from `.zprofile` |
59 | | -- Essential = anything used in aliases or needed by non-login shells |
60 | | -- Test both login and non-login shells when making env variable changes |
| 58 | +# Now gh auth login will open browser on host |
| 59 | +``` |
61 | 60 |
|
62 | 61 | ## 📝 Startup Prompt for Next Session |
63 | 62 |
|
64 | | -Read CLAUDE.md to understand our workflow, then verify dotfiles PR #73 CI status and merge if green. |
| 63 | +Read CLAUDE.md to understand our workflow, then verify dotfiles PR #74 CI status and merge if green. |
65 | 64 |
|
66 | | -**Immediate priority**: Merge maxrantil/dotfiles#73 after CI passes |
67 | | -**Context**: Fixed missing EDITOR/VISUAL/BROWSER/PATH that broke aliases in non-login shells |
68 | | -**Reference docs**: maxrantil/vm-infra#115, SESSION_HANDOVER.md (this file) |
| 65 | +**Immediate priority**: Merge maxrantil/dotfiles#74 after CI passes |
| 66 | +**Context**: Fixed three VM issues - gruvbox errors, starship warnings, browser detection |
| 67 | +**Reference docs**: SESSION_HANDOVER.md (this file) |
69 | 68 | **Ready state**: PR pushed, awaiting CI validation |
70 | 69 |
|
71 | | -**Expected scope**: Merge PR, verify aliases work in VM, close both issues #114 and #115 |
| 70 | +**Expected scope**: Merge PR, test in VM, update Ansible if needed |
72 | 71 |
|
73 | 72 | ## 📚 Key Reference Documents |
74 | | -- maxrantil/vm-infra#115 (this bug - EDITOR/PATH missing) |
75 | | -- maxrantil/vm-infra#114 (original bug - ZDOTDIR missing) |
76 | | -- maxrantil/dotfiles#73 (this fix PR) |
77 | | -- maxrantil/dotfiles#72 (first fix PR - ZDOTDIR) |
78 | | -- `.zshenv` (now contains ALL essential variables) |
79 | | -- `.zprofile` (now only less critical variables) |
| 73 | +- maxrantil/dotfiles#74 (this PR) |
| 74 | +- init.vim (gruvbox disabled) |
| 75 | +- starship.toml (git_status fixed) |
| 76 | +- .zshenv (browser auto-detection) |
0 commit comments