Skip to content

Releases: AhJxs/so-novel-rs

v0.3.6

Choose a tag to compare

@github-actions github-actions released this 11 Jul 18:39

Changelog

[0.3.6] - 2026-07-12

主题:Markdown 导出 + URL 直接下载 + Tasks 删除 toast 反馈(32 commits,
详见 CHANGELOG_ALL.md)。

Added

  • Markdown 导出格式ExportFormat::Markdown + MdExporter
    (YAML front matter + H1 书名 + TOC + 章节锚点);desktop settings、
    web FORMAT_OPTIONS、CLI --format markdown、library .md 扩展名过滤按钮
    全链路打通
  • URL 直接下载(SearchPage header「下载链接」按钮):弹 Dialog 自动粘贴
    剪贴板 + 「粘贴」兜底按钮;按 URL origin / hash / port 匹配书源,复用
    open_range_dialog 走选章下载流程
  • Tasks 删除 toast 反馈DeleteTaskResult 枚举(Ok /
    StillRunning / Missing),prompt_delete.on_ok 按结果推
    success / warning toast
  • match_source_by_url 测试矩阵:锁定 query / hash / port 三个易踩点的
    匹配敏感性,防止后续回归

Changed

  • Library 移除 notify watcher:改用手动「刷新」按钮 + 加载态,避免
    watcher 在打包后的 Windows 资源占用 + 资源刷新双触发问题
  • ExportFormat 三端对齐Markdown 在 desktop settings / web
    FORMAT_OPTIONS / CLI --format 一致暴露 'md'

Fixed

  • Dialog-stack pop race:URL 匹配成功后 open_range_dialog 通过 flag
    延迟到下一帧弹出,避免与正在关闭的 URL Dialog 栈冲突
  • download_path 默认值:fallback './downloads' 改带 ./ 前缀,
    与显式配置统一路径解析语义
  • Export 新代码 clippy nits + md i18n key 补全 + 2 个缺失测试(review 反馈)
  • mod tasks 可见性:提升到 pub(crate),让 DeleteTaskResult 跨模块
    可见(之前需在 model 内重组才能导出)

v0.3.5

Choose a tag to compare

@github-actions github-actions released this 11 Jul 04:54

Changelog

[0.3.5] - 2026-07-11

主题:模块重组 + 业务层抽离 + Web 多语言适配(49 commits,详见
CHANGELOG_ALL.md)。

Added

  • Web API 多语言:错误响应按 per-request locale 翻译
    (Accept-Language → AppConfig.language → en fallback),
    全局无 mutation;新增稳定数字错误码表(38 个,1xxx-5xxx),
    前端 dispatch 由 substring 匹配改为按 codeId 数字码
  • AppError / DaoError 根类型 + AppResult 别名:业务层错误统一形态;
    AppConfig 拆 6 个 sub-struct + validate + singleton
  • /api/health JSON 端点 + Docker Compose 编排
  • Crawler 性能:章节边下边写(消除批量 syscall)+ tokio::sync::Notify
    立即唤醒 drain_loop(TOC / 搜索 / 详情 / 更新检查)
  • Observability:关键 public fn 加 tracing::instrument + rust-doc
  • Pedantic lint 套件unwrap_used / expect_used / panic 强制 justify)

Changed

  • 重大模块重组
    • gpui_appdesktopappdesktop::model
      download_taskcore::download_taskutilutilspersistentdb
  • core/ 业务层抽离(Phase 3.0–3.9,10 个子阶段):search / sources /
    bootstrap / download_task / library / update / async_progress / web helpers /
    cli runtime 等与 GUI 解耦,三端共享
  • 大文件按职责拆分:所有 400+ LOC 的 monolithic 文件拆成 focus 子文件
    (crawler / export / parser / web / desktop 等 14 处)
  • Web SSE 本地化:所有 error / reason 字段从硬编码中文 / format!("{e:#}")
    改为按 locale 翻译的稳定文案;3 个新错误码变体
  • zh-HKzh-TW 全量重命名:消除 locale tag 漂移
  • Logger 默认切回 Text(JSON 通过 RUST_LOG_FORMAT=json 启用)
  • README.md 项目结构精简

