Skip to content

ECHO-381 Loading states for projects listing page#253

Merged
ussaama merged 1 commit intomainfrom
query-loading-states
Jul 31, 2025
Merged

ECHO-381 Loading states for projects listing page#253
ussaama merged 1 commit intomainfrom
query-loading-states

Conversation

@ussaama
Copy link
Copy Markdown
Contributor

@ussaama ussaama commented Jul 30, 2025

  • add loading skeleton for projects initial loading state
  • update loading skeleton for projects pagination
  • add loading skeleton for projects search

Summary by CodeRabbit

  • New Features

    • Introduced a unified skeleton loading component for project lists, providing consistent placeholder visuals for both grid and list views during data loading.
  • Enhancements

    • Improved loading experience by displaying skeleton placeholders while project data is being fetched.
    • Streamlined the appearance of loading indicators for infinite scrolling and initial load states.

- update loading skeleton for projects pagination
- add loading skeleton for projects search
@linear
Copy link
Copy Markdown

linear bot commented Jul 30, 2025

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jul 30, 2025

Walkthrough

A new ProjectListSkeleton React component is introduced to provide skeleton loading states for project lists in both grid and list views. The ProjectsHome route is updated to utilize this skeleton component, conditionally rendering it based on the project data fetch status and unifying the loading UI for initial and infinite scroll loading scenarios.

Changes

Cohort / File(s) Change Summary
ProjectListSkeleton Component
echo/frontend/src/components/project/ProjectListSkeleton.tsx
Adds a reusable React component for rendering skeleton UIs for project lists, supporting grid/list views and configurable props.
Project List Loading State Integration
echo/frontend/src/routes/project/ProjectsHome.tsx
Updates project home route to use the new skeleton component for loading states, conditionally rendering it based on fetch status and replacing legacy skeletons for infinite scroll.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ProjectsHome
    participant ProjectListSkeleton

    User->>ProjectsHome: Visits Projects Home
    ProjectsHome->>ProjectsHome: Fetch project data (status: pending)
    ProjectsHome->>ProjectListSkeleton: Render skeleton (view, searchValue, count)
    ProjectListSkeleton-->>ProjectsHome: Skeleton UI rendered
    ProjectsHome->>ProjectsHome: Fetch complete (status: success)
    ProjectsHome->>User: Render project list or no projects message
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
Project initial loading state (ECHO-381)
Project search fix (ECHO-381) Only loading state changes are visible; no direct evidence of search logic fixes.
Conversation accordion initial loading state (ECHO-381) No changes related to conversation accordion loading states observed.

Suggested labels

improvement

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch query-loading-states

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 44cfe54 and 2da5fe0.

📒 Files selected for processing (2)
  • echo/frontend/src/components/project/ProjectListSkeleton.tsx (1 hunks)
  • echo/frontend/src/routes/project/ProjectsHome.tsx (5 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: ussaama
PR: Dembrane/echo#205
File: echo/frontend/src/lib/query.ts:1444-1506
Timestamp: 2025-07-10T12:48:20.683Z
Learning: ussaama prefers string concatenation over template literals for simple cases where readability is clearer, even when linting tools suggest template literals. Human readability takes precedence over strict linting rules in straightforward concatenation scenarios.
Learnt from: ussaama
PR: Dembrane/echo#250
File: echo/frontend/src/components/form/MarkdownWYSIWYG/styles.css:1618-1624
Timestamp: 2025-07-29T11:36:23.638Z
Learning: ussaama prefers to keep CSS vendor prefixes and fallbacks without linter ignore comments, even when linters flag them as duplicate properties. Browser compatibility through progressive enhancement takes precedence over strict linting rules in their workflow.
echo/frontend/src/routes/project/ProjectsHome.tsx (2)

Learnt from: ussaama
PR: #224
File: echo/frontend/src/components/report/CreateReportForm.tsx:97-155
Timestamp: 2025-07-17T15:57:51.321Z
Learning: In echo/frontend/src/components/report/CreateReportForm.tsx, the conversation status section should only be displayed when there are pending conversations (conversationCounts.pending !== 0). When all conversations are processed, no status information should be shown to keep the UI minimal and clean.

Learnt from: ussaama
PR: #169
File: echo/frontend/src/components/project/ProjectPortalEditor.tsx:409-464
Timestamp: 2025-05-30T15:38:44.413Z
Learning: Badge-based selectors in ProjectPortalEditor.tsx: Keyboard navigation enhancements for accessibility are considered optional improvements rather than critical issues. The user acknowledges these suggestions but doesn't prioritize them as blockers.

⏰ 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). (2)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: ci-check-server
🔇 Additional comments (6)
echo/frontend/src/components/project/ProjectListSkeleton.tsx (2)

30-33: LGTM! Smart early return pattern for pagination use case.

Clean separation between wrapped and unwrapped rendering modes. The wrapper=false case for pagination is well-thought-out.


35-54: LGTM! Solid conditional rendering with proper layout structure.

Good use of Mantine components and responsive grid classes. The conditional header skeleton when searchValue is empty is a nice touch for the initial load state.

echo/frontend/src/routes/project/ProjectsHome.tsx (4)

47-47: LGTM! Clean import addition.

Proper relative import path for the new skeleton component.


187-197: LGTM! Smart status-based conditional rendering.

Excellent improvement - welcome alert now only shows after successful fetch, preventing it from appearing during loading states. This aligns perfectly with the PR objectives.


223-230: LGTM! Consistent status-based messaging.

Good pattern consistency - "no projects found" message also conditional on successful fetch status.


238-240: LGTM! Perfect loading state implementation.

Clean integration of the skeleton component for initial loading. Props are well-chosen for this use case.

@ussaama ussaama enabled auto-merge July 30, 2025 14:08
@ussaama ussaama requested a review from spashii July 30, 2025 14:52
@ussaama ussaama added this pull request to the merge queue Jul 31, 2025
Merged via the queue into main with commit f08f915 Jul 31, 2025
12 checks passed
@ussaama ussaama deleted the query-loading-states branch July 31, 2025 09:15
spashii pushed a commit that referenced this pull request Nov 18, 2025
- add loading skeleton for projects initial loading state
- update loading skeleton for projects pagination
- add loading skeleton for projects search

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Introduced a unified skeleton loading component for project lists,
providing consistent placeholder visuals for both grid and list views
during data loading.

* **Enhancements**
* Improved loading experience by displaying skeleton placeholders while
project data is being fetched.
* Streamlined the appearance of loading indicators for infinite
scrolling and initial load states.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants