Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Rework Invite Code Experience #735

Merged
merged 29 commits into from
Jun 30, 2023
Merged

Conversation

bfollington
Copy link
Collaborator

@bfollington bfollington commented Jun 20, 2023

Fixes #715
Fixes #697
Fixes #738
Fixes #763
Fixes #737

Demo

I can't record a fresh demo right now since the cluster is down, I recommend playtesting the app. But here's a slightly stale video of the new settings layout. All the gateway settings are together now, it's maybe a bit confronting for users but they have full control to pick-up the process at any point it failed.

Screen_Recording_2023-06-28_at_1.44.19_pm.mov

First Run

image

Settings

image

Rework the invite code flow to ensure the code is actually valid. See screenshots in comments throughout.

  • Add latest graphic here + in docs
  • Attach videos & screenshots to aid review
  • Introduce tests for first run step submission/validation
  • Test new FormField functionality
  • Tweak invite redemption failure message
  • Rework isValid abstraction
  • .pushStep for FirstRun

@bfollington bfollington marked this pull request as ready for review June 20, 2023 04:16
@gordonbrander
Copy link
Collaborator

The graphic in the issue is great.

We could consider creating a docs dir at the top level and dropping it in.

Copy link
Collaborator

@gordonbrander gordonbrander left a comment

Choose a reason for hiding this comment

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

A few comments. Otherwise, LGTM!

@gordonbrander gordonbrander self-requested a review June 20, 2023 18:48
Copy link
Collaborator

@gordonbrander gordonbrander left a comment

Choose a reason for hiding this comment

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

We should allow changing the invite code, at least in the settings, and probably in the FRE? If you put in the wrong invite code in this PR, there would be no recovery path.

I recently attempted to re-use invite code during a playtest, with a predictable failure. However, without a way to write in a new invite code, I believe I would have been bricked #738

@bfollington
Copy link
Collaborator Author

Based on feedback here and the work we're doing in https://github.com/subconsciousnetwork/subconscious-cloud/issues/6 I think we should rethink the overall flow here a little.

We can address #737 and #738 easily once https://github.com/subconsciousnetwork/subconscious-cloud/issues/6 lands.

@bfollington
Copy link
Collaborator Author

Doing some modelling to explore how things would work after https://github.com/subconsciousnetwork/subconscious-cloud/issues/6 lands.

@gordonbrander let me know what you think, especially about my callout here RE: trying to redeem a code multiple times.

image
https://www.figma.com/file/jLgkHEJgiXICUK4y3UmcU6/Subconscious-Whiteboard?type=whiteboard&node-id=27-1056&t=KZxLhKs7zUCCntdO-4

@jsantell
Copy link
Contributor

Clarifying the current planned changes in the redemption, mostly compatible with the flow above:

  • Invite codes are bound to the provided sphere on redemption.
  • Provisioning with the same invite code/sphere pair is idempotent.
  • Provisioning request can fail via an internal error, or if invite code is invalid (not legit, or claimed by another sphere, we do not specify). The error "type" and its "error" message are available in JSON for non-200 responses.
  • The provisioning request returns gateway ID regardless of state (whether provisioned or provisioning). Status must be queried after to handle whether pending/ready.
  • If provisioning task fails, the provisioning request can be retried.

@bfollington
Copy link
Collaborator Author

Clarifying the current planned changes in the redemption, mostly compatible with the flow above:

  • Invite codes are bound to the provided sphere on redemption.
  • Provisioning with the same invite code/sphere pair is idempotent.
  • Provisioning request can fail via an internal error, or if invite code is invalid (not legit, or claimed by another sphere, we do not specify). The error "type" and its "error" message are available in JSON for non-200 responses.
  • The provisioning request returns gateway ID regardless of state (whether provisioned or provisioning). Status must be queried after to handle whether pending/ready.
  • If provisioning task fails, the provisioning request can be retried.

Amazing! Thanks @jsantell, I had a quick read over https://github.com/subconsciousnetwork/subconscious-cloud/pull/7/files#diff-e1e65eeceb23dd47013779351844a41a2b781e987c92db2bb0d4fa60d51703b9 and updated the diagram with a few more details.

image

@bfollington bfollington force-pushed the 2023-06-20-invite-code-lifecycle branch from 8208a84 to 410ff62 Compare June 28, 2023 03:55
Copy link
Collaborator

@gordonbrander gordonbrander left a comment

Choose a reason for hiding this comment

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

LGTM. Haven't test-driven, but nothing looks unusual or out-of-place to me. Good improvements!

@bfollington bfollington force-pushed the 2023-06-20-invite-code-lifecycle branch from dbed589 to 99ff1be Compare June 29, 2023 23:56
@bfollington bfollington merged commit a97c1ba into main Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: 🌱 Done
3 participants