Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a4c7726
chore(cli): scope env exports and drop theme poll override
brandonkachen Oct 17, 2025
8d3a521
fix(cli): fall back to tags for staging versions
brandonkachen Oct 17, 2025
651bb0c
fix(cli): link node_modules for staging build
brandonkachen Oct 17, 2025
b20bf50
chore(cli-ci): install workspace deps in cli step
brandonkachen Oct 17, 2025
8633aa7
chore(cli-ci): drop symlink, rely on local install
brandonkachen Oct 17, 2025
7cfdcf0
chore(cli-ci): open tmate shell on build failure
brandonkachen Oct 17, 2025
05e4e88
fix(tooling): include toolName in print-mode events
brandonkachen Oct 17, 2025
cf5f179
chore: keep toolName optional when merging results
brandonkachen Oct 17, 2025
ca60f0e
fix(cli): patch OpenTUI asset paths for bundled builds
brandonkachen Oct 17, 2025
3c03fac
fix: relink opentui modules for cli build
brandonkachen Oct 17, 2025
fc81301
Update cli-release-build.yml
brandonkachen Oct 17, 2025
f32159b
fix: fetch opentui linux arm64 bundle in build
brandonkachen Oct 18, 2025
52a1663
ci: skip smoke test for cross-compiled targets
brandonkachen Oct 18, 2025
fa6275e
fix: force-local tar extraction on windows
brandonkachen Oct 18, 2025
2d9d47a
fix: create windows directories before extracting opentui
brandonkachen Oct 18, 2025
36de749
fix: use posix paths for tar on windows
brandonkachen Oct 18, 2025
1e55c67
ci: document skipped arm64 smoke test
brandonkachen Oct 18, 2025
c22361f
feat: align cli release artifacts with codecane
brandonkachen Oct 18, 2025
1481c8a
fix: emit semver-only version string
brandonkachen Oct 19, 2025
a3359f0
ci: trigger codecane staging on commit marker
brandonkachen Oct 19, 2025
c835e6e
chore: require bun 1.3.0 locally
brandonkachen Oct 20, 2025
c835d4c
chore: standardize on bun 1.3.0 across workflows
brandonkachen Oct 20, 2025
72e32b3
refactor(cli onboarding): remove demo welcome state from initial onbo…
brandonkachen Oct 20, 2025
10f0645
feat(cli): add --agent flag for agent selection
brandonkachen Oct 21, 2025
d8b0988
WIP: Add tmux-based CLI testing infrastructure
brandonkachen Oct 21, 2025
3596f39
Update bun.lock
brandonkachen Oct 21, 2025
3b0691a
Fix npm authentication in CLI staging release by configuring Node.js
brandonkachen Oct 21, 2025
5cc4e92
feat(cli): route release asset downloads through proxy API to codebuf…
brandonkachen Oct 21, 2025
dc94190
Update cli-release-staging.yml
brandonkachen Oct 21, 2025
cb52ad8
Switch to softprops/action-gh-release
brandonkachen Oct 21, 2025
43fc88a
Update cli-release-staging.yml
brandonkachen Oct 21, 2025
bf5708d
Merge origin/main and upgrade opentui to 0.1.28
brandonkachen Oct 22, 2025
5b2de4c
chore(cli): bump opentui to 0.1.28
brandonkachen Oct 22, 2025
96b5c02
chore: run windows cli build on windows runner [codecane]
brandonkachen Oct 22, 2025
5f02967
chore(npm-app): drop ripgrep dependency
brandonkachen Oct 22, 2025
9195ca4
chore: prep sdk types before checks
brandonkachen Oct 22, 2025
7df8d47
[codecane] confirm tests/typechecks passing
brandonkachen Oct 22, 2025
783e239
[codecane] guard release cleanup jq parsing
brandonkachen Oct 22, 2025
d23e975
Merge remote-tracking branch 'origin/main' into brandon-cli-deploy-work
brandonkachen Oct 22, 2025
8d7d6ae
feat: use dts-bundle-generator for SDK type generation in typecheck
brandonkachen Oct 22, 2025
a672a83
fix: improve ripgrep binary path resolution for bundled SDK
brandonkachen Oct 22, 2025
70f8463
Merge remote-tracking branch 'origin/main' into brandon/cli-env-filter
brandonkachen Oct 22, 2025
84355a9
fix: update completions test to use run_id instead of agent_run_id
brandonkachen Oct 22, 2025
81db1d3
fix: update tests to match API changes from origin/main
brandonkachen Oct 22, 2025
839e8bd
chore: remove Playwright e2e test incompatible with bun test
brandonkachen Oct 22, 2025
2059a9c
fix: use --cwd=<dir> syntax for bun run commands
brandonkachen Oct 22, 2025
fb297a5
fix: build SDK before running tests in CI
brandonkachen Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .bin/bun
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ create_cache() {
fi
}

# Function to check if tmux is installed
check_tmux_installed() {
if ! command -v tmux &> /dev/null; then
return 1
fi
return 0
}

