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
-12
View File
@@ -163,7 +163,6 @@ func (l *Logic) Run() {
defer l.exitWg.Done()
// Dispatch initial directory index build on startup
log.Printf("Logic: Dispatching BuildIndexTask")
l.workerPool.Dispatch(pool.NewBuildIndexTask(l.state.Browser.CurrentPath, l.mockFS))
for {
@@ -171,14 +170,12 @@ func (l *Logic) Run() {
case <-l.done:
return
case update := <-l.configChan:
log.Printf("Logic: ConfigEvent")
update.apply(l.state)
l.emitFrame()
case layout := <-l.layoutChan:
// Store the full GlyphLayout on editor state.
// Derive LastLineY from it for scroll clamping.
l.state.Editor.GlyphLayout = layout
log.Printf("LOGIC received GlyphLayout: ByteOffsets=%d, VisualLineStarts=%d", len(layout.ByteOffsets), len(layout.VisualLineStarts))
var derivedLastLineY ui.Dp
if len(layout.Y) > 0 {
derivedLastLineY = layout.Y[len(layout.Y)-1]
@@ -188,13 +185,11 @@ func (l *Logic) Run() {
l.emitFrame()
}
case events := <-l.inputChan:
log.Printf("Logic: InputEvents")
for _, evt := range events {
evt.Handler(evt.Data)
}
l.emitFrame()
case query := <-l.searchQueryChan:
log.Printf("Logic: SearchQuery")
if query != l.state.Browser.Query {
l.state.Browser.Query = query
if l.state.page == BrowserPage {
@@ -203,7 +198,6 @@ func (l *Logic) Run() {
}
l.emitFrame()
case path := <-l.openFileChan:
log.Printf("Logic: OpenFileChan %s", path)
// Create chunked buffer for virtual scrolling
chunkSize := DefaultChunkSize
cb := NewChunkedBuffer(path, chunkSize, l.mockFS, "")
@@ -235,7 +229,6 @@ func (l *Logic) Run() {
if !ok {
break
}
log.Printf("Logic: Dispatching WriteFileTask for %s, content len=%d", l.state.Editor.Filename, len(content))
l.workerPool.DispatchNonBlocking(
pool.NewWriteFileTask(l.state.Editor.Filename, content, l.mockFS),
)
@@ -418,7 +411,6 @@ func (l *Logic) handleWorkerResult(res pool.Result) {
if res.IsBrowserResult() {
l.browserManager.HandleResult(res)
} else if res.TaskType == pool.TypeReadFile {
log.Printf("Logic: TypeReadFile result success=%v", res.Success)
if res.Success {
if content, ok := res.Data.([]byte); ok {
if l.state.Editor.ChunkedBuffer != nil {
@@ -445,14 +437,12 @@ func (l *Logic) handleWorkerResult(res pool.Result) {
cb.chunks = append(cb.chunks, nil)
}
cb.chunks[res.ChunkIdx] = chunk
log.Printf("Logic: Loaded chunk %d for %s (%d bytes)", res.ChunkIdx, res.FilePath, len(chunk))
}
} else {
log.Printf("Logic: ReadChunkTask failed for %s chunk %d: %v", res.FilePath, res.ChunkIdx, res.Error)
}
}
} else if res.TaskType == pool.TypeStatFile {
log.Printf("Logic: TypeStatFile result success=%v", res.Success)
if res.Success {
if stat, ok := res.Data.(*pool.FileStat); ok {
// Size guard: refuse to edit files above the limit. The browser can
@@ -473,12 +463,10 @@ func (l *Logic) handleWorkerResult(res pool.Result) {
}
}
} else if res.TaskType == pool.TypeBuildLineIndex {
log.Printf("Logic: TypeBuildLineIndex result success=%v", res.Success)
if res.Success {
if idx, ok := res.Data.(*types.LineIndex); ok {
if l.state.Editor.ChunkedBuffer != nil {
l.state.Editor.ChunkedBuffer.LineIndex = idx
log.Printf("Logic: LineIndex built with %d lines", idx.LineCount())
}
}
}