Skip to content

feat(trogonstack-datadog): add dashboard tab reference#41

Merged
yordis merged 1 commit intomainfrom
yordis/feat-datadog-dashboard-tabs
Apr 27, 2026
Merged

feat(trogonstack-datadog): add dashboard tab reference#41
yordis merged 1 commit intomainfrom
yordis/feat-datadog-dashboard-tabs

Conversation

@yordis
Copy link
Copy Markdown
Member

@yordis yordis commented Apr 27, 2026

Summary

  • Datadog dashboard tabs are underdocumented — the official API docs use wrong field names (tab_name/tab_id vs name/id), and adding tabs triggers strict widget ID uniqueness validation that previously didn't exist
  • Captured the correct JSON schema, @N positional reference system, Terraform provider internals, and common mistakes into a new reference doc
  • Integrated tab consideration into both the design workflow (step 5) and audit workflow (step 7)

…into skill workflow

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 27, 2026

PR Summary

Low Risk
Low risk documentation-only changes that adjust the dashboard design/audit checklist but do not modify any runtime code or integrations.

Overview
Updates the datadog-design-dashboard skill to explicitly consider and audit dashboard tabs (new design step for when to add tabs, and a new audit step to validate tab organization and widget assignment).

Adds a new references/tabs.md guide documenting the tabs JSON schema, @N positional widget_ids, Terraform provider requirements/behavior, and common failure modes (wrong field names, duplicate widget IDs, missing widget assignments), and links it from SKILL.md and the layouts anti-patterns list.

Reviewed by Cursor Bugbot for commit 00869ea. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

Walkthrough

This 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

Cohort / File(s) Summary
Skill Definition & Guidance
plugins/trogonstack-datadog/skills/datadog-design-dashboard/SKILL.md, plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/layouts.md
Updated skill description to include tab organization, added "Consider tabs" design workflow step for dashboards with 7+ groups, added "Audit tab organization" audit step, and extended anti-patterns guidance with a rule for 13+ groups requiring tabs.
Tab Reference Documentation
plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/tabs.md
New reference document specifying Datadog dashboard tab JSON schema (tabs array with name, optional id, and required widget_ids), positional @N widget reference rules, common implementation errors, minimum Terraform provider version (3.44.0), and provider behavior for UUID generation and state normalization.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

Poem

🐰 Tabs are here, oh what a sight!
Dashboards organized, neat and tight,
No more scrolling, no more dread,
Groups by layers, cleanly spread,
Organization hops ahead!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a new dashboard tab reference document to the Datadog design skill.
Description check ✅ Passed The description is directly related to the changeset, explaining the motivation (underdocumented tabs with incorrect official API docs), the solution (new reference doc), and integration points (design and audit workflows).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/feat-datadog-dashboard-tabs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/tabs.md (1)

56-63: Clarify the “include tab.id explicitly” guidance vs deterministic provider injection.

The field reference says:

  • id is 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.md recommends tab labels like “Business” or “Service Health”, but layouts.md hardcodes “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 tabs and Audit tab organization both say “if 7+ top-level groups…”.
  • layouts.md encodes 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

📥 Commits

Reviewing files that changed from the base of the PR and between c40e05f and 00869ea.

📒 Files selected for processing (3)
  • plugins/trogonstack-datadog/skills/datadog-design-dashboard/SKILL.md
  • plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/layouts.md
  • plugins/trogonstack-datadog/skills/datadog-design-dashboard/references/tabs.md

@yordis yordis merged commit 617d7e4 into main Apr 27, 2026
4 checks passed
@yordis yordis deleted the yordis/feat-datadog-dashboard-tabs branch April 27, 2026 20:02
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.

1 participant