Skip to content

Add RPC tester interface to example app - #1085

Merged
hiroshihorie merged 9 commits into
mainfrom
add-rpc-tester
Jul 28, 2026
Merged

Add RPC tester interface to example app#1085
hiroshihorie merged 9 commits into
mainfrom
add-rpc-tester

Conversation

@1egoman

@1egoman 1egoman commented May 15, 2026

Copy link
Copy Markdown
Contributor

Adds a new button on the bottom control bar for the "rpc tester":

Screenshot 2026-05-15 at 11 09 19 AM

When clicked, it opens up a new panel which has two sections:

Screenshot 2026-05-15 at 11 09 04 AM

The top section allows sending RPC messages - select a destination participant, topic, and enter a payload, and click "Send". Note that there are two payload presets - "hello world" and "X" * 20000 to provide some easy to generate data to test some edge cases.

The bottom section lets you configure rpc handlers. Enter a rpc handler topic and a static response, and submit. Then when this participant receives a RPC request, the request will be responded to with the static response. This static response also has the same payload presets as the request.

Warning

This pull request was LLM generated and has only been lightly reviewed by a human. The author has tested this and confirms it works in the happy path, but no other validation has been done.

A more thorough review of this needs to occur before it could be merged.

1egoman added 2 commits May 15, 2026 11:07
This can be used to exercise sending / receiving rpc requests in the example app
Comment on lines +472 to +478
children: [
Expanded(
child: Text(
entry.topic,
style: theme.textTheme.titleSmall?.copyWith(fontWeight: FontWeight.bold, color: theme.scaffoldBackgroundColor),
),
),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

A drive by comment: the colors in this app (besides being out of date) are fairly limited, which makes styling some of these more complicated interfaces fairly challenging.

I think I might make a follow up pull request which updates the example to use the more modern color pallete / logo, and at the same time try to add in some more color scales to make this less annoying.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I did this: #1086

@1egoman 1egoman changed the title RPC tester interface to example app Add RPC tester interface to example app May 15, 2026
The RPC tester itself landed on main through #1087, which included a
hardened copy of this branch's rpc_test_sheet.dart and the controls.dart
wiring. Resolve the add/add conflict by taking main's version, so this
branch now carries only follow-up fixes.
Register the method with the room before tracking it, so a method
already registered by another component does not leave a phantom card
whose unregister button would remove a handler the tester does not own.
Cap the per handler invocation log at 200 entries and stop notifying
listeners from in flight handlers after disposal.
…ts leave

The form field only reads initialValue when its state is created, so a
stale selection could outlive its participant and trip the framework
assert that the value must be among the items. Key the field by the
participant list and validate the selection before sending.
@hiroshihorie

Copy link
Copy Markdown
Member

Updated this branch to bring it back to life. The tester itself already landed on main through #1087, which included a hardened copy of this file, so the merge resolves to main's version and keeps the original commits in history. On top of that this PR now carries follow-up fixes to the tester: registration is ordered so a method owned by another component can't leave a phantom card, the per handler invocation log is capped, in flight handlers no longer notify after disposal, and the destination dropdown stays valid when the selected participant leaves.

@github-actions

This comment has been minimized.

@hiroshihorie hiroshihorie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed the follow-up fixes, all good. The original tester landed via #1087.

@hiroshihorie
hiroshihorie merged commit 8b00bb4 into main Jul 28, 2026
14 of 15 checks passed
@hiroshihorie
hiroshihorie deleted the add-rpc-tester branch July 28, 2026 17:20

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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