Skip to content

Commit 3060da1

Browse files
ozgesolidkeyclaude
andcommitted
Limit log-line highlight to start line only (not entire range)
Range extent is already shown in the annotation bar stripe — highlighting thousands of mid-range lines in the log viewer is visually overwhelming. Now: prominent marker only at the annotation's start line (lineNumber); full-range tint only when the annotation is active (clicked). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ed4ef5a commit 3060da1

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

src/renderer/renderer.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2499,16 +2499,15 @@ function renderVisibleLines(): void {
24992499
}
25002500
if (matchAnn) {
25012501
const isActive = matchAnn.id === activeAnnotationId;
2502-
const colors = getAnnColor(matchAnn.severity);
25032502
const isStart = lineNum === matchAnn.lineNumber;
2504-
// Active: colored bg + thick border. Inactive: thin gutter line only (non-intrusive)
2505-
const bg = isActive ? colors.active : (isStart ? colors.stripe : 'transparent');
2506-
const borderW = isActive || isStart ? 3 : 2;
2507-
const borderOpacity = isActive ? 1 : isStart ? 0.8 : 0.3;
2508-
const baseColor = colors.tick.replace(/[\d.]+\)$/, `${borderOpacity})`);
2509-
const hl = document.createElement('div');
2510-
hl.style.cssText = `position:absolute;left:0;right:0;top:${top}px;height:${getLineHeight()}px;background:${bg};border-left:${borderW}px solid ${baseColor};pointer-events:none;z-index:1;`;
2511-
fragment.appendChild(hl);
2503+
// Only render a gutter indicator on the START line (or all range lines when active)
2504+
if (isStart || isActive) {
2505+
const colors = getAnnColor(matchAnn.severity);
2506+
const bg = isActive ? colors.active : colors.stripe;
2507+
const hl = document.createElement('div');
2508+
hl.style.cssText = `position:absolute;left:0;right:0;top:${top}px;height:${getLineHeight()}px;background:${bg};border-left:3px solid ${colors.tick};pointer-events:none;z-index:1;`;
2509+
fragment.appendChild(hl);
2510+
}
25122511
}
25132512
}
25142513

0 commit comments

Comments
 (0)