feat(github-actions-grafana-jump): make the jump button fully generic (rebase of #24) - #27
Merged
Merged
Conversation
Reworks the Grafana jump button so no Grafana instance, dashboard UID, or template-variable name is baked into the script. This also removes the reason the script's header previously said it was intentionally NOT published to GreasyFork (baked-in internal Oura infra links) - that constraint is gone now that it's fully user-configured, though whether/how to actually publish is a separate decision. Behavior: - Not configured yet -> the jump button opens an in-page config panel (not a native prompt) to set a Grafana base URL and one or more dashboards, each with whichever template-variable names it uses for filtering by branch/PR/workflow/runner. - Configured -> jumps straight to the first applicable dashboard for the current page, with a small "▾" menu to jump to a different configured dashboard or reopen the config panel. - Config persists via GM.setValue/GM.getValue (@grant changed from `none` to GM.setValue/GM.getValue accordingly), scoped to this script/browser. The existing context-detection logic (parsePrContext, parseBranchContext, parseRunnerContext, parseWorkflowContext, resolveJumpContext, extractBranchFromQuery) is untouched. New pure, unit-tested logic: contextVarKey/contextFilterValue (map a context to its filter field/value), applicableDashboards (which configured dashboards can handle this context), buildJumpUrl (per-dashboard URL building), defaultConfig/normalizeConfig/isConfigured (config lifecycle). test/grafana-jump.test.js updated accordingly - all 22 tests pass against the built dist/. tsconfig.json: added an explicit "types": ["node", "greasemonkey"] override. Under this repo's moduleResolution setting, tsc doesn't reliably auto-discover @types packages from node_modules/@types the way it does under other resolution modes, and this is now the one package that references both @types/node's `module` (existing test-export guard) and @types/greasemonkey's `GM` global. Deliberately left alone per the task: the still-unconfirmed TODO(nathan) about the two Oura dashboards' real template-variable names is moot for the shipped script now (no dashboard config ships by default at all - users fill in their own), but is not being resolved as a general finding one way or the other; it just no longer applies to this file's own contents. Not touched, pending a separate decision: @downloadURL/@updateURL and the changeset/publish wiring. Generic now, but publishing is a follow-up call, not assumed here.
Userscript Version PreviewPreview only — versions and CHANGELOGs are bumped automatically on merge to
|
nsheaps-oura
marked this pull request as ready for review
August 3, 2026 22:25
…n preview The version-preview report skipped github-actions-grafana-jump entirely because the opted_in gate ran before the manual-bump check, so this PR's own 0.1.0 -> 0.2.0 bump never showed up - it just said 'no package changes detected'. Detect the bump for every package now, matching the simpler per-package version diff ai-mktpl's _preview-version-bumps task does, and report internal-only packages as 'manual (internal)' rather than silently dropping them. They still don't enter has_bumps/bumps, since there's no release-it config or built script.user.js for the release job to publish.
4 tasks
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
Rebases #24 onto current
mainnow that #23 (the TypeScript 6.0.3moduleResolutionCI fix) has merged. #24's CI was failing purely on that stale-base issue, not on its own content.prompt()) to set a Grafana base URL and one or more dashboards, each with whichever template-variable names it uses for filtering by branch/PR/workflow/runner.GM.setValue/GM.getValue(@grantchanged fromnonetoGM.setValue/GM.getValue).@downloadURL/@updateURLand changeset/publish wiring are intentionally untouched, left for a follow-up decision.The existing context-detection logic (
parsePrContext,parseBranchContext,parseRunnerContext,parseWorkflowContext,resolveJumpContext,extractBranchFromQuery) is untouched from #24.What changed vs. #24
Only the two mechanical conflicts from rebasing onto
main(which already carries #23's fix):package.json: kepttypescript: ~6.0.3(from fix(ci): restore main's ability to build under typescript 6.0.3 #23) alongside feat(github-actions-grafana-jump): make the jump button fully generic #24's version bump to0.2.0.tsconfig.json: both branches independently added the identical"types": ["node", "greasemonkey"]fix with different comment wording — keptmain's wording, no functional difference.src/index.tsand the test file are otherwise byte-for-byte identical to #24.Test plan
tsc --buildandnode --test test/*.test.jspassed on feat(github-actions-grafana-jump): make the jump button fully generic #24 prior to rebase (22 unit tests, per feat(github-actions-grafana-jump): make the jump button fully generic #24's own test plan)git merge-tree/rebase thatsrc/index.tsand the test file carried over with zero conflictsmainSupersedes #24.
🤖 Generated with Claude Code
Generated by Claude Code