Skip to content

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Nov 24, 2025

Description

Select organization profile on sign in. If organization profile is not available, select the personal profile.

resolves CON-4960

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

before.mp4
after.mp4

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Summary by cubic

Automatically select the organization profile on sign in. If no org profile exists, fall back to the personal profile. Resolves CON-4960.

  • New Features
    • On login, ignore the saved org selection so cascade init picks the first non-personal org; otherwise use the saved selection.

Written for commit aa0f50f. Summary will update automatically on new commits.

@uinstinct uinstinct requested a review from a team as a code owner November 24, 2025 16:12
@uinstinct uinstinct requested review from tingwai and removed request for a team November 24, 2025 16:12
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 24, 2025
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.

No issues found across 1 file

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

There are some issues with this approach if cascadeInit runs into errors. Let's try to handle the selection change within the cascade init as opposed to clearing state outside of it. Maybe pass an isLogin boolean to cascadeInit?

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Nov 24, 2025
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Nov 25, 2025
this.globalContext.get("lastSelectedOrgIdForWorkspace") ?? {};
const currentSelection = selectedOrgs[workspaceId];
// reset selected org to first available org on login, otherwise use saved selection
const currentSelection = isLogin ? null : selectedOrgs[workspaceId];
Copy link
Collaborator

Choose a reason for hiding this comment

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

@uinstinct this feels closer but it would still unnecessarily lose someone's org selection if they were logging in for the 2nd time.

I think you could change the line

if(currentSelection)

to if(currentSelection && !(login && currentSelection === "personal")

Or something that doesn't just cut out the current selection regardless of personal or not

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Nov 26, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 27, 2025
@RomneyDa RomneyDa merged commit fc5606c into continuedev:main Nov 27, 2025
54 of 57 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Nov 27, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Nov 27, 2025
@uinstinct uinstinct deleted the org-on-signin branch November 27, 2025 10:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants