Commit 9114520
committed
fix(read): avoid search focus for chat_id opens
chat_id lookups already come from the chat list registry, so prefer the visible chat-list row before falling back to KakaoTalk global search. Normalize KakaoTalk windows to a readable minimum size before scanning/opening so chat_id reads do not depend on a tiny or unrelated focused search window, while preserving existing larger windows and restoring the previous window position after automatic resizing.
Add an opt-in read --layout mode for operator-controlled placement. The default preserve mode keeps the current location, while left/right layout uses AX frame control against the current display bounds instead of Mission Control or Split View automation.
Constraint: KakaoTalk search fields can remain focused in unrelated small windows and fail AX focus verification.
Constraint: Automatic resizing must avoid shrinking user-sized windows or moving them to a surprising screen position unless the operator explicitly asks for layout.
Rejected: Only document FOCUS_FAIL recovery | leaves chat_id reads dependent on the same failing search path.
Rejected: Always use global search for chat_id | wastes the stronger identity from the chat list registry and keeps the focus failure mode.
Rejected: Drive Mission Control or Split View | too disruptive and not exposed as a stable public automation surface.
Rejected: Clamp every chat window to a fixed maximum by default | would shrink user-sized windows and create avoidable disruption.
Confidence: medium
Scope-risk: moderate
Tested: swift build; .build/debug/kmsg read --help; git diff --check
Not-tested: live read --chat-id completion; local debug binary previously hung in auth/window bootstrap before returning output. swift test unavailable because the package has no Tests target. Python tests unavailable because pytest is not installed.1 parent bf301b9 commit 9114520
5 files changed
Lines changed: 301 additions & 20 deletions
File tree
- Sources/kmsg
- Accessibility
- Commands
- KakaoTalk
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
153 | 174 | | |
154 | 175 | | |
155 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
25 | 36 | | |
26 | | - | |
| 37 | + | |
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
| |||
46 | 57 | | |
47 | 58 | | |
48 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
49 | 63 | | |
50 | 64 | | |
51 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
52 | 79 | | |
53 | 80 | | |
54 | 81 | | |
| |||
60 | 87 | | |
61 | 88 | | |
62 | 89 | | |
63 | | - | |
| 90 | + | |
| 91 | + | |
64 | 92 | | |
65 | 93 | | |
66 | 94 | | |
67 | 95 | | |
| 96 | + | |
68 | 97 | | |
69 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
70 | 106 | | |
71 | | - | |
| 107 | + | |
72 | 108 | | |
73 | 109 | | |
74 | 110 | | |
| |||
80 | 116 | | |
81 | 117 | | |
82 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
83 | 124 | | |
84 | 125 | | |
85 | 126 | | |
| |||
90 | 131 | | |
91 | 132 | | |
92 | 133 | | |
93 | | - | |
| 134 | + | |
94 | 135 | | |
95 | | - | |
| 136 | + | |
96 | 137 | | |
97 | 138 | | |
98 | 139 | | |
99 | 140 | | |
100 | 141 | | |
101 | 142 | | |
102 | | - | |
| 143 | + | |
103 | 144 | | |
104 | 145 | | |
105 | 146 | | |
| |||
108 | 149 | | |
109 | 150 | | |
110 | 151 | | |
111 | | - | |
| 152 | + | |
112 | 153 | | |
113 | 154 | | |
114 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | 132 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
140 | 136 | | |
141 | 137 | | |
142 | 138 | | |
143 | 139 | | |
144 | 140 | | |
145 | 141 | | |
146 | 142 | | |
147 | | - | |
| 143 | + | |
148 | 144 | | |
149 | 145 | | |
150 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
0 commit comments