Skip to content

Fix #14999 :Loading Skeleton for Queue Management Page#15095

Merged
Jacobjeevan merged 7 commits intoohcnetwork:developfrom
KadariPavani:issue/14999/loading-skeleton-queue
Feb 26, 2026
Merged

Fix #14999 :Loading Skeleton for Queue Management Page#15095
Jacobjeevan merged 7 commits intoohcnetwork:developfrom
KadariPavani:issue/14999/loading-skeleton-queue

Conversation

@KadariPavani
Copy link
Copy Markdown
Contributor

@KadariPavani KadariPavani commented Jan 11, 2026

Proposed Changes

Fixes #14999

  1. Removed the Loading component import and replaced it with the Skeleton component from @/components/ui/skeleton
  2. Created QueueManagementSkeleton component that mirrors the actual page layout with placeholders for:
    • Header section: Back button, resource icon, resource name/date, and settings dropdown
    • Auto-refresh toggle: Switch and label (responsive, hidden on mobile)
    • Navigation tabs: Two tabs (Ongoing/Finished) with badge placeholders
    • Queue content area: Three-column grid layout with multiple card skeletons representing the queue columns (Waiting, Called, etc.)
  3. Replaced the dialog loading state in ManageServicePointsDialog with matching skeleton content (checkbox rows + header) for consistent visual feedback
  4. Replaced the Loading component in ServicePointsDropDown with a skeleton that mirrors the actual dropdown shape (wide left pill area + narrow chevron button on the right) — visible when simulating slow connections via the browser's Network throttle

Tagging: @ohcnetwork/care-fe-code-reviewers

Merge Checklist

  • Add specs that demonstrate the bug or test the new feature.
  • Update product documentation.
  • Ensure that UI text is placed in I18n files.
  • Prepare a screenshot or demo video for the changelog entry and attach it to the issue.
  • Request peer reviews.
  • Complete QA on mobile devices.
  • Complete QA on desktop devices.
Screen.Recording.2026-01-11.094715.mp4

Summary by CodeRabbit

  • User Experience Improvements
    • Replaced generic loading placeholders with detailed skeleton screens in queue management and service points selection interfaces. These skeleton screens now provide a better visual preview of the final content layout during data loading, significantly enhancing the overall loading experience and reducing the perceived wait time.

@KadariPavani KadariPavani requested review from a team and Copilot January 11, 2026 04:25
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 11, 2026

Deploy Preview for care-ohc ready!

Name Link
🔨 Latest commit ebc4371
🔍 Latest deploy log https://app.netlify.com/projects/care-ohc/deploys/6963263d9c024d000800f26f
😎 Deploy Preview https://deploy-preview-15095.preview.ohc.network
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 34f136c and 3bc326f.

📒 Files selected for processing (1)
  • src/pages/Facility/queues/ServicePointsDropDown.tsx

Walkthrough

Replaces generic Loading spinners with skeleton UIs: introduces an internal QueueManagementSkeleton in the Queue Management page and dialog, and swaps Loading for Skeletons in the Service Points dropdown. No changes to business logic or public APIs.

Changes

Cohort / File(s) Summary
Queue Management page & dialog
src/pages/Facility/queues/ManageQueue.tsx
Adds an internal QueueManagementSkeleton (imports Skeleton) and replaces Loading usage in the ManageQueue page and in ManageServicePointsDialog with skeleton-based placeholders for header, tabs, and main content.
Service Points dropdown
src/pages/Facility/queues/ServicePointsDropDown.tsx
Replaces Loading with Skeleton placeholders for the service points loading state and wraps them in a flex container; no control-flow or public API changes.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly identifies the issue being fixed (#14999) and describes the main change: replacing a generic Loading component with a skeleton loader for the Queue Management page.
Description check ✅ Passed Description follows the template structure with Proposed Changes section listing the modifications, includes issue reference, has detailed implementation details, tags reviewers, and includes a completed merge checklist with supporting evidence (demo video).
Linked Issues check ✅ Passed The PR fully addresses all requirements from #14999: replaced generic Loading spinner with QueueManagementSkeleton, created skeleton placeholders for header/tabs/dropdown/queue columns, used existing Skeleton component for consistency, and addressed the TODO comment.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue #14999. The modifications replace Loading components with skeleton loaders in ManageQueue.tsx and ServicePointsDropDown.tsx, which are within scope of the loading skeleton feature.

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

✨ Finishing Touches
🧪 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
Copy Markdown
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

🤖 Fix all issues with AI agents
In @src/pages/Facility/queues/ManageQueue.tsx:
- Around line 347-363: The loading branch renders DialogContent directly which
breaks dialog context; instead ensure the Dialog wrapper (and its DialogTrigger)
is always rendered and move the loading skeleton into DialogContent inside that
Dialog: in ManageQueue render the <Dialog> (with existing DialogTrigger)
regardless of allServicePoints, and when allServicePoints is falsy render the
skeleton UI inside the DialogContent component so the dialog open/close behavior
remains intact.
- Around line 292-334: In QueueManagementSkeleton, the Page component is
currently given title=" " (a single space); change this to the empty string
title="" so the intent of no title is explicit while keeping the existing
hideTitleOnPage prop; update the Page invocation that starts the component to
use title="" instead of " ".
📜 Review details

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a62942 and ebc4371.

📒 Files selected for processing (1)
  • src/pages/Facility/queues/ManageQueue.tsx
🧰 Additional context used
📓 Path-based instructions (12)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx}: Write concise, technical TypeScript code with accurate examples
Use TypeScript for all code; prefer interfaces over types
Avoid enums; use maps instead
Use TanStack Query for data fetching from the API along with query and mutate utilities for the queryFn and mutationFn
Use raviger for routing

**/*.{ts,tsx}: Use TypeScript with strict mode and ES2022 target
Use interface for defining object types in TypeScript
Avoid explicit any type in TypeScript
Use proper nullability annotations in TypeScript types
Use dedicated error handlers and TypeScript strict null checks

**/*.{ts,tsx}: Use TypeScript for all new code
Prefer interfaces over types for object definitions in TypeScript
Avoid using any type; use proper type definitions in TypeScript
Use type inference where possible in TypeScript
Use TanStack Query for API data management
Prefer React Context for global state management

**/*.{ts,tsx}: Use TanStack Query with the query and mutate utilities from @/Utils/request/
Use appropriate query keys following the resource pattern for TanStack Query
Leverage TanStack Query built-in features for pagination and debouncing
Implement proper error handling using the global error handler for TanStack Query operations
Use useQuery hook with queryKey and queryFn parameters, where queryFn wraps the API route with the query() utility
Use useMutation hook with mutationFn parameter wrapping API routes with the mutate() utility, and implement onSuccess callbacks to invalidate related queries
Support path parameters in TanStack Query using the pathParams option in query/mutate utilities
Support query parameters in TanStack Query using the queryParams option in query/mutate utilities
Use the silent: true option to suppress global error notifications when custom error handling is needed

**/*.{ts,tsx}: Use TypeScript with strict mode and ES2022 target
Use interface for defining object types
Avoid explicit any types and maint...

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Use functional and declarative programming patterns; avoid classes
Prefer iteration and modularization over code duplication
Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
Use the "function" keyword for pure functions
Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements

**/*.{ts,tsx,js,jsx}: Use path aliases for imports from src (@/*)
Use double quotes for strings
Semicolons are required at end of statements
Order imports as: 3rd-party → library → CAREUI → UI → components → hooks → utils → relative
Use PascalCase for component and class names
Use camelCase for variable and function names

**/*.{ts,tsx,js,jsx}: Use path aliases @/* for imports from src directory
Use double quotes for strings
Require semicolons at end of statements
Order imports: 3rd-party → library → CAREUI → UI → components → hooks → utils → relative
Use PascalCase for component and class names
Use camelCase for variable and function names

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursorrules)

Use declarative JSX

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{ts,tsx}: Use strict TypeScript configuration for medical data safety in all TypeScript source files
All literal strings must use i18next for multi-language support in healthcare interfaces
Use comprehensive error boundaries and user-friendly error messages for medical workflow debugging without exposing PHI
Follow ESLint configured rules for React hooks, accessibility, and code quality
Use @tanstack/react-query for server state management in API client code
Localize date and time formats for medical timestamps using locale-aware formatting functions
Use date-fns for date handling and manipulation with locale awareness for medical timestamps

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
src/**/*.{ts,tsx,css}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Prettier for consistent code formatting across the healthcare application

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
src/pages/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use raviger for application routing in page components and route definitions

src/pages/**/*.{ts,tsx}: Keep page components in src/pages/ organized by feature
Use descriptive file names that reflect the page purpose
Export page components as default exports
Co-locate page-specific components and utilities with page components
Use raviger router for navigation (existing dependency)
Implement proper route parameters and query string handling
Handle navigation guards and authentication checks in page components
Implement proper loading states and error boundaries in page components
Use semantic HTML structure for accessibility in page components
Use @tanstack/react-query for API state management in page components (existing dependency)
Implement proper loading, error, and success states for data fetching
Handle pagination and infinite scroll patterns appropriately
Cache data appropriately in page components based on usage patterns
Use controlled components for form inputs in page components
Implement proper form validation with zod schemas in page components
Handle form submission states (loading, success, error) in page components
Use React hooks for local page state
Minimize unnecessary re-renders in page components
Implement proper authentication checks in page components
Handle different user roles and permissions in page components
Redirect to login when authentication is required in page components
Show appropriate UI based on user permissions in page components
Set appropriate page titles and meta descriptions in page components
Handle OpenGraph and Twitter card meta tags in page components
Implement structured data where applicable in page components
Implement code splitting for large page components
Use lazy loading for heavy components within page components
Optimize bundle size with proper imports in page components
Handle image optimization and lazy loading in page components
Implement comprehensive error boundaries in page components
Handle API e...

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
src/**/*.{tsx,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{tsx,ts}: Use React 19.1.1 features and patterns following React 19 Documentation for healthcare application development
Use shadcn/ui as primary component system and CAREUI for healthcare-specific components
Use framer-motion for animations in healthcare UI interfaces

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
src/**/*.{tsx,css}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Tailwind CSS 4.1.3 utility classes with custom healthcare-specific design system for styling

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Use 2-space indentation

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/02-coding-standards.mdc)

**/*.tsx: Use functional components with proper type definitions in React
One component per file is preferred
Prefer default exports for React components
Follow the component naming pattern: ComponentName.tsx for React components
Use Tailwind CSS for styling
Use Shadcn UI components when available
Use local state for component-specific data
Use PascalCase for component file names (e.g., AuthWizard.tsx)

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (.cursor/rules/04-ui-components.mdc)

**/*.{tsx,ts}: Use Shadcn UI components as the primary component library
Follow the component documentation for proper usage
Customize components using Tailwind CSS
Use navigate and useRedirect from raviger for navigation and redirects
Use Tailwind's responsive classes and follow mobile-first approach
Implement proper ARIA attributes for accessibility
Ensure keyboard navigation works in components
Define component props using TypeScript interfaces
Use translation keys from src/Locale/ for internationalization
Support RTL languages in components
Use proper date/time formatting for multiple language support

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
**/*.{ts,tsx,js,jsx,json,css,scss,html}

📄 CodeRabbit inference engine (AGENTS.md)

Use 2-space indentation

Files:

  • src/pages/Facility/queues/ManageQueue.tsx
🧠 Learnings (16)
📚 Learning: 2025-08-10T10:20:32.921Z
Learnt from: AdityaJ2305
Repo: ohcnetwork/care_fe PR: 13316
File: src/pages/Facility/settings/productKnowledge/ProductKnowledgeView.tsx:63-65
Timestamp: 2025-08-10T10:20:32.921Z
Learning: In the ProductKnowledgeView component at src/pages/Facility/settings/productKnowledge/ProductKnowledgeView.tsx, the loading state should return only the Loading component without wrapping it in a Page shell. This is the expected behavior to provide a cleaner loading experience without maintaining the page layout during data fetching.

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2024-11-13T11:33:22.403Z
Learnt from: sainak
Repo: ohcnetwork/care_fe PR: 9079
File: src/components/Facility/ConsultationDetails/ConsultationNursingTab.tsx:93-117
Timestamp: 2024-11-13T11:33:22.403Z
Learning: In `src/components/Facility/ConsultationDetails/ConsultationNursingTab.tsx`, the parent component manages the loading state, so child components like `NursingPlot` should not implement their own loading indicators.

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:52:19.758Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .github/instructions/pages.instructions.md:0-0
Timestamp: 2025-11-25T13:52:19.758Z
Learning: Applies to src/pages/**/*.{ts,tsx} : Implement proper loading states and error boundaries in page components

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:52:19.758Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .github/instructions/pages.instructions.md:0-0
Timestamp: 2025-11-25T13:52:19.758Z
Learning: Applies to src/pages/**/*.{ts,tsx} : Implement proper loading, error, and success states for data fetching

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:52:51.914Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .github/instructions/react-components.instructions.md:0-0
Timestamp: 2025-11-25T13:52:51.914Z
Learning: Applies to src/components/**/*.{ts,tsx} : Use named exports from `lucide-react` for icons (e.g., `import { SettingsIcon } from "lucide-react"`)

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:52:51.914Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .github/instructions/react-components.instructions.md:0-0
Timestamp: 2025-11-25T13:52:51.914Z
Learning: Applies to src/components/**/*.{ts,tsx} : Implement loading, error, and success states for async operations

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:52:19.758Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .github/instructions/pages.instructions.md:0-0
Timestamp: 2025-11-25T13:52:19.758Z
Learning: Applies to src/pages/**/*.{ts,tsx} : Use lazy loading for heavy components within page components

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:52:19.758Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .github/instructions/pages.instructions.md:0-0
Timestamp: 2025-11-25T13:52:19.758Z
Learning: Applies to src/pages/**/*.{ts,tsx} : Optimize bundle size with proper imports in page components

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:52:51.914Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .github/instructions/react-components.instructions.md:0-0
Timestamp: 2025-11-25T13:52:51.914Z
Learning: Applies to src/components/**/*.{ts,tsx} : Use healthcare-specific CAREUI custom components (Calendar, WeekdayCheckbox, Zoom) from `@/CAREUI/`

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:54:35.875Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .cursor/rules/04-ui-components.mdc:0-0
Timestamp: 2025-11-25T13:54:35.875Z
Learning: Applies to **/*.{tsx,ts} : Use Shadcn UI components as the primary component library

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:52:51.914Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .github/instructions/react-components.instructions.md:0-0
Timestamp: 2025-11-25T13:52:51.914Z
Learning: Applies to src/components/**/*.{ts,tsx} : Use shadcn/ui components as primary UI system (Button, Card, Badge, etc.) from `@/components/ui/`

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:49:43.065Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T13:49:43.065Z
Learning: Applies to components/**/*.{ts,tsx} : Use Shadcn UI, Radix, and Tailwind for components and styling

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:54:09.978Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .cursor/rules/02-coding-standards.mdc:0-0
Timestamp: 2025-11-25T13:54:09.978Z
Learning: Applies to **/*.tsx : Use Shadcn UI components when available

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-11-25T13:50:10.786Z
Learnt from: CR
Repo: ohcnetwork/care_fe PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-25T13:50:10.786Z
Learning: Applies to src/**/*.{tsx,ts} : Use shadcn/ui as primary component system and CAREUI for healthcare-specific components

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-12-17T19:47:58.152Z
Learnt from: AdityaJ2305
Repo: ohcnetwork/care_fe PR: 14821
File: src/components/Location/LocationNavigation.tsx:161-163
Timestamp: 2025-12-17T19:47:58.152Z
Learning: To ensure the remove-unused-i18n.js cleanup script detects i18n keys, avoid wrapping keys inside a ternary expression passed directly to t(). Instead, call t() separately in each branch of a conditional, e.g. condition ? t("key1") : t("key2"), or compute the key in a variable before passing to t(). For LocationNavigation.tsx (and similar TSX files in the repo), prefer explicit separate i18n calls per branch or a shared precomputed key to guarantee all keys are statically detectable by the script.

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
📚 Learning: 2025-12-22T10:16:36.690Z
Learnt from: Jacobjeevan
Repo: ohcnetwork/care_fe PR: 14804
File: src/pages/Facility/services/pharmacy/DispensesView.tsx:117-135
Timestamp: 2025-12-22T10:16:36.690Z
Learning: In the care_fe repository, prefer the native HTML title attribute for simple tooltips over using shadcn/ui Tooltip components. Use Tooltip components only when the tooltip requires richer content, interactivity, or accessibility enhancements that cannot be achieved with a plain title. For simple cases, add a title attribute to the element (e.g., <span title="...">). If a Tooltip is used, ensure it is accessible and necessary, and avoid duplicating content available in the title attribute.

Applied to files:

  • src/pages/Facility/queues/ManageQueue.tsx
🧬 Code graph analysis (1)
src/pages/Facility/queues/ManageQueue.tsx (2)
src/components/Common/Page.tsx (1)
  • Page (16-34)
src/components/ui/dialog.tsx (2)
  • DialogContent (126-126)
  • DialogHeader (129-129)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: build
  • GitHub Check: CodeQL analysis (javascript-typescript)
  • GitHub Check: Agent
  • GitHub Check: Redirect rules - care-ohc
  • GitHub Check: Header rules - care-ohc
  • GitHub Check: Pages changed - care-ohc
  • GitHub Check: CodeQL-Build
  • GitHub Check: Test
  • GitHub Check: OSSAR-Scan
  • GitHub Check: deploy-preview
🔇 Additional comments (2)
src/pages/Facility/queues/ManageQueue.tsx (2)

29-29: LGTM! Correct shadcn/ui Skeleton import.

The import follows the project's path alias pattern and coding guidelines for using shadcn/ui components.


107-107: Successfully replaces generic Loading with skeleton.

This change achieves the PR's primary objective of replacing the generic spinner with a skeleton loader that reflects the page layout. The early return pattern with the dedicated skeleton component is appropriate for the loading state.

Comment on lines +292 to +334
function QueueManagementSkeleton() {
return (
<Page title=" " hideTitleOnPage>
<div className="flex flex-col gap-6">
{/* Header Section */}
<div className="flex justify-between gap-3">
<div className="flex gap-2 items-center">
<Skeleton className="size-10 rounded-md" />
<div className="flex flex-col gap-2">
<Skeleton className="h-6 w-48" />
<Skeleton className="h-4 w-32" />
</div>
</div>
<div className="flex gap-5 items-center">
<div className="hidden sm:flex items-center gap-2">
<Skeleton className="h-5 w-10 rounded-full" />
<Skeleton className="h-4 w-24" />
</div>
<Skeleton className="size-10 rounded-md" />
</div>
</div>

{/* Tabs Section */}
<div className="flex flex-col gap-4">
<div className="flex gap-4 border-b">
<Skeleton className="h-10 w-32 mb-[-1px]" />
<Skeleton className="h-10 w-32 mb-[-1px]" />
</div>

{/* Content Area */}
<div className="space-y-4">
<Skeleton className="h-12 w-full rounded-lg" />
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
<Skeleton className="h-64 w-full rounded-lg" />
<Skeleton className="h-64 w-full rounded-lg" />
<Skeleton className="h-64 w-full rounded-lg" />
</div>
</div>
</div>
</div>
</Page>
);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider using empty string for title prop.

The skeleton component structure appropriately mirrors the page layout with header, tabs, and content placeholders. However, line 294 passes title=" " (a space) to avoid displaying a title.

♻️ Cleaner alternative
-    <Page title=" " hideTitleOnPage>
+    <Page title="" hideTitleOnPage>

Using an empty string is semantically clearer than a space character when no title is needed.

🤖 Prompt for AI Agents
In @src/pages/Facility/queues/ManageQueue.tsx around lines 292 - 334, In
QueueManagementSkeleton, the Page component is currently given title=" " (a
single space); change this to the empty string title="" so the intent of no
title is explicit while keeping the existing hideTitleOnPage prop; update the
Page invocation that starts the component to use title="" instead of " ".

Comment on lines 347 to 363
if (!allServicePoints) {
return <Loading />;
return (
<DialogContent className="max-w-md">
<DialogHeader>
<Skeleton className="h-6 w-48" />
</DialogHeader>
<div className="space-y-2">
{[...Array(3)].map((_, i) => (
<div key={i} className="flex items-center space-x-3 p-3">
<Skeleton className="size-4 rounded" />
<Skeleton className="h-4 flex-1" />
</div>
))}
</div>
</DialogContent>
);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical: DialogContent cannot function without Dialog wrapper.

The loading state returns DialogContent directly (lines 349-361), bypassing the Dialog and DialogTrigger components. This breaks the dialog's open/close functionality—when a user clicks the trigger during loading, nothing will happen because DialogContent requires the context provided by the parent Dialog component.

🔧 Proposed fix
   if (!allServicePoints) {
-    return (
+    return (
+      <Dialog {...props}>
+        <DialogTrigger asChild>{trigger}</DialogTrigger>
-      <DialogContent className="max-w-md">
-        <DialogHeader>
-          <Skeleton className="h-6 w-48" />
-        </DialogHeader>
-        <div className="space-y-2">
-          {[...Array(3)].map((_, i) => (
-            <div key={i} className="flex items-center space-x-3 p-3">
-              <Skeleton className="size-4 rounded" />
-              <Skeleton className="h-4 flex-1" />
-            </div>
-          ))}
-        </div>
-      </DialogContent>
+        <DialogContent className="max-w-md">
+          <DialogHeader>
+            <Skeleton className="h-6 w-48" />
+          </DialogHeader>
+          <div className="space-y-2">
+            {[...Array(3)].map((_, i) => (
+              <div key={i} className="flex items-center space-x-3 p-3">
+                <Skeleton className="size-4 rounded" />
+                <Skeleton className="h-4 flex-1" />
+              </div>
+            ))}
+          </div>
+        </DialogContent>
+      </Dialog>
     );
   }

This maintains the proper Dialog → DialogTrigger → DialogContent structure so the dialog can open and display the loading skeleton.

🤖 Prompt for AI Agents
In @src/pages/Facility/queues/ManageQueue.tsx around lines 347 - 363, The
loading branch renders DialogContent directly which breaks dialog context;
instead ensure the Dialog wrapper (and its DialogTrigger) is always rendered and
move the loading skeleton into DialogContent inside that Dialog: in ManageQueue
render the <Dialog> (with existing DialogTrigger) regardless of
allServicePoints, and when allServicePoints is falsy render the skeleton UI
inside the DialogContent component so the dialog open/close behavior remains
intact.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 11, 2026

🚀 Preview Deployment Ready!

🔗 Preview URL: https://pr-15095.care-preview-a7w.pages.dev

📱 Mobile Access:
Scan the QR code below to open the preview on your mobile device.

QR Code


This preview will be automatically updated when you push new commits to this PR.

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

This PR replaces the generic Loading component with custom skeleton loaders for the Queue Management page to provide better visual feedback during data loading. The implementation adds two skeleton components: QueueManagementSkeleton for the main page and an inline skeleton for the ManageServicePointsDialog.

Changes:

  • Removed the generic Loading component import and replaced with Skeleton component from shadcn/ui
  • Created QueueManagementSkeleton component that mirrors the page layout (header, tabs, content grid)
  • Added skeleton loading state for ManageServicePointsDialog with checkboxes and labels
  • Updated loading conditions to use the new skeleton components

Comment on lines +293 to +294
return (
<Page title=" " hideTitleOnPage>
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

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

The Page component is being passed an empty string as the title. While hideTitleOnPage is true, this could cause issues for SEO and accessibility. Consider passing a meaningful title string or using a constant like "Loading..." that is localized using i18next, e.g., title={t("loading")}.

Suggested change
return (
<Page title=" " hideTitleOnPage>
const { t } = useTranslation();
return (
<Page title={t("loading")} hideTitleOnPage>

Copilot uses AI. Check for mistakes.
Comment on lines +324 to +327
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
<Skeleton className="h-64 w-full rounded-lg" />
<Skeleton className="h-64 w-full rounded-lg" />
<Skeleton className="h-64 w-full rounded-lg" />
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

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

The skeleton structure doesn't accurately represent the actual page content. The actual page shows a two-column layout within the QueueColumn component (Waiting and Called+Now Serving), but the skeleton shows a generic three-column grid. Consider updating the skeleton to better match the actual queue management layout with labeled columns like the real content.

Suggested change
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
<Skeleton className="h-64 w-full rounded-lg" />
<Skeleton className="h-64 w-full rounded-lg" />
<Skeleton className="h-64 w-full rounded-lg" />
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<Skeleton className="h-64 w-full rounded-lg" />
<Skeleton className="h-64 w-full rounded-lg" />

Copilot uses AI. Check for mistakes.
return (
<DialogContent className="max-w-md">
<DialogHeader>
<Skeleton className="h-6 w-48" />
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

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

The DialogHeader wrapper is missing a DialogTitle component, which is important for accessibility. Screen readers rely on proper dialog titles. The skeleton should either include a DialogTitle wrapper around the Skeleton or use a visually hidden title for accessibility purposes.

Suggested change
<Skeleton className="h-6 w-48" />
<DialogTitle>
<Skeleton className="h-6 w-48" />
</DialogTitle>

Copilot uses AI. Check for mistakes.
Comment on lines +293 to +294
return (
<Page title=" " hideTitleOnPage>
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

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

The skeleton loading state should include an aria-label or aria-busy attribute to inform screen reader users that content is loading. This is important for accessibility compliance in healthcare applications. Consider adding aria-busy="true" and aria-label="Loading queue management" attributes to the skeleton container or Page component.

Suggested change
return (
<Page title=" " hideTitleOnPage>
const { t } = useTranslation();
return (
<Page
title=" "
hideTitleOnPage
aria-busy="true"
aria-label={t("queue_management.loading_label", {
defaultValue: "Loading queue management",
})}
>

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 11, 2026

🎭 Playwright Test Results

Status: ✅ Passed
Test Shards: 3

Metric Count
Total Tests 265
✅ Passed 265
❌ Failed 0
⏭️ Skipped 0

📊 Detailed results are available in the playwright-final-report artifact.

Run: #6818

@KadariPavani
Copy link
Copy Markdown
Contributor Author

@gauritejusa @yash-learner @Jacobjeevan

Could you please review this pr?

@github-actions github-actions Bot added needs-triage question Further information is requested labels Jan 11, 2026

function QueueManagementSkeleton() {
return (
<Page title=" " hideTitleOnPage>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's not wrap with Page here, not needed.

@github-actions github-actions Bot added the stale label Jan 22, 2026
Copilot AI review requested due to automatic review settings February 2, 2026 05:37
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

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

Comment on lines 304 to +359
if (!allServicePoints) {
return <Loading />;
return (
<DialogContent className="max-w-md">
<DialogHeader>
<Skeleton className="h-6 w-48" />
</DialogHeader>
<div className="space-y-2">
{[...Array(3)].map((_, i) => (
<div key={i} className="flex items-center space-x-3 p-3">
<Skeleton className="size-4 rounded" />
<Skeleton className="h-4 flex-1" />
</div>
))}
</div>
</DialogContent>
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

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

When !allServicePoints, this branch returns DialogContent directly, which uses the dialog content primitive outside of a Dialog root and also drops the DialogTrigger/trigger prop entirely. This misuses the dialog API and will render a standalone modal container without any open/close state or trigger, which can lead to inconsistent behavior and accessibility issues. Consider keeping the Dialog wrapper (and trigger) in place and rendering the skeleton inside a DialogContent within that wrapper, or using a non-dialog container for the loading skeleton instead.

Copilot uses AI. Check for mistakes.
@github-actions github-actions Bot removed the stale label Feb 3, 2026
@8sami
Copy link
Copy Markdown
Contributor

8sami commented Feb 4, 2026

@Jacobjeevan i think the requested changes have been made, is there anything else that's required to close this pr?

@github-actions github-actions Bot added needs-triage question Further information is requested labels Feb 4, 2026
@KadariPavani
Copy link
Copy Markdown
Contributor Author

When it will be merge @Jacobjeevan @gauritejusa
Or do i need to change anything?
Can i get the review for this to close this PR

Copy link
Copy Markdown
Contributor

@Jacobjeevan Jacobjeevan left a comment

Choose a reason for hiding this comment

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

Go ahead and adjust for ServicePointsDropDown as well; you can enable throttling through browser's network tab to simulate slow connection.

Copilot AI review requested due to automatic review settings February 24, 2026 14:48
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

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


{/* Content Area */}
<div className="space-y-4">
<Skeleton className="h-12 w-full rounded-lg" />
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The skeleton for the search/filter row (line 322) shows a single full-width skeleton element, but the actual layout has two elements arranged side-by-side: a search input on the left and a service points dropdown on the right (see ManageQueueOngoingTab.tsx lines 65-87). Consider updating the skeleton to show two side-by-side skeleton elements with appropriate responsive sizing to better match the actual layout and reduce layout shift when content loads.

Suggested change
<Skeleton className="h-12 w-full rounded-lg" />
<div className="flex flex-col gap-3 sm:flex-row sm:items-center">
<Skeleton className="h-12 w-full rounded-lg sm:flex-1" />
<Skeleton className="h-12 w-full rounded-lg sm:w-48 md:w-64" />
</div>

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 26, 2026 11:53
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@Jacobjeevan Jacobjeevan merged commit 409a769 into ohcnetwork:develop Feb 26, 2026
24 of 26 checks passed
@Jacobjeevan Jacobjeevan added Tested reviewed reviewed by a core member and removed question Further information is requested needs testing needs review needs-triage labels Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewed reviewed by a core member Tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add loading skeleton for Queue Management page

4 participants