Skip to content

launcher: add Host Mounts tab to the Machine Configuration GUI#173

Merged
LinuxJedi merged 2 commits into
LinuxJedi:mainfrom
codewiz:feat/filesys-gui-solo
Jul 13, 2026
Merged

launcher: add Host Mounts tab to the Machine Configuration GUI#173
LinuxJedi merged 2 commits into
LinuxJedi:mainfrom
codewiz:feat/filesys-gui-solo

Conversation

@codewiz

@codewiz codewiz commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
image

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 on MountSpec as it
landed in #159. The two can go in either order.

What changed

  • Host Mounts tab: per mount a directory (folder picker), a volume name,
    and a boot priority.
  • Four editable slots (FILESYS_GUI_SLOTS). Mounts beyond that are preserved
    untouched on save rather than dropped, so a hand-written config with more
    entries survives a round trip through the GUI.
  • 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.

Testing

  • cargo test green (1378 lib + 32 + 18 + 6), cargo clippy --all-targets
    clean, cargo fmt --check clean
  • Manually exercised the tab in the launcher and saved a working config

🤖 Generated with Claude Code - and then hand-edited a bit

@codewiz codewiz changed the title launcher: add a Host Mounts tab for [[filesys]] directories launcher: add Host Mounts tab to the Machine Configuration GUI Jul 13, 2026
@LinuxJedi LinuxJedi requested a review from Copilot July 13, 2026 06:50

Copilot AI 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.

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 text from 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.

Comment thread src/video/launcher.rs
Comment thread src/video/window.rs
Comment thread src/video/launcher.rs
codewiz and others added 2 commits July 13, 2026 18:12
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.
@codewiz codewiz force-pushed the feat/filesys-gui-solo branch from 6a85089 to 95f7e2d Compare July 13, 2026 09:50
@codewiz

codewiz commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on main (post-#172) and addressed the review:

  • Volume-name validation (window.rs:3122): the checks were duplicated between the [[filesys]] validator and the [scsi]/[ide] drive-name parser, so I folded both into filesys::volume_name_error() and reused it in the launcher. Committing a name with ':' '/' NUL or over 30 bytes now shows the reason in the status line and keeps the field focused so it can be fixed, rather than saving a config that will not load. Net -27 lines in config.rs.
  • Round-trip test (launcher.rs:966): added host_mounts_round_trip_and_keep_entries_past_the_gui_slots, covering >4 mounts, an untouched save, and a cleared slot; plus a test for the invalid-name path.
  • Slot renumbering (launcher.rs:955): working as intended. HOSTFS<n> is defined as the position in the config, so clearing a slot renumbers the mounts after it exactly as deleting that [[filesys]] block from the TOML by hand would. The GUI slot labels are positional too, so the panel stays self-consistent after a reload. Making a cleared slot hold its number would need the mount to carry an explicit device name in the config, which is a separate change (and a reasonable one, if we want startup scripts to be able to rely on a stable HOSTFS number).

Tests, clippy and fmt are clean.

@LinuxJedi LinuxJedi left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks great, many thanks!

@LinuxJedi LinuxJedi merged commit 1f0f0cb into LinuxJedi:main Jul 13, 2026
8 checks passed
@codewiz codewiz deleted the feat/filesys-gui-solo branch July 13, 2026 13:08
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.

3 participants