Commit aea4e55
committed
Don't mistake Xcode's welcome window for a project; bump to 1.3.9
With Xcode showing only its "Welcome to Xcode" screen, Notchy opened a
tab named after that window whose working directory was $HOME.
The AppleScript queries answer correctly there — zero workspace
documents — but both encoded "no projects" and "the script never ran"
as nil, so an authoritative empty answer was read as a failure and sent
detection to the window-title fallback. That fallback sees the welcome
window like any other, and its projects carry no path, which
directoryPath turns into the home directory.
Separate the two with a QueryOutcome enum: .success is honored even when
empty, and only .unavailable — Xcode not scriptable, automation
permission denied — falls back to window titles. The frontmost query
now returns "" explicitly for zero documents rather than relying on the
implicit value of a skipped if, and Xcode not running is reported as a
successful empty result, which it is.
A welcome tab created before this fix is persisted and stays until
closed by hand; it just won't come back.
116 tests in 9 suites pass.1 parent e4c7ad9 commit aea4e55
2 files changed
Lines changed: 40 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
20 | 31 | | |
21 | 32 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 33 | + | |
| 34 | + | |
26 | 35 | | |
| 36 | + | |
| 37 | + | |
27 | 38 | | |
28 | | - | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
33 | | - | |
| 43 | + | |
| 44 | + | |
34 | 45 | | |
| 46 | + | |
| 47 | + | |
35 | 48 | | |
36 | | - | |
37 | 49 | | |
38 | 50 | | |
39 | 51 | | |
| |||
44 | 56 | | |
45 | 57 | | |
46 | 58 | | |
47 | | - | |
48 | | - | |
| 59 | + | |
| 60 | + | |
49 | 61 | | |
50 | 62 | | |
51 | 63 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
58 | 69 | | |
59 | 70 | | |
60 | 71 | | |
61 | | - | |
| 72 | + | |
62 | 73 | | |
63 | 74 | | |
64 | | - | |
| 75 | + | |
65 | 76 | | |
66 | | - | |
67 | | - | |
| 77 | + | |
| 78 | + | |
68 | 79 | | |
69 | 80 | | |
70 | | - | |
71 | | - | |
| 81 | + | |
| 82 | + | |
72 | 83 | | |
73 | 84 | | |
74 | 85 | | |
| |||
82 | 93 | | |
83 | 94 | | |
84 | 95 | | |
85 | | - | |
| 96 | + | |
86 | 97 | | |
87 | 98 | | |
88 | | - | |
| 99 | + | |
89 | 100 | | |
90 | | - | |
| 101 | + | |
91 | 102 | | |
92 | | - | |
| 103 | + | |
93 | 104 | | |
94 | 105 | | |
95 | 106 | | |
| |||
0 commit comments