fix(tui): bound external disk refresh scans#625
Open
BatalloLu wants to merge 1 commit into
Open
Conversation
Throttle MailCache sent-history scans, surface slow inventory fields with bounded MCP identity reads, and guard props/detail refreshes against overlapping external-disk scans. Add focused tests for the refreshed behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MailCache.Refresh()sent-history scans while preserving immediate pending sent-ID delivery checks..agent.jsononce, recordslow_fields, and cap MCP identity scans with a truncation marker.Context
This PR targets TUI lag observed on large
.lingtainetworks mounted on an external disk. It does not claim to eliminate every possible exFAT/external-volume slowdown, but it removes several every-second full-scan and synchronous-detail paths that matched the observed bottlenecks.Validation
git diff --checkgo test ./internal/fs ./internal/inventory -count=1go test ./internal/tui -run 'TestProps(CtrlR|CtrlD|ReloadStatusHint|AutoReloadCmd|LoadDetail)|TestAppAutoRefresh(SkipsPropsLoadWhenInFlight|TickKeepsKanbanDetailLive|TickReloadsAndRearms)|TestAutoRefreshActiveViewOnlyReloadsKanban' -count=1go test ./internal/tui -run '^$' -count=1(compile-only)Not covered / follow-up
go test ./...was intentionally not run because existing OAuth tests may open a real browser.