Skip to content

refactor: move privacy consent from ChatBox to Login/SignUp#1239

Merged
4pmtong merged 20 commits intoeigent-ai:mainfrom
eureka928:feat/privacy-consent-login
Mar 7, 2026
Merged

refactor: move privacy consent from ChatBox to Login/SignUp#1239
4pmtong merged 20 commits intoeigent-ai:mainfrom
eureka928:feat/privacy-consent-login

Conversation

@eureka928
Copy link
Contributor

@eureka928 eureka928 commented Feb 12, 2026

Related Issue

Closes #934

Description

Move privacy consent from a runtime gating mechanism in ChatBox to a mandatory checkbox on the Login and SignUp pages. This simplifies the chat flow by removing the privacy dialog and inline privacy checks, while ensuring users consent before they can proceed.

Changes:

  • Add privacy consent checkbox to Login and SignUp pages (mandatory before submission)
  • Remove privacy gating logic and privacy prop from ChatBox and InputBox
  • Replace the 4-toggle privacy settings page with a single "Help Improve Eigent" toggle
  • Add help_improve field to UserPrivacySettings backend model
  • Add new i18n keys for privacy consent and help improve toggle across all 11 locales
  • Create reusable Radix UI Checkbox component (src/components/ui/checkbox.tsx)
  • Delete unused Dialog/Privacy component
  • Update ChatBox tests to reflect the simplified flow

Testing Evidence (REQUIRED)

  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
  • No frontend/UI changes in this PR.
image image image

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

@eureka928
Copy link
Contributor Author

@Wendong-Fan @Pakchoioioi @4pmtong would you review this PR for refactor?
I addressed all comments, I put this as last one is staled for 2 weeks

Thank you for your time

@eureka928 eureka928 force-pushed the feat/privacy-consent-login branch from 64e81eb to 9af3c6b Compare February 18, 2026 22:18
@eureka928
Copy link
Contributor Author

I attached the screenshots for this flow, please review

@eureka928
Copy link
Contributor Author

Hi @Douglasymlai would you review this PR?
Thank you

@Douglasymlai
Copy link
Contributor

Hi @eureka928 , thanks for the PR. Let me double check with @Pakchoioioi with this feature request. I believe the privacy agreement only needed for google and github login service. For local deployment login, doesn't need the privacy confirmation.

@Pakchoioioi
Copy link
Contributor

@Douglasymlai @eureka928
Not sure why I can’t open this branch — it’s completely blank.

Screenshot 2026-02-22 at 17 06 32

[info] Backend is ready, notifying frontend...
2026-02-22 17:06:09.554 Electron[8601:18072405] error messaging the mach port for IMKCFRunLoopWakeUpReliable
[info] activate 1
[8601:0222/170616.922477:ERROR:CONSOLE(1)] "Request Autofill.enable failed. {"code":-32601,"message":"'Autofill.enable' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
[8601:0222/170616.922518:ERROR:CONSOLE(1)] "Request Autofill.setAddresses failed. {"code":-32601,"message":"'Autofill.setAddresses' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)

But anyway. The expected behavior is: for both the downloaded build and local startup, as long as the server is connected to eigent server, the Privacy Permission checkbox should be required — regardless of which sign-in method is used.

@eureka928
Copy link
Contributor Author

@Douglasymlai @eureka928 Not sure why I can’t open this branch — it’s completely blank.

Screenshot 2026-02-22 at 17 06 32 [info] Backend is ready, notifying frontend... 2026-02-22 17:06:09.554 Electron[8601:18072405] error messaging the mach port for IMKCFRunLoopWakeUpReliable [info] activate 1 [8601:0222/170616.922477:ERROR:CONSOLE(1)] "Request Autofill.enable failed. {"code":-32601,"message":"'Autofill.enable' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1) [8601:0222/170616.922518:ERROR:CONSOLE(1)] "Request Autofill.setAddresses failed. {"code":-32601,"message":"'Autofill.setAddresses' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)

But anyway. The expected behavior is: for both the downloaded build and local startup, as long as the server is connected to eigent server, the Privacy Permission checkbox should be required — regardless of which sign-in method is used.

let me update this

@Douglasymlai
Copy link
Contributor

Douglasymlai commented Feb 24, 2026

Hi @eureka928 , I just got confirmed with @Pakchoioioi that the Privacy and Terms option is only needed when the platform is using our private cloud service. For open-source and locally deployed users, it does not apply, and it adds an extra unnecessary step.

Since we’ve already moved the Terms and Agreement flow to the website auth process, this selection update on Signup Login is no longer needed in the desktop app.

Sorry for the short notice. That said, there are still parts of this PR that can be merged, such as:

  • Remove privacy gating logic and the privacy prop from ChatBox and InputBox
  • Replace the 4-toggle privacy settings page with a single “Help Improve Eigent” toggle
  • Add help_improve field to the UserPrivacySettings backend model (We can keep this)
  • Add new i18n keys for privacy consent and the help-improve toggle across all 11 locales
  • Delete the unused Dialog/Privacy component
  • Update ChatBox tests to reflect the simplified flow

If you make this update, I’ll push the team to merge this PR ASAP. Thanks

@eureka928 eureka928 force-pushed the feat/privacy-consent-login branch from 1b9bbb9 to ec267af Compare February 24, 2026 12:38
@eureka928
Copy link
Contributor Author

Hi @Douglasymlai this is updated, can you review again please?

@Douglasymlai
Copy link
Contributor

@eureka928 Perfect! I have also asked @a7m-1st to help review.

@Douglasymlai Douglasymlai self-requested a review February 24, 2026 12:42
@a7m-1st
Copy link
Collaborator

a7m-1st commented Feb 24, 2026

Oh wow thats fast, let me do it now thanks @eureka928

Copy link
Collaborator

@a7m-1st a7m-1st left a comment

Choose a reason for hiding this comment

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

Hi there @eureka928 thanks for the updates. Generally after review I think you forgot to update the installation flow too since we don't have permissions step.

<div className="flex h-full w-2/3 rounded-2xl bg-surface-tertiary p-md">
          {initState === 'permissions' && <Permissions />}
          {initState !== 'permissions' && <CarouselStep />}
</div>

In additionally make sure to update the onboarding docs that refers to the privacy screen . Languages needs updating too.

Copy link
Contributor

@Douglasymlai Douglasymlai left a comment

Choose a reason for hiding this comment

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

Feature function testing passed. There are no conflicts, and everything was created as expected.

@eureka928 eureka928 requested a review from a7m-1st February 24, 2026 13:41
@eureka928 eureka928 force-pushed the feat/privacy-consent-login branch from 84d5a41 to f8ceeb9 Compare February 26, 2026 06:11
@eureka928
Copy link
Contributor Author

Hi @4pmtong would you merge this as well?
Thank you for your review

@eureka928 eureka928 force-pushed the feat/privacy-consent-login branch from f8ceeb9 to 82e7811 Compare March 3, 2026 12:47
@eureka928
Copy link
Contributor Author

Hi @a7m-1st would you review this again?

@a7m-1st
Copy link
Collaborator

a7m-1st commented Mar 3, 2026

Yes, I have currently migrated the server changes from this pr and pr 1219. Just waiting for approval 🫡

@a7m-1st
Copy link
Collaborator

a7m-1st commented Mar 3, 2026

i.e. to dev.eigent.ai

eureka928 and others added 14 commits March 6, 2026 13:56
Create reusable checkbox component following the existing switch.tsx
pattern with React.forwardRef and design token classes.
Add agree-to-terms and please-accept-terms keys to all layout.json
locale files. Add help-improve-eigent keys to all setting.json files.
Add mandatory terms acceptance checkbox that gates login and OAuth
flows. Call acceptPrivacy API after successful authentication.
Add mandatory terms acceptance checkbox that gates registration and
OAuth flows. Call acceptPrivacy API after successful OAuth login.
Remove privacy state, API fetch, consent banner, and all privacy
checks from ChatBox. Privacy consent is now handled at login.
Remove privacy prop from interface, destructured props, drag-drop
guards, and add-file button disabled condition.
Replace the four individual privacy permission toggles with a single
optional Help Improve Eigent toggle for telemetry data collection.
Remove privacy-related test cases from ChatBox tests since privacy
is now handled at login. Update mocks and assertions accordingly.
- Add missing agree-to-terms and please-accept-terms to en-us layout.json
- Add missing help-improve-eigent keys to en-us setting.json
- Style checkbox with input border for light/dark theme visibility
- Restore setSearchParams in ChatBox dropped during rebase
Privacy/terms consent is now handled in the website auth process
for private cloud service users. The checkbox gating is no longer
needed in the desktop app login flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address PR review feedback:
- Remove permissions step from installation flow (no longer needed)
- Delete InstallStep/Permissions.tsx component
- Update InitState type to remove 'permissions' state
- Add proper translations for help-improve-eigent keys across all locales
- Remove Privacy section from quick_start.md docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clean up leftovers from privacy consent removal:
- Delete unused privacy_settings.png asset
- Remove old 4-toggle privacy keys from all setting.json locales
- Remove privacy permission keys from all layout.json locales

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@eureka928 eureka928 force-pushed the feat/privacy-consent-login branch from 82e7811 to f619d14 Compare March 6, 2026 12:57
@eureka928
Copy link
Contributor Author

Thanks @eureka928 for contribution! @eureka928 @a7m-1st could you help resolve the conflicts?

@4pmtong I fixed the conflict, would you merge this?
Thank you

cc: @a7m-1st

@a7m-1st
Copy link
Collaborator

a7m-1st commented Mar 6, 2026

Thanks for merging; let me do a quick test before confirming

Comment on lines -637 to -662
const activeAskValue =
chatStore?.tasks[chatStore.activeTaskId as string]?.activeAsk;

useEffect(() => {
let timer: NodeJS.Timeout;
if (activeAskValue && activeAskValue !== '') {
const _taskId = chatStore.activeTaskId as string;
timer = setTimeout(() => {
handleSend('skip', _taskId);
}, 30000); // 30 seconds
return () => clearTimeout(timer); // clear previous timer
}
// if activeAsk is empty, also clear timer
return () => {
clearTimeout(timer);
};
}, [
activeAskValue,
message, // depend on message
chatStore,
handleSend,
]);

// Reactive queuedMessages for the active project
const queuedMessages = useMemo(() => {
const pid = projectStore.activeProjectId;
Copy link
Collaborator

Choose a reason for hiding this comment

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

HI there @eureka928 , I think you removed the triggers queues by mistake

Comment on lines +947 to +888
// Remove from projectStore's queuedMessages
const removed = projectStore.removeQueuedMessage(project_id, task_id);
if (!removed || !removed.task_id) {
console.error(`Task with id ${task_id} not found in project queue`);
// Store the original message before removal for potential restoration
const project = projectStore.getProjectById(project_id);
const originalMessage = project?.queuedMessages?.find(
(m) => m.task_id === task_id
);

Copy link
Collaborator

Choose a reason for hiding this comment

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

This whole function is rolled back too

Comment on lines -1164 to -1173

{/* Bottom Box - Show when has messages */}
{chatStore.activeTaskId && hasAnyMessages && (
<BottomBox
state={hasAnyMessages ? getBottomBoxState() : 'input'}
queuedMessages={queuedMessages}
onRemoveQueuedMessage={(id) => handleRemoveTaskQueue(id)}
subtitle={
hasAnyMessages && getBottomBoxState() === 'confirm'
? (() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason we removed this?

@a7m-1st
Copy link
Collaborator

a7m-1st commented Mar 6, 2026

Remove privacy gating logic and the privacy prop from ChatBox and InputBox

Let me handling those conflicts @eureka928 ; as its quite sensitive. Let's isolate the ChatBox to only focus on privacy for now if thats is okay

@eureka928
Copy link
Contributor Author

Remove privacy gating logic and the privacy prop from ChatBox and InputBox

Let me handling those conflicts @eureka928 ; as its quite sensitive. Let's isolate the ChatBox to only focus on privacy for now if thats is okay

Okay, thank you for taking this

Copy link
Collaborator

@a7m-1st a7m-1st left a comment

Choose a reason for hiding this comment

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

LGTM now. I think you can reconfirm @4pmtong , the main changes include:

Reverted model check (not present from main)

Image image

Only removed privacy changes from ChatBox/index.tsx in 1745120

Missing translation key

@4pmtong 4pmtong merged commit 2e44ae0 into eigent-ai:main Mar 7, 2026
8 checks passed
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.

[Feature Request] Move privacy consent to login/registration flow

6 participants