Skip to content

Rewrite ProxyDesign#83

Merged
Goooler merged 18 commits intotrunkfrom
rewrite-proxy-design
Apr 21, 2026
Merged

Rewrite ProxyDesign#83
Goooler merged 18 commits intotrunkfrom
rewrite-proxy-design

Conversation

@Goooler
Copy link
Copy Markdown
Owner

@Goooler Goooler commented Apr 20, 2026

Refs #65.

@Goooler Goooler force-pushed the rewrite-proxy-design branch 2 times, most recently from 3b6709e to 3f191ad Compare April 21, 2026 04:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates the Proxy screen UI implementation from the legacy View/XML-based design to Jetpack Compose, in line with the “Rewrite UI in Compose” effort.

Changes:

  • Replaced ProxyDesign UI with a Compose-based pager + grid layout and a bottom-sheet menu.
  • Removed the legacy Proxy XML layout and associated custom view/RecyclerView adapter infrastructure.
  • Refactored Access Control bottom sheet usage (and previews) to use ModalBottomSheet content directly; updated ProxyActivity manifest entry.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
design/src/main/res/layout/design_proxy.xml Removed the legacy DataBinding-based proxy layout.
design/src/main/java/com/github/kr328/clash/design/component/ProxyView.kt Removed the legacy custom View-based proxy card renderer.
design/src/main/java/com/github/kr328/clash/design/component/ProxyPageFactory.kt Removed the legacy ViewPager/RecyclerView page factory.
design/src/main/java/com/github/kr328/clash/design/component/ProxyMenu.kt Removed the legacy PopupMenu-based proxy menu implementation.
design/src/main/java/com/github/kr328/clash/design/adapter/ProxyPageAdapter.kt Removed the legacy paging adapter tying groups to RecyclerViews.
design/src/main/java/com/github/kr328/clash/design/adapter/ProxyAdapter.kt Removed the legacy per-group proxy list adapter.
design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt New Compose-based Proxy screen (pager, grid cards, bottom-sheet menu, URL test action).
design/src/main/java/com/github/kr328/clash/design/AccessControlDesign.kt Adjusted bottom-sheet composition approach + previews to fit ColumnScope content.
app/src/main/AndroidManifest.xml Updated ProxyActivity manifest attributes (removed label/configChanges).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt Outdated
Comment thread design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt
Comment thread design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt
Comment thread design/src/main/java/com/github/kr328/clash/design/AccessControlDesign.kt Outdated
Comment thread app/src/main/AndroidManifest.xml
Comment thread design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt Outdated
Comment thread design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt Outdated
Goooler and others added 6 commits April 21, 2026 12:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…olDesign.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Goooler
Copy link
Copy Markdown
Owner Author

Goooler commented Apr 21, 2026

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown

Copilot AI commented Apr 21, 2026

@copilot apply changes based on the comments in this thread

Implemented the requested thread updates in commit d0a52c6: Proxy menu checkbox/radio rows now use toggleable(..., role = Role.Checkbox) and selectable(..., role = Role.RadioButton) for proper accessibility semantics. Screenshot: no visual UI change in this update (semantics/accessibility behavior only).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx4g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)
  • scans-in.gradle.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx4g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt Outdated
Comment thread design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt
Comment thread design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt
Comment thread design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt
Copy link
Copy Markdown

Copilot AI commented Apr 21, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx4g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)
  • scans-in.gradle.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx4g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread design/src/main/java/com/github/kr328/clash/design/ProxyDesign.kt
Comment thread app/src/main/AndroidManifest.xml
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +381 to +384
LazyVerticalGrid(
columns = GridCells.Fixed(columnsForProxyLine(proxyLine)),
state = rememberLazyGridState(),
modifier = Modifier.fillMaxSize(),
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

LazyVerticalGrid uses a fresh rememberLazyGridState() inside each pager page. With HorizontalPager (default beyondViewportPageCount = 0), off-screen pages are typically disposed, so when users switch tabs and come back, the grid scroll position will reset. Consider hoisting a LazyGridState per group/page (e.g., keep a List<LazyGridState> in ProxyPagerContent via remember/rememberSaveable and pass it down, or store it in ProxyGroupUiState) to preserve per-tab scroll state.

Copilot uses AI. Check for mistakes.
@Goooler Goooler merged commit 5537618 into trunk Apr 21, 2026
5 checks passed
@Goooler Goooler deleted the rewrite-proxy-design branch April 21, 2026 05:37
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.

3 participants