← Back to Pull requests

Fix crash when minimizing desktop app to tray #3549

Closed
unknown closed this pull request without merging on Oct 07, 2026 13:51 UTC
View on GitHub
unknown unknown commented on Oct 07, 2026 07:26 UTC
Author

Closes #3490

Closing the window with “Minimize to system tray” enabled crashes while ComposeNativeTray encodes the icon against Skiko 0.150.1. Update the tray dependency from io.github.kdroidfilter:composenativetray:1.3.0 to dev.nucleusframework:composenativetray:2.1.1, and migrate the two tray imports. This includes the upstream encoding compatibility fix in ComposeNativeTray#428.

Add a desktop regression test that renders a colored composable through the tray library, decodes its PNG, and checks dimensions and pixels for both unscaled output and the scaled 32px Windows icon.

Verification

  • :app:desktop:test: all 5 tests passed, including the icon encoding regression test against Skiko 0.150.1.

  • Built :app:desktop:createDistributable with JBR/JCEF 21 using the desktop-ui-verify skill, then launched the packaged macOS arm64 app.

  • Selected “Minimize to system tray” in Settings → Interface and clicked the native window close button. The main window disappeared, the tray icon appeared, and the same process remained alive (PID 21433).

  • Opened the native tray menu and selected “Open main window”: the same window and settings page returned. Closed again and verified that a left-click on the tray icon also restored the window. Repeated closing created the tray successfully.

  • Selected “Exit” in the tray menu and confirmed the app process terminated. No NoSuchMethodError or ANI FATAL entries appeared in the app log.

  • Windows/Linux native UI was not run on this macOS host. The regression test exercises the shared failing encoder, including Windows-sized output. Android/iOS are unaffected by this desktop-only dependency.

  • The skill's build uses a local API endpoint; the server was not started because tray operations require no backend.
  • Runtime screenshots

    Uploaded as GitHub attachments with the github-image-upload skill; all three previews were verified. No verification media is committed.

    1. Close behavior selected: Settings → Interface shows “最小化到系统托盘” (Minimize to system tray).

    !Minimize to system tray selected

    2. Window closed, tray available: the native menu shows “显示主窗口” (Open main window) and “关闭应用” (Exit). The app remained running with no visible main window.

    !Native tray menu after closing the window

    3. Window restored: selecting “Open main window” returned to the same settings page in the same process.

    !Main window restored from the tray

    Diff: 343 lines (+257 / -86) across 4 files Reviewer: Him188 Review duration: 384m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 343 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.349
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3549"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.3% (MEDIUM) · Higher = larger blast radius
    42.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.7% · Safe to merge
    16.7%