noteconnection 1.1.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- # 2026-01-23 v1.1.2
1
+ # 2026-01-24 v1.3.0
2
2
 
3
3
  # NoteConnection Knowledge Graph
4
4
 
@@ -45,7 +45,15 @@ Unlike traditional "network" views that show a messy web of links, NoteConnectio
45
45
 
46
46
  <img width="3723" height="1992" alt="image" src="https://github.com/user-attachments/assets/9e56e567-1742-48cf-b720-cf65a47fd317" />
47
47
 
48
- ### 3. Performance & Control
48
+ ### 3. Path Mode: Structured Learning (v1.2.0)
49
+
50
+ - **Curriculum Generation**: Instantly transforms your graph into linear learning paths.
51
+ - **Domain Learning**: Master an entire concept cluster (Topological Sort).
52
+ - **Diffusion Learning**: Find the most efficient path to a specific goal (Shortest Path + Prerequisites).
53
+ - **Hybrid Architecture**: Connects to a high-fidelity **Godot 4.3 Desktop Renderer** via WebSocket (`ws://localhost:9876`) for AAA-quality visualization, while maintaining full web compatibility.
54
+ - **Smart Strategies**: Choose "Foundational" (Base-first) or "Core" (Importance-first) sorting to suit your learning style.
55
+
56
+ ### 4. Performance & Control
49
57
 
50
58
  - **High-Capacity Parallel Processing**: Utilizes Node.js `worker_threads` (up to 12 cores) to distribute computationally intensive keyword matching.
51
59
  - **Simulation Controls (v0.9.0)**: Fine-tune the physics with a **Speed/Damping Slider** or use the **Freeze Layout** switch to stop the simulation for stable manual arrangement.
@@ -108,6 +116,10 @@ NoteConnection is built on a modular architecture designed for performance and e
108
116
  - **State Management**: `SettingsManager` persists user preferences (Physics, Visuals) to `localStorage`.
109
117
  - **Layout Logic**: Custom algorithms for Sugiyama-style layering and Force-directed physics.
110
118
 
119
+ ### Desktop Bridge (`src/core`)
120
+
121
+ - **PathBridge**: standard WebSocket server (Port 9876) that exposes the internal graph state to external applications (e.g., Godot Engine), enabling hybrid web/native visualization pipelines.
122
+
111
123
  ---
112
124
 
113
125
  <a id="quick-start-en"></a>
@@ -266,6 +278,33 @@ For optimal performance with "GPU Optimised Rendering", especially on AMD RDNA c
266
278
 
267
279
  ## 📅 Changelog
268
280
 
281
+ ### v1.3.0 - Path Mode Polish & UI Refinements (2026-01-24)
282
+
283
+ - **Reader Integration**:
284
+ - **Seamless Access**: Double-clicking the central node in "Orbital Layout" now instantly opens the `Reader`, displaying full node content.
285
+ - **Data Fetching**: Fixed a critical issue where the reader would open empty; now correctly retrieves full metadata from the global graph state.
286
+ - **Visual Polish**:
287
+ - **Orbital Layout**: Significantly improved node dispersion (Radius 350-950px) to reduce label overlap.
288
+ - **Edge Clarity**: In Orbital mode, strictly hides edges not connected to the central node, reducing visual clutter by 90%.
289
+ - **Label Visibility**: Peripheral nodes now always display labels, sized proportionally to their distance (max 16px).
290
+ - **Depth of Field**: Adjusted opacity falloff to ensure distant nodes remain visible (min 0.4 opacity).
291
+ - **UX Improvements**:
292
+ - **Target Selection**: Increased the "Target Node" search limit from 20 to 300, ensuring users can find any node in the graph.
293
+ - **Interactive Layers**: Fixed `z-index` layering issues where the Reader window was previously hidden behind the Path visualization.
294
+
295
+ ### v1.2.0 - Path Mode & Desktop Renderer (2026-01-23)
296
+
297
+ - **Path Mode**: Introduced a major new feature set for converting graphs into linear learning paths.
298
+ - **Learning Modes**: 'Domain Learning' (Topological) and 'Diffusion Learning' (Goal-oriented).
299
+ - **Visualization**: New Radial and Tree layouts powered by D3/Canvas.
300
+ - **Strategies**: 'Foundational' and 'Core' sorting algorithms.
301
+ - **Hybrid Architecture**:
302
+ - **Godot Bridge**: Implemented `PathBridge.ts` to sync graph state with external renderers via WebSocket (Port 9876).
303
+ - **Native Rendering**: Added support for Godot 4.3 to render the graph with high-fidelity Vulkan graphics (Source in `path_mode/`).
304
+ - **DevOps**:
305
+ - **NPM Scripts**: Added `pathmode:dev` and `pathmode:test` workflows.
306
+ - **UI Stability**: Fixed critical bugs in Radial Layout visibility (`centerView`) and Exit Mode logic.
307
+
269
308
  ### v1.1.2 - Path Resolution & UI Stability (2026-01-23)
