Skip to content

refactor: clarify desktop-managed backend markers#150

Merged
zouyonghe merged 1 commit into
AstrBotDevs:mainfrom
zouyonghe:fix/upstream-desktop-managed-backend
Jul 5, 2026
Merged

refactor: clarify desktop-managed backend markers#150
zouyonghe merged 1 commit into
AstrBotDevs:mainfrom
zouyonghe:fix/upstream-desktop-managed-backend

Conversation

@zouyonghe

@zouyonghe zouyonghe commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Rename the packaged backend marker helper to mark_as_desktop_managed.
  • Extract the desktop-managed enabled marker value into a constant.
  • Update the regression test name and assertions to use the shared constants.

Why

This addresses review feedback on the desktop-managed backend startup marker code and reduces the chance of typos in the marker values.

Verification

  • cargo test mark_as_desktop_managed_sets_desktop_management_markers
  • cargo test backend::launch
  • cargo fmt -- --check
  • cargo test

Notes

  • cargo clippy --all-targets -- -D warnings currently fails on macOS due to pre-existing dead_code warnings for Linux-only WebKit workaround symbols in src/app_runtime.rs; this PR does not touch that file.

Summary by Sourcery

Clarify and standardize how the backend is marked as desktop-managed when running in packaged mode.

New Features:

  • Introduce a mark_as_desktop_managed helper to apply desktop management environment markers in one place.

Enhancements:

  • Extract the enabled environment marker value into a shared constant to avoid hard-coded literals.
  • Align related tests and test names with the new helper and shared constant for desktop-managed markers.

@sourcery-ai sourcery-ai Bot 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the environment configuration for the desktop managed backend. Specifically, it introduces a new constant ENABLED_ENV_VALUE to replace hardcoded "1" values, and renames the function configure_desktop_managed_environment to mark_as_desktop_managed along with its corresponding tests. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@zouyonghe zouyonghe merged commit 8bc6b30 into AstrBotDevs:main Jul 5, 2026
4 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.

1 participant