Repository navigation
Conversation
Tests/ 根层原有 138 个平铺测试文件,无法从目录读出测试覆盖的功能领域。 按功能领域重组为 17 个目录(Catalog/Workflow 与 Rules/Custom 两处嵌套,分别 对应 App/Application/CatalogWorkflow 与 Domain/Rules/Custom):Architecture / Support / Agent / Activation / Catalog / Subscription / Rules / ProxyRuntime / ProxyControl / Runtime / Settings / SystemProxy / Plugin / Diagnostics / Credentials / Workspace / Servers;Smoke/ 保持独立 target 不动。138 个移动中 132 个是 100% 相似度的纯重命名,其余 6 个在重命名之上带路径反推改写(见下)。 本次不是纯搬移:测试代码比生产代码多一层位置耦合,有 7 处用固定层数的 deletingLastPathComponent() 从 #filePath 反推仓库路径(都假定文件就在 Tests/ 根层)。这 7 处改走新增的 Tests/Support/TestSourceTree.swift——从调用点沿父 目录上溯找到含 project.yml 的目录,因此不再依赖父目录层数,以后移动测试文件 也不会静默指错。 配套改动: - 新增 Tests 布局守卫 TestsLayoutTests,断言 Tests/ 根层无平铺 .swift。比 Domain 那条弱一档——根层的 Info.plist(info.path 生成物)与 Fixtures/RuleSnapshots 下的 JSON(folder resource)都必须保留,不能用 「树下只有 .swift」覆盖。 - project.yml:Smoke target 按文件引用的 Tests/AppArtifact.swift 改指 Tests/Support/;两处注释里写死的 Tests/SkeletonTests.swift 随移动更新。 excludes 的裸名 "Smoke" / "Fixtures" 仍匹配 Tests/ 直属子目录,无需改动。 - README 的 Tests 条目展开为目录说明,并修掉 Domain 条目里写死的 Tests/SkeletonTests.swift。 - 顺带删去 DomainLayoutTests 文档注释里「整理前 62 个文件」这类易漂移的数字。 验证:xcodegen generate 后单测 target 为 139 个源文件(全部非 Smoke 文件,0 个 Smoke 文件混入)且仍以 Fixtures/RuleSnapshots 为资源,Smoke target 为 8 个 Smoke 文件加 AppArtifact;依赖路径反推的 6 个测试类全绿(路径指错即失败); task format 未改写任何被移动文件;task lint 与整理前同为 21 条内容型 warning; build 0 error;task test 1025 用例全通过(整理前 1024,+1 为新守卫); TestsLayoutTests 经变异验证(根层投放探针即失败);packaging-gate ALL CHECKS PASSED。
不带 -derivedDataPath 的 xcodebuild 会把构建落进项目内的 build/,其中 DerivedSources/ 下生成的源码(如 GeneratedAssetSymbols.swift)会进 lint 范围, 报出与手写代码无关的 trailing_newline。excluded 原有 DerivedData 与 .build 两条,漏了 build/。 触发案例与效果实测:排除后 lint 从 21 条 warning / 320 个文件降为 19 条 / 318 个文件;消失的 2 条都来自 build/ 下两个 GeneratedAssetSymbols.swift 的 trailing_newline,剩余 19 条全部是内容型规则(file_length、function_body_length、 type_body_length、cyclomatic_complexity、implicit_optional_initialization), 与路径无关。 这同时纠正了此前几轮「与整理前同为 21 条基线」的归因:那 21 条里有 2 条来自 遗留构建产物,手写代码的真实基线是 19 条;各轮前后对比仍成立,只是绝对值 应按 19 条理解。
证书与 Team 不入库(开源仓库):Debug 基线改为 ad-hoc,新 clone 与 CI 无 需任何证书即可 task build / task test;Release 基线保持 Developer ID,发 布产物仍须真签名。本机身份由 gitignore 的 Configs/Signing.local.xcconfig 注入,打包门槛的 Team 期望值同源,缺失时明确失败而非静默跳过。 project.yml 不能再设置 CODE_SIGN_IDENTITY / DEVELOPMENT_TEAM:pbxproj 构 建设置优先于 project xcconfig,写死会静默盖掉基线(实测)。整条注入链条 由 Tests/Architecture/SigningConfigurationTests.swift 守卫。 ad-hoc 产物不带 Hardened Runtime(Xcode 对 ad-hoc 签名不传 -o runtime), 嵌套 helper 重签与之一致;Hardened Runtime 仍由 DevID 路径与打包门槛断言。
旧版实现已由 shadowsocks/ShadowsocksX-NG 的 legacy-v1 分支跟踪,本仓库不再 保留同一份代码副本。删除 Legacy/ 下 603 个跟踪文件,被 gitignore 的 .DS_Store 一并清理。 删除前核对:Legacy/ShadowsocksX-NG/PACUtils.swift 的 blob hash 与 upstream/legacy-v1 的同名文件完全相同,且工作区在 Legacy/ 下无未提交改动。 配套改动: - 根 README、AGENTS.md、ShadowsocksX-NG2/README.md:目录结构只留 ShadowsocksX-NG2/;旧版说明改为指向 shadowsocks/ShadowsocksX-NG 的 legacy-v1 分支(含其 README);pre-commit 说明去掉 Legacy/。 - codegraph.json 删除 "exclude": ["Legacy/"];.gitignore 与 .zcodeignore 删除 Legacy 构建产物与依赖条目;.swiftlint.yml 删除 ../Legacy 排除项; .githooks/pre-commit 头部注释去掉冻结目录表述。 - docs/research 的 4 份历史研究报告(issue 7/11/12/17)中 129 处 ../../Legacy/... 相对链接改写为 legacy-v1 的 GitHub blob 链接,正文未改; 把新 URL 反替换回原相对路径后与 HEAD 版本逐字节相同,证明只动了链接。 验证:全仓库不再有指向 Legacy/ 的路径引用;剩余 Legacy 字样均为概念性用法 (Legacy 导入功能、ADR 与术语表、历史报告正文中的冻结陈述)。本次未改任何 NG2 源码或构建配置,暂存区无 NG2 .swift 文件,pre-commit 直接放行。
对照 ~/.agents/skills/setup-matt-pocock-skills 的当前模板逐字节核对三份配置: - triage-labels.md 与模板完全一致,无漂移,未改动。 - domain.md 同步标点(— 改为 :)与措辞(Single-context repo (this repo) 改为 (most repos)),现与模板一致。 - issue-tracker.md 同步标点漂移,并把硬编码的 --repo qiuyuzhou/ShadowsocksX-NG 换成从 clone 推导 (gh repo view --json nameWithOwner)后显式 pin。保留「绝不写入其他仓库」的 安全规则与那次误发事故的教训,但去掉仓库名,使该配置在合并进上游后仍然成立。 AGENTS.md 的一行摘要同步去掉仓库名。 .scratch/ 加入 .gitignore 与 .zcodeignore:这是 setup-matt-pocock-skills 为 local-markdown tracker 约定的目录,切到本地 tracker 时 spec 文件不落进 git。 docs/design/ 与 docs/research/ 的去留尚未决定,本次不引入任何排除机制。
两类文档来源不同,处理方式也不同: - system-proxy-runtime-control-spec.md、terminal-command-address-spec.md 是 to-spec 技能的原样产物(英文模板小节标题,无标题与日期头)。其内容已发布为 Issue #72 / #73,人类需要的信息已由同日提交的无后缀中文文档承载;在仓库里再 存一份,等于同一份规格有两个事实来源。删除后仍可从 git 历史追回。 - user-plugin-*-spec.md 四份来自 improve-codebase-architecture 会话:该技能把 报告写进 OS 临时目录、不写 docs/design/,因此这四份是模型模仿仓库既有 -spec.md 旧例命名(“猜测旧例”而非技能指令)。去掉后缀后仓库不再有该样板, 后续模型少了可模仿的命名来源。四份保留原名主体,内容不动。 影响面:这六份文件全仓库零入站引用(含 docs/ 内部),移除与改名都无需改写链接。 docs/design/ 现为 12 份,无一带 -spec 后缀,与 AGENTS.md 的定位一致。 有意不做:不加“docs/design/*.md 必须带可解析 日期:/状态: 头”的确定性检查。 AI 输出本就无法保证规范化;更关键的是这类文档的“状态”只描述某次改进上下文, 不跟踪现状,把它当可校验字段是假精确。日期是写作时点的事实,两回事。
该视图是 ServersView serverSidebar 目录树的树行内容,与 MainWindowView 外层窗口侧栏的 sidebarRow 无关;更名后与 serverSidebar 及 Home 侧 HomeServerListRow 的「范围前缀 + Row」先例一致。文件沿用 git mv 保留 Workspace → Servers 的移动链,ServersView 两处引用同步更新,工程已 重新生成。
此实现企图通过捕获对列表空白区域的点击以触发移除列表的当前选中项
…d server count message
Replace the inline RulesDeletionButton with a toolbar delete button (trash icon next to the add button). It is enabled only when the custom-rules source is selected on the left and the selection contains deletable custom rules; the collection must also be complete and not committing. The table context menu gains a destructive "删除 (N)" item after a divider when the custom-rules source is selected, with the same enablement conditions. Both entries share one confirmation alert now held by RulesView. Also inline the operation status view into the filter row and tighten filter-area padding.
Remove the inline name TextField and save button from GroupDetailView; renaming stays in the sidebar context menu, and the empty-group footnote no longer claims the name is editable. Make the detail pane observe the catalog workflow instead of holding a plain reference, so catalog commits made elsewhere (sidebar rename, add/move, subscription refresh) re-render it. This fixes the stale group title after a context-menu rename, along with the equally stale direct-child count and activation eligibility text.
The pre-filled current name in the rename alert only showed on the first presentation: SwiftUI on macOS recycles the alert panel and its TextField does not pick up binding changes made in the same update as re-presenting. Swap the alert for a RenameGroupSheet modeled on NewGroupSheet, presented via sheet(item:) so content state is rebuilt each time and the prefill always matches the target group. As with the creation form, a failed rename now keeps the sheet open with the entered name instead of closing the alert first and losing the input. The NodeContext adapter previously used by the move sheet is shared by both presentations. Add the manual catalog keys 重命名分组 (Rename Group) and 名称 (Name); 保存/取消 already existed.
Replace the fixed HStack + Divider layout with a draggable HSplitView: sidebar constrained to 240-320 (ideal 280), detail pane gets a 320 min width. Divider position is not persisted (no public API; resets on tab switch and relaunch - accepted trade-off). Drop the sidebar list style so the list sits on the regular window background.
Remove TargetTreeCard, its browsing state HomeServerListState and the dedicated tests; home now shows mode, runtime control, terminal command and quick action cards only. ActivationFeedbackState stays shared by the servers sidebar and group detail activation entries.
CatalogEntry gains createdAt/updatedAt and the catalog document moves to v5 (reads v1-v5, writes v5). Modification time is structure-sensitive: editing a node's own fields bumps the node, a group's direct child set or order changes bump the group, and a moved node keeps its timestamps. No-op writes and unchanged subscription refreshes bump nothing; the refresh rebuild compares per node, so surviving leaves keep theirs. All times are passed in by callers as now: Date - one moment per logical commit, the domain layer stays clock-free. Legacy documents load with nil (unknown, never backfilled); duplicates and imports stamp fresh times at the moment of the operation. Semantics are recorded as glossary term 节点时间戳 and ADR 0031. No UI in this change.
Initial multi-server checks can consume the entire five-second listener budget before sslocal binds its inbound ports. Allow 15 seconds for listeners and 30 seconds for GUI startup health confirmation. Include endpoint readiness diagnostics and a delayed-start regression.
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 7.0.2. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@ea165f8...cf430e0) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Qiu Yuzhou <qbowater@gmail.com>
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.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )