Skip to content

docs: require file-local SwiftUI previews#113

Merged
gaelic-ghost merged 2 commits into
mainfrom
docs/swiftui-view-file-previews
Jul 8, 2026
Merged

docs: require file-local SwiftUI previews#113
gaelic-ghost merged 2 commits into
mainfrom
docs/swiftui-view-file-previews

Conversation

@gaelic-ghost

@gaelic-ghost gaelic-ghost commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Require each SwiftUI View component to live in its own file with its own Xcode SwiftUI preview.
  • Propagate the rule through Apple Dev Skills structure guidance, SwiftUI architecture guidance, shared snippets, and generated AGENTS templates.
  • Bump the shared Socket version to 8.5.4 for the patch release.

Verification

  • uv run pytest plugins/apple-dev-skills/tests/test_swiftui_app_architecture_workflow.py plugins/apple-dev-skills/tests/test_structure_swift_sources_workflow.py plugins/apple-dev-skills/tests/test_xcode_guidance_sync_workflow.py
  • plugins/apple-dev-skills/.github/scripts/sync_shared_snippets.sh --check
  • uv run scripts/validate_socket_metadata.py

Release

  • Mode: subtrees
  • plugins/apple-dev-skills: no subtree action; Socket is the canonical payload and the standalone repo is only the compatibility pointer.

Summary by CodeRabbit

  • Documentation

    • Updated guidance across Apple SwiftUI workflow docs to require one SwiftUI view per file and keep previews in the same file.
    • Added clearer file-organization rules for splitting SwiftUI views into separate files.
  • Tests

    • Expanded automated checks to verify the new SwiftUI layout guidance is present in the relevant docs.
  • Chores

    • Bumped package and plugin versions from 8.5.3 to 8.5.4 across multiple components.

@gaelic-ghost gaelic-ghost added the documentation Improvements or additions to documentation label Jul 8, 2026 — with ChatGPT Codex Connector
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8bfb7402-8731-4ee9-8f3a-a17e588f3ff5

📥 Commits

Reviewing files that changed from the base of the PR and between c8a1ab6 and 2c856b0.

⛔ Files ignored due to path filters (8)
  • plugins/agent-portability-skills/uv.lock is excluded by !**/*.lock
  • plugins/apple-dev-skills/uv.lock is excluded by !**/*.lock
  • plugins/cardhop-app/mcp/uv.lock is excluded by !**/*.lock
  • plugins/productivity-skills/uv.lock is excluded by !**/*.lock
  • plugins/python-skills/uv.lock is excluded by !**/*.lock
  • plugins/things-app/mcp/uv.lock is excluded by !**/*.lock
  • plugins/things-app/uv.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (65)
  • plugins/agent-portability-skills/.codex-plugin/plugin.json
  • plugins/agent-portability-skills/pyproject.toml
  • plugins/agentdeck/.codex-plugin/plugin.json
  • plugins/android-dev-skills/.codex-plugin/plugin.json
  • plugins/apple-dev-skills/.codex-plugin/plugin.json
  • plugins/apple-dev-skills/pyproject.toml
  • plugins/apple-dev-skills/shared/agents-snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/appkit-app-architecture-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/apple-typography-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/apple-ui-accessibility-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/avaudio-engine-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/avfaudio-session-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/avfoundation-media-pipeline-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/bootstrap-swift-package/assets/AGENTS.md
  • plugins/apple-dev-skills/skills/bootstrap-xcode-app-project/assets/AGENTS.md
  • plugins/apple-dev-skills/skills/bootstrap-xcode-app-project/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/core-animation-layer-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/coreaudio-modernization-repair-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/coremedia-timing-samplebuffer-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/devicecheck-app-attest-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/explore-apple-swift-docs/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/format-swift-sources/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/migrate-xcode-project-to-xcodegen/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/safari-extension-control-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/sf-symbols-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/structure-swift-sources/SKILL.md
  • plugins/apple-dev-skills/skills/structure-swift-sources/references/layout-rules.md
  • plugins/apple-dev-skills/skills/structure-swift-sources/references/source-organization-rules.md
  • plugins/apple-dev-skills/skills/swiftui-animation-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/swiftui-app-architecture-workflow/SKILL.md
  • plugins/apple-dev-skills/skills/swiftui-app-architecture-workflow/references/anti-patterns-and-corrections.md
  • plugins/apple-dev-skills/skills/swiftui-app-architecture-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/sync-xcode-project-guidance/assets/AGENTS.md
  • plugins/apple-dev-skills/skills/sync-xcode-project-guidance/assets/append-section.md
  • plugins/apple-dev-skills/skills/sync-xcode-project-guidance/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/xcode-app-project-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/xcode-build-run-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/xcode-coding-intelligence-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/skills/xcode-testing-workflow/references/snippets/apple-xcode-project-core.md
  • plugins/apple-dev-skills/tests/test_structure_swift_sources_workflow.py
  • plugins/apple-dev-skills/tests/test_swiftui_app_architecture_workflow.py
  • plugins/apple-dev-skills/tests/test_xcode_guidance_sync_workflow.py
  • plugins/cardhop-app/.codex-plugin/plugin.json
  • plugins/cardhop-app/mcp/pyproject.toml
  • plugins/cloud-deployment-skills/.codex-plugin/plugin.json
  • plugins/cloud-inference-skills/.codex-plugin/plugin.json
  • plugins/dotnet-skills/.codex-plugin/plugin.json
  • plugins/game-dev-skills/.codex-plugin/plugin.json
  • plugins/network-protocol-skills/.codex-plugin/plugin.json
  • plugins/productivity-skills/.codex-plugin/plugin.json
  • plugins/productivity-skills/pyproject.toml
  • plugins/python-skills/.codex-plugin/plugin.json
  • plugins/python-skills/pyproject.toml
  • plugins/reverse-engineering-skills/.codex-plugin/plugin.json
  • plugins/rust-skills/.codex-plugin/plugin.json
  • plugins/server-side-jvm/.codex-plugin/plugin.json
  • plugins/server-side-swift/.codex-plugin/plugin.json
  • plugins/spotify/.codex-plugin/plugin.json
  • plugins/swift-lang/.codex-plugin/plugin.json
  • plugins/swiftasb-skills/.codex-plugin/plugin.json
  • plugins/things-app/.codex-plugin/plugin.json
  • plugins/things-app/mcp/pyproject.toml
  • plugins/things-app/pyproject.toml
  • plugins/web-dev-skills/.codex-plugin/plugin.json
  • pyproject.toml

