launcher: add Host Mounts tab to the Machine Configuration GUI#173
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the launcher’s Machine Configuration GUI with a new “Host Mounts” tab for editing [[filesys]] host-directory mounts (directory picker, volume name, boot priority), and updates keyboard text-entry handling and path rendering to better support layout-aware characters and long paths.
Changes:
- Add a new launcher tab and fields to edit up to
FILESYS_GUI_SLOTS(4) HostFS mounts, while preserving additional[[filesys]]entries beyond that on save. - Route layout-/shift-aware
textfrom the platform into focused launcher text fields (falling back to keycode mapping when unavailable). - Display HostFS directory paths in full with tail-clipping (
...) and use a folder picker for HostFS directory selection.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/video/launcher.rs | Adds HostFs tab/rows/fields, stores HostFS mount state, and serializes GUI-edited mounts while preserving extra [[filesys]] entries. |
| src/video/window.rs | Plumbs platform text into UI key handling, improves text entry for launcher edits, and adds a HostFS folder picker path. |
| src/video/ui.rs | Adds tail-clipping helper for long HostFS paths and uses it when rendering HostFS directory fields. |
| src/video/window/tests.rs | Updates UI-key-handling tests for the new ui_handle_key(..., text) signature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Config-screen tab to add and edit host-directory mounts: per mount a directory (folder picker), a volume name, and a boot priority. Text entry now takes the platform layout-aware characters, so lowercase and underscores work in the volume-name and path boxes. Paths show in full, tail-clipped with a leading "..." when too long for the field. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fold the duplicated volume-name checks into filesys::volume_name_error and reuse it in the launcher, so a bad name is reported in the status line with the field still focused instead of failing later at save.
6a85089 to
95f7e2d
Compare
Contributor
Author
|
Rebased on main (post-#172) and addressed the review:
Tests, clippy and fmt are clean. |
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.
Follow-up to the HOSTFS filesys work (#159): a config-screen tab to add and
edit host-directory mounts. Independent of the routing/FilesysUnit refactor
in #172 -- this touches only
src/video/*and builds onMountSpecas itlanded in #159. The two can go in either order.
What changed
and a boot priority.
FILESYS_GUI_SLOTS). Mounts beyond that are preserveduntouched on save rather than dropped, so a hand-written config with more
entries survives a round trip through the GUI.
underscores work in the volume-name and path boxes.
field.
Testing
cargo testgreen (1378 lib + 32 + 18 + 6),cargo clippy --all-targetsclean,
cargo fmt --checkclean🤖 Generated with Claude Code - and then hand-edited a bit