Skip to content

fix: restore full-featured dashboard, remove landing page sections introduced by #1582#1583

Merged
jaypatrick merged 3 commits intomainfrom
copilot/restore-full-featured-dashboard
Apr 14, 2026
Merged

fix: restore full-featured dashboard, remove landing page sections introduced by #1582#1583
jaypatrick merged 3 commits intomainfrom
copilot/restore-full-featured-dashboard

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

PR #1582 replaced the application dashboard at / with a 10-section marketing landing page and conditionally hid the app shell header/footer on that route. The marketing landing page belongs in jaypatrick/bloqr-landing, not here. This PR reverts those structural changes while keeping all Bloqr design system additions (#1581/#1582 styles, fonts, tokens).

Changes

Restored

  • home.component.ts — full dashboard: system health bar, 5-stat live grid, queue depth chart, quick actions, 6 nav cards, 9-endpoint comparison table, notification/auto-refresh settings, deferred ApiTesterComponent. All original signals, computed values, and service injections retained (MetricsStore, NotificationService, LogService, LiveAnnouncer, DestroyRef). Bloqr dark design language applied (Space Grotesk headings, Inter body, #FF5500 orange accent, #0E1829 card surface). cacheHitRate and successRate formatted correctly as already-percentage values (0–100) per MetricsService contract, consistent with PerformanceComponent.
  • home.component.spec.ts — 15 tests covering nav cards, stat card navigation, health icon/color, navigateTo() external/internal routing, onStatCardClicked(), and page heading. Health status type aligned to HealthResponse ('unhealthy' not 'down'); metric fixtures use percentage-style values (cacheHitRate: 85, successRate: 98) matching metrics.service.spec.ts and metrics.store.spec.ts; afterEach no longer masks unexpected requests with a catch-all flush.

Reverted

Deleted

  • frontend/src/app/home/sections/ — all 10 landing page components: audiences-section, byo-section, cta-banner-section, features-section, footer-section, hero-section, how-it-works-section, nav-bar, pricing-section, problem-section

Updated

  • frontend/src/assets/logo.svg — replaced shield-B mark with canonical bar-wordmark from bloqr-landing/brand/logo.svg (filter-list icon + ADBLOCK/COMPILER wordmark)

Preserved from #1581/#1582 (not reverted)

  • All styles.css Bloqr design tokens (dark M3 palette, Space Grotesk/Inter font stack, .bloqr-card, .bloqr-btn-primary utilities)
  • @fontsource/space-grotesk and @fontsource/inter font packages
  • jose security override in package.json/pnpm-lock.yaml
  • docs.routes.ts referrerpolicy hardening
  • index.html Bloqr meta/title

Testing

  • Unit tests added/updated — 15 dashboard-specific tests in home.component.spec.ts; 1052/1052 tests pass
  • Manual testing performed — build verified with 0 TS errors
  • CI passes

Zero Trust Architecture Checklist

Worker / Backend

  • Every handler verifies auth before executing business logic — N/A (no worker changes)
  • CORS origin allowlist enforced (not *) on write/authenticated endpoints — N/A
  • All secrets accessed via Worker Secret bindings (not [vars]) — N/A
  • All external inputs Zod-validated before use — N/A
  • All D1 queries use parameterized .prepare().bind() (no string interpolation) — N/A
  • Security events emitted to Analytics Engine on auth failures — N/A

Frontend / Angular

  • Protected routes have functional CanActivateFn auth guards — no new routes added; existing guards unchanged
  • Auth tokens managed via Clerk SDK (not localStorage) — N/A (no auth changes)
  • HTTP interceptor attaches ****** (no manual token passing) — N/A
  • API responses validated with Zod schemas before consumption — N/A (dashboard reads from MetricsStore, no new API calls)

API Shield / Vulnerability Scanner

  • New/changed endpoints have a unique operationId in openapi.yaml — N/A (no endpoint changes)
  • Resource endpoints include a security: annotation — N/A
  • Resource queries scoped to authenticated user — N/A
  • Missing/unauthorized resources return 404 — N/A
  • cloudflare-schema.yaml regenerated if openapi.yaml changed — N/A
Original prompt

Summary

PR #1582 incorrectly replaced the full-featured Adblock Compiler dashboard at route / with a marketing landing page. A standalone landing page already exists at jaypatrick/bloqr-landing. The app at jaypatrick/adblock-compiler should be the application — the dashboard, tools, and functionality — styled with the Bloqr design language. The landing page inside the app must be removed entirely.

This PR must:

  1. Restore home.component.ts — the full-featured dashboard (NOT the landing page sections)
  2. Restore home.component.spec.ts — the full 14-test suite (NOT the 4 stub tests)
  3. Remove all 10 landing page section components under frontend/src/app/home/sections/
  4. Revert app.component.ts — remove isLandingPage signal, remove the @if (!isLandingPage()) gating on header and footer, remove Router/NavigationEnd imports added by feat: Implement Bloqr landing page — 10 section components, dark design system, SSR-safe persona tabs, a11y hardening #1582
  5. Revert app.component.spec.ts — remove StubComponent, remove the /compiler navigation in the mobile test; restore the original simple should render menu button with aria-label test
  6. Update frontend/src/assets/logo.svg — replace the shield-B mark committed by feat: Implement Bloqr landing page — 10 section components, dark design system, SSR-safe persona tabs, a11y hardening #1582 with the canonical bar-wordmark logo from jaypatrick/bloqr-landing/brand/logo.svg

What to KEEP (do NOT revert these)


Detailed Specifications

1. frontend/src/assets/logo.svg — Replace with canonical bar-wordmark

Replace the current shield-B logo with this exact SVG (the canonical Bloqr bar-wordmark from jaypatrick/bloqr-landing/brand/logo.svg):

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 48" fill="none">
  <!-- Filter-list icon: 4 bars decreasing in width, bottom bar orange = "compiled output" -->
  <g>
    <rect x="0" y="0"  width="32" height="5" rx="2.5" fill="#F1F5F9"/>
    <rect x="0" y="10" width="24" height="5" rx="2.5" fill="#F1F5F9" opacity="0.7"/>
    <rect x="0" y="20" width="16" height="5" rx="2.5" fill="#F1F5F9" opacity="0.5"/>
    <rect x="0" y="30" width="8"  height="5" rx="2.5" fill="#FF5500"/>
    <!-- small arrow tip right of the orange bar -->
    <path d="M11 32.5 L15 32.5 L13 30 Z" fill="#FF5500" opacity="0.6"/>
  </g>
  <!-- Wordmark -->
  <text x="44" y="14" font-family="'Space Grotesk', 'JetBrains Mono', monospace" font-size="14" font-weight="700" letter-spacing="0.08em" fill="#F1F5F9">ADBLOCK</text>
  <text x="44" y="32" font-family="'Space Grotesk', 'JetBrains Mono', monospace" font-size="14" font-weight="400" letter-spacing="0.12em" fill="#94A3B8">COMPILER</text>
  <!-- Orange accent line under COMPILER -->
  <rect x="44" y="36" width="56" height="2" rx="1" fill="#FF5500" opacity="0.6"/>
</svg>

2. frontend/src/app/home/home.component.ts — Restore full dashboard

Replace the current landing-page composition with the full-featured dashboard. Apply the Bloqr design language (dark theme tokens, Space Grotesk typography, orange accents, .bloqr-card classes) while preserving ALL original dashboard functionality:

  • System status bar with health check icon and version
  • Live stats grid (5 cards: Total Requests, Avg Response Time, Cache Hit Rate, Success Rate, Queue Depth)
  • Queue chart (via QueueChartComponent)
  • Quick actions (Compile Filter List, Batch Compile, Async Compile, API Tester)
  • API Tester (deferred, via ApiTesterComponent)
  • Navigation grid (6 cards: Filter List Compiler, Performance Metrics, Rule Validation, API Documentation, Storage Admin, Documentation)
  • Endpoint comparison table (all 9 endpoints)
  • Notification settings toggle
  • Auto-refresh toggle with configurable interval

The dashboard header should use:

h1: "Adblock Compiler Dashboard"  (Space Grotesk 800, color: #F1F5F9)
subtitle: "Manage, compile, and monitor adblock filter lists."  (color: #94A3B8)

Cards should use .bloqr-card class where appropriate, and the Material card components must keep their current imports/structure. The component must retain all signals, computed values, injected services, and methods from the pre-#1582 version:

  • navCards: NavCard[] (6 entries)
  • endpointComparison: EndpointInfo[] (9 entries)
  • highlightedCard, showTester, testerCollapsed signals
  • autoRefreshEnabled, autoRefreshInterval state
  • store = inject(MetricsStore)
  • notifications = inject(NotificationService)
  • log = inject(LogService)
  • liveAnnouncer = inject(LiveAnnouncer)
  • router = inject(Router)
  • `destroyRef ...

This pull request was created from Copilot chat.

Copilot AI requested review from Copilot and removed request for Copilot April 14, 2026 16:32
@jaypatrick jaypatrick added enhancement New feature or request ux Issues with the UX labels Apr 14, 2026
@jaypatrick jaypatrick added this to the beta milestone Apr 14, 2026
Copilot AI requested review from Copilot and removed request for Copilot April 14, 2026 16:55
Copilot AI changed the title [WIP] Restore full-featured Adblock Compiler dashboard fix: restore full-featured dashboard, remove landing page sections introduced by #1582 Apr 14, 2026
Copilot AI requested a review from jaypatrick April 14, 2026 16:56
@jaypatrick jaypatrick marked this pull request as ready for review April 14, 2026 16:56
Copilot AI review requested due to automatic review settings April 14, 2026 16:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Reverts PR #1582’s landing-page takeover of / and restores the original application dashboard while keeping the Bloqr design-system styling updates.

Changes:

  • Restores the full dashboard HomeComponent (system health, live stats, queue chart, quick actions, nav cards, endpoints table, settings, deferred API tester).
  • Reverts AppComponent to always render the app shell header/footer on / (removes landing-page route gating).
  • Removes the 10 marketing landing-page section components and updates the bundled logo asset.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
frontend/src/app/home/home.component.ts Restores the dashboard UI/composition and related state/computed values.
frontend/src/app/home/home.component.spec.ts Restores/expands dashboard unit tests and HTTP mocking for MetricsStore.
frontend/src/app/app.component.ts Removes landing-page shell gating so header/footer render on all routes.
frontend/src/app/app.component.spec.ts Reverts tests to no longer depend on a stub route/component for shell visibility.
frontend/src/assets/logo.svg Replaces the prior mark with the canonical bar/wordmark SVG asset.
frontend/src/app/home/sections/audiences-section/audiences-section.component.ts Deleted (landing-page section removed).
frontend/src/app/home/sections/byo-section/byo-section.component.ts Deleted (landing-page section removed).
frontend/src/app/home/sections/cta-banner-section/cta-banner-section.component.ts Deleted (landing-page section removed).
frontend/src/app/home/sections/features-section/features-section.component.ts Deleted (landing-page section removed).
frontend/src/app/home/sections/footer-section/footer-section.component.ts Deleted (landing-page section removed).
frontend/src/app/home/sections/hero-section/hero-section.component.ts Deleted (landing-page section removed).
frontend/src/app/home/sections/how-it-works-section/how-it-works-section.component.ts Deleted (landing-page section removed).
frontend/src/app/home/sections/nav-bar/nav-bar.component.ts Deleted (landing-page section removed).
frontend/src/app/home/sections/pricing-section/pricing-section.component.ts Deleted (landing-page section removed).
frontend/src/app/home/sections/problem-section/problem-section.component.ts Deleted (landing-page section removed).

@jaypatrick
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 14, 2026

@copilot apply changes based on the comments in this thread

Applied all reviewer feedback in commit 5d198b6:

  • home.component.ts — removed * 100 multiplier from cacheHitRate and successRate formatting; values are already 0–100 per MetricsService contract (matching PerformanceComponent usage)
  • home.component.spec.ts — fixture now uses percentage values (cacheHitRate: 85, successRate: 98); health status type fixed from 'down''unhealthy' to match HealthResponse; removed catch-all httpTesting.match(() => true) flush from afterEachhttpTesting.verify() now catches unexpected requests on its own
  • app.component.spec.ts — removed the stale StubComponent comment block

@jaypatrick jaypatrick merged commit 26942ed into main Apr 14, 2026
29 checks passed
@jaypatrick jaypatrick deleted the copilot/restore-full-featured-dashboard branch April 14, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ux Issues with the UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants