Skip to content

Conversation

@occoder-dev
Copy link

@occoder-dev occoder-dev commented Oct 30, 2025

Issue

Link to related issue(s):


Description

Short summary of what this PR changes or introduces.


Scope of Change

Select all applicable areas impacted by this PR:

  • View (UI/UX)
  • API
  • CLI
  • Infra / Deployment
  • Docs
  • Other (specify): ________

Screenshot / Video / GIF (if applicable)

Attach or embed screenshots, screen recordings, or GIFs demonstrating the feature or fix.


Related PRs (if any)

Link any related or dependent PRs across repos.


Additional Notes for Reviewers (optional)

Anything reviewers should know before testing or merging (e.g., environment variables, setup steps).


Developer Checklist

To be completed by the developer who raised the PR.

  • Add valid/relevant title for the PR
  • Self-review done
  • Manual dev testing done
  • No secrets exposed
  • No merge conflicts
  • Docs added/updated (if applicable)
  • Removed debug prints / secrets / sensitive data
  • Unit / Integration tests passing
  • Follows all standards defined in Nixopus Docs

Reviewer Checklist

To be completed by the reviewer before merge.

  • Peer review done
  • No console.logs / fmt.prints left
  • No secrets exposed
  • If any DB migrations, migration changes are verified
  • Verified release changes are production-ready

Summary by CodeRabbit

  • New Features

    • Added a new Banner component displaying the page title, description, and icon with status badge.
    • Reorganized control layout moving action buttons from the header to below the search bar.
  • Chores

    • Version bump to 0.1.0-alpha.56.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

Walkthrough

Version bumped from 0.1.0-alpha.55 to 0.1.0-alpha.56. Containers page header refactored to use new Banner component. New Banner layout component introduced with customizable properties, loading skeleton support, and flexible styling via variants.

Changes

Cohort / File(s) Summary
Version Bumps
package.json, version.txt
Updated package version from 0.1.0-alpha.55 to 0.1.0-alpha.56 across metadata files
New Banner Component
view/components/layout/page-banner.tsx
Introduced Banner component with forwardRef, supporting customizable props (loading state, alignment, padding, gradient tone, badges, headings, descriptions, images). Includes BannerSkeleton subcomponent for loading fallback using Skeleton placeholders
Containers Page Refactoring
view/app/containers/page.tsx
Replaced top header with new Banner component. Reorganized action controls (refresh, prune, prune_images, prune_build_cache) beneath search bar with permission guards. Adjusted spacing (removed ml-2) and button sizing props (SelectWrapper size="sm", toggle size to sm). Retained view-switching, refresh, prune, and pagination logic

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Banner component: New component with multiple props, variants, and conditional rendering logic (isLoading state, imageSection, textContent, skeleton fallback)
  • Page refactoring: Structural layout changes with reorganized controls and adjusted prop usage
  • Heterogeneous changes: Mix of version bumps (trivial), new component creation (medium), and existing page refactoring (medium)

Possibly related PRs

Suggested labels

nixopus-view

Suggested reviewers

  • zhravan

Poem

🐰 A banner raised, the header now so bright,
With versions climbing through the alpha night,
Layout flows as gracefully as we'd planned,
Components stacked across the page so grand! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "style: add page banner and refactor container to use common header across the app" accurately reflects the main changes in the changeset. The title correctly identifies the two primary modifications: the introduction of a new Banner component (a reusable layout component with comprehensive styling, loading states, and customization options) and the refactoring of the container page to use this Banner component in place of the previous header structure. The title is specific, concise, and uses conventional commit format ("style:") appropriately for UI/styling changes. While the version bumps are present, these are expected administrative updates and do not typically appear in commit titles.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
Contributor

@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: 2

🧹 Nitpick comments (2)
view/components/layout/page-banner.tsx (2)

106-106: Remove redundant priority prop.

Setting priority={false} is unnecessary since false is the default value for Next.js Image component.

Apply this diff:

-                                    priority={false}

89-114: Consider simplifying the ImageSection nesting.

The ImageSection contains multiple nested divs that could be reduced for better maintainability.

Consider this simplified structure:

     const ImageSection = (
-        <div className="flex-1">
-            <div className="relative mx-auto max-w-xs">
-                <div className="aspect-square">
-                    <div className="flex h-full items-center justify-center">
-                        <div className="relative w-full h-full text-center">
-                            {image ? (
-                                <div className="flex items-center justify-center w-full h-full">
-                                    {image}
-                                </div>
-                            ) : (
-                                <Image
-                                    src={imageSrc}
-                                    alt={imageAlt}
-                                    className="object-contain"
-                                    fill
-                                    sizes="(min-width: 768px) 320px, 50vw"
-                                    priority={false}
-                                />
-                            )}
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
+        <div className="flex-1 flex items-center justify-center">
+            <div className="relative w-full max-w-xs aspect-square">
+                {image ? (
+                    <div className="flex items-center justify-center w-full h-full">
+                        {image}
+                    </div>
+                ) : (
+                    <Image
+                        src={imageSrc}
+                        alt={imageAlt}
+                        className="object-contain"
+                        fill
+                        sizes="(min-width: 768px) 320px, 50vw"
+                    />
+                )}
+            </div>
+        </div>
     );
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c41294 and ae93b0c.

📒 Files selected for processing (4)
  • package.json (1 hunks)
  • version.txt (1 hunks)
  • view/app/containers/page.tsx (5 hunks)
  • view/components/layout/page-banner.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
view/app/containers/page.tsx (3)
view/components/layout/page-banner.tsx (1)
  • Banner (62-158)
view/components/rbac/PermissionGuard.tsx (1)
  • AnyPermissionGuard (42-58)
view/components/ui/select-wrapper.tsx (1)
  • SelectWrapper (39-147)
view/components/layout/page-banner.tsx (3)
view/components/ui/typography.tsx (1)
  • TypographyH1 (1-13)
view/lib/utils.ts (1)
  • cn (4-6)
view/components/ui/skeleton.tsx (1)
  • Skeleton (13-13)
🪛 LanguageTool
version.txt

[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: v0.1.0-alpha.56

(QB_NEW_DE)

🔇 Additional comments (8)
package.json (1)

3-3: LGTM!

The version bump aligns with the new Banner component feature being introduced in this PR.

view/components/layout/page-banner.tsx (5)

1-11: LGTM!

The imports and 'use client' directive are appropriate for this component's functionality with refs and potential client-side interactivity.


12-45: LGTM!

The CVA variants for bannerContainer and bannerLayout are well-structured with sensible defaults.


47-60: LGTM!

Type definitions are comprehensive and properly extend the necessary base types.


141-189: LGTM!

The Banner render logic and BannerSkeleton component are well-implemented with proper className merging and loading state support.


74-74: No action required—file exists.

The file plugin.png exists at view/public/plugin.png and is correctly referenced by the path /plugin.png in a Next.js application. The default imageSrc is valid.

Likely an incorrect or invalid review comment.

view/app/containers/page.tsx (1)

93-166: LGTM!

The layout restructure properly preserves all functionality while improving the visual hierarchy with the new Banner component. Permission guards and responsive behavior are maintained correctly.

version.txt (1)

1-1: LGTM!

The version bump aligns with the package.json update.


import React from 'react';
import { RefreshCw, Trash2, Loader2, Scissors, Grid, List } from 'lucide-react';
import { RefreshCw, Trash2, Loader2, Scissors, Grid, List, Puzzle, Container } from 'lucide-react';
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify that the Puzzle icon is used.

The Puzzle icon is imported but doesn't appear to be used in the current file.

Run the following script to check if Puzzle is used elsewhere or can be removed:


🏁 Script executed:

#!/bin/bash
# Description: Search for Puzzle icon usage in the file

# Search for Puzzle usage in containers page
rg -n "Puzzle" view/app/containers/

Length of output: 130



---

🏁 Script executed:

```shell
#!/bin/bash
# Description: Search for Puzzle icon usage across entire codebase

# Search for Puzzle usage (excluding the import line)
rg -n "Puzzle" --type=tsx --type=ts | grep -v "^view/app/containers/page.tsx:4:"

Length of output: 27



---

🏁 Script executed:

```shell
#!/bin/bash
# Description: Search for Puzzle icon usage across entire codebase

# Search for Puzzle in all files and filter out just the import
rg -n "Puzzle" | grep -v "^view/app/containers/page.tsx:4:"

Length of output: 172


Remove unused Puzzle icon from imports.

The Puzzle icon is imported on line 4 of view/app/containers/page.tsx but is not used in that file. It is already properly imported in view/hooks/use-app-sidebar.ts where it's actually used.

🤖 Prompt for AI Agents
In view/app/containers/page.tsx around line 4, the imported Puzzle icon is
unused; remove Puzzle from the import list (i.e., delete "Puzzle" from the
lucide-react named imports) so the file only imports the icons that are actually
used, then run a quick lint/check to ensure no stray references remain.

Comment on lines +82 to 91
<div className="w-full mb-6">
<Banner
isLoading={false}
badgeText="beta"
heading={t('containers.title')}
subheading={t('containers.description')}
description="Easily extend functionality with community-built add-ons."
image={<Container className='w-32 h-32 text-primary' />}
/>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Consider using dynamic loading state and fix the description.

Two concerns:

  1. isLoading={false} is hardcoded. Consider using the actual loading state from useContainerList (e.g., isLoading or isFetching) to show the skeleton while data loads.
  2. The description "Easily extend functionality with community-built add-ons." seems like a placeholder or copy-pasted from a plugins/extensions page and doesn't accurately describe container functionality.

Apply this diff:

         <div className="w-full mb-6">
           <Banner
-            isLoading={false}
+            isLoading={!initialized && isLoading}
             badgeText="beta"
             heading={t('containers.title')}
             subheading={t('containers.description')}
-            description="Easily extend functionality with community-built add-ons."
+            description={t('containers.bannerDescription') || "Manage and monitor your Docker containers efficiently."}
             image={<Container className='w-32 h-32 text-primary' />}
           />
         </div>

Note: Add containers.bannerDescription to your i18n translations file for proper localization.

🤖 Prompt for AI Agents
In view/app/containers/page.tsx around lines 82 to 91, replace the hardcoded
isLoading={false} with the actual loading state from useContainerList (e.g.,
pass isLoading={isLoading || isFetching}) so the Banner shows a skeleton while
data loads, and replace the static description string with a localized value
t('containers.bannerDescription'); also add the new containers.bannerDescription
key to your i18n translations file with the correct container-specific copy.
Ensure you import/use the loading flags returned from useContainerList and
update any types/props if needed.

@zhravan
Copy link
Collaborator

zhravan commented Oct 30, 2025

@occoder-dev : Can you share the screen shot of the changes?

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.

2 participants