feat(project): add project update command to edit project metadata - #102
feat(project): add project update command to edit project metadata#102tarik02 wants to merge 3 commits into
project update command to edit project metadata#102Conversation
🦋 Changeset detectedLatest commit: 5e73426 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af5270b3ea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (input.provider !== undefined || input.model !== undefined || input.options !== undefined) { | ||
| defaultModelSelection = yield* resolveModelSelection({ |
There was a problem hiding this comment.
Preserve the provider during model-only updates
When a project already defaults to provider B, running project update --model <slug> passes the partial update through resolveModelSelection, whose model-only branch selects the first available provider rather than retaining B. This silently changes both fields and can persist a provider/model combination that is incompatible. Partial edits should resolve from the project's existing default selection, as thread metadata updates do, while using the first available provider only when no project default exists.
Useful? React with 👍 / 👎.
Motivation
Description
src/cli/projects/update.tsthat accepts flags for--title,--workspace-root, model flags,--clear-default-model,--thread-env/--clear-thread-env, and--favicon/--clear-favicon, and rejects conflicting combinations.updateProjectand implement it insrc/application/projects.tsto resolve the target project, validate and normalizeworkspaceRootfor local vs remote environments, validatefaviconpaths, resolve default model selection via existing model-selection logic, and dispatch a metadata update to the orchestration layer.project.meta.updatecommand insrc/application/project-commands.tsso callers can provide a sparse patch object and explicitnullvalues are preserved rather than omitted.ProjectUpdateValidationErrorfor structured validation failures and wire up a human formatterformatProjectUpdatedHumanand README/changeset entries; register the new subcommand insrc/cli/project.ts.Testing
git diff --checkto validate whitespace and trivial diffs and it succeeded.git status --short --branchand it completed successfully.git submodule update --init --recursivebut cloning the upstream submodule failed due to the environment network/proxy returning HTTP 403, so upstream-dependent dependency resolution could not be completed.pnpm install --offline --ignore-scriptswhich failed because the unavailable upstream submodule supplies a required patch file, so full dependency install/tests could not be executed in this environment.Codex Task