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

Add "whoami" command #572

Merged
merged 4 commits into from
Jun 28, 2024
Merged

Add "whoami" command #572

merged 4 commits into from
Jun 28, 2024

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Jun 28, 2024

Loom demo

Screenshots

Scenario
Not authenticated Not authenticated
Authenticated by email and password Authenticated by email and password
Team API key Team API key
Personal API key Personal API key

Copy link

changeset-bot bot commented Jun 28, 2024

🦋 Changeset detected

Latest commit: 46c5956

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
replayio Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

replay-io bot commented Jun 28, 2024

Status In Progress ↗︎
Commit 9fb9619
Results
2 Failed
  • clicks a disappearing button
  • should fail on this test
  • 41 Passed
  • adds items
  • adds new items using a custom command
  • adds todos following the fixture
  • adds todos following the fixture
  • adds todos following the fixture
  • calls inform
  • complete all checkbox should update state when items are completed / cleared
  • gets a number
  • only gets a number
  • only gets a number
  • should allow me to add todo items
  • should allow me to clear the complete state of all items
  • should allow me to display active items
  • should allow me to display all items
  • should allow me to display completed items
  • should allow me to edit an item
  • should allow me to mark all items as completed
  • should allow me to mark items as complete
  • should allow me to un-mark items as complete
  • should append new items to the bottom of the list
  • should be hidden when there are no items that are completed
  • should cancel edits on escape
  • should clear text input field when an item is added
  • should display the correct text
  • should display the current number of todo items
  • should focus on the todo input field
  • should hide #main and #footer
  • should hide other controls when editing
  • should highlight the currently applied filter
  • should intercept postman
  • should invoke some commands that have exceptional option handling
  • should log
  • should persist its data
  • should remove completed items when clicked
  • should remove the item if an empty text string was entered
  • should respect the back button
  • should save edits on blur
  • should show #main and #footer when items added
  • should trim entered text
  • should trim text input
  • yields a number
  • Copy link
    Contributor

    @callingmedic911 callingmedic911 left a comment

    Choose a reason for hiding this comment

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

    Looks great! Do you think it's worth printing email address associated with user account (if it's user authenticated)? This command reminds me of fly.io's fly auth whoami, which I frequently use to see which account I'm authenticated with because I use fly for both work and personal usage.
    Screenshot 2024-06-28 at 9 16 14 AM

    @bvaughn
    Copy link
    Contributor Author

    bvaughn commented Jun 28, 2024

    Thanks!

    I thought about printing the email or team name, but I didn't because I thought it would require an extra GraphQL query.

    If the user authenticated by signing in, then...we're already making a GraphQL query (AuthInfo) but if the user has authenticated by an API key, we don't hit up GraphQL at all (so we'd need to make an extra query in this case, but that's okay since the whoami command is kind of asking us to do that).

    Lemme think about this a bit more.

    @bvaughn
    Copy link
    Contributor Author

    bvaughn commented Jun 28, 2024

    Okay. That was great suggestion. This command is way better now. Thanks!

    @bvaughn bvaughn merged commit db3f422 into main Jun 28, 2024
    7 checks passed
    @bvaughn bvaughn deleted the PRO-720-whoami branch June 28, 2024 15:40
    @github-actions github-actions bot mentioned this pull request Jul 1, 2024
    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