Repository navigation
feat: pre-fill action params from a live status metric (currentFrom) - #553
Merged
Merged
Conversation
ActionParamSpec.currentFrom names a status metric (spec.capabilities.status.metrics[].id) whose live value pre-fills the param in the dashboard dialog, so a "set" action opens on the current setting. Optional, same pattern and length as a metric id. The CRD YAML was written to match controller-gen's output for these markers (codegen is not run on this machine; deepcopy needs no change for a string field), and hack/sync-chart-crds.sh restamped the chart copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NsN6bnAMRM9XQtrTQ6KC7U Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
The Set difficulty dialog opened on "normal" while Overview showed Easy (live sweep 2026-10-04). A param with currentFrom now takes that metric's live reading from the shared server-status query: enum options match case-insensitively, bool takes true/false, int an integer, else the default applies. Only the user's edits are state, so a reading that arrives after the dialog opened still pre-fills until the user picks a value. Tests cover the prefill, the user's choice winning and the no-match fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NsN6bnAMRM9XQtrTQ6KC7U Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NsN6bnAMRM9XQtrTQ6KC7U Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (25)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CI Report - 219539brun 37252928556 - attempt 1 0 failed - 18 passed - 2 skipped - 31m48s elapsed Coverage
Changed
Slowest jobs
e2e buckets run
|
Resolves the web/specs.md conflict with #549/#552: keep master's ServerStatusCard note ("—" when no game version) and this branch's ServerActionsCard currentFrom note. The chart CRD stamp is unchanged after the merge (master carried no CRD change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NsN6bnAMRM9XQtrTQ6KC7U Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
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
This adds an optional
currentFromto GameTemplate action params. It names a status metric, and the dashboard pre-fills the param from that metric's live reading when the action dialog opens. It fixes a 2026-10-04 live-sweep finding: Set difficulty opened on "normal" while Overview showed Easy.ActionParamSpec.currentFrom):operator/config/crd/gameplane.local_gametemplates.yaml.hack/sync-chart-crds.shrestamped the chart copies. Every chart CRD gets the new bundle hash; only gametemplates gains the property.ServerActionsCard.tsx):currentFromsubscribe to the sameserver-statusquery as the Status card. It is one cache entry, and it is enabled only when needed and RCON is available.enumparam takes the option that matches the reading case-insensitively, abooltakestrue/false, and aninttakes an integer. Otherwisedefaultapplies.docs/module-authoring.md(Actions) andweb/specs.md.currentFrom: difficultyto minecraft-java'sset-difficulty(2.9.0).Needs a reviewer's eye
make generateandmake manifestswere not run, because this machine builds nothing.StatusMetricSpecid property in that file.operator/config/crdand diffs them.make manifestson a dev machine should produce no diff. If it does, that run's output wins.modulespointer bump here: fix(modules): probe Terraria readiness without connecting #551 also moves the pointer, for the Terraria probe fix. Once both module PRs are merged, one pointer bump can cover both.currentFromnames a declared metric. An unknown id just leaves the default, as the docs say.Verification
gofmt -lis clean, andjq emptypasses on the module schema.🤖 Generated with Claude Code
https://claude.ai/code/session_01NsN6bnAMRM9XQtrTQ6KC7U