-
-
Notifications
You must be signed in to change notification settings - Fork 179
Add menu bar item triggers #735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alvst
wants to merge
24
commits into
stonerl:main
Choose a base branch
from
alvst:triggers-geofence-image-pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
724f99a
Add trigger automation and stabilize cursor moves
alvst bd8e950
Run SwiftFormat
alvst 30e4bc9
Update trigger roadmap documentation
alvst b120197
Fix SwiftLint for VPN trigger scan
alvst 8f7b728
Address CodeRabbit quick fixes
alvst 4512286
Avoid app menu hiding when Dock reserves space
alvst c18cc0b
Address remaining CodeRabbit recommendations
alvst f7a6450
Skip virtual display provoke when Dock reserves space
alvst 30877f5
Stabilize frontmost trigger moves
alvst 69a7382
Fix hidden bar move verification
alvst a6bdd34
Allow drops into badge-only layout sections
alvst 13eb10a
Improve trigger timing diagnostics
alvst ebd47df
Make app running triggers respond faster
alvst 867e762
Add app running trigger poll fallback
alvst 17e541f
Update strings for trigger and layout fixes
alvst 88f5ee4
UI improvements to Triggers
alvst 3d84629
Recover missing menu bar source PID
alvst 4c4706e
Improve trigger scheduling and diagnostics
alvst 33dd723
Fix cursor warps across external displays
alvst 893f985
Remove profile layout cursor restore
alvst 2701caf
Restore pre-fix cursor behavior
alvst b092735
Instrument cursor warp diagnostics
alvst d4b525f
Keep cursor hidden across move retries
alvst cf8cbe1
Back off failed pending cursor moves
alvst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: Remove Skipped Workflow Runs | ||
| on: | ||
| workflow_dispatch: | ||
| jobs: | ||
| remove-skipped-runs: | ||
| runs-on: ubuntu-slim | ||
| permissions: | ||
| actions: write | ||
| steps: | ||
| - name: Remove Skipped Workflow Runs | ||
| uses: actions/github-script@v9 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| const runs = await github.paginate( | ||
| github.rest.actions.listWorkflowRunsForRepo, | ||
| { | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| status: "skipped", | ||
| per_page: 100, | ||
| }, | ||
| ); | ||
|
|
||
| let deletedCount = 0; | ||
| let failedCount = 0; | ||
|
|
||
| for (const run of runs) { | ||
| try { | ||
| await github.rest.actions.deleteWorkflowRun({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| run_id: run.id, | ||
| }); | ||
| deletedCount++; | ||
| } catch (error) { | ||
| console.error(`Error deleting workflow run: ${error.message}`); | ||
| failedCount++; | ||
| } | ||
| } | ||
| console.log(`Deleted skipped workflow runs: ${deletedCount}`); | ||
| console.log(`Failed to delete workflow runs: ${failedCount}`); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error handling for pagination failures and improve logging.
The workflow has two error handling gaps:
Pagination failures not caught (line 15): If
github.paginate()throws an error (e.g., API rate limit, network timeout), the entire script fails silently. Wrap it in try/catch.Limited deletion auditing (lines 28-40): Only counts are logged; individual run IDs are not recorded. If something goes wrong, there's no way to verify which runs were deleted or retry failures.
No rate limiting (line 28): Attempting to delete many runs in quick succession could trigger GitHub API throttling.
Consider adding per-deletion delays (
await new Promise(r => setTimeout(r, 100))) and logging individual run IDs for audit trails.💡 Suggested improvements
📝 Committable suggestion
🤖 Prompt for AI Agents