Class BowireHelpRailContribution

Namespace
Kuestenlogik.Bowire.Help
Assembly
Kuestenlogik.Bowire.Help.dll

Help rail contribution (#324). Hoists the in-app docs out of the unified right-side drawer into a full rail with the standard left-sidebar + main-pane shape every other rail uses.

public sealed class BowireHelpRailContribution : IBowireRailContribution
Inheritance
BowireHelpRailContribution
Implements
Inherited Members

Remarks

Lives inside Kuestenlogik.Bowire.Help alongside the existing IBowireHelpProvider implementation (MarkdownHelpProvider). The single-package convention (one topic = one NuGet) keeps the embedded-host pluggability contract simple: hosts that reference Kuestenlogik.Bowire.Help get both the docs provider AND the rail; hosts that don't reference it lose both — same posture as today, no rail icon, no provider endpoints.

The rail's sidebar (search box + topic-tree nav) and main pane (rendered markdown body, full width) are rendered by JS code that lives in core's help.js — the descriptor only opts the rail into the strip + Settings catalogue. The same morphdom click-fix from commit a6a0b95 (re-resolve topic id at click time via data-help-topic-id) carries over to the sidebar's topic rows.

Constructors

BowireHelpRailContribution()

public BowireHelpRailContribution()

Properties

DefaultEnabled

Whether the rail is part of the always-on minimum set. Always-on rails cannot be disabled via Settings → Rail modes (the checkbox renders greyed with a "Built-in" badge). Set false for every rail the operator might reasonably want to switch off.

public bool DefaultEnabled { get; }

Property Value

bool

DisplayName

Human-readable label shown in the rail tooltip + Settings.

public string DisplayName { get; }

Property Value

string

Group

Visual group the rail belongs to. Adjacent rails with different group values get a divider between them. Built-in groups: "work", "scenarios", "quality", "hardening". New groups land at the bottom of the rail by default.

public string Group { get; }

Property Value

string

Remarks

Own 'help' group so the rail-divider logic draws a separator above Help, visually parking it as the rail's terminal entry (mirroring the way Home is anchored at the top via its own 'home' group).

IconKey

Icon key from the workbench's SVG-icon catalogue (e.g. "house", "discover", "shield"). Resolved JS-side via svgIcon(key). Unknown keys fall back to a generic square placeholder.

public string IconKey { get; }

Property Value

string

Remarks

Uses the shared help life-ring glyph (the same helpers.js svgIcon the topbar help button renders) so the rail and the quick-access topbar affordance read as one consistent "Help" surface — the topbar button now switches into this rail rather than toggling the old drawer.

Id

Stable identifier (e.g. "discover", "recordings", "security"). Must match the rail-mode id the JS bundle uses for routing — operators' localStorage.bowire_rail_mode values + deep links key off this. Case-sensitive (snake-lower).

public string Id { get; }

Property Value

string

MainPaneRendererKey

Identifier of a JS-side function the rail package's JS fragment registers on window.__bowireRailRenderers at load time. The core renderMain dispatcher looks up the renderer by id and invokes it instead of hard-coding the per-rail branch. Empty / null means "no rail-owned renderer; fall back to the core dispatcher arm".

public string? MainPaneRendererKey { get; }

Property Value

string

Remarks

Convention: railId + 'Main' (e.g. "recordingsMain", "benchmarksMain"). The hosted JS fragment writes window.__bowireRailRenderers["recordingsMain"] = function () { ... }; inside the shared IIFE. The renderer takes no arguments and returns the DOM root for the main pane.

RequiresWorkspace

When true, the rail's view only makes sense inside an active workspace (Recordings / Mocks / Collections / Flows / Benchmarks / Compose — anything that persists artefacts to a workspace folder). The rail button stays clickable (so tour spotlighting + the rail strip's tab semantics keep working) but a click without an active workspace redirects the operator to the Home rail, where the "Create your first workspace" CTA lives, and fires an explanatory toast. Defaults to false — rails that work standalone (Home, Discover, Traffic, Workspaces, Security, Settings) stay reachable at all times.

public bool RequiresWorkspace { get; }

Property Value

bool

Remarks

Help reads as global reference material, not workspace-scoped content — it stays reachable from a brand-new install with no workspaces yet, same as Home / Discover / Settings.

SidebarKind

Sidebar template the rail renders. Recognised values: "none", "services", "collections", "environments", "recordings", "mocks", "workspaces", "sources", "benchmarks", "flows", "proxy", "security", "library". Adding a new value requires a matching arm in render-sidebar.js's dispatcher — see the sidebar.kind comment block in that file.

public string SidebarKind { get; }

Property Value

string

SidebarRendererKey

Identifier of a JS-side function the rail package's JS fragment registers on window.__bowireRailRenderers at load time. The core renderSidebar dispatcher looks up the renderer by id and invokes it instead of hard-coding the per-rail branch. Empty / null means "no rail-owned renderer; fall back to the core dispatcher arm" — so the slice can be moved incrementally rail-by-rail without breaking the bundle.

public string? SidebarRendererKey { get; }

Property Value

string

Remarks

Convention: railId + 'Sidebar' (e.g. "recordingsSidebar", "proxySidebar"). The hosted JS fragment writes window.__bowireRailRenderers["recordingsSidebar"] = function () { ... }; inside the shared IIFE. The renderer takes no arguments and returns the DOM root to mount as the sidebar — same contract as the legacy renderRecordingsSidebar() &c. arms.

SortIndex

Sort priority. Lower values appear higher in the rail strip. The built-in catalogue uses 100-step intervals so third-party rails can wedge between two built-ins without re-numbering everything.

public int SortIndex { get; }

Property Value

int

Remarks

Sits at the bottom of the rail strip alongside the other admin / operator-info surfaces. Built-in sort indices use 100-step intervals (Home=100, Discover=200, Compose=300, …, Workspaces=1200); 9500 leaves plenty of room for future rails to wedge in front of Help without re-numbering.