From 722e92b9b2360b8d5b7a20d3bc331ac4fc523535 Mon Sep 17 00:00:00 2001 From: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com> Date: Sun, 31 May 2026 12:17:10 +0100 Subject: [PATCH] feat(migration/msg): port 3 self-contained msg types (megaport STEP 8 follow-up) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ports 3 src/msg/*.res files that are truly self-contained (no cross-module `open Model` or `XxxModel.foo` qualified-path refs): - OrbitalMsg.affine (8 LoC) — pure sum type - FeedbackMsg.affine (11 LoC) — sum with Result - VideoCoordinationMsg.affine (11 LoC) — sum with Result All 3 pass `affinescript check`. Total: 30 LoC of .res ported. These are the only currently-portable msg files; the other ~119 msg/ files all either `open Model` or use qualified `XxxModel.fooTab` types — both blocked on affinescript#228 (in-tree qualified paths in non-stdlib context). Adjacent to panll#72 (the 11 src/modules/ ports). Same megaport STEP 8 context, different subdirectory. Refs standards#279 (megaport STEP 8), standards#252 (campaign UMBRELLA). --- migration/msg/FeedbackMsg.affine | 23 +++++++++++++++++++++++ migration/msg/OrbitalMsg.affine | 18 ++++++++++++++++++ migration/msg/VideoCoordinationMsg.affine | 22 ++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 migration/msg/FeedbackMsg.affine create mode 100644 migration/msg/OrbitalMsg.affine create mode 100644 migration/msg/VideoCoordinationMsg.affine diff --git a/migration/msg/FeedbackMsg.affine b/migration/msg/FeedbackMsg.affine new file mode 100644 index 0000000..2a41d6c --- /dev/null +++ b/migration/msg/FeedbackMsg.affine @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later +// Copyright (c) 2026 Jonathan D.A. Jewell +// +// FeedbackMsg.affine — Feedback-O-Tron messages (user feedback submission +// lifecycle). +// +// Translation of src/msg/FeedbackMsg.res (11 LoC). Pure sum-type module +// using `Result` from prelude. No cross-module msg/model +// dep. +// +// Refs: standards#279 (megaport STEP 8). + +module FeedbackMsg; + +use prelude::{Result, Ok, Err}; + +type FeedbackMsg = + | OpenFeedback + | SubmitFeedback(String) + | CancelFeedback + | SetReportType(String) + | FeedbackSubmitted + | FeedbackSubmissionResult(Result) diff --git a/migration/msg/OrbitalMsg.affine b/migration/msg/OrbitalMsg.affine new file mode 100644 index 0000000..271d616 --- /dev/null +++ b/migration/msg/OrbitalMsg.affine @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later +// Copyright (c) 2026 Jonathan D.A. Jewell +// +// OrbitalMsg.affine — orbital stability messages (stability, divergence, +// drift aura). +// +// Translation of src/msg/OrbitalMsg.res (8 LoC). Pure sum-type module +// — no cross-module deps, no Tea_/Promise/FFI surface. The cleanest +// possible Mode-A port in panll's src/msg/ tree. +// +// Refs: standards#279 (megaport STEP 8). + +module OrbitalMsg; + +type OrbitalMsg = + | UpdateStability(Float) + | UpdateDivergence(Float) + | SetDriftAura(String) diff --git a/migration/msg/VideoCoordinationMsg.affine b/migration/msg/VideoCoordinationMsg.affine new file mode 100644 index 0000000..16206db --- /dev/null +++ b/migration/msg/VideoCoordinationMsg.affine @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later +// Copyright (c) 2026 Jonathan D.A. Jewell +// +// VideoCoordinationMsg.affine — messages for the VideoCoordination panel +// (Drive-to-Photos batch transfers). +// +// Translation of src/msg/VideoCoordinationMsg.res (11 LoC). Pure sum-type +// module using `Result` from prelude. +// +// Refs: standards#279 (megaport STEP 8). + +module VideoCoordinationMsg; + +use prelude::{Result, Ok, Err}; + +type VideoCoordinationMsg = + | StartTransfer(String, String) + | PauseTransfer(String) + | RefreshStatus + | StatusResult(Result) + | TransferResult(Result) + | ClearError