feat(v2): screenView sees someone's Discord screen share in its popped-out window

The share target checks that the person asked about shares their screen in
Jarvis's voice channel, finds Discord's popped-out window (title not ending in
Discord, the voice channel's name first) and, when there is none, asks for it in
the channel and looks again every second for 30 s. Screen actions now wait as
long as PC actions in the worker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-19 13:43:31 +09:00
parent 3af881935c
commit 844958d311
13 changed files with 287 additions and 28 deletions

View File

@@ -68,6 +68,15 @@ def test_a_window_is_found_by_part_of_its_name(app):
assert app.calls[-1] == ("capture", {"target": "window", "window": "크롬", "detail": "normal"})
@pytest.mark.unit
def test_a_discord_screen_share_is_asked_for_with_the_person_named(app):
assert run(target="share", person=" 철수 ").success
assert run(target="share").success
assert app.calls == [("capture", {"target": "share", "person": "철수", "detail": "normal"}),
("capture", {"target": "share", "detail": "normal"})]
assert not run(target="share", person="x" * 201).success and len(app.calls) == 2
@pytest.mark.unit
@pytest.mark.parametrize("args", [{"target": "monitor"}, {"target": "monitor", "monitor": 0},
{"target": "monitor", "monitor": "two"}, {"target": "window"},