Skip to content

Commit 840fb52

Browse files
feat(migration/msg): port 3 self-contained msg types (megaport STEP 8 follow-up) (#74)
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<String,String> - VideoCoordinationMsg.affine (11 LoC) — sum with Result<String,String> 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).
1 parent a427071 commit 840fb52

3 files changed

Lines changed: 63 additions & 0 deletions

File tree

migration/msg/FeedbackMsg.affine

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// SPDX-License-Identifier: AGPL-3.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell
3+
//
4+
// FeedbackMsg.affine — Feedback-O-Tron messages (user feedback submission
5+
// lifecycle).
6+
//
7+
// Translation of src/msg/FeedbackMsg.res (11 LoC). Pure sum-type module
8+
// using `Result<String, String>` from prelude. No cross-module msg/model
9+
// dep.
10+
//
11+
// Refs: standards#279 (megaport STEP 8).
12+
13+
module FeedbackMsg;
14+
15+
use prelude::{Result, Ok, Err};
16+
17+
type FeedbackMsg =
18+
| OpenFeedback
19+
| SubmitFeedback(String)
20+
| CancelFeedback
21+
| SetReportType(String)
22+
| FeedbackSubmitted
23+
| FeedbackSubmissionResult(Result<String, String>)

migration/msg/OrbitalMsg.affine

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// SPDX-License-Identifier: AGPL-3.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell
3+
//
4+
// OrbitalMsg.affine — orbital stability messages (stability, divergence,
5+
// drift aura).
6+
//
7+
// Translation of src/msg/OrbitalMsg.res (8 LoC). Pure sum-type module
8+
// — no cross-module deps, no Tea_/Promise/FFI surface. The cleanest
9+
// possible Mode-A port in panll's src/msg/ tree.
10+
//
11+
// Refs: standards#279 (megaport STEP 8).
12+
13+
module OrbitalMsg;
14+
15+
type OrbitalMsg =
16+
| UpdateStability(Float)
17+
| UpdateDivergence(Float)
18+
| SetDriftAura(String)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// SPDX-License-Identifier: AGPL-3.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell
3+
//
4+
// VideoCoordinationMsg.affine — messages for the VideoCoordination panel
5+
// (Drive-to-Photos batch transfers).
6+
//
7+
// Translation of src/msg/VideoCoordinationMsg.res (11 LoC). Pure sum-type
8+
// module using `Result<String, String>` from prelude.
9+
//
10+
// Refs: standards#279 (megaport STEP 8).
11+
12+
module VideoCoordinationMsg;
13+
14+
use prelude::{Result, Ok, Err};
15+
16+
type VideoCoordinationMsg =
17+
| StartTransfer(String, String)
18+
| PauseTransfer(String)
19+
| RefreshStatus
20+
| StatusResult(Result<String, String>)
21+
| TransferResult(Result<String, String>)
22+
| ClearError

0 commit comments

Comments
 (0)