UI重写,前后端架构调整 - #233
Open
megumiss wants to merge 138 commits into
Open
Conversation
There was a problem hiding this comment.
Sorry @megumiss, your pull request is larger than the review limit of 150000 diff characters
Reviewer's Guide引入了一个基于 SPA 的全新 NKAS Web 界面,支持可主题化 CSS;在后端增加了 REST/WebSocket API;更新了 manage/import 流程;重构样式以使用 CSS 变量,同时保留对旧版 Electron 的兼容性,并改进日志记录与性能。 通过 WebSocket 进行实时日志流的时序图sequenceDiagram
participant Browser as Browser SPA
participant WS as ws.log_socket
participant Broker as LogBroker
participant PM as ProcessManager
Browser->>WS: WebSocket connect /ws/{name}/log
WS->>Broker: replay(name)
Broker-->>WS: existing ConsoleRenderable[]
WS-->>Browser: {type: log, html}
WS->>Broker: subscribe(name)
Broker-->>WS: subscriberQueue
loop for each new log line
PM->>PM: _thread_log_queue_handler()
PM->>PM: renderables.append(log)
PM->>PM: _publish_log(log)
PM-->>Broker: log (via subscriber queues)
Broker-->>WS: log from subscriberQueue
WS-->>Browser: {type: log, html}
end
Browser--xWS: WebSocket close
WS->>Broker: unsubscribe(name, subscriberQueue)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your Experience打开你的 dashboard 以:
Getting HelpOriginal review guide in EnglishReviewer's GuideIntroduces a new SPA-based NKAS web UI with themeable CSS, adds REST/WebSocket APIs on the backend, updates manage/import flows, and refactors styles to use CSS variables while preserving legacy Electron compatibility and improving logging/performance. Sequence diagram for live log streaming over WebSocketsequenceDiagram
participant Browser as Browser SPA
participant WS as ws.log_socket
participant Broker as LogBroker
participant PM as ProcessManager
Browser->>WS: WebSocket connect /ws/{name}/log
WS->>Broker: replay(name)
Broker-->>WS: existing ConsoleRenderable[]
WS-->>Browser: {type: log, html}
WS->>Broker: subscribe(name)
Broker-->>WS: subscriberQueue
loop for each new log line
PM->>PM: _thread_log_queue_handler()
PM->>PM: renderables.append(log)
PM->>PM: _publish_log(log)
PM-->>Broker: log (via subscriber queues)
Broker-->>WS: log from subscriberQueue
WS-->>Browser: {type: log, html}
end
Browser--xWS: WebSocket close
WS->>Broker: unsubscribe(name, subscriberQueue)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
引入基于 SPA 的全新 NKAS Web UI,配套 REST/WebSocket 后端、集中化主题管理以及更新后的管理与更新流程,同时保持现有自动化与流程行为不变。
New Features:
/app/路径下,并提供面向实例、配置、队列、日志和系统状态的全新 REST 与 WebSocket API 支持。Bug Fixes:
Enhancements:
nkas.css,并简化主题相关的差异化样式覆盖。manage()的初始化流程,将根路径重定向到 SPA 入口,并将 API 路由委托给专门模块处理,而不改变现有自动化 API。Original summary in English
Summary by Sourcery
Introduce a new SPA-based NKAS web UI with a REST/WebSocket backend, centralized theming, and updated management and updater flows while preserving existing automation and process behavior.
New Features:
Bug Fixes:
Enhancements: