Skip to content

feat: configurable actions, history path, decoration toggle, decoration stability#17

Open
Lefix2 wants to merge 41 commits intoclaude/codeclimate-error-visualizer-113GEfrom
feat/configurable-actions
Open

feat: configurable actions, history path, decoration toggle, decoration stability#17
Lefix2 wants to merge 41 commits intoclaude/codeclimate-error-visualizer-113GEfrom
feat/configurable-actions

Conversation

@Lefix2
Copy link
Copy Markdown
Owner

@Lefix2 Lefix2 commented May 6, 2026

Summary

  • Configurable actions — define shell/VS Code commands in .vscode/codeclimate-visualiser.json under actions[]; run from a new Actions tab; trigger on file save via onSave glob; chain via then; reload issues via refreshView; hide from tab via hidden
  • Configurable history pathhistoryPath in project config (relative or absolute); HistoryManager and panel updated when config reloads
  • Toggle in-file decorationscodeclimateVisualiser.showInFileDecorations setting + CodeClimate: Toggle In-File Decorations command
  • Decoration stability on save — skip applyDecorations re-apply when issue data hasn't changed; VS Code keeps tracking shifted ranges after edits

Test plan

  • Open testdata/ as workspace, run CodeClimate: Reload Config
  • Actions tab appears with 5 visible actions
  • Run "Echo Hello" → status turns green
  • Run "Failing Action" → status turns red with error message
  • Save a .ts file in testdata/src/ → "Grep Errors" triggers automatically, reports/grep-report.json regenerated, view refreshes
  • History snapshots saved to testdata/reports/history/ (not .vscode/)
  • CodeClimate: Toggle In-File Decorations hides/restores gutters; setting persists
  • Edit a decorated file, add lines before an issue → decoration shifts correctly; save → decoration stays at shifted position (no reset)

🤖 Generated with Claude Code

Lefix2 and others added 30 commits April 30, 2026 10:28
…-113GE

feat: sidebar sort/views, fix snippet focus, always-on logs
Replace the two real-project report files with a self-contained test
fixture that exercises all extension features:

Source files (testdata/src/):
  auth/auth.ts   — hardcoded secret, weak crypto, var/any/== issues
  api/router.ts  — SQL injection, credential logging, unused vars
  core/utils.c   — strcpy/memcpy overflows, null check, div-by-zero
  core/parser.h  — fixed arrays, raw pointer, global instance

Reports (testdata/reports/):
  eslint-report.json    — 12 TypeScript/style issues (minor→major)
  codeparser-report.json — 12 C/C++ issues (info→blocker, incl. other_locations)
  semgrep-report.json   — 11 cross-language security issues (major→blocker)

Config: two custom columns
  outil   — extracted from report filename via regex
  package — extracted from location.path via fromField/fieldRegex

Sidebar: fix applyFilters() to resolve fromField/fieldRegex columns
via getSidebarCustomValue(), mirroring the webview.js logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: replace testdata with generated mini-project
Both cases returned entries.length === 0 and showed the same misleading
'No patterns configured' message even when patterns were set but the
glob matched nothing.

Now checks getRawPatterns() before running the glob so each case gets
its own message:
- No patterns → 'No patterns configured. Create …'
- Patterns set, nothing matched → 'No files matched the configured patterns. Check your glob patterns…'
- Files matched but failed to load → 'Patterns matched files but none could be loaded. Check the Output channel…'

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: distinguish 'no patterns' from 'no files matched' in reloadConfig
… match; fix schema showQuickFilter; add tests

- findConfiguredFiles now returns {entries, errors} with typed PatternError (invalidRegex | fileNotFound | noFilesMatched)
- reloadConfig shows a distinct warning/error per pattern failure instead of a single generic message
- Added getRawPatterns helper so "no patterns" check runs before glob expansion
- Schema: renamed showFilter → showQuickFilter (main webview filter bar), added showFilter (sidebar panel)
- 50 tests passing: +5 customColumns tests in issueManager, +7 real-data assertions in parser

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

fix: distinct error messages, showQuickFilter schema fix, more tests
…, plugin icon

Replace the flat single-view webview with a 5-tab dashboard matching the
design system from the CodeClimate Dashboard prototype:

- Overview: KPI cards (Total / Blocker / Critical) + secondary row
  (Major / Minor / Info / Files), SVG donut with clickable severity legend,
  bar charts for Category / Check Names / Top Files / By Source
- Issues: severity toggle buttons, qf-chip filter bars per category /
  check name / custom column, search input, full expandable table
- Files: ranked file list with per-severity distribution bar
- Treemap: squarified layout with ResizeObserver, click-to-filter
- Trends: severity KPIs + source breakdown + check/category bars

