Skip to content

Choreography: Frontend Implementation for Item Image Upload

OrderRunDirectoryTriggerRepository
1Run 1: API Proxy Publishrun-1-api-proxy-publish/Manualapi-proxy
2Run 2: Lifecycle Frameworkrun-2-lifecycle-framework/After Run 1 exit gateux-prototype + documentation
3Run 3a: Component Updatesrun-3a-component-updates/After Run 2 exit gateux-prototype
4Run 3b: CORS Integrationrun-3b-cors-integration/After Run 3a exit gate + infrastructure#439 deployedux-prototype
5Run 4: Design System Publishrun-4-design-system-publish/After Run 3b exit gateux-prototype
6Run 5: BFF Routesrun-5-bff-routes/After Run 1 exit gate (api-proxy published) + component-preparation mergedarda-frontend-app
7Run 6: SPA Integrationrun-6-spa-integration/After Run 4 + Run 5 exit gatesarda-frontend-app
8Run 6b: Backend Strict ValidationAfter Run 6 exit gate + CDN infra deployedoperations
9Run 7: Releaserun-7-release/After Run 6b exit gateall repos

Parallelization note: Runs 2–4 (ux-prototype track) and Run 5 (arda-frontend-app track) have independent entry criteria once Run 1 completes. If execution schedules require it, these two tracks can run in parallel — Run 5 depends only on Run 1 (api-proxy published), not on Runs 2–4. The current plan documents strictly sequential execution; this note records the parallelization option for reference.

ArtifactProduced ByConsumed ByPathFormat
@arda-cards/api-proxy packageRun 1Run 5GitHub Packagesnpm
RequestContext + RequestOptions typesRun 1Run 5 (BFF imports api-proxy)src/shared/types.ts in api-proxyTypeScript
processUploadJob() methodRun 1Run 5 (BFF calls method)src/reference/item/proxy.ts in api-proxyTypeScript
Lifecycle types (FieldError, ValidationResult, etc.)Run 2Run 3asrc/types/canary/utilities/edit-lifecycle.ts in ux-prototypeTypeScript
setNestedField utilityRun 2Run 3asrc/types/canary/utilities/set-nested-field.ts in ux-prototypeTypeScript
useDraft<T> hookRun 2Run 3asrc/types/canary/utilities/use-draft.ts in ux-prototypeTypeScript
Edit lifecycle architecture docsRun 2All engineers (reference)documentation/src/content/docs/current-system/architecture/user-interaction/Markdown
Updated ImageUploadDialog (indeterminate progress + UploadError)Run 3aRun 3b, Run 4ux-prototypeTypeScript/TSX
Updated ImageCellEditor factoryRun 3aRun 4ux-prototypeTypeScript/TSX
Updated ImageFormFieldRun 3aRun 4ux-prototypeTypeScript/TSX
Updated ItemGridColumnsRun 3aRun 4ux-prototypeTypeScript/TSX
crossOrigin="use-credentials" supportRun 3bRun 4ux-prototypeTypeScript/TSX
@arda-cards/design-system packageRun 4Run 6GitHub Packagesnpm
BFF routes (/api/items/upload-url, etc.)Run 5Run 6src/server/ in arda-frontend-appTypeScript
SSRF validator, CDN signer, rate limiter utilitiesRun 5Run 6src/server/ in arda-frontend-appTypeScript
Strict CDN validation in operationsRun 6bRun 7Worktree branchGit
All committed code (all repos)Runs 1–6bRun 7Worktree branchesGit

All hand-offs are filesystem-only — no in-memory state is shared between runs. Runs exchange artifacts via committed code on worktree branches and published npm packages.

  1. Run 1 completes all tasks and exit criteria pass.
  2. The coordinator verifies that @arda-cards/api-proxy is published to GitHub Packages and the new version is installable.
  3. Run 2 (ux-prototype track) and Run 5 (arda-frontend-app track) may both proceed.

Between Runs 2, 3a, 3b, and 4 (ux-prototype track)

Section titled “Between Runs 2, 3a, 3b, and 4 (ux-prototype track)”

Each run in the ux-prototype track produces committed code consumed by the next run in the same worktree. There is no npm publish between these runs — the library build happens only in Run 4. Each run’s exit gate must pass before the next run starts.

Run 6 requires both:

  • @arda-cards/design-system published at the new version (produced by Run 4)
  • BFF routes committed in arda-frontend-app (produced by Run 5)

Verify both conditions before launching Run 6.

Run 6b restores strict CDN image URL validation in operations by reverting the backward-compatibility relaxations from PR #163. This is safe to execute once the frontend sends only CDN URLs (Run 6 complete) and CDN infrastructure is deployed to all environments. See operations#164.

Run 7 (Release) prepares CHANGELOGs, creates PRs, and coordinates merge ordering across all repositories. It requires all prior runs to have their code committed and all CI checks passing on their respective branches.

All worktrees are pre-existing (created during project setup):

WorktreeRepositoryBranchUsed By
projects/image-upload-frontend-worktrees/api-proxyapi-proxyjmpicnic/image-upload-frontendRun 1
projects/image-upload-frontend-worktrees/ux-prototypeux-prototypejmpicnic/image-upload-frontendRuns 2, 3a, 3b, 4
projects/image-upload-frontend-worktrees/arda-frontend-apparda-frontend-appjmpicnic/image-upload-frontendRuns 5, 6, 7
projects/image-upload-frontend-worktrees/operationsoperationsjmpicnic/image-upload-frontendRun 6b
projects/image-upload-frontend-worktrees/documentationdocumentationjmpicnic/image-upload-frontendAll runs (documentation commits)

No new worktrees need to be created between runs. All runs operate on the same branches.

Cleanup: After all PRs are merged, remove all four worktrees:

Terminal window
git -C /Users/jmp/code/arda/api-proxy worktree remove \
/Users/jmp/code/arda/projects/image-upload-frontend-worktrees/api-proxy
git -C /Users/jmp/code/arda/ux-prototype worktree remove \
/Users/jmp/code/arda/projects/image-upload-frontend-worktrees/ux-prototype
git -C /Users/jmp/code/arda/arda-frontend-app worktree remove \
/Users/jmp/code/arda/projects/image-upload-frontend-worktrees/arda-frontend-app
git -C /Users/jmp/code/arda/operations worktree remove \
/Users/jmp/code/arda/projects/image-upload-frontend-worktrees/operations
git -C /Users/jmp/code/arda/documentation worktree remove \
/Users/jmp/code/arda/projects/image-upload-frontend-worktrees/documentation
rmdir /Users/jmp/code/arda/projects/image-upload-frontend-worktrees
  1. Check which tasks completed by reviewing the git log in the affected worktree.
  2. Fix the failing task. Each task is isolated to specific files, so partial completion does not corrupt prior tasks.
  3. Re-run from the failing task.
  4. Run validate-exit.sh to confirm all exit criteria pass.
  1. Read the validation output to identify which criteria failed.
  2. Fix the issues in the worktree.
  3. Commit the fixes.
  4. Re-run validate-exit.sh.

Run 3a completes and infrastructure#439 is already deployed

Section titled “Run 3a completes and infrastructure#439 is already deployed”

If infrastructure#439 is deployed by the time Run 3a finishes, Runs 3a and 3b may be merged into a single execution. In that case, add the crossOrigin task (Run 3b T-1 through T-3) to the Run 3a session before committing and exit the combined run against the union of both runs’ exit criteria.

  • Verify the PR is merged to main and CI has completed.
  • Check GitHub Packages registry for the package: npm view @arda-cards/<package> versions --registry=https://npm.pkg.github.com
  • If CI publish step failed, re-trigger the publish workflow from the GitHub Actions UI.
  • Do not proceed to downstream runs until the package is confirmed installable.

All paths are relative to the project root: projects/image-upload-frontend-worktrees/documentation/src/content/docs/roadmap/completed/item-image-upload/

RunCommand
1/launch-team 3-frontend-implementation/plan/run-1-api-proxy-publish
2/launch-team 3-frontend-implementation/plan/run-2-lifecycle-framework
3a/launch-team 3-frontend-implementation/plan/run-3a-component-updates
3b/launch-team 3-frontend-implementation/plan/run-3b-cors-integration
4/launch-team 3-frontend-implementation/plan/run-4-design-system-publish
5/launch-team 3-frontend-implementation/plan/run-5-bff-routes
6/launch-team 3-frontend-implementation/plan/run-6-spa-integration
7/launch-team 3-frontend-implementation/plan/run-7-release

Copyright: (c) Arda Systems 2025-2026, All rights reserved