Skip to content

Conversation

@nir1r7
Copy link
Member

@nir1r7 nir1r7 commented Nov 5, 2025

Purpose

Closes 389.

Adds a minimal WebSocket-based terminal to the MCC website, allowing users to send shell commands from the frontend to the backend running on a Raspberry Pi. Commands are executed asynchronously, and stdout/stderr is streamed back in real-time, including loading and completion messages.

New Changes

  • Added a new route in the website navigation to access the WebSocket terminal.
  • Implemented a FastAPI WebSocket backend that executes shell commands asynchronously on the server where the backend runs.
  • Backend streams real-time output and error messages line-by-line to the frontend as the commands execute.
  • Created a React frontend terminal interface that displays:
    • User-entered commands
    • Live command output
    • Loading indicators (...) while commands are running
    • Completion messages when commands finish
  • Auto-scrolls the terminal view as new messages are received for seamless real-time feedback.
  • Ensures proper timestamping of all messages to track command execution history.

Testing

  • I have unit-tested this PR. Otherwise, explain why it cannot be unit-tested.
    Cannot be unit-tested because it requires live shell execution on a Raspberry Pi.
  • I have tested this PR on a board if the code will run on a board (Only required for firmware developers).
    Not applicable.
  • I have tested this PR by running the ARO website (Only required if the code will impact the ARO website).
    Not applicable.
  • I have tested this PR by running the MCC website (Only required if the code will impact the MCC website).
    Verified sending commands like ls, pwd, and echo, and observed live output streaming.
  • I have included screenshots of the tests performed below.
image

Outstanding Changes

  • Add a command whitelist for security.
  • Implement authentication/authorization.
  • Improve UI (persistent command history, autocomplete, save command sessions).
  • Sandbox commands for safer production use.

@nir1r7 nir1r7 linked an issue Nov 5, 2025 that may be closed by this pull request
3 tasks
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Pull reviewers stats

Stats of the last 120 days for UWOrbital:

User Total reviews Time to review Total comments
Adityya-K
🥇
56
▀▀▀▀▀
1d 4h 3m
180
▀▀▀▀
camspec
🥈
26
▀▀
1d 8h
168
▀▀▀▀
kepler452b123
🥉
15
6d 7h 42m
38
Yarik-Popov
4
1d 1h 41m
40
Navtajh04
2
7d 12h 7m
▀▀
25
proprogrammer504
2
7d 1h 31m
7
sunray4
1
12d 21m
▀▀
9
c4bae
1
13d 1h 35m
▀▀▀
2

⚡️ Pull request stats

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.

Add WebSocket for MCC mission commands

1 participant