Skip to content

fix: the old custom wallpaper homescreen image was set to black#396

Merged
guowei0105 merged 4 commits intoOneKeyHQ:mainfrom
guowei0105:new-boot
Nov 20, 2025
Merged

fix: the old custom wallpaper homescreen image was set to black#396
guowei0105 merged 4 commits intoOneKeyHQ:mainfrom
guowei0105:new-boot

Conversation

@guowei0105
Copy link
Copy Markdown
Contributor

@guowei0105 guowei0105 commented Nov 18, 2025

Summary by CodeRabbit

  • New Features

    • Added bounce animation when swiping at app drawer edges.
  • Bug Fixes

    • Improved device name and Bluetooth label synchronization across screens.
    • Enhanced wallpaper replacement feedback and UI state updates.
  • Chores

    • Updated default wallpaper.
    • Incremented patch version.

@guowei0105 guowei0105 requested a review from a team as a code owner November 18, 2025 12:00
@revan-zhang
Copy link
Copy Markdown
Contributor

revan-zhang commented Nov 18, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 19, 2025

Walkthrough

The PR updates the firmware patch version, refactors wallpaper replacement logic to return a boolean status, introduces dynamic page sizing and bounce animation in AppDrawer, adds a device label synchronization utility function, and changes the default wallpaper asset.

Changes

Cohort / File(s) Summary
Version Bump
core/embed/firmware/version.h
ONEKEY_VERSION_PATCH incremented from 0 to 1
Wallpaper & Label Utilities
core/src/trezor/lvglui/scrs/preview_utils.py
New public function refresh_preview_device_labels() synchronizes device name and BLE name labels based on storage settings and display preferences
Default Wallpaper
core/src/trezor/utils.py
Default wallpaper changed from wallpaper-1.jpg to wallpaper-7.jpg
Homescreen & Navigation
core/src/trezor/lvglui/scrs/homescreen.py
Function replace_wallpaper_if_in_use() now returns bool; AppDrawer gains dynamic PAGE_SIZE computation and new bounce_page() method; page gesture logic and label refresh behavior updated; import of refresh_preview_device_labels added
NFT Manager Label Sync
core/src/trezor/lvglui/scrs/nftmanager.py
Removed storage_device usage for labels; added calls to refresh_preview_device_labels() for label synchronization; UI width adjustments for centered label display

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • homescreen.py: Review function signature change to replace_wallpaper_if_in_use() return type and all call sites that now depend on the boolean result; verify dynamic PAGE_SIZE logic and new bounce_page() method behavior
  • preview_utils.py: Verify label visibility and text logic paths for both show_setting true/false branches; check BLE name formatting and fallback behavior
  • nftmanager.py: Confirm all label refresh calls are placed at correct points in event flows

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.57% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive Title mentions fixing a black wallpaper issue, but changeset includes unrelated updates to version numbers, UI animations, device labels, and NFT manager code. Clarify if title should reflect broader scope (UI/wallpaper system overhaul) or if unrelated changes should be in separate PRs.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d05b0bb and 1db8794.

📒 Files selected for processing (5)
  • core/embed/firmware/version.h (1 hunks)
  • core/src/trezor/lvglui/scrs/homescreen.py (13 hunks)
  • core/src/trezor/lvglui/scrs/nftmanager.py (5 hunks)
  • core/src/trezor/lvglui/scrs/preview_utils.py (2 hunks)
  • core/src/trezor/utils.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Gen check
  • GitHub Check: Defs check
  • GitHub Check: Style check
🔇 Additional comments (5)
core/embed/firmware/version.h (1)

13-13: Verify version bump is appropriate.

PR title indicates bug fix, but AI summary mentions new features (bounce animation, dynamic page sizing). Patch versions are for bug fixes only; features need minor version bump.

core/src/trezor/utils.py (1)

344-344: LGTM.

Fixes the reported black wallpaper issue.

core/src/trezor/lvglui/scrs/preview_utils.py (1)

99-136: LGTM.

Function logic is sound. Handles edge cases properly.

core/src/trezor/lvglui/scrs/nftmanager.py (2)

591-612: LGTM.

Label setup is correct. Full width enables proper centering.


638-641: LGTM.

Keeps labels synced with current settings.

Comment thread core/src/trezor/lvglui/scrs/homescreen.py
@guowei0105 guowei0105 merged commit 09f6fe8 into OneKeyHQ:main Nov 20, 2025
9 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.

4 participants