smart-connections-view-command-flow
Smart Connections View and Command Flow
Use this skill when wiring Smart Connections views, commands, ribbon actions, settings-tab entry points, or workspace-leaf persistence so registration and teardown stay aligned with the plugin lifecycle.
Critical
- Put registration in
src/main.jsinsideSmartConnectionsPlugin extends SmartPlugin, and keep cleanup on the plugin lifecycle. Do not register commands, views, or workspace listeners from render callbacks. - Register each custom view once with
this.registerView(...); open it by its view type, not by creating ad hoc instances in commands. - Use
src/utils/view_leaf_location.jsfor any command that should reopen in the same pane or restore the previous leaf. Do not hand-roll leaf persistence. - Keep settings UI in
src/views/settings_tab.jsand reuserender_settings_configfromobsidian-smart-envinstead of building a separate settings renderer.
Instructions
-
Find the existing flow before changing anything.
- Inspect
src/main.js,src/views/connections_item_view.js,src/views/lookup_item_view.js,src/views/release_notes_view.js, andsrc/views/settings_tab.js. - Match the repo's naming pattern: existing files use
src/views/connections_item_view.jsandsrc/views/lookup_item_view.js, view classes usePascalCase, and view type strings are stable constants used byregisterView(...). Verify the closest existing view/command flow is identified before proceeding to the next step. This step uses the output from no prior step.
- Inspect
-
Build the new view shell in
src/views/connections_item_view.js-style files (for example,src/views/release_notes_view.jsfor command/panel pages).- Use Obsidian API imports from
obsidianthe same way the existing view files do. - Export a view class with the same lifecycle shape as the current views:
getViewType()
- Use Obsidian API imports from
More from zpankz/obsidian-skills
viva-llm
Use VIVA LLM for multi-provider chat, voice calls, terminal integration, assistants, skills, MCP tools, and agent mode inside Obsidian. Trigger when the user mentions VIVA LLM, voice chat, realtime voice, LLM providers in Obsidian, or vault-integrated AI chat.
1obsidian-plugin-accessibility
Use this skill when building or reviewing Obsidian plugin UI for keyboard access, ARIA labels, screen reader support, focus handling, or mobile touch targets. Accessibility is treated as mandatory, not optional.
1tasks
Create and query tasks using the Tasks plugin syntax including due dates, recurrence, priorities, and task queries. Use when the user mentions Tasks plugin, recurring tasks, task queries, or advanced task management in Obsidian.
1dataview
Create Dataview queries using DQL (Dataview Query Language), inline queries, and DataviewJS. Use when the user mentions Dataview, DQL, querying notes, listing notes by metadata, or creating dynamic views of vault content.
1defuddle
Extract clean markdown from web pages using Defuddle CLI, removing clutter to save tokens. Use when the user provides a URL to read or analyze.
1datacore
Create Datacore views using JSX/React syntax and the dc.* API. Use when the user mentions Datacore, dc.useQuery, JSX views, or React-based vault queries. Datacore is the successor to Dataview with better performance and interactive views.
1