Skip to content

Commit c3aa978

Browse files
port(src/ui/tea/git_scripts_gui.affine): ReScript surface -> AffineScript (Refs #229) (#9)
Oracle-validated Tier-1 port (affinescript main @ #229 canonical map, 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 correctly left as { } (sigil is expression-literal-only, oracle-confirmed). Verified: `affinescript main check src/ui/tea/git_scripts_gui.affine` -> Type checking passed (was: parse error / DRIFT-SYNTAX pre-port). Self-contained file, no imports. Refs #229 (estate-wide, sequenced, human-gated — not Closes). Co-authored-by: hyperpolymath <hyperpolymath@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c1386ed commit c3aa978

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/ui/tea/git_scripts_gui.affine

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ enum ViewMode {
3131

3232
struct Model {
3333
view_mode: ViewMode,
34-
scripts: List(GitScript),
34+
scripts: [GitScript],
3535
selected_script_index: Int,
3636
is_refreshing: Bool,
3737
history_depth: Int
@@ -51,7 +51,7 @@ enum Msg {
5151
// ── TEA Logic ────────────────────────────────────────────────────────────────
5252

5353
fn git_scripts_init() -> Model {
54-
{
54+
#{
5555
view_mode: ViewMode::ScriptList,
5656
scripts: [],
5757
selected_script_index: -1,
@@ -65,7 +65,7 @@ fn git_scripts_update(@linear msg: Msg, @linear model: Model) -> Model {
6565
{ view_mode: v, scripts: s, selected_script_index: i, is_refreshing: r, history_depth: h } => {
6666
match msg {
6767
Navigate(new_mode) => {
68-
{
68+
#{
6969
view_mode: new_mode,
7070
scripts: s,
7171
selected_script_index: i,
@@ -75,7 +75,7 @@ fn git_scripts_update(@linear msg: Msg, @linear model: Model) -> Model {
7575
}
7676

7777
SelectScript(new_idx) => {
78-
{
78+
#{
7979
view_mode: v,
8080
scripts: s,
8181
selected_script_index: new_idx,
@@ -86,7 +86,7 @@ fn git_scripts_update(@linear msg: Msg, @linear model: Model) -> Model {
8686

8787
RunSelectedScript => {
8888
// Linear update: mark script as running
89-
{
89+
#{
9090
view_mode: v,
9191
scripts: s, // In a full impl, we'd update the specific script status in the list
9292
selected_script_index: i,
@@ -96,7 +96,7 @@ fn git_scripts_update(@linear msg: Msg, @linear model: Model) -> Model {
9696
}
9797

9898
ScriptFinished(idx, status) => {
99-
{
99+
#{
100100
view_mode: v,
101101
scripts: s,
102102
selected_script_index: i,
@@ -106,7 +106,7 @@ fn git_scripts_update(@linear msg: Msg, @linear model: Model) -> Model {
106106
}
107107

108108
RefreshScripts => {
109-
{
109+
#{
110110
view_mode: v,
111111
scripts: s,
112112
selected_script_index: i,
@@ -117,15 +117,15 @@ fn git_scripts_update(@linear msg: Msg, @linear model: Model) -> Model {
117117

118118
PopState => {
119119
if h > 0 {
120-
{
120+
#{
121121
view_mode: ViewMode::ScriptList,
122122
scripts: s,
123123
selected_script_index: -1,
124124
is_refreshing: false,
125125
history_depth: h - 1
126126
}
127127
} else {
128-
{
128+
#{
129129
view_mode: v,
130130
scripts: s,
131131
selected_script_index: i,

0 commit comments

Comments
 (0)