[codex] Fix Android dashboard simulator issues#4
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses Android emulator/simulator regressions by aligning the Android dashboard client with backend contracts for Desktop streaming, Files operations, and Terminal WebSocket framing, and by adding a repeatable simulator test procedure.
Changes:
- Fix Desktop stream WebSocket URL construction by building query parameters on an HTTP(S) URL before converting to WS(S).
- Update Files to start at the backend workspace root (
.) and add a navigation back-stack plus safer child path construction. - Update Terminal WebSocket behavior to always emit tagged frames, avoid sending on stale sockets, support IME Send, and normalize PTY output; add a simulator-focused test plan and ignore run artifacts.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
android_dashboard/TEST_PLAN.md |
Adds a detailed, artifact-driven Android emulator test plan to reproduce and classify simulator failures. |
android_dashboard/app/src/main/java/sh/sandboxed/dashboard/ui/terminal/TerminalScreen.kt |
Improves terminal UX (IME send, send button gating) and normalizes output handling; updates submit behavior on failed sends. |
android_dashboard/app/src/main/java/sh/sandboxed/dashboard/ui/files/FilesScreen.kt |
Moves file operations to workspace root (.), adds up-navigation via back-stack, and adjusts mkdir child path handling. |
android_dashboard/app/src/main/java/sh/sandboxed/dashboard/data/api/TerminalSocket.kt |
Fixes terminal frame serialization to always include the required t discriminator and adds stale-connection protection. |
android_dashboard/app/src/main/java/sh/sandboxed/dashboard/data/api/DesktopStreamSocket.kt |
Fixes URL building to avoid feeding ws(s):// into toHttpUrl() while preserving query params. |
.gitignore |
Ignores generated Android simulator run artifacts under android_dashboard/test-artifacts/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
android_dashboard/app/src/main/java/sh/sandboxed/dashboard/ui/files/FilesScreen.kt:112
- In
refresh(), the fallback branch setserror = "Could not open ..."and then immediately callsrefresh()again. Sincerefresh()starts by clearingerror(it.copy(loading = true, error = null)), the fallback message can be dropped before Compose observes it (state updates may be conflated), so the user may never see why they were redirected to workspace root. Consider surfacing this asinfo(or a one-shot UI event) and/or avoid clearingerrorwhenrefresh()is invoked as part of the fallback path.
.onFailure { e ->
// Fall back to "." once if the requested path can't be opened (e.g. server returns
// 500 because the directory doesn't exist on this install).
if (path != ".") {
_state.update { it.copy(path = ".", backStack = emptyList(), error = "Could not open $path — falling back to workspace root") }
refresh()
} else {
_state.update { it.copy(error = e.message, loading = false) }
}
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.
Summary
Root Cause
The latest simulator run exposed multiple client/backend contract issues: Desktop passed a
wss://URL into OkHttp's HTTP URL builder, Files attempted writes under/, and Terminal frames omitted the backend-requiredtdiscriminator because kotlinx serialization omitted default-valued fields.Validation
./gradlew :app:assembleDebug :app:testDebugUnitTest :app:lintDebugPixel_10_Pro_API36_1/ Android API 36.1 Google Play image.sh.sandboxed.dashboardcrash/ANR markers.Notes
Remaining non-app blockers from the remote backend run:
claudeCLI / no npm or bun in workspace.:101unavailable.