Skip to content

Beta2.0 - #9

Merged
cmliu merged 2 commits into
mainfrom
beta2.0
Sep 15, 2026
Merged

cmliu merged 2 commits into
mainfrom
beta2.0

Conversation

@cmliu

@cmliu cmliu commented Sep 15, 2026

Copy link
Copy Markdown
Owner

This pull request refactors the exit IP display and interaction UI, improving both usability and accessibility. The main change is replacing the old single-button approach for exit IPs with a new card-style component that separates copying the IP and viewing details into distinct actions. Additionally, the styling and interaction logic have been updated to support these changes and enhance the user experience.

Exit IP Card Refactor and Feature Enhancements:

  • Replaced the .exit-ip-btn button with a new .exit-ip-card component, which contains two interactive elements: a button for copying the IP (.exit-ip-copy) and a toggle button for revealing detailed information (.exit-ip-detail-toggle). This makes copying and viewing details more intuitive and accessible. [1] [2]
  • Added new styles and states for .exit-ip-card, .exit-ip-copy, and .exit-ip-detail-toggle, including hover, active, and copied states, as well as improved responsiveness for mobile devices. [1] [2] [3]
  • Implemented the copyExitIp function to handle copying the exit IP to the clipboard, provide user feedback, and visually indicate when copying is successful.
  • Updated detail toggling logic to work with the new card structure, ensuring only one detail panel is open at a time and updating ARIA attributes for accessibility.
  • Improved user guidance text to clarify that clicking the IP copies it, and the arrow reveals more details.

Other Changes:

  • Removed an obsolete redirect from the _redirects file.

Copilot AI lite review requested due to automatic review settings September 15, 2026 14:01
@cmliu
cmliu merged commit c608b18 into main Sep 15, 2026
1 check passed

Copilot AI 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.

🟡 Changes recommended

Unresolved moderate findings cover ARIA association, hit-target sizing, and mobile overflow; README interaction documentation also needs updating.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Refactors exit IP interaction into a card UI with separate copy and detail actions, plus responsive and accessibility updates.

Changes:

  • Adds clipboard copying with visual feedback.
  • Updates detail toggling, styling, and responsive behavior.
  • Ignores .workbuddy/ files and removes the obsolete redirect.
File summaries
File Description
.gitignore Ignores local .workbuddy/ files.
_worker.js Implements the exit IP card UI, copying, detail toggling, and styling.
_redirects Removes the obsolete redirect.
Review details

Suppressed comments (3)

_worker.js:5121

  • This toggle exposes aria-expanded, but it is not programmatically associated with the map/details panel: no aria-controls is set and the .map-container-wrapper has no corresponding id. Assistive technology can hear the state change but cannot determine which region the button controls; give each panel a stable id and reference it from this button.
				detailToggle.className = 'exit-ip-detail-toggle';
				detailToggle.title = '展开 / 收起 IP 详情';
				detailToggle.setAttribute('aria-label', '展开或收起落地 IP ' + entry.ip + ' 的详细信息');
				detailToggle.setAttribute('aria-expanded', 'false');

_worker.js:2093

  • On the mobile rule this card is forced to width: 100%, but this flex item keeps the default automatic minimum width. A full IPv6 string can therefore prevent the copy button from shrinking and make the card overflow horizontally despite word-break: break-word; set min-width: 0 on the flex item so it can wrap within the card.
			word-break: break-word;

_worker.js:4231

  • This changes the interaction contract described by the repository documentation, but README.md:342-344 still says the “落地 IP” button is clicked to open the map. Please update that section to document the separate copy action and the arrow used for details so users following the README are not misled.
				meta = '本轮检测已结束,点击落地 IP 可一键复制,点击右侧箭头查看出口位置和网络信息。';
  • Files reviewed: 2/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread _worker.js
Comment on lines +2120 to +2121
width: 22px;
height: 22px;
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