Management for projects with different types#2970
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new markdown document that serves as a detailed worklist for issue #2802. The document aims to capture the full scope of work required to integrate an explicit project type field throughout the application, from backend storage and APIs to frontend models and user interfaces. It acts as a foundational planning resource to ensure a structured and comprehensive approach to this significant feature. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
There was a problem hiding this comment.
Pull request overview
Adds a dedicated worklist document for issue #2802 to capture current gaps and a proposed implementation plan spanning frontend and backend.
Changes:
- Introduce
spx-gui/ISSUE-2802-worklist.mdsummarizing background, current state gaps, and a step-by-step checklist. - Document validation steps, open questions, and a suggested execution order.
- Enumerate primary entry points across frontend and backend components.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
spx-gui/ISSUE-2802-worklist.md
Outdated
| - [ ] Should project type live only on the project, or also be copied into release data for stronger historical consistency? | ||
| - [ ] Which project types are in scope for this issue beyond `spx` plumbing? | ||
| - [ ] Is this issue expected to include full multi-editor UI, or only the metadata and management groundwork? | ||
| - [ ] Where should the OpenAPI update happen, since `docs/openapi.yaml` is not present in the current workspace? |
spx-gui/ISSUE-2802-worklist.md
Outdated
| - [ ] Add a project type field to `builder-backend-release/internal/model/project.go`. | ||
| - [ ] Add a migration to extend the `project` table with a project type column. | ||
| - [ ] Backfill existing rows with the default type. |
spx-gui/ISSUE-2802-worklist.md
Outdated
| - The project abstraction exists in `src/models/project.ts`, but there is no explicit project type field yet. | ||
| - Project creation, editor loading, and community project loading are still hard-coded to `SpxProject`. | ||
| - `.xbp` metadata in `src/models/common/xbp.ts` does not include project type. | ||
| - API types in `src/apis/project.ts` do not expose project type or allow filtering by it. |
|
Well-structured planning document with good coverage of both frontend and backend concerns. A few accuracy and placement issues noted via inline comments. The checklist is thorough, but the file location and naming diverge from project conventions. |
spx-gui/ISSUE-2802-worklist.md
Outdated
| - [ ] Update `builder-backend-release/cmd/spx-backend/post_project.yap` to accept project type. | ||
| - [ ] Update `builder-backend-release/cmd/spx-backend/patch_project_#owner_#name.yap` if update supports project type. | ||
| - [ ] Update `builder-backend-release/cmd/spx-backend/get_projects_list.yap` to parse project type filter. | ||
| - [ ] Regenerate `cmd/spx-backend/xgo_autogen.go` if any `*.yap` file changes. |
There was a problem hiding this comment.
cmd/spx-backend/xgo_autogen.go is missing the builder-backend-release/ prefix used for every other backend path in this section. Should be builder-backend-release/cmd/spx-backend/xgo_autogen.go.
spx-gui/ISSUE-2802-worklist.md
Outdated
| - [ ] Ensure cloud load/save in `spx-gui/src/models/common/cloud.ts` preserves project type. | ||
| - [ ] Update `.xbp` save logic in `spx-gui/src/models/common/xbp.ts` to write project type into `builder-meta.json`. | ||
| - [ ] Update `.xbp` load logic to read project type from `builder-meta.json`. | ||
| - [ ] Define fallback behavior when old `.xbp` files do not contain project type. |
There was a problem hiding this comment.
Section 6 covers cloud and .xbp serialization but omits src/models/common/local.ts. The local (IndexedDB-backed) storage path spreads the full Metadata object into storage, so project type won't be persisted locally until it is added to Metadata. Neither a checklist item nor a test task covers this path, and it is missing from the Primary Entry Points list.
spx-gui/ISSUE-2802-worklist.md
Outdated
| ### 7. Frontend Project Factory And Runtime Dispatch | ||
|
|
||
| - [ ] Introduce a project factory or registry instead of directly constructing `SpxProject`. | ||
| - [ ] Update `spx-gui/src/pages/editor/index.vue` to instantiate the correct project implementation by type. |
There was a problem hiding this comment.
"Review any other places that directly instantiate SpxProject" understates the scope. There are at least four additional production call sites not listed here or in Primary Entry Points:
src/components/copilot/CopilotRoot.vuesrc/components/agent-copilot/CopilotProvider.vuesrc/widgets/spx-runner/SpxRunner.ce.vue(two sites)src/models/spx/gen/sprite-gen.ts
CopilotProvider.vue and SpxRunner.ce.vue are high-impact integration points that will need explicit treatment.
spx-gui/ISSUE-2802-worklist.md
Outdated
| - [ ] Should project type live only on the project, or also be copied into release data for stronger historical consistency? | ||
| - [ ] Which project types are in scope for this issue beyond `spx` plumbing? | ||
| - [ ] Is this issue expected to include full multi-editor UI, or only the metadata and management groundwork? | ||
| - [ ] Where should the OpenAPI update happen, since `docs/openapi.yaml` is not present in the current workspace? |
There was a problem hiding this comment.
Factually incorrect: docs/openapi.yaml exists in the repository. The question should be rephrased to address how and when the OpenAPI spec should be updated, and should also be added to the Suggested Execution Order (currently absent from all 8 steps).
spx-gui/ISSUE-2802-worklist.md
Outdated
| - `internal/migration/migrations/` | ||
| - `cmd/spx-backend/post_project.yap` | ||
| - `cmd/spx-backend/get_projects_list.yap` | ||
| - `cmd/spx-backend/patch_project_#owner_#name.yap` No newline at end of file |
There was a problem hiding this comment.
All backend paths here omit the builder-backend-release/ prefix (e.g. internal/model/project.go), but every corresponding checklist item in sections 2–4 uses the full prefix. The abbreviated paths are not navigable as written and are inconsistent with the rest of the document. Also, two items to consider adding:
src/models/common/local.ts(local storage path, see section 6 comment)docs/openapi.yaml(API contract document)
spx-gui/ISSUE-2802-worklist.md
Outdated
| @@ -0,0 +1,187 @@ | |||
| # Issue 2802 Worklist | |||
There was a problem hiding this comment.
File placement — spx-gui/ is the frontend application directory; this document covers backend schema migrations, YAP endpoints, and controller logic that have no relation to that subtree. A cross-cutting planning document like this fits better under docs/develop/generalization/ (alongside the existing project.md for issue #2800). The ISSUE-NNNN- filename prefix is also inconsistent with every other file in the docs tree, which uses descriptive kebab-case names.
spx-gui/ISSUE-2802-worklist.md
Outdated
| ## Current State Summary | ||
|
|
||
| ### Frontend | ||
|
|
There was a problem hiding this comment.
Inaccurate SpxProject location — The statement implies SpxProject is in src/models/project.ts, but the class lives in src/models/spx/project.ts. src/models/project.ts is the generic IProject abstraction. This distinction matters for implementers: the hard-coding to remove is in src/models/spx/project.ts and call-sites like src/components/project/index.ts, not in src/models/project.ts itself.
spx-gui/ISSUE-2802-worklist.md
Outdated
|
|
||
| ### Backend | ||
|
|
||
| - `internal/model/project.go` has no project type field. |
There was a problem hiding this comment.
Backend path prefix is inconsistent and likely wrong — Every item in the backend checklist (sections 2–4) uses a builder-backend-release/ prefix (e.g., builder-backend-release/internal/model/project.go), but no such directory exists in this repository. The project's own documentation and docs/develop/database-migration/index.md consistently refer to spx-backend. The "Primary Entry Points" section drops the prefix entirely, making the two sections contradictory. Please use the correct module-relative path throughout.
spx-gui/ISSUE-2802-worklist.md
Outdated
|
|
||
| - [ ] Update `builder-backend-release/cmd/spx-backend/post_project.yap` to accept project type. | ||
| - [ ] Update `builder-backend-release/cmd/spx-backend/patch_project_#owner_#name.yap` if update supports project type. | ||
| - [ ] Update `builder-backend-release/cmd/spx-backend/get_projects_list.yap` to parse project type filter. |
There was a problem hiding this comment.
Missing validation items for list-filter and remix paths — Section 3 validates projectType only in the create flow. Two additional items are needed:
- List filter:
projectTypepassed toListProjectsmust be validated as a strict enum (allowlist lookup) before use in a SQL WHERE clause — never raw interpolation. - Remix: The backend must derive
projectTypefrom the source project record, not accept a client-supplied value. A client that specifies a different type during remix could load project content in the wrong runtime.
spx-gui/ISSUE-2802-worklist.md
Outdated
|
|
||
| ### 10. Import And Export Behavior | ||
|
|
||
| - [ ] Ensure exported `.xbp` files always include project type. |
There was a problem hiding this comment.
Missing cloud.ts item — src/models/common/cloud.ts handles cloud save/load serialization and must propagate projectType through parseProjectData() / save(). It is listed as a Primary Entry Point but has no corresponding checklist item in Section 6. This is as concrete a change as the xbp.ts items already listed.
spx-gui/ISSUE-2802-worklist.md
Outdated
| - [ ] Treat missing type in legacy backend rows as `spx`. | ||
| - [ ] Treat missing type in legacy `.xbp` files as `spx`. | ||
| - [ ] Decide whether the frontend should apply fallback defaults, or whether backend should normalize before response. | ||
| - [ ] Avoid adding loose compatibility layers beyond what is needed for legacy data migration. |
There was a problem hiding this comment.
.xbp deserialization: Object.assign merges all fields without validation — xbp.ts currently does Object.assign(metadata, m) for all content from builder-meta.json. Once projectType drives frontend runtime dispatch (Section 7), a crafted .xbp file that injects an unexpected projectType — or overrides other metadata fields like owner or id — becomes a meaningful attack surface. The checklist should explicitly require:
- Validate the deserialized
projectTypeagainst the allowed enum before accepting it. - Replace the blanket
Object.assignwith an explicit field-by-field merge that rejects unknown or unexpected keys.
spx-gui/ISSUE-2802-worklist.md
Outdated
| - [ ] Should project type live only on the project, or also be copied into release data for stronger historical consistency? | ||
| - [ ] Which project types are in scope for this issue beyond `spx` plumbing? | ||
| - [ ] Is this issue expected to include full multi-editor UI, or only the metadata and management groundwork? | ||
| - [ ] Where should the OpenAPI update happen, since `docs/openapi.yaml` is not present in the current workspace? |
There was a problem hiding this comment.
docs/openapi.yaml does exist — The premise of this open question is incorrect; docs/openapi.yaml is present in the repository. The question should instead address whether the spec is hand-maintained or generated, and who owns the update. The projectType field should be defined there as a named ProjectType enum schema (same pattern as the existing Visibility enum), which also provides the machine-readable contract that drives backend validation.
|
Thorough and well-structured worklist. A few factual corrections to address before merging: the backend path prefix |
Summary
Add an initial worklist document for issue #2802 to capture the implementation scope across frontend and backend.
Included
Refs #2802