Skip to content

Prepare Shipyard 1.0 (5) App Store release - #38

Merged
NayanBhut merged 36 commits into
mainfrom
NayanBhut/UI-Update
Oct 15, 2026
Merged

NayanBhut merged 36 commits into
mainfrom
NayanBhut/UI-Update

Conversation

@NayanBhut

Copy link
Copy Markdown
Owner

Summary

  • add deterministic sample-data App Store screenshots and a network-isolated screenshot capture path
  • show every Shipyard section for every saved team, remove declared key type and role selection, and provide descriptive App Store Connect permission errors
  • limit screenshot display types to the selected platform, support multiple image uploads, and suppress transient App Info validation errors while data loads
  • improve review reply and status presentation, and remove static API wording
  • restore version-based build browsing with 10 builds per page and an explicit Load More button
  • update Settings → Advanced layout and remove the unused Show App Info toggle
  • set version 1.0 build 5 and declare no non-exempt encryption

Validation

  • plutil -lint "App Store.xcodeproj/project.pbxproj"
  • CI-matching Debug xcodebuild command
  • focused build-query, JWT, and profile validation tests
  • screenshot UI test: ReviewSubmissionUITests/testCaptureAppStoreScreenshots
  • release archive, App Store upload, and notarization completed; App Store Connect build 5 is selected for version 1.0

Replace the onboarding sheet with the Figma Launch Assistant flow:
full-window No Teams Connected starting page (sidebar hidden when no
team), Step 2 credentials, Step 3 private key, Step 4 validation with
Apps-found count. Reuses the existing JWT/.p8/Keychain logic; adds
Figma-exported PNG icons with light/dark variants.
Replace the post-auth window with the Shipyard shell: nav sidebar
(team switch/add/remove, monitoring badge, settings), Apps/Builds/
Devices/Certificates/Bundle IDs/Profiles/Users tables, full-screen
build detail (notes editor, compliance, beta groups, inspector),
TestFlight localizations browser, per-app area with App Info metadata
editor, and cursor-drained tester lists. Reuses existing view models
and writes; Figma PNG glyphs throughout.

Fixes App Info prefill on first entry: versions were requested via
the id-only load that no-ops until another screen sets the current
app, so the form had no version context until a tab switch. Loads
via load(app:) now, seeds drafts synchronously on open, keeps typing
across remounts, and adds manual reload preserving dirty fields.
…bundle, certificate sheets

- Invite Users and Invite Tester sheets match Figma modals; tester
  invite assigns all checked groups in one POST
- Revoke certificate uses the Figma warning dialog with PNG art
- Profile creation is a 6-step Figma wizard; register device, bundle
  ID and certificate are Figma create sheets opened as modals
- Confirmations on all destructive actions (delete, remove, disable,
  expire, revoke) and on build assign, which may trigger review
- New Release tab in app detail: version status card, readiness
  checklist (build validity, locale metadata gaps, copyright),
  submit-for-review behind confirmation, manual-steps handoff rows
- Shared FriendlyErrorMessage translator: offline/DNS/timeout, 401
  key rejection and 5xx map to actionable copy instead of raw
  system strings across all lists and forms
- Release tab rebuilt to Figma 76:31086/76:33999: version heading,
  Overview/All Versions/Resolution Center/Builds feature tabs, version
  chips, editable form (version string, per-locale What's New, build
  card, release type + date, phased release), inspector rail and
  missing-items/ready action bar driving Save + Submit for Review
- Choose Build sheet per Figma 76:33033 over all platform builds with
  processing/mismatch rows unavailable and attach behind the button
- ReviewsViewModel: candidate builds fetch, What's New save, optional
  versionString on release-settings PATCH
- allVersions no longer reads shownVersion (shownVersion reads
  allVersions) — that cycle overflowed the stack on appear
- saveReleaseSettings merges the previous build + localizations
  forward: the PATCH response has attributes only, and replacing the
  model outright made Save visibly detach the build
- N1 All Versions list (search, status filter, New Version sheet),
  N2/N3/N4 empty/loading/error states
- Prepare form (01/03/C2) with per-locale What's New, Choose Build
  sheet, release settings, phased toggle, and real appStoreReviewDetails
  editing (load-or-create, diff PATCH)
- Status screens 05/06/07/09/09A/R1/R2, locked states, inspector,
  per-state action bars, toasts, submit/cancel/release confirmations
