Skip to content

Conversation

@madebydavid
Copy link
Member

@madebydavid madebydavid commented Aug 13, 2025

Summary

This is to resolve #69 - if we detect that a policy change is needed then we prompt the user

What's changed

  • Expanded the CreateServiceAccountKey component
    • detect if policy change is needed
    • display markdown telling user what is happening
    • prompt to press P to change policy
    • shows a message and spinner when changing
    • proceeds with Service Account Key creation after

@madebydavid
Copy link
Member Author

Tested on 80x24

https://asciinema.org/a/HWIWlSP2ntqb8lZsHm6MrdrTl

Kazam_screencast_00019.webm

@madebydavid madebydavid changed the title WIP - prompt for policy change in wizard Prompt for Google Org policy change in wizard if Service Account Key creation is disabled Aug 13, 2025
@madebydavid
Copy link
Member Author

The text is a little cropped on 80x24 - we may want to revisit that

image

@madebydavid madebydavid marked this pull request as ready for review August 13, 2025 13:12
@madebydavid madebydavid requested a review from Copilot August 13, 2025 13:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds automatic detection and prompting for Google Organization policy changes when Service Account Key creation is disabled in the wizard interface. It enhances the user experience by providing a guided workflow to handle required policy changes.

  • Expanded the CreateServiceAccountKey component to detect policy change requirements and guide users through the process
  • Added new hook useUpdateGoogleOrgPolicy for managing organization policy mutations
  • Updated type definitions to properly handle date fields and added new markdown template for policy guidance

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/utils/query/useUpdateGoogleOrgPolicy.ts New hook for handling Google organization policy enforcement/revocation mutations
src/utils/query/index.ts Export the new policy update hook
src/types/api.ts Updated orgCreatedAt field type from string to DateTime
src/components/android/CreateServiceAccountKey/index.tsx Enhanced component with policy detection, user prompting, and guided workflow
src/components/android/CreateServiceAccountKey/SetupStatusTable.tsx Removed unused status table component
src/commands/game/android/apiKey/policy.tsx Changed boolean coercion from !! to Boolean() for consistency
src/api/index.ts Added date casting for API responses containing orgCreatedAt
assets/markdown/service-account-policy-wizard.md.ejs New markdown template for policy change guidance

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@madebydavid madebydavid requested a review from jamiel August 13, 2025 13:30
@madebydavid madebydavid merged commit 9d58bac into main Aug 13, 2025
@madebydavid madebydavid deleted the 69-android-wizard-will-fail-to-create-a-service-account-api-key-if-user-has-google-org-account-and-the-key-policy-is-enforced branch August 21, 2025 10:41
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.

Android wizard will fail to create a Service Account API key if user has google org account and the key policy is enforced

2 participants