Skip to content

feat(project): integrate project API workflows - #153

Merged
nighca merged 40 commits into
1024XEngineer:mainfrom
JeremyD7:feat/project-api-integration
Aug 12, 2026
Merged

feat(project): integrate project API workflows#153
nighca merged 40 commits into
1024XEngineer:mainfrom
JeremyD7:feat/project-api-integration

Conversation

@JeremyD7

@JeremyD7 JeremyD7 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Change Description (Required)

  • Connect Project creation, listing, detail, update, delete, and reference-generation flows to the core API.
  • Keep the seeded Mock projects and Moonlit Orchard asset workspace available for interaction and workflow demonstrations.
  • Add preview, upload, regeneration, loading feedback, and expired-reference refresh behavior for project references.

Implementation Approach (Required)

  • Add typed core Project API methods and React Query detail/list cache invalidation while preserving Mock Project routing for seeded project IDs.
  • Move new-project and edit-project reference generation onto the real endpoint, retaining the previous image as a blurred loading placeholder until the new URL is returned.
  • Reuse the existing ImageDropzone for full-size preview, direct icon actions, upload replacement, and regeneration feedback.

Related Issue (Required)

Closes #146

Testing (Required)

  • tsc -p frontend/tsconfig.app.json --noEmit - passed
  • oxfmt --check on all changed frontend files - passed
  • oxlint frontend/src - passed
  • vitest run - 33 files and 124 tests passed
  • vite build - production build passed

Screenshots or Recordings (Optional)

Not included.

Risks and Follow-ups (Optional)

  • Cloud Project API availability and CORS configuration remain deployment dependencies.
  • Mock projects are intentionally merged with remote projects for demo coverage and should be removed or feature-flagged when a production-only project library is required.

Checklist (Required)

  • The PR is focused and does not include unrelated changes.
  • Asset names, formats, dimensions, and metadata follow project conventions.
  • Licensing and attribution information is included or unchanged as appropriate.
  • Documentation or examples were updated when needed.

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holonic-asset Ready Ready Preview Aug 12, 2026 3:41am

@JeremyD7 JeremyD7 added the area:project Project creation, editing, deletion, settings, or project-level management. label Aug 10, 2026
@JeremyD7 JeremyD7 self-assigned this Aug 10, 2026
fennoai[bot]

This comment was marked as outdated.

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.27273% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../project/new-project/use-new-project-controller.ts 94.11% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

The application needs client-accessible environment configuration for connecting to the core API backend.

Configures Vite envPrefix to expose PUBLIC_ variables and updates TypeScript environment declarations alongside an example env file.

Ensures environment settings for the core API base URL and user ID are safely accessible in browser code.
The fetcher utility relied on the previous VITE_ prefix for core API base URL resolution.

Updates the default API base URL lookup in fetchers to use PUBLIC_CORE_API_BASE_URL.

Aligns request dispatching with the updated public environment variable naming convention.
Changes to the core project endpoints required updated test suite assertions.

Adds reference generation calls to core API mock expectations and adjusts expected fetch URL paths.

Maintains accurate test coverage for low-level core HTTP API client invocations.
The core project API requires endpoints for generating project visual reference assets dynamically.

Exports GenerateProjectReference types from OpenAPI contracts and adds generateReference to coreProjectApi.

Enables core backend integration for AI visual reference generation during project creation.
The project domain model previously relied strictly on local mock persistence.

Integrates core API remote methods for project listing, detail fetching, creation, update, deletion, and reference generation.

Provides a unified project API layer combining remote backend state with mock fallbacks.
Domain project API transformations and backend fallbacks require robust automated testing.

Adds test coverage verifying remote API calls, game type mappings, and input summary conversion.

Guarantees data normalization between core backend responses and frontend project models.
Components need React Query integration to fetch single project details on demand.

Introduces projectKeys.detail and implements useProjectDetailQuery for ID-based project data fetching.

