Skip to content

Commit ef5fa7d

Browse files
Emmanuel ERNESTclaude
andcommitted
Remove .xcappdata from git and update Supabase sync architecture
- Remove .xcappdata folder from git index (app data files) - Add iOS UI/UX specialist agent configuration - Add GitHub Actions workflow for iOS tests - Implement Supabase sync services and migrations - Add sync orchestrator function for backend - Update Hero and Story models with sync capabilities - Add comprehensive test utilities and strategies - Configure Supabase CLI and migration files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d923d70 commit ef5fa7d

24 files changed

Lines changed: 5827 additions & 10 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: ios-ux-ui-specialist
3+
description: Use this agent when you need expert guidance on iOS mobile user experience and interface design, including app design reviews, UX/UI best practices, accessibility compliance, Human Interface Guidelines adherence, or mobile design system creation. Examples: <example>Context: User is designing a new iOS app and wants feedback on their interface mockups. user: 'I've created some wireframes for my iOS fitness app. Can you review the user flow and suggest improvements?' assistant: 'I'll use the ios-ux-ui-specialist agent to provide expert feedback on your iOS app wireframes and user experience design.' <commentary>Since the user needs iOS-specific UX/UI expertise for app design review, use the ios-ux-ui-specialist agent.</commentary></example> <example>Context: User is implementing an iOS interface and wants to ensure it follows Apple's design guidelines. user: 'I'm building a settings screen for my iOS app. What are the best practices for organizing settings according to Apple's HIG?' assistant: 'Let me consult the ios-ux-ui-specialist agent to provide guidance on iOS settings screen design following Apple's Human Interface Guidelines.' <commentary>Since the user needs specific iOS design guidance following Apple's standards, use the ios-ux-ui-specialist agent.</commentary></example>
4+
model: opus
5+
color: cyan
6+
---
7+
8+
You are an elite iOS Mobile UX/UI Specialist with deep expertise in Apple's Human Interface Guidelines, iOS design patterns, and mobile user experience best practices. You have extensive experience designing award-winning iOS applications across various categories including productivity, entertainment, health, finance, and social apps.
9+
10+
Your core responsibilities include:
11+
12+
**Design Analysis & Review:**
13+
- Evaluate iOS app designs for usability, accessibility, and adherence to Apple's HIG
14+
- Identify potential user experience friction points and propose solutions
15+
- Assess visual hierarchy, information architecture, and interaction patterns
16+
- Review designs for consistency across different iOS device sizes and orientations
17+
18+
**iOS-Specific Expertise:**
19+
- Apply Apple's Human Interface Guidelines comprehensively and accurately
20+
- Recommend appropriate iOS UI components (UIKit, SwiftUI) for specific use cases
21+
- Ensure designs leverage iOS-native interaction patterns and gestures
22+
- Consider iOS-specific features like Dynamic Type, Dark Mode, and accessibility technologies
23+
24+
**User Experience Optimization:**
25+
- Design intuitive navigation flows that minimize cognitive load
26+
- Optimize for thumb-friendly interactions and one-handed usage
27+
- Create seamless onboarding experiences that highlight key app value
28+
- Balance feature discoverability with interface simplicity
29+
30+
**Technical Design Considerations:**
31+
- Ensure designs account for safe areas, notches, and Dynamic Island
32+
- Recommend appropriate spacing, typography, and color schemes for iOS
33+
- Consider performance implications of design choices
34+
- Plan for various iOS versions and device capabilities
35+
36+
**Methodology:**
37+
1. Always ask clarifying questions about target users, app category, and specific design goals
38+
2. Reference specific HIG sections when making recommendations
39+
3. Provide concrete, actionable feedback with clear rationale
40+
4. Suggest A/B testing opportunities for design decisions when appropriate
41+
5. Consider accessibility from the start, not as an afterthought
42+
6. Recommend tools and resources for implementation when relevant
43+
44+
**Quality Standards:**
45+
- Every recommendation must align with current iOS design standards
46+
- Provide specific examples or references to successful iOS apps when helpful
47+
- Balance innovation with familiarity to ensure user comfort
48+
- Consider the broader iOS ecosystem and how the app fits within it
49+
50+
When reviewing designs or providing guidance, structure your feedback clearly with priorities, explain the reasoning behind recommendations, and always consider the end user's perspective and needs.

.github/workflows/ios-tests.yml

Lines changed: 294 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
name: iOS Tests
2+
3+
on:
4+
push:
5+
branches: [main, develop, feat/gpt-5]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
XCODE_VERSION: '15.0'
11+
IOS_SIMULATOR: 'iPhone 15'
12+
13+
jobs:
14+
unit-tests:
15+
name: Unit Tests
16+
runs-on: macos-latest
17+
18+
steps:
19+
- name: Checkout Code
20+
uses: actions/checkout@v4
21+
22+
- name: Select Xcode Version
23+
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
24+
25+
- name: Setup Ruby (for Fastlane)
26+
uses: ruby/setup-ruby@v1
27+
with:
28+
ruby-version: '3.0'
29+
bundler-cache: true
30+
31+
- name: Cache Swift Packages
32+
uses: actions/cache@v3
33+
with:
34+
path: |
35+
~/Library/Developer/Xcode/DerivedData
36+
.build
37+
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
38+
restore-keys: |
39+
${{ runner.os }}-spm-
40+
41+
- name: Run Unit Tests
42+
run: |
43+
xcodebuild test \
44+
-project InfiniteStories/InfiniteStories.xcodeproj \
45+
-scheme InfiniteStories \
46+
-testPlan "Unit Tests" \
47+
-destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR }}" \
48+
-resultBundlePath TestResults/UnitTests.xcresult \
49+
CODE_SIGN_IDENTITY="" \
50+
CODE_SIGNING_REQUIRED=NO | xcpretty
51+
52+
- name: Generate Coverage Report
53+
if: always()
54+
run: |
55+
cd InfiniteStories
56+
xcrun xccov view --report --json TestResults/UnitTests.xcresult > coverage.json
57+
58+
- name: Upload Coverage
59+
if: always()
60+
uses: codecov/codecov-action@v3
61+
with:
62+
file: ./InfiniteStories/coverage.json
63+
flags: unit-tests
64+
name: unit-coverage
65+
66+
- name: Upload Test Results
67+
if: always()
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: unit-test-results
71+
path: InfiniteStories/TestResults/UnitTests.xcresult
72+
73+
integration-tests:
74+
name: Integration Tests
75+
runs-on: macos-latest
76+
77+
steps:
78+
- name: Checkout Code
79+
uses: actions/checkout@v4
80+
81+
- name: Select Xcode Version
82+
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
83+
84+
- name: Setup Node.js
85+
uses: actions/setup-node@v3
86+
with:
87+
node-version: '18'
88+
89+
- name: Install Supabase CLI
90+
run: npm install -g supabase
91+
92+
- name: Start Local Supabase
93+
run: |
94+
cd infinite-stories-backend
95+
npx supabase start
96+
npx supabase db reset
97+
98+
- name: Wait for Supabase
99+
run: |
100+
timeout=60
101+
while ! curl -s http://127.0.0.1:54321/rest/v1/ > /dev/null; do
102+
sleep 1
103+
timeout=$((timeout - 1))
104+
if [ $timeout -eq 0 ]; then
105+
echo "Timeout waiting for Supabase"
106+
exit 1
107+
fi
108+
done
109+
echo "Supabase is ready"
110+
111+
- name: Deploy Edge Functions
112+
run: |
113+
cd infinite-stories-backend
114+
npx supabase functions serve &
115+
sleep 5
116+
117+
- name: Run Integration Tests
118+
env:
119+
INTEGRATION_TESTS: '1'
120+
SUPABASE_URL: 'http://127.0.0.1:54321'
121+
SUPABASE_SERVICE_KEY: ${{ secrets.SUPABASE_SERVICE_KEY_TEST }}
122+
run: |
123+
xcodebuild test \
124+
-project InfiniteStories/InfiniteStories.xcodeproj \
125+
-scheme InfiniteStories \
126+
-testPlan "Integration Tests" \
127+
-destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR }}" \
128+
-resultBundlePath TestResults/IntegrationTests.xcresult \
129+
CODE_SIGN_IDENTITY="" \
130+
CODE_SIGNING_REQUIRED=NO | xcpretty
131+
132+
- name: Stop Supabase
133+
if: always()
134+
run: |
135+
cd infinite-stories-backend
136+
npx supabase stop
137+
138+
- name: Upload Test Results
139+
if: always()
140+
uses: actions/upload-artifact@v3
141+
with:
142+
name: integration-test-results
143+
path: InfiniteStories/TestResults/IntegrationTests.xcresult
144+
145+
performance-tests:
146+
name: Performance Tests
147+
runs-on: macos-latest
148+
149+
steps:
150+
- name: Checkout Code
151+
uses: actions/checkout@v4
152+
153+
- name: Select Xcode Version
154+
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
155+
156+
- name: Setup Supabase (Local)
157+
run: |
158+
npm install -g supabase
159+
cd infinite-stories-backend
160+
npx supabase start
161+
npx supabase db reset
162+
163+
- name: Run Performance Tests
164+
run: |
165+
xcodebuild test \
166+
-project InfiniteStories/InfiniteStories.xcodeproj \
167+
-scheme InfiniteStories \
168+
-testPlan "Performance Tests" \
169+
-destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR }}" \
170+
-resultBundlePath TestResults/PerformanceTests.xcresult \
171+
CODE_SIGN_IDENTITY="" \
172+
CODE_SIGNING_REQUIRED=NO | xcpretty
173+
174+
- name: Extract Performance Metrics
175+
run: |
176+
cd InfiniteStories
177+
xcrun xcresulttool get --path TestResults/PerformanceTests.xcresult \
178+
--format json > performance-metrics.json
179+
180+
- name: Upload Performance Results
181+
uses: actions/upload-artifact@v3
182+
with:
183+
name: performance-metrics
184+
path: InfiniteStories/performance-metrics.json
185+
186+
- name: Stop Supabase
187+
if: always()
188+
run: |
189+
cd infinite-stories-backend
190+
npx supabase stop
191+
192+
ui-tests:
193+
name: UI Tests
194+
runs-on: macos-latest
195+
196+
steps:
197+
- name: Checkout Code
198+
uses: actions/checkout@v4
199+
200+
- name: Select Xcode Version
201+
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
202+
203+
- name: Boot Simulator
204+
run: |
205+
xcrun simctl boot "${{ env.IOS_SIMULATOR }}" || true
206+
xcrun simctl wait "${{ env.IOS_SIMULATOR }}" --state=booted
207+
208+
- name: Run UI Tests
209+
run: |
210+
xcodebuild test \
211+
-project InfiniteStories/InfiniteStories.xcodeproj \
212+
-scheme InfiniteStories \
213+
-testPlan "UI Tests" \
214+
-destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR }}" \
215+
-resultBundlePath TestResults/UITests.xcresult \
216+
CODE_SIGN_IDENTITY="" \
217+
CODE_SIGNING_REQUIRED=NO | xcpretty
218+
219+
- name: Upload Screenshots
220+
if: failure()
221+
uses: actions/upload-artifact@v3
222+
with:
223+
name: ui-test-screenshots
224+
path: InfiniteStories/TestResults/UITests.xcresult/Attachments
225+
226+
test-summary:
227+
name: Test Summary
228+
needs: [unit-tests, integration-tests, performance-tests, ui-tests]
229+
runs-on: ubuntu-latest
230+
if: always()
231+
232+
steps:
233+
- name: Download All Test Results
234+
uses: actions/download-artifact@v3
235+
236+
- name: Generate Summary Report
237+
run: |
238+
echo "## Test Results Summary" >> $GITHUB_STEP_SUMMARY
239+
echo "" >> $GITHUB_STEP_SUMMARY
240+
241+
echo "| Test Suite | Status |" >> $GITHUB_STEP_SUMMARY
242+
echo "|------------|--------|" >> $GITHUB_STEP_SUMMARY
243+
244+
if [ "${{ needs.unit-tests.result }}" == "success" ]; then
245+
echo "| Unit Tests | ✅ Passed |" >> $GITHUB_STEP_SUMMARY
246+
else
247+
echo "| Unit Tests | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
248+
fi
249+
250+
if [ "${{ needs.integration-tests.result }}" == "success" ]; then
251+
echo "| Integration Tests | ✅ Passed |" >> $GITHUB_STEP_SUMMARY
252+
else
253+
echo "| Integration Tests | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
254+
fi
255+
256+
if [ "${{ needs.performance-tests.result }}" == "success" ]; then
257+
echo "| Performance Tests | ✅ Passed |" >> $GITHUB_STEP_SUMMARY
258+
else
259+
echo "| Performance Tests | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
260+
fi
261+
262+
if [ "${{ needs.ui-tests.result }}" == "success" ]; then
263+
echo "| UI Tests | ✅ Passed |" >> $GITHUB_STEP_SUMMARY
264+
else
265+
echo "| UI Tests | ❌ Failed |" >> $GITHUB_STEP_SUMMARY
266+
fi
267+
268+
- name: Comment on PR
269+
if: github.event_name == 'pull_request'
270+
uses: actions/github-script@v6
271+
with:
272+
script: |
273+
const unitStatus = '${{ needs.unit-tests.result }}' === 'success' ? '✅' : '❌';
274+
const integrationStatus = '${{ needs.integration-tests.result }}' === 'success' ? '✅' : '❌';
275+
const performanceStatus = '${{ needs.performance-tests.result }}' === 'success' ? '✅' : '❌';
276+
const uiStatus = '${{ needs.ui-tests.result }}' === 'success' ? '✅' : '❌';
277+
278+
const comment = `## Test Results
279+
280+
| Test Suite | Status |
281+
|------------|--------|
282+
| Unit Tests | ${unitStatus} |
283+
| Integration Tests | ${integrationStatus} |
284+
| Performance Tests | ${performanceStatus} |
285+
| UI Tests | ${uiStatus} |
286+
287+
View detailed results in the [Actions tab](${context.payload.pull_request.html_url.replace('/pull/', '/actions/runs/')})`;
288+
289+
github.rest.issues.createComment({
290+
issue_number: context.issue.number,
291+
owner: context.repo.owner,
292+
repo: context.repo.repo,
293+
body: comment
294+
});

0 commit comments

Comments
 (0)