- Robustness: pre-save server-state refetch, bounded 409 retry with
  field-level errors, fetch liveness so dropped loads can't strand the
  spinner, stuck-loader retry, sub-fetch error affordances
- Window opens at 1280x800 with overflow clamp for restored frames
- Hang: share ISO8601 formatters, replace sorted().first with single-pass
  max, memoize versionCaseState, compute allVersions once per body and
  hoist per-row submission lookups out of n1Table
- Layout: TopPinnedScrollView pins short state screens (overview,
  resolution, builds, prepare, N1 list) to the top instead of floating
  centered; Resolution Center tabs auto-select a version from the list
- Window: clamp also recentres offscreen origins, not just width
- A11y: team rows expose label + default action
- Version chips render in a fixed-height horizontal scroll strip instead
  of one overflowing HStack; chip taps stay on the current tab
- featureTabs padding lives at call sites so list tabs align with the
  title instead of double-padding to 48pt
- Certificates status uses the Profiles red/green dot language
- Certificate/profile create sheets swap to a success step offering
  the .cer/.mobileprovision download (save panel + atomic write)
  instead of dismissing; panel cancel is a no-op
- Row context menus gain Download: single GET for the content
  attribute, base64 decode, per-item in-flight guards
- Models gain certificateContent/profileContent (GET-single only)
- Sandbox User Selected Files readonly -> readwrite (Debug+Release)
  so signed builds can display save panels
Remove 11 unreferenced legacy views (SideBarView, DetailView,
VersionChip, BetaGroupView, Reports, legacy AppInfo, BuildDetails,
BuildRow, Spinner, OnBoarding) plus 13 dead structs in ResourcesView.
Live helpers extracted to Helper/BuildDisplaySupport.swift, InfoCard
moved to ReviewsView. Screenshots manager ported to ShipyardAppInfoView
reusing DetailViewModel's pipeline; a11y hints on app/build rows.
Device detail with rename, enable/disable confirms + success, dependent
profiles via include hydration, last-sync timestamps, empty state with
CSV import, Open Profile jump. Fixes PATCH null-body encoding.
Invite form adopts the Figma role checkboxes, app-access radios with the
shared Choose Apps sheet, restored provisioning toggle, and a pending-grant
summary. Pending invitations get their own lane with inspector, resend and
cancel sheets, and expirationDate recency sort (no sent-date in the API).
Edit user PATCHes roles, scope and provisioning with omit-nil encoding;
Account Holder renders protected read-only; remove uses email-confirm.
Stale-cache error state keeps rows with editing disabled. Resend preserves
app scope via include=visibleApps hydration; users/invitations fetches
include visibleApps for scope labels.
The 114-4499 invite flow is a full window, not a sheet: new
InviteUserDetailView with back navigation, identity fields, role/access
editor, summary and action bar; sending returns to the Pending lane.
Deletes the sheet-based InviteUserForm. Scope picker sits flush leading.
…lity

Profile detail with dependency inspector, jump links, signing-chain
private-key check, and invalid/expired banners; delete-confirm sheet
with type-name guard; regenerate wizard (compatible cert picker,
device picks, delete-and-recreate review, result with download);
created sheet gains Install for Xcode plus install-result sheet with
Reveal. List adds Type/Status filters, Bundle ID column, and derived
Active/Expired/Invalid status. Wizard uses platform+kind type step,
kind/platform/expiry certificate eligibility, eligible-only devices
with select-all, App Store skip branch, and blocks empty device sets
for dev/adhoc types.
ReleaseTabView never remounts when tapping another app on the same tab,
and had no onChange(app.id) — the old app's versions, selection and
drafts stuck around and writes could hit the wrong app. Reset view
state and reload on app-id change, mirroring App Info's boot(). A plain
struct app is correct (@ObservedObject requires a class).
Hide Apple Pay, Pass Type ID, Identity Access and Developer ID
certificates from the create wizard — they can't be embedded in
profiles. Add Select All/Clear to the wizard certificate step and to
the regenerate certificate/device pickers, and switch regenerate to
multi-select certificates. Show a loading state on the profile detail
until the hydrated fetch returns. Pad the cramped wizard step
headers.
Fixes from a 29-item static sweep plus live-flow checks, each verified
against current code before changing anything.

ASN.1 hardening: readLength() now returns an optional and every
toASN1Element() call site unwraps it, so malformed .p8 input throws
instead of trapping on an out-of-bounds read. The sequence loop also
bails on a zero-length child so a malformed child can't spin forever.
Covered by testToECKeyDataGarbageThrowsNotTraps and
testToRawSignatureShortSequenceThrows.

Expired builds: an expired VALID build read "Ready to Test" in both the
builds table and the build detail pill. Expiry now wins over
processingState in BuildDisplaySupport order.

Build pagination: a fresh fetch kept the previous version's cursor/meta,
so a version switch paged the old version's builds. Now cleared on every
non-paginating fetch. A failed page fetch also kept the list intact but
left the footer spinner running forever — it now raises
buildsPaginationFailed and the footer offers Retry.

Search epochs: a search-refresh response merged already-loaded apps
through matchesSearch, which reads the *current* term. During the 500 ms
debounce that filtered the old query's rows by the new term while
meta/cursor said otherwise, breaking the cursor epoch. The merge now
uses the request-time term.

Release notes: the editor now clamps to Apple's 4000-char cap so Save
stays reachable instead of silently no-op'ing. Locale completeness
counts only saved, non-whitespace text and ignores temp drafts, so an
empty staged locale no longer shows complete. Tapping a locale staged
an empty entry that survived as a phantom; stages are dropped on
navigation rather than on sync (dropping them in syncDrafts removed
them the instant staging mutated the locale list). Switching locales in
ReleasePrepareView silently discarded typed What's New — the Picker
now holds the target until the user answers the confirmation, and
commitLocaleSwitch is the single place a switch is applied.

Scheduled releases were unconditionally dirty, so every scheduled
version re-PATCHed on each Save and never greyed out. Now compared
against the server's parsed earliestReleaseDate (61 s granularity to
match the DatePicker).

WhatsNewCard derived its title locale at each of five call sites while
the body preferred the primary locale, so the heading could name German
over English text on four screens. The card now takes a titlePrefix and
derives the locale from the same property the body renders.

Stale detail: switching or deleting a team left the previous team's app,
build and review context mounted, so its notes editor stayed visible.
ShipyardShell now clears it.

403 handling: beta-group writes (invite, add/remove tester, assign
build) and release-note saves surfaced raw server detail while group CRUD
and app-info writes already added a role hint. All write paths now route
through the same Admin / App Manager hint; 409 passes through untouched
because it already names the blocking state.

Certificate/profile creation: prependCertificate/prependProfile
discarded the server-confirmed model when the list wasn't loaded and
just refetched. The create form then had no success step — and since the
CSR's private key is consumed by the POST, the .cer was unreachable. Both
now seed the list with the created model.

External review: a decode failure reported WAITING_FOR_REVIEW when
nothing was submitted, and a non-404 fetch error silently became
UNKNOWN. Both now surface the real error. Review replies also reported
failure when the posted reply simply wasn't in the loaded page.

App Info: inline URL validation only checked the http(s) prefix, so text
the field accepted could still fail on Save; both now require a full URL
with a host. A failed Save gate returned silently while leaving the
button enabled — it now shows the error. The release versions loading
view no longer keeps a stale "taking longer" banner after a successful
load.

README advertised builds-table Markdown/CSV export and an ExportManager
that don't exist on this branch; removed.
…/disable

Completes the Module 04 Bundle IDs flow against Figma 114-*, and fixes
two API contract bugs found by running it live.

Related-resource queries
GET /v1/bundleIds/{id}/profiles and .../bundleIdCapabilities rejected
limit with PARAMETER_ERROR.ILLEGAL ("This relationship does not support
this parameter"), even though Apple's published spec still documents
it. Both are to-many-related routes, so all three call sites now send
fields[...] only and drop the 20-page cap-and-fail loops, along with
the two "more profiles than can be listed at once" messages that no
longer describe reality. fetchApps is untouched: /v1/apps is a
collection and does accept limit.

GET /v1/bundleIds/{id}/profiles also returns resources with no
relationships object at all, which ProfileModel cannot decode — its
three non-optional @ResourceRelationship properties each need an absent
key, surfacing as "The data couldn't be read because it is missing".
Added BundleIdProfileResource for that route and widened it into
ProfileModel via asProfileModel(), so the detail table is unchanged.
Corrected the ProfileModel comment that claimed every list response
carries linkage; it does not, and the new test pins both directions.

Capability enable
POST /v1/bundleIdCapabilities via enableCapability, completing the
enable half of enable/disable. The create body must carry
relationships.bundleId — the one write in this module that cannot key
off path like createBundleId/disableCapability. The api-evangelist
mirror omits this endpoint entirely, so it was verified against
Apple's "Enable a capability" reference (201 Created). The new
BundleIDEnableCapabilitySheet offers only types not already enabled,
since enabling a duplicate is an error rather than an idempotent no-op,
and closes only on success so failures stay visible with the picker
intact. This sheet has no Figma node yet and mirrors the disable
sheet's structure.

Register flow
Registering a Bundle ID now surfaces the created resource, so the form
confirms with status, a property table, "Create Profile…" (stepping
sideways rather than stacking a second sheet) and "Open Bundle ID",
which deep-links into the new detail. Wildcard identifiers derive from
a trailing .* only, never from seedId — the detail heading previously
inferred wildcard from seedId and could mislabel an identifier. Both
identifier radios now stay on screen: 114-2239 shows the wildcard
variant with wildcard preselected, but hiding Explicit made it a
one-way door. Loading uses a status banner plus skeleton rows, and the
empty state carries Figma guidance and actions.

Tests
Related-route param sets are named constants so the no-limit/no-cursor
rule is assertable without credentials. Coverage added for relationship
decoding (asserting ProfileModel throws on the same payload, so the
models can't be silently merged), the enable body shape, the 27-value
CapabilityType round-trip, and identifier-kind derivation.

Validation: macOS build, ValidationTests (excluding the pre-existing
testLoadCSRMissingFile failure on clean HEAD), plutil -lint.

Not verified: neither endpoint was exercised live (no credentials), and
the enable sheet is unreviewed against design.
Improve App Store version navigation, localized submission metadata, build selection, loading feedback, and team-scoped refresh behavior.

Expand certificates, identifiers, profiles, users, devices, screenshots, toasts, app icon assets, tests, and live-flow documentation.
Add monitoring, review-response, role-aware navigation, and bulk resource workflows. Improve App Info state handling, certificate/profile guidance, documentation, and toast behavior. Harden keychain/network privacy and enable hardened runtime plus the privacy manifest for distribution.
# Conflicts:
#	App Store Tests/ValidationTests.swift
#	Helper/ShipyardToast.swift
#	Model/JSONAPIModels/ResourceModels.swift
#	Shipyard/ReleaseTabView.swift
#	SideBarView/DetailView/Reviews/ReviewsViewModel.swift
@github-actions

Copy link
Copy Markdown

🤖 Ollama Cloud PR Review (Model: kimi-k3:cloud)

Review part 1/2 (files: App Store Tests/ValidationTests.swift, App Store UI Tests/ReviewSubmissionUITests.swift, AppConfigs.swift, AppStoreScreenshots/01-apps.jpg, AppStoreScreenshots/02-builds.jpg, AppStoreScreenshots/03-app-info.jpg, AppStoreScreenshots/04-reviews.jpg, AppStoreScreenshots/05-app-store-version.jpg, … +24 more)

Part 1/2 Review

Critical

  • [BUG]
  • Severity: [CRITICAL]
  • File: SideBarView/DetailView/Reviews/ReviewsViewModel.swift (line ~394)
  • Description: configureForScreenshotSample(app:reviews:version:) sets uiTestScenario = .draft, which references ReviewSubmissionUITestScenario — a type defined inside the #if DEBUG block of ReviewSubmissionUITestHost.swift. Unlike the identically-named seeding methods added to SideBarViewModel and DetailViewModel (which are correctly wrapped in #if DEBUG ... #endif), this method is not gated. In a Release/Archive configuration the DEBUG-only type and property won't exist, so the app target fails to compile.
  • Suggestion: Wrap the entire method in #if DEBUG ... #endif, matching the pattern used in the other two view models. If it compiles today, double-check whether an enclosing #if DEBUG exists — the hunk shows none.

Medium

  • [UI]

  • Severity: [MEDIUM]

  • File: View/OnBoarding/LaunchAssistantSheet.swift (line ~392)

  • Description: LaunchField had .textFieldStyle(.plain) removed while keeping the custom .background(LaunchTheme.field), .cornerRadius(6), and stroke overlay. Without .plain, macOS renders the system's default rounded text-field chrome in addition to the custom background/border, producing a double-bordered field (the reduced vertical padding 10→6 also shrinks the field).

  • Suggestion: Re-add .textFieldStyle(.plain) unless the system chrome was an intentional visual change; if intentional, remove the now-redundant custom background/stroke.

  • [UI]

  • Severity: [MEDIUM]

  • File: View/OnBoarding/LaunchAssistantSheet.swift (lines ~30, 77, 300)

  • Description: The step enum was renumbered credentials = 2, privateKey = 3, validation = 4 with "Step X of 5" labels and a 5-dot progress bar. Since steps 1 and 5 don't exist in this flow, users open at "Step 2 of 5" with dot 1 already filled (implying a completed step they never saw) and finish at "Step 4 of 5" with no step 5. Aligning internal values to Figma frame numbers is fine internally, but it leaks a confusing numbering to users.

  • Suggestion: Keep the Figma mapping as a private constant, but render user-facing numbers as 1...3 (e.g. step.rawValue - 1 and "of 3") until steps 1/5 actually exist.

  • [SECURITY]

  • Severity: [MEDIUM]

  • File: App Store Tests/ValidationTests.swift (line ~1377)

  • Description: Two fuzz cases were deleted from testToECKeyDataGarbageThrowsNotTraps: Data([0x30, 0x88] + ...) ("length overflows Int") and Data([0x30, 0x88, 0x7F] + ...) ("Int.max length, no payload"). These guarded the DER/ASN.1 private-key parser against crash-level integer-overflow inputs. If the parser wasn't rewritten (not in this diff), the regression net for these hostile .p8 inputs is silently gone.

  • Suggestion: Restore the two cases, or confirm in the PR description that toECKeyData was changed (part 2?) in a way that makes them obsolete. Don't drop crash-resistance coverage without a stated reason.

  • [UI]

  • Severity: [MEDIUM]

  • File: Shipyard/BuildsTableView.swift (line ~171)

  • Description: In the arrVersions.isEmpty branch, the default: case of the versions-state switch changed from a "Loading builds…" spinner to EmptyView(). States that fall through (e.g. .loaded with zero versions, or an .empty state) now render a completely blank pane with no explanation.

  • Suggestion: Render an explicit empty state ("No versions yet for this app") rather than EmptyView(), so a genuinely-empty account doesn't look like a rendering bug.

Low

  • [BUG]

  • Severity: [LOW]

  • File: SideBarView/DetailView/Reviews/ReviewsView.swift (line ~402) / ReviewReplyFlow.swift (line ~1092)

  • Description: Two related issues with unknown response states: (1) responseCellText returns "Unanswered · Write reply →" for any state that isn't PUBLISHED/PENDING_PUBLISH — including when review.response exists but has a nil or unrecognized state, which is misleading. (2) reviewResponseStateDisplayName(_:) maps all unrecognized states to "Unknown", hiding new Apple states that previously displayed raw.

  • Suggestion: Distinguish "no response object" from "response with unrecognized state", and fall back to the raw state string for unknown values (it aids support/debugging) instead of blanket "Unknown".

  • [IMPROVEMENT]

  • Severity: [LOW]

  • File: SideBarView/DetailView/AppInfo/ScreenshotsSheet.swift (line ~564)

  • Description: Multi-file upload: (a) panel.urls ordering is not guaranteed to match the user's selection order, and screenshot order matters on the App Store; (b) the loop aborts on the first failure, so with files 1–2 uploaded and 3 failing, files 4–5 are silently skipped and only an error toast is shown — no partial-success summary.

  • Suggestion: Sort panel.urls (e.g. by filename) for deterministic order, and consider continuing past failures with a final "3 of 5 uploaded" summary toast instead of early return.

  • [BUG]

  • Severity: [LOW]

  • File: Shipyard/ReviewSubmissionUITestHost.swift (prepareScreenshotWindow, ~line 330)

  • Description: prepareScreenshotWindow re-dispatches itself every 50ms with no retry cap if no suitable window exists. It only runs in screenshot mode, but a misconfigured launch will spin this dispatch loop forever (and reschedule even after the test has failed/torn down).

  • Suggestion: Add a maximum retry count and log a fault (or set isReady to surface the configuration error) after exhausting it.

  • [IMPROVEMENT]

  • Severity: [LOW]

  • File: Shipyard/ReviewSubmissionUITestHost.swift (AppStoreScreenshotHost.init)

  • Description: sidebarVM.configureForScreenshotSample(...) is called before detailVM.configureForScreenshotSample(...) sets usesScreenshotFixtures = true. The guard in the selectedApp sink only protects the fixture state because .receive(on: DispatchQueue.main) delivery happens on a later runloop pass — the correctness depends on both calls running on the main thread and publisher delivery being deferred. If init is ever called off-main or the seeding order changes, the queued selectedApp can clobber the fixtures before the flag is set.

  • Suggestion: Pass the fixture flag through the view model's initializer (or set it before seeding the sidebar) so the guard doesn't rely on run-loop timing.

  • [BEST PRACTICE]

  • Severity: [LOW]

  • File: App Store UI Tests/ReviewSubmissionUITests.swift (line ~16) and Shipyard/BuildsTableView.swift (line ~445)

  • Description: Two string-duplication drift risks: (a) ["apps", "builds", "appInfo", "reviews", "release"] and the env key "SHIPYARD_SCREENSHOT_MODE" are literals duplicating AppStoreScreenshotScreen raw values / environmentKey — a renamed case silently stops capturing a screen; (b) the Load More accessibility hint hardcodes "Loads the next 10 builds" while the source of truth is AppConfigs.buildLimit.

  • Suggestion: (a) Add a unit test asserting AppStoreScreenshotScreen.allCases.map(\.rawValue) equals the expected list so a rename fails loudly; (b) interpolate AppConfigs.buildLimit into the hint.

  • [IMPROVEMENT]

  • Severity: [LOW]

  • File: Shipyard/BuildsTableView.swift (line ~438)

  • Description: The "Load More" button remains visible and enabled while a pagination request is in flight (nextPageCursor stays non-nil until the response lands). Double-taps are guarded in getBuilds via isPaginatingBuilds, but there's an async gap before that flag flips, so a second tap can cancel and restart the same page request.

  • Suggestion: Disable the button (or swap in a small spinner) while detailVM.isPaginatingBuilds is true.

  • [UI]

  • Severity: [LOW]

  • File: Shipyard/MonitoringCenter.swift (line ~1087)

  • Description: "Permissions are checked by App Store Connect" now renders under every team row; previously the explanatory caption was only shown for the selected team. On accounts with many teams this becomes repetitive noise.

  • Suggestion: Show the caption once (header/footer of the Teams pane) or only for the selected row, as before.

  • [BEST PRACTICE]

  • Severity: [LOW]

  • File: SideBarView/DetailView/Reviews/ReviewsViewModel.swift (line ~400)

  • Description: configureForScreenshotSample reuses uiTestScenario = .draft to suppress network loads. This couples screenshot fixtures to the review-submission UI-test scenario: any code branching on that scenario will render draft-scenario UI-test fixture data instead of the screenshot fixtures, and the intent ("screenshot mode") is invisible at the call site.

  • Suggestion: Use a dedicated usesScreenshotFixtures/screenshot flag (as DetailViewModel does) and let the load-suppression check both flags, rather than piggy-backing on .draft.

  • [UI]

  • Severity: [LOW]

  • File: Shipyard/BuildsTableView.swift (line ~80)

  • Description: detailVM.selectedVersion.map { "Version: \($0.version ?? "")" } renders "Version: " with a trailing blank when a version model has a nil version string.

  • Suggestion: Fall back to a placeholder (e.g. the version id or "Unknown") so the menu label never shows an empty value.

  • [BEST PRACTICE]

  • Severity: [LOW]

  • File: AppStoreScreenshots/ (24+ binary files)

  • Description: Committing ~29 binary JPEGs (and future screenshot refreshes) directly into git permanently grows history for every clone.

  • Suggestion: Consider Git LFS, or generating these as CI artifacts that upload to App Store Connect without living in the main repo history.

Positive notes

  • The screenshot launch boundary is well-designed: env marker + validated screen argument, network blocked at both APIClient and URLProtocol layers, icon cache covered, and the config-error view never falls through to the credential-backed root.
  • The fetchBuilds guard now also checks selectedApp?.id == app.id, closing the stale-response hole more robustly than generation-only.
  • Centralizing 403 copy into AppStoreConnectPermission.deniedMessage and threading platform into ScreenshotDisplayType.supported(for:) (with a safe allCases fallback for unknown platforms) are good, consistent changes.

Review part 2/2 (files: View/OnBoarding/OnBoardingViewModel.swift)

Review: Part 2/2 — View/OnBoarding/OnBoardingViewModel.swift

  • [BUG]

  • Severity: [MEDIUM]

  • File: View/OnBoarding/OnBoardingViewModel.swift (lines ~27–42, ~145–152)

  • Description: Removing keyKind/keyRole drops support for individual App Store Connect keys, which previously didn't require an Issuer ID (keyKind == .individual || !issuerID.isEmpty). Users who onboarded with an individual key have a Keychain-stored Credential with an empty issuerID. After this change: credentialsValid/isJWTValid will return false for them, requestHeader will silently build a request with no Authorization header (the try? swallows the failure), and JWT signing now always passes an issuerIdentifier. Net effect: existing individual-key users break on upgrade with a generic 401/validation error and no explanation, and saveLoginState() offers them no path to identify why.

  • Suggestion: Add a migration path — on launch, detect stored credentials with an empty issuer ID and either (a) surface a clear "re-connect your team with an issuer ID" prompt, or (b) keep individual-key support behind the stored access kind until a deprecation window passes. At minimum, document the breaking change in the PR/release notes.

  • [BEST PRACTICE]

  • Severity: [LOW]

  • File: View/OnBoarding/OnBoardingViewModel.swift (lines ~20–21, ~148)

  • Description: AppStoreConnectKeyKind, AppStoreConnectKeyRole, and possibly AppStoreConnectKeyAccess may now be orphaned by this refactor. Two follow-ups: (a) if nothing else (account management UI, credential listing) still references them, delete the types to avoid dead code; (b) removing the access: field from Credential(...) means previously-encoded Keychain items contain an extra access key — synthesized Codable decoding ignores unknown keys, but if CredentialStorage uses a custom/strict decoder, old items will fail to decode and users get logged out.

  • Suggestion: Grep for remaining usages of the three types and remove if unused; confirm Credential's decoder tolerates the legacy access field (add a unit test that decodes a pre-change Keychain payload).

  • [IMPROVEMENT]

  • Severity: [LOW]

  • File: View/OnBoarding/OnBoardingViewModel.swift (lines ~55–70, ~132–138)

  • Description: This diff changes two external API signatures — JWT(...expireDuration:) no longer takes keyKind:, and Credential(...) no longer takes access: — whose definitions live outside this diff. Correctness (and compilation) depends on those type changes landing in the same PR. Also note the JWT validation cache-key format changed (keyKind.rawValue component removed); that's safe here since the cache is in-memory only, but only because keyKind can no longer vary — worth a sanity check that no other code path still constructs JWTs with a kind.

  • Suggestion: Verify the JWT and Credential changes are included in this PR (or an earlier part), and that no remaining call sites pass keyKind:/access:.

No other new issues found in this part — the credentialsValid/isFormValid/isJWTValid guards were updated consistently, and the doc comment was correctly revised to match the new gating.


Automated review by Ollama Cloud. The diff is untrusted input; findings may be inaccurate. If this review seems wrong, please provide feedback.

@NayanBhut

Copy link
Copy Markdown
Owner Author

Automated review triage:

  • FALSE POSITIVE — Release compile failure: ReviewsViewModel.configureForScreenshotSample is already enclosed by #if DEBUG / #endif (ReviewsViewModel.swift:322–536). The release archive also completed successfully.
  • VERIFIED — Build and tests: the CI build, local CI-matching Debug build, focused validation tests, screenshot UI test, project-file lint, and release archive all passed. Current PR checks are 3 passed, 0 failed, and 1 skipped.
  • PRODUCT DECISION — Key access UI: removal of the declared key type/role selectors is intentional. Shipyard shows all sections and lets App Store Connect enforce the active key's permissions. Existing individual-key migration remains a compatibility consideration because those credentials may not contain an Issuer ID.
  • VALID FOLLOW-UPS: restore the two ASN.1 overflow fuzz cases; use user-facing onboarding steps 1–3; restore the plain text-field style; preserve unknown review response states; and improve the smaller empty-state, upload, pagination, and screenshot-host behaviors identified by the review.
  • ADVISORY: screenshot storage strategy and duplicated test constants do not block this release.

The reported critical issue is not present, CI is green, and the PR is cleanly mergeable. The remaining verified items are documented above for follow-up.

@NayanBhut
NayanBhut merged commit f2a9d49 into main Oct 15, 2026
4 checks passed
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.

2 participants