fix(read): avoid search focus for chat_id opens#15
Merged
Conversation
fcca4cf to
9114520
Compare
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. Expose the same read controls through kmsg_read so Hermes MCP agents can use stable chat_id reads and inherit KMSG_DEFAULT_READ_LAYOUT for operator-safe placement. 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. Constraint: Hermes uses the kmsg MCP server, so CLI-only read options are not enough for agent runs. 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; swift build -c release; .build/release/kmsg --version; .build/release/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.
9114520 to
30e7298
Compare
Owner
|
I plan to refactor the whole codebase and resolve major feature issues. I will proceed with debugging and testing right after. Thanks for your contribution! 👍🏻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kmsg read --chat-id <chat-id>support using the existing chat registryVerification
swift build.build/debug/kmsg read --helpgit diff --checkGaps
swift testreports no Swift tests are defined.python3 -m pytest testscould not run becausepytestis not installed in the local Python environment.read --chat-idsmoke did not complete locally because the debug binary hung before returning output during auth/window bootstrap, so this PR is build/help verified rather than live-transcript verified.