Skip to content

feat(openplc-editor): add OpenPLC Editor, an IEC 61131-3 IDE (com.autonomylogic.openplceditor) - #836

Merged
jing2uo merged 2 commits into
flatpark:mainfrom
rhgKc2yp:add/com.autonomylogic.openplceditor
Oct 25, 2026
Merged

jing2uo merged 2 commits into
flatpark:mainfrom
rhgKc2yp:add/com.autonomylogic.openplceditor

Conversation

@rhgKc2yp

@rhgKc2yp rhgKc2yp commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What

Add OpenPLC Editor (com.autonomylogic.openplceditor), an IDE for creating IEC 61131-3 programs for OpenPLC. This community package uses upstream's application identifier and official Linux release.

Packaging

  • Pin the official v4.3.2 x86_64 AppImage as extra-data, verified by SHA-256 and size. The vendor's AppDir stays unmodified.
  • Use org.freedesktop.Platform 26.08 and org.electronjs.Electron2.BaseApp 26.08. Launch through zypak, clear ELECTRON_RUN_AS_NODE, and select the display backend automatically.
  • Pin the existing appimage-tools-v2 extractor as separate extra-data for offline installation. Discover the executable from AppRun rather than hardcoding its name.
  • Ship the upstream icon with a package-provided desktop entry and AppStream metadata, installed at build time. Use the measured StartupWMClass=open-plc-editor.
  • Follow stable upstream releases with an exact x86_64 asset-name match. This submission supports x86_64 only.

Sandbox

  • Network: PLC connections and app-managed board/package downloads through the bundled Arduino CLI.
  • Documents: project directories, related source files and build output.
  • IPC, Wayland/fallback X11 and DRI: Chromium display and GPU rendering.

Settings, history and downloaded Arduino tools live in the app's redirected data/cache directories. Optional serial/USB device access and read access to an existing Arduino sketchbook are documented in the metainfo:

flatpak override --user --device=all com.autonomylogic.openplceditor
flatpak override --user --filesystem=~/Arduino:ro com.autonomylogic.openplceditor
# Undo these overrides:
flatpak override --user --reset com.autonomylogic.openplceditor

Tested

Tests used the package installed from a signed local repository, with a fresh test profile and no global Flatpak override:

Check Result
Descriptor and packaging checks All registry descriptors parsed and audited successfully; approval flags matched their evidence records. AppStream validation and whitespace checks passed.
Repository tests All 25 existing shell test scripts passed.
PR links check-links-pr.sh origin/main HEAD passed: all seven links, including pinned downloads and their sizes, were valid.
System-style unpack check-apply-extra.sh com.autonomylogic.openplceditor passed against the real pinned downloads, offline, as root with no capabilities.
Build and installation FLATPARK_VERIFY_KEEP=1 ./scripts/publish.sh --verify com.autonomylogic.openplceditor passed, including site generation and installation from the signed local remote. The final desktop metadata was verified in the installed build.
Starts and draws Inspected the GUI on a private X11 display. The project tree, variable table and Structured Text editor rendered correctly. Resized the window explicitly because the test display had no window manager.
Project workflow and persistence Created a Structured Text counter project through the bundled CLI, which uses the GUI's project service. Opened it from the GUI's recent-project list, changed the limit from 100 to 50 in Monaco, saved with Ctrl+S and checked the on-disk source. Killed and restarted the app; the history, edited code and variable table persisted.
Runtime v4 build and upload Generated the upload bundle, then used the packaged CLI to create the first test account, authenticate over HTTPS, upload and compile the program in the official OpenPLC Runtime v4.3.1 image under Podman, and start the PLC.
Simulator build and execution The bundled Arduino CLI installed AVR core 1.8.8 and its compiler/libraries in app data. Built a two-variable program, ran it through the GUI in the in-process simulator and attached its debugger. The counter advanced from 1,830 to 1,893; the GUI stop control ended the simulator/debug session.
GUI runtime connection and debugging Selected Runtime v4 and logged into 127.0.0.1 through the GUI. Verified PLC: RUNNING, attached the GUI debugger, and observed the live counter advance from 14,984 to 15,104.
CLI runtime debugging Within one Flatpak sandbox, all ten debug-script operations passed: status, variable enumeration/reads, force/unforce and watch setup. Collected 66 samples; separate stop/start and session-close operations also passed. See the invocation limitation below.
Runtime outage and restart Stopped the Podman container; the GUI reported connection loss and stale values. Restarted the same container, verified its account/program persisted and logged in again. GUI controls reached PLC: STOPPED and then PLC: RUNNING.
Window class and second launch Measured the main-window class and matched the desktop entry. A second GUI launch exited successfully. No denied bus-name ownership requests were observed; filtered session/power-service availability probes were recorded.
Home-directory changes Home and desktop-entry/autostart snapshots were unchanged. App settings and tool downloads stayed in the per-app directories.

Additional integration testing on 2026-10-24 used the official ghcr.io/autonomy-logic/openplc-runtime:latest image, reporting v4.3.1. Podman exposed HTTPS only on 127.0.0.1:8443 and used a disposable volume. These are software/container tests; physical I/O and real-time hardware behavior were not exercised.

Known limits and remaining coverage

  • CLI debug sessions across separate Flatpak invocations: debug open succeeded, but a later independent flatpak run ... --cli debug ... reported session_not_found. The full debug batch passed when its commands ran inside one flatpak run --command=sh sandbox. Persistent CLI sessions across independent invocations are not claimed to work.
  • Native Wayland visual test did not pass: the editor loaded its interface in private Weston 16 headless/nested tests, but the compositor capture showed no editor window and browser screenshots stalled. X11 rendering and interaction passed. Native Wayland still needs confirmation on another compositor; this is not recorded as a pass.
  • Not tested: physical PLC/serial/USB hardware, cloud sign-in/sync, and ARM64. ARM64 is outside this submission's supported architectures.