📝 Walkthrough

Walkthrough

This PR bumps the version from 8.5.3 to 8.5.4 across all plugin manifest JSON files and pyproject.toml files in the repository. Additionally, it adds SwiftUI file-structure guidance (one View component per file, colocated preview, no grouping) across many apple-dev-skills documentation snippets and workflows, with corresponding test updates.

Changes

Version Bump

Layer / File(s) Summary
Manifest and pyproject version bump
plugins/*/.codex-plugin/plugin.json, plugins/*/pyproject.toml, plugins/*/mcp/pyproject.toml, pyproject.toml
Version field incremented from 8.5.3 to 8.5.4 uniformly across all plugin manifests and Python project files.

SwiftUI One-View-Per-File Guidance

Layer / File(s) Summary
Core rule definition and anti-patterns
plugins/apple-dev-skills/skills/structure-swift-sources/SKILL.md, .../references/layout-rules.md, .../references/source-organization-rules.md, plugins/apple-dev-skills/skills/swiftui-app-architecture-workflow/SKILL.md, .../references/anti-patterns-and-corrections.md, .../references/snippets/apple-xcode-project-core.md
Establishes the canonical rule requiring one SwiftUI View per file with its Xcode preview colocated, and defines an anti-pattern for grouped view files.
Rule propagation across workflow snippets and AGENTS assets
plugins/apple-dev-skills/shared/agents-snippets/apple-xcode-project-core.md, plugins/apple-dev-skills/skills/*/references/snippets/apple-xcode-project-core.md, plugins/apple-dev-skills/skills/bootstrap-*/assets/AGENTS.md, plugins/apple-dev-skills/skills/sync-xcode-project-guidance/assets/*
Duplicates the same one-View-per-file and preview-colocation bullets across many workflow reference snippets and AGENTS.md/append-section assets.
Test coverage for guidance text
plugins/apple-dev-skills/tests/test_structure_swift_sources_workflow.py, .../test_swiftui_app_architecture_workflow.py, .../test_xcode_guidance_sync_workflow.py
Adds and extends unit tests asserting the presence of the new SwiftUI structure and preview-colocation guidance text in relevant documentation files.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • gaelic-ghost/socket#101: Overlaps directly with the version bump of plugins/cloud-deployment-skills/.codex-plugin/plugin.json.
  • gaelic-ghost/socket#106: Overlaps on patching the same plugin manifest version fields for a release bump.

Suggested labels: documentation

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main documentation change about requiring file-local SwiftUI previews.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/swiftui-view-file-previews

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c856b0b9f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


## SwiftUI View File Rule

Each SwiftUI `View` component must live in its own Swift file named for that view, and that file must carry the view's own Xcode SwiftUI preview. Do not group multiple `View` component types in one file, even when the views are small, related, nested, or currently used only by one parent. Split them into separate files so Xcode previews remain discoverable, isolated, and reliable.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Record the shipped rule in the roadmap

This adds a shipped SwiftUI workflow rule, but the patch does not update ROADMAP.md; AGENTS.md:61 requires shipped behavior changes to update the relevant docs and ROADMAP.md in the same pass. Without that roadmap note, maintainers following the release/roadmap history will miss that 8.5.4 changed SwiftUI file-layout guidance, leaving the shipped skill contract and tracked roadmap out of sync.

Useful? React with 👍 / 👎.

@gaelic-ghost gaelic-ghost merged commit afd93b5 into main Jul 8, 2026
1 of 2 checks passed
@gaelic-ghost gaelic-ghost deleted the docs/swiftui-view-file-previews branch July 8, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant