Skip to content

Conversation

@shijithkjayan
Copy link
Member

@shijithkjayan shijithkjayan commented Oct 29, 2025

Display sync status and failure reason in the SheetIntegrationList with appropriate column styling and GraphQL query updates.

Summary by CodeRabbit

  • New Features
    • Added "Sync Status" and "Failure Reason" columns to the sheet integrations list with status badges and clear failure messages.
  • UI / Style
    • Adjusted column widths, centered dialog text, and added badge styles for success and error variants with overflow handling.
  • Tests
    • Updated and added tests covering sync statuses, failure reasons, and the "Sync Failed" dialog behavior.
  • Localization
    • Added translations for "Sync Status", "Failure Reason", and "Sync Failed".

Screenshot

Screenshot 2025-10-30 at 1 13 30 AM

list

Display sync status and failure reason in the SheetIntegrationList with
appropriate column styling and GraphQL query updates.
@coderabbitai
Copy link

coderabbitai bot commented Oct 29, 2025

Walkthrough

This PR adds per-sheet sync feedback to the Sheet Integration list. GraphQL query and mutation selections now include syncStatus and failureReason. The UI gains two new columns ("Sync Status" and "Failure Reason") with renderers and a dialog that shows failureReason on failed syncs. CSS adds badge and failure-related classes and adjusts name/last-sync column widths. Mock data and a mock export were updated to include syncStatus/failureReason. Tests were updated and expanded to assert the new columns and the failure-result dialog.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review getSyncStatus/getFailureReason renderers and their integration into getColumns in SheetIntegrationList.tsx.
  • Verify GET_SHEETS and SYNC_SHEET selections in src/graphql/queries/Sheet.ts and src/graphql/mutations/Sheet.ts match UI usage and mocks.
  • Inspect SheetIntegrationList.module.css additions and width changes for layout/truncation implications.
  • Check updated tests in SheetIntegrationList.test.tsx and mock exports in src/mocks/Sheet.tsx for consistency.

Poem

🐰 I nibbled through rows, a small code delight,
Badges gleam "SUCCESS" and "FAILED" in sight,
Reasons tucked neat, then shown when they sting,
Columns now whisper the sync-status ring,
Hoppity hop — the list sings in the night! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: adding sync status and failure reason columns to the sheet list page UI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch show-sync-status-and-failure-reasons

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60134ad and b5bf2c1.

📒 Files selected for processing (1)
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.module.css (2 hunks)
⏰ 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). (4)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: glific (1.18.3-otp-27, 27.3.3)
  • GitHub Check: CI
  • GitHub Check: build
🔇 Additional comments (1)
src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.module.css (1)

78-98: Badge styling looks good.

The .SyncStatusBadge base class and its composed variants (.SuccessBadge, .ErrorBadge) use CSS Modules composition correctly to share common styling while applying distinct colors for success and error states. The sizing, padding, and border-radius are consistent with the design.


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.

@github-actions
Copy link

github-actions bot commented Oct 29, 2025

@github-actions github-actions bot temporarily deployed to pull request October 29, 2025 06:45 Inactive
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: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ca327dc and 3d1af21.

📒 Files selected for processing (6)
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.module.css (1 hunks)
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.test.tsx (1 hunks)
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.tsx (2 hunks)
  • src/graphql/queries/Sheet.ts (1 hunks)
  • src/i18n/en/en.json (1 hunks)
  • src/mocks/Sheet.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

⚙️ CodeRabbit configuration file

Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.

Files:

  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.test.tsx
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.tsx
  • src/graphql/queries/Sheet.ts
  • src/mocks/Sheet.tsx
⏰ 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). (4)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: CI
  • GitHub Check: glific (1.18.3-otp-27, 27.3.3)
  • GitHub Check: build
🔇 Additional comments (10)
src/i18n/en/en.json (1)

351-352: LGTM!

Translation entries for the new columns are correctly added and follow the existing pattern.

src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.tsx (4)

44-50: LGTM!

The rendering functions correctly handle the display of sync status and failure reason with appropriate fallbacks to 'N/A'. The title attribute on the failure reason is a good UX touch for viewing truncated text.


52-59: LGTM!

The columnStyles array is correctly updated to include the new column styles, maintaining proper order alignment with the column data.


158-164: LGTM!

The getColumns function correctly integrates the new fields. The parameters and return values properly wire up the sync status and failure reason data to their respective renderers.


170-171: LGTM!

Column names are correctly defined with proper translation keys that align with the i18n additions.

src/graphql/queries/Sheet.ts (1)

36-37: LGTM!

The GraphQL query correctly includes the new syncStatus and failureReason fields to support the UI enhancements.

src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.test.tsx (2)

156-168: LGTM!

The test correctly verifies that the new column headers are rendered. The test structure follows the existing patterns in the file.


170-189: LGTM!

The test effectively verifies that sync status and failure reason values are correctly rendered, covering both success and failure scenarios from the mock data.

src/mocks/Sheet.tsx (2)

63-64: LGTM!

Mock data correctly includes sync status and failure reason for the success case, aligning with test expectations.


77-78: LGTM!

Mock data correctly includes sync status and failure reason for the failure case with a descriptive error message, providing good test coverage.

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 85.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.57%. Comparing base (c7c6dba) to head (b5bf2c1).

Files with missing lines Patch % Lines
...tion/SheetIntegrationList/SheetIntegrationList.tsx 83.33% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3595      +/-   ##
==========================================
+ Coverage   82.55%   82.57%   +0.02%     
==========================================
  Files         341      341              
  Lines       11424    11432       +8     
  Branches     2418     2422       +4     
==========================================
+ Hits         9431     9440       +9     
+ Misses       1259     1258       -1     
  Partials      734      734              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shijithkjayan shijithkjayan changed the base branch from master to bug_bash_1025 October 29, 2025 06:49
@cypress
Copy link

cypress bot commented Oct 29, 2025

Glific    Run #6649

Run Properties:  status check passed Passed #6649  •  git commit 56bf217299 ℹ️: Merge b5bf2c1289f89119f7a5b7459806d2b10c59b005 into c7c6dbacd4b93b08a2133ba88aac...
Project Glific
Branch Review show-sync-status-and-failure-reasons
Run status status check passed Passed #6649
Run duration 27m 32s
Commit git commit 56bf217299 ℹ️: Merge b5bf2c1289f89119f7a5b7459806d2b10c59b005 into c7c6dbacd4b93b08a2133ba88aac...
Committer Shijith Karumathil
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 182
View all changes introduced in this branch ↗︎

Update sheet integration to use syncStatus and failureReason fields
instead of warnings. Change dialog to display single failure message
with centered text alignment.
@priyanshu6238
Copy link
Contributor

priyanshu6238 commented Oct 29, 2025

when we select the allowed operation as read/write, but the Google Sheet is set to read-only, the system still allows saving the sheet.
Can we show a warning message when the user tries to do this?(we do check for read ,but not for write)
Otherwise, we’ll be left with an unknown error reason.
Screenshot 2025-10-29 at 10 54 53 PM

@priyanshu6238
Copy link
Contributor

Screenshot 2025-10-29 at 10 59 28 PM

Can we update the visual cues for the sync status to match the format used for the webhook response status?

@priyanshu6238
Copy link
Contributor

Screenshot 2025-10-29 at 11 02 20 PM

Can you please fix the spacing between the columns?

@shijithkjayan
Copy link
Member Author

when we select the allowed operation as read/write, but the Google Sheet is set to read-only, the system still allows saving the sheet. Can we show a warning message when the user tries to do this?(we do check for read ,but not for write) Otherwise, we’ll be left with an unknown error reason.

Can you explain this a bit better? I am not sure I understood it correctly @priyanshu6238

Replaces plain text sync status with styled badges for SUCCESS, FAILED,
and PENDING states. Adjusts column widths to accommodate the new badge
design.
Copy link
Contributor

@priyanshu6238 priyanshu6238 left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from bug_bash_1025 to master November 10, 2025 12:27
@github-actions github-actions bot temporarily deployed to pull request November 11, 2025 12:48 Inactive
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: 1

♻️ Duplicate comments (1)
src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.module.css (1)

45-50: Fix invalid min-width value and add missing white-space property.

Line 46 has an invalid CSS value min-width: 30 without a unit. This will be ignored by browsers. Additionally, as noted in a previous review, text-overflow: ellipsis requires white-space: nowrap to function correctly.

Apply this diff to fix both issues:

 .FailureReason {
-  min-width: 30;
+  min-width: 150px;
   width: 20%;
   overflow: hidden;
   text-overflow: ellipsis;
+  white-space: nowrap;
 }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d1af21 and 4d9746b.

📒 Files selected for processing (6)
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.module.css (2 hunks)
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.test.tsx (5 hunks)
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.tsx (4 hunks)
  • src/graphql/mutations/Sheet.ts (1 hunks)
  • src/i18n/en/en.json (1 hunks)
  • src/mocks/Sheet.tsx (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.tsx
  • src/i18n/en/en.json
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

⚙️ CodeRabbit configuration file

Review the Typescript and React code for conformity with best practices in React, Recoil, Graphql, and Typescript. Highlight any deviations.

Files:

  • src/mocks/Sheet.tsx
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.test.tsx
  • src/graphql/mutations/Sheet.ts
🧬 Code graph analysis (1)
src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.test.tsx (1)
src/mocks/Sheet.tsx (1)
  • syncSheetMutationWithFailure (194-219)
🪛 Biome (2.1.2)
src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.module.css

[error] 42-42: Duplicate properties can lead to unexpected behavior and may override previous declarations unintentionally.

min-width is already defined here.

Remove or rename the duplicate property to ensure consistent styling.

(lint/suspicious/noDuplicateProperties)

⏰ 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). (4)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: build
  • GitHub Check: glific (1.18.3-otp-27, 27.3.3)
  • GitHub Check: CI
