feat(project): integrate project API workflows - #153
Merged
nighca merged 40 commits intoAug 12, 2026
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7 tasks
Codecov Report❌ Patch coverage is
📢 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.
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.
nighca
reviewed
Aug 12, 2026
nighca
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Description (Required)
Implementation Approach (Required)
Related Issue (Required)
Closes #146
Testing (Required)
tsc -p frontend/tsconfig.app.json --noEmit- passedoxfmt --checkon all changed frontend files - passedoxlint frontend/src- passedvitest run- 33 files and 124 tests passedvite build- production build passedScreenshots or Recordings (Optional)
Not included.
Risks and Follow-ups (Optional)
Checklist (Required)