Skip to content

verso-v1.0.19

Choose a tag to compare

@github-actions github-actions released this 13 May 00:32
· 130 commits to main since this release

Release adding cell execution cancellation (Stop), persisted per-cell view state with a built-in Clear Output toolbar action, image rendering in presentation and dashboard layouts, smarter NuGet resolution with transitive dependency tracking and provider auto-resolve, plus a fix that stops auto-running cells when switching to the presentation layout.

Thanks to @eosfor for contributing PRs #49, #50, and #52 in this release.

New: Cell Execution Cancellation

  • New CancelCellAsync on INotebookService; RemoteNotebookService routes via RPC and ServerNotebookService cancels through a CancellationTokenSource
  • Stop button replaces Run on cells whose language exposes cancellation; OnCancelCell is wired through Dashboard, Grid, Cell, and the WASM and Blazor Server notebook pages
  • ExecutionPipeline surfaces cancellation as a cancelled ExecutionResult; ExecutionHandler treats cancellation as a normal cancelled outcome rather than an error
  • Language DTOs carry a SupportsCancellation flag so the UI only renders Stop where it works; certain runners (the Jint JS runner) are marked non-cancellable
  • Jint JS runner timeout reduced to 15 seconds with adjusted error messages
  • CSS for the stop button; CellTests updated to assert Stop is enabled during execution, falling back to checking a disabled Run for kernels without cancellation support

New: Persisted Cell View State and Clear Output Action

  • New CellViewStateMetadata keys persist per-cell input-collapse state and output-visibility state in cell metadata
  • Host protocol round-trips metadata changes through notebook DTOs, so view state survives reload; both ServerNotebookService and RemoteNotebookService update metadata through their respective local and remote paths
  • New built-in ClearCellOutputAction toolbar action removes the selected cell's output through a host-level code path
  • Host tests cover metadata round-tripping and clear-output behavior; the Blazor.Shared test fake gains the new cell view state methods

New: Cell Visibility Metadata Renamed and Migrated

  • Metadata key renamed from verso:visibility to verso:ui.layoutVisibility; the constant lives in a new CellLayoutVisibilityMetadata type used by the property provider, resolver, remote service, and docs
  • LegacyMetadataMigrator runs at notebook open in NotebookHandler and rewrites the legacy key so older .verso files keep loading; legacy key is scheduled for removal in 1.0.22
  • Tests for the migrator added; existing tests updated to the new key

New: Image Outputs in Presentation and Dashboard Layouts

  • PresentationView.razor, DashboardCell.razor, and the HTML-producing PresentationLayout now render image/* MIME types as <img> data URIs, matching the regular cell renderer
  • Existing HTML, Markdown, plain text, and fallback MIME handling is preserved
  • Ordinal MIME matching is used for the image prefix check

Improved: NuGet Resolution and Provider Auto-Resolve

  • #!sql-connect automatically resolves a NuGet-based provider when an explicit provider is given but not already loaded; inner exception chains are walked for clearer error reporting
  • CSharpKernel always re-publishes the cumulative set of NuGet assembly paths so later magic commands can locate assemblies even after intervening non-#r cells
  • "Installed Packages" feedback now surfaces transitive dependencies alongside direct references
  • Runtime assembly loading prefers exact package-version candidates; a private isolation AssemblyLoadContext is used as a fallback when TPA or version conflicts occur; unix is added as an RID fallback on macOS
  • NuGetPackageResolver records the full transitive (id, version) result set, extracts platform-specific managed assets from runtimes/{rid}/lib/{tfm}/ (overwriting the lib/ stubs), registers package directories after extraction, and limits framework-package skipping to the core runtime meta-packages
  • Cache schema suffix bumped; tests updated to accept the new cache root layout

Improved: Extensions Directory Loading

  • New NotebookServiceOptions host-level singleton carries the optional ExtensionsDirectory path
  • ServerNotebookService centralizes loading in LoadExtensionsAsync (built-ins first, then the optional directory) and replaces repeated direct LoadBuiltIn calls
  • BlazorHostBuilder registers the options using the CLI --extensions path so the in-process ExtensionHost mirrors the other extension-loading entry points

Improved: Cell Display Properties and UI

  • CellPropertiesPanel subscribes to OnNotebookChanged (with corrected subscription scoping) and refreshes via LoadSectionsAsync when the notebook changes
  • CellDisplayPropertyProvider builds the field list incrementally, only exposes input-collapse fields for code cells (SupportsInputCollapse), and simplifies preview-style normalization and persistence
  • PropertyFieldComponent checkbox handling uses IsToggleChecked to support bool, JsonElement, and string boolean values
  • Cell.razor action button titles drop the hardcoded "Export" prefix
  • Unit test added to ensure input fields are omitted for non-code cells

Improved: Shared Panel Title Mapping

  • New Verso.Blazor.Shared.Models.PanelDisplayNames.For replaces duplicated private methods in the WASM and Components NotebookPage.razor
  • Preserves the special-case mapping ("properties" produces "CELL PROPERTIES") and falls back to ToUpperInvariant for unknown ids
  • Unit tests cover known panels, the properties special case, and the fallback path

Improved: Preview Styles for Cell Source and Outputs

  • New .verso-cell-source-preview provides a bordered, rounded container for collapsed input previews
  • New .verso-cell-output-summary styles the dashed "N output(s) hidden" summary box
  • .verso-cell-outputs--preview and .verso-cell-rendered-input--preview use -webkit-line-clamp for text and error previews and cap rendered HTML output at 160 pixels
  • Uses existing CSS variables so previews honor theming

Improved: Host stderr Log Severities

  • Lines from the host prefixed with [Verso] are treated as informational (logged at info, prefix stripped); untagged stderr is logged at warning rather than error
  • Reduces noisy error logs on routine notebook open while still surfacing likely unhandled exceptions appropriately

Fixed: Auto-Run on Presentation Layout Switch

  • Both WASM and Blazor Server NotebookPage no longer call HandleRunAll() when the active layout becomes presentation
  • Existing outputs remain visible; cells execute only on explicit Run or Run All actions
  • Presentation layout rendering is otherwise unchanged

Fixed: Trailing Newline in PlainTextRenderer

  • PlainTextRenderer strips trailing CR and LF from cell output via TrimEnd('\r', '\n') before clipping, so bordered output panels no longer end with an empty row
  • Internal blank lines authored by the cell are preserved