Skip to content

Render bind-existing service instance options from v3 rows - #5617

Merged
norman-abramovitz merged 4 commits into
cloudfoundry:developfrom
nabramovitz:norm/fix/5600-bind-existing-dropdown
Jul 10, 2026
Merged

Render bind-existing service instance options from v3 rows#5617
norman-abramovitz merged 4 commits into
cloudfoundry:developfrom
nabramovitz:norm/fix/5600-bind-existing-dropdown

Conversation

@nabramovitz

@nabramovitz nabramovitz commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What

Fixes the empty "Bind to an Existing Service Instance" dropdown in the add-service-instance wizard (follow-up defect on #5600, reported by @metskem after the stepper fix landed).

Why

The data layer for this wizard was migrated to flat v3 rows (StServiceInstance: guid, name, ...), but the dropdown template still read the legacy v2 APIResource shape (sI.metadata.guid / sI.entity.name). Both fields are undefined on v3 rows, so every option failed to render and only the "None" entry showed. strictTemplates is disabled, so the compiler could not catch the stale template.

How

  • Read guid/name directly and track options by guid.
  • Dropped the [disabled]="!sI.metadata.guid" guard: v3 rows always carry a guid.
  • Added a render regression test that drives the bind-existing branch with flat v3 rows and asserts the option texts; it fails against the old template.

Testing

  • make check gate green (full lint + frontend + backend suites).
  • New spec red on the old template, green on the fix.

Fixes #5600

Also in this PR: Monaco editor chrome in the wizard params editors

The service-params / binding-params JSON editors rendered Monaco with no frame, a phantom overview-ruler mark, stray scrollbars, and an always-light theme — on a white page it read as a broken input.

  • schema-form: both editor embeds get the bordered/rounded container the variable-edit dialog already uses; editor options consolidated into one field (no minimap, overview ruler, line highlight, or scroll-beyond-last-line in a small params box).
  • monaco-editor (core): theme now defaults from the app's dark mode and re-syncs on toggle; explicit options.theme still wins. This also fixes the always-light Monaco in the variable-edit dialog.

Live-verified in both light and dark modes.

Follow-up commit brings the params editors up to the variable-edit dialog conventions: Format/Minify toggle, a visible "Not valid JSON" warning under the editor (the step already blocked on bad JSON, but silently), and a vertically resizable editor frame — the legacy textarea was browser-resizable and the Monaco swap had lost that.

The bind-to-existing service instance dropdown in the add-service-
instance wizard rendered no options: the template still read the
legacy v2 APIResource shape (sI.metadata.guid / sI.entity.name) while
the signal-native helper emits flat v3 StServiceInstance rows, so
every option binding failed at render. Read guid/name directly and
track by guid; the disabled guard is dropped since v3 rows always
carry a guid. Adds a render regression test over the bind-existing
branch.

Refs cloudfoundry#5600
@nabramovitz
nabramovitz marked this pull request as ready for review July 10, 2026 03:12
@nabramovitz

Copy link
Copy Markdown
Contributor Author

Live-verified against a CF with existing service instances: application → Bind Service → postgresql/standalone → Service Instance step. The bind-to-existing dropdown now lists the space's instances, selection sticks, and Finish enables. Same flow as the report on #5600.

The wizard's params editors (service params + binding params) rendered
Monaco with no frame, a phantom overview-ruler mark, stray scrollbars
and an always-light theme — on a white page it read as a broken input.

- schema-form: wrap both editor embeds in the border/rounded container
  the variable-edit-dialog convention uses, and consolidate editor
  options into one monacoOptions field (no minimap, overview ruler,
  line highlight, or scroll-beyond-last-line in a small params box).
- monaco-editor (core): default the theme from the app's dark mode and
  re-sync on toggle via monaco's global setTheme; explicit
  options.theme still wins. Fixes always-light Monaco in the
  variable-edit dialog too.
Match the variable-edit dialog's Monaco affordances in schema-form:

- Format/Minify toggle above the editor, disabled while the text
  doesn't parse; label follows whether the text is canonical-minified.
- Visible parse warning under the editor (the step was already blocked
  on bad JSON, but silently).
- Vertically resizable editor frame (resize-y, 200px minimum) —
  restores the resize the legacy textarea gave for free.
resize-y -> resize on the editor frames so the corner grip stretches
both ways (16rem minimum width). Default width stays the form column;
stretching is the user's call.

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@norman-abramovitz
norman-abramovitz merged commit c217713 into cloudfoundry:develop Jul 10, 2026
18 checks passed
@nabramovitz
nabramovitz deleted the norm/fix/5600-bind-existing-dropdown branch July 10, 2026 04:53
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.

Binding marketplace service instance - Service instances not showing

2 participants