Skip to content

feat: native give-feedback iOS app (FeedbackKit + FeedbackPortalApp)#2

Merged
BunsDev merged 25 commits into
mainfrom
feat/native-give-feedback-app
May 29, 2026
Merged

feat: native give-feedback iOS app (FeedbackKit + FeedbackPortalApp)#2
BunsDev merged 25 commits into
mainfrom
feat/native-give-feedback-app

Conversation

@apple-techie
Copy link
Copy Markdown

Summary

A standalone native SwiftUI give-feedback app, built on the new public end-user API (OpenCoven/feedback#2). End users browse boards, vote, comment, submit, and read changelog + help — all live from the API, with email-OTP bearer auth and an offline read cache. Independent of the embeddable OpenCovenFeedback widget SDK.

Implements Track 2 of the design at docs/superpowers/specs/2026-05-28-native-give-feedback-app-design.md (Architecture C). Design + both implementation plans are included in this branch.

What's here

FeedbackKit (new SPM library — all logic, fully unit-tested, 68 tests):

  • Codable models + JSON envelope/ISO-8601 decoding
  • FeedbackAPI protocol + HTTPFeedbackAPI (URLSession, bearer header, 401/404/429 error mapping) — tested via URLProtocol stubs
  • AuthStore + HTTPAuthService (better-auth email-OTP) + TokenStore (Keychain + in-memory)
  • View models: Feed, PostDetail (vote/comment with sign-in gate), Submit (validation + gate), Changelog, Help — each @MainActor/ObservableObject with loading/error states, tested against a mock FeedbackAPI
  • ContentCache — read-only offline fallback for feed/changelog/help

FeedbackPortalApp (SwiftUI iOS app, App/FeedbackPortalApp/): 4-tab shell (Feedback · Changelog · Help · Account), post detail, submit sheet, sign-in sheet. Thin glue over FeedbackKit.

Housekeeping: fixed .swiftlint.yml invalid keys (included_pathsincluded), removed a dead FeedbackAppTests target, added CI.

Built API-first

View models depend only on the FeedbackAPI protocol and are tested with a mock, so the app was built before the live API exists. The HTTP client/auth-service have inline NOTEs flagging the exact better-auth OTP endpoint paths to confirm against a running instance.

Test plan

  • swift test68 FeedbackKit tests pass; existing OpenCovenFeedback SDK tests untouched (41) → 109 total
  • swiftlint --strict — 0 violations across 54 files
  • xcodegen generate produces the FeedbackPortalApp scheme
  • CI: swift test + SwiftLint (macos-14) and iOS builds of FeedbackKit + FeedbackPortalApp (macos-15) — first run on this PR
  • Manual smoke against a live instance (needs the Track 1 API deployed + better-auth OTP paths confirmed)

The FeedbackPortalApp iOS app target cannot be compiled on the dev host (no iOS SDK); the new ios-build CI job is its first real compile check.

🤖 Generated with Claude Code

apple-techie and others added 18 commits May 28, 2026 22:51
Two-track program: a public end-user API added to OpenCoven/feedback
(anonymous reads + better-auth bearer writes, reusing existing services) and
a native SwiftUI give-feedback app that consumes it via an OpenAPI-generated
client. Captures the audit (v1 API is admin/API-key only; end-user surface is
web-rendered), the resolved forks (end-user app, full feature set, web access
yes, email-OTP bearer auth, 4-tab nav), and API-first sequencing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Track 1 (OpenCoven/feedback): 12 TDD tasks adding /api/public/v1 — portal-session
bearer auth, anonymous reads, authed writes, public OpenAPI — reusing existing
domain services.

Track 2 (feedback-mobile): 14 TDD tasks for FeedbackKit (typed client, AuthStore,
view models, cache) + a SwiftUI 4-tab FeedbackPortalApp, with view models tested
against a mock so the app can be built before the live API exists.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…alApp iOS 17 target

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@BunsDev BunsDev requested a review from Copilot May 29, 2026 17:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new native iOS “give feedback” app architecture by adding a reusable SwiftPM library (FeedbackKit) that encapsulates API/auth/view-model logic (unit-testable on macOS), plus a thin SwiftUI iOS app target (FeedbackPortalApp) that wires UI screens over that kit. It also adds design/implementation docs and CI to run tests/lint and build the app.

Changes:

  • Add FeedbackKit SwiftPM library with models, API client, auth/token storage, offline cache, and SwiftUI-facing view models (plus extensive unit tests).
  • Add FeedbackPortalApp SwiftUI iOS app target via XcodeGen (project.yml) with 4-tab shell and key screens (feed, detail, submit, changelog, help, account/sign-in).
  • Add housekeeping and tooling: SwiftLint config fixes, CI workflow, and docs/specs/plans for Track 1/2.

Reviewed changes

Copilot reviewed 47 out of 48 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Tests/OpenCovenFeedbackTests/OpenCovenFeedbackEventTests.swift Makes event tests concurrency-safe using locked counters/logs.
Tests/FeedbackKitTests/TokenStoreTests.swift Adds unit test coverage for token storage behavior.
Tests/FeedbackKitTests/SubmitViewModelTests.swift Adds submit flow tests (validation + auth gating).
Tests/FeedbackKitTests/SmokeTests.swift Adds a basic module-load smoke test for FeedbackKit.
Tests/FeedbackKitTests/ReadOnlyViewModelsTests.swift Adds tests for changelog/help read-only view models.
Tests/FeedbackKitTests/ProtocolConformanceTests.swift Verifies mock conformance and records/mock behaviors.
Tests/FeedbackKitTests/PostDetailViewModelTests.swift Adds detail/vote sign-in gate tests.
Tests/FeedbackKitTests/ModelsTests.swift Adds JSON decoding tests for envelopes/pages and models.
Tests/FeedbackKitTests/MockFeedbackAPI.swift Adds a configurable mock FeedbackAPI implementation for tests.
Tests/FeedbackKitTests/HTTPFeedbackAPITests.swift Adds URLSession/URLProtocol tests for the HTTP API client.
Tests/FeedbackKitTests/HTTPAuthServiceTests.swift Adds URLProtocol-based tests for email-OTP auth HTTP client.
Tests/FeedbackKitTests/FeedViewModelTests.swift Adds feed loading and cache-fallback tests.
Tests/FeedbackKitTests/ContentCacheTests.swift Adds disk cache round-trip tests.
Tests/FeedbackKitTests/AuthStoreTests.swift Adds tests for sign-in/out state and token persistence wiring.
Sources/FeedbackKit/Models/Models.swift Introduces public Codable domain models + envelope/page types + JSON decoder.
Sources/FeedbackKit/FeedbackKit.swift Adds a minimal FeedbackKit entry point.
Sources/FeedbackKit/Features/Submit/SubmitViewModel.swift Adds submit view model with validation and auth gating.
Sources/FeedbackKit/Features/Help/HelpViewModel.swift Adds help categories view model with offline read cache fallback.
Sources/FeedbackKit/Features/Feed/FeedViewModel.swift Adds feed view model with loading/error and cache fallback.
Sources/FeedbackKit/Features/Detail/PostDetailViewModel.swift Adds post detail view model (load/comments/vote/comment with gating).
Sources/FeedbackKit/Features/Changelog/ChangelogViewModel.swift Adds changelog view model with offline read cache fallback.
Sources/FeedbackKit/Config/AppConfig.swift Adds a minimal config container (instance URL).
Sources/FeedbackKit/Cache/ContentCache.swift Adds read-only disk cache for feed/changelog/help.
Sources/FeedbackKit/Auth/TokenStore.swift Adds token store protocol + in-memory + Keychain implementations.
Sources/FeedbackKit/Auth/HTTPAuthService.swift Adds email-OTP HTTP auth client.
Sources/FeedbackKit/Auth/AuthStore.swift Adds observable auth state store over an AuthService + TokenStore.
Sources/FeedbackKit/API/HTTPFeedbackAPI.swift Adds URLSession-based implementation of FeedbackAPI with error mapping.
Sources/FeedbackKit/API/FeedbackAPI.swift Adds the public FeedbackAPI protocol and PostSort.
Sources/FeedbackKit/API/APIError.swift Adds typed API error model used across the kit.
project.yml Adds XcodeGen target + scheme for FeedbackPortalApp.
Package.swift Adds FeedbackKit product/targets and macOS platform support.
docs/superpowers/specs/2026-05-28-native-give-feedback-app-design.md Adds design spec for the native app + public API approach.
docs/superpowers/plans/2026-05-28-track2-native-ios-app.md Adds Track 2 implementation plan (native iOS app).
docs/superpowers/plans/2026-05-28-track1-public-api.md Adds Track 1 implementation plan (public end-user API).
App/FeedbackPortalApp/SubmitView.swift Adds SwiftUI submit screen + sign-in sheet presentation wiring.
App/FeedbackPortalApp/SignInSheet.swift Adds SwiftUI email-OTP sign-in sheet UI.
App/FeedbackPortalApp/RootTabView.swift Adds 4-tab app shell.
App/FeedbackPortalApp/PostDetailView.swift Adds SwiftUI post detail screen (vote/comment) + sign-in gating.
App/FeedbackPortalApp/Info.plist Adds Info.plist for the new app target and instance URL config key.
App/FeedbackPortalApp/HelpTabView.swift Adds SwiftUI help categories screen.
App/FeedbackPortalApp/FeedTabView.swift Adds SwiftUI feed list + navigation to detail + submit sheet.
App/FeedbackPortalApp/FeedbackPortalApp.swift Adds the @main SwiftUI app entry point.
App/FeedbackPortalApp/Environment.swift Adds composition root (API/auth initialization and token plumbing).
App/FeedbackPortalApp/ChangelogTabView.swift Adds SwiftUI changelog screen.
App/FeedbackPortalApp/AccountTabView.swift Adds account tab (sign-in/out entry points).
.swiftlint.yml Fixes SwiftLint config keys and includes App/.
.gitignore Ignores .superpowers/ artifacts.
.github/workflows/ci.yml Adds CI: swift test, SwiftLint, iOS simulator builds for kit + app.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Sources/FeedbackKit/Cache/ContentCache.swift Outdated
Comment thread Sources/FeedbackKit/API/HTTPFeedbackAPI.swift
Comment thread Sources/FeedbackKit/Features/Submit/SubmitViewModel.swift
Comment thread Sources/FeedbackKit/Features/Detail/PostDetailViewModel.swift
Comment thread Sources/FeedbackKit/Features/Detail/PostDetailViewModel.swift
Comment thread Sources/FeedbackKit/Auth/AuthStore.swift
BunsDev and others added 7 commits May 29, 2026 12:57
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@BunsDev BunsDev merged commit eb8374d into main May 29, 2026
2 checks passed
@BunsDev BunsDev deleted the feat/native-give-feedback-app branch May 29, 2026 20:48
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.

3 participants