chore: remove per-event debug logging from the normal path

Drop the log.Printf/fmt.Printf traces that fired on every config/input/
click/scroll/open/worker-result during IME and tap debugging. These were
noise (and some were commented out). Error, limit, and recovery logs are
kept; the default-off profiler and gated IME debug remain untouched.
This commit is contained in:
gmp
2026-08-16 20:58:49 -04:00
parent 6dedffcba7
commit e11d705196
6 changed files with 5 additions and 49 deletions
+1 -7
View File
@@ -1,9 +1,8 @@
package browser
import (
"fmt"
"path/filepath"
"pad/internal/ui"
"path/filepath"
)
// HandleScroll updates the browser scroll index by the given delta (in entries).
@@ -103,13 +102,8 @@ func HandleBrowserTap(bm *BrowserManager, s *BrowserState, index int) {
} else {
// Open file
s.SelectedIndex = entryIndex
fmt.Printf("HandleBrowserTap: Opening file %s\n", entry.Path)
if ui.OpenFile != nil {
ui.OpenFile(entry.Path)
}
// Dispatch ReadFileTask to the worker pool
// task := pool.NewReadFileTask(entry.Path, bm.fs)
// fmt.Printf("HandleBrowserTap: Dispatching ReadFileTask for %s\n", entry.Path)
// bm.workerPool.Dispatch(task)
}
}
+3 -10
View File
@@ -26,8 +26,6 @@ func NewBrowserManager(state *BrowserState, wp *pool.WorkerPool, fs pool.FileSys
}
func (bm *BrowserManager) NavigateTo(dirPath string) {
fmt.Printf("NavigateTo: dirPath=%s, state.CurrentPath=%s\n", dirPath, bm.state.CurrentPath)
// Save the previous path so we can restore it on navigation failure.
bm.state.History = append(bm.state.History, bm.state.CurrentPath)
@@ -55,11 +53,8 @@ func (bm *BrowserManager) OnScroll() {
}
}
fmt.Printf("OnScroll: minPage=%d, maxPage=%d, pagesToLoad=%v\n", minPage, maxPage, pagesToLoad)
// Dispatch LoadPagesTask for unloaded pages
if len(pagesToLoad) > 0 {
fmt.Printf("OnScroll: Dispatching LoadPagesTask for pages %v\n", pagesToLoad)
task := pool.NewLoadPagesTask(bm.state.CurrentPath, pagesToLoad, bm.fs)
bm.workerPool.Dispatch(task)
}
@@ -95,10 +90,10 @@ func (bm *BrowserManager) handleBuildIndexSuccess(result pool.Result) {
// In the mock implementation, BuildIndexTask returns []types.DirEntry.
// We need to convert these to browser.Entry and build the SortIndex.
entries := result.Data.([]types.DirEntry)
var browserEntries []Entry
// Add ".." entry if not at root
// We check against "/" specifically. "." is just a relative path for current dir,
// We check against "/" specifically. "." is just a relative path for current dir,
// which still has a parent.
if bm.state.CurrentPath != "/" && bm.state.CurrentPath != "" {
browserEntries = append(browserEntries, Entry{
@@ -109,10 +104,9 @@ func (bm *BrowserManager) handleBuildIndexSuccess(result pool.Result) {
IsDir: true,
})
}
for _, e := range entries {
info, _ := e.Info()
fmt.Printf("Adding entry: %s\n", e.Name())
browserEntries = append(browserEntries, Entry{
Path: filepath.Join(bm.state.CurrentPath, e.Name()),
Name: e.Name(),
@@ -139,7 +133,6 @@ func (bm *BrowserManager) handleBuildIndexSuccess(result pool.Result) {
}
bm.state.TotalEntries = len(browserEntries)
fmt.Printf("handleBuildIndexSuccess: TotalEntries set to %d\n", bm.state.TotalEntries)
// Trigger initial page load
bm.OnScroll()