Skip to content

feat(ui): 服务、启动与连接列表也可复制名称、所在列与详细信息 - #161

Merged
Ray-lea merged 11 commits into
Ray-lea:mainfrom
digital-bombyx:feat/copy-other-lists
Nov 22, 2026
Merged

Ray-lea merged 11 commits into
Ray-lea:mainfrom
digital-bombyx:feat/copy-other-lists

Conversation

@digital-bombyx

@digital-bombyx digital-bombyx commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

改动概述 / Summary

在 5c30e74 的进程复制基础上,把同样的复制方式扩展到服务、启动与连接列表:Ctrl+C 复制名称,Ctrl+Shift+C 复制详细信息;右键菜单与进程列表一样提供“复制”子菜单,并可复制单击所在的列。同时修复由组件绘制的表格行无法复制所在列的问题(进程列表同样受影响)。

Extends 5c30e74's process copying to the Services, Startup and Connections lists: Ctrl+C copies the name, Ctrl+Shift+C the details, and the row menu gets the same "Copy" submenu as processes, including the clicked column's copy. Also makes the column copy work on component-rendered rows, which affected the process list too.

改动原因 / Motivation

Refs #150,按 #157 中的讨论单独提交。5c30e74 只覆盖进程列表,其他三个列表仍无法用快捷键复制,也不能复制单击所在的列。

Follow-up agreed in #157: 5c30e74 covers the process list only.

改动思路 / Approach

行为与进程列表保持一致:Ctrl+C 复制名称列显示的内容,有选中的文字时仍复制所选文字(沿用 TextSelection::has_selection 判断)。这三个列表没有详细信息面板,详细信息取自表格当前显示的各列(Desktop::row_cells,与绘制使用同一格式化函数),以 details.copy.field 格式逐行输出,与进程详细信息的行格式一致,空白与暂无读数的列不复制。复制的文字保留单元格另行绘制的标记:IPv6 连接的协议复制为 TCPv6 / UDPv6,与协议筛选的名称一致。

右键菜单沿用进程列表的结构:各页原有的复制项、名称(Ctrl+C)、单击所在的列与详细信息(Ctrl+Shift+C)合为“复制”子菜单,放在原先第一个复制项的位置。所在列的复制项也在子菜单内,因此无论是否有备注等附加项,菜单高度都与改动前相同,480 px 最小窗口高度下仍完整显示;进程列表仍沿用 5c30e74 的位置(子菜单之后)。子菜单中的各项与进程列表一样以列名命名(服务为“名称”与“服务”),与表头一致,不会看似重复。复制内容在菜单打开时取得:连接列表每两秒刷新,菜单打开期间连接离开列表也能复制菜单所对应的行。

“复制“列名””依赖右键所在的列,此前只有 Argus 自绘的行(tables/body.rs)记录该列;由组件绘制的行(ARGUS_TABLE_ROWS=component 或辅助功能启用时)不显示该项。现在这些行的单元格在右键按下时记下所在的列,先于行打开菜单。

改动明细 / Changes

  • frontend/list_copy.rs(新增):适用的列表、单元格筛选、行文本格式、复制子菜单的合并(gather_copies)与插入位置,均带测试;Desktop::cells_text。
  • backend.rs:Ctrl+C / Ctrl+Shift+C 的判断扩展到四个列表;进程仍使用 CopyDetails,其他列表使用 cells_text。
  • menus.rs:“复制“列名””扩展到四个列表;其他三个列表的复制项合为“复制”子菜单,子菜单内新增名称列(Ctrl+C)、所在列与详细信息(Ctrl+Shift+C),各项以列名命名(服务为名称与服务,启动为命令,连接为本地地址与远程地址)。
  • tables.rs:Desktop::row_cells 返回当前表格每列的列名与单元格文本;复制的单元格文字保留 IPv6 标记(copied_cell,带测试);由组件绘制的行在单元格右键按下时记下所在的列(render_td)。
  • 文案:settings.shortcuts.copyName / copyDetails 不再限定为进程列表,8 种语言;子菜单复用列名与现有文案,官网演示继续使用的四个菜单翻译键已保留。
  • 文档:docs/guide/README.md 的复制说明与键盘操作表。

新增功能(可选)/ New features (optional)

  • 入口:服务、启动、连接列表选中一行后按 Ctrl+C / Ctrl+Shift+C;或在行上单击右键。
  • 菜单:“复制”子菜单依次为该页原有的复制项(服务的名称、启动项的命令、连接的本地与远程地址)、名称列(Ctrl+C)、单击所在的列(单击名称列时不重复)与详细信息(Ctrl+Shift+C)。
  • 未选中行或无可复制内容时不复制;有选中的文字时复制所选文字。

影响与依赖 / Impact and dependencies

  • 影响范围 / Affected behavior: 服务、启动、连接列表的快捷键与右键菜单(原有复制项移入“复制”子菜单并以列名命名,菜单高度不变);进程列表行为不变,仅由组件绘制行时补上“复制“列名””。
  • 兼容性与权限 / Compatibility and permissions: 无 / None.
  • 依赖 PR 与合并顺序 / PR dependencies and merge order: 基于 main(含 5c30e74)/ Based on main including 5c30e74.

改动后界面截图 / UI screenshots

开发构建,实时数据,英文界面,深色主题,100% 缩放;服务行的右键菜单,展开“复制”子菜单。
Dev build, live data, English UI, dark theme, 100% scale; a service row's context menu with the "Copy" submenu open.

Untitled

维护者复核

