feat: add GitHub Actions to Grafana jump buttons (ADX-525) - #4
Merged
Merged
Conversation
…-button userscript Adds a new package that shows a fixed-position "Grafana↗️ " button on github.com Actions pages, covering the three ADX-525 contexts: a PR's workflow runs, a single workflow's runs across branches, and a self-hosted runner's detail page (repo- or org-scoped). Uses a floating button rather than anchoring inline to a page toolbar, since GitHub's Actions/PR toolbars are styled with hashed Primer React CSS-module class names (confirmed by inspecting the live DOM) that aren't safe to hardcode as selectors. The Grafana base URL and dashboard UIDs are real, sourced from existing internal docs cataloging the target Grafana folder. The per-dashboard template-variable names are explicitly flagged as unconfirmed placeholders pending verification against the live dashboards.
… and URL building Covers the pure logic extracted in src/index.ts: parsing a PR, branch, runner, or workflow context out of location.pathname/search, and building the resulting Grafana dashboard URL (including the var-* query-param encoding). Run with `node:test` via the package's own `test` script (`tsc --build && node --test test/*.test.js`) - no new dependencies.
This was referenced Jul 24, 2026
nsheaps-oura
added a commit
that referenced
this pull request
Jul 27, 2026
## Summary `main`'s CI has failed on **every push since 2026-07-21** (~10 commits, including the just-merged ADX-525 Grafana jump buttons feature, #4). Three independent, compounding causes, all fixed here: - **`tsconfig.base.json`**: `moduleResolution: "node"` (deprecated alias for `node10`) is a hard error under TypeScript 6.0.3 (`TS5107`, removed entirely in 7.0). Switched to `"bundler"`, the modern pairing for `module: ESNext` — no package in this repo does external imports, so this has zero effect on compiled output. - **`packages/github-actions-grafana-jump/tsconfig.json`**: under `moduleResolution: bundler`, `tsc` no longer auto-includes ambient globals from `node_modules/@types` the way it did under `"node"`. This package's `typeof module` test-export guard and `GM.*` API calls need an explicit `"types": ["node", "greasemonkey"]` to keep resolving. - **`packages/github-actions-grafana-jump/package.json`**: still declared `"typescript": "~5.8.3"` — a stale copy from before the org-wide v6 bump, since this package was only added later via the ADX-525 PR and never got Renovate's bump. That mismatch against every other package's `~6.0.3` left `yarn.lock` without a consistent resolution, so `yarn install --immutable` (what CI actually runs) failed outright on some runs before ever reaching a TypeScript compile. Bumped to match; `yarn.lock` regenerated accordingly. Also cherry-picked `4a38bf0` (from the still-open PR #7) to restore `packages/graphite-to-github-button/src/index.ts`, which has been missing from `main` since `4fc2806` renamed it straight to `dist/script.user.js` without ever compiling it — `tsc --build` for that package has been failing with "No inputs were found" independent of the typescript v6 issue, since before the v6 bump even landed. ## Test plan - [x] `yarn install --immutable` succeeds (this is what CI runs, and was failing before this change) - [x] `nx run-many --target=build --all --skip-nx-cache` succeeds for all 5 packages, cache bypassed - [x] `github-actions-grafana-jump`'s existing 14 unit tests pass - [x] Confirmed `packages/graphite-to-github-button/dist/script.user.js` (the already-committed, force-added artifact) is untouched by this change — bringing it back in sync with the now-restored `src/index.ts` is left to PR #7, which already does that plus its own separate regen-dist workflow generalization - [ ] CI green on this PR (will confirm once checks run) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
@nsheaps/gm-github-actions-grafana-jump, a userscript that shows a fixed "Grafanalocation.pathname/location.searchrather than a specific page toolbar, since GitHub's Actions/PR toolbars use hashed Primer React CSS-module class names (confirmed live) that aren't stable to hardcode as selectors.monitoring.oura.cloud) and dashboard UIDs (pagrf6j"CI/DevX report dashboard",pap5g6z"Android & iOS CI") are real, sourced from existing internal docs cataloging the target Grafana folder. The per-dashboard template-variable names used to filter by branch/PR/workflow/runner are explicitly flagged as unconfirmed placeholders (seeTODO(nathan)comment insrc/index.ts) pending verification against the live dashboard JSON.Linear: ADX-525
Test plan
tsc --buildpasses for the new packageoxlintpasses with 0 warnings/errorsnode --test test/*.test.js— 14/14 unit tests pass, covering context parsing (PR/branch/runner/workflow) and Grafana URL building