Registry view with element dialog; Elements and Connectors panels under diagrams

- .archify-registry opens in a new read-only custom editor (archify.registry,
  default): the file's elements as cards; click one for a dialog with its
  description, the defining line (opens the YAML) and the diagrams that use
  it (open on click); Show Source and Open Model work from the view
- the same dialog opens from the registry cards on the model page
- Archify's node index is titled Elements; a Connectors panel built from the
  SVG edges lists from → to with the label, highlights on hover and keeps the
  highlight on click; side by side in the bottom rail
- integration test for the registry view; docs and changelog
This commit is contained in:
2026-10-19 13:53:14 +03:00
parent 36bccb69a5
commit b9676ece83
11 changed files with 535 additions and 42 deletions
+3 -1
View File
@@ -2,12 +2,14 @@ import * as vscode from 'vscode';
import { HTML_VIEW_TYPE, HtmlViewerProvider } from '../views/htmlViewer';
import { ModelService } from '../model/service';
import { DiagramViewManager } from '../views/diagramView';
import { RegistryViewProvider } from '../views/registryView';
/** What command handlers share: the extension context and the open views. */
export interface CommandContext {
extension: vscode.ExtensionContext;
views: DiagramViewManager;
htmlViewer: HtmlViewerProvider;
registry: RegistryViewProvider;
models: ModelService;
}
@@ -18,7 +20,7 @@ export function isHtmlUri(uri: vscode.Uri): boolean {
/** The file a command applies to: explicit argument, focused preview or viewer, then the text editor. */
export function targetUri(ctx: CommandContext, arg?: unknown): vscode.Uri | undefined {
if (arg instanceof vscode.Uri) return arg;
return ctx.views.activePreview?.uri ?? ctx.htmlViewer.activeUri ?? vscode.window.activeTextEditor?.document.uri;
return ctx.views.activePreview?.uri ?? ctx.registry.activeUri ?? ctx.htmlViewer.activeUri ?? vscode.window.activeTextEditor?.document.uri;
}
export function sourceUri(ctx: CommandContext, arg?: unknown): vscode.Uri | undefined {