Skip to content

feat(openchoreo): show Events and Spec tabs for rendered releases#665

Open
UdaraWickramarathne wants to merge 3 commits into
openchoreo:mainfrom
UdaraWickramarathne:feat/3443-rendered-release-events-spec
Open

feat(openchoreo): show Events and Spec tabs for rendered releases#665
UdaraWickramarathne wants to merge 3 commits into
openchoreo:mainfrom
UdaraWickramarathne:feat/3443-rendered-release-events-spec

Conversation

@UdaraWickramarathne

@UdaraWickramarathne UdaraWickramarathne commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Purpose

Selecting a rendered release node in the resource tree now opens a detail panel with Events and Spec tabs (previously just a static name/target-plane summary), mirroring the individual-resource tabs and reusing ResourceEventsTable and YamlViewer.

  • Events tab: release-level Kubernetes events via the existing events endpoint.
  • Spec tab: the full RenderedRelease CR rendered as YAML.

The RenderedRelease tree node now carries its real GVK (openchoreo.dev/v1alpha1) so events/spec resolve, keeps the target plane in a dedicated field, and exposes the RenderedRelease CR as the node's spec object.

Refs openchoreo/openchoreo#3443

Related PRs

Backend companion PR: openchoreo/openchoreo#4063

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

Summary by CodeRabbit

  • New Features
    • Added a tabbed detail view for rendered releases, letting you switch between Events and Spec information.
    • The Spec tab now shows release YAML when available, with a clear empty state if no spec exists.
  • Bug Fixes
    • Updated rendered release details to show the correct target plane information.
    • Improved refresh behavior in the Events view so updates can be reloaded on demand.

Selecting a rendered release node in the resource tree now opens a detail panel
with Events and Spec tabs (previously just a static name/target-plane summary),
mirroring the individual-resource tabs and reusing ResourceEventsTable and
YamlViewer.

- Events tab: release-level Kubernetes events via the existing events endpoint.
- Spec tab: the full RenderedRelease CR rendered as YAML.

The RenderedRelease tree node now carries its real GVK (openchoreo.dev/v1alpha1)
so events/spec resolve, keeps the target plane in a dedicated field, and exposes
the RenderedRelease CR as the node's spec object.

Refs openchoreo/openchoreo#3443

Signed-off-by: Udara Wickramarathne <bimsaraudara25@gmail.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Changeset detected — the following file(s) will be released with this PR:

.changeset/rendered-release-events-spec-tabs.md

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@UdaraWickramarathne, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 11 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 54edfd72-fb5c-4c27-b374-395c55a4f56f

📥 Commits

Reviewing files that changed from the base of the PR and between b0b680a and c0c9cca.

📒 Files selected for processing (4)
  • .changeset/rendered-release-events-spec-tabs.md
  • plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/ReleaseDetailTabs.test.tsx
  • plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/ReleaseDetailTabs.tsx
  • plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/ResourceTreeNode.test.tsx
📝 Walkthrough

Walkthrough

Adds a ReleaseDetailTabs component with Events and Spec tabs (refresh key for events, YAML spec viewer with empty-state fallback), wires it into ResourceDetailPanel for RenderedRelease nodes, and extends TreeNode/buildTreeNodes with group, version, targetPlane, and specObject fields, updating the tree node subtitle accordingly.

Changes

Release Detail Tabs Feature

Layer / File(s) Summary
TreeNode data shape and layout utils
treeTypes.ts, treeLayoutUtils.ts, treeLayoutUtils.test.ts, ResourceTreeNode.tsx
Adds optional targetPlane to TreeNode, populates group, version, targetPlane, and specObject for RenderedRelease nodes in buildTreeNodes, updates tests, and switches the tree node subtitle from node.version to node.targetPlane.
ReleaseDetailTabs component
ReleaseDetailTabs.tsx, ReleaseDetailTabs.test.tsx
New ReleaseDetailTabs component with Events/Spec tabs, a refresh key incremented via a refresh icon, ResourceEventsTable wiring, YAML spec viewer with empty-state fallback, and accompanying tests.
ResourceDetailPanel integration
ResourceDetailPanel.tsx, ResourceDetailPanel.test.tsx
Replaces inline RenderedRelease summary markup with ReleaseDetailTabs, passing node, namespaceName, and releaseBindingName; updates tests to assert the new component is rendered/not rendered appropriately.

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ResourceDetailPanel
    participant ReleaseDetailTabs
    participant ResourceEventsTable
    participant YamlViewer

    User->>ResourceDetailPanel: select RenderedRelease node
    ResourceDetailPanel->>ReleaseDetailTabs: render(node, namespaceName, releaseBindingName)
    ReleaseDetailTabs->>ReleaseDetailTabs: reset activeTab on node.id change
    alt Events tab active
        ReleaseDetailTabs->>ResourceEventsTable: render(refreshKey)
        User->>ReleaseDetailTabs: click refresh icon
        ReleaseDetailTabs->>ReleaseDetailTabs: increment refreshKey
        ReleaseDetailTabs->>ResourceEventsTable: re-render(refreshKey)
    else Spec tab active
        alt specObject present
            ReleaseDetailTabs->>YamlViewer: render(node.specObject)
        else specObject missing
            ReleaseDetailTabs->>User: show empty-state message
        end
    end
Loading

Possibly related issues

Suggested reviewers: sameerajayasoma, stefinie123, kaviththiranga

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning Only Purpose, Related PRs, and a few empty headings are present; most template sections like Goals, Approach, tests, docs, and security are missing. Add the missing template sections with concrete details for goals, implementation approach, user stories, release note, docs, tests, security, and any applicable migrations.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding Events and Spec tabs for rendered releases.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

…tabs

Signed-off-by: Udara Wickramarathne <bimsaraudara25@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/ReleaseDetailTabs.tsx`:
- Around line 26-99: The release drawer tabs component currently does not
surface the target plane for RenderedRelease nodes, so that context is lost
after opening the drawer. Update ReleaseDetailTabs to render a small summary
chip or label near the tab header when node data includes targetPlane, using the
existing node prop and related drawer header styling so the information stays
visible without changing the tab behavior.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9d67f3b4-d032-4b28-aa16-f44e4cb78693

📥 Commits

Reviewing files that changed from the base of the PR and between 436c144 and b0b680a.

📒 Files selected for processing (8)
  • plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/ReleaseDetailTabs.test.tsx
  • plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/ReleaseDetailTabs.tsx
  • plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/ResourceDetailPanel.test.tsx
  • plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/ResourceDetailPanel.tsx
  • plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/ResourceTreeNode.tsx
  • plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/treeLayoutUtils.test.ts
  • plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/treeLayoutUtils.ts
  • plugins/openchoreo/src/components/Environments/ReleaseDataRenderer/ResourceTreeView/treeTypes.ts

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Show a 'Target: <plane>' chip in the release detail tab header when a RenderedRelease node exposes targetPlane, so the context stays visible after the drawer is opened. Add tests for the chip and cover the ResourceTreeNode target-plane subtitle branch.

Signed-off-by: Udara Wickramarathne <bimsaraudara25@gmail.com>
@UdaraWickramarathne UdaraWickramarathne force-pushed the feat/3443-rendered-release-events-spec branch from babfcfa to c0c9cca Compare July 2, 2026 09:01
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