Skip to content

Surface parser diagnostics in TUI - #8

Merged
rdzehtsiar merged 2 commits into
masterfrom
codex/linear-mention-rdg-37-improve-state-visibility-in-tui
Jun 10, 2026
Merged

Surface parser diagnostics in TUI#8
rdzehtsiar merged 2 commits into
masterfrom
codex/linear-mention-rdg-37-improve-state-visibility-in-tui

Conversation

@rdzehtsiar

Copy link
Copy Markdown
Owner

Motivation

  • Make parser state visible to users by surfacing parser diagnostics and limitations (truncated content, invalid UTF-8, binary/unsupported content, parser init/parse errors) instead of silently skipping parser work.
  • Persist parser notes into the index so the TUI can tag and display affected files for easier triage.

Description

  • Go parser now recognizes files by extension even when the active content window is truncated or has encoding/content issues, and emits appropriate ParserDiagnostic and ParserLimitation entries (added unsupported_content_kind and content_kind_label).
  • File analyzer now appends parser diagnostics and limitations into the file-level diagnostics before the result is stored (added append_parser_notes).
  • Store reducer now serializes diagnostics from both file-level diagnostics and parser output into the diagnostics JSON stored in the index, merging without duplication (changed diagnostics_json to accept &FileAnalysisResult and added push_diagnostic_json).
  • TUI now reads stored diagnostics from file_facts.diagnostics, exposes a parser_diagnostics field on RiskRow, tags rows with PARSER, and renders a "Parser diagnostics" inspector section (added parse_diagnostics_json, inspector rendering, and tagging).
  • Added unit tests and updated fixtures to cover parser diagnostics propagation, index storage, and TUI loading/rendering.

Testing

  • Ran cargo fmt --check and it succeeded.
  • Ran cargo clippy --all-targets --all-features -- -D warnings and it succeeded.
  • Ran the full test suite with cargo test and all tests passed (97 passed; 0 failed).
  • Ran focused tests covering the new behavior and fixtures and they passed: cargo test parser_diagnostics and TUI tests tui::tests::loads_project_summary_and_ranked_rows and tui::tests::renders_hotpath_view_with_inspector all succeeded.

Codex Task

@codecov-commenter

codecov-commenter commented Jun 10, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 93.06358% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pipeline/store_reducer.rs 92.30% 4 Missing and 1 partial ⚠️
src/tui.rs 87.50% 2 Missing and 3 partials ⚠️
src/languages/go.rs 88.23% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

Qodana for Rust

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@sonarqubecloud

Copy link
Copy Markdown

@rdzehtsiar
rdzehtsiar marked this pull request as ready for review June 10, 2026 16:04
@rdzehtsiar
rdzehtsiar merged commit 0d1aeeb into master Jun 10, 2026
8 checks passed
@rdzehtsiar
rdzehtsiar deleted the codex/linear-mention-rdg-37-improve-state-visibility-in-tui branch June 10, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants