Skip to content

feat: sidebar sort/views, fix snippet focus, always-on logs - #2

Merged
Lefix2 merged 6 commits into
mainfrom
claude/codeclimate-error-visualizer-113GE
Apr 30, 2026
Merged

feat: sidebar sort/views, fix snippet focus, always-on logs#2
Lefix2 merged 6 commits into
mainfrom
claude/codeclimate-error-visualizer-113GE

Conversation

@Lefix2

@Lefix2 Lefix2 commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Sidebar sort: sort issues by severity / check name / file name (default: severity asc); clicking active option toggles ↑/↓; replaces previous filter UI
  • File & tree views: groups and folders always ordered alphabetically; sort only affects issues within each file
  • Fix snippet: focus-in-table from sidebar now requests the code snippet — was only triggered on direct row click, leaving "Loading snippet…" stuck
  • File open: ViewColumn.Active — opens in current editor group instead of always splitting beside
  • Logs: always write to Output channel; removed showLogConsole setting

Test plan

  • Open sidebar, load report — issues sorted by severity by default
  • Switch sort to Check Name / File Name, verify ↑/↓ toggle
  • File view: file groups sorted A–Z; issues within each file follow active sort
  • Click "focus in table" from sidebar — snippet loads correctly (was broken)
  • Click file link — opens in active tab group, not beside
  • Output channel receives log entries without any setting required

🤖 Generated with Claude Code

TREFOU Felix and others added 6 commits April 29, 2026 09:28
Custom columns:
- .vscode/codeclimate-visualiser.json accepts customColumns: [{name, index}]
- Column index is a sort key alongside built-in columns (Severity=0…Description=6)
- Any integer is valid; values > 6 go after Description; tiebreaker: built-in before custom
- Columns rendered dynamically via getActiveColumns(); thead built by renderTableHeader()
- CSS switched from nth-child to class-based (.col-severity, .col-file, .col-custom, …)
- Custom column cells are clickable filter targets (toggleCustomColumnFilter)

Pattern → column value extraction:
- reportPatterns entries can be objects: {glob, regex?, values?}
- regex applied to matched filename basename; capture groups referenced via $0, $1, …
- Static string values also supported; null/omitted = empty
- Plain string entries still work (backward compat)
- resolveColumnValues() in extension.ts handles substitution

Custom column filters:
- Per-column filter chips rendered in #filter-custom section of filter bar
- OR logic within a column's values; AND logic between columns
- Active filters shown as removable chips in #active-filters
- getFiltered() checks filters.custom; matchesTerm() searches custom column values too

Log console:
- codeclimateVisualiser.showLogConsole setting (boolean, default false)
- When enabled: logs to "CodeClimate Visualiser" Output channel with timestamps
- Logs: pattern matches, file loads, errors

Charts:
- #charts-row: flex-wrap:nowrap + overflow-x:auto (horizontal scrollbar, no wrapping)

Test data:
- testdata/.vscode/codeclimate-visualiser.json updated with customColumns + pattern object
- outil=$0 (codeparser), sous-système=$1 (dispatch|gesmaj) via regex (\w+)-(\w+)\.json

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…olumn options

Sidebar (activity bar):
- New SourcesViewProvider (WebviewView) registered at codeclimateVisualiser.sourcesView
- Shows loaded reports list with × remove buttons
- Action buttons: Load from Config, Open Report(s)…, Clear All (when files loaded)
- Replaces file chips that were at top of main webview panel
- media/icon.svg added for activity bar container

Main webview:
- Title (h1) and file-chips removed from webview header; #header div gone
- Source column removed from table; sourceFile now shown in detail panel above fingerprint

Custom column new options (CustomColumn type):
- showFilter: boolean (default true) — control per-column filter badge visibility
- showChart: boolean (default false) — dynamically adds a pie chart for that column
- fromField: string — dot-path into issue (e.g. "location.path")
- fieldRegex: string — regex on field value; capture group = column value (per-issue)
- captureGroup: number (default 0) — which capture group to use

Field-based extraction (fromField + fieldRegex):
- Resolved per-issue via getIssueCustomValue(issue, colDef)
- Takes priority over file-level values from PatternEntry.values
- getNestedField() resolves dot-paths through issue object

Dynamic custom charts:
- Rebuilt on every renderCharts() call; stale cards destroyed and removed
- Chart cards appended to #charts-row; class chart-card-custom for identification
- Click isolates the column's filter value (same OR-toggle as other charts)

Test data updated:
- outil: from filename regex ($0 = "codeparser"), showChart+showFilter: true
- sous-système: from location.path via fieldRegex ".*/sous-systemes/(\\w+)/.*", showChart+showFilter: true

Schema updated with all new CustomColumn fields and examples.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Sidebar issues section: sort by severity/check name/file name (default:
  severity asc), toggleable direction; replaces filter UI
- File and tree views: groups/folders always sorted alphabetically; sort
  only affects ordering of issues within each file
- Fix: focus-in-table from sidebar now correctly requests snippet (was
  only triggered on direct row click, leaving "Loading snippet…" stuck)
- Files open in active editor group instead of always splitting beside
- Diagnostic logs always written to Output channel; removed showLogConsole
  setting

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Restore filter button (funnel) in sidebar alongside sort button; turns
  blue when filters are active; count shows filtered/total
- Filter dropdown: severity checkboxes, check name/file name text inputs,
  plus dynamic inputs for each custom column with showFilter !== false
- Rename CustomColumn.showFilter → showQuickFilter (main webview badge
  filter) to free the name; new showFilter controls sidebar filter panel
- Update webview.js quick-filter references to showQuickFilter
- Fix package.json trailing comma from earlier showLogConsole removal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Lock file was incomplete after merge conflict resolution — missing
transitive deps of @vscode/vsce@3.9.1. Full regeneration fixes npm ci.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Lefix2
Lefix2 merged commit 9b46bcc into main Apr 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant