Accept a scalar table-column format as a legacy alias for number - #53
Merged
TanayBensuYurtturk merged 2 commits intoJul 30, 2026
Merged
Conversation
…lias for `number` A table column's `format` is now polymorphic: a scalar string is the legacy value-display shorthand (folded into `number` on load), a list is the ordered conditional-format layers. A custom UnmarshalYAML plus a `oneOf` schema keep pre-existing `format: currency` dashboards valid, while `number` and a list `format` can coexist (value display + coloring). Adds a backward-compat test and documents the alias in the skill and docs.
Prompt To Fix All With AI### Issue 1
pkg/dashboard/model.go:183
**YAML aliases are rejected**
When a table column's `format` uses a YAML alias to a valid scalar or layer sequence, this switch sees an alias node and enters the error branch, causing the dashboard to fail loading instead of decoding the anchored value.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(dashboards): accept a scalar table-..." | Re-trigger Greptile |
A `format: *anchor` alias node hit the error branch instead of decoding the anchored scalar/sequence, failing the load. Follow the alias to its target before dispatching. Also simplifies the unmarshaler (anonymous struct, single struct assignment) and adds an alias regression test.
|
Reviews (2): Last reviewed commit: "fix(dashboards): resolve YAML aliases in..." | Re-trigger Greptile |
baharkyc
approved these changes
Jul 30, 2026
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.
Makes a table column's
formatpolymorphic so pre-existing dashboards keep working.formatstring (e.g.format: currency) is the legacy value-display shorthand — a customUnmarshalYAMLfolds it intonumberon load.formatis the ordered conditional-format layers (unchanged).formatis nowoneOf(string, array);numberis retained, sonumberand a listformatcan coexist (value display + coloring on the same column).Adds a backward-compat unmarshal test and documents the alias in the create-dashboard skill and dashboard docs.