Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion rust/frontend/src/models/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,15 @@ use zaparoo_core::runtime;
/// empty leading entry is the "use `frontend.toml` defaults" sentinel;
/// the form renders it as `qsTr("Default")` so users can cycle back
/// to no-override after picking a custom value.
const MISTER_RESOLUTIONS: &[&str] = &["", "1280x720", "1920x1080", "640x480", "1920x1440"];
const MISTER_RESOLUTIONS: &[&str] = &[
"",
"1280x720",
"1920x1080",
"1920x1200",
"1920x1440",
"640x480",
"2048x1536",
];
const LANGUAGES: &[&str] = &[
"auto", "en", "it_IT", "de", "el", "ja", "ko", "nl", "ro", "sk", "uk", "zh_CN", "he", "ar",
"hi",
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-macos-mister-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ fi

export ZAPAROO_CORE_ENDPOINT="ws://192.168.1.176:7497/api/v0.1"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid committing a machine-specific core endpoint in the shared runner script.

Line 18 hardcodes a private LAN IP, which will fail for most environments. Make it overrideable with a default so the script works out-of-the-box and still supports local customization.

Suggested fix
-export ZAPAROO_CORE_ENDPOINT="ws://192.168.1.176:7497/api/v0.1"
+: "${ZAPAROO_CORE_ENDPOINT:=ws://127.0.0.1:7497/api/v0.1}"
+export ZAPAROO_CORE_ENDPOINT
 export ZAPAROO_CRT_PREVIEW_SCALE=3
 exec "${FRONTEND}"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export ZAPAROO_CORE_ENDPOINT="ws://192.168.1.176:7497/api/v0.1"
: "${ZAPAROO_CORE_ENDPOINT:=ws://127.0.0.1:7497/api/v0.1}"
export ZAPAROO_CORE_ENDPOINT
export ZAPAROO_CRT_PREVIEW_SCALE=3
exec "${FRONTEND}"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/run-macos-mister-core.sh` at line 18, The script currently hardcodes
ZAPAROO_CORE_ENDPOINT to a private LAN IP which breaks other environments;
change it so the variable is overrideable by checking for an existing
environment value and falling back to a sensible default (e.g.,
ws://localhost:7497/api/v0.1) using shell parameter expansion instead of the
fixed IP, and update the comment near the ZAPAROO_CORE_ENDPOINT declaration to
note that callers can override it via the environment.

export ZAPAROO_CRT_PREVIEW_SCALE=3
exec "${FRONTEND}" --crt
exec "${FRONTEND}"
# exec "${FRONTEND}" --crt
Comment on lines 19 to 21
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

ZAPAROO_CRT_PREVIEW_SCALE is ineffective without --crt, causing a behavior regression.

On Line 20, removing --crt disables the CRT-native path; in that path, Line 19’s ZAPAROO_CRT_PREVIEW_SCALE is actually consumed. This makes the new scale export a no-op and changes startup behavior.

Suggested fix
 export ZAPAROO_CORE_ENDPOINT="ws://192.168.1.176:7497/api/v0.1"
 export ZAPAROO_CRT_PREVIEW_SCALE=3
-exec "${FRONTEND}"
+exec "${FRONTEND}" --crt
 # exec "${FRONTEND}" --crt
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export ZAPAROO_CRT_PREVIEW_SCALE=3
exec "${FRONTEND}" --crt
exec "${FRONTEND}"
# exec "${FRONTEND}" --crt
export ZAPAROO_CRT_PREVIEW_SCALE=3
exec "${FRONTEND}" --crt
# exec "${FRONTEND}" --crt
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/run-macos-mister-core.sh` around lines 19 - 21, The
ZAPAROO_CRT_PREVIEW_SCALE export is ineffective because the CRT-native path is
disabled by removing the --crt flag; restore passing the --crt flag to the
FRONTEND invocation (or add logic to append --crt when ZAPAROO_CRT_PREVIEW_SCALE
is set) so that the scale env var is actually consumed; update the exec line
that invokes "${FRONTEND}" to include the --crt option (or conditionalize based
on ZAPAROO_CRT_PREVIEW_SCALE) to re-enable the CRT-native path.

Loading