Skip to content

Document the dashboard definition schema in the cloud CLI docs - #2466

Merged
DjamilaBaroudi merged 5 commits into
mainfrom
docs-dashboard-definition-schema
Jul 29, 2026
Merged

Document the dashboard definition schema in the cloud CLI docs#2466
DjamilaBaroudi merged 5 commits into
mainfrom
docs-dashboard-definition-schema

Conversation

@DjamilaBaroudi

Copy link
Copy Markdown
Contributor

Local agents read commands/cloud.md (via the docs MCP) and get command syntax but no dashboard definition schema — so they reverse-engineer the state. One recent run invented a top-level tabs: block; tabs are actually a per-row tab: field, so that dashboard came out malformed.

Adds a "Dashboard definition" section to the dashboards docs:

  • top-level keys (name, connection, filters, rows)
  • row/widget shape (metric/chart/table, col grid, x/y/value encodings)
  • tabs are per-row tab: — no top-level tabs: key (the exact mistake seen)
  • a note that connection must be one the bound agent has
  • a worked YAML example

Docs only.

Local agents read commands/cloud.md via the docs MCP and had command
syntax but no definition schema, so they reverse-engineered the state and
guessed a top-level 'tabs:' block (tabs are actually a per-row 'tab:'
field). Add a definition schema section — top-level keys, row/widget shape,
tabs semantics, and a worked example — and note the connection must be one
the bound agent has.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread docs/commands/cloud.md Outdated
| `name` | yes | dashboard name |
| `connection` | for SQL widgets | a connection **the bound agent has** (see `bruin cloud connections list`). The canvas runs every widget's SQL against this connection; a name the agent doesn't have makes the queries fail |
| `description` | no | free text |
| `filters` | no | list of filter controls (see below) |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unresolved filters cross-reference

The filters entry says “see below,” but the section proceeds through rows, widgets, and the example without defining the filter-control shape, leaving readers and agents to infer that part of the dashboard schema.

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/commands/cloud.md
Line: 655

Comment:
**Unresolved filters cross-reference**

The `filters` entry says “see below,” but the section proceeds through rows, widgets, and the example without defining the filter-control shape, leaving readers and agents to infer that part of the dashboard schema.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Conductor

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Fix All in Conductor

Prompt To Fix All With AI
### Issue 1
docs/commands/cloud.md:655
**Unresolved filters cross-reference**

The `filters` entry says “see below,” but the section proceeds through rows, widgets, and the example without defining the filter-control shape, leaving readers and agents to infer that part of the dashboard schema.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "Document the dashboard definition schema..." | Re-trigger Greptile

The 'filters' row said 'see below' but no filter shape was documented.
Add a Filters section: fields (name/type/default/multiple/options), the
{{ filters.X }} SQL placeholder, and an example.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "Define the filter-control shape in the d..." | Re-trigger Greptile

Reconciled with dac/pkg/dashboard (the authoritative model + validator):
add the date-range type, its preset default, and the options connection
and presets fields that the earlier subset omitted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Reviews (3): Last reviewed commit: "Correct the filter schema against the da..." | Re-trigger Greptile

Comment thread docs/commands/cloud.md
|-------|-------------|
| `name` | referenced in SQL as `{{ filters.<name> }}` |
| `type` | `date`, `date-range`, `number`, `select`, or `text` |
| `default` | initial value. `date`: `TODAY`, `TODAY+/-N`, or `YYYY-MM-DD`; `date-range`: a preset string like `last_30_days` (resolves to a start/end pair); `select` with `multiple: true`: a list (`[]` = no filtering) |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Date-range endpoints remain undocumented

When an agent follows the documented {{ filters.<name> }} pattern for a date-range filter, it references the range as one SQL value instead of using its .start and .end values, causing invalid date comparisons or failed dashboard queries.

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/commands/cloud.md
Line: 706

Comment:
**Date-range endpoints remain undocumented**

When an agent follows the documented `{{ filters.<name> }}` pattern for a `date-range` filter, it references the range as one SQL value instead of using its `.start` and `.end` values, causing invalid date comparisons or failed dashboard queries.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Conductor

@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Fix All in Conductor

Prompt To Fix All With AI
### Issue 1
docs/commands/cloud.md:706
**Date-range endpoints remain undocumented**

When an agent follows the documented `{{ filters.<name> }}` pattern for a `date-range` filter, it references the range as one SQL value instead of using its `.start` and `.end` values, causing invalid date comparisons or failed dashboard queries.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (4): Last reviewed commit: "Merge branch 'main' into docs-dashboard-..." | Re-trigger Greptile

turtleDev
turtleDev previously approved these changes Jul 29, 2026
VitePress applies v-pre to fenced code but not inline code, so the inline
{{ filters.<name> }} was parsed as a Vue interpolation and failed the docs
build. Keep literal placeholders inside a fenced sql block. Also document
how SQL references each filter kind: single value, date-range .start/.end
(Greptile P1), and a guarded multi-select IN-list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Reviews (5): Last reviewed commit: "Fix docs build and document date-range/m..." | Re-trigger Greptile

@DjamilaBaroudi
DjamilaBaroudi merged commit fca8dfe into main Jul 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants