Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR-341] fix: Page Error on Accessing Agent Summary with a Regular User Account #3004

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

agatha197
Copy link
Contributor

@agatha197 agatha197 commented Jan 7, 2025

Refactors SFTP scaling group data fetching in agent summary list because original code is for only superadmin. To allow all users access to the agent summary page, a different API should be used.

This PR moves the SFTP scaling group data fetching logic from the AgentSummaryList component to the useCurrentProject hook. Instead of making a direct API call within the component, it now uses the pre-fetched data from the project context, improving code organization and reducing redundant API calls.

The change simplifies the AgentSummaryList component by removing the direct backend client dependency and API call logic, while maintaining the same filtering functionality for SFTP upload agents.

Checklist:

  • Documentation
  • Test case(s) to demonstrate the difference of before/after
    • Verify that SFTP agents are still properly filtered from the agent summary list
    • Confirm that the SFTP scaling group data is correctly shared through the project context

@github-actions github-actions bot added the size:S 10~30 LoC label Jan 7, 2025
Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

github-actions bot commented Jan 7, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.98% (+0% 🔼)
398/7993
🔴 Branches 4.31% 237/5502
🔴 Functions
2.98% (+0% 🔼)
78/2614
🔴 Lines
4.9% (+0% 🔼)
383/7820

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from c24a033

@agatha197 agatha197 requested review from lizable and yomybaby January 7, 2025 10:16
Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

graphite-app bot commented Jan 8, 2025

Merge activity

…er Account (#3004)

Refactors SFTP scaling group data fetching in agent summary list because original code is for only superadmin. To allow all users access to the agent summary page, a different API should be used.

This PR moves the SFTP scaling group data fetching logic from the AgentSummaryList component to the useCurrentProject hook. Instead of making a direct API call within the component, it now uses the pre-fetched data from the project context, improving code organization and reducing redundant API calls.

The change simplifies the AgentSummaryList component by removing the direct backend client dependency and API call logic, while maintaining the same filtering functionality for SFTP upload agents.

**Checklist:**

- [ ] Documentation
- [ ] Test case(s) to demonstrate the difference of before/after
  - Verify that SFTP agents are still properly filtered from the agent summary list
  - Confirm that the SFTP scaling group data is correctly shared through the project context
@yomybaby yomybaby force-pushed the fix/cannot-access-agent-summary-with-user branch from 902602e to c24a033 Compare January 8, 2025 02:38
@graphite-app graphite-app bot merged commit c24a033 into main Jan 8, 2025
6 checks passed
@graphite-app graphite-app bot deleted the fix/cannot-access-agent-summary-with-user branch January 8, 2025 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S 10~30 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants