Gate dial/call buttons on call-link readiness#179
Open
quad341 wants to merge 3 commits into
Open
Conversation
…rrent main (tincan-k5q7c) Deploy gate for the originally reviewed commit (d7b2fe6, tincan-wcqn2) failed: its merge-base was 27 commits behind origin/main and collided with main's independently-added group-conversation plumbing plus an unrelated ANCS constants change that had already shipped separately. Reconciles by hand onto current origin/main instead of rebasing the stale branch: - call_link_ready gate re-applied inside _sync_call_state / _apply_capabilities in their current shape, preserving _current_is_group / set_group_mode untouched. - Drops the stale ANCS_EXT_ADV_BUG/ANCS_EXPERIMENTAL_REQUIRED commit, which main already carries independently under different values. - Adds the setAccessibleDescription pairing on ThreadHeader's call button (main.py's dial button already had it). - Fixes a comment that mischaracterized call_link_ready as SCO/audio link state; it actually reflects CallController's VoiceCallManager modem binding (noted non-blocking in review). - Updates test_dial_button_enabled_when_call_setup_ready's arrange step to also hold call_link_ready=True, matching the new second gating precondition (call_link_ready defaults False). New-logic coverage remains deferred to tincan-piiml per the original review. Full suite: 2463 passed, 1 skipped. ruff clean on changed files. 🤖 Generated with Claude Code Co-Authored-By: Claude Sonnet 5 <[email protected]>
…n-piiml) Covers all 5 acceptance criteria: disabled state + tooltip/a11y copy when call_link_ready is False, default-False when the key is absent (opposite direction from call_setup_ready), _on_daemon_disconnected reset, and precedence (call_setup_ready=False wins over call_link_ready=False). Written against the already-merged tincan-uuia9 implementation per the build-gated ordering documented in docs/plans/tincan-bhij3-wire-call-link-ready.md. 15/15 pass; mutation-tested by temporarily flipping the call_link_ready default to confirm the AC2 tests fail under that regression. Co-Authored-By: Claude Sonnet 5 <[email protected]>
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
The title-bar dial button and the per-conversation call button (thread header) now also gate on whether the phone's call link is actually ready to place a call, not just whether call setup succeeded. Previously, there was a brief window after call setup completed but before the underlying voice-call manager had actually bound where both buttons would appear enabled — tapping dial in that window risked a silent
RuntimeErrorrather than a clean failure. Now there's a third disabled state: while the link isn't ready, both buttons show "Call link not ready — make sure your iPhone is nearby with Bluetooth on." with a matching accessible description, using the same disabled visual style already used for the other gated states.Why built this way
The new flag defaults to
False(conservative) rather than assumed-ready — the opposite default direction from the existingcall_setup_readyflag, because a false positive here risks a silentdial()crash rather than just an unnecessary banner. Precedence matters: ifcall_setup_readyis false, that state still wins over the new link-not-ready state, since it reflects a more fundamentally broken condition.Review notes
_sync_call_stategating logic in bothtincan_gui/main.py(title-bar button) andtincan_gui/thread_view.py(ThreadHeader.set_call_button) — reuses the existing disabled style and tooltip pattern, no new visual language.setAccessibleDescriptionis now paired with the existing tooltip, matching the precedent already used elsewhere (IncomingCallDialog.disable_answer).GetStatus()is transiently unavailable, so the conservative default applies during exactly the window where the live state can't be verified either way.Test plan
pytest(headless) — 2478 passed, 1 skipped (pre-existing, unrelated to this change), 0 failedruff checkclean on all changed filesrelease-gates/call-link-ready-k5q7c-gate.mdBead: tincan-k5q7c