Skip to content

Commit 5862b5a

Browse files
authored
Merge branch 'leader' into dev
2 parents 99e9a32 + 3f03bdf commit 5862b5a

19 files changed

Lines changed: 138 additions & 102 deletions

.github/workflows/comment-ops.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
name: 🔍 Route Comment
2121
runs-on: ubuntu-latest
2222
outputs:
23+
is_command_triggered: ${{ steps.route.outputs.is_command_triggered || 'false' }}
2324
is_review: ${{ steps.route.outputs.is_review || 'false' }}
2425
is_squash: ${{ steps.route.outputs.is_squash || 'false' }}
2526
is_resolve: ${{ steps.route.outputs.is_resolve || 'false' }}
@@ -45,6 +46,27 @@ jobs:
4546
if echo "$BODY" | grep -qiE "^@gemini-enrich"; then echo "is_enrich=true" >> $GITHUB_OUTPUT; fi
4647
if echo "$BODY" | grep -qiE "^@gemini-help"; then echo "is_help=true" >> $GITHUB_OUTPUT; fi
4748
49+
init-status:
50+
needs: [router]
51+
if: needs.router.outputs.is_command_triggered == 'true'
52+
runs-on: ubuntu-latest
53+
outputs:
54+
comment_id: ${{ steps.post-comment.outputs.comment-id }}
55+
steps:
56+
- name: Post Initial Status
57+
id: post-comment
58+
uses: peter-evans/create-or-update-comment@v4
59+
with:
60+
issue-number: ${{ github.event.issue.number }}
61+
body: |
62+
### 🤖 Command Operation Status
63+
64+
⏳ **Status:** In Progress...
65+
66+
Triggered by: @${{ github.actor }} via [comment](${{ github.event.comment.html_url }})
67+
68+
<!-- id: comment-op-status-${{ github.event.comment.id }} -->
69+
4870
execute-review:
4971
needs: [router]
5072
if: github.event.issue.pull_request && needs.router.outputs.is_review == 'true'
@@ -267,3 +289,60 @@ jobs:
267289
source_branch: ${{ needs.prepare-resolve.outputs.source_branch }}
268290
pr_number: ${{ github.event.issue.number }}
269291
secrets: inherit
292+
293+
finalize-status:
294+
needs:
295+
- router
296+
- init-status
297+
- execute-review
298+
- execute-triage
299+
- execute-coder
300+
- execute-create-review-issues
301+
- execute-help
302+
- execute-squash
303+
- execute-resolve
304+
if: always() && needs.init-status.result == 'success'
305+
runs-on: ubuntu-latest
306+
steps:
307+
- name: Determine Final Status
308+
id: status
309+
run: |
310+
REPORT="### 🤖 Command Operation Status\n\n"
311+
312+
check_job() {
313+
local name=$1
314+
local result=$2
315+
local triggered=$3
316+
if [ "$triggered" == "true" ]; then
317+
case $result in
318+
success) REPORT="${REPORT}✅ **$name:** Success\n" ;;
319+
failure) REPORT="${REPORT}❌ **$name:** Failed\n" ;;
320+
cancelled) REPORT="${REPORT}🚫 **$name:** Cancelled\n" ;;
321+
skipped) REPORT="${REPORT}⏭️ **$name:** Skipped\n" ;;
322+
*) REPORT="${REPORT}❓ **$name:** Unknown ($result)\n" ;;
323+
esac
324+
fi
325+
}
326+
327+
check_job "Review" "${{ needs.execute-review.result }}" "${{ needs.router.outputs.is_review }}"
328+
check_job "Triage" "${{ needs.execute-triage.result }}" "${{ needs.router.outputs.is_triage }}"
329+
check_job "Coder" "${{ needs.execute-coder.result }}" "${{ needs.router.outputs.is_coder }}"
330+
check_job "Create Review Issues (Manual)" "${{ needs.execute-create-review-issues.result }}" "${{ needs.router.outputs.is_review_issues }}"
331+
332+
check_job "Help" "${{ needs.execute-help.result }}" "${{ needs.router.outputs.is_help }}"
333+
check_job "Squash" "${{ needs.execute-squash.result }}" "${{ needs.router.outputs.is_squash }}"
334+
check_job "Resolve" "${{ needs.execute-resolve.result }}" "${{ needs.router.outputs.is_resolve }}"
335+
336+
REPORT="${REPORT}\n---\nTriggered by: @${{ github.actor }} via [comment](${{ github.event.comment.html_url }})"
337+
REPORT="${REPORT}\n\n<!-- id: comment-op-status-${{ github.event.comment.id }} -->"
338+
339+
echo "REPORT<<EOF" >> $GITHUB_OUTPUT
340+
printf "%b\n" "$REPORT" >> $GITHUB_OUTPUT
341+
echo "EOF" >> $GITHUB_OUTPUT
342+
343+
- name: Update Status Comment
344+
uses: peter-evans/create-or-update-comment@v4
345+
with:
346+
comment-id: ${{ needs.init-status.outputs.comment_id }}
347+
body: ${{ steps.status.outputs.REPORT }}
348+
edit-mode: replace

.github/workflows/conflict-resolver.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,7 @@ jobs:
117117
✅ Successfully resolved all conflicts by merging the latest changes from `${{ inputs.target_branch }}`. The pull request has been updated.
118118
119119
---
120-
#### 🤖 Gemini Manual Trigger Quick Reference
121-
| Command | Action |
122-
| :--- | :--- |
123-
| \`@gemini-bot\` | Run AI Code Review |
124-
| \`@gemini-triage\` | Run Issue Triage |
125-
| \`@gemini-coder <task>\` | Generate Code |
126-
| \`@create-review-issues\` | Create issues from review |
127-
128-
[Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
120+
#### 🤖 [Gemini Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
129121
<!-- id: conflict-resolver-bot -->
130122
token: ${{ secrets.GITHUB_TOKEN }}
131123

@@ -145,15 +137,7 @@ jobs:
145137
Please resolve these conflicts manually.
146138
147139
---
148-
#### 🤖 Gemini Manual Trigger Quick Reference
149-
| Command | Action |
150-
| :--- | :--- |
151-
| \`@gemini-bot\` | Run AI Code Review |
152-
| \`@gemini-triage\` | Run Issue Triage |
153-
| \`@gemini-coder <task>\` | Generate Code |
154-
| \`@create-review-issues\` | Create issues from review |
155-
156-
[Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
140+
#### 🤖 [Gemini Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
157141
<!-- id: conflict-resolver-bot -->
158142
token: ${{ secrets.GITHUB_TOKEN }}
159143

.github/workflows/gemini-coder.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -660,16 +660,7 @@ jobs:
660660
${{ env.FILES }}
661661
662662
---
663-
#### 🤖 Gemini Manual Trigger Quick Reference
664-
| Command | Action |
665-
| :--- | :--- |
666-
| \`@gemini-bot\` | Run AI Code Review (PR only) |
667-
| \`@gemini-triage\` | Run Issue Triage |
668-
| \`@gemini-coder <task>\` | Generate Code |
669-
| \`@create-review-issues\` | Create issues from review (PR only) |
670-
| \`@gemini-help\` | Show this help message |
671-
672-
[Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
663+
#### 🤖 [Gemini Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)
673664
branch: ${{ env.BRANCH }}
674665
base: leader
675666
delete-branch: true
@@ -694,15 +685,7 @@ jobs:
694685
'2. Click "Run workflow"\n' +
695686
'3. Enter task description and other details.\n\n' +
696687
'**Via GitHub CLI:**\n```bash\ngh workflow run gemini-coder.yml -f task_description="..."\n```\n\n' +
697-
'#### 🤖 Manual Trigger Quick Reference\n' +
698-
'| Command | Action |\n' +
699-
'| :--- | :--- |\n' +
700-
'| `@gemini-bot` | Run AI Code Review (PR only) |\n' +
701-
'| `@gemini-triage` | Run Issue Triage |\n' +
702-
'| `@gemini-coder <task>` | Generate Code |\n' +
703-
'| `@create-review-issues` | Create issues from review (PR only) |\n' +
704-
'| `@gemini-help` | Show this help message |\n\n' +
705-
'Full reference: [Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
688+
'#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
706689
'**To re-enable:** Set repository variable `GEMINI_ENABLE_CODER=true`';
707690
708691
github.rest.issues.createComment({

.github/workflows/gemini-triage.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ jobs:
135135
const path = require('path');
136136
const issue_number = parseInt(process.env.ISSUE_NUMBER);
137137
138-
const footer = '\n\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n' +
138+
const fullFooter = '\n\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n' +
139139
'| Command | Action |\n' +
140140
'| :--- | :--- |\n' +
141141
'| `@gemini-bot` | Run AI Code Review (PR only) |\n' +
@@ -145,6 +145,10 @@ jobs:
145145
'| `@gemini-help` | Show this help message |\n\n' +
146146
'[Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
147147
148+
const shortFooter = '\n\n---\n#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
149+
150+
const footer = (context.eventName === 'issues' && (context.payload.action === 'opened' || context.payload.action === 'reopened')) ? fullFooter : shortFooter;
151+
148152
try {
149153
const filePath = path.resolve(process.cwd(), 'triage_result.json');
150154
if (!fs.existsSync(filePath)) {

.github/workflows/pr-quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ jobs:
11181118
fi
11191119
11201120
# Create manual trigger footer
1121-
FOOTER="\n\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n| Command | Action |\n| :--- | :--- |\n| \`@gemini-bot\` | Run AI Code Review (PR only) |\n| \`@gemini-triage\` | Run Issue Triage |\n| \`@gemini-coder <task>\` | Generate Code |\n| \`@create-review-issues\` | Create issues from review (PR only) |\n| \`@gemini-help\` | Show this help message |\n\n[Manual Trigger Guide](https://github.com/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)"
1121+
FOOTER="\n\n---\n#### 🤖 [Gemini Manual Trigger Guide](https://github.com/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)"
11221122
11231123
COMMENT_BODY+="\n${SUMMARY_MSG}${FOOTER}\n\n---\n> Report generated for commit: \`${SHA}\`"
11241124

.github/workflows/pr-squash.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
content: 'confused'
160160
});
161161
162-
const footer = '\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n| Command | Action |\n| :--- | :--- |\n| `@gemini-bot` | Run AI Code Review (PR only) |\n| `@gemini-triage` | Run Issue Triage |\n| `@gemini-coder <task>` | Generate Code |\n| `@create-review-issues` | Create issues from review (PR only) |\n| `@gemini-help` | Show this help message |\n| `@pr-squash` | Squash PR commits (PR only) |\n| `@conflict-resolve` | Resolve merge conflicts (PR only) |\n\n[Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
162+
const footer = '\n---\n#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
163163
164164
await github.rest.issues.createComment({
165165
owner: context.repo.owner,
@@ -182,7 +182,7 @@ jobs:
182182
messageBody = '✅ Commits squashed successfully!';
183183
}
184184
185-
const footer = '\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n| Command | Action |\n| :--- | :--- |\n| `@gemini-bot` | Run AI Code Review (PR only) |\n| `@gemini-triage` | Run Issue Triage |\n| `@gemini-coder <task>` | Generate Code |\n| `@create-review-issues` | Create issues from review (PR only) |\n| `@gemini-help` | Show this help message |\n| `@pr-squash` | Squash PR commits (PR only) |\n| `@conflict-resolve` | Resolve merge conflicts (PR only) |\n\n[Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
185+
const footer = '\n---\n#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
186186
187187
await github.rest.reactions.createForIssueComment({
188188
owner: context.repo.owner,

.github/workflows/reusable-create-review-issues.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,7 @@ jobs:
6565
'3. Enter PR number: `' + context.payload.pull_request.number + '`\n' +
6666
'4. Enter Run ID from a successful review workflow.\n\n' +
6767
'**Via GitHub CLI:**\n```bash\ngh workflow run reusable-create-review-issues.yml -f pr_number=' + context.payload.pull_request.number + ' -f run_id=...\n```\n\n' +
68-
'#### 🤖 Manual Trigger Quick Reference\n' +
69-
'| Command | Action |\n' +
70-
'| :--- | :--- |\n' +
71-
'| `@gemini-bot` | Run AI Code Review (PR only) |\n' +
72-
'| `@gemini-triage` | Run Issue Triage |\n' +
73-
'| `@gemini-coder <task>` | Generate Code |\n' +
74-
'| `@create-review-issues` | Create issues from review (PR only) |\n' +
75-
'| `@gemini-help` | Show this help message |\n\n' +
76-
'Full reference: [Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
68+
'#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
7769
'**To re-enable:** Set repository variable `GEMINI_ENABLE_REVIEW_ISSUES=true`';
7870
7971
github.rest.issues.createComment({

.github/workflows/reusable-gemini-review.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ jobs:
427427
COMMIT_HASH_MSG="> Reviewed commit: \`${HEAD_SHA}\`"
428428
429429
# Create manual trigger footer
430-
FOOTER="\n\n---\n#### 🤖 Gemini Manual Trigger Quick Reference\n| Command | Action |\n| :--- | :--- |\n| \`@gemini-bot\` | Run AI Code Review (PR only) |\n| \`@gemini-triage\` | Run Issue Triage |\n| \`@gemini-coder <task>\` | Generate Code |\n| \`@create-review-issues\` | Create issues from review (PR only) |\n| \`@gemini-help\` | Show this help message |\n\n[Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)"
430+
FOOTER="\n\n---\n#### 🤖 [Gemini Manual Trigger Guide](${{ github.server_url }}/${{ github.repository }}/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)"
431431
432432
# Combine the header and the original comment
433433
FINAL_COMMENT="${COMMIT_HASH_MSG}\n\n${REVIEW_COMMENT}${FOOTER}"
@@ -499,15 +499,7 @@ jobs:
499499
'2. Click "Run workflow"\n' +
500500
'3. Enter PR number: `' + context.payload.pull_request.number + '`\n\n' +
501501
'**Via GitHub CLI:**\n```bash\ngh workflow run reusable-gemini-review.yml -f pr_number=' + context.payload.pull_request.number + '\n```\n\n' +
502-
'#### 🤖 Manual Trigger Quick Reference\n' +
503-
'| Command | Action |\n' +
504-
'| :--- | :--- |\n' +
505-
'| `@gemini-bot` | Run AI Code Review (PR only) |\n' +
506-
'| `@gemini-triage` | Run Issue Triage |\n' +
507-
'| `@gemini-coder <task>` | Generate Code |\n' +
508-
'| `@create-review-issues` | Create issues from review (PR only) |\n' +
509-
'| `@gemini-help` | Show this help message |\n\n' +
510-
'Full reference: [Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
502+
'#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)\n\n' +
511503
'**To re-enable:** Set repository variable `GEMINI_ENABLE_PR_REVIEW=true`';
512504
513505
github.rest.issues.createComment({
@@ -558,15 +550,7 @@ jobs:
558550
559551
if (triggerEvent === 'comment' || !shouldIgnore) {
560552
const body = '### 🤖 Gemini Review Skipped\n\nReview was skipped for the following reason: `' + skipReason + '`' +
561-
'\n\n#### 🤖 Manual Trigger Quick Reference\n' +
562-
'| Command | Action |\n' +
563-
'| :--- | :--- |\n' +
564-
'| `@gemini-bot` | Run AI Code Review (PR only) |\n' +
565-
'| `@gemini-triage` | Run Issue Triage |\n' +
566-
'| `@gemini-coder <task>` | Generate Code |\n' +
567-
'| `@create-review-issues` | Create issues from review (PR only) |\n' +
568-
'| `@gemini-help` | Show this help message |\n\n' +
569-
'[Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
553+
'\n\n#### 🤖 [Gemini Manual Trigger Guide](' + context.payload.repository.html_url + '/blob/leader/docs/workflows/MANUAL_TRIGGERS.md)';
570554
571555
github.rest.issues.createComment({
572556
owner: context.repo.owner,

app/client/spotify-selection/page.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,16 @@ const SpotifySelectionPage = () => {
4343
}
4444

4545
const handlePlaylistPlay = (uri: string) => {
46-
executeSpotify('PLAY', { playlistUri: uri })
46+
executeSpotify('PLAY', { contextUri: uri })
47+
}
48+
49+
const handleTrackPlay = (index: number) => {
50+
if (selectedPlaylistId) {
51+
executeSpotify('PLAY', {
52+
contextUri: `spotify:playlist:${selectedPlaylistId}`,
53+
offset: { position: index },
54+
})
55+
}
4756
}
4857

4958
return (
@@ -87,7 +96,7 @@ const SpotifySelectionPage = () => {
8796
{selectedPlaylistId && (
8897
<PlaylistDetails
8998
playlistId={selectedPlaylistId}
90-
onTrackPlay={handlePlaylistPlay}
99+
onTrackPlay={handleTrackPlay}
91100
/>
92101
)}
93102
</Container>

components/Playlist/PlaylistTracksDisplay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const PlaylistTracksDisplay = ({ playlistId }: PlaylistTracksDisplayProps) => {
150150
onClick={() =>
151151
isPlaying
152152
? handlePause()
153-
: handlePlayTrack(playlistUri, index)
153+
: handlePlayTrack(playlistUri, offset + index)
154154
}
155155
aria-label={isPlaying ? 'Pause' : 'Play'}
156156
>

0 commit comments

Comments
 (0)