Skip to content

feat(project): add project update command to edit project metadata - #102

Open
tarik02 wants to merge 3 commits into
masterfrom
codex/github-mention-featproject-update-project-metadata
Open

feat(project): add project update command to edit project metadata#102
tarik02 wants to merge 3 commits into
masterfrom
codex/github-mention-featproject-update-project-metadata

Conversation

@tarik02

@tarik02 tarik02 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Motivation

  • Provide a single CLI command to update all editable project metadata (title, workspace root, default model selection, default thread environment, and favicon) with explicit clear flags for nullable fields.
  • Ensure the CLI enforces sensible validation rules for conflicting flags, workspace-root path semantics (local vs remote), and workspace-relative favicon paths.

Description

  • Add a new CLI command implementation at src/cli/projects/update.ts that accepts flags for --title, --workspace-root, model flags, --clear-default-model, --thread-env/--clear-thread-env, and --favicon/--clear-favicon, and rejects conflicting combinations.
  • Extend the project application API with updateProject and implement it in src/application/projects.ts to resolve the target project, validate and normalize workspaceRoot for local vs remote environments, validate favicon paths, resolve default model selection via existing model-selection logic, and dispatch a metadata update to the orchestration layer.
  • Generalize the construction of the project.meta.update command in src/application/project-commands.ts so callers can provide a sparse patch object and explicit null values are preserved rather than omitted.
  • Add a domain error ProjectUpdateValidationError for structured validation failures and wire up a human formatter formatProjectUpdatedHuman and README/changeset entries; register the new subcommand in src/cli/project.ts.

Testing

  • Ran git diff --check to validate whitespace and trivial diffs and it succeeded.
  • Inspected repository status with git status --short --branch and it completed successfully.
  • Attempted git submodule update --init --recursive but cloning the upstream submodule failed due to the environment network/proxy returning HTTP 403, so upstream-dependent dependency resolution could not be completed.
  • Attempted pnpm install --offline --ignore-scripts which failed because the unavailable upstream submodule supplies a required patch file, so full dependency install/tests could not be executed in this environment.
  • No unit test suite or typecheck run was completed in this environment due to the dependency/submodule failures described above.

Codex Task

@changeset-bot

changeset-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5e73426

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
t3code-cli Minor

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +115 to +116
if (input.provider !== undefined || input.model !== undefined || input.options !== undefined) {
defaultModelSelection = yield* resolveModelSelection({

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant