Skip to content

[codex] Add current worktree command with PR lookup#85

Open
leesangb wants to merge 4 commits into
mainfrom
codex/current-worktree-command
Open

[codex] Add current worktree command with PR lookup#85
leesangb wants to merge 4 commits into
mainfrom
codex/current-worktree-command

Conversation

@leesangb

@leesangb leesangb commented May 25, 2026

Copy link
Copy Markdown
Owner

What changed

  • add wt current to show only the current worktree without walking and enriching the full worktree list
  • reuse repository settings from the main worktree when running inside a linked worktree
  • auto-resolve the current branch's open PR in wt current only when PR metadata is not already stored
  • cover the new current-worktree and PR lookup flows with end-to-end tests

Why

wt ls is useful for the full catalog, but it is heavier than needed when the goal is just to inspect the current worktree. This adds a fast path for the current worktree and keeps PR lookup scoped to a single branch instead of the whole repo.

Impact

  • faster current-worktree inspection path
  • linked worktrees can still resolve issue/PR-related output correctly
  • wt current uses stored PR metadata first and falls back to a branch-scoped open PR lookup only when needed

Validation

  • bun run typecheck
  • bun test

@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: 8308fe054c

ℹ️ 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 thread src/app/use-cases/create-worktree.ts Outdated

@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: 90f637d8e9

ℹ️ 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 thread src/app/repository-settings.ts Outdated

@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: 73e34cdbfc

ℹ️ 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 thread src/app/repository-settings.ts Outdated
Comment on lines +47 to +49
const sharedSource: SettingsInputSource = mainInputs.shared
? { input: mainInputs.shared, root: settingsRoot }
: { input: currentInputs.shared, root: repoRoot };

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 Prefer linked shared settings before main fallback

When wt runs inside a linked worktree, this branch always picks mainInputs.shared whenever the main worktree has .wt/settings.json, even if the linked worktree has its own .wt/settings.json (for example on a branch that changes issue.*, scripts.*, or baseBranch). That regresses prior behavior by ignoring branch-local shared settings in linked worktrees and can make wt current/wt list/wt new use stale config from the main worktree. The fallback should only use main shared settings when the linked shared file is absent.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant