ACE Journal

Attention Routing in AI-Assisted Code Review

Abstract

As AI-powered code review tools become standard fixtures in software development pipelines, a critical HCI question emerges: how should these tools direct a developer’s visual and cognitive attention across a diff? Poorly routed attention can cause reviewers to over-trust machine annotations, skip contextually important lines, or experience fatigue from excessive noise. This article examines the design space for attention routing in tools like GitHub Copilot’s review suggestions, JetBrains Qodana, and Sourcegraph Cody, with attention to the tradeoffs between salience and cognitive load.

The Problem with Uniform Highlighting

Traditional code review interfaces treat all diff lines with rough visual parity, using colors for additions and deletions but offering no further prioritization. AI-assisted tools break this by injecting severity scores, inline comments, and risk indicators. But most current implementations present these signals with high visual density. A reviewer scanning a 400-line pull request may encounter dozens of annotation markers competing for attention simultaneously. Eye-tracking studies in adjacent domains, such as document annotation tools, consistently show that when more than five to seven distinct salience signals appear in a single viewport, users resort to reading order rather than priority order, defeating the purpose of the ranking.

Layered Disclosure as an HCI Pattern

One promising design direction is layered disclosure of AI-generated annotations. Rather than rendering all suggestions immediately, the interface exposes only the highest-confidence, highest-severity items on first view, then allows the reviewer to progressively expand lower-priority suggestions via an explicit affordance. Sourcegraph’s experimental review mode, previewed at their developer day in early 2025, gestures at this approach by collapsing informational hints behind a secondary toggle. The interaction model draws on established progressive-disclosure patterns from form design, adapting them to a real-time annotation context where the underlying document is itself changing.

Spatial Anchoring and Context Windows

A second challenge is spatial anchoring. When an AI annotation points to line 47, the surrounding 10 lines provide the semantic context that makes the annotation interpretable. Narrow context windows cause reviewers to jump between the annotation and surrounding code, increasing the number of fixation shifts per annotation. Research from the CHI 2024 proceedings on annotation interfaces suggests that a visible context radius of at least 8-12 surrounding lines significantly reduces re-navigation events. Designing this into code review tools means rethinking how diffs are rendered, potentially moving away from strict unified-diff format toward annotation-centered code views where the focal region is always visible without scrolling.

Calibration and Reviewer Trust

Attention routing also interacts with trust calibration. If a tool consistently highlights low-value items, reviewers habituate and begin ignoring the signals, a well-documented automation bias reversal. Conversely, if the tool underflags and a bug slips through, trust collapses. The ideal interaction design maintains a feedback loop: reviewers should be able to signal disagreement with an annotation in one gesture, and that signal should visibly influence the tool’s future weighting, even if only locally per session. GitHub’s thumbs-down on Copilot suggestions is a starting point, but it lacks the transparency to let reviewers understand how their input changes routing decisions.

Open Questions

The field still lacks agreed evaluation methods for attention routing quality in code review specifically. Metrics borrowed from information retrieval, such as precision and recall of flagged lines, do not capture the temporal dynamics of reviewer attention or the cognitive cost of context switching. Establishing HCI-native benchmarks, possibly through instrumented replay studies using tools like Tobii eye trackers paired with IDE plugins, is a near-term research priority.