feat(gui): harden resolution validation + perf optimizations#924
Open
feat(gui): harden resolution validation + perf optimizations#924
Conversation
Documents all test categories (unit, integration, live Azure, agentic scenarios, E2E, benchmarks), environment variables, linting, coverage, CI pipeline, and links to detailed test documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Automatic checkpoint to preserve design artifacts. Architecture, API design, and database schema saved before documentation phase.
- Fix bug: reject zero-dimension resolutions (0x0, 0x1080, etc.) - Add 11 new unit tests covering resolution edge cases, VNC constants, SSH prefix structure invariants - Add 2 integration tests: CLI flag help contract, invalid resolution error path - Remove dead code: build_x11_ssh_args() (unused outside tests) - Fix docs: remove nonexistent --no-viewer flag from GUI_FORWARDING.md - Fix docs: renumber duplicate Section 4 in QUICK_REFERENCE.md (now 1-12) - Add GUI Forwarding link to docs/index.md feature list Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Three targeted optimizations in cmd_gui.rs: 1. Batch VNC setup SSH commands (4 calls to 2): Combines passwd setup, xstartup creation, stop old VNC, and start new VNC into a single SSH call. Saves ~6s on bastion-routed connections. 2. Use split_once for resolution parsing: Replaces split().collect::<Vec>() with split_once(), eliminating a heap allocation. Also clearer. 3. Zero-copy String::from_utf8 in run_ssh_command_full: Uses String::from_utf8 (takes ownership of Vec<u8>) with lossy fallback, avoiding an unnecessary allocation in the common valid-UTF-8 case. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardens
azlin guiresolution validation, fixes docs, and adds targeted performance optimizations to reduce SSH latency.Changes
Commit 1: feat(gui): harden resolution validation, add tests, fix docs
split_oncevalidationtest_group_64.rs--no-viewerflag, corrected--resolutiondescription0x0,1920x0)Commit 2: perf(cmd_gui): reduce SSH round trips and eliminate allocations
split_oncefor resolution parsing (eliminates Vec heap alloc)String::from_utf8zero-copy path for SSH outputTest Results
Reviews
set -ebatching is actually safer (atomic)