270
309
 
271
310
  - **Backend Protocol Fix**:
@@ -726,7 +765,15 @@ For optimal performance with "GPU Optimised Rendering", especially on AMD RDNA c
726
765
 
727
766
  <img width="3723" height="2007" alt="image" src="https://github.com/user-attachments/assets/10978984-3e2d-4ab6-8b44-342d4f3c3800" />
728
767
 
729
- ### 3. 性能与控制
768
+ ### 3. Path Mode (路径模式): 结构化学习 (v1.2.0)
769
+
770
+ - **课程生成**: 将复杂的网状图瞬间转化为线性的学习路径。
771
+ - **领域学习 (Domain Learning)**: 掌握整个概念集群(拓扑排序)。
772
+ - **扩散学习 (Diffusion Learning)**: 寻找通往特定目标的最优路径(最短路径 + 前置依赖)。
773
+ - **混合架构**: 通过 WebSocket (`ws://localhost:9876`) 连接到高保真 **Godot 4.3 桌面渲染器**,实现 3A 级的可视化效果,同时保持完全的 Web 兼容性。
774
+ - **智能策略**: 支持 "基础优先" (Foundational) 或 "核心优先" (Core) 排序,适应不同的学习风格。
775
+
776
+ ### 4. 性能与控制 (Performance & Control)
730
777
 
731
778
  - **高容量并行处理**: 利用 Node.js `worker_threads` (最多 12 核) 分发计算密集的关键词匹配任务。
732
779
  - **模拟控制 (v0.9.0)**: 通过 **速度/阻尼滑块** 微调物理效果,或使用 **冻结布局** 开关停止模拟以进行稳定的手动排列。
@@ -789,6 +836,10 @@ NoteConnection 基于模块化架构构建,旨在实现高性能和可扩展
789
836
  - **状态管理**: `SettingsManager` 将用户偏好(物理、视觉)持久化到 `localStorage`。
790
837
  - **布局逻辑**: 自定义的 Sugiyama 风格分层算法和力导向物理算法。
791
838
 
839
+ ### 桌面桥接 (Desktop Bridge) (`src/core`)
840
+
841
+ - **PathBridge**: 标准 WebSocket 服务器 (端口 9876),将内部图谱状态暴露给外部应用程序(例如 Godot 引擎),实现混合 Web/原生可视化管线。
842
+
792
843
  ---
793
844
 
794
845
  <a id="quick-start-zh"></a>
@@ -934,6 +985,33 @@ npm start -- --path "E:/Knowledge/ObsidianVault" --no-gpu
934
985
 
935
986
  ## 📅 更新日志 (Changelog)
936
987
 
