1{
2 "project": "async-app-result-removal",
3 "description": "Remove Result from AsyncApp return types by moving app-alive checks to executor",
4 "phases": [
5 {
6 "id": 1,
7 "name": "Add Trampoline Check Infrastructure (macOS First)",
8 "status": "not_started",
9 "tasks": [
10 {
11 "id": "1.1",
12 "description": "Add Option<Weak<AppCell>> field to RunnableMeta struct",
13 "file": "crates/gpui/src/executor.rs",
14 "status": "not_started"
15 },
16 {
17 "id": "1.2",
18 "description": "Update trampoline function in Mac dispatcher to check app status before run()",
19 "file": "crates/gpui/src/platform/mac/dispatcher.rs",
20 "status": "not_started"
21 },
22 {
23 "id": "1.3",
24 "description": "Update trampoline function in Test dispatcher to check app status before run()",
25 "file": "crates/gpui/src/platform/test/dispatcher.rs",
26 "status": "not_started"
27 },
28 {
29 "id": "1.4",
30 "description": "Modify ForegroundExecutor::spawn_with_priority to accept optional app weak pointer",
31 "file": "crates/gpui/src/executor.rs",
32 "status": "not_started"
33 },
34 {
35 "id": "1.5",
36 "description": "Update AsyncApp::spawn to pass app weak pointer to executor",
37 "file": "crates/gpui/src/app/async_context.rs",
38 "status": "not_started"
39 },
40 {
41 "id": "1.6",
42 "description": "Write unit test verifying task cancellation when app is dropped",
43 "file": "crates/gpui/src/executor.rs",
44 "status": "not_started"
45 },
46 {
47 "id": "1.7",
48 "description": "Write unit test for nested tasks both cancelling cleanly",
49 "file": "crates/gpui/src/executor.rs",
50 "status": "not_started"
51 },
52 {
53 "id": "1.8",
54 "description": "Create async_cancellation.rs example demonstrating behavior",
55 "file": "crates/gpui/examples/async_cancellation.rs",
56 "status": "not_started"
57 }
58 ]
59 },
60 {
61 "id": 2,
62 "name": "Extend to Other Platforms",
63 "status": "not_started",
64 "tasks": [
65 {
66 "id": "2.1",
67 "description": "Update trampoline function in Linux dispatcher to check app status before run()",
68 "file": "crates/gpui/src/platform/linux/dispatcher.rs",
69 "status": "not_started"
70 },
71 {
72 "id": "2.2",
73 "description": "Update trampoline function in Windows dispatcher to check app status before run()",
74 "file": "crates/gpui/src/platform/windows/dispatcher.rs",
75 "status": "not_started"
76 }
77 ]
78 },
79 {
80 "id": 3,
81 "name": "Update AsyncApp API & Remove AppContext::Result",
82 "status": "not_started",
83 "tasks": [
84 {
85 "id": "3.1",
86 "description": "Rename update() -> Result<R> to try_update() -> Option<R>",
87 "file": "crates/gpui/src/app/async_context.rs",
88 "status": "not_started"
89 },
90 {
91 "id": "3.2",
92 "description": "Add new update() -> R that panics if app is gone",
93 "file": "crates/gpui/src/app/async_context.rs",
94 "status": "not_started"
95 },
96 {
97 "id": "3.3",
98 "description": "Apply try_/non-try pattern to read_entity and update_entity",
99 "file": "crates/gpui/src/app/async_context.rs",
100 "status": "not_started"
101 },
102 {
103 "id": "3.4",
104 "description": "Apply try_/non-try pattern to read_global and update_global",
105 "file": "crates/gpui/src/app/async_context.rs",
106 "status": "not_started"
107 },
108 {
109 "id": "3.5",
110 "description": "Apply try_/non-try pattern to read_window and update_window",
111 "file": "crates/gpui/src/app/async_context.rs",
112 "status": "not_started"
113 },
114 {
115 "id": "3.6",
116 "description": "Apply try_/non-try pattern to new, reserve_entity, insert_entity",
117 "file": "crates/gpui/src/app/async_context.rs",
118 "status": "not_started"
119 },
120 {
121 "id": "3.7",
122 "description": "Apply try_/non-try pattern to refresh, open_window, subscribe, has_global",
123 "file": "crates/gpui/src/app/async_context.rs",
124 "status": "not_started"
125 },
126 {
127 "id": "3.8",
128 "description": "Apply same changes to AsyncWindowContext",
129 "file": "crates/gpui/src/app/async_context.rs",
130 "status": "not_started"
131 },
132 {
133 "id": "3.9",
134 "description": "Remove type Result<T> associated type from AppContext trait",
135 "file": "crates/gpui/src/gpui.rs",
136 "status": "not_started"
137 },
138 {
139 "id": "3.10",
140 "description": "Update all AppContext trait method signatures to return R directly",
141 "file": "crates/gpui/src/gpui.rs",
142 "status": "not_started"
143 },
144 {
145 "id": "3.11",
146 "description": "Remove Flatten trait from gpui.rs",
147 "file": "crates/gpui/src/gpui.rs",
148 "status": "not_started"
149 },
150 {
151 "id": "3.12",
152 "description": "Update WeakEntity::update to remove Flatten bounds",
153 "file": "crates/gpui/src/app/entity_map.rs",
154 "status": "not_started"
155 },
156 {
157 "id": "3.13",
158 "description": "Update WeakEntity::read_with to remove Flatten bounds",
159 "file": "crates/gpui/src/app/entity_map.rs",
160 "status": "not_started"
161 },
162 {
163 "id": "3.14",
164 "description": "Update WeakEntity::update_in to remove Flatten bounds",
165 "file": "crates/gpui/src/app/entity_map.rs",
166 "status": "not_started"
167 },
168 {
169 "id": "3.15",
170 "description": "Update ExampleContext in eval crate to match new AppContext signature",
171 "file": "crates/eval/src/example.rs",
172 "status": "not_started"
173 },
174 {
175 "id": "3.16",
176 "description": "Update AsyncApp documentation",
177 "file": "crates/gpui/src/app/async_context.rs",
178 "status": "not_started"
179 },
180 {
181 "id": "3.17",
182 "description": "Run cargo test -p gpui",
183 "file": null,
184 "status": "not_started"
185 },
186 {
187 "id": "3.18",
188 "description": "Run ./script/clippy",
189 "file": null,
190 "status": "not_started"
191 },
192 {
193 "id": "3.19",
194 "description": "Verify async_cancellation example runs without panics",
195 "file": "crates/gpui/examples/async_cancellation.rs",
196 "status": "not_started"
197 },
198 {
199 "id": "3.20",
200 "description": "Manual test: close windows with pending tasks, verify no panics",
201 "file": null,
202 "status": "not_started"
203 }
204 ]
205 }
206 ],
207 "future_work": {
208 "brief": "async-app-result-removal-migration.md",
209 "description": "Codebase migration to remove error handling from ~500+ callsites",
210 "phases": ["Audit Cross-Boundary Awaits", "Codebase Migration", "Testing and Cleanup"]
211 }
212}