Repository navigation
Conversation
velashell.mongo:Docker 面板式的命令面板入口,插件内自管连接(保存的连接档案、 连接对话框、SSH 跳板、密码进 ISecretsApi)。对象树与工具栏、网格 / 树 / JSON 三视图 与暂存区编辑、查询编辑器与可视化执行计划、聚合管道构建器、Schema 分析与验证规则、 索引建议、GridFS、服务器监控、慢查询、用户与角色、导入 / 导出 / 数据传输。 SDK 抬到 2.0.8;新增 MongoDB.Driver 3.12.0 与测试工程用的 Avalonia.Skia。 设计取证见 velashell-docs zh/host/MongoDB工作台插件设计.md。
- 对象树:集合 / 视图 / GridFS 存储桶分组(及集合、库、桶行)右键可新建对应对象; 桶行可直接上传文件 / 文件夹、删除存储桶(.files 与 .chunks 一起删) - 网格 / 树 / 检查器内联编辑日期时编辑框右边是日历(月历 + 时刻 + 现在 / 应用), 不再只给一条"现在"的文字候选 - 检查器:编辑框失焦即写入暂存区;选中行只在检查器拿着焦点时着色; 对象 / 数组整行可点着展开收起,双击不再翻回 - 筛选框:补全弹层开着时 Enter 接受补全(同一元素上的隧道处理器按注册逆序调用, 筛选框的「Enter 即查找」原先抢在补全之前) - 查询编辑器:切到执行计划页不再收矮编辑器、切回时不再重置高度 文档同步见 velashell-docs zh/host/MongoDB工作台插件设计.md 与 en 镜像。
- 新增 GridFS 本地化字符串(Loc.GridFs.cs),用于版本删除/保留的按钮、确认文本与统计提示。 - 引入更稳健的停用/关闭流程:MongoPlugin.DeactivateAsync 改为在后台等待 ReleaseConnectionsAsync(带超时与 WithinAsync 预算),需要在 UI 线程的 Dispose 使用 OnUiThread 投递;定义 PanelCloseBudget/ReleaseBudget 常量;面板 Initialize/Closed 的初始化与释放改为安全的线程模型(可在线程池释放连接,UI 线程做界面 Dispose)。 - 添加 MongoWorkspaceViewModel.ReleaseConnectionsAsync(线程池可调用,释放驱动连接与 SSH 转发且可重入),Dispose 与释放协同工作以避免 UI 线程阻塞。 - 为 GridFS 详情增加版本管理 UI 与 VM 支持: - 新增 GridFsVersionRow(从 record 改为可变 ObservableObject),包含 IsChecked/IsShown/可更新的 File,并触发属性变更。 - GridFsDetailsViewModel 支持 SetVersions、选中状态处理与命令:DeleteVersionCommand、DeleteCheckedVersionsCommand、KeepLatestOnlyCommand,以及辅助只读属性和确认文本。 - GridFsTabViewModel 新增 DeleteVersionsAsync:显示确认对话、计算腾出空间/块数、调用服务 DeleteManyAsync、处理驱动/超时异常并弹 toast、刷新列表。 - XAML 增加行级复选、单删按钮、底部“删除选中/只保留最新”控件,最新版本不可勾选且保留行排列对齐。 - 修复并规避 Avalonia 绑定错误: - 多处 XAML(JsonCardsView、MongoWorkspaceView、Dialog 覆盖层等)改为局部 DataContext 或 x:DataType 包装,避免“路径中段为 null”的绑定错误。 - CodeEditor 补全弹层显式 DataContext = null,避免继承导致的绑定/类型警告。 - 改进内联编辑通知:CollectionCell 在 Editor setter 中订阅/取消订阅 InlineValueEditor.PropertyChanged,新增 HasEditorError,模板绑定改为 HasEditorError,减少绑定噪音与空引用错误。 - 命令 API 改进:AsyncCommand<T> 新增 ExecuteAsync,支持在测试或串联逻辑中等待命令完成(保留原有 CanExecute/Execute 语义)。 - 增加测试覆盖与文档: - 新增 BindingHygieneTests、ShutdownTests,扩展 GridFsTests(多版本删除场景)以覆盖绑定错误、UI 弹层、停用超时与批量删除流程。 - README 补充绑定穿透、Enter 行为与停用不要阻塞 UI 线程的说明。 总体目标:为 GridFS 添加完整的版本管理交互并提升插件停用、连接释放与 Avalonia 绑定的运行时稳定性,同时通过单元/集成测试与文档减少运行时错误与宿主关机风险。
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.
No description provided.