feat: adds support for Moonraker file roots details#1881
Merged
pedrolamas merged 2 commits intoJun 17, 2026
Conversation
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds baseline support for Moonraker’s server.files.roots JSON-RPC call by introducing typings, a Vuex state slot + getter for root details, and a SocketActions helper to fetch/store root metadata for later UI use.
Changes:
- Added Moonraker typings for
server.files.rootsresponse items including rootpath. - Extended the
filesVuex module to storerootsand expose agetRootDetailsgetter. - Added
SocketActions.serverFilesRoots()with a dedicated wait key (Waits.onFileSystemRoots).
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/typings/moonraker.file_manager.d.ts | Adds typings for the server.files.roots response and root path info. |
| src/store/files/types.ts | Extends FilesState with roots and relaxes currentPaths value type. |
| src/store/files/state.ts | Initializes new roots state field. |
| src/store/files/mutations.ts | Adds mutation to persist roots response into state. |
| src/store/files/getters.ts | Adds getter to retrieve root details by root name. |
| src/store/files/actions.ts | Adds action handler to store server.files.roots results. |
| src/globals.ts | Adds a wait key for root details fetch. |
| src/api/socketActions.ts | Adds a socket action wrapper for server.files.roots. |
Spread the response array before persisting so the non-enumerable __request__ metadata is not kept on state.roots, matching the onServerFilesListRoot convention. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Pedro Lamas <pedrolamas@gmail.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.
Adds support for Moonraker's
server.files.rootsservice call.This code is not currently in use but serves as a base for future improvements.