Facilitates caching and automatic synchronization of individual project metadata.
Query key consistency is vital for proper React Query cache management.

Adds test cases verifying that projectKeys.detail generates expected hierarchical array keys.

Prevents cache key regression across project query hooks.
Creation and reference generation are now powered by the core backend API.

Removes canvas-based preview generation utilities and local mock project creation methods.

Simplifies mock implementation by delegating creation workflows to backend APIs.
Local project mock creation was removed in favor of remote API integration.

Deletes test specifications targeting createMockProject and local ID generation.

Keeps test suites aligned with active domain mock responsibilities.
Appending new items locally can cause cache drift when creating projects against a remote backend.

Replaces local query cache data mutation with queryClient.invalidateQueries for project list keys.

Ensures the project list reflects updated backend state following project creation.
Feature components require public entry points to access project detail queries and API services.

Exports useProjectDetailQuery and projectApi from project model module indexes.

Provides clean import paths across application feature modules.
Users need a way to inspect uploaded or generated reference images in full resolution.

Adds previewUrl overlay trigger and onPreview callback prop to ImageDropzone component.

Allows parent forms to open full-screen preview modals for dropped or selected images.
Selected project details may not be fully populated in summary list responses.

Updates useProjectLibrary to fallback to useProjectDetailQuery for active project details.

Ensures selected project state includes complete detail data across feature views.
Integration of useProjectDetailQuery required mock updates in hook test fixtures.

Adds projectDetailQuery mock configuration to useProjectLibrary test setup.

Maintains green test coverage for project selection and library management logic.
The project model carried reference and visualDirection for the same image, allowing them to diverge.

Remove visualDirection from project types, forms, API mapping, UI copy, fixtures, and tests. Regeneration now forwards the current reference and updates persist that field directly.

Project creation, editing, clearing, and regeneration now share one reference contract.
The list fallback treated every failure as an offline response and hid contract bugs.

Return mock projects only for UNAVAILABLE DataApiError values and rethrow all other failures.

Unexpected API and mapping errors now remain visible while offline mode still works.
@KurodaKayn
KurodaKayn requested a review from nighca August 11, 2026 09:52
Remote project merging repeatedly scanned every mock project for each response item.

Build a set of mock project identifiers once and use constant-time membership checks during filtering.

Project list merging now scales linearly with the combined result size.
Remote project responses do not include an asset count, but the frontend previously reported zero.

Make assetCount optional and only attach it when a caller supplies a known value.

Remote summaries no longer confuse missing count data with an empty project.
Project selection fetched detail data even when the current list already contained the same summary.

Initialize detail queries from the matching list entry and preserve the list query timestamp.

Cached projects render immediately while stale entries still refresh through React Query.
The existing-game import callback no longer reads the selected local file.

Remove gameFile from the callback dependency array while retaining it in the import view state.

The callback identity now changes only for values used by its implementation.
…gration

# Conflicts:
#	frontend/src/model/asset/library/asset.api.test.ts
#	frontend/src/model/project/index.ts
Provide toast notification component and toast manager.

Add Toast, Toaster, and associated primitives using Base UI.

Mount Toaster component inside AppProviders wrapper.
Support creating blank projects without requiring game type and platform.

Export toCreateBlankProjectInput and allow empty game types in settings drafts.

Add unit tests for blank project creation and schema fallback handling.
…ect submission

Prevent submitting or advancing new project creation without a valid name.

Trigger a toast error when the project name is missing or whitespace-only.

Update unit tests to cover blank project creation and toast error triggers.
The dropzone mixed generic image input with project-specific controls.

Keep image selection and preview handling in the shared component.

Move preview, regeneration, and removal actions to project settings.
Comment thread frontend/src/model/project/project.api.ts
Comment thread frontend/tests/integration/project-api.integration.ts Outdated
@nighca
nighca merged commit d0a4eae into 1024XEngineer:main Aug 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:project Project creation, editing, deletion, settings, or project-level management.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Define Project Creation and Reference Generation API Integration

3 participants