Skip to content

fix(record): surface detailed recording errors and hardware hints to the GUI#80

Open
robertchoi wants to merge 8 commits into
huggingface:mainfrom
orocapangyo:feature/recording-errors
Open

fix(record): surface detailed recording errors and hardware hints to the GUI#80
robertchoi wants to merge 8 commits into
huggingface:mainfrom
orocapangyo:feature/recording-errors

Conversation

@robertchoi

Copy link
Copy Markdown

Description

This PR resolves the issue where a recording session fails (e.g., due to camera disconnect, servo overload, or serial connection loss) but the leLab GUI silently redirects the user to the /upload page without showing any error trace or diagnostic guide.

We now extract the raw exception from the recording worker, map it to a user-friendly troubleshooting hint (reusing the logic from Inference), halt status polling, and render a dedicated failure AlertDialog on the frontend.

Related Issues

Closes #78

Key Changes

1. Shared Hardware Troubleshooting Utility

  • Moved _friendly_hint helper from lelab/rollout.py to lelab/utils/devices.py as a public friendly_hint() function. This enables both inference (rollout) and recording status handlers to share the same troubleshooting guidance for common hardware bugs (gripper overload, port busy, frame timeouts, etc.).

2. Backend (FastAPI status endpoint)

  • Surfaced Error & Hint: Updated handle_recording_status() in lelab/record.py to return the error and mapped hint if current_phase == "error". The error is pulled from the last_recording_info structure populated by the recording worker's exception catcher.

3. Frontend (React + Vite)

  • Halted Polling: Intercepted the "error" phase in frontend/src/pages/Recording.tsx during the status polling effect. When detected, it sets a local sessionError state and halts polling, preventing the automatic navigation redirect to /upload.
  • Failure AlertDialog: Rendered an AlertDialog containing the exact error trace and the friendly hardware hint, offering a clear "Return to Home" button to recover gracefully.

4. Tests

  • Updated imports in tests/test_rollout.py for the moved friendly_hint.
  • Added a unit test test_recording_status_surfaces_error_and_hint in tests/test_record.py to ensure correct serialization of errors and hints.

Verification Results

Automated Tests

Ran the pytest suites in the local virtual environment:

.venv\Scripts\pytest tests/test_rollout.py tests/test_record.py

Copilot AI review requested due to automatic review settings July 18, 2026 02:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Surfaces recording failures and hardware troubleshooting hints in the GUI, alongside unrelated camera, visualization, and documentation changes.

Changes:

  • Shares hardware-error hints between recording and inference.
  • Stops polling and displays recording failures in an alert dialog.
  • Adds tests, camera naming changes, Korean guides, and a teleoperation adjustment.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
lelab/utils/devices.py Adds shared troubleshooting hints.
lelab/rollout.py Uses the shared hint utility.
lelab/record.py Returns recording errors and hints.
frontend/src/pages/Recording.tsx Displays recording failure details.
tests/test_rollout.py Updates hint utility tests.
tests/test_record.py Tests recording error status.
lelab/teleoperate.py Disables URDF angle corrections.
lelab/server.py Adds Chrome-oriented Linux camera names.
study/install.md Adds a Korean Windows installation guide.
study/day0_overview.md Adds a Korean project overview.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/pages/Recording.tsx Outdated
Comment thread lelab/teleoperate.py
Comment thread frontend/src/pages/Recording.tsx
Comment thread lelab/server.py
Comment thread study/day0_overview.md

로봇 공학이라고 하면 흔히 검은 화면에 가득한 복잡한 코드, 끊임없이 터미널에 입력해야 하는 명령어(CLI), 그리고 지난한 캘리브레이션 과정을 떠올리곤 합니다. 이러한 기술적 장벽은 혁신적인 아이디어를 가진 이들조차 로봇 공학의 입구에서 발길을 돌리게 만들었습니다.

하지만 이제 시대가 변했습니다. **LeLab**은 *'박스 개봉부터 학습까지 단 몇 분 만에'*라는 가치를 내걸고, 로봇 학습의 모든 과정을 직관적인 웹 인터페이스로 옮겨왔습니다. 현재 LeLab은 **SO-ARM101**(및 **SO-100** 시리즈)에 최적화되어, 하드웨어 설정부터 AI 모델 배포까지의 복잡한 워크플로우를 하나로 통합했습니다. 이제 당신의 브라우저가 로봇을 가르치는 가장 강력한 도구가 됩니다.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Robert Choi <robertchoimail@gmail.com>
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.

Recording session randomly stops in LeLab with no error shown in GUI

3 participants