Skip to content

feat(committees): prefill org from profile on join and apply flows - #1337

Merged
andrest50 merged 9 commits into
mainfrom
feat/LFXV2-2690-org-prefill-join-flow
Aug 6, 2026
Merged

feat(committees): prefill org from profile on join and apply flows#1337
andrest50 merged 9 commits into
mainfrom
feat/LFXV2-2690-org-prefill-join-flow

Conversation

@andrest50

@andrest50 andrest50 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extracts a public resolveCurrentEmployer() method on InvitationAcceptFlowService that fetches the user's work experiences, picks the current employer, and resolves its domain — mirroring preResolveOrganization for invite payloads
  • Calls it from committee-view before opening the Confirm Organization dialog on both the open-join and apply-to-join paths so the dialog is pre-filled from the user's profile
  • Tightens isNewOrg and orgInvalid in AcceptInviteOrganizationDialogComponent: organization_url is now always required because organization_id (CDP UUID) is stripped before the payload reaches committee-service, which requires name + domain

Background

When joining an open committee or applying to a committee that requires an organization (voting enabled or business email required), the Confirm Organization dialog was blank. The invite flow already pre-filled from the invite record, but open-join and apply paths had no equivalent source. This caused a confusing UX and, for apply flows, meant the submitted org was missing — leading to organization id or organization name and domain are required errors when an admin approved the application.

The back-end counterpart (storing org on the application record and using it at approve time) is in lfx-v2-committee-service#174.

Test plan

  • Open committee: click Join — Confirm Organization dialog pre-fills with profile employer
  • Apply-to-join committee with enable_voting: true — dialog pre-fills with profile employer
  • Submit application — org is included in the payload
  • User with no work experience — dialog opens empty (no pre-fill, no error)
  • Invite flow — still works as before (no regression)

Resolves: LFXV2-2690

Made with Cursor

When joining an open committee or applying to join one that requires
an organization (voting enabled or business email required), the
Confirm Organization dialog was not pre-populated from the user's
profile. For invite flows it was already pre-filling from the invite
record, but open-join and apply paths had no equivalent source.

Extract a public resolveCurrentEmployer() method on
InvitationAcceptFlowService that fetches the user's work experiences,
picks the current employer, and resolves its domain — mirroring what
preResolveOrganization does for invite payloads. Call it from
committee-view before opening the organization dialog on both the
open-join and apply-to-join paths so the dialog is pre-filled.

Tighten the isNewOrg and orgInvalid computed properties in
AcceptInviteOrganizationDialogComponent: organization_url is always
required because organization_id (CDP UUID) is stripped before the
payload reaches committee-service, which expects name + domain.
orgInvalid now enforces URL presence regardless of whether CDP
resolved an ID.

Resolves: LFXV2-2690
Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI balanced review requested due to automatic review settings August 6, 2026 00:25
@andrest50
andrest50 requested a review from a team as a code owner August 6, 2026 00:25
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 450bce55-3222-4fa6-a2d3-2a6a1bb7dc76

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

URL validation, premature CDP mutation, and route-lifecycle handling need correction.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Prefills committee join/apply organization dialogs from the user profile and enforces organization domains.

Changes:

  • Adds current-employer and domain resolution.
  • Prefills join/apply dialogs.
  • Requires valid organization URLs.
File summaries
File Description
invitation-accept-flow.service.ts Resolves profile employer details.
accept-invite-organization-dialog.component.ts Tightens organization validation.
committee-view.component.ts Prefills join and application dialogs.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 3
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread apps/lfx-one/src/app/shared/services/invitation-accept-flow.service.ts Outdated
- Guard handleJoinRequest against double-tap during async org prefetch:
  add resolvingOrg signal, check it alongside joiningOrLeaving at entry,
  and wrap each openOrganizationDialog call with .finally() to clear it
- Eliminate duplicated work-experience fetch in accept(): replace the
  inline GET /api/profile/work-experiences + currentEmployerFromWorkExperiences
  chain with a call to the newly extracted resolveCurrentEmployer()
