Skip to content

Conversation

raunakab
Copy link
Contributor

Description

This PR removes the constant refresh of the KG-exposed endpoint.

Addresses: https://linear.app/danswer/issue/DAN-2114/fix-fetching-of-kg-exposed-endpoint.

How Has This Been Tested?

Not tested.

@raunakab raunakab requested a review from a team as a code owner June 23, 2025 22:04
Copy link

vercel bot commented Jun 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2025 10:12pm

@raunakab raunakab force-pushed the fix/kg-exposed-hang branch from c429b43 to b12ddf6 Compare June 23, 2025 22:09
@raunakab raunakab changed the title fix: Remove refresh during KG exposed call fix: Fix sidebar logic to hit kg-endpoint for admins only Jun 23, 2025
@raunakab raunakab enabled auto-merge June 23, 2025 22:09
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Optimizes Knowledge Graph exposure status checks by removing excessive API polling behavior in the admin interface.

  • Added web/src/app/admin/kg/utils.ts introducing useIsKGExposed hook with disabled SWR auto-revalidation flags to prevent continuous refreshing
  • Modified web/src/components/admin/ClientLayout.tsx to use the new hook and tightened KG exposed type from boolean | null to boolean
  • Follows principle of 'fail loudly' by enforcing admin-only access and providing explicit boolean typing
  • Implements better resource management by removing unnecessary repeated API calls

2 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@Weves Weves removed this pull request from the merge queue due to a manual request Jun 24, 2025
@Weves Weves merged commit 8d5136f into main Jun 24, 2025
13 checks passed
@Weves Weves deleted the fix/kg-exposed-hang branch June 24, 2025 00:07
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