Skip to content

ui: remove duplicate page headers#97

Merged
TerrifiedBug merged 1 commit intomainfrom
remove-page-headers
Mar 11, 2026
Merged

ui: remove duplicate page headers#97
TerrifiedBug merged 1 commit intomainfrom
remove-page-headers

Conversation

@TerrifiedBug
Copy link
Owner

Removes duplicate page headers, only relying on the side bar for navigation context.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 11, 2026

Greptile Summary

This PR removes the PageHeader component (which rendered an <h1> title and optional action row) from all 10 dashboard pages, delegating navigation context entirely to the sidebar. For pages that previously passed action buttons via the actions prop, those controls are preserved in a simple <div className="flex items-center justify-end"> wrapper.

  • All 10 pages correctly drop the PageHeader import and its JSX usage
  • Action CTAs (New Pipeline, New Environment, Add Rule, New Shared Component) are fully preserved in equivalent inline containers
  • The PageHeader component itself (src/components/page-header.tsx) is not deleted by this PR — it now has no callers in the dashboard and could be removed in a follow-up cleanup
  • No logic, data fetching, or security-sensitive code is touched; the change is purely presentational

Confidence Score: 5/5

  • This PR is safe to merge — it is a pure UI simplification with no logic, data, or security changes.
  • All changes are mechanical removals of a display-only component. Action buttons are correctly preserved. No data fetching, routing, auth, or state management is affected.
  • No files require special attention. Consider a follow-up to delete the now-unused src/components/page-header.tsx.

Important Files Changed

Filename Overview
src/app/(dashboard)/alerts/page.tsx Removes PageHeader with title "Alerts"; preserves the "Add Rule" CTA button in a flex-end container.
src/app/(dashboard)/analytics/page.tsx Removes PageHeader from both the empty-state early return and the main render path; preserves time-range toggle buttons in a flex-end wrapper.
src/app/(dashboard)/audit/page.tsx Removes standalone PageHeader with title "Audit Log"; no actions to migrate, straightforward removal.
src/app/(dashboard)/environments/page.tsx Removes PageHeader with title "Environments"; preserves "New Environment" link-button in a flex-end wrapper.
src/app/(dashboard)/fleet/page.tsx Removes standalone PageHeader with title "Fleet"; no actions to migrate.
src/app/(dashboard)/library/shared-components/page.tsx Removes PageHeader from both the empty-state and main render paths; preserves "New Shared Component" button in a flex-end wrapper.
src/app/(dashboard)/library/templates/page.tsx Removes standalone PageHeader with title "Templates"; no actions to migrate.
src/app/(dashboard)/page.tsx Removes standalone PageHeader with title "Dashboard"; no actions to migrate, tab bar immediately follows.
src/app/(dashboard)/pipelines/page.tsx Removes PageHeader with title "Pipelines"; preserves "New Pipeline" link-button in a flex-end wrapper.
src/app/(dashboard)/profile/page.tsx Removes standalone PageHeader with title "Profile"; no actions to migrate.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Before["Before (each dashboard page)"]
        B1["&lt;div className='space-y-*'&gt;"]
        B2["&lt;PageHeader title='...' actions={CTA} /&gt;\n(renders h1 + action row)"]
        B3["Page content"]
        B1 --> B2 --> B3
    end

    subgraph After["After (each dashboard page)"]
        A1["&lt;div className='space-y-*'&gt;"]
        A2["&lt;div className='flex items-center justify-end'&gt;\n  CTA button (if any)\n&lt;/div&gt;"]
        A3["Page content"]
        A1 --> A2 --> A3
    end

    subgraph Sidebar["Sidebar (unchanged)"]
        S1["Active nav item\nprovides page context"]
    end

    Sidebar -.->|"now sole source of\npage title context"| After
Loading

Last reviewed commit: 18b67f7

@TerrifiedBug TerrifiedBug merged commit 27d6a76 into main Mar 11, 2026
12 checks passed
@TerrifiedBug TerrifiedBug deleted the remove-page-headers branch March 11, 2026 15:44
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