Skip to content

feat(usb): improve accessory selection and replacement - #24

Merged
Afcoo merged 15 commits into
mainfrom
ui/usb-device-presentation
Aug 30, 2026
Merged

feat(usb): improve accessory selection and replacement#24
Afcoo merged 15 commits into
mainfrom
ui/usb-device-presentation

Conversation

@Afcoo

@Afcoo Afcoo commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

Improves how USB accessories are presented and managed in Settings, including selection-aware actions and confirmed replacement of an attached accessory.

Changes

  • Replaces the USB accessory list with a fixed-height table showing status, VID:PID, device name, class, and registry ID.
  • Pins the attached accessory to the first row and marks it with a green checkmark.
  • Enables Attach and Detach according to the selected row's attachment state.
  • Confirms replacement before detaching the current accessory, stopping its VM session, starting a new VM session, and attaching the selected accessory.
  • Preserves the existing one-VM-boot-per-attachment lifecycle and validates the expected accessory before restarting.
  • Logs and surfaces accessory replacement rejections.

Related issue

None.

Validation

  • ./script/build_and_run.sh --verify — not run because it terminates any currently running ThruRNDIS instance.
  • Checks run and unverified runtime paths are documented
    • xcodebuild -project ThruRNDIS.xcodeproj -scheme ThruRNDIS -configuration Debug CODE_SIGNING_ALLOWED=NO build
    • xcodebuild -project ThruRNDIS.xcodeproj -list
    • plutil -lint for the project, plists, and entitlements
    • scheme XML validation, string catalog validation, and git diff --check
  • Signed Runtime validation with ./script/build_and_install.sh
  • Real USB/VZNAT route validation
  • Not applicable; explanation: signed Runtime and real USB/VZNAT validation require approved entitlements and physical hardware unavailable in this environment.

User-facing impact

The USB Devices settings section now uses a table, clearly marks the attached device, derives action availability from the selected row, and asks for confirmation before replacing an attached device. No screenshot is included because an unsigned build cannot enumerate AccessoryAccess USB devices.

Security and architecture

USB replacement reuses the existing managed-network cleanup and VM restart workflow so a new accessory is attached only in a new VM session. No privileged-helper, XPC, entitlement, host-route contract, VM Asset, security, or privacy changes are included.

Checklist

  • The pull request has one focused purpose.
  • The title follows Conventional Commits.
  • Behavior changes include appropriate build or runtime validation, with unavailable paths explained.
  • User-facing behavior and operational changes are documented.
  • New, moved, renamed, or deleted Swift files are reflected in Xcode groups, target membership, and build phases. No Swift files were added, moved, renamed, or deleted.
  • No credentials, provisioning profiles, personal signing values, or local build artifacts are included.
  • Guest VM scripts and VM Asset build tooling remain in Afcoo/ThruRNDIS_VM_Assets.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T09:49:37.102210Z 169fe72 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2e9e28dc3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ThruRNDIS/Stores/TetheringStore.swift
Comment thread ThruRNDIS/Stores/TetheringStore.swift Outdated
@Afcoo

Afcoo commented Aug 30, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 169fe72851

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Afcoo
Afcoo merged commit 9dc476f into main Aug 30, 2026
1 check passed
@Afcoo
Afcoo deleted the ui/usb-device-presentation branch August 30, 2026 09:52
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