- Add console.warn to resolveCurrentEmployer() catchError so silent
  fallbacks are observable in DevTools instead of swallowed silently
- Convert effect() in AcceptInviteOrganizationDialogComponent to
  toObservable() + takeUntilDestroyed() per repo no-effect convention

LFXV2-2690

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings August 6, 2026 00:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Website validation is inadvertently disabled after input, and invite fallback resolution may run twice.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details

Suppressed comments (2)

apps/lfx-one/src/app/shared/components/accept-invite-organization-dialog/accept-invite-organization-dialog.component.ts:52

  • isNewOrg becomes false as soon as the user enters any non-empty website value. The subscription below then clears httpsUrlValidator, making urlStatus become VALID, so a value such as not-a-url enables Confirm and is sent upstream despite the new name-plus-domain requirement. Keep the URL validators active whenever an organization name is present, rather than only while the URL is empty.
    const hasUrl = !!(value?.organization_url ?? '').trim();
    return !hasUrl && !!value?.organization?.trim();

apps/lfx-one/src/app/shared/services/invitation-accept-flow.service.ts:51

  • When the invite has no organization, resolveCurrentEmployer() already calls resolveOrgDomain(), and the unconditional preResolveOrganization() immediately repeats that lookup if the first search misses or times out. This doubles the search/resolve requests and can make the invite dialog wait up to 4 seconds despite the documented 2-second fallback. Pre-resolve only an organization supplied by the invite; the employer fallback is already resolved.
    const contextReady$: Observable<InvitationAcceptContext> = context.organization
      ? of(context)
      : this.resolveCurrentEmployer().pipe(map((org) => ({ ...context, organization: org ?? undefined })));

    return contextReady$.pipe(
      switchMap((ctx) => this.preResolveOrganization(ctx)),
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

…cycle

- isNewOrg: keep httpsUrlValidator active whenever org name is present;
  previous !hasUrl check cleared validators on the first URL keystroke,
  allowing invalid values like "not-a-url" to pass urlStatus as VALID.
- invitation-accept-flow: when no invite org, employer fallback path via
  resolveCurrentEmployer() already calls resolveOrgDomain() internally;
  remove the unconditional preResolveOrganization() so the CDP lookup
  (which can be a find-or-create POST) does not run twice.
- committee-view/openOrganizationDialog: pipe resolveCurrentEmployer()
  through takeUntilDestroyed(destroyRef) before firstValueFrom() so the
  subscription is canceled if the component is destroyed mid-flight.

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings August 6, 2026 00:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The prefetch can wait indefinitely and can still open a dialog after component destruction.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details

Suppressed comments (2)

apps/lfx-one/src/app/shared/services/invitation-accept-flow.service.ts:84

  • The 2-second timeout only exists inside resolveOrgDomain, so it does not start until /api/profile/work-experiences emits. A stalled profile request therefore leaves the new join/apply flow waiting indefinitely instead of opening the blank fallback dialog. Apply the timeout after switchMap so it covers the entire prefetch and reaches the existing catchError.
    return this.http.get<WorkExperienceEntry[]>('/api/profile/work-experiences').pipe(
      take(1),
      map((experiences) => currentEmployerFromWorkExperiences(experiences)),
      switchMap((org) => (org ? this.resolveOrgDomain(org) : of(null))),

apps/lfx-one/src/app/modules/committees/committee-view/committee-view.component.ts:811

  • takeUntilDestroyed completes the source, but firstValueFrom(..., { defaultValue: null }) then resolves normally, so execution still reaches dialogService.open after this component has been destroyed. Check DestroyRef.destroyed after the await and return before opening the dialog.
    const prefillOrg = await firstValueFrom(this.invitationAcceptFlow.resolveCurrentEmployer().pipe(takeUntilDestroyed(this.destroyRef)), {
      defaultValue: null,
    });
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

firstValueFrom's defaultValue: null resolves successfully even when
takeUntilDestroyed completes the observable early due to component
teardown, so dialogService.open was still called over the next route.

Add an explicit destroyed flag registered via destroyRef.onDestroy()
before the await, checked immediately after — if the component was
destroyed during the employer prefetch the method returns null instead
of opening the Confirm Organization dialog.

LFXV2-2690

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings August 6, 2026 01:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new prefetch can open a stale committee dialog after parameter-only route navigation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details

Suppressed comments (1)

apps/lfx-one/src/app/modules/committees/committee-view/committee-view.component.ts:824

  • takeUntilDestroyed does not cover navigation from /groups/A to /groups/B, because Angular reuses this component across :id changes (as this file notes at lines 180–183). If the route changes during this new prefetch, the await can still open A's dialog over B and keep B's join action blocked. Capture the committee ID before awaiting and return if it changed, or cancel on paramMap changes.
    const prefillOrg = await firstValueFrom(this.invitationAcceptFlow.resolveCurrentEmployer().pipe(takeUntilDestroyed(this.destroyRef)), {
      defaultValue: null,
    });
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Resolved conflict in committee-view.component.ts: kept both
firstValueFrom (from this branch) and Observable (from main) in the
rxjs import list.

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings August 6, 2026 19:23

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bbde395. Configure here.

- Add resolvingOrg() to Join Group and Apply to Join button [loading]
  bindings so the CTA shows a spinner during the employer prefetch
- Add timeout(2000) to the work-experiences GET in resolveCurrentEmployer
  so a hung profile call does not block the join flow indefinitely

LFXV2-2690

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Suppressed comments (3)

apps/lfx-one/src/app/modules/committees/committee-view/committee-view.component.ts:202

  • The comment says resolvingOrg only blocks during the async org-prefetch window, but it's set for the entire openOrganizationDialog() lifetime (including while the dialog is open), since .finally(...) runs after the dialog promise resolves. Either update the comment to match behavior, or move the resolvingOrg toggling inside openOrganizationDialog() to only wrap the prefetch portion.
  // Blocks the join/apply CTA during the async org-prefetch window so a second tap
  // doesn't fire a parallel resolveCurrentEmployer() + dialog pair.

apps/lfx-one/src/app/modules/committees/committee-view/committee-view.component.ts:541

  • The comment says resolvingOrg only blocks during the async org-prefetch window, but it's set for the entire openOrganizationDialog() lifetime (including while the dialog is open), since .finally(...) runs after the dialog promise resolves. Either update the comment to match behavior, or move the resolvingOrg toggling inside openOrganizationDialog() to only wrap the prefetch portion.
        this.resolvingOrg.set(true);
        const result = await this.openOrganizationDialog(committee.name).finally(() => this.resolvingOrg.set(false));

apps/lfx-one/src/app/shared/components/accept-invite-organization-dialog/accept-invite-organization-dialog.component.ts:52

  • isNewOrg no longer indicates whether the org is 'new' (it now just checks for a non-empty organization name). This name is misleading and makes validation logic harder to follow. Rename it to reflect intent (e.g., hasOrgName, requiresUrlValidation, or similar) and update references.
  protected readonly isNewOrg = computed(() => {
    const value = this.formValue();
    return !!value?.organization?.trim();
  });

Comment thread apps/lfx-one/src/app/shared/services/invitation-accept-flow.service.ts Outdated
Copilot AI review requested due to automatic review settings August 6, 2026 19:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

apps/lfx-one/src/app/shared/services/invitation-accept-flow.service.ts:119

  • This still performs a find-or-create POST during prefill: resolveOrgDomain() reaches OrganizationService.resolveOrganization(), whose server path creates a CDP organization when the searched domain is absent. The new open-join/apply callers therefore mutate CDP merely by clicking the CTA, even if the user later cancels. The exact search match already supplies the domain needed for prefill; defer resolution/creation to the dialog's confirm path.
            ...org,
            id: resolved.id || null,
            name: resolved.name || org.name,
            website: normalizeToUrl(match.domain) ?? org.website,
          }))

