Skip to content

Conversation

@asithade
Copy link
Contributor

Summary

This PR includes multiple UI improvements and persona system enhancements across the application:

Changes

  • LFXV2-670: Relocate footer to main layout for consistency

    • Move footer component from app.component to main-layout.component
    • Add CUSTOM_ELEMENTS_SCHEMA support
  • LFXV2-671: Replace "old-ui" with "home" persona and simplify routing

    • Update persona constants to use "home" (Projects) instead of "old-ui"
    • Remove dedicated /old-ui route and consolidate to main dashboard routing
    • Simplify persona service by removing localStorage initialization
  • LFXV2-672: Add scrollable containers and refactor dashboard charts

    • Add max-height and scrolling to my-meetings and pending-actions components
    • Refactor my-projects with randomized chart data generation
    • Pre-generate chart configurations in constructor for better performance
    • Add proper TypeScript types for Chart.js
  • LFXV2-673: Add meeting attachments display with file type icons

    • Fetch and display meeting attachments dynamically
    • Add clickable attachment links with tooltips
    • Support multiple MIME types with appropriate icons
  • LFXV2-674: Enhance meeting join with password support and new tab

    • Add password as query parameter to join URL
    • Open meetings in new tab with proper security attributes
    • Update button component to support queryParams input
  • LFXV2-675: Improve error handling and null safety across services

    • Add null checks in analytics service
    • Add error handling for user profile fetching
    • Logout users when user info fetch fails (security improvement)

Test Plan

  • Verify footer appears in main layout on all authenticated pages
  • Verify "Projects" persona displays correctly in persona selector
  • Verify dashboard components have proper scrolling behavior
  • Verify meeting attachments display on dashboard meeting cards
  • Verify meeting join opens in new tab with password parameter
  • Verify error handling works correctly for user profile failures

Related Issues

Generated with Claude Code

Multiple enhancements across the application:

- LFXV2-670: Relocate footer to main layout for consistency
- LFXV2-671: Replace "old-ui" with "home" persona and simplify routing
- LFXV2-672: Add scrollable containers and refactor dashboard charts
- LFXV2-673: Add meeting attachments display with file type icons
- LFXV2-674: Enhance meeting join with password support and new tab
- LFXV2-675: Improve error handling and null safety across services

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Asitha de Silva <[email protected]>
@asithade asithade requested a review from jordane as a code owner October 22, 2025 20:18
@Copilot Copilot AI review requested due to automatic review settings October 22, 2025 20:18
Copy link
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

This PR refactors the persona system by replacing the "old-ui" persona with "projects", improves dashboard UI/UX with scrollable containers and optimized chart rendering, enhances meeting functionality with attachment displays and password-protected joins, and strengthens error handling across services.

Key Changes:

  • Renamed "old-ui" persona to "projects" and simplified routing by removing the dedicated /old-ui route
  • Added scrollable containers to dashboard components and refactored chart data generation for better performance
  • Implemented meeting attachments display with dynamic file type icons and enhanced join functionality with password support

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/shared/src/interfaces/persona.interface.ts Updated PersonaType to replace 'old-ui' with 'projects'
packages/shared/src/interfaces/components.interface.ts Changed chart type definitions to use Chart.js ChartType
packages/shared/src/constants/persona.constants.ts Updated persona option label from "Old UI" to "Projects"
apps/lfx-one/src/server/server.ts Changed error handling to logout users when user info fetch fails
apps/lfx-one/src/app/shared/services/persona.service.ts Removed localStorage initialization and old-ui routing logic
apps/lfx-one/src/app/shared/services/analytics.service.ts Added null safety checks for user and window objects
apps/lfx-one/src/app/shared/components/persona-selector/persona-selector.component.ts Simplified form initialization by removing effect-based sync
apps/lfx-one/src/app/shared/components/header/header.component.ts Added error handling with catchError for user profile fetching
apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.ts Added dynamic meeting attachments fetching and display
apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.html Replaced static file icons with dynamic attachment links
apps/lfx-one/src/app/shared/components/button/button.component.ts Added queryParams input support
apps/lfx-one/src/app/shared/components/button/button.component.html Added queryParams and target binding to p-button
apps/lfx-one/src/app/modules/pages/home/home.component.html Removed top padding from hero section
apps/lfx-one/src/app/modules/dashboards/dashboard.component.ts Updated to route projects persona to HomeComponent
apps/lfx-one/src/app/modules/dashboards/dashboard.component.html Added case for projects persona
apps/lfx-one/src/app/modules/dashboards/components/pending-actions/pending-actions.component.html Added max-height and overflow-y-auto for scrolling
apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.ts Refactored to pre-generate chart data in constructor
apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.html Simplified chart rendering by using pre-generated data
apps/lfx-one/src/app/modules/dashboards/components/my-meetings/my-meetings.component.html Added max-height and overflow-y-auto for scrolling
apps/lfx-one/src/app/layouts/main-layout/main-layout.component.ts Added CUSTOM_ELEMENTS_SCHEMA support
apps/lfx-one/src/app/layouts/main-layout/main-layout.component.html Added footer component to main layout
apps/lfx-one/src/app/app.routes.ts Removed dedicated /old-ui route
apps/lfx-one/src/app/app.component.ts Removed CUSTOM_ELEMENTS_SCHEMA from app component
apps/lfx-one/src/app/app.component.html Removed footer from app component template
Comments suppressed due to low confidence (1)

apps/lfx-one/src/app/shared/services/persona.service.ts:37

  • Extra closing brace on line 32. This appears to be a syntax error where line 32 should be removed as the method already closes properly on line 31.
  }
}

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@coderabbitai
Copy link

coderabbitai bot commented Oct 22, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This PR refactors the application by replacing the deprecated 'old-ui' persona type with a new 'projects' type, relocating the footer component from the root app to the main layout, adding meeting attachment display with file icons, enhancing the projects dashboard with computed chart data, and introducing query parameter support to button navigation.

Changes

Cohort / File(s) Summary
Routing & Layout Restructuring
apps/lfx-one/src/app/app.component.*, apps/lfx-one/src/app/app.routes.ts, apps/lfx-one/src/app/layouts/main-layout/main-layout.component.*
Removed 'old-ui' route and footer element from root app component; relocated footer rendering to main-layout component. Transitioned CUSTOM_ELEMENTS_SCHEMA from app to main-layout component decorator.
Persona System Modernization
packages/shared/src/interfaces/persona.interface.ts, packages/shared/src/constants/persona.constants.ts, apps/lfx-one/src/app/shared/services/persona.service.ts, apps/lfx-one/src/app/shared/components/persona-selector/persona-selector.component.ts
Replaced 'old-ui' persona type with 'projects' in PersonaType union and PERSONA_OPTIONS. Removed localStorage post-render restoration and always-route-to-root on persona change. Eliminated effect-based form sync in persona-selector, using direct initialization instead.
Dashboard Selection & Routing
apps/lfx-one/src/app/modules/dashboards/dashboard.component.*
Replaced default dashboard case with explicit 'projects' case rendering <lfx-home />. Added explicit Signal<PersonaType> type annotation and HomeComponent import. Simplified computed logic by removing 'old-ui' special-casing.
Projects Dashboard Enhancement
apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.*
Introduced ProjectItemWithCharts interface and moved chart data generation from template to component. Added helper methods for random data generation and chart data construction. Refactored projects property to include precomputed chart configurations.
Meeting & List UI Refinements
apps/lfx-one/src/app/modules/dashboards/components/my-meetings/my-meetings.component.html, apps/lfx-one/src/app/modules/dashboards/components/pending-actions/pending-actions.component.html
Added max-height (28.125rem) and vertical scroll constraints to scrollable containers.
Meeting Attachments Feature
apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.*
Introduced reactive attachments loading via MeetingService; displays file attachment icons with links, tooltips, and mime-type-based icons. Added password query parameter and target _blank support to Join Meeting button.
Button Navigation Enhancement
apps/lfx-one/src/app/shared/components/button/button.component.*
Added queryParams input property (Record<string, string>) and template bindings for [queryParams]="queryParams()" and [target]="target()" on p-button element.
Service Robustness
apps/lfx-one/src/app/shared/services/analytics.service.ts, apps/lfx-one/src/app/shared/services/header/header.component.ts, apps/lfx-one/src/server/server.ts
Added guards and error handling: identifyUser early-exit on falsy auth0User; waitForAnalytics uses optional chaining for window access; server OIDC error path logs out session instead of falling back to token data.
Shared Interfaces
packages/shared/src/interfaces/components.interface.ts
Updated ProgressItemWithChart chart type fields to use generic ChartType instead of literal union 'line' | 'bar'.
Hero Section Styling
apps/lfx-one/src/app/modules/pages/home/home.component.html
Removed top padding (pt-24) from hero container.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MeetingCard as Dashboard Meeting Card
    participant MeetingService
    participant Backend
    
    User->>MeetingCard: Component renders with meeting signal
    MeetingCard->>MeetingCard: Detect meeting change via toObservable
    MeetingCard->>MeetingService: getMeetingAttachments(meeting.uid)
    alt Meeting UID exists
        MeetingService->>Backend: Fetch attachments
        alt Success
            Backend-->>MeetingService: MeetingAttachment[]
            MeetingService-->>MeetingCard: attachments Signal updated
        else Error
            Backend-->>MeetingService: Error
            MeetingService-->>MeetingCard: attachments = []
        end
    else No UID
        MeetingService-->>MeetingCard: attachments = []
    end
    MeetingCard->>User: Render attachment icons or empty state
Loading
sequenceDiagram
    participant PersonaSelector as Persona Selector
    participant PersonaService
    participant Dashboard
    
    PersonaSelector->>PersonaService: User selects new persona
    PersonaService->>PersonaService: setPersona(newPersona)
    PersonaService->>PersonaService: Navigate to '/'
    PersonaService->>Dashboard: Dashboard signal triggers re-evaluation
    Dashboard->>Dashboard: dashboardType computed with new persona
    Dashboard->>Dashboard: Switch case renders appropriate component (projects | core-developer | maintainer)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

The changes span multiple areas (routing, persona system, dashboard components, services) with moderate complexity. While many changes follow a consistent pattern (old-ui → projects migration), the projects dashboard refactoring introduces new chart logic requiring careful review. Meeting attachments feature adds reactive signal-based data loading. Most changes are cohesive and localized within their domains.

Possibly related PRs

Suggested labels

deploy-preview

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly captures the primary scope of the pull request by referencing both the UI improvements and the enhancements to the persona system, directly reflecting the major changes made across the codebase without unnecessary detail or irrelevant content.
Linked Issues Check ✅ Passed All linked issue objectives are addressed by the code changes: LFXV2-670’s footer relocation and schema updates, LFXV2-671’s persona removal and routing simplification, LFXV2-672’s dashboard scrolling and chart refactor, LFXV2-673’s dynamic attachment display, LFXV2-674’s meeting join enhancements, and LFXV2-675’s error handling improvements are each implemented in the respective files.
Out of Scope Changes Check ✅ Passed All modifications align with the stated objectives in the linked issues and there are no detected changes that fall outside the defined scope of UI improvements, persona enhancements, dashboard enhancements, attachment support, meeting join improvements, or error handling refinements.
Description Check ✅ Passed The description clearly outlines the various UI and persona-related updates, references the linked issue identifiers, and summarizes the key changes and test plan in a way that directly corresponds to the modifications in the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/LFXV2-670

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/lfx-one/src/app/shared/services/persona.service.ts (1)

17-20: Don't drop the persisted persona on reload

By removing the localStorage initialization we now always boot with 'core-developer', but persistPersona still writes the user’s choice. After a refresh the stored value is ignored, so the UI silently reverts to the default persona. That’s a regression in behavior and breaks the promise of persisting the selection. Please restore the stored value before creating the signal (and keep a safe fallback), e.g.:

-    // Initialize with default value
-    this.currentPersona = signal<PersonaType>('core-developer');
+    const storedPersona = typeof window !== 'undefined'
+      ? (localStorage.getItem(this.storageKey) as PersonaType | null)
+      : null;
+    this.currentPersona = signal<PersonaType>(storedPersona ?? 'core-developer');
🧹 Nitpick comments (6)
packages/shared/src/interfaces/components.interface.ts (1)

4-4: Consider narrowing chart typings to dashboard-supported types

