Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(grpc): implement server reflection to discover services#105

Open
diegoQuinas wants to merge 1 commit into
berbicanes:main from
diegoQuinas:feat/grpc-server-reflection
Open

feat(grpc): implement server reflection to discover services #105
diegoQuinas wants to merge 1 commit into
berbicanes:main from
diegoQuinas:feat/grpc-server-reflection

Conversation

@diegoQuinas

@diegoQuinas diegoQuinas commented Jun 5, 2026

Copy link
Copy Markdown

Closes #103

Summary

  • Implements gRPC server reflection so ApiArk can discover services and methods from a reflection-enabled server, instead of returning the hardcoded stub error and forcing manual .proto loading.
  • Replaces the empty extract_* response parsers with a real ServerReflectionResponse decoder feeding the existing DescriptorPool builder.
  • Wires the previously orphaned reflection path end-to-end: a grpc_reflect_services Tauri command + a Reflect action in the gRPC view.

Changes

File Change
src-tauri/proto/reflection.proto Vendored grpc.reflection.v1 (+ v1alpha fallback) definitions
src-tauri/build.rs / Cargo.toml / Cargo.lock Compile the reflection proto and add the reflection client deps
src-tauri/src/grpc/reflection.rs Real bidi ServerReflectionInfo call + response decoding (replaces stub error and empty parsers)
src-tauri/src/grpc/client.rs / mod.rs / proto_parser.rs Plumb discovered descriptors into the pool
src-tauri/src/commands/grpc.rs / lib.rs Register the grpc_reflect_services command
src-tauri/src/models/collection.rs, commands/collection.rs, importer/writer.rs Persist gRPC request state (service/method/body/metadata) in the request YAML
src/components/grpc/grpc-view.tsx, App.tsx, lib/tauri-api.ts, stores/tab-store.ts, packages/types Reflect action, restore saved gRPC state, sidebar protocol badge refresh

Discovered services are intentionally not persisted — they require a live server, so they are re-fetched via Reflect.

Test plan

  • cargo check and cargo fmt --check pass (apps/desktop/src-tauri)
  • tsc --noEmit and eslint . pass (apps/desktop)
  • Manual: point ApiArk at a reflection-enabled gRPC server, hit Reflect, confirm services/methods populate and a unary call succeeds

Implements the gRPC server reflection that issue berbicanes#103 reports as a stub.
Previously reflection.rs returned a hardcoded error and reflect_services()
was orphaned (never registered as a Tauri command nor called from the UI),
so users had to load .proto files by hand.
- Implement the bidirectional ServerReflectionInfo streaming call against
 grpc.reflection.v1 with v1alpha fallback, vendoring reflection.proto
- Decode ServerReflectionResponse to gather the FileDescriptorProto set and
 feed it into the existing DescriptorPool builder (replaces the empty
 extract_* stubs)
- Register a grpc_reflect_services Tauri command and wire a "Reflect" action
 into grpc-view alongside manual .proto loading
- Persist gRPC request state (service, method, body, metadata) to the request
 YAML so saved gRPC requests reproduce; discovered services stay ephemeral
- Refresh the sidebar node after saving so its badge reflects the gRPC protocol
Closes berbicanes#103 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

gRPC server reflection is unimplemented (stub returns a hardcoded error)

1 participant

AltStyle によって変換されたページ (->オリジナル) /