Repository navigation
Conversation
lavisor
marked this pull request as ready for review
October 11, 2026 07:52
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.
What
Adds an optional browser front end to soundcli.
sndcli --guistarts a small local server and opens the same library, player and download queue in a browser tab. The terminal app is unchanged.Why
Some people would rather click through a library than learn the key bindings. The GUI offers a second way in without changing how the TUI works.
How
src/ui/App.tsxmoved intosrc/core/createApp.ts. The Ink TUI and the GUI server both use it, so the two front ends can't drift apart.App.tsxshrinks by about 200 lines as a result.src/gui/server.tsserves the built page and a WebSocket. It sends a snapshot of the state on connect, then sends playback, queue and library updates as they happen.src/gui/protocol.tsdefines the messages and contains types only, so the web bundle never imports Node code.web/is a small Vite + React app with Songs, Download and Settings sections and a Now Playing bar.--gui,--port <n>and--no-openare parsed insrc/cli/args.ts. The port is validated as an integer from 1 to 65535, and the help text is updated.npm run buildnow also builds the web page.typecheckcoversweb/too. The new dependencies arews,vite,@vitejs/plugin-reactandreact-dom, plus their type packages.Security
The GUI drives a process that can play audio, download and delete files, so it is locked down:
127.0.0.1only.Originisn't its own loopback origin, so other sites can't reach it.Scope and known limits
package-lock.jsonhas a large diff because of the new dependencies.Testing
npm run typechecknpm test(addstest/gui-server.test.tsand extendstest/cli-args.test.ts)npm run guiand play, queue a download, and rename or delete a track in the browserDocs
README has a new "Prefer a window?" section.