Skip to content

Add shared Settings, menu and About code with a surfaces command - #26

Open
adamXbot wants to merge 2 commits into
mainfrom
claude/mac-surfaces
Open

adamXbot wants to merge 2 commits into
mainfrom
claude/mac-surfaces

Conversation

@adamXbot

@adamXbot adamXbot commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Settings, the app menu and About are being moved onto one shared implementation. This brings that code into the repository and keeps it in step; it does not change any screen yet.

  • privacycommand/Sources/privacycommand/MacSurfaces: ten Swift files (Settings scaffold, About window, app and Help menu commands, popover header and footer, launch-at-login row, gated destructive buttons, Updates pane). The folder is added to the app target as a synchronized group, so files that later join or leave the copy need no project edit. All types are prefixed Surface, so nothing collides with existing code.
  • just surfaces refreshes the copy from the shared source when it is available on the machine, and otherwise verifies the committed files against .project/mac-surfaces.lock.json.
  • The privacycommand scheme runs the same step as a pre-action before each build. Xcode does not fail a build when a pre-action fails, so just check also verifies the copy and fails if it was edited here.
  • The minimum system version moves from macOS 13 to macOS 14, in the Xcode project, Package.swift, Info.plist and the README. The shared code uses APIs that start at 14.

Validation: just surfaces runs cleanly; the app builds unsigned with the new files compiled in, including the Sparkle conformance; just check passes.

Moving the app's own Settings and About onto these types is a separate change.

🤖 Generated with Claude Code

Vendor the shared macOS surface sources under
privacycommand/Sources/privacycommand/MacSurfaces with a lock of their
hashes, and compile the folder into the app as a synchronized group.
`just surfaces` refreshes the copy, a scheme pre-action runs the same step
before each build, and `just check` verifies the copy against its lock.

The shared code needs macOS 14, so the minimum moves from macOS 13 to 14.
Nothing in the app uses the new types yet.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comment thread .project/mac_surfaces.py
if lock is None:
raise SurfaceError("The standards checkout is not on this machine and no copy is recorded")
print("Mac surfaces: standards checkout not found; using the committed copy")
return check(root)
Comment thread .project/mac_surfaces.py
print(f"Mac surfaces: version {lock['version']}, {len(lock['files'])} files verified")


def sync(root, destination, explicit_source, force):
Comment thread .project/mac_surfaces.py
common = subprocess.run(["git", "rev-parse", "--path-format=absolute", "--git-common-dir"],
cwd=root, capture_output=True, text=True, check=True).stdout.strip()
candidates.append(Path(common).parent.parent / STANDARD)
except (OSError, subprocess.CalledProcessError):
CI and TestFlight or release builds now only verify the committed copy,
so a publication build never changes its own sources.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comment thread .project/mac_surfaces.py
destination = lock["destination"]
if lock is not None and publishing():
print("Mac surfaces: CI or publication build; verifying the committed copy without copying")
return check(root)

This branch has not been deployed

No deployments
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.

1 participant