From f3e70ef92c5d761f3bfa601972a7bce3f3f42cd1 Mon Sep 17 00:00:00 2001 From: Ayush8923 <80516839+Ayush8923@users.noreply.github.com> Date: Mon, 14 Sep 2026 14:29:23 +0530 Subject: [PATCH 1/6] feat(*): fix ui agent workflow --- .github/workflows/agent-ui-fix.yml | 102 +++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/agent-ui-fix.yml diff --git a/.github/workflows/agent-ui-fix.yml b/.github/workflows/agent-ui-fix.yml new file mode 100644 index 0000000..97ac87e --- /dev/null +++ b/.github/workflows/agent-ui-fix.yml @@ -0,0 +1,102 @@ +name: Agent UI Fix + +on: + schedule: + - cron: "30 2 * * *" # 08:00 IST + workflow_dispatch: + inputs: + issue: + description: "Issue number (blank = poora ready-for-agent queue)" + required: false + type: string + +concurrency: + group: agent-ui-fix + cancel-in-progress: false + +jobs: + queue: + runs-on: ubuntu-latest + permissions: + issues: read + outputs: + issues: ${{ steps.list.outputs.issues }} + steps: + - id: list + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + ISSUE: ${{ inputs.issue }} + run: | + if [ -n "$ISSUE" ]; then + [[ "$ISSUE" =~ ^[0-9]+$ ]] || { echo "::error::issue must be a number, got '$ISSUE'"; exit 1; } + issues="[$ISSUE]" + else + issues=$(gh issue list --label ready-for-agent --state open \ + --search "-linked:pr" --limit 5 --json number --jq '[.[].number]') + fi + echo "queue: $issues" + echo "issues=$issues" >> "$GITHUB_OUTPUT" + + fix: + needs: queue + if: needs.queue.outputs.issues != '[]' + runs-on: ubuntu-latest + timeout-minutes: 60 + permissions: + contents: read + issues: write + id-token: write + strategy: + fail-fast: false + matrix: + issue: ${{ fromJson(needs.queue.outputs.issues) }} + steps: + - uses: actions/checkout@v4 + with: + ref: main + + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: npm + + - run: npm ci + + - name: Generate agent token + id: app-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.AGENT_APP_ID }} + private-key: ${{ secrets.AGENT_APP_PRIVATE_KEY }} + + - uses: anthropics/claude-code-action@v1 + id: claude + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + github_token: ${{ steps.app-token.outputs.token }} + bot_name: ${{ vars.AGENT_BOT_NAME }} + bot_id: ${{ vars.AGENT_BOT_ID }} + branch_prefix: "agent/ui-fix-" + base_branch: main + prompt: "/fix-issue ${{ matrix.issue }}" + claude_args: | + --max-turns 150 + --model claude-sonnet-5 + --append-system-prompt "Non-interactive GitHub Actions run: no human will reply to questions. Follow the command's non-interactive instructions." + --allowedTools "Bash(git:*),Bash(gh issue:*),Bash(gh pr:*),Bash(npm run lint),Bash(npm run lint:fix),Bash(npm run build),Bash(npm run format:*),Bash(npx eslint:*),Bash(npx prettier:*),Bash(npx tsc:*),Bash(npx playwright test:*),Bash(ls:*),Bash(cat:*),Read,Edit,Write,Glob,Grep" + --disallowedTools "Bash(git push *--force*),Bash(git push * -f *),Bash(git push -f*),Bash(git push * +*),Edit(/.github/**),Edit(/.releaserc)" + + - if: always() + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + ISSUE: ${{ matrix.issue }} + OUTCOME: ${{ steps.claude.outcome }} + TOKEN_OK: ${{ steps.app-token.outcome }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + run: | + gh issue edit "$ISSUE" --remove-label ready-for-agent + if [ "$OUTCOME" != "success" ] || [ "$TOKEN_OK" != "success" ]; then + gh issue comment "$ISSUE" --body "Automated fix attempt ended with status \`$OUTCOME\`. Run: $RUN_URL — re-add \`ready-for-agent\` to retry." + fi \ No newline at end of file From 433a1d0eec743eb6985e8ea7ff8a60d76655c300 Mon Sep 17 00:00:00 2001 From: Ayush8923 <80516839+Ayush8923@users.noreply.github.com> Date: Mon, 14 Sep 2026 14:53:53 +0530 Subject: [PATCH 2/6] feat(*): fix ui agent workflow --- .github/workflows/agent-ui-fix.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/agent-ui-fix.yml b/.github/workflows/agent-ui-fix.yml index 97ac87e..33d64af 100644 --- a/.github/workflows/agent-ui-fix.yml +++ b/.github/workflows/agent-ui-fix.yml @@ -1,6 +1,8 @@ name: Agent UI Fix on: + push: + branches: [feat/agent-ui-fix] schedule: - cron: "30 2 * * *" # 08:00 IST workflow_dispatch: @@ -99,4 +101,4 @@ jobs: gh issue edit "$ISSUE" --remove-label ready-for-agent if [ "$OUTCOME" != "success" ] || [ "$TOKEN_OK" != "success" ]; then gh issue comment "$ISSUE" --body "Automated fix attempt ended with status \`$OUTCOME\`. Run: $RUN_URL — re-add \`ready-for-agent\` to retry." - fi \ No newline at end of file + fi From 79804ea7418b736a2379f9e2f9090f9446d7c80c Mon Sep 17 00:00:00 2001 From: Ayush8923 <80516839+Ayush8923@users.noreply.github.com> Date: Mon, 14 Sep 2026 14:56:11 +0530 Subject: [PATCH 3/6] fix(*): update the node version --- .github/workflows/agent-ui-fix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/agent-ui-fix.yml b/.github/workflows/agent-ui-fix.yml index 33d64af..3b96f1c 100644 --- a/.github/workflows/agent-ui-fix.yml +++ b/.github/workflows/agent-ui-fix.yml @@ -60,7 +60,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version-file: .nvmrc + node-version: 22 cache: npm - run: npm ci From 99146b0508820896531a0af25617e228d663425a Mon Sep 17 00:00:00 2001 From: Ayush8923 <80516839+Ayush8923@users.noreply.github.com> Date: Mon, 14 Sep 2026 15:22:57 +0530 Subject: [PATCH 4/6] fix(*): remove push event --- .github/workflows/agent-ui-fix.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/agent-ui-fix.yml b/.github/workflows/agent-ui-fix.yml index 3b96f1c..88cf66b 100644 --- a/.github/workflows/agent-ui-fix.yml +++ b/.github/workflows/agent-ui-fix.yml @@ -1,8 +1,6 @@ name: Agent UI Fix on: - push: - branches: [feat/agent-ui-fix] schedule: - cron: "30 2 * * *" # 08:00 IST workflow_dispatch: From 962b962ec6f15cbd01312aacf715d2595bb40741 Mon Sep 17 00:00:00 2001 From: Ayush8923 <80516839+Ayush8923@users.noreply.github.com> Date: Tue, 15 Sep 2026 09:13:16 +0530 Subject: [PATCH 5/6] fix(*): few updates --- .github/workflows/agent-ui-fix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/agent-ui-fix.yml b/.github/workflows/agent-ui-fix.yml index 88cf66b..b425036 100644 --- a/.github/workflows/agent-ui-fix.yml +++ b/.github/workflows/agent-ui-fix.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: inputs: issue: - description: "Issue number (blank = poora ready-for-agent queue)" + description: "Issue number (blank ready-for-agent queue)" required: false type: string From 50b0be01725b027966440caa3cdfa259bf8f66ba Mon Sep 17 00:00:00 2001 From: Ayush8923 <80516839+Ayush8923@users.noreply.github.com> Date: Tue, 15 Sep 2026 09:43:34 +0530 Subject: [PATCH 6/6] fix(*): added the fix issue md file --- .claude/commands/fix-issue.md | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .claude/commands/fix-issue.md diff --git a/.claude/commands/fix-issue.md b/.claude/commands/fix-issue.md new file mode 100644 index 0000000..1fd0e18 --- /dev/null +++ b/.claude/commands/fix-issue.md @@ -0,0 +1,39 @@ +--- +description: Fix an issue and open a PR +--- + +Fix issue #$1 in this repository. + +## Steps + +1. Read the issue: `gh issue view $1 --comments`. + If screenshots are attached, analyse them carefully. +2. Find the relevant files. Use Glob and Grep, read before editing. +3. Create a branch off main: `git checkout -b agent/ui-fix-$1 main` +4. Implement the fix. + - Use existing design tokens and utility classes, never hardcoded + hex colours or pixel values. + - Touch only UI/styling files. Do not change business logic, + API calls, or auth. + - Keep the change as small as the issue requires. +5. Verify: `npm run lint` and `npm run build` must both pass. + Fix anything you broke before continuing. +6. Commit and push: + `git add -A && git commit -m "fix: "` + `git push -u origin HEAD` +7. Open the PR: + `gh pr create --base main --title "fix: " --body "..."` + The body must contain `Closes #$1` and explain what changed and why. + +## Non-interactive + +This runs in GitHub Actions. Nobody will answer questions. + +If the issue is too ambiguous to fix safely, do NOT change code. +Instead: comment on the issue explaining what's unclear, add the +`agent-needs-human` label, and stop. + +## Done means + +A pushed branch AND an open PR. Editing files without opening a PR +is a failed run.