Skip to content

fix: avoid displaying Int.MAX_VALUE in reconnecting UI for unlimited retries#29

Merged
PHOEBEHAUNG merged 3 commits into
devfrom
copilot/fix-reconnecting-count-show-maxint
Apr 14, 2026
Merged

fix: avoid displaying Int.MAX_VALUE in reconnecting UI for unlimited retries#29
PHOEBEHAUNG merged 3 commits into
devfrom
copilot/fix-reconnecting-count-show-maxint

Conversation

Copilot AI commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

RetryConfig.PERSISTENT uses Int.MAX_VALUE for unlimited retries, which was being displayed literally in the UI as "Reconnecting (1/2147483647)...".

Changes

  • State types: Changed maxAttempts: IntmaxAttempts: Int? in SessionState.Reconnecting and PlayerState.Reconnecting, where null = unlimited
  • StreamRetryHandler: onAttempt callback now passes null instead of Int.MAX_VALUE for unlimited retries
  • UI display: Updated SessionHelpers.kt and PlayerState.displayName to show "Reconnecting (N)..." when unlimited

Before/After

// Before: "Reconnecting (1/2147483647)..."
// After:  "Reconnecting (1)..."

// Limited retries still show max: "Reconnecting (1/5)..."

Other Int.MAX_VALUE usages

Verified only other usage is in WebRTCClient.ios.kt for camera format sorting fallback—valid use case, no change needed.

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.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx4096M -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.14.3-bin/cv11ve7ro1n3o1j4so8xd9n66/gradle-8.14.3/lib/gradle-daemon-main-8.14.3.jar (dns block)
    • Triggering command: /usr/bin/curl curl -s REDACTED (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

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

Copilot AI linked an issue Apr 13, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix reconnecting count showing MaxInt fix: avoid displaying Int.MAX_VALUE in reconnecting UI for unlimited retries Apr 13, 2026
Copilot AI requested a review from PHOEBEHAUNG April 13, 2026 10:01
@PHOEBEHAUNG

Copy link
Copy Markdown
Collaborator

@copilot CI 沒過,可以幫忙看看嗎 是環境問題嗎

Copilot AI commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

@copilot CI 沒過,可以幫忙看看嗎 是環境問題嗎

CI 狀態是 action_required,這不是程式碼的問題。這是 GitHub Actions 對新貢獻者 PR 的安全機制,需要 repository maintainer 手動批准才能執行 workflow。

dev 分支的 CI 是正常通過的 (run #30)。請在 Actions 頁面點擊 "Approve and run" 來批准這個 workflow。

@PHOEBEHAUNG

Copy link
Copy Markdown
Collaborator

@copilot ci 錯誤
e: file:///Users/runner/work/SyncAI-Lib-KmpWebRTC/SyncAI-Lib-KmpWebRTC/src/commonMain/kotlin/com/syncrobotic/webrtc/audio/SessionHelpers.kt:18:23 Argument type mismatch: actual type is 'Int?', but 'Int' was expected.

e: file:///Users/runner/work/SyncAI-Lib-KmpWebRTC/SyncAI-Lib-KmpWebRTC/src/commonMain/kotlin/com/syncrobotic/webrtc/audio/SessionHelpers.kt:61:102 Argument type mismatch: actual type is 'Int?', but 'Int' was expected.

Task :compileKotlinJvm FAILED
gradle/actions: Writing build results to /Users/runner/work/_temp/.gradle-actions/build-results/__run-1776123172460.json

[Incubating] Problems report is available at: file:///Users/runner/work/SyncAI-Lib-KmpWebRTC/SyncAI-Lib-KmpWebRTC/build/reports/problems/problems-report.html

5 actionable tasks: 5 executed
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileKotlinJvm'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

Copilot AI commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

@copilot ci 錯誤
e: file:///Users/runner/work/SyncAI-Lib-KmpWebRTC/SyncAI-Lib-KmpWebRTC/src/commonMain/kotlin/com/syncrobotic/webrtc/audio/SessionHelpers.kt:18:23 Argument type mismatch: actual typ...

已修復。我漏了更新 AudioPushState.ReconnectingAudioPlaybackState.ReconnectingmaxAttempts 參數類型為 Int?。修復在 commit 25a565c

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.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx4096M -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.14.3-bin/cv11ve7ro1n3o1j4so8xd9n66/gradle-8.14.3/lib/gradle-daemon-main-8.14.3.jar (dns block)

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

@PHOEBEHAUNG
PHOEBEHAUNG marked this pull request as ready for review April 14, 2026 01:32
@PHOEBEHAUNG
PHOEBEHAUNG self-requested a review April 14, 2026 02:40
@PHOEBEHAUNG
PHOEBEHAUNG merged commit 2b17b9e into dev Apr 14, 2026
1 check 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.

reconnecting count show MaxInt

2 participants