Repository navigation
polish: release readiness for the dual-backend card #7
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
Changes from all commits
250319b
0f5c5a6
64aba49
7f7ceb5
e0806a5
3b6adca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ on: | |
| default: false | ||
|
|
||
| permissions: | ||
| actions: write | ||
| contents: write | ||
|
|
||
| concurrency: | ||
|
|
@@ -130,6 +131,48 @@ jobs: | |
| git push origin HEAD:${{ github.ref_name }} | ||
| git push origin "v${{ steps.version.outputs.version }}" | ||
|
|
||
| # A tag pushed with GITHUB_TOKEN never fires cicd.yml's push trigger | ||
| # (GitHub suppresses workflow runs caused by that token), so the build | ||
| # and release job is dispatched by hand on the tag ref and watched | ||
| # here until it finishes. | ||
| - name: Dispatch and watch the build and release | ||
| id: publish | ||
| if: ${{ !inputs.dry_run }} | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| TAG: v${{ steps.version.outputs.version }} | ||
| run: | | ||
| set -euo pipefail | ||
| candidate_sha="$(git rev-parse HEAD)" | ||
| before_id="$( | ||
| gh run list --workflow cicd.yml --event workflow_dispatch \ | ||
| --branch "${TAG}" --commit "${candidate_sha}" --limit 1 \ | ||
| --json databaseId --jq '.[0].databaseId // empty' | ||
| )" | ||
| gh workflow run cicd.yml --ref "${TAG}" -f release_run_id="${GITHUB_RUN_ID}" | ||
|
|
||
| run_id="" | ||
| for _ in {1..30}; do | ||
| candidate_id="$( | ||
| gh run list --workflow cicd.yml --event workflow_dispatch \ | ||
| --branch "${TAG}" --commit "${candidate_sha}" --limit 1 \ | ||
| --json databaseId --jq '.[0].databaseId // empty' | ||
| )" | ||
| if [[ -n "${candidate_id}" && "${candidate_id}" != "${before_id}" ]]; then | ||
| run_id="${candidate_id}" | ||
| break | ||
| fi | ||
| sleep 2 | ||
| done | ||
| if [[ -z "${run_id}" ]]; then | ||
| echo "::error::Timed out locating the cicd.yml run for ${TAG}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| run_url="$(gh run view "${run_id}" --json url --jq '.url')" | ||
| echo "run_url=${run_url}" >> "${GITHUB_OUTPUT}" | ||
| gh run watch "${run_id}" --exit-status | ||
|
|
||
| - name: Summary | ||
| run: | | ||
| echo "## Release ${{ inputs.dry_run && '[DRY RUN] ' || '' }}v${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY | ||
|
|
@@ -139,5 +182,5 @@ jobs: | |
| else | ||
| echo "Version bumped: ${{ steps.version.outputs.current }} -> ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "Tag pushed: v${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "The tag push will run cicd.yml and attach the release artifact." >> $GITHUB_STEP_SUMMARY | ||
| echo "Build and release run: ${{ steps.publish.outputs.run_url }}" >> $GITHUB_STEP_SUMMARY | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π©Ί Stability & Availability | π‘ Minor | β‘ Quick win π Supported by static analysisπ Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- release workflow ---'
sed -n '145,200p' .github/workflows/release.yml
printf '%s\n' '--- child workflow references ---'
rg -n -C 4 'workflow_dispatch|release_run_id|gh run watch|run_url|Summary|GITHUB_STEP_SUMMARY' .github/workflows/cicd.yml .github/workflows/release.ymlRepository: hyperb1iss/hyper-light-card Length of output: 6858 π Web query:
π‘ Result: In GitHub Actions, every step has an implicit Citations:
π Script executed: #!/bin/bash
set -eu
sed -n '115,190p' .github/workflows/release.ymlRepository: hyperb1iss/hyper-light-card Length of output: 3247 Keep the dispatched run URL visible when the child run fails.
π§° Toolsπͺ zizmor (1.29.0)[info] 185-185: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) π€ Prompt for AI Agents |
||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,9 +22,9 @@ _A dazzling custom card for controlling SignalRGB and Hypercolor lights through | |
| - π Effect switching with an intelligent dropdown menu that highlights and scrolls to the running effect | ||
| - β¨οΈ Keyboard-navigable selectors with visible focus rings | ||
| - βΉοΈ Rich effect info: description, publisher, and tag chips | ||
| - ποΈ Full effect controls: sliders, toggles, palette pickers, and color swatches | ||
| - ποΈ Live effect controls: sliders, toggles, and read-only palette and color swatches | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π Maintainability & Code Quality | π‘ Minor | β‘ Quick win Describe the color controls as editable. The README describes these controls as palette/color swatches, and the feature list calls them read-only. However, Proposed wording- - ποΈ Live effect controls: sliders, toggles, and read-only palette and color swatches
+ - ποΈ Live effect controls: sliders, toggles, and color pickers
- | `show_live_controls` | boolean | `true` | Show effect controls (sliders, toggles, palette and color swatches) |
+ | `show_live_controls` | boolean | `true` | Show effect controls (sliders, toggles, and color pickers) |Also applies to: 222-222 π€ Prompt for AI Agents |
||
| - π Layout and preset selection for SignalRGB | ||
| - π¬ Scenes and profiles for Hypercolor, with live runtime controls | ||
| - π¬ Scenes for Hypercolor, with live runtime controls | ||
| - πΊοΈ Scene zone controls for tuning each render group's brightness and power | ||
| - π§ Audio controls for toggling reactivity and picking the input device | ||
| - π°οΈ Status chips for FPS, audio reactivity, and connectivity (Hypercolor) | ||
|
|
@@ -140,7 +140,6 @@ name: 'Living Room' | |
| show_status_chips: true | ||
| show_live_controls: true | ||
| show_scene_select: true | ||
| show_profile_select: true | ||
| show_audio_controls: true | ||
| show_zones: true | ||
| show_per_device: false | ||
|
|
@@ -163,7 +162,6 @@ entity: light.hypercolor_hyperia | |
| backend: hypercolor | ||
| hypercolor: | ||
| scene_entity: select.hypercolor_hyperia_scene | ||
| profile_entity: select.hypercolor_hyperia_profile | ||
| stop_effect_entity: button.hypercolor_hyperia_stop_effect | ||
| fps_entity: sensor.hypercolor_hyperia_fps | ||
| connected_entity: binary_sensor.hypercolor_hyperia_connected | ||
|
|
@@ -221,8 +219,7 @@ These default to the device-scoped helpers exposed by the SignalRGB integration, | |
| | Option | Type | Default | Description | | ||
| | --------------------- | ------- | ------- | -------------------------------------------------------- | | ||
| | `show_scene_select` | boolean | `true` | Show the scene selector dropdown | | ||
| | `show_profile_select` | boolean | `false` | Show the profile selector dropdown | | ||
| | `show_live_controls` | boolean | `true` | Show effect controls (sliders, toggles, palette + color pickers) | | ||
| | `show_live_controls` | boolean | `true` | Show effect controls (sliders, toggles, palette and color swatches) | | ||
| | `show_audio_controls` | boolean | `true` | Show the audio-reactive toggle and input device selector (when present) | | ||
| | `show_zones` | boolean | `true` | Show scene zone controls for per-group brightness and power (when present) | | ||
| | `show_status_chips` | boolean | `true` | Show FPS, audio reactivity, and connectivity chips | | ||
|
|
@@ -242,7 +239,6 @@ discovery. | |
| | Option | Type | Description | | ||
| | ------------------------------ | -------- | ------------------------------------------------------- | | ||
| | `scene_entity` | string | Scene `select` entity | | ||
| | `profile_entity` | string | Profile `select` entity | | ||
| | `stop_effect_entity` | string | Stop-effect `button` entity | | ||
| | `fps_entity` | string | Render-rate `sensor` for the FPS chip | | ||
| | `connected_entity` | string | Daemon connectivity `binary_sensor` | | ||
|
|
@@ -264,13 +260,13 @@ hyper-light-card adapts to whichever backend it detects: | |
|
|
||
| - **Power Toggle**: Click the light icon to turn the light on or off. | ||
| - **Effect Selection**: Use the dropdown to choose from available effects. | ||
| - **Layout & Preset / Scene & Profile**: SignalRGB exposes layouts and presets; Hypercolor exposes scenes and (optionally) profiles. | ||
| - **Layout & Preset / Scene**: SignalRGB exposes layouts and presets; Hypercolor exposes scenes. | ||
| - **Effect Navigation**: Cycle through effects with next, previous, and random buttons. | ||
| - **Brightness Control**: Adjust brightness with the slider. | ||
| - **Live Controls**: Drag Hypercolor's intensity, speed, and parameter sliders without flooding the bus. Input is coalesced while you drag and committed on release. | ||
| - **Keyboard**: Tab to any selector, then Enter or Space to open it and to pick a row. | ||
| - **Status Chips**: Hypercolor surfaces FPS, audio reactivity, and connectivity at a glance. | ||
| - **Per-Device Drilldown**: Expand grouped Hypercolor installs to see and toggle each child light. | ||
| - **Per-Device Drilldown**: Expand grouped Hypercolor installs to see each child light's brightness and flash it with Identify. | ||
| - **Effect Info & Parameters**: Description, publisher, and current parameter values for the running effect. | ||
|
|
||
| The card pulls its accent palette from the running effect image, giving each effect its own coherent look. The extracted background is measured against the WCAG relative-luminance threshold to pick black or white foreground text, so labels stay readable on any cover art. | ||
|
|
||
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.
π©Ί Stability & Availability | π Major | β‘ Quick win
π Supported by static analysis
π Script executed:
Repository: hyperb1iss/hyper-light-card
Length of output: 12309
π Web query:
GitHub CLI gh run list --branch tag workflow_dispatch tag ref behavior REST API branch filterπ‘ Result:
In GitHub CLI, the
gh run list --branch(or-b) flag is used to filter workflow runs by branch [1][2][3]. Under the hood, this flag passes the provided value as abranchquery parameter to the GitHub REST API endpointGET /repos/{owner}/{repo}/actions/runs(or the specific workflow runs endpoint) [4][5][6]. Key behaviors regarding this filtering: 1. Branch Filtering Logic: The REST APIbranchparameter filters results by the name of the branch associated with the push event [4][5]. If you provide a branch name, the API returns only those workflow runs that occurred on that specific branch [5][7]. 2. Tags and Workflow Dispatch: Thegh run list --branchflag specifically filters by branch name [1][3]. It does not natively support filtering by Git tags or specific workflow_dispatch ref triggers directly through the CLI flag [1][8]. If you need to filter by a tag or a specific dispatch ref, the standard approach is to retrieve the data without the--branchfilter (potentially using--jsonto fetch relevant fields) and then perform client-side filtering using the--jqflag [8]. 3. JSON/JQ Workaround: Because the native CLI flags are limited to exact branch matching, you can use the following pattern to perform more complex filtering (such as excluding a branch or matching a tag) [8]: gh run list --json headBranch,event,displayTitle --jq 'map(select(.headBranch == "your-tag-or-branch-name"))' 4. Limitations: The branch filter is strictly for the branch name [8]. It does not support negation (e.g., "all branches except main") or regular expressions natively within the flag itself [8]. Additionally, users should be aware that results are dependent on the underlying GitHub API behavior, which may occasionally exhibit indexing delays [9]. In summary, whilegh run list --branchmaps directly to the REST API'sbranchquery parameter for branch-based filtering, it is not designed to filter by tags or complex ref patterns, for which client-side processing with--jqis required [5][8].Citations:
Remove the
--branch "${TAG}"filter from both run lookups.gh workflow run --ref "${TAG}"dispatchescicd.ymlon a tag, butgh run list --branchapplies the REST API branch filter. The tag-backedworkflow_dispatchrun may not match that filter, sorun_idremains empty and the release fails after the polling timeout. Identify the new run without the branch filter, then match its commit and event.π€ Prompt for AI Agents