Repository navigation
feat(round5): 拼图多图层移交 Studio、长截图智能去重叠、IndexedDB 草稿持久化、首屏拆包瘦身与 Coolify Railpack 配置 - #31
Merged
Merged
Conversation
… Coolify migration docs
…ync GEO/README capabilities
…al UI, and IndexedDB draft persistence
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.
摘要
第五轮(Round 5)集成围绕长截图智能去重叠、拼图多图层无损移交 Studio、Quick Workspace 本地草稿持久化、Vite 8 首屏分包瘦身以及 Railpack/Coolify 轻量健康检查部署五个方向落地,共合入 4 条审查通过的功能分支(无外部运行时依赖新增、100% 本地浏览器处理)。
主要变更
1. 长截图智能去重叠与固定顶/底栏裁剪引擎(
swarm5/stitch-engine)src/tools/stitchOverlap.ts(389 行),接入src/tools/mergeEngine.ts与src/tools/types.ts:≤256px)RGBA 采样,固定顶/底栏探测(≤22%高度,内置纯色/空白守卫),行 RGB 均值 + 横向梯度标准差粗筛,整块 2D MAE + 纹理行 RGB Pearson NCC 精验。getImageData或运行异常环境下静默降级为 0 重叠。sourceRect、destRect、画布总高度与layout.overlapRemovedPx。src/tools/stitchOverlap.test.ts与mergeSplit.test.ts回归用例。2. 多图层移交 Studio、去重叠 UI 与 IndexedDB 本地草稿(
swarm5/workspace-pro)mode: 'layers'):src/workspace/mergeHandoff.ts并扩展src/bridge/studioHandoff.ts,将拼图结果转为独立可编辑 KonvaImageLayer。sourceRect局部裁切(长截图去重叠 / Gridcover)的图层离屏裁出 PNG 片段,未裁切图层直接复用原图并避免重复注册资产。linear-gradient(...)与transparent背景保留;画布任一边超过4096px时等比缩放画布与全部图层坐标/尺寸/圆角(窄长图低于240px时保持等比并居中)。src/workspace/tools/MergeQuickTool.tsx(拆出SortableMergeThumb.tsx)竖向拼接模式下新增默认关闭的「智能去重叠(长截图)」开关与overlapRemovedPx > 0已裁像素徽标,同步补齐en/zh/ja/ko四语词典(零—破折号)。src/workspace/draftStorage.ts(库名moklu-workspace-drafts)与src/workspace/useToolDraft.ts,覆盖tx.onabort/tx.onerror/req.onblocked及 SSR/无 IDB 静默降级。demoAssets.ts标记isDemo: true,hook 与存储层双重守卫绝不自动保存内置示例图;6 个 Quick Workspace 工具全部接入 450ms 防抖自动保存、刷新自动恢复与DraftStatusBar一键清空草稿。3. Vite 8 首屏分包瘦身与 GEO/README 能力同步(
swarm5/bundle-split)vite.config.ts改用import.meta.dirname消除 Vite 8__dirname/configLoader警告;保持chunkSizeWarningLimit: 800,在客户端构建中通过 RolldowncodeSplitting.groups拆分vendor-react(189.59 kB)、vendor-konva(306.35 kB)与vendor-dnd(48.91 kB)。src/main.tsx、src/App.tsx与src/pages/ToolLandingPage.tsx将@/store/projects、@/utils/fonts、@/bridge/studioHandoff与PricingModal移出落地页关键路径按需动态加载。index-*.js从893.95 kB降至567.15 kB(gzip174.79 kB),dist/index.html仅预加载rolldown-runtime、vendor-react、vendor-dnd,彻底剥离konva与 Studiostore;同时保持HelpModal-*.js独立 lazy chunk 与StudioPage-*.jsE2E 契约不变。src/seo/locales/{en,zh,ja,ko}.ts、src/seo/quickFacts.ts、src/seo/ssg.ts(llms.txt)、src/seo/geo.test.ts与README.md,同步长截图去重叠、多图层移交与本地草稿说明,保持静态<details>HTML 与FAQPageJSON-LD 一致且全文零—破折号。4. Railpack 部署配置与轻量静态健康检查(
swarm5/coolify-deploy)railpack.json(Node 22、npm run build、运行期curl),确保 Coolify 切换 Railpack 时稳定构建 92 路由 SSG 并支持容器内 HTTP Healthcheck。public/healthz.txt(3 B)与public/healthz/index.html(35 B),在public/_headers配置四条健康检查路径的Cache-Control: no-store,同步更新scripts/check-headers.mjs机械校验与scripts/serve-headers.mjs.txtMIME 支持。docs/cloudflare-response-headers.md,补充从 Nixpacks 无缝切换到 Railpack 及开启 Coolify HTTP Healthcheck 的分步指南。5. 文档与 GEB 架构同步
GEMINI.md(L1,登记railpack.json及新增能力)、src/GEMINI.md、src/pages/GEMINI.md、scripts/GEMINI.md与CHANGELOG.md([Unreleased]),并补齐scripts/license-inventory.mjs与scripts/verify-release.mjs的 L3 头部注释。验证清单
src/、cli/、scripts/共 284 个非测试业务文件,缺失 L3 头 = 0,超过 800 行 = 0coolify.*),零内网/公网服务器 IPnpm run typecheck:0 errorsnpm run lint:0 errors / 0 warningsnpm test:83 test files / 979 tests 全部通过npm run build:0__dirname警告、0>800 kB警告、92 路由 SSG +sitemap.xml+robots.txt+llms.txt+dist/healthz.txt+dist/healthz/index.html全部产出node scripts/check-headers.mjs:0 failures(13 条 CSP 指令与 4 条健康检查no-store规则全部通过)