🔇 Additional comments (11)
src/graphql/mutations/Sheet.ts (1)

80-81: LGTM!

The addition of syncStatus and failureReason fields to the mutation response is clean and aligns well with the UI changes and mock data updates throughout the PR.

src/mocks/Sheet.tsx (3)

63-64: LGTM!

The mock data provides good coverage with both success and failure scenarios. The first sheet demonstrates a successful sync with null failure reason, while the second shows a failed sync with a descriptive error message.

Also applies to: 77-78


184-185: LGTM!

The mutation mock correctly includes the new fields for the success case, maintaining consistency with the query mock data.


194-221: Good semantic rename with backward compatibility.

The rename from syncSheetMutationWithWarnings to syncSheetMutationWithFailure better reflects the actual behavior. The backward compatibility alias on Line 221 is a thoughtful addition that prevents breaking existing test code.

src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.module.css (3)

31-34: LGTM!

The width adjustment from 20% to 15% for the LastSync column makes room for the new Sync Status and Failure Reason columns.


52-55: LGTM!

The width adjustment from 30% to 25% is consistent with the overall column layout changes to accommodate the new Sync Status and Failure Reason columns.


71-105: LGTM! Well-structured badge styles.

The badge implementation follows good CSS patterns with a shared base class (SyncStatusBadge) and composable variants. The color schemes are appropriate and semantically clear:

  • Green for success
  • Red for error
  • Blue for pending

The centered text alignment for DialogContent improves the dialog presentation.

src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.test.tsx (4)

14-14: LGTM!

The import update aligns with the semantic rename in the mock file.


97-121: LGTM! Test properly updated for failure dialog.

The test correctly validates:

  • The "Sync Failed" dialog title
  • The detailed failure message from the mock
  • Dialog dismissal behavior

139-157: LGTM!

The test correctly verifies that clicking the cross icon dismisses the "Sync Failed" dialog.


159-192: Excellent test coverage for new columns!

The two new tests provide comprehensive validation:

  1. Column headers test: Verifies the UI structure includes "Sync Status" and "Failure Reason" columns
  2. Values test: Confirms correct display of both SUCCESS and FAILED statuses along with the failure reason message

This ensures both the presence and correctness of the new functionality.

@github-actions github-actions bot temporarily deployed to pull request November 12, 2025 08:08 Inactive
Copy link
Contributor

@priyanshu6238 priyanshu6238 left a comment

Choose a reason for hiding this comment

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

The patch is failing ,can you please fix it?

- Removes PendingBadge CSS class and its usage in the status handler. -
Also adjusts SyncStatus column width from 120px to 150px.
@github-actions github-actions bot temporarily deployed to pull request November 12, 2025 15:03 Inactive
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: 1

♻️ Duplicate comments (1)
src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.module.css (1)

44-49: Add white-space: nowrap for ellipsis to work correctly.

The text-overflow: ellipsis property (line 48) requires white-space: nowrap to function. Without it, long text will wrap to multiple lines instead of being truncated with an ellipsis. This was flagged in a previous review and remains unresolved.

Apply this diff to fix:

 .FailureReason {
   min-width: 30px;
   width: 20%;
   overflow: hidden;
   text-overflow: ellipsis;
+  white-space: nowrap;
 }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d9746b and 60134ad.

📒 Files selected for processing (2)
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.module.css (2 hunks)
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.tsx (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.tsx
⏰ 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). (4)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: build
  • GitHub Check: CI
  • GitHub Check: glific (1.18.3-otp-27, 27.3.3)
🔇 Additional comments (1)
src/containers/SheetIntegration/SheetIntegrationList/SheetIntegrationList.module.css (1)

78-98: Badge styling classes look good.

The new SyncStatusBadge, SuccessBadge, and ErrorBadge classes follow a clean composition pattern using CSS Modules' composes feature. Styling is appropriate for status indicators.

@shijithkjayan
Copy link
Member Author

The patch is failing ,can you please fix it?

Fixed @priyanshu6238

@github-actions github-actions bot temporarily deployed to pull request November 12, 2025 18:13 Inactive
@akanshaaa19
Copy link
Member

just this one thing otherwise looks good to me

@github-actions github-actions bot temporarily deployed to pull request November 14, 2025 05:44 Inactive
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.

Add Sync status and Failure reasons to Google sheets listing page Indicate Failed Sheet Syncs with Visual Cues

5 participants