Skip to content

chore: splitting icons into standalone components#55

Merged
drehelis merged 3 commits intomainfrom
reusable_release_gha
Apr 4, 2026
Merged

chore: splitting icons into standalone components#55
drehelis merged 3 commits intomainfrom
reusable_release_gha

Conversation

@drehelis
Copy link
Copy Markdown
Owner

@drehelis drehelis commented Apr 4, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 4, 2026 11:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the release GitHub Actions workflow to call a reusable workflow, while also adding a “Buy Me a Coffee” link to the UI with theme support.

Changes:

  • Switch .github/workflows/release.yml to use a reusable workflow with inputs and inherited secrets.
  • Add a Buy Me a Coffee URL constant and surface it in the status bar with a themed color token.
  • Adjust mobile UI behavior in EditorTabs.vue (GitHub link/divider visibility).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/index.css Adds CSS variable mapping/color to theme the new Buy Me a Coffee link.
src/constants/urls.ts Introduces URLS.BUY_ME_A_COFFEE for external linking.
src/components/layout/StatusBar.vue Updates GitHub link hover styling and adds a new Buy Me a Coffee icon/link.
src/components/layout/EditorTabs.vue Makes the divider + GitHub repo link conditional for mobile.
.github/workflows/release.yml Replaces inline release steps with a reusable workflow call.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

:href="URLS.BUY_ME_A_COFFEE"
target="_blank"
rel="noopener noreferrer"
class="transition-colors flex items-center gap-1 group text-ide-bmc hover:opacity-80"
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

This class list uses transition-colors, but the hover effect changes opacity (hover:opacity-80) rather than color. Switch to transition-opacity (or add an actual color transition) to match the behavior.

Suggested change
class="transition-colors flex items-center gap-1 group text-ide-bmc hover:opacity-80"
class="transition-opacity flex items-center gap-1 group text-ide-bmc hover:opacity-80"

Copilot uses AI. Check for mistakes.

<div class="w-px h-3 bg-ide-border mx-1"></div>
<div v-if="isMobile" class="w-px h-3 bg-ide-border mx-1"></div>

Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

There appears to be trailing whitespace on this blank line (shows up in the diff as a line with spaces). Please remove it to keep formatting/lint clean.

Suggested change

Copilot uses AI. Check for mistakes.
gh release create $NEW_VERSION \
--target main \
-t $NEW_VERSION
uses: drehelis/improved-chainsaw/.github/workflows/release.yml@main
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The reusable workflow is referenced by branch (@main). For security and supply-chain safety, pin reusable workflow references to an immutable tag or commit SHA so a future change on main cannot unexpectedly alter your release process.

Suggested change
uses: drehelis/improved-chainsaw/.github/workflows/release.yml@main
uses: drehelis/improved-chainsaw/.github/workflows/release.yml@<40-character-commit-sha>

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +33
jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: "Update Dev Container Index"
run: bash ./scripts/update-data.sh

- name: "Bump to new version"
id: bump
run: |
_version=$(npm --no-git-tag-version version ${{ github.event.inputs.version || 'patch' }})

echo "new_version=$_version" >> $GITHUB_OUTPUT
echo "New version: $_version"

- name: "Create Pull Request"
id: cpr
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.RELEASE_PAT }}
title: "chore(release): bump version to ${{ env.NEW_VERSION }}"
body: "chore(release): bump version to ${{ env.NEW_VERSION }}"
commit-message: "chore(release): bump version to ${{ env.NEW_VERSION }}"
branch: "release-${{ env.NEW_VERSION }}"
delete-branch: true
env:
NEW_VERSION: ${{ steps.bump.outputs.new_version }}

- name: "Auto-merge PR"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}"

- name: "Wait for PR to merge"
if: steps.cpr.outputs.pull-request-number != ''
timeout-minutes: 3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
run: |
while true; do
STATE=$(gh pr view "$PR_NUMBER" --json state --template '{{.state}}')
if [ "$STATE" == "MERGED" ]; then
echo "PR merged."
break
fi
if [ "$STATE" == "CLOSED" ]; then
echo "PR closed without merging."
exit 1
fi
echo "State: $STATE. Waiting 3s..."
sleep 3
done

- name: "Release"
if: steps.cpr.outputs.pull-request-number != ''
env:
# https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow#triggering-a-workflow-from-a-workflow
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
NEW_VERSION: ${{ steps.bump.outputs.new_version }}
run: |
gh release create $NEW_VERSION \
--target main \
-t $NEW_VERSION
uses: drehelis/improved-chainsaw/.github/workflows/release.yml@main
with:
version: ${{ github.event.inputs.version || 'patch' }}
pre_release_command: "bash ./scripts/update-data.sh"
timeout_minutes: 5
secrets: inherit No newline at end of file
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

PR title indicates this is about the GitHub Actions release workflow, but this PR also adds UI/CSS changes (Buy Me a Coffee link and theme variable). Either split these into separate PRs or update the PR title/description so the scope matches what's being changed.

Copilot uses AI. Check for mistakes.
@drehelis drehelis changed the title chore(gha): reusable release chore: splitting icons into standalone components Apr 4, 2026
@drehelis drehelis requested a review from Copilot April 4, 2026 12:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 30 out of 30 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

stroke-linecap="round"
stroke-linejoin="round"
class="icon-base"
v-bind="$attrs"
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

v-bind="$attrs" on the <svg> root can cause attributes/listeners to be applied twice because Vue already falls through non-prop attributes to the root element by default. This can lead to duplicated event handler invocation (e.g., a passed @click) and confusing attribute merging. Consider removing the explicit v-bind="$attrs", or set defineOptions({ inheritAttrs: false }) and keep the manual binding (one or the other, not both).

Suggested change
v-bind="$attrs"

Copilot uses AI. Check for mistakes.
Comment on lines 109 to +118
<span>UTF-8</span>
<a
:href="URLS.REPO_URL"
target="_blank"
rel="noopener noreferrer"
class="hover:text-ide-accent transition-colors flex items-center gap-1 group"
title="GitHub Profile"
class="hover:text-ide-text-bright transition-colors flex items-center gap-1 group"
title="GitHub Repository"
>
<svg
class="w-3.5 h-3.5 opacity-70 group-hover:opacity-100"
fill="currentColor"
viewBox="0 0 24 24"
>
<path
d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-11.999-12-11.999z"
/>
</svg>
<IconGithub size="14" class="opacity-70 group-hover:opacity-100" />
</a>
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

This icon-only link relies on title for labeling. For accessibility, provide an explicit accessible name (e.g., aria-label="GitHub Repository") so screen readers and non-hover devices have a reliable label.

Copilot uses AI. Check for mistakes.
Comment on lines +120 to 128
<a
:href="URLS.BUY_ME_A_COFFEE"
target="_blank"
rel="noopener noreferrer"
class="transition-colors flex items-center gap-1 group text-ide-bmc hover:opacity-80"
title="Buy me a coffee"
>
<IconCoffee size="14" />
</a>
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

This icon-only link relies on title for labeling. For accessibility, add an aria-label (e.g., "Buy me a coffee") so the link has a reliable accessible name across screen readers and touch devices.

Copilot uses AI. Check for mistakes.
Comment on lines 26 to +33
jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: "Update Dev Container Index"
run: bash ./scripts/update-data.sh

- name: "Bump to new version"
id: bump
run: |
_version=$(npm --no-git-tag-version version ${{ github.event.inputs.version || 'patch' }})

echo "new_version=$_version" >> $GITHUB_OUTPUT
echo "New version: $_version"

- name: "Create Pull Request"
id: cpr
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.RELEASE_PAT }}
title: "chore(release): bump version to ${{ env.NEW_VERSION }}"
body: "chore(release): bump version to ${{ env.NEW_VERSION }}"
commit-message: "chore(release): bump version to ${{ env.NEW_VERSION }}"
branch: "release-${{ env.NEW_VERSION }}"
delete-branch: true
env:
NEW_VERSION: ${{ steps.bump.outputs.new_version }}

