Skip to content

chore(repo): 统一项目目录命名#39

Merged
appergb merged 2 commits into
Open-Less:mainfrom
H-Chris233:main
Apr 30, 2026
Merged

chore(repo): 统一项目目录命名#39
appergb merged 2 commits into
Open-Less:mainfrom
H-Chris233:main

Conversation

@H-Chris233
Copy link
Copy Markdown
Collaborator

@H-Chris233 H-Chris233 commented Apr 30, 2026

摘要

Fixes #13

本 PR 解决 Windows GNU/MinGW 构建受带空格目录影响的问题。

原仓库目录 openless -all/ 中包含空格,在 Windows 使用 Rust GNU toolchain 和 MinGW 构建时,可能导致 dlltool / assembler 在生成 import library 阶段失败。为避免该问题,本 PR 将项目目录统一改为无空格形式 openless-all/,并同步更新工作流、文档和仓库内部引用。

同时顺手修复当前远端基线中导致前端构建失败的 Settings.tsx 旧调用问题,将其改为现有的 updatePrefs

修复 / 新增 / 改进

  • 将目录从 openless -all/ 重命名为 openless-all/

  • 同步更新相关引用:

    • GitHub Actions / 工作流
    • README
    • CLAUDE.md
    • 仓库内部路径引用
  • 全仓库 grep 确认旧路径已无残留:

    • openless -all
    • openless%20-all
  • 修复当前远端基线里的前端构建失败问题:

    • Settings.tsx 中旧调用已改为当前可用的 updatePrefs
  • 确认根目录已无带空格目录。

兼容

  • 不包含:

    • 不改变应用业务逻辑。
    • 不调整热键、录音、转写、设置等运行行为。
    • 不引入新依赖。
    • 不改变现有构建命令。
  • 对现有用户 / 本地环境 / 构建流程的影响:

    • 对最终用户无行为影响。
    • 本地开发者需要使用新的目录名 openless-all/
    • 原先手动依赖 openless -all/ 路径的本地脚本或命令需要同步调整。
    • CI、文档和仓库内部引用已在本 PR 中同步更新。
    • Windows GNU/MinGW 构建不再受仓库默认目录名中的空格影响。

测试计划

  • 命令:npm run build

  • 结果:通过

  • 证据路径:本地构建输出

  • 命令:cargo clean && cargo check

  • 结果:通过,有既有 warnings

  • 证据路径:本地检查输出

  • 命令:git diff --check

  • 结果:通过

  • 证据路径:本地命令输出

  • 命令:全仓库 grep openless -all / openless%20-all

  • 结果:无残留

  • 证据路径:本地 grep 输出

  • 检查:根目录是否仍存在带空格目录

  • 结果:根目录已无带空格目录

备注

本 PR 主要解决仓库目录命名导致的 Windows GNU/MinGW 构建问题。Settings.tsxupdatePrefs 修改属于顺手修复当前基线构建失败的问题,不改变设置页预期业务行为。

Summary by Sourcery

Standardize the repository’s Tauri app directory name to a no-space variant and fix a settings persistence regression in the frontend.

Bug Fixes:

  • Fix settings page provider switch to use the current preference update API so frontend builds succeed and preferences persist correctly.
  • Resolve Windows GNU/MinGW build failures caused by spaces in the repository path by aligning paths to the new no-space directory name.

Enhancements:

  • Rename the Tauri app root directory from a spaced to a no-space form and align internal path references accordingly across the repo.

CI:

  • Update CI and release workflows to use the new Tauri app directory path for caching, working directories, build steps, and artifact uploads.

Documentation:

  • Update English and Chinese READMEs and CLAUDE maintainer guide to reference the new Tauri app directory name and adjusted Windows build guidance.

Chores:

  • Rename the Windows-focused README directory from the spaced to the no-space variant and refresh its GNU/MinGW build notes to reflect the new layout.

The Tauri app lived under a path containing a literal space, which made CI paths and local commands easy to quote incorrectly. Rename the active tree to openless-all and update repository references so scripts, docs, and release workflows use the same space-free path.

Constraint: Preserve the existing app layout and move only the containing directory name.

Rejected: Add compatibility symlinks | would keep two app paths and leave quoting hazards in place.

Confidence: high

Scope-risk: moderate

Tested: npm run build

Tested: cargo clean && cargo check

Tested: git diff --check

Tested: grep -R for old openless -all and openless%20-all references
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 30, 2026

Reviewer's Guide

Standardizes the active app directory name from openless -all/ to openless-all/ across workflows, docs, and internal paths to avoid Windows GNU/MinGW build issues, and fixes a settings update call in the frontend to restore successful builds.

Sequence diagram for Settings provider change using updatePrefs

sequenceDiagram
    actor User
    participant SettingsPage
    participant ProvidersSection
    participant PreferencesStore
    participant Backend

    User->>SettingsPage: change active ASR provider
    SettingsPage->>ProvidersSection: onProviderSelected(id)
    ProvidersSection->>PreferencesStore: setActiveAsrProvider(id)
    PreferencesStore-->>ProvidersSection: active provider updated
    ProvidersSection->>PreferencesStore: updatePrefs(nextPrefs)
    PreferencesStore->>PreferencesStore: update in memory preferences
    PreferencesStore->>Backend: persist preferences
    Backend-->>PreferencesStore: persistence ok
    PreferencesStore-->>ProvidersSection: prefs updated
    ProvidersSection-->>SettingsPage: UI reflects new provider
Loading

Updated class diagram for Settings preferences update flow

classDiagram
    class ProvidersSection {
        +handleProviderChange(id)
    }

    class PreferencesStore {
        +setActiveAsrProvider(id)
        +updatePrefs(nextPrefs)
    }

    class Backend {
        +persistPreferences(preferences)
    }

    ProvidersSection --> PreferencesStore : uses
    PreferencesStore --> Backend : persists via
Loading

File-Level Changes

Change Details Files
Rename the active Tauri app directory and align CI/release workflows with the new path.
  • Update GitHub Actions release workflow cache paths, working directories, and artifact upload paths to use openless-all/app.
  • Adjust Windows CI workflow default working directory and npm cache dependency path to openless-all/app.
.github/workflows/release-tauri.yml
.github/workflows/ci.yml
Update documentation and contributor guides to reference the new openless-all directory structure and paths.
  • Change all textual references from openless -all/app (and related design, config, and build paths) to openless-all/app in the main contributor guide.
  • Update English and Chinese READMEs to use the new directory name in build instructions, architecture descriptions, and maintainer checklists.
  • Clarify Windows GNU/MinGW route docs to reflect that the repo now uses a no-space openless-all directory instead of relying on a temporary mirror.
CLAUDE.md
README.md
README.zh.md
openless-all/README.md
Move the app directory and fix an outdated settings persistence call in the frontend.
  • Rename the openless -all directory to openless-all in the repo structure, keeping app contents intact.
  • In the Settings page, replace the manual prefs state update plus setSettings call with the current updatePrefs helper when changing the active ASR provider.
openless-all/app/src/pages/Settings.tsx
openless-all/README.md

Assessment against linked issues

Issue Objective Addressed Explanation
#13 Rename the active Tauri app directory from openless -all to a no-space directory name (e.g., openless-all) so that Windows GNU/MinGW builds are not broken by the default repo path.
#13 Update all references in CI/workflows, build scripts, and documentation to use the new no-space directory path so that builds (including Windows GNU/MinGW) and instructions remain correct.
#13 Adjust Windows GNU/MinGW build documentation to reflect that the app now lives under a no-space directory and explain that this avoids GNU/MinGW path quoting issues.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • In openless-all/README.md the GNU/MinGW section still says “contains a space in openless-all”, which is no longer true after this rename—please update the wording to reflect the new no-space directory name and rationale.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `openless-all/README.md` the GNU/MinGW section still says “contains a space in `openless-all`”, which is no longer true after this rename—please update the wording to reflect the new no-space directory name and rationale.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

The app directory was renamed to openless-all, but the GNU/MinGW route still described the new name as if it contained a space. Update the wording so the rationale matches the current path and keeps the helper-script guidance focused on consistent GNU setup.

Constraint: Documentation-only code review follow-up.

Confidence: high

Scope-risk: narrow

Tested: git diff --check
@H-Chris233
Copy link
Copy Markdown
Collaborator Author

@sourcery-ai review

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@appergb appergb merged commit 85045c3 into Open-Less:main Apr 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[infra/devex] 修复 Windows GNU 构建受空格路径影响的问题

2 participants