Skip to content

Conversation

@DanielMicrosoft
Copy link
Contributor

@DanielMicrosoft DanielMicrosoft commented Sep 25, 2025

Current issues:

  • Don't get error pop-ups (ie from VM module commands missing).
  • Standardize service layer naming conventions.

@DanielMicrosoft DanielMicrosoft marked this pull request as ready for review September 29, 2025 06:47
Copy link
Contributor

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 refactor adds centralized API client services and standardizes error handling across the workspace editor components. The changes replace direct axios calls with dedicated service layers for improved maintainability and consistency.

Key changes:

  • Introduced structured API clients (workspaceApi, specsApi, commandApi, cliApi, errorHandlerApi) to centralize HTTP communication
  • Standardized error handling with a unified errorHandlerApi.getErrorMessage() method
  • Converted multiple components from direct axios usage to service-based API calls

Reviewed Changes

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

Show a summary per file
File Description
src/web/src/views/workspace/WorkspaceSelector.tsx Replaced axios calls with workspaceApi and specsApi, standardized error handling
src/web/src/views/workspace/WSEditorSwaggerPicker.tsx Migrated to workspaceApi/specsApi, converted Promise chains to async/await
src/web/src/views/workspace/WSEditorCommandGroupContent.tsx Updated to use commandApi and errorHandlerApi
src/web/src/views/workspace/WSEditorCommandContent.tsx Replaced axios with commandApi, standardized error handling
src/web/src/views/workspace/WSEditorCommandArgumentsContent.tsx Migrated to commandApi and errorHandlerApi
src/web/src/views/workspace/WSEditorClientConfig.tsx Updated to use workspaceApi, specsApi, and errorHandlerApi
src/web/src/views/workspace/WSEditor.tsx Replaced axios calls with service APIs, simplified client config handling
src/web/src/views/cli/CLIModuleSelector.tsx Migrated to cliApi and errorHandlerApi
src/web/src/views/cli/CLIModuleGenerator.tsx Updated to use cliApi and standardized error handling
src/web/src/services/workspaceApi.ts New service module for workspace-related API operations
src/web/src/services/specsApi.ts New service module for specs and planes API operations
src/web/src/services/index.ts Central export point for all service modules
src/web/src/services/errorHandlerApi.ts New centralized error handling utility
src/web/src/services/commandApi.ts New service module for command-related API operations
src/web/src/services/cliApi.ts New service module for CLI-related API operations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@necusjz necusjz merged commit 5dda196 into Azure:dev Sep 30, 2025
18 checks passed
@DanielMicrosoft DanielMicrosoft deleted the 34561023-exploring-refactoring-opportunities branch November 5, 2025 22:34
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.

2 participants