Skip to content

feat: private working set v2.1 governance + global toggle quarantine mode + dashboard UX polish#75

Merged
kaffolder7 merged 13 commits intomainfrom
feature/private-working-set-v2
Apr 10, 2026
Merged

feat: private working set v2.1 governance + global toggle quarantine mode + dashboard UX polish#75
kaffolder7 merged 13 commits intomainfrom
feature/private-working-set-v2

Conversation

@kaffolder7
Copy link
Copy Markdown
Owner

Summary

This PR delivers the full Private Working Set (PWS) v2/v2.1 rollout with stronger server-side governance, a global admin kill-switch (quarantine mode), major dashboard UX cleanup, sharing panel improvements, localization updates, and docs updates.

What Changed

  • Added global PWS governance toggle (private_working_set_enabled) with default OFF.
  • Added admin endpoint: PATCH /api/admin/settings/private-working-set.
  • Added private_working_set_enabled to auth/public config payloads (/api/public/config, /api/auth/login, /api/auth/me).
  • Enforced server-side moderation policy: non-admin promotions are always queued when moderation is enabled (including self-owned sharable sources).
  • Preserved admin self-promotion/self-approval behavior.
  • Implemented PWS quarantine mode when globally OFF:
  • PWS controls hidden in dashboard.
  • PWS endpoints blocked (403).
  • PWS data preserved (dormant, not deleted).
  • PWS private books hidden from dashboard/discovery and direct DAV/API writes blocked.
  • PWS source-hiding rules no longer applied while OFF.
  • Improved PWS dashboard UX:
  • Simple vs advanced controls.
  • Refresh always visible, Reset advanced-only.
  • Save button dirty-state behavior.
  • Selected source count.
  • Scroll-capped lists for large datasets.
  • Cleaner helper text and control alignment.
  • Fixed dashboard sharing bugs and UX:
  • Corrected outgoing share resource name display.
  • Consolidated duplicate share rows into single resource cards.
  • Added clearer “shared with” presentation and improved list ergonomics.
  • Added/updated i18n keys across locales (backend + frontend).
  • Expanded tests across backend and frontend for new policy, toggle, payload, and UI behavior.
  • Updated docs (docs/, docs/landing/) for governance, API, troubleshooting, and user/admin guidance.

Upgrade / Ops Notes

  • New env flag: ENABLE_PRIVATE_WORKING_SET=false by default.
  • If you want PWS active immediately after deploy, set ENABLE_PRIVATE_WORKING_SET=true or enable via Admin Control Center.
  • No destructive migration path introduced for PWS data; OFF state is quarantine, not delete.

Reviewer Focus

  • Server enforcement in AddressBookPrivateWorkingSetService and EnsurePrivateWorkingSetEnabled.
  • Quarantine behavior in dashboard, export, DAV backend, and address-book write paths.
  • Auth/public config propagation and admin settings endpoint wiring.
  • Dashboard PWS and sharing panel UI behavior under admin vs non-admin roles.
  • i18n parity and docs accuracy for the new global toggle behavior.

Introduce a utility to render button labels with qualifiers
(e.g., words in parentheses) more elegantly. This utility
handles different parentheses styles, trims unnecessary
spaces, and updates the display of certain buttons in the
DashboardPrivateWorkingSetPanel component. These changes
improve visual clarity and maintain consistency across
button labels, ensuring that button qualifiers are clearly
and uniformly presented.
Change button alignment from justify-end to justify-start
in the DashboardPrivateWorkingSetPanel component. This
adjustment is intended to improve the visual alignment of
the button with the rest of the form elements, enhancing
the overall user interface consistency and readability.
Reorganize buttons in DashboardPrivateWorkingSetPanel to ensure the
"Refresh from source books" button is always displayed, and
consolidate its functionality within the same section regardless of
the advanced controls visibility. Modify related tests to ensure
the correct buttons are rendered and tested in both simple and
advanced modes. This change enhances readability and maintainability
by reducing redundancy in the button handling logic and ensures
consistent functionality across different panel states.
Simplify the constructor in EnsurePrivateWorkingSetEnabled middleware by using
a property promotion for RegistrationSettingsService. This change enhances
readability and modernizes the codebase.

Update the test suite PrivateWorkingSetCardDavTest by adding an import for
AddressBookPrivateWorkingSetService and removing redundant namespaces. This
specifically improves test maintainability and reduces potential
namespace-related issues.

These changes improve the code's maintainability and follow modern PHP
practices, ensuring that the logic for enabling private working sets is
efficiently handled.
Move the Apple Contacts Compatibility section below the Private Working
Set panel in the UI and reposition it in the user-guide.md. This ensures
that users can access Apple Contacts Compatibility features and
documentation. Previously, the section was misplaced, which could lead
to confusion or lack of access for users seeking these functionalities.
@kaffolder7 kaffolder7 merged commit af59966 into main Apr 10, 2026
4 checks passed
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