Add inline error decorations for previews and editor - #32
Merged
Conversation
Diagnostics were validated by the LSP but only visible in the Problems panel and as editor squiggles. Surface them where users actually look: - Preview row markers: a leading status column shows a severity glyph, row tint, and tooltip for every row whose source line has a diagnostic; clicking reveals that line in the editor. Wired into the shared VirtualTable and the VCF preview, covering 13 previews. Non-line previews degrade to no markers. - Editor gutter icons for error/warning lines — the one decoration VS Code does not render from published diagnostics. - A diagnostic navigation bar with error/warning counts (labelled "in view") and next/previous cycling, also driven by F8 / Shift+F8 while a preview is focused, scoped by a biofmtPreviewFocused context key so it never shadows the editor's own F8. - Preview panels now report their viewport, so viewport-aware validation covers what the table shows. Editor and preview viewports are tracked per source and validated as a union via a new VisibleRangeTracker. Adds DiagnosticBridge and DiagnosticGutter services, a shared vscode-free diagnostics module, and webview DiagnosticsContext/RowStatus/DiagnosticNav, with unit tests (diagnostics transform, visible-range union) and component tests (context, row marker, navigation).
This was referenced Jul 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The LSP already validates omics files, but diagnostics were only visible in the Problems panel and as editor squiggles — the previews, the strongest surface of the extension, were diagnostic-blind. This surfaces existing diagnostics where users actually look, without re-implementing what VS Code already renders (squiggles, overview ruler, minimap, editor
F8).What's new
[CODE] messagefor every row whose source line has a diagnostic. Clicking a marker reveals that line in the text editor. Wired into the sharedVirtualTableand the VCF preview, so 13 previews get it from one code path; chart/tree/sequence previews degrade gracefully to no markers.F8/Shift+F8while a preview is focused, scoped by abiofmtPreviewFocusedcontext key so it never shadows the editor's ownF8.VisibleRangeTracker.Design notes
src/shared/diagnostics.ts) andVisibleRangeTrackerare kept free of anyvscodeimport, so they unit-test under Mocha.New modules
services/DiagnosticBridge.ts,services/DiagnosticGutter.ts,shared/diagnostics.ts, two gutter SVGs undermedia/.visibleRanges.ts(VisibleRangeTracker).diagnostics/DiagnosticsContext.tsx,components/RowStatus.tsx,components/DiagnosticNav.tsx.Testing
test/unit/diagnostics.test.ts,test/unit/visible-ranges.test.ts.DiagnosticsContextgrouping/counts/worst-severity,RowStatusglyph/tooltip/click-to-reveal,DiagnosticNavcounts and cycling.