Skip to content

feat: show progress while hanging up and close the HUD afterwards - #4

Merged
macx merged 6 commits into
mainfrom
feat/hang-up-progress
Oct 23, 2026
Merged

macx merged 6 commits into
mainfrom
feat/hang-up-progress

Conversation

@macx

@macx macx commented Oct 23, 2026

Copy link
Copy Markdown
Owner

What and why

Hanging up felt unresponsive and then confusing: the phone confirms the hang-up after one or two seconds, during which End Call showed nothing, and afterwards the HUD switched to an "ended"/"cancelled" state with a Close button.

  • Progress: after End Call, the button shows a spinner and "Ending…" ("Wird beendet …") and is disabled until the phone ends the call. If the command fails (notice as before) or the phone has not ended the call within 10 s, the button is usable again.
  • No second state: a call hung up or cancelled on this Mac closes the HUD as soon as the phone confirms. Calls ended by the other side, busy/unanswered, failed or with a lost link still show the ended state with the reason, since the user did not cause them.

How it was tested

  • scripts/verify.sh --quick passes (build, lint, localization, unit tests, security checks)
  • New or changed behaviour has a test (EndedCallPresentationTests; UI scenario tests for hang-up and cancel now expect the HUD to close without an ended state; compiled, not run here)
  • UI changes: one new string (en/de); the maintainer should run scripts/verify.sh (UI tests) and check the spinner in light/dark and German
  • Bluetooth changes: none in the protocol; needs hardware test: hang up a real call and check spinner, then the HUD closing

Checklist

  • Every new user-facing string is in App/Resources/Localizable.xcstrings with a German translation and a translator comment
  • No real phone numbers, names, Bluetooth addresses or secrets in code, tests, logs or screenshots
  • No network access, no new third-party runtime dependency
  • Signing, entitlements, release scripts and workflows are unchanged

Overlaps with #2 (End Call button) and #3 (call window components); whichever merges later needs a small rebase.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 23, 2026 10:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Asynchronous hang-up rejection leaves End Call disabled until the timeout instead of allowing an immediate retry.

1 open issue
What changed in this PR

This PR improves Pickup’s hang-up feedback by showing progress while awaiting phone confirmation and closing the call HUD after a locally ended call.

Changes:

  • Adds a disabled “Ending…” button with a spinner and a 10-second retry timeout.
  • Hides the ended-call HUD for local hang-ups and cancellations while preserving explanations for other outcomes.
  • Adds English/German text and updates presentation and UI tests.
File Description
App/​Tests/​PickupUITests/​Cases/​CallScenarioUITests.swift Expects local hang-up and cancellation to close the HUD.
App/​Tests/​PickupAppTests/​StatusItemClickTests.swift Listed as review context; no diff supplied.
App/​Tests/​PickupAppTests/​EndedCallPresentationTests.swift Tests which call endings retain the HUD.
App/​Sources/​Pickup/​CallUIModels.swift Adds ending progress state and ended-call presentation logic.
App/​Sources/​Pickup/​CallHUDView.swift Displays and disables the progress button.
App/​Sources/​Pickup/​AppModel.swift Tracks hang-up progress and controls HUD dismissal.
App/​Resources/​Localizable.xcstrings Adds translated progress text and translator guidance.

Review effort: Balanced

Comment thread App/Sources/Pickup/AppModel.swift Outdated
@macx
macx force-pushed the feat/hang-up-progress branch from 17e8331 to 00d7b03 Compare October 23, 2026 10:35
macx and others added 4 commits October 23, 2026 12:46
The phone confirms a hang-up after one or two seconds; until then the End Call button showed nothing, and afterwards the HUD switched to an ended state with Close. Now the button shows a spinner and "Ending…" and is disabled until the phone confirms (re-enabled if the command fails or nothing happens within 10 s), and a call hung up or cancelled on this Mac closes the HUD right away. Calls ended by the other side, busy, failed or lost still show the ended state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A rejection arrives asynchronously through CallEngine.lastCommandFailure, not through the catch, so the button stayed disabled until the 10 s timeout. The pending state is now cleared on an endCall failure, and each attempt's timeout only clears its own attempt, never a retry (HangUpProgress, with regression tests). Addresses the review comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@macx
macx force-pushed the feat/hang-up-progress branch from 00d7b03 to 12642fa Compare October 23, 2026 10:47
macx and others added 2 commits October 23, 2026 12:51
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Accepting in the banner makes it key; when it closes, the HUD becomes key with End Call focused, so Return can end the call (kept on purpose, like a call placed from Pickup). The test now expects that. Return/Esc are no longer simulated: key events posted to the process do not reach the non-activating panel while Pickup is inactive (real key presses do).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@macx
macx merged commit 780e8a6 into main Oct 23, 2026
9 checks passed
@macx
macx deleted the feat/hang-up-progress branch October 23, 2026 11:01
@macx macx mentioned this pull request Oct 23, 2026
4 tasks done
macx added a commit that referenced this pull request Oct 23, 2026
Release **v0.2.0**, prepared by the prepare-release workflow from main
at `cd9119c`.


### Features

* focus the call panel from the menu bar; Return ends a focused call
([#2](#2))
([61068ee](61068ee))
* larger text and higher contrast in the call windows
([#3](#3))
([701dd2c](701dd2c))
* show progress while hanging up and close the HUD afterwards
([#4](#4))
([780e8a6](780e8a6))

### Before merging (squash merge, keep the title)
- [x] CI is green on this pull request
- [x] Local gate with UI tests on this branch: `scripts/verify.sh`
- [x] Hardware smoke test with the phone if Bluetooth code changed
- [x] No other pull request was merged into main since this one was
prepared (otherwise re-run prepare-release)

Merging starts release.yml: tag v0.2.0, build, GitHub Release
(pre-release).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants