Skip to content

[dashboard] fix: restore stock-instance sidebars for namespace-level pages#2136

Merged
kvaps merged 1 commit intomainfrom
fix/dashboard-restore-instance-sidebars
Mar 2, 2026
Merged

[dashboard] fix: restore stock-instance sidebars for namespace-level pages#2136
kvaps merged 1 commit intomainfrom
fix/dashboard-restore-instance-sidebars

Conversation

@sircthulhu
Copy link
Contributor

@sircthulhu sircthulhu commented Mar 2, 2026

What this PR does

Restores stock-instance-api-form, stock-instance-api-table,
stock-instance-builtin-form, and stock-instance-builtin-table sidebar
resources that were removed in #2106, and adds them back to the orphan
cleanup allowlist.

PR #2106 removed these sidebars to fix broken URLs on the main page before
namespace selection (default//api-table/...). However, stock-instance-*
sidebars are required by the frontend for namespace-level api-table/api-form
pages. Without them and with CUSTOMIZATION_SIDEBAR_FALLBACK_ID="", the
frontend cannot find a sidebar for pages like Backup Plans and renders an
empty page where no interaction is possible.

The broken-URL bug is already fully fixed by CUSTOMIZATION_SIDEBAR_FALLBACK_ID=""
in web.yaml. Re-adding stock-instance-* does not reintroduce it, since
these sidebars are only shown when the user is on a namespace-level page
where the {namespace} placeholder is filled.

Release note

[dashboard] fix empty page on Backup Plans and other namespace-level api-table pages

Summary by CodeRabbit

  • New Features
    • Added four new dashboard sidebar resources for stock instances: API form, API table, built-in form, and built-in table views. These enable expanded dashboard customization options for managing stock instance configurations and data.

…ages

PR #2106 removed stock-instance-* sidebar resources to fix broken URLs
on the main page before namespace selection. However, these sidebars are
required for rendering namespace-level pages (api-table, api-form, etc.)
such as the Backup Plans page.

Without stock-instance-api-table, the frontend cannot find the sidebar
for namespace-scoped api-table pages and renders an empty page instead.

The original bug (broken URLs with empty namespace placeholder) is already
fixed by CUSTOMIZATION_SIDEBAR_FALLBACK_ID="" in web.yaml, so re-adding
stock-instance-* sidebars does not reintroduce it.

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Kirill Ilin <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a46195 and 45b61f8.

📒 Files selected for processing (2)
  • internal/controller/dashboard/manager.go
  • internal/controller/dashboard/sidebar.go

📝 Walkthrough

Walkthrough

Four new stock-instance sidebar resources are added to the dashboard controller's expected resources and upsert targets: stock-instance-api-form, stock-instance-api-table, stock-instance-builtin-form, and stock-instance-builtin-table.

Changes

Cohort / File(s) Summary
Stock Instance Sidebar Configuration
internal/controller/dashboard/manager.go, internal/controller/dashboard/sidebar.go
Extended expected Dashboard Sidebar resources and target sidebars by adding four new stock-instance resource identifiers (api-form, api-table, builtin-form, builtin-table) to respective lists.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Four new sidebars join the fold,
Stock instances, a sight to behold,
API and builtin forms aligned,
Tables and flows of perfect design!
Dashboard grows with graceful care,
New resources floating there! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: restoring stock-instance sidebars for namespace-level pages in the dashboard.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/dashboard-restore-instance-sidebars

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.

@sircthulhu sircthulhu marked this pull request as ready for review March 2, 2026 18:20
@sircthulhu sircthulhu self-assigned this Mar 2, 2026
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 2, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request restores the stock-instance-* sidebar resources that were previously removed, resolving an issue where namespace-level pages (e.g., Backup Plans) rendered empty due to missing sidebar configurations. The original issue of broken URLs has been addressed separately, allowing these sidebars to be safely re-added without reintroducing the bug.

Highlights

  • Sidebar Restoration: Reintroduced stock-instance-* sidebar resources to address empty pages on namespace-level sections like Backup Plans.
  • Root Cause: Addressed the removal of sidebars in PR fix(dashboard): hide sidebar on cluster-level pages when no tenant selected #2106, which was initially done to fix broken URLs before namespace selection.
  • Resolution: Leveraged CUSTOMIZATION_SIDEBAR_FALLBACK_ID="" in web.yaml to fully resolve the broken-URL issue, allowing safe re-addition of stock-instance-* sidebars.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • internal/controller/dashboard/manager.go
    • Added stock-instance sidebars to the expected resource set.
  • internal/controller/dashboard/sidebar.go
    • Re-added stock-instance sidebars to the list of ensured sidebars.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@dosubot dosubot bot added the bug Something isn't working label Mar 2, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request restores several stock-instance-* sidebar resources that are necessary for namespace-level pages. The changes correctly add these sidebar IDs to the list of sidebars to be created in sidebar.go and to the allowlist for orphan cleanup in manager.go. My review includes suggestions to address code duplication for the newly added sidebar IDs to improve future maintainability.

Comment on lines +310 to +313
"stock-instance-api-form",
"stock-instance-api-table",
"stock-instance-builtin-form",
"stock-instance-builtin-table",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This list of stock-instance-* sidebar IDs is duplicated from internal/controller/dashboard/sidebar.go. To avoid duplication and potential inconsistencies, it would be better to define this list as a shared package-level variable and reuse it in both places. This would also make it more apparent that this list can be defined outside the for loop for better performance.

Comment on lines +247 to +250
"stock-instance-api-form",
"stock-instance-api-table",
"stock-instance-builtin-form",
"stock-instance-builtin-table",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

These stock-instance-* sidebar IDs are also being added in internal/controller/dashboard/manager.go, creating duplication. To improve maintainability, consider defining this list of IDs as a shared package-level variable (e.g., stockInstanceSidebars). This variable could then be used here and in manager.go to avoid inconsistencies in the future.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 2, 2026
@kvaps kvaps merged commit 35e3edd into main Mar 2, 2026
9 checks passed
@kvaps kvaps deleted the fix/dashboard-restore-instance-sidebars branch March 2, 2026 18:28
@kvaps kvaps added the backport Should change be backported on previus release label Mar 2, 2026
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

kvaps added a commit that referenced this pull request Mar 2, 2026
…rs for namespace-level pages (#2138)

# Description
Backport of #2136 to `release-1.0`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Should change be backported on previus release bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants