# r0stefan/vivaldi-tree-style-tabs architecture

> Architecture diagram of the GitHub repository r0stefan/vivaldi-tree-style-tabs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/r0stefan/vivaldi-tree-style-tabs
- Repository: https://github.com/r0stefan/vivaldi-tree-style-tabs

## Overview

TreeTabsVivaldi is a Vivaldi browser-UI modification that mounts a vertical, hierarchical tab panel. The main workflow runs from the browser UI through startup and tab-state coordination to rendering; user actions update the tree and native browser tabs, with persistence supporting restart recovery. Separate capabilities include workspace/tiling integration, folders and bookmark restoration, configurable panel behavior, and a Windows tray updater that checks GitHub and reapplies the patch. The architecture follows README claims and sampled modules; updater internals and some feature wiring are not fully sampled.

Main entry points: [`src/entry.js`](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/entry.js) (Mod Entry), [`src/store/tab-store.js`](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/tab-store.js) (Tab Coordinator), [`src/controllers/tree-controller.js`](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/controllers/tree-controller.js) (Tree Controller), [`updater/main.go`](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/updater/main.go) (Updater Runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup and UI"]
  node_entry["Mod Entry<br/>[entry.js]"]
  node_bootstrap["Mount and Wait<br/>[mount-root.js]"]
  node_renderer["Panel Renderer<br/>[render.js]"]
  node_styles["Panel Styles<br/>[styles.js]"]
  node_layout["Layout Adapter<br/>[layout.js]"]
  node_theme["Theme Adapter<br/>[theme.js]"]
end

subgraph group_tab_domain["Tabs and Tree"]
  node_tab_store["Tab Coordinator<br/>[tab-store.js]"]
  node_tree_controller["Tree Controller<br/>[tree-controller.js]"]
  node_native_reconcile["Native Reconcile"]
  node_tree_store["Tree State<br/>[tree-store.js]"]
  node_tree_selectors["Tree Selectors<br/>[tree-selectors.js]"]
  node_tree_persistence["Tree Persistence"]
  node_settings["Settings State<br/>[settings-store.js]"]
  node_selection["Selection State<br/>[selection-store.js]"]
  node_drag["Drag State<br/>[drag-store.js]"]
  node_folder_page["Folder Pages<br/>[folder-page.js]"]
end

subgraph group_integrations["Browser Integrations"]
  node_tabs_api["Tabs and Bookmarks API<br/>[tabs-api.js]"]
  node_bridge["Vivaldi Bridge<br/>[vivaldi-bridge.js]"]
  node_relations["Tab Relations<br/>[tab-relations.js]"]
end

subgraph group_updater["Windows Updater"]
  node_updater_main["Updater Runtime<br/>[main.go]"]
  node_updater_modules["Updater Services"]
end

node_user(("Vivaldi User"))
node_browser(("Vivaldi UI"))
node_vivaldi_services(("Vivaldi Browser Services"))
node_github(("GitHub Releases"))
node_vivaldi_install[("Vivaldi Installation")]

node_browser -->|"loads mod"| node_entry
node_entry -->|"mounts panel"| node_bootstrap
node_bootstrap -->|"injects styles"| node_styles
node_entry -->|"coordinates tabs"| node_tab_store
node_entry -->|"renders state"| node_renderer
node_entry -->|"starts layout"| node_layout
node_entry -->|"starts theme"| node_theme
node_entry -->|"tracks selection"| node_selection
node_entry -->|"tracks drag"| node_drag
node_user -->|"uses panel"| node_renderer
node_renderer -->|"dispatches actions"| node_tab_store
node_tab_store -->|"coordinates tree"| node_tree_controller
node_tab_store -->|"reconciles tabs"| node_native_reconcile
node_tab_store -->|"operates tabs"| node_tabs_api
node_tab_store -->|"updates folder URLs"| node_folder_page
node_tree_controller -->|"changes tree"| node_tree_store
node_tree_controller -->|"derives tree views"| node_tree_selectors
node_tree_controller -->|"persists tree"| node_tree_persistence
node_tree_controller -->|"resolves parents"| node_relations
node_tab_store -->|"reads settings"| node_settings
node_tabs_api -->|"uses browser APIs"| node_vivaldi_services
node_bridge -->|"accesses native features"| node_vivaldi_services
node_tab_store -.->|"integrates workspaces"| node_bridge
node_updater_main -->|"invokes services"| node_updater_modules
node_updater_main -->|"checks and downloads"| node_github
node_updater_main -->|"patches installation"| node_vivaldi_install
node_vivaldi_install -.->|"runs patched UI"| node_browser

click node_entry "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/entry.js"
click node_bootstrap "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/bootstrap/mount-root.js"
click node_renderer "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/ui/render.js"
click node_styles "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/ui/styles.js"
click node_layout "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/adapters/layout.js"
click node_theme "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/adapters/theme.js"
click node_tab_store "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/tab-store.js"
click node_tree_controller "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/controllers/tree-controller.js"
click node_native_reconcile "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/controllers/native-reconcile.js"
click node_tree_store "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/tree-store.js"
click node_tree_selectors "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/tree-selectors.js"
click node_tree_persistence "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/tree-persistence.js"
click node_settings "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/settings-store.js"
click node_selection "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/selection-store.js"
click node_drag "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/drag-store.js"
click node_folder_page "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/ui/folder-page.js"
click node_tabs_api "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/adapters/tabs-api.js"
click node_bridge "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/adapters/vivaldi-bridge.js"
click node_relations "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/adapters/tab-relations.js"
click node_updater_main "https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/updater/main.go"
click node_updater_modules "https://github.com/r0stefan/vivaldi-tree-style-tabs/tree/main/updater"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_bootstrap,node_renderer,node_styles,node_layout,node_theme,node_user,node_browser,node_vivaldi_services toneBlue
class node_tab_store,node_tree_controller,node_native_reconcile,node_tree_store,node_tree_selectors,node_tree_persistence,node_settings,node_selection,node_drag,node_folder_page,node_vivaldi_install toneAmber
class node_tabs_api,node_bridge,node_relations toneMint
class node_updater_main,node_updater_modules toneRose
class node_github toneIndigo
```

## Components

### Startup and UI

- [Mod Entry](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/entry.js): `src/entry.js`
- [Mount and Wait](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/bootstrap/mount-root.js): `src/bootstrap/mount-root.js`
- [Panel Renderer](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/ui/render.js): `src/ui/render.js`
- [Panel Styles](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/ui/styles.js): `src/ui/styles.js`
- [Layout Adapter](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/adapters/layout.js): `src/adapters/layout.js`
- [Theme Adapter](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/adapters/theme.js): `src/adapters/theme.js`

### Tabs and Tree

- [Tab Coordinator](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/tab-store.js): `src/store/tab-store.js`
- [Tree Controller](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/controllers/tree-controller.js): `src/controllers/tree-controller.js`
- [Native Reconcile](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/controllers/native-reconcile.js): `src/controllers/native-reconcile.js`
- [Tree State](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/tree-store.js): `src/store/tree-store.js`
- [Tree Selectors](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/tree-selectors.js): `src/store/tree-selectors.js`
- [Tree Persistence](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/tree-persistence.js): `src/store/tree-persistence.js`
- [Settings State](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/settings-store.js): `src/store/settings-store.js`
- [Selection State](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/selection-store.js): `src/store/selection-store.js`
- [Drag State](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/store/drag-store.js): `src/store/drag-store.js`
- [Folder Pages](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/ui/folder-page.js): `src/ui/folder-page.js`

### Browser Integrations

- [Tabs and Bookmarks API](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/adapters/tabs-api.js): `src/adapters/tabs-api.js`
- [Vivaldi Bridge](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/adapters/vivaldi-bridge.js): `src/adapters/vivaldi-bridge.js`
- [Tab Relations](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/src/adapters/tab-relations.js): `src/adapters/tab-relations.js`

### Windows Updater

- [Updater Runtime](https://github.com/r0stefan/vivaldi-tree-style-tabs/blob/main/updater/main.go): `updater/main.go`
- [Updater Services](https://github.com/r0stefan/vivaldi-tree-style-tabs/tree/main/updater): `updater`

### Other components

- **Vivaldi User**
- **Vivaldi UI**
- **Vivaldi Browser Services**
- **GitHub Releases**
- **Vivaldi Installation**

## Connections

- Vivaldi UI → Mod Entry: loads mod
- Mod Entry → Mount and Wait: mounts panel
- Mount and Wait → Panel Styles: injects styles
- Mod Entry → Tab Coordinator: coordinates tabs
- Mod Entry → Panel Renderer: renders state
- Mod Entry → Layout Adapter: starts layout
- Mod Entry → Theme Adapter: starts theme
- Mod Entry → Selection State: tracks selection
- Mod Entry → Drag State: tracks drag
- Vivaldi User → Panel Renderer: uses panel
- Panel Renderer → Tab Coordinator: dispatches actions
- Tab Coordinator → Tree Controller: coordinates tree
- Tab Coordinator → Native Reconcile: reconciles tabs
- Tab Coordinator → Tabs and Bookmarks API: operates tabs
- Tab Coordinator → Folder Pages: updates folder URLs
- Tree Controller → Tree State: changes tree
- Tree Controller → Tree Selectors: derives tree views
- Tree Controller → Tree Persistence: persists tree
- Tree Controller → Tab Relations: resolves parents
- Tab Coordinator → Settings State: reads settings
- Tabs and Bookmarks API → Vivaldi Browser Services: uses browser APIs
- Vivaldi Bridge → Vivaldi Browser Services: accesses native features
- Tab Coordinator → Vivaldi Bridge: integrates workspaces
- Updater Runtime → Updater Services: invokes services
- Updater Runtime → GitHub Releases: checks and downloads
- Updater Runtime → Vivaldi Installation: patches installation
- Vivaldi Installation → Vivaldi UI: runs patched UI
