Skip to content

Commit fb7ec65

Browse files
port: ReScript surface -> AffineScript (session-management-standards/src/ui/tea/system_update_gui.affine) (Refs #229) (#142)
## ReScript-surface elimination — `session-management-standards/src/ui/tea/system_update_gui.affine` `Refs #229` (estate-wide, sequenced, human-gated — not `Closes`). Per-repo hands-off confirm: granted (single-file TEA GUI, intended AffineScript target, not interop). Tier-1 port per the language-grounded canonical map (`affinescript/docs/RESCRIPT-ELIMINATION.adoc`): - `List(T)` → `[T]` — 1 occurrence - expression-position record literals `{ … }` → `#{ … }` (the record sigil, `spec.md:414-421`). Match record-**patterns** and `struct`/`enum`/`type` decl bodies left as `{ }` — the sigil is expression-literal-only (oracle-confirmed: `#{` pattern parse-errors). - ReScript string `+` → AffineScript `++` where present (concat is `++`; `+` is numeric — was a `String/Int` unify error beneath the parse wall; numeric `+`/`-` untouched). A layered RS-ism the text-scanner could not see (oracle-peeled — exactly the RESCRIPT-ELIMINATION.adoc lower-bound-triage warning). **Verified:** `affinescript main check session-management-standards/src/ui/tea/system_update_gui.affine` → **Type checking passed** (pre-port: parse error / DRIFT-SYNTAX). Self-contained, no imports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: hyperpolymath <hyperpolymath@users.noreply.github.com>
1 parent 4620037 commit fb7ec65

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

session-management-standards/src/ui/tea/system_update_gui.affine

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct UpdateStep {
3737

3838
struct Model {
3939
current_stage: UpdateStage,
40-
steps: List(UpdateStep),
40+
steps: [UpdateStep],
4141
is_running: Bool,
4242
log_output: String,
4343
history_depth: Int
@@ -56,7 +56,7 @@ enum Msg {
5656
// ── TEA Logic ────────────────────────────────────────────────────────────────
5757

5858
fn system_update_init() -> Model {
59-
{
59+
#{
6060
current_stage: UpdateStage::RpmOstree,
6161
steps: [],
6262
is_running: false,
@@ -70,7 +70,7 @@ fn system_update_update(@linear msg: Msg, @linear model: Model) -> Model {
7070
{ current_stage: cs, steps: s, is_running: ir, log_output: lo, history_depth: h } => {
7171
match msg {
7272
StartUpdate => {
73-
{
73+
#{
7474
current_stage: UpdateStage::RpmOstree,
7575
steps: s,
7676
is_running: true,
@@ -80,7 +80,7 @@ fn system_update_update(@linear msg: Msg, @linear model: Model) -> Model {
8080
}
8181

8282
StageStarted(stage) => {
83-
{
83+
#{
8484
current_stage: stage,
8585
steps: s,
8686
is_running: true,
@@ -90,7 +90,7 @@ fn system_update_update(@linear msg: Msg, @linear model: Model) -> Model {
9090
}
9191

9292
StageFinished(stage, status, elapsed) => {
93-
{
93+
#{
9494
current_stage: stage, // Next stage logic would be here
9595
steps: s,
9696
is_running: true,
@@ -100,26 +100,26 @@ fn system_update_update(@linear msg: Msg, @linear model: Model) -> Model {
100100
}
101101

102102
UpdateLog(new_line) => {
103-
{
103+
#{
104104
current_stage: cs,
105105
steps: s,
106106
is_running: ir,
107-
log_output: lo + "\n" + new_line,
107+
log_output: lo ++ "\n" ++ new_line,
108108
history_depth: h
109109
}
110110
}
111111

112112
PopState => {
113113
if h > 0 {
114-
{
114+
#{
115115
current_stage: UpdateStage::RpmOstree,
116116
steps: s,
117117
is_running: false,
118118
log_output: "",
119119
history_depth: h - 1
120120
}
121121
} else {
122-
{
122+
#{
123123
current_stage: cs,
124124
steps: s,
125125
is_running: ir,

0 commit comments

Comments
 (0)