Fixed

  • Web 错误响应泄漏内部 cause(anyhow / thiserror 完整链曾被拼进 500 body)
  • 起点站 cookie 通过 GET /api/settings 泄漏(改返脱敏 PublicSettings
  • SSE 错误事件泄漏内部错误细节(统一走 ErrorCode 翻译)
  • 前端把后端 envelope 当 opaque 文本(改为解析 code / codeId / message
  • 346 个 build warning + 0 个 clippy warning under -D warnings

v0.3.4

Choose a tag to compare

@github-actions github-actions released this 04 Jul 10:55

Changelog

[0.3.4] - 2026-07-04

Added

  • CLI --help 多语言so-novel-rs --help / -h / 子命令 help
    现在按 ~/.sonovel/config.toml [global].language 显示三种语言
    (zh-CN / zh-TW → zh-HK / en)。locales/app.yml 新增 Cli: 命名空间
    (~25 个 leaf key);src/cli/args.rs 新增 build_localized_command(lang)
    手搓本地化的 clap::Command 树(因 clap 4 顶层 about/long_about/
    after_help 无 public setter,无法 derive 后 mutate)
  • search --help / sources list --help 等必填 positional 子命令的
    help 也能正确路由到子命令 help(src/cli/mod.rs::parse_or_help_fallback
    剥掉 --help 后允许 required-arg-missing 走 help 分发)
  • 顶层 Examples: 区按 locale 切语言;zh-TW 通过 crate::i18n::locale_for
    映射到 zh-HK 查 app.yml(Language::as_str() 仍返回 zh-TW,仅 i18n
    查表层用 zh-HK

Changed

  • src/main.rs 128 行 → 18 行 + 新建 src/startup/ 模块:把 mode
    判定 / Windows console attach / tracing init / cfg-gated 分发拆到
    startup/{mod,web}.rs;main.rs 只剩 crate attribute + 3 行 main()
  • LaunchMode enum 取代原 is_web / is_cli 两个 boolean 的隐式
    precedence;detect(args) -> LaunchMode 是唯一的 mode 入口
  • run_web 改名 startup::web::runparse_arg_value 改为
    pub(super) 仅 startup 模块内可见(仍只被 --host / --port 两处调用)
  • attach_parent_console Windows Win32 调用原样搬到 startup::mod.rs
    cfg gate 同步迁移
  • "feature not enabled" 的 bail 提示(如 --no-default-features --features gui--web)移到对应 run 函数内部,与 cfg gate 紧贴
  • init_tracing() 仍在 dispatch 里调用、但仅对非 CLI 模式(CLI 内部
    仍按 --verbose 自决),保持"CLI 默认静默、GUI / Web 始终有日志"原行为
    避免 tracing_subscriber::init() 双 init panic
  • 三个构建目标全部 clean:cargo build(默认 features)、
    cargo build --no-default-features --features web(Docker 路径)、
    cargo build --no-default-features --features gui
  • 全部 370 个 lib 测试仍 pass,无新增 / 删除

Fixed

  • CLI so-novel-rs --helpconfig.toml language = "en" / "zh-TW"
    时仍输出简体中文(之前 help 文案硬编码中文,与 UI 语言不一致)
  • release 打包的 so-novel-rs.exe 双击启动 GUI 时会额外弹出一个黑色
    控制台窗口
    (与 gpui 主窗口一起出现)。根因:src/startup/mod.rs::dispatch
    LaunchMode::Gui 调用了 attach_parent_console(),Explorer 双击
    场景下 AttachConsole(ATTACH_PARENT_PROCESS) 失败 → AllocConsole()
    fallback 在运行时分配新 console。修复:Gui arm 仅 init_tracing()
    调 attach_console(windows_subsystem = "windows" 已在 PE 层保证
    进程启动时无 console;Web arm 行为不变,仍 attach 以保证 Explorer 双击
    启动 Web 时日志可读)
  • release 打包的 so-novel-rs.exe--help / -V / 任意 CLI 子命令
    完全没有 stdout 输出。根因:同上 release build 是 GUI subsystem,
    Windows 默认把 stdio 关到 NUL(即使从 cmd 跑也无效),CLI arm 原本不调
    attach_parent_console → 写入直接被丢掉。修复:CLI arm 在 cli::run()
    之前attach_parent_console()(cmd / bash 有父控制台时直通父
    终端;Explorer 双击无父控制台时 AllocConsole() 让用户看到帮助进
    console 窗口;行为与 Web arm 对齐)

v0.3.3

Choose a tag to compare

@github-actions github-actions released this 25 Jun 14:40

Changelog

[0.3.3] - 2026-06-25

Added

  • CLI 模式正式可用so-novel-rs search / download / sources 三个子命令
    共享 GUI 的 parser / crawler / export。-v, --verbose 打开 tracing,
    -q, --quiet 抑制逐章 / 失败源 dump,脚本管道友好
  • sources list / enable <ID> / disable <ID> 子命令;写回
    ~/.sonovel/sources_config.json,跟 GUI / Web 共享同一文件
  • download --from <N> / --to <N> 章节范围下载(1-based,闭区间;
    to 越界静默截断)
  • TTY 原地进度行(搜索 / 下载统一走 crate::util::tty::print_in_place_line
  • Ctrl-C 接到 CancelToken,crawler 走 Cancelled 事件干净退出(不再硬杀进程)
  • 搜索走 search_streaming + tokio::spawn 流式进度(参考
    [[streaming-search-lesson]] memory)

Changed

  • src/cli.rs 549 行 → src/cli/ 7 文件模块拆分(参照
    src/config/ 的子模块拆分模式):args / mod / search /
    download / sources / util / tests
  • --help / --version 全量中文化(disable_help_flag +
    SetTrue 手动分发,避开 clap 默认英文 help 文本;详见 src/cli/args.rs
    注释)
  • 抽出 crate::util::tty::print_in_place_line(TTY 进度行 helper,
    src/cli/helpers.rs 提到 src/util/tty.rs,与 formatting::truncate
    等通用工具并列)
  • src/cli/helpers.rs 改名 src/cli/util.rsutil 名跟 src/util/
    顶级工具目录呼应,区分"CLI 内部粘合层" vs "cross-cutting 工具")
  • TTY 原地进度行退出时补 \n,Windows 控制台 prompt 不再卡住要按 Enter
    (见 src/cli/search.rs:154-160 的 Windows console 坑说明)
  • 搜索失败源 dump:≤3 条全打、>3 条压成 top 3 + N more--quiet 完全跳过
  • Web 模式默认 host 改回 127.0.0.1(loopback only)以匹配
    so-novel-rs --web 默认行为

Fixed

  • fix(search): clear search state when rule set changes
  • chore(rules): update 梦书中文 domain to mcxs.la
  • feat(sources): make URL column a clickable Link
  • Windows console prompt 在 in-place 进度模式退出后不再卡住(详见上方"Changed")
  • fix(cli/download): 未传 --source 时按 URL 自动匹配书源(origin 比较),
    而非硬取第一个源;匹配不到再回退到首源
  • fix(cli/search): --json 模式不再在 stderr 打印搜索进度条,
    保持 stdout 仅含 JSON
  • fix(main): attach_parent_console 失败时回退 AllocConsole
    自行分配控制台,从 Explorer 启动 CLI/Web 模式不再无控制台可用
  • fix(Dockerfile): 运行阶段补装 GPUI 运行时共享库(libxcb.so.1 等),
    修复 error while loading shared libraries 启动失败

Documentation

  • 新增 docs/CLI.md:CLI 完整用法(子命令参数、进度行为、
    JSON 输出、范围校验、常见工作流、注意事项、故障排查)
  • 新增 docs/WEB.md:Web 模式部署、API 端点、Docker
    多架构镜像、反向代理(SSE proxy_buffering off 等坑)、打包脚本
  • 新增 docs/BOOK_SOURCES.md:6 套书源说明 +
    Cloudflare 绕过(CloudflareBypassForScraping 容器)+ 排查指引
  • 新增 docs/CHANGELOG.md + docs/CHANGELOG_ALL.md
    两份变更日志;release workflow 用 body_path: docs/CHANGELOG.md 自动上传
    到 GitHub Release
  • 新增 Dockerfile(多阶段 + tini init + 非 root
    用户 uid 1000 + data dir /home/so-novel/.sonovel)+ .dockerignore
  • 新增 .github/workflows/docker-release.yml
    (BuildKit 多架构镜像推 ghcr.io/ahjxs/so-novel-rs:<tag> + :latest

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 23 Jun 16:24

[0.3.2] - 2026-06-24

Added

  • 5 条 post-Phase-4 修复(搜索状态清理、书源域更新、URL 链接点击等)
  • AppModelListCache 防搜索重复结果

Changed

  • src/config/loader.rs 917 行 → 5 个子模块(defaults / paths /
    toml_io / types / tests
  • tracing 初始化延迟到 --verbose 触发,默认零输出
  • Web 模式默认 host 改回 127.0.0.1(loopback only)

Fixed

  • fix(search): clear search state when rule set changes
  • chore(rules): update 梦书中文 domain to mcxs.la

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 21 Jun 14:02

Full Changelog: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 21 Jun 10:04

Full Changelog: v0.2.6...v0.3.0

v0.2.6

Choose a tag to compare

@github-actions github-actions released this 20 Jun 08:15

Full Changelog: v0.2.5...v0.2.6

v0.2.5

Choose a tag to compare

@github-actions github-actions released this 19 Jun 06:27

Full Changelog: v0.2.4...v0.2.5

v0.2.4

Choose a tag to compare

@github-actions github-actions released this 18 Jun 14:27

Full Changelog: v0.2.3...v0.2.4