Commit 8edf6e8
committed
fix: per-page dialog tracking and per-context focus for parallel agents
Replace singleton dialog handler with per-page Map so parallel agents
can handle dialogs on their own pages independently. Dialog handlers
are attached per-page via #setupPage() when pages are first discovered.
Replace #selectedPage-based defocus with per-context focus tracking
via #focusedPagePerContext Map. This prevents interleaved selectPage()
calls from parallel agents defocusing the wrong page or skipping
defocus entirely.
Both getDialog() and clearDialog() accept an optional page parameter,
defaulting to the selected page for backward compatibility. handle_dialog
now resolves page via pageIdSchema. Entries are cleaned up on page close.1 parent 166c3ab commit 8edf6e8
5 files changed
Lines changed: 293 additions & 21 deletions
File tree
- docs
- src
- tools
- tests/tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
323 | | - | |
| 324 | + | |
324 | 325 | | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
328 | | - | |
| 329 | + | |
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
| |||
307 | 309 | | |
308 | 310 | | |
309 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
310 | 317 | | |
311 | 318 | | |
312 | 319 | | |
| |||
482 | 489 | | |
483 | 490 | | |
484 | 491 | | |
485 | | - | |
486 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
487 | 498 | | |
488 | 499 | | |
489 | | - | |
490 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
491 | 505 | | |
492 | 506 | | |
493 | 507 | | |
| |||
522 | 536 | | |
523 | 537 | | |
524 | 538 | | |
525 | | - | |
526 | | - | |
527 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
528 | 552 | | |
529 | 553 | | |
530 | 554 | | |
531 | 555 | | |
532 | 556 | | |
533 | 557 | | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
538 | 562 | | |
539 | 563 | | |
540 | 564 | | |
| 565 | + | |
541 | 566 | | |
542 | | - | |
543 | 567 | | |
544 | 568 | | |
545 | 569 | | |
| |||
600 | 624 | | |
601 | 625 | | |
602 | 626 | | |
| 627 | + | |
603 | 628 | | |
604 | 629 | | |
605 | 630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
| 112 | + | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
328 | 329 | | |
329 | 330 | | |
330 | 331 | | |
| |||
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
337 | | - | |
| 338 | + | |
| 339 | + | |
338 | 340 | | |
339 | 341 | | |
340 | 342 | | |
| |||
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
365 | | - | |
| 367 | + | |
366 | 368 | | |
367 | 369 | | |
368 | 370 | | |
| |||
0 commit comments