Repository navigation
Show findings inline and load TUI analysis automatically - #303
Merged
Merged
Conversation
Load patterns automatically, show loading phases and distinct PAT counts, and cycle through saved notes and source findings with the bracket keys. Render pattern explanations and quality guardrails inline with scrollable evidence.
Clear the finding scroll position when visual selection starts so j/k selects source lines instead of continuing to scroll finding evidence.
Use one directional navigation scan and reuse annotation wrapping and selection resets. Keep finding behavior on markers and reset pattern results as one state. Refresh master and regenerate the quality baseline.
Index finding sites when results arrive, render visible table rows, and bound inline quality evidence. Anchor target checks at recorded writes and distinguish whole-function checks.
Place effect and mutation records at their actual lines, make evidence navigable, prepare pattern indexes in the worker, and reuse wrapping measurements across same-function movement.
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.
The TUI loads quality and patterns automatically, shows each loading phase, and displays findings beside source.
[/]visits quality findings, their recorded evidence lines, visible patterns, and saved notes across the report. Files and Functions show distinct pattern counts inPAT; pattern notes include observations, suggested review, related sites, and caveats.Clone notes state that they compare whole functions and show their source ranges. Clone and divergent-clone candidates preserve canonical qualified names, function IDs, and full function extents; methods that share a short name remain distinct. Related sites include their ranges. Matching thresholds and the grouping algorithm stay unchanged.
Quality notes use a square (
■), patterns use a triangle (▲), and saved notes use a diamond (◆). Supported effect and mutation evidence appears directly below its recorded source line, with unavailable recorded positions kept explicit. Mutation notes saymutation: target (provenance)in source and quality views. The TUI hides unknown effects, unproved mutations, and findings that exceed a limit only because of unknown contributions. A mixed finding stays visible when its known contribution alone exceeds the configured limit. Root and field mutation budgets preserve their original granularity. Badges and bracket navigation use the same visible findings. The optional quality pane also shows known evidence only.Filtering builds a display projection. Raw JSON, headless scoring, thresholds, analysis status, and completeness flags stay unchanged. Density is displayed only when its known contribution can be computed from recorded metadata or a complete result. Regression tests cover source-line placement, unknown-only findings, mixed known excesses, root/field mutation budgets, badges, navigation, and raw-data preservation.
Finding locations are indexed when results arrive, tables render visible rows only, and source wrapping/counts are cached across same-function navigation. Pattern detail preparation and indexing run in the background worker. Resize, refresh, visibility changes, and note edits invalidate the relevant caches; stale scan results cannot install an old index. Visibility toggles during initial loading do not start another scan.
The implementation reuses the cached finding index for counts and navigation, removes obsolete scan/render helpers, filters known evidence once, and derives table viewport size from the fitted rows. Duplicate test setup is consolidated while keeping the startup, raw-data, source-position, navigation, and cache-invalidation checks. This review removes 211 lines net (107 production, 104 tests). Gstyle changed-function quality diagnostics fall from 23 to 14 with no new diagnostics; the finding-file index falls from CC 6 / COG 8 to CC 4 / COG 6.
Validation:
make check cognitive lint, application race tests,make quality-baseline quality-gate, and repository guard checks pass in the isolated master snapshot. The quality baseline is regenerated. A large-report benchmark is included; real terminal tests also replay 64-key bursts without dropped bracket events.The full pattern scan and
fix --changedpreview did not finish in the local review window and were stopped after more than 12 and 5 minutes respectively. They do not establish a clean pattern result for this review.Merge risk: unknown 👀
application/analysis_loading.go: Go declarations or comments changed outside the function-body PDG comparison.application/annotations.go: Go declarations or comments changed outside the function-body PDG comparison.application/finding_index.go: Go declarations or comments changed outside the function-body PDG comparison.application/model.go: Go declarations or comments changed outside the function-body PDG comparison.application/pattern_details.go: Go declarations or comments changed outside the function-body PDG comparison.application/pattern_markers.go:31: changed function contains unresolved call targets; call rules are incomplete.application/pattern_markers.go: Go declarations or comments changed outside the function-body PDG comparison.application/pattern_markers.go: existing covered declarations or test file changed or were removed.application/pattern_tables.go:22: changed function contains unresolved call targets; call rules are incomplete.application/pattern_tables.go: Go declarations or comments changed outside the function-body PDG comparison.application/quality_evidence.go: Go declarations or comments changed outside the function-body PDG comparison.application/quality_findings.go: Go declarations or comments changed outside the function-body PDG comparison.application/quality_known.go: Go declarations or comments changed outside the function-body PDG comparison.application/quality_test.go: existing covered declarations or test file changed or were removed.application/review_navigation.go: Go declarations or comments changed outside the function-body PDG comparison.application/skill.go: Go declarations or comments changed outside the function-body PDG comparison.application/skill_test.go: existing covered declarations or test file changed or were removed.application/source_rows.go: Go declarations or comments changed outside the function-body PDG comparison.application/view.go:175: changed function contains unresolved call targets; call rules are incomplete.application/view.go: Go declarations or comments changed outside the function-body PDG comparison.application/view.go: existing covered declarations or test file changed or were removed.application/view_extra_test.go: existing covered declarations or test file changed or were removed.application/workspace.go: Go declarations or comments changed outside the function-body PDG comparison.domain/patterns/ccgraph.go: Go declarations or comments changed outside the function-body PDG comparison.quality-baseline.json: quality baseline was added, removed, or changes its rules or permitted excess rates.Code impact: partial 👀
Affected functions: 135.
Dependencies: unchanged ✅
API diff: compatible changes ✅ (5)
application.FindingMarker: added —type FindingMarker struct{Kind string; Path string; Line int; EndLine int; Scope string; Candidate *patterns.Candidate; Diagnostic *quality.Diagnostic; Details *findingDetails}application.PatternMarker.Candidate: added —field Candidate *patterns.Candidateapplication.PatternMarker.Details: added —field Details *findingDetailsapplication.PatternMarker.Diagnostic: added —field Diagnostic *quality.Diagnosticapplication.PatternMarker.Scope: added —field Scope stringGraph changes
Showing 1 of 135 changed functions.
+added;−removed. At most 18 nodes and 24 changed edges per function.application/review_navigation.go · github.com/rstyled/gstyle/application.Model.activeReviewIndex
Compared base:
fdbeceba6073a44c79ec0757ba5f86030f08d8fd· head:67461c2ae1e32b7e1854d1bec39a35357860c1b3