已保留官网演示引用的四个复制菜单翻译键。八种语言的键与占位符检查通过。隔离实例实测服务、启动、连接三页的名称与详细信息复制,IPv6 的协议复制为 UDPv6。组件绘制模式通过现有 process-copy 界面步骤。

提交时验证 / Original validation

  • 验证提交或构建版本 / Tested commit or build: 0787538,开发构建
  • 环境与数据来源 / Environment and data source: Windows 11 (26200),实时采集,英文界面,独立测试标识
命令或操作步骤 / Command or steps 预期结果 / Expected 实际结果与证据 / Actual result and evidence
cargo test -p argus --lib 全部通过,含 list_copy 的 4 项与 copied_protocols_keep_the_ipv6_tag 397 passed
cargo clippy -p argus --all-targets -- -D warnings 无警告 通过
node scripts/i18n.mjs 8 种语言一致 2582 keys each, OK
服务、启动、连接列表选中行按 Ctrl+C 复制名称列显示的内容 符合
同上按 Ctrl+Shift+C 逐行“列名: 内容”,不含空白与暂无读数的列 符合
服务行右键 “复制”子菜单含名称、服务(Ctrl+C)与详细信息(Ctrl+Shift+C) 符合,见截图
在状态列上右键 子菜单内出现“复制“状态”” 符合
在名称列上右键 名称项不重复 符合
服务有备注时在状态列上右键 菜单高度与改动前相同 符合
复制 IPv6 连接的详细信息与协议列 协议为 TCPv6 / UDPv6 符合
ARGUS_TABLE_ROWS=component 下在状态列、CPU 列上右键 出现“复制“状态””“复制“CPU””,单元格排版不变 符合
进程列表(Argus 自绘的行) 与 main 相同 符合
  • 未覆盖的场景与原因 / Unverified scenarios and reasons: 未在启用讲述人等辅助功能时核对;未核对浅色主题与其他语言的菜单排版;未运行完整 pnpm check。

提交前检查 / Checklist

  • 标题与提交信息符合 Conventional Commits / The title and commit messages follow Conventional Commits.
  • 已完成与改动范围相符的验证,并填写实际结果 / Validation appropriate to the change is complete and actual results are recorded.
  • 涉及 UI 的改动已附可直接查看的改后截图,交互与显示行为修复同样适用 / UI changes include viewable after screenshots, including interaction and visibility fixes.
  • 涉及持续开销的改动已附对照测量 / N/A:仅在按键或打开菜单时执行
  • 新增或修改文案已同步全部支持的语言,遵循术语表,并通过 pnpm i18n / Added or changed UI text covers all supported locales, follows the glossary and passes pnpm i18n.
  • 行为变化已同步相关文档及受影响的官网演示 / 使用指南已更新,官网演示原有复制菜单的译文已保留
  • 依赖变化已更新 THIRD-PARTY-NOTICES.txt / N/A

与进程列表一致:Ctrl+C 复制名称列显示的名称,Ctrl+Shift+C 以“列名: 内容”逐行复制该行显示的各列
(空白与暂无读数的列除外),有选中的文字时仍复制所选文字。右键菜单新增复制名称列(标注 Ctrl+C)与
“复制详细信息”(Ctrl+Shift+C),在某一列上单击右键时可复制该列。详细信息在菜单打开时取得,连接在
菜单打开期间离开列表也能复制。快捷键说明与使用文档同步更新。
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T00:24:16.015924Z 4fe6eb5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22259e6a27

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src-gpui/src/frontend/menus.rs Resolved
此前新增的三项使服务菜单在 480 px 最小窗口高度下超出窗口,底部的置顶与备注无法选择。与进程列表一致,各页原有的复制项、名称(Ctrl+C)与详细信息(Ctrl+Shift+C)合为“复制”子菜单,位于原先第一个复制项的位置;所在列的复制仍紧随子菜单。服务菜单不在列上右键时与改动前等高。

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c14554908

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src-gpui/src/frontend/menus.rs Resolved
服务的“复制服务名称”与名称列项(服务)并列时看似重复。与进程列表的复制子菜单一致,子菜单中的各项改用对应的列名:服务为名称与服务,启动为命令,连接为本地地址与远程地址。移除不再使用的四个文案。
右键菜单的“复制“列名””依赖右键所在的列,此前只有 Argus 自绘的行记录该列;由组件绘制的行(ARGUS_TABLE_ROWS=component 或辅助功能启用时)不显示该项,进程列表同样受影响。现在单元格在右键按下时记下其列,先于行打开菜单。

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 47e795b46a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src-gpui/src/frontend/menus.rs Resolved
Comment thread src-gpui/src/frontend/tables.rs Resolved
digital-bombyx and others added 5 commits November 22, 2026 02:41
服务行已有备注时菜单多出“删除备注”,在 480 px 最小窗口高度下加上所在列的复制项仍会超出窗口。这三个列表的所在列复制项改为位于“复制”子菜单中的名称之后,菜单高度在任何状态下都与改动前相同;进程列表仍放在子菜单之后。
协议单元格将 v6 作为独立标记绘制,复制的文字只有 TCP 或 UDP,与 IPv4 连接无法区分。复制所在列与详细信息时改为 TCPv6、UDPv6,与协议筛选的名称一致。
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>

@Ray-lea Ray-lea left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

已核对四个既有评审讨论。隔离实例通过服务、启动、连接列表的名称与详细信息复制,IPv6 协议保留 v6 标记。组件绘制模式通过 process-copy,官网演示使用的四个翻译键也已保留。

Ray-lea and others added 2 commits November 21, 2026 16:20
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
@Ray-lea
Ray-lea merged commit 9019ffe into Ray-lea:main Nov 22, 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.

2 participants