Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .strap/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
index.db
runs/
11 changes: 11 additions & 0 deletions .strap/lessons/archive/msr37myo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
id = "msr37myo"
tags = ["rust", "debugging", "macos"]
confidence = 0.6
helped = 0
harmed = 0
created = "2026-08-13T05:38:17.472618Z"
last_confirmed = "2026-08-13T05:38:17.472618Z"
+++

rust debugging (codelldb/lldb) hangs on launch in this environment until the hosting terminal app (Ghostty) has the macOS Privacy & Security -> Developer Tools grant; even bare 'lldb --batch -o run' hangs. DevToolsSecurity/developer-mode alone is insufficient. python/js/lua debugging unaffected.
12 changes: 12 additions & 0 deletions .strap/lessons/msrbxfq9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
+++
id = "msrbxfq9"
tags = ["rust", "debugging", "macos"]
confidence = 0.6
helped = 0
harmed = 0
created = "2026-08-13T09:42:18.081483Z"
last_confirmed = "2026-08-13T09:42:18.081483Z"
supersedes = "msr37myo"
+++

rust debugging works here now: Ghostty granted macOS Developer Tools 2026-08-13, codelldb launches clean. If it regresses to launch-hangs after a Ghostty update or TCC reset, re-grant in System Settings -> Privacy & Security -> Developer Tools and restart Ghostty.
11 changes: 11 additions & 0 deletions .strap/lessons/msthsaej.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
id = "msthsaej"
tags = ["gitbutler", "workflow"]
confidence = 0.6
helped = 0
harmed = 0
created = "2026-08-14T22:01:47.947046Z"
last_confirmed = "2026-08-14T22:01:47.947046Z"
+++

but commit with no positional IDs commits ALL dirty files — if IDs come from command substitution, verify non-empty first or a failed $() silently sweeps unrelated files into the commit
11 changes: 11 additions & 0 deletions .strap/lessons/msthsaep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
id = "msthsaep"
tags = ["macos", "gpu", "oversee"]
confidence = 0.6
helped = 0
harmed = 0
created = "2026-08-14T22:01:47.953115Z"
last_confirmed = "2026-08-14T22:01:47.953115Z"
+++

macOS publishes no per-GPU-core or per-process GPU utilization (powermetrics gpu_power is system-wide only) — never reintroduce fabricated per-core GPU numbers in oversee
11 changes: 11 additions & 0 deletions .strap/lessons/msthsaes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
id = "msthsaes"
tags = ["github", "docs"]
confidence = 0.6
helped = 0
harmed = 0
created = "2026-08-14T22:01:47.956936Z"
last_confirmed = "2026-08-14T22:01:47.956936Z"
+++

freshly pushed README images can look stale on github.com for minutes — raw.githubusercontent.com CDN caches ~5min and browsers cache longer; verify with curl -sI content-length vs local file size before debugging the repo
11 changes: 11 additions & 0 deletions .strap/lessons/msthtgch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
id = "msthtgch"
tags = ["oversee", "ci", "workflow"]
confidence = 0.6
helped = 0
harmed = 0
created = "2026-08-14T22:02:42.305307Z"
last_confirmed = "2026-08-14T22:02:42.305307Z"
+++

always run cargo fmt -- --check locally and wait for gh pr checks green BEFORE merging to main — oversee CI gates fmt/clippy/test and cargo test alone does not catch fmt drift
1 change: 1 addition & 0 deletions .strap/tools.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# managed tools — see `strap tool add`
39 changes: 35 additions & 4 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ pub struct App {
pub kill_target_pid: Option<u32>,
pub kill_target_name: String,
pub help_mode: bool,
/// Set on terminal resize; main loop must clear the terminal before the
/// next draw. A shrink+grow that lands back on the old size is invisible
/// to ratatui's autoresize, yet the emulator has already scrolled the
/// alternate screen, so a diff-only redraw leaves stale rows behind.
pub needs_clear: bool,
pub pinned_pids: HashSet<u32>,
sort_mode: SortMode,

Expand Down Expand Up @@ -100,6 +105,7 @@ impl App {
kill_target_pid: None,
kill_target_name: String::new(),
help_mode: false,
needs_clear: false,
pinned_pids: HashSet::new(),
sort_mode: SortMode::Cpu,

Expand Down Expand Up @@ -191,14 +197,25 @@ impl App {
pub fn handle_event(&mut self) -> Result<bool, Box<dyn std::error::Error>> {
// Poll timeout sets the idle wakeup floor. Crossterm returns immediately
// when an event arrives, so key latency is unaffected by this value.
#[allow(clippy::collapsible_if)] // Suggested fix uses unstable let-else syntax
if event::poll(Duration::from_millis(100))? {
if let Event::Key(key) = event::read()? {
return Ok(self.apply_event(event::read()?));
}
Ok(false)
}

/// Apply one terminal event; returns true if a redraw is needed.
fn apply_event(&mut self, ev: Event) -> bool {
match ev {
Event::Key(key) => {
self.handle_key_event(key);
return Ok(true);
true
}
Event::Resize(_, _) => {
self.needs_clear = true;
true
}
_ => false,
}
Ok(false)
}

fn handle_key_event(&mut self, key: KeyEvent) {
Expand Down Expand Up @@ -463,3 +480,17 @@ impl App {
processes
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn resize_event_requests_clear_and_redraw() {
let (tx, _rx) = mpsc::channel();
let mut app = App::new(tx);
assert!(!app.needs_clear);
assert!(app.apply_event(Event::Resize(80, 24)));
assert!(app.needs_clear);
}
}
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ fn main() -> Result<(), Box<dyn Error>> {

// Only render if something changed
if data_updated || event_occurred {
if std::mem::take(&mut app.needs_clear) {
terminal.clear()?;
}
profile!("render", terminal.draw(|f| ui::render(f, &mut app))?);
}
}
Expand Down
Loading