Skip to content

Commit 60662b1

Browse files
ozgesolidkeyclaude
andcommitted
Fix crash navigation off-by-1 and component name misclassification
Crash items off-by-1: - Analyzer uses 1-based line numbers (lineNumber++ before processing) - data-line stored as c.lineNumber-1 (0-based for navigateTo) - Display text kept as c.lineNumber (already correct 1-based) - Same fix for comp.sampleLine (1-based) → data-line stores sampleLine-1 Component names showing timestamps instead of channel names: - LoggerTime column matched 'logger' keyword in channel type list - Channel type was checked BEFORE timestamp type, so LoggerTime → channel - Fix: reorder KNOWN_COLUMNS so timestamp is evaluated first - Now LoggerTime matches 'loggertime' in timestamp keywords → correctly typed - channelCol picks up the actual 'Channel' column (index 5) → real component names Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 94dbaab commit 60662b1

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/main/analyzers/columnAwareAnalyzer.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ import {
1313
const yieldToEventLoop = () => new Promise<void>(resolve => setImmediate(resolve));
1414

1515
const KNOWN_COLUMNS = {
16-
channel: ['channel', 'component', 'module', 'category', 'logger'],
17-
source: ['source', 'process', 'thread', 'origin', 'class'],
18-
level: ['level', 'severity', 'loglevel', 'priority'],
19-
message: ['message', 'msg', 'text', 'content', 'description'],
16+
// timestamp MUST come before channel — 'LoggerTime' contains 'logger' (channel keyword)
17+
// but should be classified as timestamp. More-specific types go first.
2018
timestamp: ['time', 'timestamp', 'date', 'datetime', 'loggertime', 'tracetime'],
19+
level: ['level', 'severity', 'loglevel', 'priority'],
20+
message: ['message', 'msg', 'text', 'content', 'description'],
21+
source: ['source', 'process', 'thread', 'origin', 'class'],
22+
// channel last — 'logger' is a substring of 'loggertime' so must be lowest priority
23+
channel: ['channel', 'component', 'module', 'category', 'logger'],
2124
};
2225

2326
interface ColumnInfo {

src/renderer/renderer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11440,10 +11440,10 @@ function updateAnalysisUI(): void {
1144011440
<div class="insight-section crash-section">
1144111441
<div class="insight-header">Crashes & Failures (${ins.crashes.length}${ins.crashes.length >= 50 ? '+' : ''})</div>
1144211442
${ins.crashes.map(c => `
11443-
<div class="crash-item" data-line="${c.lineNumber}" title="Line ${c.lineNumber + 1}">
11443+
<div class="crash-item" data-line="${c.lineNumber - 1}" title="Line ${c.lineNumber}">
1144411444
<div class="crash-line">
1144511445
<span class="crash-keyword">${escapeHtml(c.keyword)}</span>
11446-
<span class="crash-line-num">line ${c.lineNumber + 1}</span>
11446+
<span class="crash-line-num">line ${c.lineNumber}</span>
1144711447
</div>
1144811448
<div class="crash-text">${escapeHtml(c.text.length > 100 ? c.text.substring(0, 100) + '...' : c.text)}</div>
1144911449
</div>
@@ -11467,7 +11467,7 @@ function updateAnalysisUI(): void {
1146711467
<div class="insight-section components-section">
1146811468
<div class="insight-header">Top Failing Components</div>
1146911469
${ins.topFailingComponents.map(comp => `
11470-
<div class="component-item" data-line="${comp.sampleLine}" title="${comp.errorCount} errors, ${comp.warningCount} warnings">
11470+
<div class="component-item" data-line="${comp.sampleLine > 0 ? comp.sampleLine - 1 : -1}" title="${comp.errorCount} errors, ${comp.warningCount} warnings">
1147111471
<div class="component-header">
1147211472
<span class="component-name">${escapeHtml(comp.name)}</span>
1147311473
<span class="component-errors">${comp.errorCount} err${comp.warningCount > 0 ? ` / ${comp.warningCount} warn` : ''}</span>

0 commit comments

Comments
 (0)