Repository navigation
base red: move the Invite People views and the update surface JSON out of CmuxNextApp (app_lines +198) - #34570
Conversation
The arch ratchet row app_lines is red on feat-cmux-next: CmuxNextApp Swift lines +231 over the last green arch tip 3232840. The cause is 26fd471 (#33967), which added the Invite People sheet views to CmuxNextApp (+361 lines). Later commits removed 130 App lines. This change moves the sheet views to CmuxNextNotifications, a ui-layer target that already declares CmuxNextDaemonService (the sheet model) and CmuxNextDesign (the design kit), and that CmuxNextAppTests declares: - AgentShareInviteCard (Share/AgentShareInviteCard.swift) - AgentShareInviteRowView (Share/AgentShareInviteRowView.swift) Only the presenter stays in CmuxNextApp, in the old file Share/AgentShareInviteSheet.swift (AgentShareInviteSheetPresenter: the overlay host, AppServices, the first load). CmuxNextNotifications does not declare CmuxNextIcons, so the presenter gives the card its close icon (the same NSImage.icon(.actionClose, size: 12) as before). The card is package access: its init, onClose, focusField, and the members that the compiler requires (the overrides, the required init and the text field delegate methods). The row view stays internal. No Package.swift change, no new target and no new dependency edge. The behavior does not change. AgentShareTests imports CmuxNextNotifications and gives the card an empty close image. Takes back #33967: its Invite People views are in CmuxNextApp, which made the app_lines arch ratchet red at the feat-cmux-next tip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
|
Found 5 test failures on Blacksmith runners: Failures
|
|
Review (independent subagent): SHIP at 2e70de9 I found no blocking problem. I did not compile or run tests. I read the diff, the base file at Blocking
What I checked
Non-blocking
|
…dater b7c9441 (#34477) added 9 App lines (arch ratchet app_lines +9): the "delivery": "background" patch of the Updated card's JSON, in the App's UpdateSurfaceProvider. This change moves that logic to CmuxNextUpdater, which owns UpdateHighlights and UpdaterService and already declares CmuxNextSettings (JSONValue): - UpdateHighlights.surfaceJSON(background:) encodes the highlights and adds "delivery": "background" when background is true. - UpdaterService.surfaceHighlights(updated:) chooses the highlights of the Ready popover or of the Updated card (the same rule as before). The provider keeps only the App facts: the surface kind and AppServices.environment.relaunchBehind. Both targets use uiSwiftSettings (MainActor default), so the isolation does not change. No Package.swift change. The behavior does not change. Takes back #34477: its App lines made the app_lines arch ratchet red. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
For awareness: #34656 (Invite People: Copy Invite Link, live refresh) is stacked on this move and edits |
|
Review (independent subagent): SHIP at 676c963 I did this review only by reading. I did not compile or run tests. Blocking findingsNone. Checks
Non-blocking findings
|
|
Base findings at head 676c963 (not caused by this PR):
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Summary
The arch ratchet row
app_linesis red onfeat-cmux-next. At the merged base0418d016332:[app_lines] CmuxNextApp Swift lines: +198over the newest green arch tip323284030a3c. (No first-parent tip after323284030a3cis green: I ran the ratchet over323284030a3cat each of the 104 tips.)This PR has two fix commits. Each moves logic out of CmuxNextApp into a package that owns it. The behavior does not change.
Design surface:
chat-multiplayer.md(leo-workspace design/chat-multiplayer.md). This PR does not change the design. It only moves files and changes their paths in.github/design-surfaces.json.Per-commit culprit table
python3 scripts/cmux-next/arch-ratchet.py --base C^ --head Cfor each first-parent commit in323284030a3c..0418d016332(104 commits). The table shows only the commits that changeapp_lines. All other 94 commits say "no rise".26fd47135b9b2e70de939c5(-339)8a26a6b762306f250b0f6c8aece823dc94f13a238f24b7c9441d175676c963330f(-9)431286d1831da508af687cda508af687cc0cc4bfaeae72eecbaab17431286d1831(#34367) added 20 lines toCmuxNextApp/Handlers/PaneHandlers+Verbs.swift. Its follow-upda508af687c(#34530) moved that close logic out of the same handler (toDaemonService.closePane, -25). I do not change it.The fix
1.
2e70de939c5: the Invite People card and rows move to CmuxNextNotifications (for #33967)The culprit added
CmuxNextApp/Share/AgentShareInviteSheet.swift(301 lines) andCmuxNextApp/Share/AgentShareInviteRowView.swift(59 lines). The model (AgentShareInviteSheetModel), the invite rules (AgentShareInvites) and the strings (AgentShareStrings,AgentShare.xcstrings) are already in CmuxNextDaemonService. Only the views were in the App.AgentShareInviteCard(the AppKit dialog card) moves toCmuxNextNotifications/Share/AgentShareInviteCard.swift.AgentShareInviteRowViewmoves toCmuxNextNotifications/Share/AgentShareInviteRowView.swift, with no change.AgentShareInviteSheetPresenterstays inCmuxNextApp/Share/AgentShareInviteSheet.swift. It is only the wiring: the overlay host,AppServices, the close icon and the firstload().Why CmuxNextNotifications: it is a
ui-layer target (moved out of CmuxNextApp before) that already declares CmuxNextDaemonService (the sheet model) and CmuxNextDesign (the design kit). CmuxNextApp and CmuxNextAppTests already declare it.CmuxNextNotifications does not declare CmuxNextIcons. Thus the presenter gives the card its close image:
NSImage.icon(.actionClose, size: 12), the same image as before.Access control: the card is
package, notpublic.packagemembers:init(model:closeImage:),onClose,focusField(), and the members that the compiler requires for apackageclass (the two overrides, the requiredinit?(coder:)and the twoNSTextFieldDelegatemethods). The row view stays internal.Tests:
AgentShareTestsadds@testable import CmuxNextNotificationsand gives the cardcloseImage: NSImage(). No test logic changes.2.
676c963330f: the update surface's highlights and JSON move to CmuxNextUpdater (for #34477)b7c9441d175added the"delivery": "background"patch of the Updated card's JSON to the App'sUpdateSurfaceProvider. CmuxNextUpdater ownsUpdateHighlightsandUpdaterServiceand already declares CmuxNextSettings (JSONValue). New fileCmuxNextUpdater/UpdaterService+SurfaceHighlights.swift:UpdateHighlights.surfaceJSON(background:): encodes the highlights and adds"delivery": "background"whenbackgroundis true.UpdaterService.surfaceHighlights(updated:): the Ready popover's or the Updated card's highlights (the same rule as before).The provider keeps only the App facts: the surface kind and
AppServices.environment.relaunchBehind.For both
Package.swiftchange, no new target, no new dependency edge.uiSwiftSettings(default isolationMainActor), so the isolation of the moved code does not change.Takes back #33967: its Invite People views were in CmuxNextApp, which made the
app_linesarch ratchet red at thefeat-cmux-nexttip. This PR keeps all of its behavior and moves only the views.Takes back #34477: its update surface JSON logic was in CmuxNextApp (+9 App lines). This PR keeps the behavior and moves the logic to CmuxNextUpdater.
Ratchet
At the merged base tip
0418d016332:At this head (
python3 scripts/cmux-next/arch-ratchet.py --base 323284030a3c --head HEAD):Per fix commit:
2e70de939c5app_lines -339,676c963330fapp_lines -9.Changelog
none
Observed / Not run
Observed:
python3 scripts/cmux-next/arch-ratchet.py --base 323284030a3c --head HEAD: "no architecture count rises", app_lines -150.323284030a3cat each tip: none is green.python3 scripts/cmux-next/prepush-gate.py: "no new violations"../scripts/lint-ios-package-conventions.sh: "OK: no unjustified convention violations."python3 scripts/cmux-next/check-package-dependency-lists.py: exit 0.2e70de939c5: fleet compile job140d71ae66ce21c0d3a96acapassed (230 s); fleet step6dc184ab5bbb63da4e1f1ec7: AgentShareTests (19 tests) and AgentShareConsentTests (9 tests) passed.cmux-ci compile-check --ref 676c963330fb406085350c110d39df99eae540ff --package CmuxNext: jobe05a8b489f5cb07797495f1e, "compile check CmuxNext: passed (374 s)". CIcmux-next/compilepassed on the same head.scripts/ci/package-test-lane.sh suite Packages/macOS/CmuxNext AgentShareTests,AgentShareConsentTests,UpdatedCardDismissPathTests,UpdatedCardCurrentBuildNotesTests,LaunchPolishVisibilityTestson676c963330f: stepea10ac52ebf52290d1ebc959(aws-m4pro-2), "All 5 suites passed" (19, 9, 2, 2 and 8 tests).Base findings (not caused by this PR):
cmux-next crash-class rules: red on the unrelated cmux NEXT: Hide the Tab of a Chat Alone in Its Pane, an opt-in setting (carries #34554 onto base) #34609 too ("Chromium Objective-C contract" step).tooling-tests: the registry step fails ontests/test_release_thanks.py("linux-guard lane is not run by any workflow"). This PR does not touch that file.Not run:
"delivery": "background"field; the move keeps its text. I did not add a test.No capture: a file move with no UI change).