Commit de8c55d
authored
feat(code): enable branch linking for local tasks (#1595)
## Problem
to build a good task wrap-up flow, we need to know which branch belongs to a given task
<!-- Who is this for and what problem does it solve? -->
<!-- Closes #ISSUE_ID -->
## Changes
adds automatic branch linking for local tasks. no UI/UX around this yet, nothing uses this data yet, just storing it
### agent scenarios:
| scenario | current linkedBranch | agent editing on... | result |
| --- | --- | --- | --- |
| agent edits on feature branch | null | feat-a | linkedBranch = feat-a |
| agent edits on same linked branch | feat-a | feat-a | no change |
| agent switches to a new feature branch | feat-a | feaet-b | linkedBranch = feat-b |
| agent edits on default branch | feat-a | main | no change |
| agent edits on default branch, never linked | null | main | no change |
<!-- What did you change and why? -->
<!-- If there are frontend changes, include screenshots. -->
### ui scenarios:
| scenario | result |
| --- | --- |
| "new branch" button | linkedBranch = new branch |
| "create PR" flow creates a branch | linkedBranch = new branch |
| "create PR" flow on existing branch | linkedBranch = new branch |
| branch creation fails | no change |
| PR creation fails | no change |
## How did you test this?
manually
<!-- Describe what you tested -- manual steps, automated tests, or both. -->
<!-- If you're an agent, only list tests you actually ran. -->1 parent d95d46a commit de8c55d
3 files changed
Lines changed: 78 additions & 6 deletions
File tree
- apps/code/src
- main
- services/workspace
- trpc/routers
- renderer/features/git-interaction/hooks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
240 | 247 | | |
241 | 248 | | |
242 | 249 | | |
| |||
310 | 317 | | |
311 | 318 | | |
312 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
313 | 358 | | |
314 | 359 | | |
315 | 360 | | |
316 | 361 | | |
317 | 362 | | |
318 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
319 | 368 | | |
320 | 369 | | |
321 | 370 | | |
322 | 371 | | |
323 | 372 | | |
324 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
325 | 377 | | |
326 | 378 | | |
327 | | - | |
| 379 | + | |
328 | 380 | | |
329 | 381 | | |
330 | 382 | | |
331 | 383 | | |
332 | 384 | | |
333 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
334 | 389 | | |
335 | 390 | | |
336 | 391 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
279 | 290 | | |
280 | 291 | | |
281 | 292 | | |
| |||
529 | 540 | | |
530 | 541 | | |
531 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
532 | 549 | | |
533 | 550 | | |
534 | 551 | | |
| |||
0 commit comments