- name: "Auto-merge PR"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}"

- name: "Wait for PR to merge"
if: steps.cpr.outputs.pull-request-number != ''
timeout-minutes: 3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
run: |
while true; do
STATE=$(gh pr view "$PR_NUMBER" --json state --template '{{.state}}')
if [ "$STATE" == "MERGED" ]; then
echo "PR merged."
break
fi
if [ "$STATE" == "CLOSED" ]; then
echo "PR closed without merging."
exit 1
fi
echo "State: $STATE. Waiting 3s..."
sleep 3
done

- name: "Release"
if: steps.cpr.outputs.pull-request-number != ''
env:
# https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow#triggering-a-workflow-from-a-workflow
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
NEW_VERSION: ${{ steps.bump.outputs.new_version }}
run: |
gh release create $NEW_VERSION \
--target main \
-t $NEW_VERSION
uses: drehelis/improved-chainsaw/.github/workflows/release.yml@main
with:
version: ${{ github.event.inputs.version || 'patch' }}
pre_release_command: "bash ./scripts/update-data.sh"
timeout_minutes: 5
secrets: inherit
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The reusable workflow is referenced via @main, which is mutable and increases supply-chain risk. Prefer pinning to a tag or (ideally) a specific commit SHA so the release pipeline can’t change unexpectedly.

Copilot uses AI. Check for mistakes.
Comment on lines 22 to +33
- minor
- major

permissions:
contents: write
pull-requests: write

concurrency:
group: "release"
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: "Update Dev Container Index"
run: bash ./scripts/update-data.sh

- name: "Bump to new version"
id: bump
run: |
_version=$(npm --no-git-tag-version version ${{ github.event.inputs.version || 'patch' }})

echo "new_version=$_version" >> $GITHUB_OUTPUT
echo "New version: $_version"

- name: "Create Pull Request"
id: cpr
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.RELEASE_PAT }}
title: "chore(release): bump version to ${{ env.NEW_VERSION }}"
body: "chore(release): bump version to ${{ env.NEW_VERSION }}"
commit-message: "chore(release): bump version to ${{ env.NEW_VERSION }}"
branch: "release-${{ env.NEW_VERSION }}"
delete-branch: true
env:
NEW_VERSION: ${{ steps.bump.outputs.new_version }}

- name: "Auto-merge PR"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}"

- name: "Wait for PR to merge"
if: steps.cpr.outputs.pull-request-number != ''
timeout-minutes: 3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
run: |
while true; do
STATE=$(gh pr view "$PR_NUMBER" --json state --template '{{.state}}')
if [ "$STATE" == "MERGED" ]; then
echo "PR merged."
break
fi
if [ "$STATE" == "CLOSED" ]; then
echo "PR closed without merging."
exit 1
fi
echo "State: $STATE. Waiting 3s..."
sleep 3
done

- name: "Release"
if: steps.cpr.outputs.pull-request-number != ''
env:
# https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow#triggering-a-workflow-from-a-workflow
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
NEW_VERSION: ${{ steps.bump.outputs.new_version }}
run: |
gh release create $NEW_VERSION \
--target main \
-t $NEW_VERSION
uses: drehelis/improved-chainsaw/.github/workflows/release.yml@main
with:
version: ${{ github.event.inputs.version || 'patch' }}
pre_release_command: "bash ./scripts/update-data.sh"
timeout_minutes: 5
secrets: inherit
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

This workflow no longer sets permissions/concurrency locally. For reusable workflows, the called workflow’s GITHUB_TOKEN permissions are constrained by the caller, and missing concurrency can allow overlapping releases. Consider reintroducing explicit permissions (e.g., contents/pull-requests write if needed) and a release concurrency group here to avoid relying on repo defaults.

Copilot uses AI. Check for mistakes.
@drehelis drehelis merged commit 731a03e into main Apr 4, 2026
8 checks passed
@drehelis drehelis deleted the reusable_release_gha branch April 4, 2026 12:10
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.

2 participants