Skip to content

Conversation

@amanape
Copy link
Collaborator

@amanape amanape commented Dec 4, 2025

Summary of PR

  • Refactor organization selector
  • The frontend will assume the default Personal Workspace is returned as part of /orgs (MSW mocks updated)
  • Update settings nav item visibility depending on whether workspace is_personal or not
    • Billing only shows up when is_personal is true
    • Org-related nav items only show up when is_personal is false
  • Improved nav item visibility logic

Change Type

  • Bug fix
  • New feature
  • Breaking change
  • Refactor
  • Other (dependency update, docs, typo fixes, etc.)

Checklist

  • I have read and reviewed the code and I understand what the code is doing.
  • I have tested the code to the best of my ability and ensured it works as expected.

Fixes

Resolves #(issue)

Release Notes

  • Include this change in the Release Notes.

To run this PR locally, use the following command:

GUI with Docker:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.openhands.dev/openhands/runtime:7b3c917-nikolaik   --name openhands-app-7b3c917   docker.openhands.dev/openhands/openhands:7b3c917

@amanape amanape requested a review from hieptl December 4, 2025 16:34
@amanape amanape self-assigned this Dec 4, 2025
@amanape amanape changed the title App 198/org selector chore(orgs:frontend): Implement special behaviour for personal workspaces Dec 4, 2025
@amanape amanape marked this pull request as ready for review December 4, 2025 17:51
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Coverage report

This PR does not seem to contain any modification to coverable code.

<SettingsDropdownInput
testId="org-selector"
name="organization"
placeholder="Please select an organization"
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: Would you prefer to add support for multiple languages for this text now, or handle the refactor in a separate pull request? 🙏

"/settings/organization-members": canViewOrgRoutes,
"/settings/org": canViewOrgRoutes,
"/settings/billing": !isTeamOrg,
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: Should this configuration be moved to a shared file (e.g., a shared/common file) to enable reuse in other locations?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes you’re right, but I will think of a better alternative and address in another PR instead of this one

@hieptl
Copy link
Collaborator

hieptl commented Dec 8, 2025

issue: In the org-select dropdown, clicking the remove button removes other options instead of the currently selected one. Please refer to the video below for additional details.

issue1.mov

@amanape amanape force-pushed the APP-198/org-selector branch from c561fb9 to 5574525 Compare December 9, 2025 15:52
@amanape
Copy link
Collaborator Author

amanape commented Dec 9, 2025

  1. Fixed org-selector dropdown bug - Changed defaultItems to items in SettingsDropdownInput so clearing the input shows all options instead of filtering based on the previous value
  2. Added E2E test - I couldn’t simulate the failure with a unit test, so I’ve created frontend/tests/org-selector.spec.ts with Playwright to verify the fix
  3. Created GitHub workflow - Added .github/workflows/fe-e2e-tests.yml to run frontend E2E tests on PRs
  4. Added i18n support - Created translation key ORG$SELECT_ORGANIZATION_PLACEHOLDER for the org selector placeholder
  5. Synced route visibility rules - Added HIDE_LLM_SETTINGS feature flag check to settings-navigation.tsx to match user-context-menu.tsx

@openhands-ai
Copy link

openhands-ai bot commented Dec 9, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Run Frontend Unit Tests
    • Docker

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #11902 at branch `APP-198/org-selector`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

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.

3 participants