Skip to content

Commit ba18766

Browse files
feat(Wind): Add 5 listen() event subscriptions for Tauri IPC bridge
Add event subscription handlers in TauriMainProcessService to bridge Tauri events from Mountain to Wind's VS Code IPC layer: - fileChange: sky://vfs/fileChange - onDidChangeConfiguration: sky://configuration/changed - onTerminalData: sky://terminal/data - onWillShutdown: sky://lifecycle/willShutdown - onDidChangePhase: sky://lifecycle/phaseChanged Each handler creates a Tauri event listener that forwards events to the VS Code event callback, with proper dispose() cleanup. This completes the event bridge for the Tauri IPC layer.
1 parent 632f00a commit ba18766

2 files changed

Lines changed: 269 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 169 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,170 @@
1-
## 0.0.1
1+
# Changelog
22

3-
- Initial version
3+
All notable changes to Wind (UI Service Layer) are documented here.
4+
Format: [Keep a Changelog](https://keepachangelog.com/).
5+
6+
## [v2.1] — Q2 2026: Full Workbench Lift
7+
8+
### Added
9+
10+
- 5 listen() event subscriptions: fileChange (`sky://vfs/fileChange`),
11+
configuration (`sky://configuration/changed`), terminal
12+
(`sky://terminal/data`), lifecycle willShutdown
13+
(`sky://lifecycle/willShutdown`), lifecycle phaseChanged
14+
(`sky://lifecycle/phaseChanged`)
15+
16+
### Changed
17+
18+
- TauriMainProcessService verified: 24 VS Code IPC channels routed to Mountain
19+
- ResolveConfiguration confirmed loading real Mountain paths
20+
21+
## [v2.0] — Q1 2026: Editor Launch Sprint
22+
23+
### April 8-16: Tauri IPC Bridge Sprint
24+
25+
#### Added
26+
27+
- `Source/Service/TauriMainProcessService.ts` (232 lines, April 8) — IPC
28+
routing with 24 channel routes and 14 stub channels:
29+
- Routed: localFilesystem, storage, configuration, textFile, extensions,
30+
commands, terminal, output, notification, progress, quickInput, workspaces,
31+
themes, search, environment, decorations, workingCopy, keybinding,
32+
lifecycle, label, model, nativeHost, localPty, url, menubar, encryption,
33+
extensionHostStarter, extensionhostdebugservice
34+
- Stubbed: update, sign, policy, userDataProfiles, keyboardLayout,
35+
sharedProcess, utilityProcessWorker, meteredConnection, webContentExtractor,
36+
browserElements, NativeMcpDiscoveryHelper, sandboxHelper, mcpGateway,
37+
browserViewGroup, externalTerminal
38+
- `Source/Polyfills/IPCRendererShim.ts` (373 lines) — binary IPC protocol
39+
(created then consolidated)
40+
- `Source/Function/DevLog.ts` (72 lines, April 9) — development logging with
41+
short mode and fire-and-forget semantics
42+
- MessageChannel for extension host IPC: Preload.ts +58 lines, init data →
43+
Initialized byte ([1]) → Ready byte ([2]) after 50ms
44+
- Extension host protocol message forwarding to Mountain (+85 lines)
45+
- ResolveConfiguration: +111 lines for INativeWindowConfiguration, profiles,
46+
colorScheme, accessibilitySupport; +94 lines for Mountain path resolution via
47+
RPC
48+
49+
#### Changed
50+
51+
- Preload.ts grew from 99 lines (March) to 190+ lines with debugging
52+
instrumentation
53+
- IPC naming: ipcMain → IPC (PascalCase convention)
54+
- Effect.either refactor for proper fiber-level failure handling in bootstrap
55+
56+
#### Removed
57+
58+
- 1,076 lines of legacy polyfills deleted (April 11):
59+
ChildProcessPolyfill.ts (77), FileProtocolShim.ts (58),
60+
FileSystemPolyfill.ts (44), NativeModulePolyfill.ts (62),
61+
ProcessPolyfill.ts (36), SharedProcessProxy.ts (68)
62+
63+
### January-March: Bootstrap + Preload Foundation
64+
65+
#### Added
66+
67+
- `Source/Preload.ts` (99 lines) — Tauri/Electron bridge
68+
- `Source/Bootstrap/Types/` — 30+ VS Code type mirror files:
69+
BootstrapTypes.ts, Type/ subtree (BootstrapConfig, EnvironmentData, Mode,
70+
Platform, StageResult, etc.)
71+
- `Source/Bootstrap/Types/VSCode/` — VSCodeConfigurationType,
72+
VSCodeLoggerType, VSCodeWorkbenchOptionsType
73+
- TypeScript 5.9.3 → 6.0.2 upgrade (March 24)
74+
75+
## [v1.3] — Q4 2025: Dependency Maintenance
76+
77+
### Changed
78+
79+
- effect: 3.18.0 → 3.19.14
80+
- @effect/platform: 0.92.0 → 0.94.1
81+
- @effect/language-service: 0.60.x → 0.63.2
82+
- No major Application/ restructures; module count stable
83+
84+
## [v1.2] — Q3 2025: Full Stack Integration
85+
86+
### Added
87+
88+
- 100+ Application service modules following Define/Implement/Problem pattern:
89+
- `Source/Application/{Service}/Define.ts` — interface
90+
- `Source/Application/{Service}/Implement.ts` — Effect-TS implementation
91+
- `Source/Application/{Service}/Problem.ts` — error types
92+
- Services: Command, Configuration, Dialog, Editor, EditorGroup, File,
93+
FileSystem, Host, IPC, LanguageFeature, Logger, Marker, Notification,
94+
Policy, UntitledTextEditor, and more
95+
- 300+ file infrastructure commit (September 12): template preparation
96+
97+
### Changed
98+
99+
- Effect-TS 3.17.x → 3.18.x
100+
- solid-js 1.9.x stable
101+
- @types/node 24.x
102+
103+
## [v1.1] — Q2 2025: Architecture Buildout
104+
105+
**May 30, 2025: the pivot point — Effect-TS + Application layer born.**
106+
107+
### Added
108+
109+
- `Source/Effect/` directory — Effect-TS service composition layer
110+
- `Source/Application/` directory — 50+ service modules (Dialog, FileDialog,
111+
etc.) with Effect-TS-driven patterns
112+
- `Source/Configuration/ESBuild/` — build config restructure
113+
- effect, @effect/platform, @effect/experimental, @effect/language-service
114+
dependencies
115+
116+
### Removed
117+
118+
- Source/Element/Preview.scss
119+
- SolidJS evaluation concluded
120+
121+
## [v1.0] — Q1 2025: Integration Phase
122+
123+
### Changed
124+
125+
- deepmerge-ts: 7.1.4 → 7.1.5
126+
- solid-js: 1.9.4 → 1.9.5
127+
- CODE_OF_CONDUCT.md, CONTRIBUTING.md governance refresh
128+
- Target gen/delete cycles (CI/CD integration testing)
129+
130+
## [v0.2] — Q4 2024: Architecture Solidification
131+
132+
### Added
133+
134+
- Target/ artifacts: 88 files generated (Context/*, Element/*, Function/*,
135+
Interface/*, Script/Monaco/Theme/*.json, Stylesheet/*)
136+
- Monaco themes: Active4D.json (154 lines), Amoled.json (219 lines)
137+
- Stylesheet: Tippy/Dark.scss (132 lines), Tippy/Light.scss (41 lines)
138+
139+
### Changed
140+
141+
- solid-devtools: 0.31.2 → 0.31.7
142+
- CSS custom properties: `--Mute` action-form convention
143+
144+
## [v0.1] — Q3 2024: Rapid Development
145+
146+
### Changed
147+
148+
- SCSS cleanup: Editor.scss reduced 42 lines; mixin borders/spacing refactored
149+
- solid-js: 1.8.19 → 1.9.1
150+
- monaco-editor: 0.51.0-rc2 → 0.52.0
151+
- @playform/build: 0.1.2 → 0.1.7
152+
- No new architectural folders; pure refinement
153+
154+
## [v0.0] — Q2 2024: Project Inception
155+
156+
### Added
157+
158+
- `Source/Context/` — React-style context primitives (Action, Connection,
159+
Environment, Session, Store)
160+
- `Source/Element/` — SolidJS components (Editor.tsx, Button, Anchor, Tip,
161+
Footer)
162+
- `Source/Library/` — helper functions (Create, Pad, Persist, Environment)
163+
- `Source/Function/` — utilities (Merge)
164+
- `Source/Stylesheet/` — SCSS (Element/*, Mixin/*)
165+
- `Source/Variable/` — ESBuild config, StringURL constant
166+
167+
### Dependencies (First Release)
168+
169+
- solid-js 1.8.x, monaco-editor 0.51.x, @playform/build 0.1.x,
170+
@modular-forms/solid

Source/Service/TauriMainProcessService.ts

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,106 @@ class TauriChannel implements IChannel {
301301
}) as unknown as VSCodeEvent<T>;
302302
}
303303

304+
// ----------------------------------------------------------------
305+
// localFilesystem — fileChange (file watcher notifications)
306+
// ----------------------------------------------------------------
307+
if (
308+
FileSystemChannels.has(this.ChannelName) &&
309+
Event === "fileChange"
310+
) {
311+
return ((Listener: (Data: unknown) => void) => {
312+
const Unlisten = (window as any).__TAURI__?.event?.listen(
313+
"sky://vfs/fileChange",
314+
(TauriEvent: any) => Listener(TauriEvent.payload),
315+
);
316+
return {
317+
dispose: () => {
318+
Unlisten?.then((F: () => void) => F());
319+
},
320+
};
321+
}) as unknown as VSCodeEvent<T>;
322+
}
323+
324+
// ----------------------------------------------------------------
325+
// configuration — onDidChangeConfiguration
326+
// ----------------------------------------------------------------
327+
if (
328+
this.ChannelName === "configuration" &&
329+
Event === "onDidChangeConfiguration"
330+
) {
331+
return ((Listener: (Data: unknown) => void) => {
332+
const Unlisten = (window as any).__TAURI__?.event?.listen(
333+
"sky://configuration/changed",
334+
(TauriEvent: any) => Listener(TauriEvent.payload),
335+
);
336+
return {
337+
dispose: () => {
338+
Unlisten?.then((F: () => void) => F());
339+
},
340+
};
341+
}) as unknown as VSCodeEvent<T>;
342+
}
343+
344+
// ----------------------------------------------------------------
345+
// terminal — onTerminalData
346+
// ----------------------------------------------------------------
347+
if (
348+
this.ChannelName === "terminal" &&
349+
Event === "onTerminalData"
350+
) {
351+
return ((Listener: (Data: unknown) => void) => {
352+
const Unlisten = (window as any).__TAURI__?.event?.listen(
353+
"sky://terminal/data",
354+
(TauriEvent: any) => Listener(TauriEvent.payload),
355+
);
356+
return {
357+
dispose: () => {
358+
Unlisten?.then((F: () => void) => F());
359+
},
360+
};
361+
}) as unknown as VSCodeEvent<T>;
362+
}
363+
364+
// ----------------------------------------------------------------
365+
// lifecycle — onWillShutdown
366+
// ----------------------------------------------------------------
367+
if (
368+
this.ChannelName === "lifecycle" &&
369+
Event === "onWillShutdown"
370+
) {
371+
return ((Listener: (Data: unknown) => void) => {
372+
const Unlisten = (window as any).__TAURI__?.event?.listen(
373+
"sky://lifecycle/willShutdown",
374+
(TauriEvent: any) => Listener(TauriEvent.payload),
375+
);
376+
return {
377+
dispose: () => {
378+
Unlisten?.then((F: () => void) => F());
379+
},
380+
};
381+
}) as unknown as VSCodeEvent<T>;
382+
}
383+
384+
// ----------------------------------------------------------------
385+
// lifecycle — onDidChangePhase
386+
// ----------------------------------------------------------------
387+
if (
388+
this.ChannelName === "lifecycle" &&
389+
Event === "onDidChangePhase"
390+
) {
391+
return ((Listener: (Data: unknown) => void) => {
392+
const Unlisten = (window as any).__TAURI__?.event?.listen(
393+
"sky://lifecycle/phaseChanged",
394+
(TauriEvent: any) => Listener(TauriEvent.payload),
395+
);
396+
return {
397+
dispose: () => {
398+
Unlisten?.then((F: () => void) => F());
399+
},
400+
};
401+
}) as unknown as VSCodeEvent<T>;
402+
}
403+
304404
return (() => ({ dispose: () => {} })) as unknown as VSCodeEvent<T>;
305405
}
306406
}

0 commit comments

Comments
 (0)