feat(shell): enhance log browser, add yay wrapper, and integrate starship OSC prompt markers #26

Merged
rootiest merged 1 commits from feat/log-browser-yay-ov-and-starship-osc into main 2026-06-03 05:04:01 +00:00
Owner

Summary

  • Log browser overhaul (logs.fish): yay category support; ov-powered viewing for paru/yay logs (syntax highlights, ==> AUR build section headers) and scrollback logs (OSC 133;A sticky prompt headers); fzf Ctrl-D delete with Y/n confirm and live list refresh; ? toggleable keybind help overlay
  • Junk log pruning (_scrollback_prune_junk.fish): new reusable utility that removes empty, single-line, and Kitty tab-rename noise logs; called by both logs (before display) and smart_exit (before max-file pruning)
  • yay logging wrapper (conf.d/yay-wrapper.fish): mirrors paru-wrapper.fish; auto-generates ~/.local/bin/yay on first shell start when yay is installed, teeing all output to timestamped logs in SCROLLBACK_HISTORY_DIR
  • Starship OSC integration (conf.d/starship.fish): extracts fish_prompt from config.fish into its own conf.d file; emits OSC 133;A after the prompt's leading newline so the marker lands on the info-bar line (enabling ov sticky headers); guarded by type -q starship so clean fish sessions use built-in markers unchanged
  • config.fish: removes the now-extracted fish_prompt block; adds a return sentinel at EOF to prevent tool-injected init | source lines from conflicting with the conf.d/-based integration approach
  • README: documents all of the above including a callout explaining the return sentinel for users adding new tools

Manual Verification

  • Open a new shell — confirm the starship prompt renders correctly with no visual change and that the blank line above the prompt is still present
  • Run paru <package> and yay <package>; confirm timestamped log files appear in $SCROLLBACK_HISTORY_DIR prefixed paru_ and yay_ respectively
  • Run logs; confirm scrollback, paru, and yay entries all appear; open a paru/yay log with Enter and verify ov shows coloured section headers; open a scrollback log and verify the info-bar line sticks to the top while scrolling
  • In logs, press Ctrl-D on an entry — confirm Y/n prompt appears, Enter deletes and refreshes the list, n cancels; press ? to toggle the help overlay on and off
  • Close a kitty terminal with exit; verify a scrollback_*.log is saved; re-open logs and confirm single-line junk files (e.g. bare [exited] captures) are absent from the list
  • Run starship init fish | source (simulating a tool injection); confirm the prompt still behaves correctly and the injected line has no effect (the return sentinel blocked it)
## Summary - **Log browser overhaul** (`logs.fish`): yay category support; `ov`-powered viewing for paru/yay logs (syntax highlights, `==>` AUR build section headers) and scrollback logs (OSC 133;A sticky prompt headers); fzf `Ctrl-D` delete with Y/n confirm and live list refresh; `?` toggleable keybind help overlay - **Junk log pruning** (`_scrollback_prune_junk.fish`): new reusable utility that removes empty, single-line, and Kitty tab-rename noise logs; called by both `logs` (before display) and `smart_exit` (before max-file pruning) - **yay logging wrapper** (`conf.d/yay-wrapper.fish`): mirrors `paru-wrapper.fish`; auto-generates `~/.local/bin/yay` on first shell start when yay is installed, teeing all output to timestamped logs in `SCROLLBACK_HISTORY_DIR` - **Starship OSC integration** (`conf.d/starship.fish`): extracts `fish_prompt` from `config.fish` into its own `conf.d` file; emits OSC 133;A after the prompt's leading newline so the marker lands on the info-bar line (enabling `ov` sticky headers); guarded by `type -q starship` so clean fish sessions use built-in markers unchanged - **config.fish**: removes the now-extracted `fish_prompt` block; adds a `return` sentinel at EOF to prevent tool-injected `init | source` lines from conflicting with the `conf.d/`-based integration approach - **README**: documents all of the above including a callout explaining the `return` sentinel for users adding new tools ## Manual Verification - [x] Open a new shell — confirm the starship prompt renders correctly with no visual change and that the blank line above the prompt is still present - [x] Run `paru <package>` and `yay <package>`; confirm timestamped log files appear in `$SCROLLBACK_HISTORY_DIR` prefixed `paru_` and `yay_` respectively - [x] Run `logs`; confirm scrollback, paru, and yay entries all appear; open a paru/yay log with Enter and verify ov shows coloured section headers; open a scrollback log and verify the info-bar line sticks to the top while scrolling - [x] In `logs`, press `Ctrl-D` on an entry — confirm Y/n prompt appears, Enter deletes and refreshes the list, `n` cancels; press `?` to toggle the help overlay on and off - [x] Close a kitty terminal with `exit`; verify a `scrollback_*.log` is saved; re-open `logs` and confirm single-line junk files (e.g. bare `[exited]` captures) are absent from the list - [x] Run `starship init fish | source` (simulating a tool injection); confirm the prompt still behaves correctly and the injected line has no effect (the `return` sentinel blocked it)
rootiest added 1 commit 2026-06-03 05:03:38 +00:00
- logs.fish: add yay category, ov-powered viewing for paru/yay (section
  headers, color highlights, ==> AUR build markers) and scrollback logs
  (OSC 133;A sticky prompt headers); add fzf Ctrl-D delete with Y/n
  confirm and list refresh, ? toggleable help overlay; run
  _scrollback_prune_junk before building file list
- _scrollback_prune_junk: new utility to remove empty, single-line, and
  Kitty tab-rename noise logs before display and before max-file pruning;
  called from both logs and smart_exit
- smart_exit: call _scrollback_prune_junk before counting toward max files
- conf.d/yay-wrapper.fish: auto-generate ~/.local/bin/yay logging wrapper
  mirroring paru-wrapper; tees output to timestamped logs, prunes old ones
- conf.d/starship.fish: move fish_prompt from config.fish; emit OSC 133;A
  after the prompt's leading newline so the marker lands on the info-bar
  line rather than the blank line above it; guard with type -q starship so
  clean fish sessions use built-in markers unchanged
- config.fish: remove inline fish_prompt block (now in conf.d/starship.fish);
  add return sentinel at EOF to prevent tool-injected init lines from running
- completions/ov.fish: add ov tab completions
- README.md: document all of the above
rootiest merged commit 15596bae5f into main 2026-06-03 05:04:01 +00:00
rootiest deleted branch feat/log-browser-yay-ov-and-starship-osc 2026-06-03 05:04:01 +00:00
Sign in to join this conversation.