Skip to content

feat(72): wire FenixKanbanWidgets extension target (closes the #45 deferral)#54

Merged
ChrisPelatari merged 1 commit into
developfrom
claude/72-widget-target
Jun 12, 2026
Merged

feat(72): wire FenixKanbanWidgets extension target (closes the #45 deferral)#54
ChrisPelatari merged 1 commit into
developfrom
claude/72-widget-target

Conversation

@ChrisPelatari

Copy link
Copy Markdown
Member

Summary

  • Re-adds FenixKanbanWidgets (type: app-extension, platform: iOS) to project.yml with sources from Widgets/ + the shared FenixKanban/Features/Widget/BoardSnapshot.swift. Entitlements (Widgets/FenixKanbanWidgets.entitlements) and the manual Widgets/Info.plist (with NSExtensionPointIdentifier com.apple.widgetkit-extension) are wired in; GENERATE_INFOPLIST_FILE=NO.
  • Fix path taken: post-generate patch script (scripts/patch-widget-platform-filter.rb). xcodegen 2.45.4 was confirmed (via test project) to NOT emit platformFilters = (ios,) on the embed build file even when platformFilter: ios is set on the dependency in project.yml. The patch script uses the xcodeproj gem (already required by add-ui-test-target.rb) to set platform_filters = ["ios"] on the FenixKanbanWidgets.appex build file in the "Embed Foundation Extensions" copy-files phase. The script is idempotent and mirrors the style of add-ui-test-target.rb.
  • Makefile generate target updated: xcodegen generate && ruby scripts/patch-widget-platform-filter.rb.
  • Two new unit tests in FenixKanbanTests/Features/Widget/WidgetSnapshotReaderTests.swift validate the BoardSnapshot wire-shape decode contract against a new FenixKanbanTests/Fixtures/board_snapshot.json fixture (pattern mirrors FizzySyncEngineTests fixture loading: bundle index → #file source-tree fallback for CODE_SIGNING_ALLOWED=NO local runs).

CI interaction finding

CI (swift-pr-check.yml) does NOT run make generate — it checks out the committed project.pbxproj directly. Because the patch script runs in make generate and the patched project.pbxproj is committed to this branch, CI will pick up the already-patched file. The ruby scripts/add-ui-test-target.rb step in CI runs after checkout and composes cleanly on top (verified locally).

Acceptance evidence

  • make generatexcodegen generate succeeds + patch outputs: Patched platformFilters = ["ios"] on FenixKanbanWidgets.appex in 'Embed Foundation Extensions'. Saved FenixKanban.xcodeproj (1 build file(s) patched)
  • xcodebuild build -scheme FenixKanban -destination 'platform=iOS Simulator,id=FBF75DCC…'BUILD SUCCEEDED
  • xcodebuild build -scheme FenixKanban -destination 'platform=macOS,arch=arm64' CODE_SIGNING_ALLOWED=NO …BUILD SUCCEEDED (zero errors, no embed rejection)
  • ruby scripts/add-ui-test-target.rb → composes cleanly on the patched project
  • New tests: WidgetSnapshotReaderTests.fixtureDecodesCorrectly and fixtureGeneratedAtIsValidDate✔ Test run with 2 tests in 1 suite passed

Test plan

  • make generate — confirm patch runs after xcodegen and outputs the "Patched" line
  • iOS Simulator build succeeds for the FenixKanban scheme
  • macOS build succeeds with CODE_SIGNING_ALLOWED=NO (no "embedded content built for iOS not allowed" error)
  • ruby scripts/add-ui-test-target.rb runs without errors after regeneration
  • CI green on the PR (macOS build step + iOS unit test step)
  • WidgetSnapshotReaderTests (2 tests) pass in the unit suite

Mission: #28 · Status log: #72 · Resolves the xcodegen platform-filter blocker from #66

🤖 Generated with Claude Code

Re-adds the FenixKanbanWidgets WidgetKit target to project.yml (deferred
since #66 due to the xcodegen macOS embed bug). Key decisions:

- Target: app-extension, iOS only, sources from Widgets/ +
  FenixKanban/Features/Widget/BoardSnapshot.swift (shared Codable model).
- Info.plist: Widgets/Info.plist with NSExtensionPointIdentifier already
  set; GENERATE_INFOPLIST_FILE=NO so the manual plist is used verbatim.
- Entitlements: Widgets/FenixKanbanWidgets.entitlements (App Group).
- Embed dependency added to FenixKanban app target with embed:true, link:false.
- post-generate patch (scripts/patch-widget-platform-filter.rb) sets
  platformFilters=["ios"] on the embed build file so the macOS app build
  skips the extension entirely.
- Makefile generate target now chains: xcodegen → patch script.
- TDD: WidgetSnapshotReaderTests + board_snapshot.json fixture cover the
  BoardSnapshot wire-shape decode contract (2 new tests, both pass).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ChrisPelatari ChrisPelatari merged commit 3df23b9 into develop Jun 12, 2026
1 of 2 checks passed
@ChrisPelatari ChrisPelatari deleted the claude/72-widget-target branch June 12, 2026 17:55
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