Skip to content

feat(dashboard): 移除设置里不可配置的「连接」节#2217

Merged
KevinZhao merged 2 commits into
masterfrom
feat/settings-remove-conn
Jun 21, 2026
Merged

feat(dashboard): 移除设置里不可配置的「连接」节#2217
KevinZhao merged 2 commits into
masterfrom
feat/settings-remove-conn

Conversation

@KevinZhao

Copy link
Copy Markdown
Owner

背景

设置页里的「连接」节只是只读的连接状态镜像(节点名 + 状态点),没有任何可配置项 —— 真正的节点切换在侧栏顶部的节点选择器里。因为无法在此设置,按需求清除掉。

改动

  • 移除 renderSettingsView 中的「连接」section(含多节点提示 connMeta),只保留「主题」section。
  • 清理随之失效的死代码:
    • JS:railConnLabel / RAIL_CONN_LABELS
    • CSS:.settings-conn / .settings-conn-meta,以及唯一消费者已消失的 .ab-conn-dot* 规则
  • getNodeStatus / getNodeDisplayName / isMultiNode 仍被多节点选择器等处使用,保留不动。

测试

  • go build ./... 通过
  • go test ./internal/server/ 静态契约 / 视图路由 / UX ratchet 相关测试全绿(renderSettingsView 契约仍满足)

🤖 Generated with Claude Code

The 设置 view's 连接 section was a read-only connection-status mirror
(node name + status dot) with nothing to configure — the actual switch
lives in the sidebar node selector. Drop it to declutter the settings
view, leaving only the 主题 section.

Also removes now-dead code: railConnLabel/RAIL_CONN_LABELS, the
.settings-conn/.settings-conn-meta CSS, and the .ab-conn-dot rules
(its only remaining consumer was this section).
@KevinZhao

Copy link
Copy Markdown
Owner Author

对抗性 review:LGTM,零 finding。移除设置里不可配置的「连接」节,无孤儿 JS 引用(无 querySelector 指向已删元素 ID、无 settings save/load 迭代已删节),纯净删除。

@KevinZhao KevinZhao added the human-pr-reviewed-pass fix-pr-review v2 label Jun 21, 2026
@KevinZhao

Copy link
Copy Markdown
Owner Author

PR #2217 review (human)

  • 关联 issue: 无
  • 文件域: internal/server/static/dashboard.html, dashboard.js

Findings

No findings. 纯删除 PR,无遗留逻辑。

验证:

  1. 死代码清扫——railConnLabel/RAIL_CONN_LABELS/.settings-conn/.settings-conn-meta/.ab-conn-dot 全仓零残留引用。
  2. 保留符号——getNodeStatus/getNodeDisplayName/isMultiNode/VALID_DOT_CLASSES 未动,多节点选择器与状态点不受影响。
  3. 契约测试——static_toplevel_views_contract_test.go:128 仅 pin renderSettingsView((仍存在);无测试断言被删 CSS/JS 常量。
  4. 布局——设置视图保留一个 theme section,无孤立 </section> 或断裂闭合标签。
  5. 无新增逻辑——纯删除,未触并发/锁/IO。

VERDICT: PASS

@KevinZhao KevinZhao merged commit 990a1d4 into master Jun 21, 2026
7 checks passed
@KevinZhao KevinZhao deleted the feat/settings-remove-conn branch June 21, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-pr-reviewed-pass fix-pr-review v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant