@@ -74,13 +74,13 @@ npm run preview # Preview build
7474
7575The extension follows a ** dependency injection pattern** with clear separation of concerns:
7676
77- 1 . ** Main Entry** (` main.ts ` ): Orchestrates initialization, registers commands, manages lifecycle
78- 2 . ** Adapters** (` adapters.ts ` ): Abstraction layer for VS Code API (enables testing)
79- 3 . ** Managers** : Domain-specific business logic
77+ 1 . ** Main Entry** (` src/extension/ main.ts` ): Orchestrates initialization, registers commands, manages lifecycle
78+ 2 . ** Adapters** (` src/internal/ adapters.ts` ): Abstraction layer for VS Code API (enables testing)
79+ 3 . ** Managers** ( ` src/internal/managers/ ` ) : Domain-specific business logic
8080 - ` StatusBarManager ` : Status bar button lifecycle and rendering
8181 - ` TerminalManager ` : Terminal creation and command execution
8282 - ` ConfigManager ` : Configuration reading/writing across scopes
83- 4 . ** Providers** :
83+ 4 . ** Providers** ( ` src/internal/providers/ ` ) :
8484 - ` CommandTreeProvider ` : Sidebar tree view data provider
8585 - ` ConfigWebviewProvider ` : React-based configuration UI host
8686
@@ -101,7 +101,7 @@ Button Click → executeButtonCommand() → determineButtonExecutionType()
101101
102102### Multi-Language Keyboard Support
103103
104- The extension supports 15 keyboard layouts via ` keyboard-layout-converter.ts ` :
104+ The extension supports 15 keyboard layouts via ` src/internal/ keyboard-layout-converter.ts` :
105105
106106- ** Layout converters** : Korean, Russian, Arabic, Hebrew, German, Spanish, Czech, Greek, Persian, Belarusian, Ukrainian, Kazakh
107107- ** Advanced converters** : Japanese (WanaKana), Chinese (Pinyin), Hindi (Sanscript)
@@ -123,33 +123,53 @@ React-based configuration UI with:
123123- ** Drag & Drop** : ` @dnd-kit ` for command reordering
124124- ** UI Components** : shadcn/ui + Radix UI primitives
125125- ** VS Code Communication** : ` vscode.postMessage() ` API for config sync
126- - ** Theming** : TailwindCSS with dark mode support
126+ - ** Theming** : VS Code theme synchronization via ` use-dark-mode ` hook
127+ - ** Error Handling** : Error boundary for webview stability
128+ - ** User Feedback** : Toast notification system for configuration feedback
129+ - ** Accessibility** : ARIA labels and keyboard navigation support
127130
128131## Testing Strategy
129132
130- - ** Unit tests** : All manager/provider classes have ` .test .ts ` files
133+ - ** Unit tests** : All manager/provider classes have ` .spec .ts ` files (co-located)
131134- ** Test framework** : Jest with TypeScript support
132135- ** Mocking** : VS Code API mocked via ` adapters ` layer
133136- ** Coverage** : Use ` test:coverage ` for reports
134137
135138## File Structure Notes
136139
137140```
138- src/extension/src/ # TypeScript extension code
139- main.ts # Entry point
140- types.ts # Shared type definitions
141- *-manager.ts # Business logic managers
142- *-provider.ts # VS Code providers
143- adapters.ts # VS Code API abstraction
144- command-executor.ts # Command execution logic
145- keyboard-layout-converter.ts # Multi-language support
146-
147- src/view/src/ # React configuration UI
148- app.tsx # Root component
149- core/ # Reusable UI components
150- components/ # Feature-specific components
151- context/ # React context providers
152- hooks/ # Custom hooks
141+ src/
142+ extension/ # VS Code extension entry
143+ main.ts # Entry point (activate/deactivate)
144+ main.spec.ts # Integration tests
145+ internal/ # Internal business logic
146+ managers/ # Domain-specific managers
147+ config-manager.ts # Configuration reading/writing
148+ status-bar-manager.ts # Status bar button lifecycle
149+ terminal-manager.ts # Terminal creation/execution
150+ providers/ # VS Code providers
151+ command-tree-provider.ts # Sidebar tree view
152+ webview-provider.ts # React configuration UI host
153+ utils/ # Internal utilities
154+ adapters.ts # VS Code API abstraction layer
155+ command-executor.ts # Command execution logic
156+ keyboard-layout-converter.ts # Multi-language keyboard support
157+ show-all-commands.ts # Command palette integration
158+ pkg/ # Public package exports
159+ types.ts # Shared type definitions
160+ config-constants.ts # Configuration constants
161+ shared/ # Shared utilities
162+ constants.ts
163+ types.ts
164+ view/src/ # React configuration UI
165+ app.tsx # Root component
166+ core/ # Reusable UI components (shadcn/ui)
167+ components/ # Feature-specific components
168+ error-boundary.tsx # Error handling wrapper
169+ context/ # React context providers
170+ hooks/ # Custom hooks
171+ use-dark-mode.tsx # VS Code theme synchronization
172+ use-webview-communication.tsx
153173```
154174
155175## Important Constraints
@@ -162,7 +182,7 @@ src/view/src/ # React configuration UI
162182
163183## VS Code Extension Specifics
164184
165- - ** Entry point** : ` main ` field in root ` package.json ` points to compiled ` src/extension/out/src /main.js `
185+ - ** Entry point** : ` main ` field in root ` package.json ` points to compiled ` src/extension/out/extension /main.js `
166186- ** Activation** : ` onStartupFinished ` event (lazy load)
167187- ** Commands** : All prefixed with ` quickCommandButtons.* `
168188- ** Views** : ` quickCommandsContainer ` activity bar, ` quickCommandsTree ` view
0 commit comments