feat(trogonstack-datadog): add dashboard tab reference#41
Conversation
…into skill workflow Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
PR SummaryLow Risk Overview Adds a new Reviewed by Cursor Bugbot for commit 00869ea. Bugbot is set up for automated code reviews on this repo. Configure here. |
WalkthroughThis pull request adds comprehensive documentation for dashboard tab organization to the datadog-design-dashboard skill. It updates the skill description to include tab organization coverage, introduces workflow steps for designing and auditing tabs, extends anti-pattern guidance, and provides a new reference document specifying JSON structure, field requirements, and provider behavior for dashboard tabs. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/tabs.md (1)
56-63: Clarify the “includetab.idexplicitly” guidance vs deterministic provider injection.The field reference says:
idis optional, and- “Include explicitly for stability across applies.”
But later the provider internals section claims the provider injects deterministic UUIDs when a tab is missing an
id. If that’s true, “include explicitly” is at best redundant, and at worst could confuse users about what stability depends on.✅ Proposed wording adjustment
| `id` | string (UUID) | no | Auto-generated by the Terraform provider using `uuid5(Nil, "tab-{index}")`. Include explicitly if you want `id` present in your JSON for readability/audit, but the provider will also populate it deterministically when omitted.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/tabs.md` around lines 56 - 63, Update the Field reference to clarify that the `id` field is optional because the provider will inject a deterministic UUID when missing (using `uuid5(Nil, "tab-{index}")`), but users may still supply `tab.id` explicitly if they prefer to control stability across applies or for portability; replace "Include explicitly for stability across applies." with a short note stating: provider generates deterministic `id` when omitted, explicit `id` is optional but can be provided to guarantee user-controlled stability.plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/layouts.md (1)
331-344: Minor wording alignment: “Service Health” vs “Business or Service Health”.
tabs.mdrecommends tab labels like “Business” or “Service Health”, butlayouts.mdhardcodes “Service Health” in the anti-pattern guidance. To avoid inconsistency, consider matching the nomenclature used in the main tabs reference (or explicitly state that the first tab is typically “Business/Service Health”).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/layouts.md` around lines 331 - 344, The phrase "Service Health" in the table row that suggests organizing groups into tabs ("Organize groups into tabs by observability layer (Service Health, Platform, Infrastructure)") is inconsistent with tabs.md which uses "Business or Service Health"; update the wording so the tabs reference matches tabs.md — e.g., change "Service Health" to "Business or Service Health" or add a parenthetical like "(Business/Service Health)" in the table entry to align nomenclature with tabs.md and avoid confusion.plugins/trogonstack-datadog/skills/datadog-design-dashboard/SKILL.md (1)
127-132: Align tab audit threshold with the anti-pattern cutoff (7+ vs 13+).Right now:
Consider tabsandAudit tab organizationboth say “if 7+ top-level groups…”.layouts.mdencodes the “hard” anti-pattern as 13+ groups without tabs.This can cause the audit step to flag/complain about missing tabs in dashboards with, say, 8–12 groups—where your own guidance says “consider tabs” (evaluation), not necessarily “tabs required”.
✅ Proposed approach
Option A (minimal): keep Step 5 as-is, but change Step 7 to “13+ top-level groups without tabs” (or explicitly say “warn at 7+, fail at 13+”).
-If the dashboard has 7+ top-level groups, check whether tabs are in use. +If the dashboard has 13+ top-level groups, check whether tabs are in use.Option B (more nuanced): keep 7+ but reword items to “flag as opportunity” instead of implying a strict requirement.
Also applies to: 270-277
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@plugins/trogonstack-datadog/skills/datadog-design-dashboard/SKILL.md` around lines 127 - 132, Update the tab-audit thresholds so guidance is consistent: change the text under the "Consider tabs" and "Audit tab organization" sections in SKILL.md to align with the hard anti-pattern encoded in layouts.md by making the failure threshold 13+ top-level groups (or explicitly state "warn at 7+, fail at 13+"); alternatively rephrase the 7+ language to present it as a "consideration/opportunity" rather than a requirement. Ensure you adjust both occurrences mentioned (the "Consider tabs" heading and the "Audit tab organization" paragraph) and any related guidance around lines referenced (270-277) so messaging is consistent with layouts.md.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/tabs.md`:
- Around line 64-75: Add an explicit warning that `@N` references are tied to
the positional order of the top-level `widgets` array and that reordering that
array will change which widget each `@N` points to (breaking tab assignments);
update the section around `@N` and `widgets` to state that changing the
`widgets` array order after creation will remap `@N` values, and advise keeping
widget order stable (or using explicit provider-supported IDs/annotations) and
verifying Terraform reads (the provider converts API integer IDs back to `@N`)
when reorganizing widgets.
---
Nitpick comments:
In
`@plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/layouts.md`:
- Around line 331-344: The phrase "Service Health" in the table row that
suggests organizing groups into tabs ("Organize groups into tabs by
observability layer (Service Health, Platform, Infrastructure)") is inconsistent
with tabs.md which uses "Business or Service Health"; update the wording so the
tabs reference matches tabs.md — e.g., change "Service Health" to "Business or
Service Health" or add a parenthetical like "(Business/Service Health)" in the
table entry to align nomenclature with tabs.md and avoid confusion.
In
`@plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/tabs.md`:
- Around line 56-63: Update the Field reference to clarify that the `id` field
is optional because the provider will inject a deterministic UUID when missing
(using `uuid5(Nil, "tab-{index}")`), but users may still supply `tab.id`
explicitly if they prefer to control stability across applies or for
portability; replace "Include explicitly for stability across applies." with a
short note stating: provider generates deterministic `id` when omitted, explicit
`id` is optional but can be provided to guarantee user-controlled stability.
In `@plugins/trogonstack-datadog/skills/datadog-design-dashboard/SKILL.md`:
- Around line 127-132: Update the tab-audit thresholds so guidance is
consistent: change the text under the "Consider tabs" and "Audit tab
organization" sections in SKILL.md to align with the hard anti-pattern encoded
in layouts.md by making the failure threshold 13+ top-level groups (or
explicitly state "warn at 7+, fail at 13+"); alternatively rephrase the 7+
language to present it as a "consideration/opportunity" rather than a
requirement. Ensure you adjust both occurrences mentioned (the "Consider tabs"
heading and the "Audit tab organization" paragraph) and any related guidance
around lines referenced (270-277) so messaging is consistent with layouts.md.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 88b06945-8713-4e89-8725-1f753e0eb8b3
📒 Files selected for processing (3)
plugins/trogonstack-datadog/skills/datadog-design-dashboard/SKILL.mdplugins/trogonstack-datadog/skills/datadog-design-dashboard/references/layouts.mdplugins/trogonstack-datadog/skills/datadog-design-dashboard/references/tabs.md
Summary
tab_name/tab_idvsname/id), and adding tabs triggers strict widget ID uniqueness validation that previously didn't exist@Npositional reference system, Terraform provider internals, and common mistakes into a new reference doc