Design system: CSS custom properties mapped to VS Code vars, new severity
palette (#c084fc / #f87171 / #fb923c / #fbbf24 / #71717a), Inter + JetBrains
Mono font stack, cards, donut, barchart, sev-toggle, qf-chip components.

Additional polish:
- Plugin icon redesigned (5 descending bars, currentColor for sidebar)
- Colored severity-bar icon in webview header and as tab iconPath
- Table sort indicator: full column header in accent color + filled ▲/▼
- BASE_COLS label "Check Name" → "Check" for uniform column headers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: dashboard redesign — 5-tab layout, SVG charts, severity palette, plugin icon
Add workflow_dispatch trigger with publish toggle, and a dedicated
"Publish to VS Code Marketplace" step (vsce publish via VSCE_PAT secret).
Marketplace publish and GitHub Release creation only fire on version tags;
manual dispatch can package without publishing by setting publish=false.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add semantic-release + plugins (commit-analyzer, release-notes-generator,
  npm, git, github) — bumps package.json version, commits, tags, and creates
  GitHub Release automatically on push to main
- Add semantic-release.yml workflow (triggers on main push)
- Update release.yml: sync version from git tag before packaging so VSIX
  name matches the release (e.g. codeclimate-visualiser-1.2.3.vsix);
  upload VSIX to existing GitHub Release via gh CLI; add manual version input
- Add .releaserc.json config (no npm publish, VSIX upload deferred to release.yml)

Commit message convention → version bump:
  fix:  → patch (1.0.x)
  feat: → minor (1.x.0)
  BREAKING CHANGE: → major (x.0.0)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: automate VS Code Marketplace release
Storage: append-only NDJSON at .vscode/codeclimate-visualiser.history.ndjson

Fingerprint resolution (HistoryManager):
- native:  issue.fingerprint used directly
- derived: sha1(check_name:path:line) when fingerprint absent
- volatile: sha1(check_name:description) as last resort
  derived/volatile shown with ⚠ warning in diff

Sidebar (SourcesViewProvider):
- New "History" collapsible section showing snapshots newest-first
- Each entry: label, date, total count, +new/-fixed diff vs previous, ⚠ if derived
- Save icon button in History header → runs saveSnapshot command
- Delete button per snapshot

Command: CodeClimate: Save History Snapshot
- Prompts for optional label (e.g. v1.2.3, sprint-42)
- Saves current loaded issues as snapshot

Trends view (buildTrendsView):
- 0 snapshots → save-first prompt
- 1 snapshot  → severity KPI cards
- 2+ snapshots → SVG line chart (total + per-severity overlays),
  new/fixed/persisting diff KPIs, full snapshot table with
  inline label editing, delta indicators, delete per row

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Sidebar: click report filename → opens JSON in editor (vscode.open)
- History diff now compares current loaded issues vs last snapshot
  (not snapshot vs snapshot) — uses computeCurrentState() fingerprints
- Trends view redesigned to match Claude Design prototype:
  * 3 header cards with colored left stripe (Introduced/Fixed/Net)
  * New vs Fixed SVG area chart with area fills and dots per data point
  * Per-severity mini-cards with ▲/▼ delta + sparkline
  * Full line chart including current state as rightmost point
- Overview KPI cards now show ▲/▼ delta vs last snapshot + sparklines
- KPI secondary row (Major/Minor/Info) shows delta arrows
- CSS: kpi-delta, kpi-spark, kpi-sev-delta, trend-card-stripe styles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: history tracking — manual snapshots, fingerprint diff, trends view
…ar icons

- History panel: manual snapshots saved to NDJSON, fingerprint-based diff
- Trends view: sparklines, per-severity evolution, snapshot comparison
- New-issue indicators: red badge + filter chip vs last snapshot
- Clickable KPIs/bars/sparklines/rows → Issues view with correct filters
- Click-to-open: issue location opens file at correct line
- Sidebar reload-config button in Reports section
- Sidebar icons: @vscode/codicons (refresh, collapse-all, filter, tag, …)
- Collapse-all button for Issues tree/file groups
- History section: scrollable, capped height (~3 entries)
- Debug: pre-launch task seeds 10 realistic snapshots spanning 11 weeks
- Fix: severity active-filter chips missing on badge click
- Fix: section icons hidden when collapsed, visible on expand

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: history tracking, issue indicators, clickable navigation, sidebar icons
gh release upload fails with "release not found" when no release object
exists for the tag. This can happen when the tag is pushed without
semantic-release, or when re-running a failed job after the release was
not yet created. The new step runs gh release view first and only creates
the release if it is absent, so existing releases (created by
semantic-release) are left untouched.

https://claude.ai/code/session_01V2Cfo3mjjVxW1iuVhavsXp
fix: create GitHub Release before uploading VSIX if it does not exist
semantic-release now requires ^22.14.0 || >=24.10.0 and was failing
with Node 20.

https://claude.ai/code/session_01V2Cfo3mjjVxW1iuVhavsXp
semantic-release now requires ^22.14.0 || >=24.10.0 and was failing
with Node 20.

https://claude.ai/code/session_01V2Cfo3mjjVxW1iuVhavsXp
…ersion

fix: bump Node to 22 in semantic-release workflow
The plugin commits the version-bumped package.json directly to main,
which fails because main requires PRs. The version is already synced
from the tag in release.yml via npm version --no-git-tag-version, so
this commit-back step is redundant.

https://claude.ai/code/session_01V2Cfo3mjjVxW1iuVhavsXp
…ted-branch

fix: remove @semantic-release/git to avoid push to protected main
fix: bump Node to 22 in semantic-release workflow
- README: full marketplace-facing doc with 4 screenshots (overview, issues,
  sidebar/decorations, trends), getting started, config, commands, settings
- docs/index.md: technical reference — architecture, source map, data flow,
  key types, history/fingerprinting, webview protocol, custom columns, release
- .github/workflows/pages.yml: publish docs/ to GitHub Pages on merge to main
- .github/workflows/release.yml: fix version sync — consolidate tag/input/
  latest-tag fallback into single step; add fetch-depth:0 for git tag access
- package.json: add top-level "icon": "media/icon.png" for VS Code Marketplace
- media/icon-color.svg: colored SVG source (128x128) for PNG icon generation
- .vscodeignore: exclude tmp_for_claude/ and media/icon-color.svg from VSIX

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TREFOU Felix and others added 11 commits May 5, 2026 09:41
Wires mousemove on New vs Fixed and Total Issues Over Time charts.
Moving cursor shows a floating tooltip next to pointer with:
- New vs Fixed: snapshot label/date, new count (red), fixed count (green)
- Total Issues: date/label, total, per-severity breakdown
A thin vertical crosshair follows the cursor for precise point reading.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Crosshair snaps to nearest data point using live SVG getBoundingClientRect
- Charts rendered at exact card pixel width via DOM measurement before build
- ResizeObserver on container rebuilds SVGs on panel resize (grow + shrink)
- overflow:hidden + min-width:0 on .card/.trend-chart-area/.kpi-sev allows
  CSS layout to drive width freely; #dashboard min-width:500px sets global floor
- New maxChartSnapshots setting (default 20) limits points shown in trend charts
- Slices to last N snapshots for both New-vs-Fixed and Total Over Time charts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace [SEVERITY] tag and lines/file footer with a colored circle emoji
(🟣🔴🟠🟡🔵) matching severity, bold check name, and italic description.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: responsive trend charts, hover crosshair, snapshot limit, tooltip improvements
…refresh

Add an Actions system to codeclimate-visualiser.json:
- Define shell or VS Code commands as named actions
- Actions tab in the dashboard (hidden when no actions configured)
- Run button per action with live status indicator (idle/running/success/error)
- Trigger actions automatically on file save via glob patterns (onSave)
- Chain actions sequentially via 'then' field
- Refresh loaded issues from report files after action via refreshView
- 'hidden' flag to suppress an action from the tab while still allowing triggers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cover: simple shell command, VS Code command, action chain, auto-reload
on file save (hidden), and a failing action for error state display.

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

Add testdata/scripts/grep-errors.js: greps 'error' in src/, writes
reports/grep-report.json in CodeClimate format with fingerprints.
Action triggers automatically on src file save and refreshes the view.
Initial grep-report.json included (2 issues from router.ts).

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

VS Code automatically tracks and shifts decoration ranges as the document
is edited. Any call to applyDecorations() overwrites these tracked positions
with the static line numbers from the report. Guard with a per-URI hash of
applied issue IDs: skip re-application if the data hasn't changed, so
VS Code's range tracking is preserved across saves.
refreshAllEditors() clears the hash map to force re-apply when issue data
actually changes.

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

Toggle decorations:
- New setting codeclimateVisualiser.showInFileDecorations (bool, default true)
- New command 'CodeClimate: Toggle In-File Decorations' flips the setting,
  clears or restores decorations immediately, shows info message

Configurable history path:
- New ProjectConfig.historyPath field in codeclimate-visualiser.json
- Relative paths resolved from workspace root; absolute paths used as-is
- HistoryManager.historyPath exposed as readonly for external use
- Applied on autoLoadFromConfig and reloadConfig; default unchanged

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

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

panel stores historyManager as a private member set at construction time.
applyHistoryPath() reassigned the local let variable but the panel kept
the stale reference. Add setHistoryManager() to CodeClimatePanel and call
it whenever applyHistoryPath() creates a new instance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Lefix2 Lefix2 force-pushed the feat/configurable-actions branch from f4a047e to 5736f1f Compare May 6, 2026 21:27
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.

2 participants