Skip to content

fix(event-types): hide hidden team event types for members and propagate hidden lock(#15873)#28471

Open
nourzakhama2003 wants to merge 3 commits intocalcom:mainfrom
nourzakhama2003:fix/hidden-toggle-managed-events-clean
Open

fix(event-types): hide hidden team event types for members and propagate hidden lock(#15873)#28471
nourzakhama2003 wants to merge 3 commits intocalcom:mainfrom
nourzakhama2003:fix/hidden-toggle-managed-events-clean

Conversation

@nourzakhama2003
Copy link

This PR implements parent-level Hidden support for managed event types and ensures the setting is applied consistently to child event types.

Fixes #25903
Fixes CAL-6920
Summary
Adds parent managed-event Hidden behavior with lock/unlock support.
Propagates parent hidden/hiddenLocked state to child event types on create/update.
Ensures listing-level Hidden toggle updates parent and synchronizes existing children.
Preserves per-member visibility behavior when Hidden is unlocked.
Hides hidden team event types from member listings while keeping admin visibility/management.
Adds schema + migration support for hidden lock persistence.
Dependencies
Prisma migration included for [hiddenLocked].
No new package dependencies.
Visual Demo
Image Demo
Before/after screenshots:

Member view (hidden managed event is not visible to member)
Admin view (hidden managed event remains visible/manageable to admin)

Capture d'écran 2026-03-17 074135 Capture d'écran 2026-03-17 075045

Mandatory Tasks (DO NOT REMOVE)
I have self-reviewed the code (A decent size PR without self-review might be rejected).
I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
N/A
I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Environment setup
    Ensure these env vars are set in [.env]:
    DATABASE_URL
    DATABASE_DIRECT_URL

  2. Setup commands
    yarn
    yarn prisma generate
    yarn workspace @calcom/prisma db-migrate
    yarn dev

  3. Minimal test data
    One team/org with:
    1 admin/owner
    1+ members
    One parent managed event type with assigned members (children generated from assignments)

  4. Manual verification (happy paths)
    Parent Hidden locked propagates to children
    Open parent managed event.
    Lock Hidden field.
    Toggle Hidden ON and save.
    Expected:
    Parent is hidden.
    All assigned children are hidden.
    Toggle Hidden OFF and save.
    Expected:
    Parent is visible.
    All assigned children are visible.
    Listing toggle sync
    From event types listing, toggle Hidden on the parent managed event.
    Expected:
    Parent hidden state updates.
    Existing children synchronize immediately.
    Unlocked Hidden supports per-member control
    Unlock Hidden in parent form.
    Set different member “Show on profile” values.
    Save.
    Expected:
    Each child reflects that member’s own visibility value.
    Parent saves do not overwrite per-member visibility while unlocked.
    Member visibility behavior
    Login as member.
    Expected:
    Hidden team event types are not shown in member listing.
    Login as admin.
    Expected:
    Hidden event remains visible/manageable for admin.

  5. Automated test run
    $env:TZ='UTC'; yarn vitest run apps/web/test/lib/handleChildrenEventTypes.test.ts

Checklist
I have read the contributing guide.
My code follows the style guidelines of this project.
I have commented code only where needed for non-obvious logic.
I have checked my changes for new relevant warnings/errors in touched scope.
This PR is focused on a single feature end-to-end.

@nourzakhama2003 nourzakhama2003 requested review from a team as code owners March 17, 2026 16:37
@CLAassistant
Copy link

CLAassistant commented Mar 17, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added enterprise area: enterprise, audit log, organisation, SAML, SSO Medium priority Created by Linear-GitHub Sync ⚡ Quick Wins A collection of quick wins/quick fixes that are less than 30 minutes of work ✅ good first issue Good for newcomers labels Mar 17, 2026
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Mar 17, 2026
@github-actions github-actions bot added ✨ feature New feature or request ❗️ migrations contains migration files and removed ✨ feature New feature or request ✅ good first issue Good for newcomers ⚡ Quick Wins A collection of quick wins/quick fixes that are less than 30 minutes of work Medium priority Created by Linear-GitHub Sync enterprise area: enterprise, audit log, organisation, SAML, SSO community Created by Linear-GitHub Sync labels Mar 17, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 14 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/i18n/locales/en/common.json">

<violation number="1" location="packages/i18n/locales/en/common.json:2">
P3: New locale keys were added at the top of the file instead of above the append-only sentinel, breaking the file’s explicit merge-conflict prevention convention.</violation>
</file>

<file name="packages/trpc/server/routers/viewer/eventTypes/getEventTypesFromGroup.handler.ts">

<violation number="1" location="packages/trpc/server/routers/viewer/eventTypes/getEventTypesFromGroup.handler.ts:188">
P2: Hidden team event types are filtered after pagination/cursor calculation, so members can receive short pages and hidden items still advance `nextCursor`, potentially skipping later visible event types.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@github-actions github-actions bot added enterprise area: enterprise, audit log, organisation, SAML, SSO Medium priority Created by Linear-GitHub Sync ⚡ Quick Wins A collection of quick wins/quick fixes that are less than 30 minutes of work ✅ good first issue Good for newcomers ✨ feature New feature or request labels Mar 17, 2026
@nourzakhama2003
Copy link
Author

nourzakhama2003 commented Mar 17, 2026

hi maintainers ,could someone add the run-ci label so the ci can run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enterprise area: enterprise, audit log, organisation, SAML, SSO ✨ feature New feature or request ✅ good first issue Good for newcomers Medium priority Created by Linear-GitHub Sync ❗️ migrations contains migration files ⚡ Quick Wins A collection of quick wins/quick fixes that are less than 30 minutes of work size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Managed Event doesn't yet support a Hidden Event toggle in parent event

2 participants