Conversation
added 3 commits
June 25, 2026 20:24
对齐 dev.ps1 的能力:环境检查(node/pnpm/cargo/Xcode CLT)、 依赖安装、14300 端口占用检测与释放、启动 pnpm tauri dev。 支持 --skip-install / --check-only / -h 参数。
- 调色板由 Xcode Dark 深色代码块改为 Liquid Glass 浅色玻璃质感 - 代码块容器采用 Double-Bezel 嵌套架构(外层托盘 + 内层高光内描边) - 代码块左侧渲染 macOS 经典三色交通灯圆点(红/黄/绿), 改用 SVG 矢量 data URI 避免 radial-gradient 的小圆锯齿 - 行内代码、标题栏、语言标签、复制按钮、行号同步适配浅色基调 - 修正 Shiki 配色:浅色代码块保留 github-light token 色, 不再强制覆盖为 github-dark - 暗色模式保持协调,交通灯略降饱和避免刺眼 根因:原 radial-gradient 在 6px 小尺寸下圆边界落在非整数像素, 光栅化后边缘锯齿明显;改用 SVG 矢量圆天然抗锯齿。
根因:macOS 访达打开文件经 Apple Event application:openURLs: 传入,
文件路径以 file:// URL 形式传递,既不在 argv 里,也需 percent-decode。
原代码只读 std::env::args() 和单实例插件的 argv 回调,
两处都拿不到 Finder 文件,导致已运行实例不展示、双击也不开新 tab。
调用链(cargo 源码验证):
访达双击 → tao application_open_urls → AppState::open_urls
→ Event::Opened{urls} → Tauri RunEvent::Opened{urls}(仅 macOS/iOS/Android)
修复:
- 新增 urls_to_md_paths():file:// URL → 本地路径,过滤 .md/.markdown
- .run(ctx) 改为 .build(ctx) + app.run 事件循环,捕获 RunEvent::Opened,
解析后 emit 复用的 open-on-startup 事件给前端(前端零改动)
- 500ms 延迟 emit 覆盖冷启动前端监听未挂载情形
- 显式声明 url 依赖(原为 tauri 传递依赖)
去重:macOS 冷启动文件只经 Opened 到达,argv 为空不会重复;
即便重复,前端 openTab 已按归一化路径幂等去重。
附修:lib.rs 中 commands::resolve_image 路径补回 ::files:: 前缀。
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.