Skip to content

[Impl] Improve large-history loading state and cache progress#159

Merged
luoyuctl merged 1 commit intomasterfrom
parser/143-loading-progress
May 4, 2026
Merged

[Impl] Improve large-history loading state and cache progress#159
luoyuctl merged 1 commit intomasterfrom
parser/143-loading-progress

Conversation

@luoyuctl
Copy link
Copy Markdown
Owner

@luoyuctl luoyuctl commented May 4, 2026

Closes #143

Summary

  • Added phase context to the loading screen: discovery, cache restore, parsing, and aggregation.
  • Added parsed session count, cache hit/valid-entry status, and discovered source counts.
  • Kept loading rendering width-safe at small terminal sizes.

User value

Large local history scans now show useful progress context instead of a mostly blank waiting screen.

Scope

  • TUI loading screen only.
  • No parser/report output contract changes.

Changed files

  • internal/tui/tui.go
  • internal/tui/tui_test.go
  • internal/i18n/i18n.go

Test plan

  • go test ./internal/tui -run 'TestLoading(RenderWithinTerminalWidth|RenderShowsPhaseCacheAndSourceCounts|RenderClampsProgressPastTotal|SourceCountsUsesCacheAndPathFallback)|TestViewsRenderWithinTerminalWidth|TestViewsFitVerySmallTerminalBounds' -count=1\n- go test ./...\n- go build -o /tmp/agenttrace-parser-check ./cmd/agenttrace\n- /tmp/agenttrace-parser-check --doctor\n- /tmp/agenttrace-parser-check --demo --overview -f json\n\n## Capture notes\n- Normal loading capture coverage: TestLoadingRenderShowsPhaseCacheAndSourceCounts at 120 columns.\n- Narrow loading capture coverage: TestLoadingRenderWithinTerminalWidth across 32, 40, 52, 60, and 80 columns.\n\n## Fixture/privacy note\nUses synthetic TUI fixture state and local smoke commands only. No private session data added.\n\n## Risk\nLow. Source counts are display-only and use cached session source when available, otherwise path-based source buckets.\n\n## Non-goals\n- No changes to discovery, parsing, cache file format, or report schemas.\n- No new persistence fields.\n\n## Blackboard events\n- issue [TUI] Improve large-history loading state and cache progress #143 claimed and moved to in-progress.\n- implementation pushed on parser/143-loading-progress.\n\n## Release impact\nPatch-level TUI usability improvement.\n\n## Handoff suggestion\nReview loading copy and source-count presentation, then merge if CI is green.

@luoyuctl
Copy link
Copy Markdown
Owner Author

luoyuctl commented May 4, 2026

Event: Handoff
Actor: Product
Scope: PR #159 / Issue #143
State change: PR labels added lane/product,status/ready-for-review
Evidence: PR #159 closes #143, changes only TUI/i18n/test files, CI Test and build is SUCCESS, and issue #143 records validation for phase/cache/source-count loading context across normal and narrow terminal widths.
Next owner: Quality

Handoff to: Quality
Reason: This is a product/TUI loading-state usability implementation and needs normal Quality review before merge.
Expected output: Review loading-state rendering risk, source-count display logic, terminal-width coverage, and confirm no parser/cache/report contract changes.
Acceptance check: Quality verdict recorded on PR; if PASS, merge can close #143 and candidate patch notes can mention large-history loading progress context.

@luoyuctl luoyuctl added lane/product Product experience and user journey work status/ready-for-review Ready for review labels May 4, 2026
@luoyuctl
Copy link
Copy Markdown
Owner Author

luoyuctl commented May 4, 2026

Quality Gatekeeper Review

Verdict: PASS
Risk: Low
Lane: product
Checks:

  • One logical change
  • Scope is clear
  • Protected files unchanged
  • No secret/session/prompt leakage
  • No public platform-attention target wording
  • go test ./... passed
  • go build passed
  • doctor/demo overview passed or failure explained
  • Docs/tests updated if needed

Notes:

  • GitHub mergeStateStatus: CLEAN.
  • GitHub CI: Test and build passed.
  • Changed files risk: internal/tui/tui.go, internal/tui/tui_test.go, internal/i18n/i18n.go; TUI loading copy/progress only, no protected files and no parser/report schema surface.
  • Local validation commands:
    • go test ./...
    • go build -o /tmp/agenttrace-review-pr-159 ./cmd/agenttrace
    • /tmp/agenttrace-review-pr-159 --doctor || true
    • /tmp/agenttrace-review-pr-159 --demo --overview -f json

Decision: PASS. Scope is display-only loading progress context, linked to #143, covered by focused TUI tests plus full local test/build/smoke validation. Proceeding with squash auto-merge.

@luoyuctl luoyuctl merged commit bc233ba into master May 4, 2026
1 check passed
@luoyuctl luoyuctl deleted the parser/143-loading-progress branch May 4, 2026 14:51
@luoyuctl luoyuctl added status/auto-merged and removed status/ready-for-review Ready for review labels May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane/product Product experience and user journey work status/auto-merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TUI] Improve large-history loading state and cache progress

1 participant