How devabdallahabdelrahim/obsidian-vtabs-engine works
VTabs Engine is an Obsidian plugin that mirrors workspace leaves into a persistent, nested tab-and-group tree and presents that tree in a vertical sidebar. The principal flow is Obsidian workspace events → synchronized store → React tree view; users can search, reorder, manage groups and tabs, and split group workspaces. Settings, icons, persistence, deduplication, and zoom support that workflow. Edges are limited to relationships stated in the README or visible in the supplied excerpts and SOURCE INDEX; unsampled subsystems are included where documented, without guessing their internal wiring.
Main entry points: tab-store.ts Reactive tab store · main.ts Plugin entry · VirtualTabList.tsx Virtual tab list · TabGroupNode.tsx Group renderer
Components 25
Plugin lifecycle
- Plugin entry
src/main.ts - Workspace event adapter
src/adapter/obsidian-events.ts - Plugin settings
src/settings/setting-tab.ts - Plugin context
src/ui/context/plugin-context.tsx - Settings model
src/types/plugin-settings.ts
Tree and state
- Reactive tab store
src/store/tab-store.ts - Tree node model
src/types/tree.ts - Tree persistence
src/utils/persistence.ts - Tab deduplication
src/features/deduplication/deduplication.service.ts - Tree search and ordering
src/utils/tree-utils.ts
Sidebar experience
- Sidebar view bridge
src/ui/types/view-container.ts - Virtual tab list
src/ui/components/VirtualTabList.tsx - Group renderer
src/ui/components/TabGroupNode.tsx - Tab renderer
src/ui/components/TabItemNode.tsx - Icon resolution
src/engine/icon-engine.ts - Obsidian icon
src/ui/components/ObsidianIcon.tsx - Group and tab modals
src/modals - Sidebar styling
src/styles
Workspace features
- Workspace group split
src/features/group-workspace-split/group-split.service.ts - Split controls
src/features/group-workspace-split - Tree zoom
src/features/tree-zoom/useTreeZoom.ts - Zoom controls
src/features/tree-zoom/ZoomControls.tsx - Leaf focus guards
src/utils/focus-guards.ts
Other components
- Obsidian user
- Obsidian workspace
Connections 39
- Obsidian user → Obsidian workspace: uses plugin
README.md - Plugin entry → Reactive tab store: hydrates tree
src/main.ts - Plugin entry → Workspace event adapter: registers events
src/main.ts - Plugin entry → Sidebar view bridge: registers view
src/main.ts - Plugin entry → Plugin settings: opens settings
src/main.ts - Plugin entry → Settings model: loads settings
src/main.ts - Workspace event adapter → Reactive tab store: syncs leaves
src/adapter/obsidian-events.ts - Workspace event adapter → Tab deduplication: uses deduplication
src/adapter/obsidian-events.ts - Reactive tab store → Tree persistence: serializes tree
src/store/tab-store.ts - Reactive tab store → Tree node model: models nodes
src/store/tab-store.ts - Tab deduplication → Reactive tab store: updates tabs
src/features/deduplication/deduplication.service.ts - Tab deduplication → Leaf focus guards: guards focus
src/features/deduplication/deduplication.service.ts - Sidebar view bridge → Plugin context: provides plugin
src/ui/types/view-container.ts - Sidebar view bridge → Virtual tab list: renders list
src/ui/types/view-container.ts - Virtual tab list → Reactive tab store: reads tree state
src/ui/components/VirtualTabList.tsx - Virtual tab list → Tree search and ordering: filters tree
src/ui/components/VirtualTabList.tsx - Virtual tab list → Group renderer: renders groups
src/ui/components/VirtualTabList.tsx - Virtual tab list → Tab renderer: renders tabs
src/ui/components/VirtualTabList.tsx - Virtual tab list → Zoom controls: renders controls
src/ui/components/VirtualTabList.tsx - Group renderer → Reactive tab store: mutates groups
src/ui/components/TabGroupNode.tsx - Group renderer → Tree search and ordering: gets siblings
src/ui/components/TabGroupNode.tsx - Group renderer → Icon resolution: resolves icon
src/ui/components/TabGroupNode.tsx - Group renderer → Group and tab modals: opens modals
src/ui/components/TabGroupNode.tsx - Group renderer → Split controls: renders split control
src/ui/components/TabGroupNode.tsx - Tab renderer → Reactive tab store: mutates tabs
src/ui/components/TabItemNode.tsx - Tab renderer → Tree search and ordering: gets siblings
src/ui/components/TabItemNode.tsx - Tab renderer → Icon resolution: resolves icon
src/ui/components/TabItemNode.tsx - Tab renderer → Group and tab modals: opens modals
src/ui/components/TabItemNode.tsx - Tab renderer → Split controls: renders split control
src/ui/components/TabItemNode.tsx - Obsidian icon → Icon resolution: applies icon
src/ui/components/ObsidianIcon.tsx - Split controls → Workspace group split: invokes split
src/features/group-workspace-split/GroupSplitButton.tsx - Workspace group split → Reactive tab store: detaches tabs
src/features/group-workspace-split/group-split.service.ts - Workspace group split → Leaf focus guards: guards leaf actions
src/features/group-workspace-split/group-split.service.ts - Workspace group split → Obsidian workspace: rearranges leaves
README.md - Zoom controls → Tree zoom: uses zoom hook
src/features/tree-zoom/ZoomControls.tsx - Tree zoom → Plugin context: reads settings
src/features/tree-zoom/useTreeZoom.ts - Tree zoom → Plugin entry: saves zoom
src/features/tree-zoom/useTreeZoom.ts - Plugin settings → Plugin entry: saves settings
src/settings/setting-tab.ts - Plugin context → Plugin entry: subscribes settings
src/ui/context/plugin-context.tsx