988
+ ### v1.3.0 - 路径模式打磨与 UI 优化 (Path Mode Polish & UI Refinements) (2026-01-24)
989
+
990
+ - **阅读器集成 (Reader Integration)**:
991
+ - **无缝访问**: 在“轨道布局”中双击中心节点现在会立即打开`阅读器`,显示完整的节点内容。
992
+ - **数据获取**: 修复了阅读器打开为空的关键问题;现在可以正确地从全局图状态检索完整的元数据。
993
+ - **视觉打磨 (Visual Polish)**:
994
+ - **轨道布局**: 显著改进了节点分散度(半径 350-950px),减少了标签重叠。
995
+ - **边缘清晰度**: 在轨道模式下,严格隐藏未连接到中心节点的边,将视觉混乱减少了 90%。
996
+ - **标签可见性**: 周围节点现在总是显示标签,并根据距离按比例缩放(最大 16px)。
997
+ - **景深 (DoF)**: 调整了不透明度衰减,以确保远处的节点保持可见(最小 0.4 不透明度)。
998
+ - **用户体验改进 (UX Improvements)**:
999
+ - **目标选择**: 将“目标节点”搜索限制从 20 增加到 300,确保用户可以找到图中的任何节点。
1000
+ - **交互层级**: 修复了 `z-index` 层级问题,之前的阅读器窗口被隐藏在路径可视化后面。
1001
+
1002
+ ### v1.2.0 - 路径模式与桌面渲染器 (2026-01-23)
1003
+
1004
+ - **路径模式 (Path Mode)**: 引入了一套主要的新功能,用于将图谱转化为线性的学习路径。
1005
+ - **学习模式**: '领域学习' (拓扑排序) 和 '扩散学习' (目标导向)。
1006
+ - **可视化**: 由 D3/Canvas 驱动的全新径向和树状布局。
1007
+ - **策略**: '基础优先' 和 '核心优先' 排序算法。
1008
+ - **混合架构**:
1009
+ - **Godot 桥接**: 实现了 `PathBridge.ts`,通过 WebSocket (端口 9876) 与外部渲染器同步图谱状态。
1010
+ - **原生渲染**: 添加了对 Godot 4.3 的支持,以渲染高保真的 Vulkan 图形 (源码位于 `path_mode/`).
1011
+ - **运维 (DevOps)**:
1012
+ - **NPM 脚本**: 添加了 `pathmode:dev` 和 `pathmode:test` 工作流。
1013
+ - **UI 稳定性**: 修复了径向布局可见性 (`centerView`) 和退出模式逻辑中的关键 Bug。
1014
+
937
1015
  ### v1.1.2 - 路径解析与 UI 稳定性 (2026-01-23)
938
1016
 
939
1017
  - **后端协议修复**:
@@ -2969,3 +2969,42 @@ if (controlsPanelToggleTarget) {
2969
2969
  }
2970
2970
  });
2971
2971
  }
2972
+
2973
+ // Path Mode Integration (v1.1.0)
2974
+ const btnPathMode = document.getElementById('btn-path-mode');
2975
+ if (btnPathMode) {
2976
+ btnPathMode.addEventListener('click', () => {
2977
+ // Check for active selection for Diffusion Learning
2978
+ const highlightState = window.highlightManager ? window.highlightManager.getState() : null;
2979
+ const selectedNode = (highlightState && highlightState.currentNode) ? highlightState.currentNode : null;
2980
+
2981
+ console.log('[Path Mode] Entering...', selectedNode ? `Target: ${selectedNode.id}` : 'Domain Mode');
2982
+
2983
+ // UI Switch
2984
+ document.getElementById('graph-wrapper').style.display = 'none';
2985
+ document.getElementById('path-container').style.display = 'block';
2986
+
2987
+ // Initialize Path App
2988
+ if (window.pathApp) {
2989
+ if (selectedNode) {
2990
+ // Diffusion Learning
2991
+ const modeSelect = document.getElementById('learning-mode');
2992
+ if(modeSelect) modeSelect.value = 'diffusion';
2993
+
2994
+ // Hide main graph controls panel potentially?
2995
+ // For now, path-container consumes full screen and has its own toolbar.
2996
+
2997
+ window.pathApp.init(selectedNode.id);
2998
+ } else {
2999
+ // Domain Learning
3000
+ const modeSelect = document.getElementById('learning-mode');
3001
+ if(modeSelect) modeSelect.value = 'domain';
3002
+
3003
+ window.pathApp.init(null);
3004
+ }
3005
+ } else {
3006
+ console.error('PathApp not loaded! Ensure libs/path_core.js and path_app.js are included.');
3007
+ }
3008
+ });
3009
+ }
3010
+
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta
7
7
  http-equiv="Content-Security-Policy"