Using ChartType broadens to all charts and may mask config/data mismatches. Suggest a bounded alias and reuse it:

// shared, near interfaces
export type DashboardChartType = Extract<ChartType, 'line' | 'bar'>;
// then
chartType: DashboardChartType;
chartData: ChartData<DashboardChartType>;
chartOptions: ChartOptions<DashboardChartType>;

Also applies to: 323-328

apps/lfx-one/src/app/modules/dashboards/components/pending-actions/pending-actions.component.html (1)

20-20: Scrollable container looks good

Meets the UX goal. Optionally add a data-testid on the scroll wrapper for e2e assertions (e.g., dashboard-pending-actions-scroll).

packages/shared/src/interfaces/persona.interface.ts (1)

8-8: Persona value update aligns with routing changes

Swap to 'projects' is consistent. For maintainability, consider replacing the string union with either:

export enum PersonaTypeEnum {
  CoreDeveloper = 'core-developer',
  Maintainer = 'maintainer',
  Projects = 'projects',
}
// and use PersonaTypeEnum where applicable

Or the as-const pattern:

export const PERSONA_TYPES = ['core-developer','maintainer','projects'] as const;
export type PersonaType = typeof PERSONA_TYPES[number];
apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.ts (1)

4-14: Attachments reactive stream is well-structured

Good use of toObservable/switchMap/catchError and toSignal. Consider deduping by uid to prevent redundant fetches when the same meeting instance re-emits:

-const attachments$ = meeting$.pipe(
-  switchMap((meeting) => {
+const attachments$ = meeting$.pipe(
+  // Dedup by UID
+  distinctUntilChanged((a, b) => a?.uid === b?.uid),
+  switchMap((meeting) => {
     if (meeting.uid) {
       return this.meetingService.getMeetingAttachments(meeting.uid).pipe(catchError(() => of([])));
     }
     return of([]);
   })
);

Also applies to: 23-24, 27-34, 148-161

apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.html (1)

73-88: Improve accessibility and testability for attachment icons.

  • Add an aria-label on the anchor for SR users.
  • Mark the decorative as aria-hidden.
  • Expose a stable container test id for the attachments row.
-        <div class="flex items-center gap-1 flex-shrink-0 mt-0.5">
+        <div class="flex items-center gap-1 flex-shrink-0 mt-0.5"
+             data-testid="dashboard-meeting-card-attachments">
@@
-            <a
+            <a
               [href]="attachment.file_url"
               target="_blank"
               rel="noopener noreferrer"
               class="w-6 h-6 rounded bg-gray-100 flex items-center justify-center hover:bg-gray-200 transition-colors"
               [attr.data-testid]="'dashboard-meeting-card-file-icon-' + (index + 1)"
+              [attr.aria-label]="'Open attachment: ' + (attachment.file_name || 'file')"
               [pTooltip]="attachment.file_name"
               tooltipPosition="top">
-              <i [class]="(((attachment.mime_type ?? '') | fileTypeIcon) + ' text-xs text-gray-500')"></i>
+              <i aria-hidden="true"
+                 [class]="(((attachment.mime_type ?? '') | fileTypeIcon) + ' text-xs text-gray-500')"></i>
             </a>
apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.ts (1)

31-39: Chart options: mark as constant for clarity and potential inlining.

Minor: declare as a const to signal immutability.

-  protected readonly chartOptions: ChartOptions<'line'> = {
+  protected readonly chartOptions: ChartOptions<'line'> = {
     responsive: true,
     maintainAspectRatio: false,
     plugins: { legend: { display: false }, tooltip: { enabled: false } },
     scales: {
       x: { display: false },
       y: { display: false },
     },
-  };
+  } as const;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 594044e and c5884b1.

📒 Files selected for processing (24)
  • apps/lfx-one/src/app/app.component.html (0 hunks)
  • apps/lfx-one/src/app/app.component.ts (1 hunks)
  • apps/lfx-one/src/app/app.routes.ts (0 hunks)
  • apps/lfx-one/src/app/layouts/main-layout/main-layout.component.html (1 hunks)
  • apps/lfx-one/src/app/layouts/main-layout/main-layout.component.ts (2 hunks)
  • apps/lfx-one/src/app/modules/dashboards/components/my-meetings/my-meetings.component.html (1 hunks)
  • apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.html (1 hunks)
  • apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.ts (2 hunks)
  • apps/lfx-one/src/app/modules/dashboards/components/pending-actions/pending-actions.component.html (1 hunks)
  • apps/lfx-one/src/app/modules/dashboards/dashboard.component.html (1 hunks)
  • apps/lfx-one/src/app/modules/dashboards/dashboard.component.ts (3 hunks)
  • apps/lfx-one/src/app/modules/pages/home/home.component.html (1 hunks)
  • apps/lfx-one/src/app/shared/components/button/button.component.html (1 hunks)
  • apps/lfx-one/src/app/shared/components/button/button.component.ts (1 hunks)
  • apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.html (2 hunks)
  • apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.ts (3 hunks)
  • apps/lfx-one/src/app/shared/components/header/header.component.ts (2 hunks)
  • apps/lfx-one/src/app/shared/components/persona-selector/persona-selector.component.ts (2 hunks)
  • apps/lfx-one/src/app/shared/services/analytics.service.ts (2 hunks)
  • apps/lfx-one/src/app/shared/services/persona.service.ts (2 hunks)
  • apps/lfx-one/src/server/server.ts (1 hunks)
  • packages/shared/src/constants/persona.constants.ts (1 hunks)
  • packages/shared/src/interfaces/components.interface.ts (2 hunks)
  • packages/shared/src/interfaces/persona.interface.ts (1 hunks)
💤 Files with no reviewable changes (2)
  • apps/lfx-one/src/app/app.routes.ts
  • apps/lfx-one/src/app/app.component.html
🧰 Additional context used
📓 Path-based instructions (6)
apps/lfx-one/src/**/*.html

📄 CodeRabbit inference engine (CLAUDE.md)

apps/lfx-one/src/**/*.html: Always add data-testid attributes when creating new Angular components for reliable test targeting
Use data-testid naming convention [section]-[component]-[element]

Files:

  • apps/lfx-one/src/app/modules/dashboards/components/my-meetings/my-meetings.component.html
  • apps/lfx-one/src/app/layouts/main-layout/main-layout.component.html
  • apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.html
  • apps/lfx-one/src/app/modules/dashboards/components/pending-actions/pending-actions.component.html
  • apps/lfx-one/src/app/modules/dashboards/dashboard.component.html
  • apps/lfx-one/src/app/shared/components/button/button.component.html
  • apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.html
  • apps/lfx-one/src/app/modules/pages/home/home.component.html
**/*.{ts,tsx,js,jsx,mjs,cjs,html,css,scss}

📄 CodeRabbit inference engine (CLAUDE.md)

Include required license headers on all source files

Files:

  • apps/lfx-one/src/app/modules/dashboards/components/my-meetings/my-meetings.component.html
  • packages/shared/src/interfaces/persona.interface.ts
  • apps/lfx-one/src/app/shared/components/persona-selector/persona-selector.component.ts
  • apps/lfx-one/src/app/layouts/main-layout/main-layout.component.html
  • apps/lfx-one/src/app/shared/components/button/button.component.ts
  • apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.html
  • apps/lfx-one/src/app/shared/components/header/header.component.ts
  • apps/lfx-one/src/app/app.component.ts
  • apps/lfx-one/src/server/server.ts
  • apps/lfx-one/src/app/modules/dashboards/dashboard.component.ts
  • packages/shared/src/interfaces/components.interface.ts
  • apps/lfx-one/src/app/layouts/main-layout/main-layout.component.ts
  • packages/shared/src/constants/persona.constants.ts
  • apps/lfx-one/src/app/modules/dashboards/components/pending-actions/pending-actions.component.html
  • apps/lfx-one/src/app/shared/services/analytics.service.ts
  • apps/lfx-one/src/app/modules/dashboards/dashboard.component.html
  • apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.ts
  • apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.ts
  • apps/lfx-one/src/app/shared/services/persona.service.ts
  • apps/lfx-one/src/app/shared/components/button/button.component.html
  • apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.html
  • apps/lfx-one/src/app/modules/pages/home/home.component.html
packages/shared/src/interfaces/**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Place all TypeScript interfaces in the shared package at packages/shared/src/interfaces

Files:

  • packages/shared/src/interfaces/persona.interface.ts
  • packages/shared/src/interfaces/components.interface.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Use TypeScript interfaces instead of union types for better maintainability
When defining PrimeNG-related types, reference the official PrimeNG component interfaces

Files:

  • packages/shared/src/interfaces/persona.interface.ts
  • apps/lfx-one/src/app/shared/components/persona-selector/persona-selector.component.ts
  • apps/lfx-one/src/app/shared/components/button/button.component.ts
  • apps/lfx-one/src/app/shared/components/header/header.component.ts
  • apps/lfx-one/src/app/app.component.ts
  • apps/lfx-one/src/server/server.ts
  • apps/lfx-one/src/app/modules/dashboards/dashboard.component.ts
  • packages/shared/src/interfaces/components.interface.ts
  • apps/lfx-one/src/app/layouts/main-layout/main-layout.component.ts
  • packages/shared/src/constants/persona.constants.ts
  • apps/lfx-one/src/app/shared/services/analytics.service.ts
  • apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.ts
  • apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.ts
  • apps/lfx-one/src/app/shared/services/persona.service.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Do not nest ternary expressions

Files:

  • packages/shared/src/interfaces/persona.interface.ts
  • apps/lfx-one/src/app/shared/components/persona-selector/persona-selector.component.ts
  • apps/lfx-one/src/app/shared/components/button/button.component.ts
  • apps/lfx-one/src/app/shared/components/header/header.component.ts
  • apps/lfx-one/src/app/app.component.ts
  • apps/lfx-one/src/server/server.ts
  • apps/lfx-one/src/app/modules/dashboards/dashboard.component.ts
  • packages/shared/src/interfaces/components.interface.ts
  • apps/lfx-one/src/app/layouts/main-layout/main-layout.component.ts
  • packages/shared/src/constants/persona.constants.ts
  • apps/lfx-one/src/app/shared/services/analytics.service.ts
  • apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.ts
  • apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.ts
  • apps/lfx-one/src/app/shared/services/persona.service.ts
packages/shared/src/constants/**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Place all reusable constants in the shared package at packages/shared/src/constants

Files:

  • packages/shared/src/constants/persona.constants.ts
🧬 Code graph analysis (4)
apps/lfx-one/src/app/shared/components/persona-selector/persona-selector.component.ts (1)
packages/shared/src/interfaces/persona.interface.ts (1)
  • PersonaType (8-8)
apps/lfx-one/src/app/modules/dashboards/dashboard.component.ts (1)
packages/shared/src/interfaces/persona.interface.ts (1)
  • PersonaType (8-8)
apps/lfx-one/src/app/shared/components/dashboard-meeting-card/dashboard-meeting-card.component.ts (2)
packages/shared/src/interfaces/meeting.interface.ts (2)
  • Meeting (75-150)
  • MeetingOccurrence (156-167)
packages/shared/src/interfaces/meeting-attachment.interface.ts (1)
  • MeetingAttachment (8-27)
apps/lfx-one/src/app/modules/dashboards/components/my-projects/my-projects.component.ts (1)
packages/shared/src/interfaces/components.interface.ts (1)
  • ProjectItem (368-383)
🔇 Additional comments (5)
apps/lfx-one/src/app/shared/components/button/button.component.html (1)

57-59: Router bindings look good.

Passing queryParams and target through p-button keeps router navigation consistent with the new input.

apps/lfx-one/src/app/shared/components/header/header.component.ts (1)

164-171: Confirm logout still triggers when profile fetch fails.

By catching every error here and converting it to null, no downstream code will ever observe the rejection from getCurrentUserProfile(). Please double-check that our “logout on user info fetch failure” flow still runs (e.g., redirecting to /logout or clearing auth state) when this observable errors; if it doesn’t, we might need to invoke the logout logic explicitly before returning of(null).

apps/lfx-one/src/app/app.component.ts (1)

5-5: SSR context injection looks correct

Importing REQUEST_CONTEXT aligns with server.handle context (auth) and TransferState hydration. LGTM.

apps/lfx-one/src/app/modules/pages/home/home.component.html (1)

4-4: Layout spacing tweak is fine

Top padding removal is safe; test IDs intact.

apps/lfx-one/src/app/shared/services/analytics.service.ts (1)

85-88: Robustness improvements to analytics are good

  • Early-return in identifyUser prevents invalid identify calls.
  • Optional chaining in waitForAnalytics avoids SSR/window issues.

Also applies to: 139-139

Comment on lines +29 to 32
protected readonly dashboardType: Signal<PersonaType> = computed(() => {
const persona = this.personaService.currentPersona();
// Filter out 'old-ui' as it has its own route
return persona === 'old-ui' ? 'core-developer' : persona;
return persona;
});
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Typed Signal looks good; add a safe default to harden against bad persona values.

Defensively default to 'projects' if the service ever returns null/unknown.

-  protected readonly dashboardType: Signal<PersonaType> = computed(() => {
-    const persona = this.personaService.currentPersona();
-    return persona;
-  });
+  protected readonly dashboardType: Signal<PersonaType> = computed(() => {
+    const persona = this.personaService.currentPersona();
+    return (persona ?? 'projects') as PersonaType;
+  });

To ensure alignment with objectives, please confirm the set of persona literals used across the app:


🏁 Script executed:

#!/bin/bash
rg -nP -C2 "PersonaType|currentPersona|setPersona|\bprojects\b|\bhome\b"

Length of output: 111653


Remove unnecessary fallback and add license header

  • The dashboardType computed signal safely returns a PersonaType and cannot be null/undefined, so the proposed ?? 'projects' fallback is redundant.
  • Add the required SPDX license header at the top of apps/lfx-one/src/app/modules/dashboards/dashboard.component.ts.
🤖 Prompt for AI Agents
In apps/lfx-one/src/app/modules/dashboards/dashboard.component.ts around lines
29 to 32, remove the unnecessary fallback used when computing dashboardType (the
computed signal should directly return the PersonaType from
personaService.currentPersona() with no '?? "projects"' or similar fallback) and
add the required SPDX license header at the very top of the file (e.g., the
appropriate SPDX short identifier and copyright line) so the file begins with
the licensed header followed by the existing imports and code.

public readonly href = input<string | undefined>(undefined);
public readonly target = input<string | undefined>(undefined);
public readonly rel = input<string | undefined>(undefined);
public readonly queryParams = input<Record<string, string>>({});
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Use Angular Params type for router query params.

The shared button should accept the full RouterLink Params contract (numbers, booleans, arrays). Record<string, string> rejects those valid shapes and forces consumers to cast or stringify. Switch to Params and keep the input optional to match Angular’s expectations.

-import { RouterModule } from '@angular/router';
+import { Params, RouterModule } from '@angular/router';-  public readonly queryParams = input<Record<string, string>>({});
+  public readonly queryParams = input<Params | undefined>(undefined);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public readonly queryParams = input<Record<string, string>>({});
// Before:
import { RouterModule } from '@angular/router';
// After:
import { Params, RouterModule } from '@angular/router';
// Before:
public readonly queryParams = input<Record<string, string>>({});
// After:
public readonly queryParams = input<Params | undefined>(undefined);
🤖 Prompt for AI Agents
In apps/lfx-one/src/app/shared/components/button/button.component.ts around line
58, replace the current input type Record<string, string> with Angular's Params
type and make the input optional; update imports to include Params from
@angular/router and change the input declaration to use Params (or Params |
undefined) with an optional/default value so that numbers, booleans, arrays and
other valid RouterLink shapes are accepted without consumer casting.

Comment on lines +241 to 243
res.oidc.logout();
return;
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Avoid unconditional logout on userinfo fetch failures

Risk of logout loops and poor UX on transient/network errors. Only logout on definite auth errors (401/403/invalid_token); otherwise fall back to unauthenticated render.

Apply this diff locally to scope the behavior:

-      res.oidc.logout();
-      return;
+      const status = (error as any)?.statusCode ?? (error as any)?.status;
+      const code = (error as any)?.code;
+      if (status === 401 || status === 403 || code === 'invalid_token') {
+        res.oidc.logout();
+        return;
+      }
+      // Non-auth failure: render as unauthenticated to avoid loops
+      auth.authenticated = false;
+      auth.user = null;

Also update the preceding warning message to reflect the new behavior (it currently mentions “using basic user data”).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
res.oidc.logout();
return;
}
const status = (error as any)?.statusCode ?? (error as any)?.status;
const code = (error as any)?.code;
if (status === 401 || status === 403 || code === 'invalid_token') {
res.oidc.logout();
return;
}
// Non-auth failure: render as unauthenticated to avoid loops
auth.authenticated = false;
auth.user = null;
}
🤖 Prompt for AI Agents
In apps/lfx-one/src/server/server.ts around lines 241-243, the code
unconditionally calls res.oidc.logout() when fetching userinfo fails; change
this so only definite auth errors (HTTP 401, 403, or an invalid_token error)
trigger logout, while other failures (network/timeouts/5xx) fall back to
rendering the page as unauthenticated. Update the surrounding catch/if logic to
inspect the error/response status or error code and call res.oidc.logout() only
for 401/403/invalid_token; for all other errors log a warning and proceed with
unauthenticated render. Also update the preceding warning message text to
reflect this behavior (mention falling back to unauthenticated render on
transient errors rather than saying “using basic user data”).

@asithade asithade merged commit 45a0915 into main Oct 23, 2025
5 checks passed
@asithade asithade deleted the feat/LFXV2-670 branch October 23, 2025 16:16
mauriciozanettisalomao pushed a commit that referenced this pull request Oct 24, 2025
#128)

Multiple enhancements across the application:

- LFXV2-670: Relocate footer to main layout for consistency
- LFXV2-671: Replace "old-ui" with "home" persona and simplify routing
- LFXV2-672: Add scrollable containers and refactor dashboard charts
- LFXV2-673: Add meeting attachments display with file type icons
- LFXV2-674: Enhance meeting join with password support and new tab
- LFXV2-675: Improve error handling and null safety across services

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Asitha de Silva <[email protected]>
mauriciozanettisalomao pushed a commit that referenced this pull request Oct 24, 2025
#128)

Multiple enhancements across the application:

- LFXV2-670: Relocate footer to main layout for consistency
- LFXV2-671: Replace "old-ui" with "home" persona and simplify routing
- LFXV2-672: Add scrollable containers and refactor dashboard charts
- LFXV2-673: Add meeting attachments display with file type icons
- LFXV2-674: Enhance meeting join with password support and new tab
- LFXV2-675: Improve error handling and null safety across services

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Asitha de Silva <[email protected]>
mauriciozanettisalomao pushed a commit that referenced this pull request Oct 24, 2025
#128)

Multiple enhancements across the application:

- LFXV2-670: Relocate footer to main layout for consistency
- LFXV2-671: Replace "old-ui" with "home" persona and simplify routing
- LFXV2-672: Add scrollable containers and refactor dashboard charts
- LFXV2-673: Add meeting attachments display with file type icons
- LFXV2-674: Enhance meeting join with password support and new tab
- LFXV2-675: Improve error handling and null safety across services

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Asitha de Silva <[email protected]>
mauriciozanettisalomao pushed a commit that referenced this pull request Oct 24, 2025
#128)

Multiple enhancements across the application:

- LFXV2-670: Relocate footer to main layout for consistency
- LFXV2-671: Replace "old-ui" with "home" persona and simplify routing
- LFXV2-672: Add scrollable containers and refactor dashboard charts
- LFXV2-673: Add meeting attachments display with file type icons
- LFXV2-674: Enhance meeting join with password support and new tab
- LFXV2-675: Improve error handling and null safety across services

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Asitha de Silva <[email protected]>
mauriciozanettisalomao pushed a commit that referenced this pull request Oct 24, 2025
#128)

Multiple enhancements across the application:

- LFXV2-670: Relocate footer to main layout for consistency
- LFXV2-671: Replace "old-ui" with "home" persona and simplify routing
- LFXV2-672: Add scrollable containers and refactor dashboard charts
- LFXV2-673: Add meeting attachments display with file type icons
- LFXV2-674: Enhance meeting join with password support and new tab
- LFXV2-675: Improve error handling and null safety across services

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Asitha de Silva <[email protected]>
Signed-off-by: Mauricio Zanetti Salomao <[email protected]>
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