Skip to content

[14/36] Add OC-100 request type UX - #48

Open
cjohnsto-nz wants to merge 4 commits into
supervisor/add-request-type-ux-taskfrom
feature/oc-100-request-type-ux
Open

[14/36] Add OC-100 request type UX#48
cjohnsto-nz wants to merge 4 commits into
supervisor/add-request-type-ux-taskfrom
feature/oc-100-request-type-ux

Conversation

@cjohnsto-nz

@cjohnsto-nz cjohnsto-nz commented Jun 14, 2026

Copy link
Copy Markdown
Owner

@cjohnsto-nz
cjohnsto-nz force-pushed the supervisor/add-request-type-ux-task branch from 2554e5d to 8bac182 Compare June 14, 2026 22:46
@cjohnsto-nz
cjohnsto-nz force-pushed the feature/oc-100-request-type-ux branch from b7c26bd to 485d897 Compare June 14, 2026 22:46
@cjohnsto-nz
cjohnsto-nz force-pushed the supervisor/add-request-type-ux-task branch from 8bac182 to def6356 Compare June 14, 2026 22:49
@cjohnsto-nz
cjohnsto-nz force-pushed the supervisor/add-request-type-ux-task branch from def6356 to 9246f62 Compare June 14, 2026 22:50
@cjohnsto-nz
cjohnsto-nz force-pushed the feature/oc-100-request-type-ux branch from 485d897 to 2a70d05 Compare June 14, 2026 22:50
@cjohnsto-nz cjohnsto-nz changed the title feature/oc-100-request-type-ux [14/21] Add OC-100 request type UX Jun 14, 2026
@cjohnsto-nz cjohnsto-nz changed the title [14/21] Add OC-100 request type UX [14/27] Add OC-100 request type UX Jun 15, 2026
@cjohnsto-nz cjohnsto-nz changed the title [14/27] Add OC-100 request type UX [14/36] Add OC-100 request type UX Jun 15, 2026
@APKiwi

APKiwi commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Verdict: approve with nits, but the first item is borderline request-changes and I'd fix it before merge.

  • Major, data integrity: gRPC edits are silently discarded behind a false "saved" toast. The webview renders gRPC with an editable URL field, editable message body and an Invoke button, but the save path is a hard no-op: isVisualEditableRequest excludes grpc (schemaRoundTrip.ts:156-157), buildRequestWithSchemaMerge returns the unchanged clone (webview/requestPanel.ts:1131-1133), applyRequestEditorModel early-returns too (schemaRoundTrip.ts:616-618), and _canApplyRequestEdit(grpc, grpc) is true (panels/requestPanel.ts:147) so saveDocument writes the unchanged request and posts success. The read-only banner only fires on protocol mismatch, which never happens here. Edit a gRPC URL, save, see "saved", file unchanged. This is worse than before, when gRPC mis-rendered as an empty HTTP editor and was obviously broken. Either render gRPC fields read-only or make grpc visual-editable in the merge.
  • Minor: streaming message sequences display only the first message. loadRequest's array branch does findIndex(v => v.selected), sequences have no .selected, index falls back to 0.
  • Nit: the four new protocol colors duplicate the existing method colors for HTTP/GraphQL.

Tests: good on the creation path (all four starters subschema-validated, real command flow, slug edges, identity guard). The gap is exactly where the bug is: nothing drives edit-then-save for gRPC through the webview build path, and the round-trip test asserts the no-op as if it were desired.

Deps: none added, package.json changes are the color contributions only.

@cjohnsto-nz

Copy link
Copy Markdown
Owner Author

Already addressed for the major finding. The false-success save path is real on this PR snapshot, but gRPC visual editing is implemented downstream in PR #52 (feature/oc-110-runtime-authoring-ux). Commit 01915d784e784d9e216d0c2cd8cad4ca70deac08 adds gRPC to isVisualEditableRequest and adds the gRPC merge path for URL, metadata, message, auth, and runtime in src/models/schemaRoundTrip.ts; PR #52 is currently at eac73cfdff9b9769b9a27fadcc0a5cc3a003fcb5 and is MERGEABLE. I have not duplicated that implementation onto PR #48 because doing so would put the same ownership on two stack layers and create avoidable descendant conflicts.

Fixed for streaming sequences. On the topmost review-rework branch fix/open-collection-pr-rework, commit 2b50626915aae4c2671fce67f565f8ba5c6a4f38 adds an explicit message selector for client-streaming and bidirectional-streaming requests. Switching messages first merges the current textarea value, then loads the selected entry; saving preserves every sequence sibling and its description. The test drives the actual webview Ctrl+S path for both streaming modes, not only the model helper.

Not changing the protocol color contributions. missio.protocolHttp / Graphql / Websocket / Grpc are semantic protocol-icon theme tokens, while missio.methodGet / Post / etc. are HTTP-method tokens. Some default hues intentionally match for visual consistency, but keeping distinct token IDs lets themes override protocol identity independently from HTTP verbs. Reusing method tokens would couple unrelated UI semantics.

Validation after the rework: 494 tests pass, TypeScript compilation passes, and the production build passes. PR #48 and its immediate child PR #49 both remain MERGEABLE; neither branch was rewritten for this response.

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