Repository navigation
feat: report blocked prompts via Program Status Protocol - #129
Merged
Merged
Conversation
Also guard against empty photo results and drop a duplicate config write.
There was a problem hiding this comment.
🟡 Changes recommended
Terminal detection admits non-terminal devices, and download-fallback status reporting is unreachable.
2 open issues
What changed in this PR
Adds Program Status Protocol reporting so terminals and dashboards can identify when splash-cli needs user input.
Changes:
- Adds blocked/working status reporting and message tests.
- Instruments permission, confirmation, and login waits.
- Handles missing photos and removes duplicate configuration writes.
| File | Description |
|---|---|
| lib/terminal/status.go | Adds terminal status reporting and message truncation. |
| lib/terminal/status_test.go | Tests truncation and Base64 encoding. |
| cmd/root.go | Instruments prompts, handles missing photos, and removes a duplicate write. |
| cmd/auth/login.go | Reports the authentication wait and removes a duplicate write. |
Review effort: Balanced
| fmt.Println("") | ||
|
|
||
| var key keyboard.Key | ||
| resume := terminal.Blocked("permission", "Download failed. Set wallpaper from the URL?") |
Comment on lines
+38
to
+39
| info, err := os.Stdout.Stat() | ||
| return err == nil && info.Mode()&os.ModeCharDevice != 0 && os.Getenv("TERM") != "dumb" |
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.

Why the change
Terminals and agent dashboards can't tell when splash-cli is waiting for the user, so this PR reports blocked prompts through the Program Status Protocol so they can show "needs input".
Special things to note
TERM=dumb), and terminals that don't know OSC 7501 ignore them.viper.WriteConfig()calls inlogin.goandroot.go.Change outline
A new helper sends the status; each prompt wraps its wait with it.
Prompts that now report:
Smaller fixes in the same files: