Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
4afe3f1
feat: attempt scrolling
TheSecurityDev Oct 11, 2025
c74aea9
fix: update scroll amount
TheSecurityDev Oct 11, 2025
793cd57
remove unused import
TheSecurityDev Oct 11, 2025
6b9607e
test ui change
TheSecurityDev Oct 11, 2025
fc15da8
use our own repo for workflows
TheSecurityDev Oct 11, 2025
6317ab3
fix: indention
TheSecurityDev Oct 11, 2025
9bc566c
temp disable path checks
TheSecurityDev Oct 11, 2025
f2d2b7d
Revert "temp disable path checks"
TheSecurityDev Oct 11, 2025
19f7d8c
update branch name
TheSecurityDev Oct 11, 2025
bfa0e7d
test change ui
TheSecurityDev Oct 11, 2025
8595000
adjust inention
TheSecurityDev Oct 11, 2025
a5df256
always run
TheSecurityDev Oct 11, 2025
5865109
all branches and types
TheSecurityDev Oct 11, 2025
9a01578
add pr types back
TheSecurityDev Oct 11, 2025
56c6f93
add branch back
TheSecurityDev Oct 11, 2025
c76dbf1
don't skip
TheSecurityDev Oct 11, 2025
a7414d7
fix
TheSecurityDev Oct 11, 2025
26988b9
add both
TheSecurityDev Oct 11, 2025
4f8bc6e
disable macos build
TheSecurityDev Oct 11, 2025
2154955
fix workflow
TheSecurityDev Oct 11, 2025
4977b34
fix workflow again
TheSecurityDev Oct 11, 2025
f2ec54b
all branches
TheSecurityDev Oct 11, 2025
2ec67ef
disable pull_request_target
TheSecurityDev Oct 11, 2025
7caec7e
only pr
TheSecurityDev Oct 11, 2025
8e4bd43
test
TheSecurityDev Oct 11, 2025
2b816f3
only on ui change
TheSecurityDev Oct 11, 2025
5278ce8
fix uploading preview
TheSecurityDev Oct 11, 2025
6a423ce
reduce wait after scroll
TheSecurityDev Oct 11, 2025
b39554f
large scroll
TheSecurityDev Oct 11, 2025
63d1b0f
drag to scroll instead
TheSecurityDev Oct 11, 2025
e8b8982
Revert "drag to scroll instead"
TheSecurityDev Oct 11, 2025
5673654
Revert "large scroll"
TheSecurityDev Oct 11, 2025
d73efb7
remove unused function
TheSecurityDev Oct 11, 2025
f87ce50
remove failing window check; add screenshot error handling
TheSecurityDev Oct 11, 2025
9b72903
test clicking center instead of scrolling
TheSecurityDev Oct 11, 2025
6467c2b
revert to scroll
TheSecurityDev Oct 11, 2025
9c847ec
skip apt-get update
TheSecurityDev Oct 11, 2025
c2b3aa2
use mouse down/drag instead of scroll
TheSecurityDev Oct 11, 2025
9b61e7b
Revert "skip apt-get update"
TheSecurityDev Oct 11, 2025
3b1d0da
longer delay
TheSecurityDev Oct 11, 2025
e4c2965
add tiny delays between mouse events
TheSecurityDev Oct 11, 2025
9749f34
enhance screenshot capture with progression diffs and raw diff saving
TheSecurityDev Oct 11, 2025
813f0ab
Merge branch 'master' into screenshots
TheSecurityDev Oct 11, 2025
0a41432
don't save diff
TheSecurityDev Oct 11, 2025
e88590d
use original file name for first one
TheSecurityDev Oct 11, 2025
2d5153f
fix import
TheSecurityDev Oct 11, 2025
138dbf9
update comments
TheSecurityDev Oct 11, 2025
81cd6db
use xdotool command for scrolling to fix clicking issue
TheSecurityDev Oct 11, 2025
dfc02f3
disable unused code
TheSecurityDev Oct 11, 2025
a442ccc
refactor scrolling logic to support different scroll amounts per case
TheSecurityDev Oct 11, 2025
a38295b
install xdotool in ui test
TheSecurityDev Oct 11, 2025
8a6eba2
add error handling for xdotool command in UI test
TheSecurityDev Oct 11, 2025
2793eea
install xdotool in the test runtime setup for UI report generation
TheSecurityDev Oct 11, 2025
b1bec5e
add case config types
TheSecurityDev Oct 11, 2025
519f742
modify keyboard case to disable scrolling
TheSecurityDev Oct 11, 2025
34712d7
simplify unpacking
TheSecurityDev Oct 11, 2025
e0137f9
clean up
TheSecurityDev Oct 11, 2025
ff92b96
more refactors
TheSecurityDev Oct 11, 2025
79d435d
refactor screenshot methods to improve usability and save functionality
TheSecurityDev Oct 11, 2025
d8dc6fe
create SCROLL_DELAY constant
TheSecurityDev Oct 11, 2025
71c97f1
test smaller step amount
TheSecurityDev Oct 12, 2025
6e7354d
Revert "test smaller step amount"
TheSecurityDev Oct 12, 2025
4e78fff
re-enable macOS test
TheSecurityDev Oct 12, 2025
adace1d
fix macOS
TheSecurityDev Oct 12, 2025
323da41
unlink first
TheSecurityDev Oct 12, 2025
c0bf240
attempt fix again
TheSecurityDev Oct 12, 2025
da08749
remove macOS fix
TheSecurityDev Oct 12, 2025
51ccfa5
add experimental mode description case and new scroll function that d…
TheSecurityDev Oct 13, 2025
d6c188e
improve scroll function
TheSecurityDev Oct 13, 2025
4b60058
remove xdotool scroll
TheSecurityDev Oct 13, 2025
6cdc12d
openpilot long confirmation dialog
TheSecurityDev Oct 13, 2025
d2d9e95
set alphaLongitudinalAvailable
TheSecurityDev Oct 13, 2025
713ce24
add comment
TheSecurityDev Oct 13, 2025
41bba83
show removed images
TheSecurityDev Oct 14, 2025
46fc587
Revert "show removed images"
TheSecurityDev Oct 14, 2025
c9668a7
don't exclude pair_device
TheSecurityDev Oct 14, 2025
e01f87c
relink openssl
TheSecurityDev Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 25 additions & 17 deletions .github/workflows/raylib_ui_preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ name: "raylib ui preview"
on:
push:
branches:
- master
pull_request_target:
types: [assigned, opened, synchronize, reopened, edited]
- 'master'
# pull_request_target:
# types: [assigned, opened, synchronize, reopened, edited]
# branches:
# - '**'
# paths:
# - 'selfdrive/ui/**'
# - 'system/ui/**'
pull_request:
types: [opened, synchronize, reopened, edited]
branches:
- 'master'
paths:
Expand All @@ -17,10 +24,11 @@ env:
REPORT_NAME: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && 'master' || github.event.number }}
SHA: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.sha || github.event.pull_request.head.sha }}
BRANCH_NAME: "openpilot/pr-${{ github.event.number }}-raylib-ui"
CI_ARTIFACTS_OWNER: ${{ github.repository_owner }}
CI_ARTIFACTS_REPO: openpilot-ci-artifacts

jobs:
preview:
if: github.repository == 'commaai/openpilot'
name: preview
runs-on: ubuntu-latest
timeout-minutes: 20
Expand Down Expand Up @@ -59,13 +67,13 @@ jobs:
- name: Getting master ui
uses: actions/checkout@v4
with:
repository: commaai/ci-artifacts
repository: ${{ env.CI_ARTIFACTS_OWNER }}/${{ env.CI_ARTIFACTS_REPO }}
ssh-key: ${{ secrets.CI_ARTIFACTS_DEPLOY_KEY }}
path: ${{ github.workspace }}/master_ui_raylib
ref: openpilot_master_ui_raylib

- name: Saving new master ui
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
if: github.event_name == 'push'
working-directory: ${{ github.workspace }}/master_ui_raylib
run: |
git checkout --orphan=new_master_ui_raylib
Expand All @@ -80,12 +88,12 @@ jobs:
git push origin openpilot_master_ui_raylib --force

- name: Finding diff
if: github.event_name == 'pull_request_target'
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
id: find_diff
run: >-
sudo apt-get update && sudo apt-get install -y imagemagick

scenes=$(find ${{ github.workspace }}/pr_ui/*.png -type f -printf "%f\n" | cut -d '.' -f 1 | grep -v 'pair_device')
scenes=$(find ${{ github.workspace }}/pr_ui/*.png -type f -printf "%f\n" | cut -d '.' -f 1)
A=($scenes)

DIFF=""
Expand All @@ -102,7 +110,7 @@ jobs:
DIFF="${DIFF}<table>"

DIFF="${DIFF}<tr>"
DIFF="${DIFF} <td> <img src=\"https://raw.githubusercontent.com/commaai/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
DIFF="${DIFF} <td> <img src=\"https://raw.githubusercontent.com/${{ env.CI_ARTIFACTS_OWNER }}/${{ env.CI_ARTIFACTS_REPO }}/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
DIFF="${DIFF}</tr>"

DIFF="${DIFF}</table>"
Expand All @@ -119,13 +127,13 @@ jobs:
DIFF="${DIFF}<table>"

DIFF="${DIFF}<tr>"
DIFF="${DIFF} <td> master <img src=\"https://raw.githubusercontent.com/commaai/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_master_ref.png\"> </td>"
DIFF="${DIFF} <td> proposed <img src=\"https://raw.githubusercontent.com/commaai/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
DIFF="${DIFF} <td> master <img src=\"https://raw.githubusercontent.com/${{ env.CI_ARTIFACTS_OWNER }}/${{ env.CI_ARTIFACTS_REPO }}/${{ env.BRANCH_NAME }}/${A[$i]}_master_ref.png\"> </td>"
DIFF="${DIFF} <td> proposed <img src=\"https://raw.githubusercontent.com/${{ env.CI_ARTIFACTS_OWNER }}/${{ env.CI_ARTIFACTS_REPO }}/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
DIFF="${DIFF}</tr>"

DIFF="${DIFF}<tr>"
DIFF="${DIFF} <td> diff <img src=\"https://raw.githubusercontent.com/commaai/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_diff.png\"> </td>"
DIFF="${DIFF} <td> composite diff <img src=\"https://raw.githubusercontent.com/commaai/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}_diff.gif\"> </td>"
DIFF="${DIFF} <td> diff <img src=\"https://raw.githubusercontent.com/${{ env.CI_ARTIFACTS_OWNER }}/${{ env.CI_ARTIFACTS_REPO }}/${{ env.BRANCH_NAME }}/${A[$i]}_diff.png\"> </td>"
DIFF="${DIFF} <td> composite diff <img src=\"https://raw.githubusercontent.com/${{ env.CI_ARTIFACTS_OWNER }}/${{ env.CI_ARTIFACTS_REPO }}/${{ env.BRANCH_NAME }}/${A[$i]}_diff.gif\"> </td>"
DIFF="${DIFF}</tr>"

DIFF="${DIFF}</table>"
Expand All @@ -138,7 +146,7 @@ jobs:
if [[ $INDEX -eq 0 ]]; then
TABLE="${TABLE}<tr>"
fi
TABLE="${TABLE} <td> <img src=\"https://raw.githubusercontent.com/commaai/ci-artifacts/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
TABLE="${TABLE} <td> <img src=\"https://raw.githubusercontent.com/${{ env.CI_ARTIFACTS_OWNER }}/${{ env.CI_ARTIFACTS_REPO }}/${{ env.BRANCH_NAME }}/${A[$i]}.png\"> </td>"
if [[ $INDEX -eq 1 || $(($i + 1)) -eq ${#A[*]} ]]; then
TABLE="${TABLE}</tr>"
fi
Expand All @@ -149,7 +157,7 @@ jobs:
echo "DIFF=$DIFF$TABLE" >> "$GITHUB_OUTPUT"

- name: Saving proposed ui
if: github.event_name == 'pull_request_target'
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
working-directory: ${{ github.workspace }}/master_ui_raylib
run: |
git config user.name "GitHub Actions Bot"
Expand All @@ -162,7 +170,7 @@ jobs:
git push origin ${{ env.BRANCH_NAME }} --force

- name: Comment Screenshots on PR
if: github.event_name == 'pull_request_target'
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Expand All @@ -171,4 +179,4 @@ jobs:
${{ steps.find_diff.outputs.DIFF }}
comment_tag: run_id_screenshots_raylib
pr_number: ${{ github.event.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67 changes: 15 additions & 52 deletions .github/workflows/selfdrive_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ env:
jobs:
build_release:
name: build release
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
runs-on: ubuntu-24.04
env:
STRIPPED_DIR: /tmp/releasepilot
steps:
Expand Down Expand Up @@ -65,23 +60,17 @@ jobs:
cd $STRIPPED_DIR
${{ env.RUN }} "release/check-dirty.sh"
- name: Check submodules
if: github.repository == 'commaai/openpilot'
timeout-minutes: 3
run: release/check-submodules.sh

build:
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup docker push
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'commaai/openpilot'
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
run: |
echo "PUSH_IMAGE=true" >> "$GITHUB_ENV"
$DOCKER_LOGIN
Expand All @@ -91,7 +80,7 @@ jobs:

build_mac:
name: build macOS
runs-on: ${{ ((github.repository == 'commaai/openpilot') && ((github.event_name != 'pull_request') || (github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))) && 'namespace-profile-macos-8x14' || 'macos-latest' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -105,6 +94,10 @@ jobs:
restore-keys: |
brew-macos-${{ env.CACHE_COMMIT_DATE }}
brew-macos
# - name: Force relink openssl@3
# run: |
# brew unlink openssl@3 || true
# brew link --overwrite openssl@3
- name: Install dependencies
run: ./tools/mac_setup.sh
env:
Expand All @@ -124,12 +117,7 @@ jobs:

static_analysis:
name: static analysis
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
runs-on: ubuntu-24.04
env:
PYTHONWARNINGS: default
steps:
Expand All @@ -143,12 +131,7 @@ jobs:

unit_tests:
name: unit tests
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -170,12 +153,7 @@ jobs:

process_replay:
name: process replay
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -219,12 +197,7 @@ jobs:

simulator_driving:
name: simulator driving
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
runs-on: ubuntu-24.04
if: false # FIXME: Started to timeout recently
steps:
- uses: actions/checkout@v4
Expand All @@ -245,12 +218,7 @@ jobs:
create_ui_report:
# This job name needs to be the same as UI_JOB_NAME in ui_preview.yaml
name: Create UI Report
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
runs-on: ubuntu-24.04
if: false # FIXME: FrameReader is broken on CI runners
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -280,12 +248,7 @@ jobs:

create_raylib_ui_report:
name: Create raylib UI Report
runs-on: ${{
(github.repository == 'commaai/openpilot') &&
((github.event_name != 'pull_request') ||
(github.event.pull_request.head.repo.full_name == 'commaai/openpilot'))
&& fromJSON('["namespace-profile-amd64-8x16", "namespace-experiments:docker.builds.local-cache=separate"]')
|| fromJSON('["ubuntu-24.04"]') }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -294,7 +257,7 @@ jobs:
- name: Build openpilot
run: ${{ env.RUN }} "scons -j$(nproc)"
- name: Create raylib UI Report
run: >
run: |
${{ env.RUN }} "PYTHONWARNINGS=ignore &&
source selfdrive/test/setup_xvfb.sh &&
python3 selfdrive/ui/tests/test_ui/raylib_screenshots.py"
Expand Down
5 changes: 3 additions & 2 deletions selfdrive/ui/layouts/settings/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ def _update_calib_description(self):
cloudlog.exception("invalid LiveTorqueParameters")

desc += "<br><br>"
desc += ("openpilot is continuously calibrating, resetting is rarely required. " +
"Resetting calibration will restart openpilot if the car is powered on.")
desc += "openpilot is continuously calibrating, resetting is rarely required. " + "Resetting calibration will restart openpilot if the car is powered on."

self._reset_calib_btn.set_description(desc)

Expand Down Expand Up @@ -208,7 +207,9 @@ def _on_regulatory(self):

def _on_review_training_guide(self):
if not self._training_guide:

def completed_callback():
gui_app.set_modal_overlay(None)

self._training_guide = TrainingGuide(completed_callback=completed_callback)
gui_app.set_modal_overlay(self._training_guide)
2 changes: 1 addition & 1 deletion selfdrive/ui/layouts/settings/software.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self):

self._onroad_label = ListItem(title="Updates are only downloaded while the car is off.")
self._version_item = text_item("Current Version", ui_state.params.get("UpdaterCurrentDescription") or "")
self._download_btn = button_item("Download", "CHECK", callback=self._on_download_update)
self._download_btn = button_item("DOWNLOAD", "CHECK", callback=self._on_download_update)

# Install button is initially hidden
self._install_btn = button_item("Install Update", "INSTALL", callback=self._on_install_update)
Expand Down
Loading