# Intelligent Workspace > Intelligent Workspace is an advanced Manifest V3 browser extension and productive workspace environment built with Svelte, Vite, and CRXJS. It orchestrates intelligent tab organization, automated and rule-based clustering, autonomous AI agent execution (supporting Google Gemini Cloud API and Chrome Built-in Prompt API), in-page Vim-style link navigation, a 41-prefix Omnibar command system, multi-format note-taking (rich text, checklists, Kanban, Mermaid diagrams, KaTeX formulas), high-fidelity media capture and in-browser WASM OCR, Pomodoro timing with zero-drift alarms and offscreen audio playback, and Declarative Net Request (DNR) web activity metering, domain limits, and site blocking. --- ## Multilingual Editions / Global Directory This technical specification is available in the top 25 languages worldwide: | Language | Native Name | ISO Code | Specification Link | | :--- | :--- | :--- | :--- | | **English** (Master) | English | `en` | [llms.txt](/llms.txt) | | **Mandarin Chinese** | 简体中文 | `zh` | [llms-zh.txt](/llms-zh.txt) | | **Hindi** | हिन्दी | `hi` | [llms-hi.txt](/llms-hi.txt) | | **Spanish** | Español | `es` | [llms-es.txt](/llms-es.txt) | | **French** | Français | `fr` | [llms-fr.txt](/llms-fr.txt) | | **Modern Standard Arabic** | العربية | `ar` | [llms-ar.txt](/llms-ar.txt) | | **Bengali** | বাংলা | `bn` | [llms-bn.txt](/llms-bn.txt) | | **Brazilian Portuguese** | Português (Brasil) | `pt` | [llms-pt.txt](/llms-pt.txt) | | **Russian** | Русский | `ru` | [llms-ru.txt](/llms-ru.txt) | | **Urdu** | اردو | `ur` | [llms-ur.txt](/llms-ur.txt) | | **Indonesian** | Bahasa Indonesia | `id` | [llms-id.txt](/llms-id.txt) | | **German** | Deutsch | `de` | [llms-de.txt](/llms-de.txt) | | **Japanese** | 日本語 | `ja` | [llms-ja.txt](/llms-ja.txt) | | **Marathi** | मराठी | `mr` | [llms-mr.txt](/llms-mr.txt) | | **Telugu** | తెలుగు | `te` | [llms-te.txt](/llms-te.txt) | | **Turkish** | Türkçe | `tr` | [llms-tr.txt](/llms-tr.txt) | | **Tamil** | தமிழ் | `ta` | [llms-ta.txt](/llms-ta.txt) | | **Vietnamese** | Tiếng Việt | `vi` | [llms-vi.txt](/llms-vi.txt) | | **Tagalog / Filipino** | Tagalog / Filipino | `tl` | [llms-tl.txt](/llms-tl.txt) | | **Korean** | 한국어 | `ko` | [llms-ko.txt](/llms-ko.txt) | | **Persian / Farsi** | فارسی | `fa` | [llms-fa.txt](/llms-fa.txt) | | **Hausa** | Harshen Hausa | `ha` | [llms-ha.txt](/llms-ha.txt) | | **Swahili** | Kiswahili | `sw` | [llms-sw.txt](/llms-sw.txt) | | **Italian** | Italiano | `it` | [llms-it.txt](/llms-it.txt) | | **Punjabi** | ਪੰਜਾਬੀ | `pa` | [llms-pa.txt](/llms-pa.txt) | --- ## Navigation & Quick Reference Index - [1. Architectural Foundation & Runtime Lifecycle](#1-architectural-foundation--runtime-lifecycle) - [2. Section 1: Rules Management (Gestionar Reglas)](#2-section-1-rules-management-gestionar-reglas) - [2.1 Data Schema (`CustomRule`)](#21-data-schema-customrule) - [2.2 Precedence Architecture](#22-precedence-architecture) - [2.3 URL Normalization & Matching Semantics](#23-url-normalization--matching-semantics) - [2.4 Rules Management Settings Breakdown](#24-rules-management-settings-breakdown) - [2.5 Operations & Persistence (`mutateRulesAndSync`)](#25-operations--persistence-mutaterulesandsync) - [2.6 Invocation Modalities](#26-invocation-modalities) - [3. Section 2: Group Listing & Operations (Listar Grupos)](#3-section-2-group-listing--operations-listar-grupos) - [3.1 UI Architecture](#31-ui-architecture) - [3.2 Group Lifecycle & Behaviors](#32-group-lifecycle--behaviors) - [3.3 Group Operations & Memory Management](#33-group-operations--memory-management) - [3.4 Group Backups & Restore Subsystem](#34-group-backups--restore-subsystem) - [3.5 Parked YouTube Player in Hidden Groups Bar](#35-parked-youtube-player-in-hidden-groups-bar) - [4. Section 3: Navigation & Tab Management (Navegación)](#4-section-3-navigation--tab-management-navegación) - [4.1 Fast Tab Jump Gesture](#41-fast-tab-jump-gesture) - [4.2 Stepping, Swapping & Lifecycle Keys](#42-stepping-swapping--lifecycle-keys) - [For power users](#for-power-users) - [4.3 Audio & Sound Management](#43-audio--sound-management) - [4.4 Split Screen Workflows](#44-split-screen-workflows) - [4.5 YouTube Looping Subsystem](#45-youtube-looping-subsystem) - [4.6 YouTube Shorts Preview Audio](#46-youtube-shorts-preview-audio) - [4.7 Picture-in-Picture (PiP) Architecture](#47-picture-in-picture-pip-architecture) - [4.8 Page Reading Modes & Visual Overlays](#48-page-reading-modes--visual-overlays) - [4.9 Text Snippets Subsystem with Template Variables](#49-text-snippets-subsystem-with-template-variables) - [4.10 Embedded Productivity Tools](#410-embedded-productivity-tools) - [4.11 Comprehensive 3-Tier Duplicate Removal & Intelligent Discarding](#411-comprehensive-3-tier-duplicate-removal--intelligent-discarding) - [5. Section 4: AI Assistant & Autonomous Agent (Asistente AI)](#5-section-4-ai-assistant--autonomous-agent-asistente-ai) - [5.1 Dual Model Engine Architecture](#51-dual-model-engine-architecture) - [5.2 Autonomous Browser Agent (`agent-backend.js`)](#52-autonomous-browser-agent-agent-backendjs) - [5.3 Taint Tracking & Prompt Injection Defense](#53-taint-tracking--prompt-injection-defense) - [5.4 Scheduled Gemini Queries Subsystem (`GeminiScheduleModal.svelte`)](#54-scheduled-gemini-queries-subsystem-geminischedulemodalsvelte) - [5.5 Gemini Conversation Management & Export](#55-gemini-conversation-management--export) - [5.6 Multimodal Inputs & File Attachments (`feature_geminiAttachFiles`)](#56-multimodal-inputs--file-attachments-feature_geminiattachfiles) - [5.7 Invocation Modalities](#57-invocation-modalities) - [6. Section 5: Notes View & Knowledge Management (Ver Notas)](#6-section-5-notes-view--knowledge-management-ver-notas) - [6.1 Storage Architecture (`notesStore`)](#61-storage-architecture-notesstore) - [6.2 Specialized Note Formats & Advanced Rendering](#62-specialized-note-formats--advanced-rendering) - [6.3 Scoping & Context Hierarchy](#63-scoping--context-hierarchy) - [6.4 Invocation Modalities](#64-invocation-modalities) - [7. Section 6: Media & Gallery View (Ver Galería)](#7-section-6-media--gallery-view-ver-galería) - [7.1 Capture Modes & Engineering (All 7 Capture Types)](#71-capture-modes--engineering-all-7-capture-types) - [7.2 Gallery UI & Persistence](#72-gallery-ui--persistence) - [7.3 Export, In-Browser OCR & External Markup](#73-export-in-browser-ocr--external-markup) - [7.4 Invocation Modalities](#74-invocation-modalities) - [8. Section 7: Pomodoro & Timing Suite (Pomodoro)](#8-section-7-pomodoro--timing-suite-pomodoro) - [8.1 Timing Engine & Background Architecture](#81-timing-engine--background-architecture) - [8.2 Exhaustive 4 Timing Modes](#82-exhaustive-4-timing-modes) - [8.3 In-Page Floating Timer Widget](#83-in-page-floating-timer-widget) - [8.4 Group Auto-Collapse Idle Timer](#84-group-auto-collapse-idle-timer) - [8.5 Project Tagging & Metadata](#85-project-tagging--metadata) - [8.6 Analytics Engine & 19 KPI Cards](#86-analytics-engine--19-kpi-cards) - [9. Section 8: Activity & History Panel (Panel de Actividad)](#9-section-8-activity--history-panel-panel-de-actividad) - [9.1 Data Engine & Storage Topology (`ITG_WEB_ACTIVITY`)](#91-data-engine--storage-topology-itg_web_activity) - [9.2 Declarative Net Request (DNR) Site Blocker](#92-declarative-net-request-dnr-site-blocker) - [9.3 Asymmetric Security Lock (`blockLock.js`)](#93-asymmetric-security-lock-blocklockjs) - [9.4 Categorization & Visual Analytics](#94-categorization--visual-analytics) - [9.5 Downloads Manager Subsystem (`switchMainView('downloads')`)](#95-downloads-manager-subsystem-switchmainviewdownloads) - [9.6 Recently Closed Tabs & Browsing History Subsystem](#96-recently-closed-tabs--browsing-history-subsystem) - [9.7 Theme Scheduling Subsystem (`ThemeScheduleModal.svelte`)](#97-theme-scheduling-subsystem-themeschedulemodalsvelte) - [9.8 Compact Sidepanel View](#98-compact-sidepanel-view) - [10. Multi-Modal Invocation Matrix](#10-multi-modal-invocation-matrix) - [10.1 Popup UI Interface](#101-popup-ui-interface) - [10.2 Sidepanel Navigation Routes (`?view=...`)](#102-sidepanel-navigation-routes-view) - [10.3 Manifest Keyboard Shortcuts (24 Commands)](#103-manifest-keyboard-shortcuts-24-commands) - [10.4 In-Page Vim Hint Keys (40+ Combinations)](#104-in-page-vim-hint-keys-40-combinations) - [10.5 In-Page Omnibar Subsystem Prefixes (41 Prefixes)](#105-in-page-omnibar-subsystem-prefixes-41-prefixes) - [10.6 Context Menu Tree Hierarchy (All 5 Groups & 30+ Actions)](#106-context-menu-tree-hierarchy-all-5-groups--30-actions) - [11. Storage Schemas & Data Persistence](#11-storage-schemas--data-persistence) - [11.1 IndexedDB Database: `Intelligent_Workspace` (Schema Version 8)](#111-indexeddb-database-intelligent_workspace-schema-version-8) - [11.2 Chrome Storage Dual-Routing (`StorageService`)](#112-chrome-storage-dual-routing-storageservice) - [11.3 Chrome Storage Session (`chrome.storage.session`)](#113-chrome-storage-session-chromestoragesession) - [12. Defensive Engineering & Edge Case Handling](#12-defensive-engineering--edge-case-handling) --- ## 1. Architectural Foundation & Runtime Lifecycle The extension runs under Google Chrome's Manifest V3 architecture, decoupling persistent processes across a background Service Worker, sandboxed UI panels, offscreen audio documents, and in-page content script overlays: 1. **Manifest Configuration (`manifest.json`)**: - **Permissions (21 items)**: `tabs`, `tabGroups`, `storage`, `favicon`, `contextMenus`, `notifications`, `sidePanel`, `scripting`, `downloads`, `downloads.open`, `system.display`, `declarativeNetRequestWithHostAccess`, `cookies`, `history`, `sessions`, `bookmarks`, `readingList`, `clipboardWrite`, `alarms`, `offscreen`, and `idle`. - **Host Permissions**: `[""]`. - **Service Worker**: `src/core/background.js` using synchronous `importScripts` modular loading. - **Toolbar Action**: Deliberately omits `default_popup`. Runtime enforces `chrome.action.setPopup({ popup: '' })`, ensuring `chrome.action.onClicked` fires synchronously and opens `chrome.sidePanel` to the user's pinned view without popup initialization latency. - **Omnibox Keyword**: Registered keyword `"find"`. - **Commands**: 24 system-level keyboard shortcuts registered under `commands`. - **Content Security Policy**: `script-src 'self' 'wasm-unsafe-eval'; object-src 'self';`. 2. **Inter-Process Communication Security**: - `src/core/background/messaging.js` filters messages from content scripts against an explicit whitelist (`ALLOWED_CONTENT_SCRIPT_ACTIONS`). Unprivileged web frames cannot invoke internal storage writers, arbitrary Chrome APIs, or rule mutators. 3. **Dual Execution Worlds**: - Content scripts operate across both `ISOLATED` (extension scope) and `MAIN` (page execution scope) worlds. Scripts like `allowRightClickHook.js`, `videoPipHook.js`, `youtubePreviewAudioHook.js`, and `youtubeShortsFeedHook.js` run in `MAIN` to intercept prototype methods, override property descriptors, and handle custom events directly. --- ## 2. Section 1: Rules Management (Gestionar Reglas) The Rules Management subsystem automates tab grouping based on strict deterministic criteria defined by the user. ### 2.1 Data Schema (`CustomRule`) Each custom rule adheres to the following interface: ```typescript interface CustomRule { name: string; // 1 to 16 characters. Must contain no whitespace characters. color: RuleColor; // One of 9 colors: 'grey' | 'blue' | 'red' | 'yellow' | 'green' | 'pink' | 'purple' | 'cyan' | 'orange' urls: string[]; // Array of valid URLs, domains, or hostnames. active: boolean; // Master toggle enabling or disabling rule evaluation. isStarred?: boolean; // Optional flag marking rule as a favorite for prioritized UI ordering. } ``` ### 2.2 Precedence Architecture When tabs are processed by `groupTabs()` in `src/core/background/groupManager.js`, tabs are evaluated against grouping layers in strict hierarchical order: 1. **Custom Rules (`applyCustomRules`)**: Matches active custom rules in order of appearance or user priority. Once grouped, tab IDs are registered in `groupedTabIds` and excluded from subsequent layers. 2. **Special System Groups**: System URLs are intercepted and clustered into dedicated colored groups: - `chrome://` and internal browser pages - `file:///` local disk files - `chrome-extension://` extension pages - IP Addresses & Localhost (`localhost`, `127.0.0.1`, `[::1]`, IPv4/IPv6 hosts) 3. **Domain Clustering**: Tabs sharing the same root domain are grouped if the tab count meets or exceeds `domainThreshold` (default: 2 tabs). 4. **Subdomain Clustering**: If enabled, tabs within domains are grouped by specific subdomains (e.g., `docs.github.com` vs `gist.github.com`). 5. **Miscellaneous ("Misc") Group**: Residual unclustered tabs that do not meet grouping thresholds are placed into the `Misc` group (placement configurable: `start`, `end`, or alphabetical `alpha`). ### 2.3 URL Normalization & Matching Semantics The matching engine (`matchesRule(tabUrl, ruleUrl)` in `src/core/background/utils.js`) applies rigorous normalization: - **Scheme Agnostic**: HTTP and HTTPS protocols are treated as interchangeable (`http://example.com` matches `https://example.com`). Non-web protocols (`file://`, `chrome://`) require exact scheme matches. - **Host Normalization**: Leading `www.` prefixes are stripped (`www.github.com` normalizes to `github.com`). Hostnames are lowercased and support internationalized domain names (IDNs) via punycode. - **Port Sensitivity**: If a rule specifies a port (e.g., `localhost:3000`), the tab must match that exact port. - **Path Matching**: Trailing slashes are stripped. If a rule specifies a path (e.g., `example.com/docs`), it matches tabs with that exact path OR subpaths (`example.com/docs/api`), but does not match sibling paths (`example.com/blog`). - **Query & Hash Matching**: If a rule explicitly contains a query string (`?page=1`) or hash (`#section`), the tab must match those parameters verbatim. - **Numeric Dword Protection (`ruleValidation.js`)**: The validator strictly rejects bare numeric inputs (e.g., `3242342424`) that WHATWG URL parsers treat as valid IPv4 integer DWORDs, preventing accidental grouping distortions. ### 2.4 Rules Management Settings Breakdown The Rules Manager provides an exhaustive suite of behavioral controls and settings: - **Storage Routing Selection**: Users can route rule storage between `chrome.storage.sync` (for synchronized settings across all devices signed into the Google profile, subject to Chrome sync quotas of 100 KB total and 8 KB per item) and `chrome.storage.local` (for unlimited local capacity suitable for large rule sets containing hundreds of patterns). - **Clustering Master Toggle & Thresholds**: - `toggle-clustering`: Master keyboard shortcut and UI toggle enabling or disabling automated domain/subdomain clustering without disabling user-created custom rules. - `domainThreshold`: Minimum tab count required from the same domain to trigger an automatic tab group (default: 2 tabs). Configurable from 1 to 50. - `subdomainThreshold`: Minimum tab count for subdomains before creating separated subgroup clusters. - Subdomain toggle (`toggle-subdomain-grouping`): Distinguishes independent subdomains (e.g., `news.ycombinator.com` vs `ycombinator.com`). - **Auto-Sort Groups Alphabetically (`toggle-sort-alpha`)**: Real-time sorting engine enforcing alphabetical ordering across all open tab groups in the browser tab strip (`Ctrl+Shift+S` / `Cmd+Shift+S`). - **Visual Status Prefixes (`toggle-prefixes`)**: Emoji markers dynamically prepended to group titles to indicate inspection state: - `🔒` (Lock): The group contains unvisited, unread tabs. - `🔍` (Loupe): The group contains partially visited tabs. - `🗝️` (Open Key): All tabs in the group have been opened and reviewed. - `⚠️` (Warning): Duplicate group name collision detected with another window group. - **Auto-Collapse Idle Groups (`toggle-collapse-timer`)**: Automatically collapses groups when inactive to maintain a tidy tab strip. - **Master Pause Grouping (`feature_pauseGrouping`)**: Master freeze switch that temporarily suspends all automated grouping operations (both rule matches and heuristic clustering) during active research sessions where tabs should remain in arbitrary user arrangements. - **Single Tab Grouping (`featureSingleTabGrouping`)**: Allows custom rules to immediately create a tab group for a single matching tab, bypassing the multi-tab threshold requirement. - **Compact View (`toggle-compact-mode`)**: Minimizes tab header width in the browser tab strip by rendering only single-letter badges for group titles. - **Drag-and-Drop Priority**: Reordering rules in the `Rules.svelte` list instantly changes their evaluation precedence. Rules at the top evaluate first. - **Fuzzy Search**: Live filtering in the Rules Manager and Omnibar allowing instant location of rules by title or matching URL patterns. - **JSON Import / Export**: - Mode `add`: Merges imported rules into the existing collection, discarding duplicates. - Mode `overwrite`: Completely replaces the active rule collection with the imported payload after schema validation. - **Dynamic Rule Creation**: One-click creation of custom rules directly from Chrome bookmark folders or subgroup domain collections. - **Rule Deduplication (`feature_v100_dedup_add_to_rule`)**: Automatically strips duplicate URL patterns when adding URLs or domains to existing custom rules, preventing rule inflation and redundant evaluations. ### 2.5 Operations & Persistence (`mutateRulesAndSync`) - **Centralized Mutator**: All rule modifications route through `mutateRulesAndSync(mutateFn, sendResponse)` in `src/core/background/handlers/rules.js`. This guarantees storage synchronization, in-memory cache refreshment (`extensionSettings.customRules`), UI notification (`rulesUpdated`), and automatic tab regrouping (`groupTabs()`). - **Live Validation**: Real-time validation checks for name uniqueness, length (1-16 chars), character restrictions, and valid URL syntax before saving. ### 2.6 Invocation Modalities - **Rules Manager Page (`Rules.svelte`)**: Accessible in full-tab view or side panel (`?view=rules` / `pg`). Provides full drag-and-drop reordering, inline color picker, URL tag chips, and rule toggles. - **Omnibar Commands**: - `rl:` — Search rules and open associated URLs. - `cr: [, url1, url2]` — Create a new rule directly from the command bar. - `atcr:` — Add the active tab's domain or URL to an existing rule. - `atr:` — Add selected open tabs or manual URLs to an existing rule. - `ccr:` — Change the color of a custom rule. - `dr:` — Delete rules or individual URLs from a rule. - `er:` — Edit or rename an existing rule. - **Context Menus**: - Right-click page -> "Crear Regla para esta Página" -> "Añadir Raíz del Sitio" / "Añadir URL Completa". - Right-click page -> "Añadir a Regla Existente" -> Select rule -> "Añadir Raíz del Sitio" / "Añadir URL Completa". - Right-click page -> "Reglas" -> Toggle active state, open all rule URLs, or close matching tabs. - **Keyboard Shortcuts**: - `Alt+R`: Open Rules Manager. - `Alt+M`: Toggle activation of all rules simultaneously (`toggle-all-rules`). --- ## 3. Section 2: Group Listing & Operations (Listar Grupos) The Group Listing view provides an interactive workspace for inspecting, manipulating, and reordering browser tab groups and individual tabs. ### 3.1 UI Architecture - **Component Stack**: Built with `ListGroup.svelte`, `GroupCard.svelte`, `GroupActions.svelte`, `TabItem.svelte`, and `TabActions.svelte`. - **Card Features**: Displays group title, color badge, tab count pill, collapse/expand accordion toggle, card pinning, and customizable action button groups. - **Tab Items**: Displays tab favicon with color fallback, title, audible sound badge, mute indicator, active state indicator, and per-tab actions (close, duplicate, pin, split, discard). ### 3.2 Group Lifecycle & Behaviors - **Accordion Control**: Smooth expand and collapse states. Optional auto-accordion mode automatically collapses idle groups when a new group is expanded. - **Inactivity Auto-Collapse Idle Timer**: - Automatically collapses idle tab groups to reduce visual clutter. - Two distinct thresholds: Inactive groups collapse after 1 minute of inactivity (`INACTIVITY_THRESHOLD_INACTIVE_GROUP`), while the active group collapses after 15 minutes of inactivity (`INACTIVITY_THRESHOLD_ACTIVE_GROUP`). Configurable from 0 to 1440 minutes. - **Inline Renaming & Grace Period**: - Users can rename groups directly in the browser tab strip or UI. - `GROUP_NAMING_GRACE_MS` (5000ms) pauses automatic regrouping while a user edits, preventing title overwrites mid-typing. - Zero-width spaces (`\u200B`, `\u200C`, `\u200D`, `\u2060`, `\uFEFF`) are stripped during evaluation. - Renaming an automatically generated group converts it to a user-named group, updating the corresponding custom rule or marking it permanent. - **Visual Group Prefix Indicators**: - Dynamically prepends status symbols: `🔒` (unvisited), `🔍` (partial), `🗝️` (all viewed), `⚠️` (collision). - **Drag-and-Drop Reordering**: Integrated with `sortable.js` for reordering tabs within groups, moving tabs between groups, or reordering group cards. - **Hidden Groups Feature**: - Prefixes group title with `_hidden_` in the browser tab strip. - Hides group cards from the main list view, transferring them to `HiddenGroupsBar.svelte`. - Users can unhide or restore groups instantly with a single click. ### 3.3 Group Operations & Memory Management - **Ungroup**: Disbands the group, leaving tabs open in the window. - **Close Group**: Closes all tabs in the group and releases the group ID. - **Close Other Groups**: Closes all tab groups except the currently focused group. - **Regroup All Tabs (`Alt+Shift+R`)**: Executes a comprehensive re-evaluation pass across custom rules, system groups, and domain clusters. - **Group Screenshot Walk**: Sequentially cycles through and captures every tab in the group (`Cs` visible, `Cp` full page, `CP` full page parts). ### 3.4 Group Backups & Restore Subsystem - **IndexedDB `backupsGroups` Store**: - Backs up single tab groups or workspace-wide snapshots of all open groups into IndexedDB `Intelligent_Workspace` store `backupsGroups`. - Captures complete group structures: group title, color, collapsed state, tab titles, URLs, favicons, pinned status, and relative tab positions. - **Memory Conservation**: Backed-up tabs are cleanly closed to reclaim system RAM and reduce CPU overhead. - **Restore Mechanisms**: - Backups UI View in `ListGroup.svelte` with one-click group restoration. - Keyboard shortcut `br` (restore) and `bg` (backup all). - Omnibar command `bgr:` (search and restore backed-up groups) and `b:` (bookmark search). - **JSON Export & Import**: Full JSON backup export and import for seamless migration between machines and long-term offline archiving. ### 3.5 Parked YouTube Player in Hidden Groups Bar - **Architecture (`HiddenGroupsBar.svelte`)**: - When a user navigates away from an active YouTube video view or launches video content inside the side panel, the player is not closed or lost. It is automatically docked in `HiddenGroupsBar.svelte` as a parked YouTube indicator (`.youtube-indicator`). - Managed reactively via the `hiddenYoutubeView` store in `src/ui/stores/appStore.svelte.js`. - **One-Click Actions**: - Clicking the parked indicator invokes `restoreYoutubeView()`, returning the player immediately to the active workspace view. - Clicking the delete badge invokes `discardYoutubeView()`, cleanly terminating playback and reclaiming resources. - Sits seamlessly alongside hidden tab groups at the top of the ListGroup view without cluttering active tab lists. --- ## 4. Section 3: Navigation & Tab Management (Navegación) Accelerated keyboard navigation and workspace controls allow seamless multi-tab control without mouse interaction. ### 4.1 Fast Tab Jump Gesture - **Gesture Syntax**: `Alt + [groupPrefix] + [tabIndex] + Enter` - **Execution**: - Hold `Alt` and type the group's name or prefix letters, followed by the desired 1-based tab index, then press `Enter`. - Example: `Alt + git + 2 + Enter` jumps directly to the second tab in the "GitHub" group. - Index `0` acts as a shortcut for the *last* tab in the group. - Omitting the index jumps to the *first* tab in the group. - Accents are automatically folded (`deaccent`) and matching normalizes diacritics. ### 4.2 Stepping, Swapping & Lifecycle Keys - `s`: Instantly swap to the previously active tab (`previousActiveTabId`). - `h` / `l`: Step to the previous / next tab (or scroll horizontally if the page allows). - `H` / `L`: Navigate back / forward in browser history. - `t`: Open a new blank tab. - `x`: Close the current active tab. - `yt`: Duplicate the current tab. - `r` / `R`: Reload page / Force reload bypassing cache. - `d` / `u`: Scroll to bottom / top of page. - `j` / `k`: Smooth scroll down / up (75px step). - `f`: Activate Vim link hints (letters appear over clickable elements to click). - `cf`: Activate Vim link hints to copy target URL to clipboard. ### ਉੱਨਤ ਉਪਭੋਗਤਾਵਾਂ ਲਈ (For power users) ਵਧੇਰੇ ਉੱਨਤ ਉਪਭੋਗਤਾ ਬ੍ਰਾਊਜ਼ਰ ਨੂੰ ਪੂਰੀ ਸਕ੍ਰੀਨ ਮੋਡ ਵਿੱਚ ਰੱਖ ਸਕਦੇ ਹਨ ਅਤੇ ਮਾਊਸ ਦੀ ਵਰਤੋਂ ਕੀਤੇ ਬਿਨਾਂ ਪੂਰੀ ਤਰ੍ਹਾਂ ਕੀਬੋਰਡ ਨਾਲ ਨੈਵੀਗੇਟ ਕਰ ਸਕਦੇ ਹਨ। #### Full-Screen Immersion & Mouse-Free Browsing - **Toggle Full-Screen**: Press `F11` (Windows/Linux) or `Command+Control+F` (macOS). The browser chrome, address bar, tabs strip, and operating system panels are hidden, dedicating 100% of the display to content. - **In-Page Vim Link Navigation (`f` / `cf`)**: - Press `f` to generate high-contrast two-character yellow link hints over every clickable element, button, input, and link in the DOM. - Type the two letters matching your target to simulate a direct click without mouse interaction. - Press `cf` to trigger hint badges that copy the target link's URL directly to your system clipboard. - Press `vp` to open an in-page preview modal of the target link. - Press `Esc` at any time to cancel link hints and return to normal scrolling. - **Instant Tab Jumping & Switching**: - `Alt + [groupPrefix] + [tabIndex] + Enter`: Execute the Fast Tab Jump gesture (e.g., `Alt + dev + 1 + Enter` jumps directly to the first tab in the "Dev" group; index `0` selects the last tab in the group). - `s`: Instantly swap between the current tab and the previously active tab (`previousActiveTabId`). - `h` / `l`: Step sequentially to the previous / next tab in the tab strip. - `H` / `L`: Move backward / forward through browser navigation history. - `t` / `x` / `yt`: Open a new tab (`t`), close current tab (`x`), or duplicate tab (`yt`). - **Floating Omnibar Command Subsystem (`o`)**: - Press `o` on any page to summon the centered Omnibar overlay. - Press `@` to display the interactive directory of all 41 command prefixes. - Type `f: ` to execute deep full-text tab search across all open windows. - Type `sp:` to route navigation directly into any Sidepanel view (`rules`, `listgroup`, `notes`, `gallery`, `gemini`, `activity`, `themes`, `hints`, `downloads`). - Type `qai: ` or `qaia: ` to query Gemini or instruct the autonomous browser agent without lifting hands from the keyboard. - Type `ts:` to split open tabs into side-by-side split screen. - **In-Page Navigation & Focus**: - `j` / `k`: Smooth scroll down / up (75px increment). - `d` / `u`: Half-page scroll down / up. - `i`: Jump cursor focus immediately into the primary text input field on the page. - `ESC`: Unfocus inputs and return keyboard focus to navigation mode. ### 4.3 Audio & Sound Management - Tabs playing audio display a speaker badge in the ListGroup UI. - `st`: Toggle mute on the current active tab. - `so`: Mute all audible tabs across the entire browser. - Context menu: "Silenciar Todas las Pestañas" / "Reactivar Sonido en Todas las Pestañas". ### 4.4 Split Screen Workflows - **Trigger**: Vim hint `ts` or Omnibar prefix `ts:`. - **Behavior**: Uses `chrome.system.display` to calculate screen geometry. Splits two tabs side-by-side into adjacent windows, grouping them under a dedicated `Split` tab group. - **Restoration**: Closing the split window or toggling split screen restores original window dimensions and coordinates. ### 4.5 YouTube Looping Subsystem The YouTube looping subsystem provides precision media looping controls integrated directly into the YouTube player: - **Desktop Player Button (`#itg-yt-loop-button`)**: Injected into the standard YouTube player control bar (`.ytp-right-controls`), positioned to the left of the Cast / Remote button or PiP launcher. Features animated SVG looping glyphs, toggle highlight styling (`ytp-loop-active`, `var(--interactive-color, #ff4444)`), and `aria-pressed` states. - **Shorts Player Button (`#itg-yt-shorts-loop-button`)**: Injected inside `#itg-yt-shorts-loop-wrapper` into the YouTube Shorts right-side control column (`ytd-shorts`), providing one-click looping for vertical video content. - **Loop Menu & PiP Popup (`#itg-yt-loop-menu` & `#itg-pip-loop-popup`)**: Hovering or clicking the loop button opens the comprehensive loop settings menu: - **A-B Looping**: Users can set custom start point (A) and end point (B) down to millisecond precision with interactive range sliders and manual time fields. - **Cycle Mode & Sequence Repetitions**: Set repetition count for specific loops or toggle infinite loop mode (`itg-loop-seq-inf`). - **Loop List & Multi-Segment Sequences**: Queue multiple A-B loop intervals that play consecutively according to configured repetitions. - **Status & Duration Display**: Shows real-time playback position within current loop interval and total media duration (`00:00 / 00:00`). - **Master Toggle (`youtubeLoopEnabled`)**: Persisted in `chrome.storage.sync` and `local`, allowing users to enable or disable the loop buttons across YouTube and YouTube Shorts via the Customize Hints settings page (`YoutubeLoopSection.svelte`). ### 4.6 YouTube Shorts Preview Audio - **Audio Unmute Hook (`youtubePreviewAudioHook.js`)**: - Runs in the `MAIN` execution world to access the `#inline-preview-player` property on `ytd-video-preview` elements. - **Overcoming Forced Mute**: YouTube enforces a forced mute on Shorts previews by clearing audio controls and restoring `muted = true` via internal `volumechange` listeners. - The extension hooks `HTMLMediaElement.prototype.muted` property descriptor on the target `