smart-connections-view-command-flow
Installation
SKILL.md
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