Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Handle empty _nameToDisplay_ on first run to enable P2P testing #49

Merged
merged 2 commits into from
Feb 15, 2025

Conversation

artburkart
Copy link
Contributor

@artburkart artburkart commented Feb 14, 2025

On first launch, nameToDisplay resolves to "" instead of the expected “???”. This breaks the app’s flow, making P2P functionality untestable.

This patch adds a check for .isEmpty and ensures editNamePopoverShown opens when the value is empty. With this change, the app becomes usable out of the box for testing.

My guess is the library doesn't "load a default value" but rather just "".
Not claiming this is the definitive fix, but it gets things working for now.

Pictured below is what the app looks like on first boot.
image

And here are the logs when you attempt to turn on the P2P functionality:

P2PNET: Updated bonjour network listener to advertise name
No peer name is set on the provider

@heckj
Copy link
Collaborator

heckj commented Feb 15, 2025

Fix looks fine to me, I certainly could have left it in an awkward state while iterating and never wrapping that up properly.
The failing "test" is a CI barf - in #50 I'm disabling the CI from attempting to run simulator tests, as there's just nothing meaningful actually being tested, and it's just throwing up spurious issues here.

@heckj heckj merged commit 5fa067b into automerge:main Feb 15, 2025
1 check passed
@artburkart artburkart deleted the update-popover-behavior branch February 15, 2025 02:02
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