Repository navigation
Give the iPhone app Requests, History and Macs tabs - #358
Conversation
The iPhone app opens to three tabs in the system TabView, each with its own navigation stack and large title. Requests lists only requests that can still be decided or wait for the Mac, with banners for iCloud and notifications turned off and empty states for no Mac and no request; its badge counts the requests that can still be decided. A notification for the app in front shows as a banner and never opens the request's page; the new row is highlighted instead. History shows its empty state until #349. Macs lists the Macs with a + to pair, this iPhone's iCloud, notification and delivery-check status, the version and the removal notice. Mac detail becomes a grouped list with #342's wording unchanged. Notification authorization is read through the environment at launch, after the welcome's prompt and whenever the scene becomes active. The tab screens are drawn as SwiftUI stacks so the renders use the real views; the render tests draw stand-ins for the system chrome.
Show a notification in front only for a request the notification extension verified, so the delivery check after pairing stays silent. Track arrivals in the model so requests reopened at launch are not highlighted and a request that arrives on another tab stays highlighted until the Requests tab shows it. Leave a card that is still being checked out of the badge, show Notifications as On only when allowed, and hide the capsule when no Mac can send requests. Drop the Remove footer so #342's wording stays only in its confirmation, make Rename a tinted action, read the time left to VoiceOver as a duration, and name the problem in each Open Settings hint. Render every new string.
Show every notification in front as decision 8 specifies again, so a request the extension could not verify still gets its banner. Center the Mac detail's status line and give the not-approving warning orange text. Shorten long requester and Mac names in a Requests row so they cannot push the credential out of its two lines. Say nothing about iCloud on This iPhone before the first account check. Give Open Settings the regular size and the removal notice's dismiss button a 44-point target, draw the tab bar under the Mac detail renders, and render the Requests tab at an accessibility text size.
|
Cross adversarial review of ff95d97: GPT-6 Astra (xhigh) and Opus 5.5 (xhigh), read-only, two rounds each (round 1 independent; round 2 each ruled on the other's report against a frozen checkout). No P0 or P1.
Tried and reverted: showing the foreground banner only for requests the extension verified (Opus round 1, P2). In round 2 both reviewers ruled the issue's banner, list and sound for every notification correct, because the filter would also silence a real request the extension could not verify. Declined:
For the maintainer: the delivery check after pairing now shows its generic banner in front; the capsule says "can't reach" with only notifications off; until #349, a request that ends while its page is closed leaves every screen. Details are under "Questions for the maintainer" in the PR description. After the fixes, |
With only notifications off, requests still arrive and the banner says what is wrong, so the empty state's capsule keeps counting the Macs. The orange form now follows the iCloud banners alone, as the maintainer decided from the renders; the capsule stays hidden without an approving Mac. Render 58 shows the green capsule under the notifications-off banner.
Closes #346
Summary
TabView, each with its own navigation stack and large title: Requests (tray), History (clock.arrow.circlepath) and Macs (laptopcomputer). The welcome and unusable-identity screens stay full screen; pairing stays a sheet; a request's page opens as a sheet over every tab.PairedMacsViewis gone.list.account.*) and for notifications turned off, each with Open Settings. Empty states for no paired Mac (with Pair a Mac) and no requests (with the reachability capsule, orange only while an iCloud banner shows). Pull to refresh and the 10 s / 2 s foreground polls are unchanged.NotificationCenterAccess.authorization()at launch, after the welcome's prompt and whenever the scene becomes active, and faked in tests. The tab screens are drawn as SwiftUI stacks (GroupedSection,ValueRow,BannerRow,EmptyStateView) soImageRendererrenders the real views; buttons use system styles; noActionButtonStyleorNoticeCardon these screens.Diff stat
54 files changed, 2380 insertions(+), 586 deletions(-). New:
Views/RequestsView.swift,Views/MacsView.swift,Views/HistoryView.swift,AskKeyiOSKitTests/HomeTests.swift,AskKeyiOSKitTests/RenderChrome.swift; deleted:Views/PairedMacsView.swift. Most of the added lines are the 33 new catalog entries; no existing string changed.Tests
bash scripts/build-ios.sh teston 83adfc2, and again with it rebased locally onmainafter AskKeyDevices: reserve kind 14 and remove the approver code #357 (1b2ca91), same counts: AskKeyiOSKitTests 180 passed, 0 failed, 0 skipped; AskKeyiOSNotificationServiceTests 44 passed, 0 failed. 110 screens rendered. On c21c0bb, before this PR, the same command gave 163 and 44 with 88 screens: +16HomeTests, render tests −2 (old home) +3 (tabs).HomeTestscovers: the Requests rows and badge as requests are closed by the Mac, denied here (waiting) and time out; a card still being checked left out of the badge; the badge's redraw dates; a request arriving in front (presentation options, no page, no tab change); the arrival highlight (kept across tabs until the Requests tab shows it, dropped with its request, never for requests reopened at launch); a row opening its page with the card; the notification authorization at launch, after the welcome's prompt and on becoming active, and what the Notifications row shows for each state; the capsule's three forms (orange only with an iCloud banner, green count, hidden without an approving Mac); shortened names in a row; the spoken time left; the approving-Mac count; the last delivery check; Touch ID.AGENTS.mdasks.Checks
bash scripts/build-ios.sh build: passed (catalog check included;tab.andhistory.added to its key scan).python3 scripts/check_hygiene.py: passed (size=0, test-support=0, debug=0, local-path=0, non-ascii-name=0, multica=0, cjk=0). Largest touched source files:AppModel.swift467 lines,RequestCardView.swift401,Components.swift346.Renders
askkey-ios-screensartifact of the CI run, in English (-en) and Simplified Chinese (-zh-Hans):44-requests-two-requests(one under a minute, one sent and waiting; badge 1)45-requests-empty46-requests-not-paired47-requests-both-banners48-history-empty49-macs50-macs-removal-notice51-macs-problems(a Mac without the approval flag, a notice the Mac could not get, iCloud signed out, notifications off, no delivery check yet)52-macs-empty53-requests-sending-touch-id(a decision stored but not yet saved; the Touch ID footnote)54-requests-empty-one-mac55-macs-icloud-restricted(notifications never answered read Off),56-macs-icloud-unavailable57-requests-accessibility-size(accessibility text size, a long requester name shortened in the row)58-requests-notifications-off(only the notifications-off banner; the capsule stays green)34-mac-detail-approving,35-mac-detail-without-approval-flag,36-mac-detail-remove-confirmation,37-mac-detail-rename-and-removal-failedImageRenderercannot draw UIKit-backed views, so the renders draw stand-ins for the system chrome around the real content (RenderChrome.swift: large title, +, tab bar with the badge, back button), asActionSheetStandInalready does for the dialog. The stand-in lays the content out the waytabScaffold()does in its scroll view, so the empty states' centering in the renders is the app's. Renders 11–13 and 15 (the old home) are removed.Deviations and questions
list.remove), not "Remove This Mac", because iPhone: retire Approve Requests from This Mac and Stop Approving #342's Remove wording stays word for word and both privacy pages say "choose Remove". iPhone: retire Approve Requests from This Mac and Stop Approving #342 merged no footer string, and a footer quoting part of its confirmation would drop the caveat that the Mac keeps trusting the iPhone until it gets the notice, so the Remove section's footer only says when a removal failed. The confirmation dialog is unchanged.request.row.left %@is not added:request.timeLeft.value %@already says "%@ left" / 还剩 %@ and is reused.request.empty.reachableis two keys,request.empty.reachableOne("1 Mac can reach this iPhone") andrequest.empty.reachable %@, instead of a plural variation, because the catalog check inbuild-ios.shreads only top-level string units and its key scan maps every interpolation to%@, and the Scope allows changing only the prefix list there.history.empty.detail's Chinese says 结束后 instead of 处理后, to match "after they end" (expired and cancelled requests are recorded too).request.row.sending("Sending your decision…", a decision stored but not yet saved by CloudKit),request.list.footnote.touchID,list.iCloud.signedIn/signedOut/restricted/unavailable,list.notifications,list.notifications.stateOn/stateOff,list.lastDeliveryCheck.none,list.version %@,mac.detail.paired,mac.detail.lastReached. Removed as unused:list.title,list.empty,list.deliveries.*,list.pairedOn %@,request.section.title. Every new string is in a render.list.notApprover, orange) for an entry without the approval flag..borderedat the regular size inside each banner rather than.large, with the banner's sentence as its VoiceOver hint. The Macs tab also refreshes on pull, as the old home did.RequestList, the old home's list of full cards inRequestCardView.swift, is deleted as dead code; the request sheet is untouched. The privacy pages are unchanged: the tab names in both languages are the amendment's (Requests / 请求, History / 记录, Macs / Mac) and Remove keeps its name.ApprovalFakes.swift,ApproverTests.swift,OpenedRequestTests.swift,ApprovalRequestTests.swift,LocalizationTests.swiftandAppModel+Approvals.swiftare untouched).Maintainer decisions on this PR (after reviewing the renders):