Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
834e9bf
feat(crates/handwriting-core): 支持照片坐标反查与透视透明墨迹
SXP-Simon Nov 23, 2026
58e7028
feat(crates/panache-mcp): 支持按照片圈选校正与成品复盘
SXP-Simon Nov 23, 2026
e040d45
docs(crates/panache-mcp): 说明照片排版与人工复核流程
SXP-Simon Nov 23, 2026
ddc48d7
feat(crates/panache-mcp): 保存可引用的逐页复盘并比较两版证据
SXP-Simon Nov 23, 2026
8358969
docs(crates/panache-mcp): 保留复盘设计依据
SXP-Simon Nov 23, 2026
629e78d
fix(crates/panache-mcp): 提示未复盘页的局部墨迹风险
SXP-Simon Nov 23, 2026
0448319
test(crates/panache-mcp): 验证上传字体实际参与渲染
SXP-Simon Nov 23, 2026
538299a
feat(crates/panache-mcp): 登记导出归属并限制废弃文件清理范围
SXP-Simon Nov 23, 2026
4f82f96
test(crates/panache-mcp): 覆盖容量不足时的跨会话工作流
SXP-Simon Nov 23, 2026
916b038
fix(crates/panache-mcp): 恢复独立测量 MCP 上下文的入口
SXP-Simon Nov 23, 2026
237b09f
fix(crates/panache-mcp): 并发首次打开时可靠初始化稿件库
SXP-Simon Nov 23, 2026
1efa2ce
feat(crates/panache-mcp): 按原图多边形复查两版墨迹与保护区域
SXP-Simon Nov 23, 2026
17d0b29
feat(app): 引导用户验证 MCP 连接并向客户端披露能力边界
SXP-Simon Nov 23, 2026
1a8ce77
test(crates/panache-mcp): 提供可复跑的整页和局部复盘盲评
SXP-Simon Nov 23, 2026
b109b54
fix(crates/panache-mcp): 跨渲染模式复查时披露保护区变化原因
SXP-Simon Nov 23, 2026
3548191
docs(crates/panache-mcp): 说明相机元数据和笔画柔化的作用
SXP-Simon Nov 23, 2026
0fd01b2
feat(crates/panache-mcp): 引导画作选位并按原像素复查字迹观感
SXP-Simon Nov 23, 2026
c906361
fix(crates/panache-mcp): 微调墨色和柔度时保留已定位的字形
SXP-Simon Nov 23, 2026
0270cee
feat(crates/panache-mcp): 区分缺失栏位和可定位的复杂表格
SXP-Simon Nov 23, 2026
8ae00c9
fix(crates/panache-mcp): 指明裁片首行基线需要的留白
SXP-Simon Nov 23, 2026
3c6ac77
feat(crates/panache-mcp): 引导作业和实验报告先核对混排笔迹
SXP-Simon Nov 23, 2026
35092fa
fix(crates/panache-mcp): 明示英数默认跟随主字体
SXP-Simon Nov 23, 2026
393a34d
docs(crates/panache-mcp): 按实际改稿步骤重写客户端指南
SXP-Simon Nov 23, 2026
ee1b4be
ci(.github/workflows): 纯 Markdown 更新复用已通过的 PR 检查
SXP-Simon Nov 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/scripts/markdown-update.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// The PR path filters see the entire PR. Here we check just the update.
module.exports = async function skipMarkdownBuild({ github, context, core }, workflow) {
const { before, pull_request: pr } = context.payload;
const { owner, repo } = context.repo;
if (!before || !pr?.head.repo?.id || context.payload.action !== "synchronize") return false;

try {
const { data: diff } = await github.rest.repos.compareCommitsWithBasehead({
owner, repo, basehead: `${before}...${pr.head.sha}`, per_page: 1,
});
// GitHub returns at most 300 changed files. An incomplete list cannot justify a skip.
if (diff.status !== "ahead" || !diff.files?.length || diff.files.length >= 300) return false;

function isDocumentation(path) {
if (!path.endsWith(".md")) return false;
if (path.startsWith("assets/licenses/") || path.startsWith("assets/font_assets/")) return false;
if (path === "deploy/rust/README.md" && workflow === "rust.yml") return false;
if (workflow !== "flutter.yml" && /^crates\/[^/]+\/licenses\//.test(path)) return false;
return true;
}

if (!diff.files.every(file => isDocumentation(file.filename) &&
(file.status !== "renamed" || (file.previous_filename && isDocumentation(file.previous_filename))))) {
return false;
}

// pull_requests[].base.sha in the runs API can reflect the current PR base.
// The workflow's run-name records the base actually used when that run started.
const { data } = await github.rest.actions.listWorkflowRuns({
owner, repo, workflow_id: workflow, event: "pull_request", head_sha: before, per_page: 100,
});
const previous = data.workflow_runs.find(run =>
run.display_title === `PR #${pr.number} · base ${pr.base.sha}` &&
run.head_repository?.id === pr.head.repo?.id && run.head_branch === pr.head.ref);
if (previous?.status !== "completed" || previous.conclusion !== "success") return false;
core.notice(`Only Markdown documentation changed. Reusing ${previous.html_url}`);
return true;
} catch (error) {
core.warning(`Could not verify this update; running the build: ${error.message}`);
return false;
}
};
55 changes: 55 additions & 0 deletions .github/scripts/markdown-update.test.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
const test = require("node:test");
const assert = require("node:assert/strict");
const skipMarkdownBuild = require("./markdown-update.cjs");

const pull = { number: 14, head: { sha: "new", ref: "feature", repo: { id: 1 } }, base: { sha: "main" } };
const green = {
display_title: "PR #14 · base main", status: "completed", conclusion: "success",
head_branch: "feature", head_repository: { id: 1 }, html_url: "previous-run",
};

async function check({
files = [{ filename: "app/guide.md" }], status = "ahead", runs = [green],
action = "synchronize", workflow = "rust.yml", unavailable = false,
} = {}) {
const github = { rest: {
repos: { compareCommitsWithBasehead: async ({ basehead }) => {
assert.equal(basehead, "old...new");
if (unavailable) throw new Error("compare unavailable");
return { data: { files, status } };
} },
actions: { listWorkflowRuns: async ({ head_sha, workflow_id }) => {
assert.equal(head_sha, "old");
assert.equal(workflow_id, workflow);
return { data: { workflow_runs: runs } };
} },
} };
const context = { repo: { owner: "owner", repo: "repo" }, payload: { action, before: "old", pull_request: pull } };
return skipMarkdownBuild({ github, context, core: { notice() {}, warning() {} } }, workflow);
}

test("ordinary Markdown can reuse a successful check on the same PR and base", async () => {
assert.equal(await check({ files: [{ filename: "README.md" }, { filename: "crates/guide.md" }] }), true);
assert.equal(await check({ files: [{ status: "renamed", filename: "new.md", previous_filename: "old.md" }] }), true);
});

test("mixed updates, packaged files and renames from code need a build", async () => {
for (const name of ["app/lib/main.dart", "assets/licenses/FONT-LICENSES.md", "assets/font_assets/info.md",
"crates/handwriting-core/licenses/OFL.md", "deploy/rust/README.md"]) {
assert.equal(await check({ files: [{ filename: "guide.md" }, { filename: name }] }), false, name);
}
assert.equal(await check({ files: [{ status: "renamed", filename: "guide.md", previous_filename: "src/code.rs" }] }), false);
assert.equal(await check({ files: [{ status: "renamed", filename: "guide.md", previous_filename: "deploy/rust/README.md" }] }), false);
assert.equal(await check({ files: [{ filename: "deploy/rust/README.md" }], workflow: "flutter.yml" }), true);
});

test("only proven checks can be reused", async () => {
for (const options of [
{ action: "opened" }, { status: "diverged" }, { files: [] }, { unavailable: true },
{ files: Array(300).fill({ filename: "guide.md" }) }, { runs: [] },
{ runs: [{ ...green, display_title: "PR #14 · base another-base" }] },
{ runs: [{ ...green, conclusion: "cancelled" }, green] },
{ runs: [{ ...green, status: "in_progress", conclusion: null }] },
{ runs: [{ ...green, head_repository: { id: 2 } }] },
]) assert.equal(await check(options), false);
});
28 changes: 20 additions & 8 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Flutter UI
run-name: >-
${{ github.event_name == 'pull_request' && format('PR #{0} · base {1}', github.event.pull_request.number, github.event.pull_request.base.sha) || github.workflow }}

permissions:
contents: read
Expand All @@ -16,27 +18,33 @@ on:
- "scripts/tests/test_desktop_release_version.py"
- "scripts/tests/test_windows_launcher.py"
- "app/**"
- "!app/README.md"
- "!app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md"
- "scripts/*release*.*"
- "!scripts/*release*.md"
- "scripts/tests/test-flutter-release.cjs"
- ".github/workflows/publish_flutter.yml"
- "vendor/**"
- "!vendor/**/README.md"
- "!vendor/**/CHANGELOG.md"
- "!vendor/**/docs/**/*.md"
- "assets/pubspec.yaml"
- "assets/licenses/**"
- "LICENSE"
- "assets/font_assets/**"
- "scripts/test-flutter-web.py"
- "scripts/tests/test_flutter_web_runner.py"
- ".github/scripts/markdown-update*.cjs"
- ".github/workflows/markdown-update.yml"
- ".github/workflows/flutter.yml"
- "!**/*.md"
- "assets/licenses/**"
- "assets/font_assets/**"
workflow_dispatch:

jobs:
markdown-update:
permissions:
actions: read
contents: read
uses: ./.github/workflows/markdown-update.yml
with:
workflow: flutter.yml
desktop-updater:
needs: markdown-update
if: ${{ !cancelled() && needs.markdown-update.outputs.skip != 'true' }}
name: Desktop updater (${{ matrix.os }})
timeout-minutes: 20
strategy:
Expand Down Expand Up @@ -89,6 +97,8 @@ jobs:
run: python -m unittest discover -s scripts/tests -p test_windows_launcher.py

verify:
needs: markdown-update
if: ${{ !cancelled() && needs.markdown-update.outputs.skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -115,6 +125,8 @@ jobs:
- run: node --test scripts/tests/test-flutter-release.cjs

browser-persistence:
needs: markdown-update
if: ${{ !cancelled() && needs.markdown-update.outputs.skip != 'true' }}
timeout-minutes: 15
strategy:
fail-fast: false
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/flutter_desktop.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,44 @@
name: Flutter 独立桌面客户端
run-name: >-
${{ github.event_name == 'pull_request' && format('PR #{0} · base {1}', github.event.pull_request.number, github.event.pull_request.base.sha) || github.workflow }}
on:
workflow_dispatch:
pull_request:
paths:
- "VERSION"
- "app/**"
- "!app/README.md"
- "!app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md"
- "vendor/**"
- "!vendor/**/README.md"
- "!vendor/**/CHANGELOG.md"
- "!vendor/**/docs/**/*.md"
- "crates/**"
- "!crates/README.md"
- "!crates/*/README.md"
- "!crates/panache-mcp/tool-design.md"
- "Cargo.toml"
- "Cargo.lock"
- "assets/font_assets/**"
- "assets/pubspec.yaml"
- "assets/licenses/**"
- "LICENSE"
- "scripts/build-flutter-desktop.py"
- "scripts/windows_launcher.py"
- "scripts/tests/test_desktop_release_version.py"
- "scripts/tests/test_windows_launcher.py"
- "scripts/embed-macos-backend.sh"
- ".github/scripts/markdown-update*.cjs"
- ".github/workflows/markdown-update.yml"
- ".github/workflows/flutter_desktop.yml"
- "!**/*.md"
- "assets/licenses/**"
- "assets/font_assets/**"
- "crates/*/licenses/**"
env:
PYTHONUTF8: "1"
PYTHONIOENCODING: "utf-8"
jobs:
markdown-update:
permissions:
actions: read
contents: read
uses: ./.github/workflows/markdown-update.yml
with:
workflow: flutter_desktop.yml
package:
needs: markdown-update
if: ${{ !cancelled() && needs.markdown-update.outputs.skip != 'true' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -59,7 +66,7 @@ jobs:
- name: 验证随包 MCP 的预览、导出和历史恢复
shell: bash
run: |
python -m pip install "mcp>=1.12,<2"
python -m pip install "mcp>=1.12,<2" Pillow
if [[ "$RUNNER_OS" == Windows ]]; then
python crates/panache-mcp/tests/smoke.py target/desktop-package/windows/Panache/handwriting_app.exe --server-arg=--mcp
python crates/panache-mcp/tests/context_metrics.py target/desktop-package/windows/Panache/handwriting_app.exe --mcp
Expand Down
30 changes: 19 additions & 11 deletions .github/workflows/flutter_mobile.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
name: Flutter Mobile
run-name: >-
${{ github.event_name == 'pull_request' && format('PR #{0} · base {1}', github.event.pull_request.number, github.event.pull_request.base.sha) || github.workflow }}
permissions:
contents: read
on:
pull_request:
paths:
- "VERSION"
- "app/**"
- "!app/README.md"
- "!app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md"
- "scripts/*release*.*"
- "!scripts/*release*.md"
- "scripts/tests/test-flutter-release.cjs"
- ".github/workflows/publish_flutter.yml"
- "vendor/**"
- "!vendor/**/README.md"
- "!vendor/**/CHANGELOG.md"
- "!vendor/**/docs/**/*.md"
- "crates/**"
- "!crates/README.md"
- "!crates/*/README.md"
- "!crates/panache-mcp/tool-design.md"
- "Cargo.*"
- "assets/pubspec.yaml"
- "assets/licenses/**"
- "LICENSE"
- "assets/font_assets/**"
- "scripts/build-mobile-engine.py"
- ".github/scripts/markdown-update*.cjs"
- ".github/workflows/markdown-update.yml"
- ".github/workflows/flutter_mobile.yml"
- "!**/*.md"
- "assets/licenses/**"
- "assets/font_assets/**"
- "crates/*/licenses/**"
workflow_dispatch:
jobs:
markdown-update:
permissions:
actions: read
contents: read
uses: ./.github/workflows/markdown-update.yml
with:
workflow: flutter_mobile.yml
android:
needs: markdown-update
if: ${{ !cancelled() && needs.markdown-update.outputs.skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Free space for Android, Rust and emulator builds
Expand Down Expand Up @@ -71,6 +77,8 @@ jobs:
name: android-release
path: app/build/app/outputs/flutter-apk/app-release.apk
ios:
needs: markdown-update
if: ${{ !cancelled() && needs.markdown-update.outputs.skip != 'true' }}
runs-on: macos-15
steps:
- uses: actions/checkout@v4
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/markdown-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check Markdown-only PR update
on:
workflow_call:
inputs:
workflow:
required: true
type: string
outputs:
skip:
value: ${{ jobs.compare.outputs.skip }}
jobs:
compare:
if: github.event_name == 'pull_request' && github.event.action == 'synchronize'
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
outputs:
skip: ${{ steps.check.outputs.result }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: .github/scripts
persist-credentials: false
- run: node --test .github/scripts/markdown-update.test.cjs
- name: Check the update against the previous verified revision
id: check
uses: actions/github-script@v7
env:
CALLER_WORKFLOW: ${{ inputs.workflow }}
with:
script: |
const skip = require('./.github/scripts/markdown-update.cjs');
return await skip({ github, context, core }, process.env.CALLER_WORKFLOW);
31 changes: 20 additions & 11 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Rust 后端
run-name: >-
${{ github.event_name == 'pull_request' && format('PR #{0} · base {1}', github.event.pull_request.number, github.event.pull_request.base.sha) || github.workflow }}
on:
pull_request:
paths:
Expand All @@ -7,31 +9,36 @@ on:
- "scripts/build-text-worker.py"
- "scripts/tests/test_web_build_version.py"
- "crates/**"
- "!crates/README.md"
- "!crates/*/README.md"
- "!crates/panache-mcp/tool-design.md"
- "Cargo.toml"
- "Cargo.lock"
- "app/**"
- "!app/README.md"
- "!app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md"
- "scripts/*release*.*"
- "!scripts/*release*.md"
- "scripts/tests/test-flutter-release.cjs"
- ".github/workflows/publish_flutter.yml"
- "vendor/**"
- "!vendor/**/README.md"
- "!vendor/**/CHANGELOG.md"
- "!vendor/**/docs/**/*.md"
- "assets/font_assets/**"
- "assets/licenses/**"
- "LICENSE"
- "scripts/build-rust-service.sh"
- "deploy/rust/**"
- ".github/scripts/markdown-update*.cjs"
- ".github/workflows/markdown-update.yml"
- ".github/workflows/rust.yml"
- "!**/*.md"
- "assets/licenses/**"
- "assets/font_assets/**"
- "crates/*/licenses/**"
- "deploy/rust/README.md"
workflow_dispatch:
jobs:
markdown-update:
permissions:
actions: read
contents: read
uses: ./.github/workflows/markdown-update.yml
with:
workflow: rust.yml
verify:
needs: markdown-update
if: ${{ !cancelled() && needs.markdown-update.outputs.skip != 'true' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -49,6 +56,8 @@ jobs:
- run: cargo test --locked --workspace
- run: cargo build --locked --release -p handwriting-server
flutter-integration:
needs: markdown-update
if: ${{ !cancelled() && needs.markdown-update.outputs.skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
Loading
Loading