8
- content="default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; img-src 'self' data: blob:; connect-src 'self'; worker-src 'self' blob:;"
8
+ content="default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; img-src 'self' data: blob:; connect-src 'self' ws: localhost:9876; worker-src 'self' blob:;"
9
9
  />
10
10
  <title>NoteConnection Knowledge Graph</title>
11
11
  <link
@@ -13,6 +13,7 @@
13
13
  href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🔗</text></svg>"
14
14
  />
15
15
  <link rel="stylesheet" href="styles.css" />
16
+ <link rel="stylesheet" href="path_styles.css" />
16
17
  <!-- Local Dependencies (Fully Offline) -->
17
18
  <script src="libs/d3.v7.min.js"></script>
18
19
 
@@ -69,7 +70,20 @@
69
70
  cursor: pointer;
70
71
  "
71
72
  >
72
- Load
73
+ </button>
74
+ <button
75
+ id="btn-path-mode"
76
+ style="
77
+ background: #2c5282;
78
+ color: white;
79
+ border: 1px solid #555;
80
+ padding: 2px 8px;
81
+ cursor: pointer;
82
+ margin-left: 5px;
83
+ "
84
+ title="Path Learning Mode"
85
+ >
86
+ Path Mode
73
87
  </button>
74
88
  </div>
75
89
 
@@ -985,6 +999,26 @@
985
999
  </div>
986
1000
  </div>
987
1001
 
1002
+ <div class="settings-group">
1003
+ <h3 data-i18n="grp_path_mode">Path Mode</h3>
1004
+ <div class="setting-item">
1005
+ <label
1006
+ style="display: flex; align-items: center; cursor: pointer"
1007
+ >
1008
+ <input type="checkbox" id="set-retain-history" checked />
1009
+ <span style="margin-left: 10px" data-i18n="lbl_retain_history"
1010
+ >Retain Learning History</span
1011
+ >
1012
+ </label>
1013
+ <div
1014
+ style="font-size: 0.75rem; color: #888; margin-top: 2px"
1015
+ data-i18n="desc_retain_history"
1016
+ >
1017
+ Keep learned nodes state across sessions.
1018
+ </div>
1019
+ </div>
1020
+ </div>
1021
+
988
1022
  <div class="settings-group">
989
1023
  <h3 data-i18n="grp_reading">Reading</h3>
990
1024
  <div class="setting-item">
@@ -1159,5 +1193,97 @@
1159
1193
  <script src="loading.js"></script>
1160
1194
  <script src="source_manager.js"></script>
1161
1195
  <script src="welcome.js"></script>
