Skip to content

fix: fix ui rendering for current api response #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2025
Merged

Conversation

kharkevich
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings June 11, 2025 04:25
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors data services to return flat arrays of permission models instead of wrapper objects, updates related tests, removes obsolete wrapper interfaces, and simplifies a backend endpoint response format.

  • Services for prompts, models, and experiments now return T[] directly and drop .pipe(map(...)) logic.
  • Corresponding tests are updated to assert on direct array responses.
  • Wrapper interfaces are removed from shared interfaces, and the prompt_regex endpoint no longer wraps results in an envelope.

Reviewed Changes

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

Show a summary per file
File Description
web-ui/src/app/shared/services/data/prompt-data.service.ts Return PromptPermissionModel[] directly; removed mapping logic
web-ui/src/app/shared/services/data/prompt-data.service.spec.ts Updated test to expect an array instead of wrapped object
web-ui/src/app/shared/services/data/models-data.service.ts Return ModelPermissionModel[] directly; removed mapping logic
web-ui/src/app/shared/services/data/models-data.service.spec.ts Updated test to expect an array
web-ui/src/app/shared/services/data/experiments-data.service.ts Return ExperimentForUserModel[] directly; removed mapping logic
web-ui/src/app/shared/services/data/experiments-data.service.spec.ts Updated test to assert on an array
web-ui/src/app/shared/interfaces/prompts-data.interface.ts Removed the PromptPermissionsModel wrapper interface
web-ui/src/app/shared/interfaces/models-data.interface.ts Removed the ModelPermissionsModel wrapper interface
web-ui/src/app/shared/interfaces/experiments-data.interface.ts Removed the ExperimentsForUserModel wrapper interface
mlflow_oidc_auth/views/prompt_regex.py Changed endpoint to return raw list instead of wrapped JSON object
Comments suppressed due to low confidence (4)

web-ui/src/app/shared/services/data/prompt-data.service.ts:3

  • The map operator is no longer used after removing the .pipe(map(...)) call. Consider removing this import to avoid unused dependencies.
import { map } from 'rxjs';

web-ui/src/app/shared/services/data/models-data.service.ts:3

  • The map import is unused since the .pipe(map(...)) was removed; you can safely remove this import to clean up the code.
import { map } from 'rxjs';

web-ui/src/app/shared/services/data/experiments-data.service.ts:4

  • map is imported but not used anymore after refactoring to return the array directly. Removing this will eliminate an unused dependency.
import { map } from 'rxjs';

mlflow_oidc_auth/views/prompt_regex.py:26

  • This change drops the prompt_permissions envelope from the JSON response, which is a breaking contract change. Ensure downstream clients and API documentation are updated or version the endpoint to avoid breaking existing integrations.
return jsonify([r.to_json() for r in rm]), 200

Copy link

@kharkevich kharkevich merged commit bb8b4d8 into main Jun 11, 2025
11 checks passed
@kharkevich kharkevich deleted the fix-users-view branch June 11, 2025 04:35
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