| 1 | # Mac power use |
| 2 | |
| 3 | Branch `native/mac-power`, based on `602b91fe`. No server change, merge or |
| 4 | release. Slice 7's priority review fixes were completed first at `f9e00ea6` |
| 5 | with passing Linux CI. |
| 6 | |
| 7 | ## Behaviour |
| 8 | |
| 9 | Command-K searches the current task window, Needs you tasks, active projects |
| 10 | and the four sidebar destinations. Matching folds case and diacritics and |
| 11 | supports subsequences; duplicate task entries use the latest revision. Search |
| 12 | is local and bounded by the existing task-list window, not a remote full-history |
| 13 | search. The selected task's actions reuse `TaskDetailModel`, the task page's |
| 14 | rules, confirmations, revision bindings, errors and allowlisted web opener. |
| 15 | Merge and Cancel only open confirmations. Retry has no shortcut. |
| 16 | |
| 17 | Go provides Command-1 through Command-4, Command-R and Command-[ / Command-]. |
| 18 | File provides Command-N, which opens and focuses Conversation, including when |
| 19 | only a task window is open or all app windows have been closed. Command-Return |
| 20 | sends in the composer; Shift-Return and marked text do not send. In the palette, |
| 21 | Return opens the selection and Command-Return opens a selected task window. |
| 22 | Command-Shift-M opens the existing merge confirmation. |
| 23 | |
| 24 | Each window publishes its own workspace with `focusedSceneValue`. The task |
| 25 | WindowGroup identity contains a local session UUID and origin, never a token. |
| 26 | It cannot follow an account switch or restore an old session. Task windows |
| 27 | observe the event cursor and re-read detail; cancellation, moving, a changed |
| 28 | repository, or verified 401/403/404 closes the window. Network errors preserve |
| 29 | it with the existing read error. Selecting another task's action in a standalone |
| 30 | window routes to the main window and retains the original window's identity. |
| 31 | The queued action carries its context, and a fresh read precedes presentation; |
| 32 | a navigation change discards that intent. |
| 33 | |
| 34 | ## Copy and accessibility |
| 35 | |
| 36 | The ten `native.mac.*` keys use Luna's approved values and `Luna, 2026-11-27` |
| 37 | comments. All 334 reused web strings remain byte-identical. Existing task action |
| 38 | labels keep reviewed sentence case in menus, as ruled; menu-specific title case |
| 39 | is a follow-up for Luna. No copy question remains. |
| 40 | |
| 41 | The palette uses native text fields and buttons, exposes selection traits and |
| 42 | labels, and announces the selected result/action when VoiceOver is enabled. |
| 43 | Arrow keys, Return, Command-Return and Escape are handled. Actual keyboard |
| 44 | fixture checks covered Command-K and Down/Return reaching Merge confirmation; |
| 45 | model tests pin the no-write-before-confirmation rule. Spoken VoiceOver output |
| 46 | was not verified by a human in this run. |
| 47 | |
| 48 | ## Validation and mutations |
| 49 | |
| 50 | Machine load, swap and other heavy jobs were checked before every build, |
| 51 | filtered test invocation and fixture launch. One own heavy job at a time, |
| 52 | `--jobs 4`, with timeouts. No simulator was booted. The full native/CI gate script |
| 53 | was deliberately not run locally under the controller's latest machine rules. |
| 54 | |
| 55 | - Test-first: `swift test --package-path native/apple --jobs 4 --filter MacPowerTests` |
| 56 | failed on missing model types. Later search and routing regressions were |
| 57 | added before their implementation. |
| 58 | - `swift test --package-path native/apple --jobs 4 --filter |
| 59 | 'MacPowerTests|MacWorkspaceTests|TaskDetailModelTests'`: 34 tests passed. |
| 60 | - `swift build --package-path native/apple --jobs 4 --product EquipoMac`: passed. |
| 61 | - `python3 native/scripts/check-strings.py`, `check-parity.py`, |
| 62 | `check-oficina-id.py` and `check-sign-in-lifetime.py`: passed. |
| 63 | - Post-commit `python3 scripts/runner-dead-references.py`: recorded with the |
| 64 | pushed head's CI evidence. |
| 65 | |
| 66 | Each mutation below was applied alone, its named filtered suite was run with |
| 67 | `swift test --package-path native/apple --jobs 4 --filter <suite>`, and the |
| 68 | source was restored. Every final run failed on test expectations, not a compiler |
| 69 | error. The Merge confirmation mutant initially survived because the snapshot |
| 70 | merge preserved an existing merge card. The test now closes that card at a |
| 71 | new revision and asserts the task-action path as well as the separate card path. |
| 72 | |
| 73 | | Mutation | Suite | Result | |
| 74 | | --- | --- | --- | |
| 75 | | `search-revision` | `MacPowerTests` | killed | |
| 76 | | `known-original-repo` | `MacPowerTests` | killed | |
| 77 | | `palette-action-guard` | `MacWorkspaceTests` | killed | |
| 78 | | `palette-other-window` | `MacWorkspaceTests` | killed | |
| 79 | | `routed-action-selection` | `MacWorkspaceTests` | killed | |
| 80 | | `fresh-search` | `MacPowerTests` | killed | |
| 81 | | `archived-project` | `MacPowerTests` | killed | |
| 82 | | `window-origin` | `MacWorkspaceTests` | killed | |
| 83 | | `busy` | `MacPowerTests` | killed | |
| 84 | | `refused` | `MacPowerTests` | killed | |
| 85 | | `active-session` | `MacPowerTests` | killed | |
| 86 | | `fresh-revision` | `MacPowerTests` | killed | |
| 87 | | `read-failure` | `MacPowerTests` | killed | |
| 88 | | `merge-offer` | `MacPowerTests` | killed | |
| 89 | | `retry-guard` | `MacPowerTests` | killed | |
| 90 | | `move-guard` | `MacPowerTests` | killed | |
| 91 | | `cancel-guard` | `MacPowerTests` | killed | |
| 92 | | `perform-guard` | `MacPowerTests` | killed | |
| 93 | | `merge-confirmation` | `MacPowerTests` | killed | |
| 94 | | `cancel-confirmation` | `MacPowerTests` | killed | |
| 95 | | `merge-card` | `MacPowerTests` | killed | |
| 96 | | `refusal-classification` | `MacPowerTests` | killed | |
| 97 | | `cancelled-window` | `MacPowerTests` | killed | |
| 98 | | `moving-window` | `MacPowerTests` | killed | |
| 99 | | `moved-window` | `MacPowerTests` | killed | |
| 100 | | `invisible-window` | `MacPowerTests` | killed | |
| 101 | | `window-account` | `MacWorkspaceTests` | killed | |
| 102 | | `window-lifetime` | `MacWorkspaceTests` | killed | |
| 103 | | `history-forward` | `MacPowerTests` | killed | |
| 104 | | `deduplicate` | `MacPowerTests` | killed | |
| 105 | | `brief-search` | `MacPowerTests` | killed | |
| 106 | | `branch-search` | `MacPowerTests` | killed | |
| 107 | |
| 108 | The mutation driver, individual logs and results JSON are retained beside the |
| 109 | screenshots in `site/build/slice9/validation/`. |
| 110 | |
| 111 | ## Mac evidence |
| 112 | |
| 113 | `site/build/slice9/mac-palette.png` and `mac-task-window.png` are in-app NSView |
| 114 | snapshots from the actual offline Mac build and WindowGroup. Screen capture |
| 115 | permission was unavailable, so these capture content, not WindowServer chrome. |
| 116 | The fixture's current-candidate Review step now agrees with its Approved facts. |
| 117 | The standalone-window shortcut check selected a retry task in main and a merge |
| 118 | task in its own window; Command-Shift-M opened the latter's confirmation. |
| 119 | |
| 120 | The initial synthetic shortcut harness skipped NSMenu's normal opening |
| 121 | lifecycle, leaving SwiftUI's cached menu validation and focused values stale. |
| 122 | Running the menu delegate's opening callbacks before the key equivalent fixed |
| 123 | it; a constant focus probe confirmed the diagnosis. The temporary explicit |
| 124 | window registry was removed. Native SwiftUI focus remains the sole command |
| 125 | source. The two read-only reviewers' normal-menu discriminator identified the issue. |
| 126 | |
| 127 | Confirmation sheets were reached through real keyboard/menu events. Their |
| 128 | NSView bitmap omits AppKit vibrancy-rendered labels, so those incomplete images |
| 129 | are not presented as screenshots; the fixture logs and model assertions are |
| 130 | retained. No actual merge was sent by a capture. |
| 131 | |
| 132 | ## Handoff |
| 133 | |
| 134 | Normal push with `agent-tools/push.sh`; exact head and Linux CI verdict are |
| 135 | reported in the handoff and saved CI JSON. No merge, deployment or release. |
| 136 | Own fixture processes and scratch are removed after validation. |
| 137 | |
| 138 | ## Fable delta: same-task context, accessibility and navigation |
| 139 | |
| 140 | The task screen now resolves the Mac model directly from its current context. |
| 141 | Its state owns a model only on the session/task initializer used outside that |
| 142 | context. Replacing the context for the same task ID therefore replaces the |
| 143 | screen's model as well as the command target. Notification, palette and |
| 144 | other-window routes are covered; a mounted NSHostingView regression replaces |
| 145 | the same-ID context and asserts that its Merge sheet attaches to the window. |
| 146 | The palette's labelled accessibility element contains its children. Source |
| 147 | contracts pin containment and the separate Not now, Open in New Window and |
| 148 | result labels, following this repository's view-contract tests. An attempted |
| 149 | in-process accessibility-tree walk returned no usable SwiftUI children in the |
| 150 | Swift test host, so it is not used as evidence of spoken VoiceOver output. |
| 151 | |
| 152 | Pane changes retain the inspector's task and visibility. The workspace owns |
| 153 | an unsent composer draft; recreated AppKit transcripts bind to it, including |
| 154 | edits, paste and clearing after send. A Task-menu action reveals a hidden |
| 155 | inspector before invoking its model. Palette Return ignores marked text. |
| 156 | Task WindowGroup restoration is disabled, so old restored windows do not flash |
| 157 | before account validation. Title-word-prefix matches rank first, other title |
| 158 | matches next, metadata then whole-word brief matches (query length at least |
| 159 | two). The index is cached until its source task/project data changes. |
| 160 | |
| 161 | Explicit deferrals: Command-Return from a list, double-click to open a task |
| 162 | window, and a keyboard shortcut for Open in New Window. Existing sentence-case |
| 163 | task labels in Mac menus remain the copy follow-up for Luna. No new copy. |
| 164 | |
| 165 | The notification-actions branch is checkpointed locally at 4dac0111 while this |
| 166 | priority fix is handled. Its first focused Go tests passed; the unfinished |
| 167 | implementation was not pushed. The approved share follow-ups come after this |
| 168 | Mac delta and before notification work resumes. |
| 169 | |
| 170 | Delta validation: the initial review tests failed on the missing draft, routing |
| 171 | and input-method helpers. Focused tests then passed, including the mounted |
| 172 | same-task sheet test. All 15 deliberate mutations below failed the filtered |
| 173 | `MacPowerReviewTests` suite; sources were restored after each run. Accessibility, |
| 174 | restoration and keyboard wiring are source contracts; the other failures are |
| 175 | behavioral assertions. The mounted screen also catches restoring the old |
| 176 | state-owned Mac model. The first queued-clear log was too verbose for the |
| 177 | runner's issue-line detector; its test did fail. A boolean assertion now keeps |
| 178 | that output bounded, and the repeated mutation was observed failing cleanly. |
| 179 | |
| 180 | | Delta mutation | Result | |
| 181 | | --- | --- | |
| 182 | | Restore state-owned Mac screen model | killed | |
| 183 | | Ignore palette accessibility children | killed | |
| 184 | | Clear inspector/task on pane navigation | killed | |
| 185 | | Stop storing edited composer text | killed | |
| 186 | | Do not reveal inspector before menu action | killed | |
| 187 | | Ignore marked text | killed | |
| 188 | | Remove the Return marked-text wiring | killed | |
| 189 | | Restore task windows automatically | killed | |
| 190 | | Remove title-word-prefix ranking | killed | |
| 191 | | Match brief substrings | killed | |
| 192 | | Remove brief minimum query length | killed | |
| 193 | | Rebuild the index on every query | killed | |
| 194 | | Keep the queued action after navigation | killed | |
| 195 | | Route own-task actions out of a task window | killed | |
| 196 | | Allow a queued action across navigation with the same inspector | killed | |
| 197 | |
| 198 | Queued actions now also carry a navigation generation. Keeping the inspector |
| 199 | across a pane change cannot revive an old action after its asynchronous read. |
| 200 | Mutation logs, the driver and focused-test results are retained with the |
| 201 | slice 9 review evidence. No simulator was started. |
| 202 | |
| 203 | Main c01b4efa was merged normally. The Mac app retains Services registration |
| 204 | and the fixture/menu setup; both approved string sets and their review dates |
| 205 | are retained, including the share UI catalog. On the combined head: |
| 206 | `swift test --package-path native/apple --jobs 4 --filter |
| 207 | 'MacPowerReviewTests|MacWorkspaceTests|MacPowerTests|TaskDetailModelTests|ComposerPolishTests'` |
| 208 | passed all 46 tests. String validation, 336-string parity, Oficina ID and |
| 209 | sign-in-lifetime source checks passed. Full suites remain on Linux hub CI. |
| 210 | |