Skip to content

feat(azure): add Service Bus explorer#144

Open
thomhurst wants to merge 2 commits into
floci-io:mainfrom
thomhurst:agent/azure-service-bus
Open

feat(azure): add Service Bus explorer#144
thomhurst wants to merge 2 commits into
floci-io:mainfrom
thomhurst:agent/azure-service-bus

Conversation

@thomhurst

@thomhurst thomhurst commented Jul 18, 2026

Copy link
Copy Markdown

Summary

  • add the messaging service category and Azure Service Bus schema
  • map Service Bus namespace list/create/get/delete operations to Floci-AZ's management contract
  • expose Service Bus in Azure navigation through the generic resource table, form, and inspector
  • add adapter and schema-route coverage
  • update the service-status table

Closes #89

Verification

  • pnpm lint
  • pnpm type-check
  • pnpm build
  • bun test — 167 passed
  • live docker compose --profile multicloud check against Floci-AZ: create, list, inspect, and delete namespace all passed

Playwright screenshot could not be captured because the in-app browser backend was unavailable in this session after bootstrap and retry.

image

@greptile-apps

greptile-apps Bot commented Jul 18, 2026

Copy link
Copy Markdown

Greptile Summary

This PR introduces Azure Service Bus namespace support into the cloud explorer, adding a new messaging service category end-to-end: backend adapter, schema, route registration, type system updates, and frontend navigation/display wiring.

  • New adapter (AzureServiceBusAdapter) maps list/get/create/delete operations to Floci-AZ's management contract, with server-side name validation, error surfacing, and emptyOnNotFound handling.
  • Schema and routing wired through servicebusSchema, CloudProxyService, and clouds.ts with parallel frontend type updates and a generic 'Messaging' sidebar label.
  • Test coverage spans the full adapter lifecycle (list, filter, get, create validation, error propagation, delete) plus a schema route integration test.

Confidence Score: 5/5

Safe to merge — the change is well-scoped, all four CRUD operations are tested, and the validation and error-propagation paths are exercised end-to-end.

The adapter, schema, routing, and frontend wiring all hang together consistently. Validation is enforced both client-side (schema regex) and server-side (regex plus explicit suffix checks), URL segments are percent-encoded, and the test suite covers the full lifecycle including error and empty-response branches. No logic gaps were found in the changed paths.

No files require special attention.

Important Files Changed

Filename Overview
packages/api/src/adapter-azure/AzureServiceBusAdapter.ts New adapter wiring list/get/create/delete to the Floci-AZ management contract; validation, error handling, and path encoding look correct.
packages/api/src/adapter-azure/AzureServiceBusAdapter.test.ts Well-structured test suite covering all adapter operations, name-validation edge cases, and error propagation.
packages/api/src/cloud-spi/servicebusSchema.ts Schema definition is correct; field description omits the 'must start with a letter' constraint visible in the regex, creating minor UX ambiguity (separate thread).
packages/api/src/service/CloudProxyService.ts Correctly pushes messaging service descriptor and delegates schema resolution to servicebusSchemaFor; displayName uses cloud-aware logic.
packages/api/src/routes/clouds.ts Adds messaging to the isServiceType guard; error normalisation already handles Service Bus validation messages correctly.
packages/frontend/src/components/Layout.tsx Sidebar wiring uses a generic Messaging label scoped to Azure; MessageSquare icon reuse is intentional.
packages/frontend/src/pages/CloudExplorerPage.tsx normalizeService and serviceLabel both updated correctly; label returns generic Messaging consistent with the sidebar.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant FE as Frontend (CloudExplorerPage)
    participant RT as API Route (clouds.ts)
    participant SVC as CloudProxyService
    participant REG as CloudAdapterRegistry
    participant ADP as AzureServiceBusAdapter
    participant AZ as Floci-AZ Runtime

    FE->>RT: GET /api/clouds/azure/services/messaging/schema
    RT->>SVC: schema('azure', 'messaging')
    SVC->>REG: get('azure', 'messaging')
    REG-->>SVC: AzureServiceBusAdapter
    SVC->>ADP: schema()
    ADP-->>FE: azureServiceBusSchema

    FE->>RT: GET /api/clouds/azure/services/messaging/resources
    RT->>SVC: listResources('azure', 'messaging', query)
    SVC->>ADP: list(query)
    ADP->>AZ: "GET /{accountName}-servicebus/namespaces"
    AZ-->>ADP: "{namespaces: []}"
    ADP-->>FE: CloudResource[]

    FE->>RT: POST /api/clouds/azure/services/messaging/resources
    RT->>SVC: "createResource('azure', 'messaging', {values})"
    SVC->>ADP: "create({values})"
    ADP->>ADP: validate namespaceName
    ADP->>AZ: "PUT /{accountName}-servicebus/namespaces/{name}"
    AZ-->>ADP: "{name, amqpPort}"
    ADP-->>FE: CloudResource (201)

    FE->>RT: "DELETE /api/clouds/azure/services/messaging/resources/{id}"
    RT->>SVC: deleteResource('azure', 'messaging', id)
    SVC->>ADP: delete(id)
    ADP->>AZ: "DELETE /{accountName}-servicebus/namespaces/{id}"
    AZ-->>ADP: 204 No Content
    ADP-->>FE: "{ok: true}"
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant FE as Frontend (CloudExplorerPage)
    participant RT as API Route (clouds.ts)
    participant SVC as CloudProxyService
    participant REG as CloudAdapterRegistry
    participant ADP as AzureServiceBusAdapter
    participant AZ as Floci-AZ Runtime

    FE->>RT: GET /api/clouds/azure/services/messaging/schema
    RT->>SVC: schema('azure', 'messaging')
    SVC->>REG: get('azure', 'messaging')
    REG-->>SVC: AzureServiceBusAdapter
    SVC->>ADP: schema()
    ADP-->>FE: azureServiceBusSchema

    FE->>RT: GET /api/clouds/azure/services/messaging/resources
    RT->>SVC: listResources('azure', 'messaging', query)
    SVC->>ADP: list(query)
    ADP->>AZ: "GET /{accountName}-servicebus/namespaces"
    AZ-->>ADP: "{namespaces: []}"
    ADP-->>FE: CloudResource[]

    FE->>RT: POST /api/clouds/azure/services/messaging/resources
    RT->>SVC: "createResource('azure', 'messaging', {values})"
    SVC->>ADP: "create({values})"
    ADP->>ADP: validate namespaceName
    ADP->>AZ: "PUT /{accountName}-servicebus/namespaces/{name}"
    AZ-->>ADP: "{name, amqpPort}"
    ADP-->>FE: CloudResource (201)

    FE->>RT: "DELETE /api/clouds/azure/services/messaging/resources/{id}"
    RT->>SVC: deleteResource('azure', 'messaging', id)
    SVC->>ADP: delete(id)
    ADP->>AZ: "DELETE /{accountName}-servicebus/namespaces/{id}"
    AZ-->>ADP: 204 No Content
    ADP-->>FE: "{ok: true}"
Loading

Reviews (2): Last reviewed commit: "fix(azure): refine Service Bus explorer" | Re-trigger Greptile

Comment thread packages/api/src/cloud-spi/servicebusSchema.ts Outdated
Comment thread packages/frontend/src/pages/CloudExplorerPage.tsx Outdated
Comment thread packages/frontend/src/components/Layout.tsx Outdated
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.

feat(azure): Service Bus in Cloud Explorer

1 participant