async-app-result-removal-tracker.json

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