Skip to content

[Duplicate]: Disable auto-sync toggle when logged out#71

Closed
resolvicomai wants to merge 2 commits into
VeriWorkly:masterfrom
resolvicomai:fix/disable-sync-when-logged-out
Closed

[Duplicate]: Disable auto-sync toggle when logged out#71
resolvicomai wants to merge 2 commits into
VeriWorkly:masterfrom
resolvicomai:fix/disable-sync-when-logged-out

Conversation

@resolvicomai
Copy link
Copy Markdown
Contributor

Description

Fixes the Settings sync control so logged-out Studio users cannot enable Auto-Sync without a session.

The switch now:

  • reads the current auth state from the user store
  • renders unchecked and disabled when the user is logged out
  • shows the sign-in guidance requested in the issue
  • guards the toggle handler so it does not write the sync preference or start sync work without an authenticated user

Linked Issue

Fixes #64

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🧪 Tests (adding or updating tests)

Validation

  • npm run test:contracts -w @veriworkly/studio -- tests/contracts/sync-section.contract.test.tsx
  • npm run test:contracts -w @veriworkly/studio
  • npm run lint -w @veriworkly/studio
  • npm run format -w @veriworkly/studio
  • NEXT_PUBLIC_BACKEND_URL=http://localhost:8080/api/v1 npm run build -w @veriworkly/studio
  • git diff --check

Attempted npm audit signatures, but npm registry resolution failed before audit with ETARGET No matching version found for @types/node@25.8.0.

@resolvicomai
Copy link
Copy Markdown
Contributor Author

Pushed a follow-up for the failing Quality & Testing check. The failure was from root Prettier on two existing docs/readme files; while replaying the remaining CI path locally, I also fixed the blog platform source import so npm run build can resolve the generated Fumadocs source under Turbopack.

Validated locally:

  • npm run lint
  • npm run format
  • npm run test:contracts -w @veriworkly/studio
  • DATABASE_URL=postgresql://dummy:dummy@localhost:5432/dummy npm exec -w @veriworkly/server -- prisma generate --schema=prisma/schema.prisma
  • CI-like npm run build with the workflow dummy env vars
  • git diff --check

Copy link
Copy Markdown
Collaborator

@Gautam25Raj Gautam25Raj left a comment

Choose a reason for hiding this comment

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

Hi @resolvicomai, thank you so much for taking the time to open this PR and contribute to the repository!

Unfortunately, another contributor has already submitted a PR addressing this exact issue. To avoid duplicate code reviews and keep discussions consolidated, we will close this PR.

As a reminder for future contributions, please comment on the relevant issue first and ask to have it assigned to you before starting work or opening a PR. This helps us coordinate efforts and ensures that multiple people aren't working on the same task.

We highly appreciate your initiative and enthusiasm!

Thanks again, and we look forward to your next contribution!

@Gautam25Raj Gautam25Raj added the invalid This doesn't seem right label May 21, 2026
@Gautam25Raj Gautam25Raj changed the title [BUG]: Disable auto-sync toggle when logged out [Duplicate]: Disable auto-sync toggle when logged out May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Disable Auto-Sync toggle when user is logged out in settings

2 participants