Skip to content

Shipyard UI update: Figma shell, resource/release workflows, review submission fixes - #33

Closed
NayanBhut wants to merge 27 commits into
mainfrom
NayanBhut/UI-Update
Closed

NayanBhut wants to merge 27 commits into
mainfrom
NayanBhut/UI-Update

Conversation

@NayanBhut

Copy link
Copy Markdown
Owner

📋 PR Description

Shipyard UI update: Figma-based app shell, resource/release workflow screens, and review-submission correctness fixes (25 commits, 237 files).

What changed?

Shell & first launch

  • New ShipyardShell / ShipyardSidebar / ShipyardTheme replace the legacy SideBarView/DetailView shells; legacy reports and App-Info views were dropped and the screenshots flow was ported into App Info
  • Figma first-launch page + stepped Add Team assistant (FirstLaunchView, LaunchAssistantSheet)
  • Settings opens full screen in the content area instead of a modal sheet (ShipyardSettingsSheet back-header + shell settingsPresented)

Release / submission workflow

  • Figma App Store Versions workspace: version state machine, readiness checklist, submission form, scrollable version chips, cert status dots
  • Post-submit status sync: bounded polling (AppConfigs.reviewStatusPollInterval / reviewStatusPollAttempts) with ReviewStatusSyncState — shows "Updating status…", then "Check Again" if App Store Connect is slow, and blocks duplicate submits
  • Review submissions now list via the app-scoped endpoint (GET /v1/apps/{id}/reviewSubmissions) and bind cancellation to the exact version through appStoreVersionForReview, so an items-only submission can't be withdrawn by mistake
  • READY_FOR_REVIEW treated as a pending/editable-lock state; toast transitions now slide from the trailing edge; demo-password field dirtiness fixed

Resources & users

  • Bundle ID registration, dependent profiles, capability enable/disable; signing-only cert picker with select-all; profile detail inspector, regenerate, filters
  • Devices detail, enable/disable, dependents, CSV import; download signing files after create and from rows
  • Invite as full-screen detail with role/access flow, pending invitations list (edit, resend, cancel), scope-picker flush

Tests

  • ValidationTests extended (review status sync state, settle rules, status labels/editability) and JSONDecodingTests covers review-submission decoding + exact-version cancellation matching
  • Fixed 4 failing tests (also red on main): loadCSR/device-CSV load reported a missing file as "too large" instead of "couldn't read", and the CSV fixtures used shortened UDID tails that isValidUDID now rejects — full suite is green (110/110)

Test Scenarios Covered

  • New feature added
  • Bug fix
  • UI changes
  • Swift build passes
  • Ollama Cloud PR Review passes

Ollama Cloud Review

Checklist

  • Code compiles and builds successfully
  • No breaking changes
  • Self-reviewed my code

🤖 Automated Review Notice

This PR triggers an automated Ollama Cloud review using kimi-k3:cloud.
The review posts as a comment on this PR and is updated in place on every push.

  • Add [skip-review] to your PR title to skip the LLM review
  • Add [smoke-test] to your PR title for a quick connectivity check only

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

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

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

PR Review: Review Submission Status Sync + Exact-Version Cancel Matching

Overall this is a solid PR — the exact-version matching for cancellation is a genuine safety fix (fail-closed instead of best-guess), and the CSV/CSR "unreadable vs. tooLarge" correction fixes a real misleading-error bug. Findings below, ordered by severity.


  • [BUG]

  • Severity: [MEDIUM]

  • File: ReviewsViewModel.swift (lines ~1994–2070)

  • Description: If the user cancels a submission while the post-submit sync is still active (the cancel button is not gated on reviewStatusSyncState), the version returns to its editable initial state (e.g. PREPARE_FOR_SUBMISSION). reviewStatusDidSettle then returns false forever (state == initialState, and isVersionEditable is true), so the poll exhausts its attempts and lands in .delayed(versionId:). Worse, retryReviewStatusSync re-arms with the same editable initial state, so "Check Again" can never settle either — it loops back to .delayed each time. Since .delayed sets versionId, canSubmit returns false and the action/footer bar hides Save and Submit indefinitely for that version. The only escape is switching apps to hit the reset path. Nothing in this diff shows the cancel-success path clearing reviewStatusSyncState.

  • Suggestion: Clear the sync state on successful cancellation (bump reviewStatusSyncGeneration, cancel reviewStatusSyncTask, set reviewStatusSyncState = .idle — you already have this exact teardown in the reset paths), and/or make the settle predicate also treat "state became editable and no cancellable submission exists for this version" as settled.

  • [UI]

  • Severity: [LOW]

  • File: Shipyard/ReleaseTabView.swift (lines ~787–830)

  • Description: While syncing/delayed, the entire footer — including Save and the error text — is replaced by the spinner / "Check Again" button. If the delayed state persists (see finding above), the user has no in-context hint about how to recover or dismiss the pending state, and any error message is suppressed.

  • Suggestion: Consider keeping the error line visible in the delayed branch, and/or offering a manual dismiss (or auto-clear when getVersionCaseState shows the version is editable again).

  • [IMPROVEMENT]

  • Severity: [LOW]

  • File: Shipyard/ReleaseTabView.swift (line ~374)

  • Description: reviewsVM.refreshAfterWrite(appId:) was removed from the submit success handler. The new sync path only refreshes the version snapshot and the submissions list. If refreshAfterWrite also refreshed review details, localizations, or builds, those may now be stale after a submit.

  • Suggestion: Confirm nothing else relied on that refresh; if it did, trigger only the needed pieces alongside beginReviewStatusSync.

  • [BEST PRACTICE]

  • Severity: [LOW]

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

  • Description: The app-scoped submissions fetch reuses .get(name: .getAllApps, path: "\(appId)/reviewSubmissions"). It works, but conflates two endpoints in logging/metrics and makes path-composition errors harder to spot.

  • Suggestion: Add a dedicated APIName case (e.g. getAppReviewSubmissions = "/apps" with path composition documented), or at least a small factory method so the route is named at the call site.

  • [IMPROVEMENT]

  • Severity: [LOW]

  • File: Model/JSONAPIModels/ResourceModels.swift (lines ~413, ~661)

  • Description: A legitimately empty (0-byte) CSV/CSR now throws .unreadable, which reads oddly for a file the user can plainly open. Also (verify, since not in the diff): the new CSVFileLoadError.unreadable / CSRFileLoadError.unreadable cases must exist with user-facing errorDescription copy.

  • Suggestion: Consider an .empty case with "file is empty" copy, and confirm the form renders the new case verbatim.

  • [BEST PRACTICE]

  • Severity: [LOW]

  • File: SideBarView/DetailView/Reviews/ReviewsViewModel.swift (lines ~2048–2053)

  • Description: The catch inside the poll loop only re-checks Task.isCancelled before logging and continuing; a superseded generation will log a spurious "Failed to refresh review status" error on its final pass before the next iteration's guard exits.

  • Suggestion: Add generation == reviewStatusSyncGeneration to the catch guard for consistency with the other exits.

  • [UI]

  • Severity: [LOW]

  • File: Helper/ShipyardToast.swift (line 252)

  • Description: The toast transition changed from .move(edge: .bottom) to .move(edge: .trailing). The toast is positioned bottom-trailing with a 24pt trailing inset, so it will now slide in sideways from off-screen. This may be intentional, but it changes behavior for every toast call site in the app.

  • Suggestion: Verify visually on narrow windows / iPad split view that the off-screen slide doesn't cause a layout flash, and confirm the change is intended globally.

  • [BEST PRACTICE]

  • Severity: [LOW]

  • File: Shipyard/ReleaseTabView.swift (line ~1651)

  • Description: The expedited-review URL is a hardcoded string literal in the view.

  • Suggestion: Move it to AppConfigs (or a Constants enum) next to the other external URLs for easier updates.


What's done well 👍

  • cancellableSubmission(for:) switching to exact appStoreVersionForReview.id matching closes a real foot-gun (cancelling an items-only submission on the same platform), and it fails closed when the include is missing.
  • The generation + task-cancellation discipline in the new sync code (bump on reset/reconcile, deferred nil-out, [weak self], guards before every state write) is thorough and consistent with the existing patterns.
  • reviewStatusDidSettle as a nonisolated static pure function with dedicated unit tests is a nice testable seam.
  • Tests were updated alongside behavior (new states, UDID fixtures corrected to the real 25-char format, decode test covering the items-only submission case).

Blocking recommendation: address the cancel-during-sync soft-lock (first finding) before merge; everything else is polish.


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

@NayanBhut NayanBhut closed this Oct 8, 2026
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