Angular strict template type-checking disallows private members in
templates; resolvingOrg is bound in [loading] so it must be at least
protected.

LFXV2-2690

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings August 6, 2026 20:23
After awaiting openOrganizationDialog (which includes up to 2s of
employer prefetch), check that committeeId() still matches the
committee captured at call-start. Angular reuses the committee-view
component for in-app navigation between /groups/:id routes without
destroying it, so DestroyRef never fires; without this check a
prefetch started on committee A could open a dialog whose confirmation
submits a join/apply to committee A even though the user has already
navigated to committee B.

Added the committeeId() !== committee.uid guard in both the open and
application join paths, immediately after the dialog resolves.

LFXV2-2690

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Suppressed comments (3)

apps/lfx-one/src/app/shared/services/invitation-accept-flow.service.ts:108

  • The search query uses org.name without trimming, but the match comparison trims the org name. If org.name contains leading/trailing whitespace (plausible from profile data/manual entry), searchOrganizations() may miss suggestions and skip domain resolution unnecessarily. Trim once into a local orgName = org.name.trim() and use it for both the search query and the exact-match comparison.
  private resolveOrgDomain(org: CommitteeOrganizationReference): Observable<CommitteeOrganizationReference> {
    if (!org?.name?.trim() || (org.id && org.website?.trim())) {
      return of(org);
    }
    return this.organizationService.searchOrganizations(org.name!).pipe(
      take(1),
      switchMap((suggestions) => {
        const match = suggestions.find((s) => s.name.toLowerCase() === org.name!.toLowerCase().trim());

apps/lfx-one/src/app/shared/components/accept-invite-organization-dialog/accept-invite-organization-dialog.component.ts:52

  • isNewOrg no longer reflects whether the org is 'new' (it’s now true whenever an organization name is present). This is misleading for future readers since it drives URL validator behavior. Rename it to something that matches the new semantics (e.g., hasOrganizationName or shouldValidateOrganizationUrl) and update references accordingly.
  protected readonly isNewOrg = computed(() => {
    const value = this.formValue();
    return !!value?.organization?.trim();
  });

apps/lfx-one/src/app/shared/components/accept-invite-organization-dialog/accept-invite-organization-dialog.component.ts:110

  • isNewOrg no longer reflects whether the org is 'new' (it’s now true whenever an organization name is present). This is misleading for future readers since it drives URL validator behavior. Rename it to something that matches the new semantics (e.g., hasOrganizationName or shouldValidateOrganizationUrl) and update references accordingly.
    toObservable(this.isNewOrg)
      .pipe(takeUntilDestroyed())
      .subscribe((isNew) => {
        if (isNew) {
          this.urlControl.setValidators([trimmedRequired(), httpsUrlValidator()]);
        } else {
          this.urlControl.clearValidators();
        }

Copilot AI review requested due to automatic review settings August 6, 2026 20:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

apps/lfx-one/src/app/shared/components/accept-invite-organization-dialog/accept-invite-organization-dialog.component.ts:52

  • isNewOrg no longer reflects whether the org is “new” (it’s now true whenever an org name is present, even if the org was selected/resolved). Rename to match the updated semantics (e.g., hasOrganizationName / requiresUrlValidation) so future changes don’t accidentally reintroduce incorrect validator toggling.
  protected readonly isNewOrg = computed(() => {
    const value = this.formValue();
    return !!value?.organization?.trim();
  });

@audigregorie audigregorie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review Summary

Solid prefill implementation — the destroy/route-reuse guards and the duplicate-CDP-POST avoidance in accept() are correct and well-reasoned. One maintainability issue (a now-misleading computed name) and a few doc/timeout-placement nits below.

What's done well

  • The destroyed flag + cleanupDestroyListener guard in committee-view.component.ts correctly handles the firstValueFrom defaultValue masking teardown — a subtle Angular quirk that would otherwise open the dialog over a new route.
  • The committeeId() !== committee.uid post-dialog guard correctly handles Angular's route-reuse (same component instance, different :id) — a case the destroy guard alone wouldn't catch.
  • Restructuring accept() to skip preResolveOrganization on the employer-fallback path avoids a duplicate CDP search + find-or-create POST, halving latency and eliminating a redundant side-effecting call.

@jordane jordane left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Solid iteration — the bot round-trips landed real fixes, and the destroy/route-reuse guards are correct. Confirming for the record that Copilot's repeated DestroyRef.onDestroy claim is wrong: the abstract class types it as (callback: () => void) => () => void, so cleanupDestroyListener() is valid. Your rebuttal stands.

Three things I'd like addressed before merge, all in the prefill path (see inline comments):

  1. When the profile employer can't be domain-resolved, the dialog now opens with a name prefilled, an empty URL, and a red validation warning already showing — with no visible website field to fix it outside manual mode. Pre-PR the dialog just opened blank.
  2. The two sequential timeout(2000) calls stack to a ~4s worst-case spinner; the comments say ≤2s.
  3. The find-or-create CDP POST still runs on every Join/Apply click. Since organization_id is stripped downstream anyway, prefilling straight from the search match's domain would drop the write and halve the latency.

Rest are nits. Two PR-shape items worth a mention: the branch name is feat/LFXV2-2690-org-prefill-join-flow (repo convention is feat/LFXV2-2690, no descriptive suffix), and commit bbde395c2 uses chore: merge main into ..., which commitlint rejects — a rebase onto main instead of the merge commit would clear both.

Comment thread apps/lfx-one/src/app/shared/services/invitation-accept-flow.service.ts Outdated
- Only prefill the org dialog when a domain was resolved — returning null
  from resolveCurrentEmployer when website is unset prevents the dialog
  from opening with orgInvalid=true and showOrgWarning immediately visible
- Replace resolveOrganization find-or-create POST in resolveOrgDomain with
  a direct prefill from the search match (name + normalised domain); removes
  an unnecessary write call now invoked from open-join and apply flows
- Rename isNewOrg → hasOrgName in the dialog component and template; the
  computed now means "org name is present" (not "org lacks CDP id") so the
  name matches the semantics and prevents a future reader from restoring the
  old !organization_id guard and reintroducing the validator-bypass bug
- Add comment to toObservable block explaining why effect() is not used
  (effect() forbids signal writes without allowSignalWrites: true)
- Update ≤2 s comments to reflect ≤4 s worst case (two sequential 2 s
  timeouts: work-experiences GET + CDP domain resolve)
- Update resolvingOrg signal comment to reflect it stays true for the whole
  dialog session (not just the prefetch phase) via .finally()
- Extract trimmed name const in resolveOrgDomain; remove non-null assertions
- Add JSDoc to preResolveOrganization

LFXV2-2690

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Andres Tobon <andrest2455@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings August 6, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (1)

apps/lfx-one/src/app/modules/committees/committee-view/committee-view.component.ts:858

  • The route-ID checks in handleJoinRequest run only after this promise resolves, which is after the dialog closes. Since Angular reuses this component across /groups/:id, navigating from A to B during this prefetch leaves destroyed false and opens A's Confirm Organization dialog over B; B's CTA also remains loading until that stale dialog closes. Capture the starting committee ID and return before dialogService.open when it changes (or cancel the lookup on ID changes).
    const prefillOrg = await firstValueFrom(this.invitationAcceptFlow.resolveCurrentEmployer().pipe(takeUntilDestroyed(this.destroyRef)), {
      defaultValue: null,
    });

    cleanupDestroyListener();
    if (destroyed) {
      return null;
    }

@andrest50
andrest50 merged commit c142f39 into main Aug 6, 2026
8 of 9 checks passed
@andrest50
andrest50 deleted the feat/LFXV2-2690-org-prefill-join-flow branch August 6, 2026 22:04
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.

4 participants