1196
+ <!-- Path Mode Container (Hidden by default) -->
1197
+ <div id="path-container" class="path-container">
1198
+ <!-- Toolbar -->
1199
+ <div id="path-toolbar" class="path-toolbar">
1200
+ <div class="toolbar-group">
1201
+ <label for="learning-mode" data-i18n="lbl_mode">Mode:</label>
1202
+ <select id="learning-mode">
1203
+ <option value="domain" data-i18n="opt_domain">Domain Learning</option>
1204
+ <option value="diffusion" data-i18n="opt_diffusion">Diffusion Learning</option>
1205
+ </select>
1206
+ </div>
1207
+
1208
+ <div class="toolbar-group">
1209
+ <label for="strategy" data-i18n="lbl_strategy">Strategy:</label>
1210
+ <select id="strategy">
1211
+ <option value="foundational" data-i18n="opt_strat_foundational" title="Start with fundamental concepts (Low In-Degree)">Foundational</option>
1212
+ <option value="core" data-i18n="opt_strat_core" title="Start with key concepts (High Centrality)">Core</option>
1213
+ </select>
1214
+ </div>
1215
+
1216
+ <div class="toolbar-group">
1217
+ <label for="layout-style" data-i18n="lbl_layout">Layout:</label>
1218
+ <select id="layout-style">
1219
+ <option value="vertical" data-i18n="opt_layout_vertical">Vertical Tree</option>
1220
+ <option value="horizontal" data-i18n="opt_layout_horizontal">Horizontal Tree</option>
1221
+ <option value="radial" data-i18n="opt_layout_radial">Radial</option>
1222
+ <option value="orbital" data-i18n="opt_layout_orbital">Orbital (Focus)</option>
1223
+ </select>
1224
+ </div>
1225
+
1226
+ <div class="toolbar-group">
1227
+ <button id="btn-mark-complete" class="icon-btn action-btn" title="Mark Current Node Complete">
1228
+ <span class="icon">✨</span> <span data-i18n="btn_complete">Complete</span>
1229
+ </button>
1230
+ </div>
1231
+
1232
+ <div class="toolbar-group">
1233
+ <button id="btn-toggle-history" class="icon-btn" title="Toggle Learning History">
1234
+ 📜 <span data-i18n="btn_history">History</span>
1235
+ </button>
1236
+ </div>
1237
+
1238
+ <div class="toolbar-group right">
1239
+ <button id="btn-exit-path" class="icon-btn" title="Exit Path Mode">
1240
+ <i class="fas fa-times"></i> <span data-i18n="btn_exit">Exit</span>
1241
+ </button>
1242
+ </div>
1243
+ </div>
1244
+
1245
+ <!-- Canvas Layer -->
1246
+ <canvas id="path-canvas"></canvas>
1247
+
1248
+ <!-- Overlay Layer for Interaction -->
1249
+ <div id="path-overlay"></div>
1250
+
1251
+ <!-- Progress / Status -->
1252
+ <div id="path-status">
1253
+ Learning Path: <span id="path-count">0</span> nodes
1254
+ </div>
1255
+ </div>
1256
+
1257
+ <!-- Learning History Sidebar -->
1258
+ <div id="learning-history-sidebar" class="path-sidebar" style="display: none;">
1259
+ <div class="sidebar-header">
1260
+ <h3>Learning History</h3>
1261
+ <button id="btn-close-history" class="close-btn">&times;</button>
1262
+ </div>
1263
+ <div id="history-list" class="sidebar-content">
1264
+ <!-- Items injected here -->
1265
+ </div>
1266
+ </div>
1267
+
1268
+ <!-- Node Selector Modal for Diffusion Mode -->
1269
+ <div id="node-select-modal" class="modal-overlay" style="display: none;">
1270
+ <div class="modal-content" style="max-width: 500px;">
1271
+ <div class="modal-header">
1272
+ <h3>Select Target Node</h3>
1273
+ <button class="modal-close" id="btn-close-node-select">&times;</button>
1274
+ </div>
1275
+ <div class="modal-body">
1276
+ <input type="text" id="node-select-input" placeholder="Search for a concept..." style="width: 100%; padding: 8px; box-sizing: border-box;">
1277
+ <ul id="node-select-list" style="list-style: none; padding: 0; margin-top: 10px; max-height: 300px; overflow-y: auto; border: 1px solid #444;">
1278
+ <!-- Autocomplete items -->
1279
+ </ul>
1280
+ </div>
1281
+ </div>
1282
+ </div>
1283
+
1284
+ <!-- Path Mode Scripts -->
1285
+ <script src="libs/path_core.js"></script>
1286
+ <script src="path_app.js"></script>
1287
+
1162
1288
  </body>
1163
1289
  </html>