# Function to check if command doesn't need secrets
# Returns 0 if secrets are NOT needed, 1 if they ARE needed
doesnt_need_secrets() {
Expand Down Expand Up @@ -248,6 +256,43 @@ doesnt_need_secrets() {
;;
esac
;;
# Test command needs special handling
test)
# Check for integration/e2e tests that require tmux
# Convention: test files matching *integration*.test.ts or *e2e*.test.ts
local needs_tmux=false

for arg in "$@"; do
# Check if running integration or e2e tests
if [[ "$arg" =~ (integration|e2e).*\.test\.(ts|tsx|js|jsx) ]]; then
needs_tmux=true
break
fi
# Also check if running all tests and integration files exist
if [[ "$arg" == "test" ]] || [[ -z "$arg" ]]; then
if ls */src/__tests__/*integration*.test.ts 2>/dev/null || ls */src/__tests__/*e2e*.test.ts 2>/dev/null; then
needs_tmux=true
break
fi
fi
done

# If running integration/e2e tests, check tmux availability
if [ "$needs_tmux" = true ]; then
if ! check_tmux_installed; then
echo "⚠️ tmux not found but required for integration/E2E tests"
echo ""
echo "📦 Install tmux:"
echo " macOS: brew install tmux"
echo " Ubuntu: sudo apt-get install tmux"
echo " Windows: Use WSL and run 'sudo apt-get install tmux'"
echo ""
echo "ℹ️ Skipping tmux-dependent tests..."
echo ""
fi
fi
return 1 # Tests need secrets
;;
*)
# Default to needing secrets for all other commands
return 1
Expand Down
31 changes: 31 additions & 0 deletions .github/actions/setup-project/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Setup Project'
description: 'Setup Bun, cache dependencies, and install packages'

inputs:
bun-version:
description: 'Bun version to install'
required: false
default: '1.3.0'

runs:
using: 'composite'
steps:
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ inputs.bun-version }}

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
node_modules
*/node_modules
key: ${{ runner.os }}-deps-${{ hashFiles('**/bun.lock*', '**/package.json') }}
restore-keys: |
${{ runner.os }}-deps-${{ hashFiles('**/bun.lock*') }}
${{ runner.os }}-deps-

- name: Install dependencies
shell: bash
run: bun install --frozen-lockfile
37 changes: 36 additions & 1 deletion .github/knowledge.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@
# GitHub Actions Knowledge
# GitHub Workflows

## Refactoring Patterns

### Composite Actions

Common setup steps (checkout, Bun setup, caching, installation) have been extracted to `.github/actions/setup-project/action.yml`.

Usage:

```yaml
steps:
- uses: actions/checkout@v4
with:
# checkout-specific params

- uses: ./.github/actions/setup-project
```

Note: Checkout must be separate from the composite action to avoid circular dependencies.

### Environment Variables

GitHub API URLs are extracted as environment variables to avoid duplication:

```yaml
env:
GITHUB_API_URL: https://api.github.com/repos/CodebuffAI/codebuff
GITHUB_UPLOADS_URL: https://uploads.github.com/repos/CodebuffAI/codebuff
```

This pattern:

- Reduces duplication across workflow steps
- Makes repository changes easier (single point of change)
- Improves readability and maintainability

## CI/CD Pipeline Overview

Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
env:
SECRETS_CONTEXT: ${{ toJSON(secrets) }}
run: |
VAR_NAMES=$(node scripts/generate-ci-env.js)
VAR_NAMES=$(bun scripts/generate-ci-env.js)
echo "$SECRETS_CONTEXT" | jq -r --argjson vars "$VAR_NAMES" '
to_entries | .[] | select(.key as $k | $vars | index($k)) | .key + "=" + .value
' >> $GITHUB_ENV
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
env:
SECRETS_CONTEXT: ${{ toJSON(secrets) }}
run: |
VAR_NAMES=$(node scripts/generate-ci-env.js)
VAR_NAMES=$(bun scripts/generate-ci-env.js)
echo "$SECRETS_CONTEXT" | jq -r --argjson vars "$VAR_NAMES" '
to_entries | .[] | select(.key as $k | $vars | index($k)) | .key + "=" + .value
' >> $GITHUB_ENV
Expand All @@ -130,6 +130,9 @@ jobs:
echo "NEXT_PUBLIC_INFISICAL_UP=true" >> $GITHUB_ENV
echo "CODEBUFF_GITHUB_TOKEN=${{ secrets.CODEBUFF_GITHUB_TOKEN }}" >> $GITHUB_ENV

- name: Build SDK before tests
run: cd sdk && bun run build

- name: Run ${{ matrix.package }} tests
uses: nick-fields/retry@v3
with:
Expand Down Expand Up @@ -192,7 +195,7 @@ jobs:
env:
SECRETS_CONTEXT: ${{ toJSON(secrets) }}
run: |
VAR_NAMES=$(node scripts/generate-ci-env.js)
VAR_NAMES=$(bun scripts/generate-ci-env.js)
echo "$SECRETS_CONTEXT" | jq -r --argjson vars "$VAR_NAMES" '
to_entries | .[] | select(.key as $k | $vars | index($k)) | .key + "=" + .value
' >> $GITHUB_ENV
Expand All @@ -201,6 +204,9 @@ jobs:
echo "NEXT_PUBLIC_INFISICAL_UP=true" >> $GITHUB_ENV
echo "CODEBUFF_GITHUB_TOKEN=${{ secrets.CODEBUFF_GITHUB_TOKEN }}" >> $GITHUB_ENV

- name: Build SDK before integration tests
run: cd sdk && bun run build

- name: Run ${{ matrix.package }} integration tests
uses: nick-fields/retry@v3
with:
Expand Down
Loading