Test installations, profiles, project files, private displays, and the disposable Podman runtime/image/volume were removed after testing.

Flathub and eligibility

On 2026-10-22, the full Flathub x86_64 AppStream catalog had no OpenPLC match by name or upstream repository URL. Searches of upstream's issues for Flatpak/Flathub and Flathub's submission tracker found no earlier request or submission. The release-tag README and workflows advertise no Flatpak repository or pending submission.

Upstream provides official Linux AppImages under GPL-3.0. Project creation, editing, saving, Runtime v4 upload/live debugging and simulator execution were tested inside the sandbox without a host toolchain.

Prepared with Codex.

Thanks.

rhgKc2yp and others added 2 commits October 24, 2026 18:51
Upstream's github-background.png is a branding banner, not a picture of
the app, and upstream publishes no editor screenshot to use instead.
@jing2uo

jing2uo commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Thanks @rhgKc2yp, this is a careful submission. Provenance and the artifact check out.

Fixed on your branch

I took care of the two small items myself so this doesn't need another round:

  • 817a3d4 drops the screenshot entry. github-background.png is a logo banner, not a picture of the app, and upstream publishes no editor screenshot, so the listing goes without one, like several others in the catalog.
  • Reworded the PR description: the package ships its own desktop entry and metainfo rather than exporting upstream's.

Wayland: verified

Your headless Weston run didn't show the window, so I tested on a real session. I built this branch (check-apply-extra.sh OK, then publish.sh --verify installing from a local signed repo) and launched it on Hyprland. It runs natively on Wayland (hyprctl clients: xwayland: false), the main window and project view draw correctly, and the window class open-plc-editor matches StartupWMClass. Home, autostart and application-directory listings were unchanged. No change needed here; the headless failure was an artifact of that test setup.

Review table

# Check Verdict Evidence
0 Static only ✅ Nothing executed. The AppImage was read with 7zz at the SquashFS offset (188392); the stub was never run.
1.1/1.2 Scope ✅ New app dir only. No high-scrutiny paths.
2.1 Submitter ⚠️ Account created 2026-10-22, three FlatPark PRs
2.2 Source repo ✅ Autonomy-Logic/openplc-editor, the official vendor
2.6 Tier 1 GPL-3.0
3.1 Sources ✅ AppImage and appimage-tools-v2 are both extra-data with sha256 and size.
3.1b /app ✅ install of local files only
3.2 finish-args ✅ ipc, wayland, fallback-x11, dri, network, xdg-documents. --device=all and ~/Arduino:ro are documented as opt-in in the metainfo.
3.4 build/apply_extra ✅ Offline appimage-offset + unsquashfs. Launcher name read from AppRun (BIN="$APPDIR/open-plc-editor"). Vendor tree unchanged.
3.6 app-id ✅ Vendor domain autonomylogic.com
3.7/4.2 Resolver ✅ GitHub releases/latest, exact asset name OpenPLC.Editor-<v>.AppImage (excludes ARM64), JSON out
3.10 Testing record ✅ Thorough. Wayland and hardware gaps stated honestly.
4.1 Runtime fetch ✅ The bundled arduino-cli downloads board cores and toolchains into app data from Arduino's index. That is the app's own feature, not patched.
5.1 sha256 ✅ 2f964c33…5b99 == pin == GitHub's digest for the asset
5.2 Inspection ✅ 600 entries. No setuid, traversal or escaping symlinks. AppRun is the stock electron-builder script.
5.4 Official ✅ Downloaded from the vendor's GitHub release
5.5 Bundled runtimes ✅ Electron 35.0.0: open-plc-editor, libffmpeg.so, chrome_crashpad_handler, chrome-sandbox, libEGL, libGLESv2 and libvk_swiftshader are byte-identical to the official electron-v35.0.0-linux-x64.zip. resources/bin/arduino-cli is byte-identical to official arduino-cli 1.4.1. (Note: Electron 35 is past end of life. That's upstream's to update.)
5.6 IOC ✅ No persistence paths, miner/reverse-shell strings, or non-$ORIGIN RPATH across 24 ELF files and app.asar
6.1 Purpose ✅ PLC IDE
7.1 Verdict PASS Wayland verified by maintainer; two small fixes pushed (above)

read-descriptor and audit-descriptor pass locally. CI hasn't run yet; it needs workflow approval.

@jing2uo
jing2uo merged commit c38644e into flatpark:main Oct 25, 2026
jing2uo added a commit that referenced this pull request Oct 25, 2026
…frozen PR base (#840)

pull_request.base.sha stays at the main tip of the PR's last push, while
checkout builds refs/pull/N/merge onto the current main. Once main moves
(a pin refresh, another app), base.sha..HEAD pulls in every app main
touched since: #836 added one app but built and apply_extra-checked 19,
because #837 had refreshed 18 pins in between. HEAD^1 is the main tip
this run actually merged onto, so the diff is exactly the PR's effect.

Applies to build-changed, the automation tripwire and the dead-link check.
@rhgKc2yp
rhgKc2yp deleted the add/com.autonomylogic.openplceditor branch October 25, 2026 15:22
@rhgKc2yp

Copy link
Copy Markdown
Contributor Author

Thanks a lot, @jing2uo . I will add some further information regarding the use of containers to run the runtime to metainfo.xml shortly.

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.

2 participants