Skip to content

stop polling approval requests for anonymous visitors - #70

Open
OsamaHaikal wants to merge 1 commit into
mainfrom
osama/fix/elicitation-poll-anonymous
Open

OsamaHaikal wants to merge 1 commit into
mainfrom
osama/fix/elicitation-poll-anonymous

Conversation

@OsamaHaikal

@OsamaHaikal OsamaHaikal commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

ElicitationForm polled GET /widget/v5/connections/elicitation/:session every 1.5 s for every active chat. The backend refuses anyone without a signed-in token carrying connection access, so anonymous embeds produced a steady stream of 401s (seen on the docs site on prod today).

Poll only when config.user.token is set; the explicit capabilities.connections: false opt-out still applies.

🦎🦎🦎🦎🦎🦎🦎🦎🦎🦎🦎🦎🦎🦎🦎🦎🦎🦎🦎🦎

Greptile Summary

This PR prevents ElicitationForm from polling connection approval requests unless the widget has a signed-in user token, while preserving the explicit connections capability opt-out.

  • Adds coverage for anonymous, signed-in, and connections-disabled configurations.
  • Adds patch release entries for the widget package family.
  • Risk level: Low. The change narrows network activity for anonymous visitors without expanding authorization or data access.
  • No database migrations or dependency additions are included.
Confidence Score: 5/5

Risk level: Low; the PR appears safe to merge because it only suppresses unauthorized anonymous polling and preserves signed-in polling.

The authentication guard matches the stated backend access contract, sign-in transitions remain reactive, token renewal continues using current credentials, and the focused tests cover the changed decision branches.

Reviews (1): Last reviewed commit: "stop polling approval requests for anony..." | Re-trigger Greptile

The widget polled the approvals endpoint every 1.5s for every visitor and was refused each time unless the user was signed in with connection access.
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.

1 participant