Skip to content

Reject a GCP project number in the Gmail setup wizard#85

Open
ReganBell wants to merge 1 commit into
chrysb:mainfrom
ReganBell:fix/gmail-wizard-reject-project-number
Open

Reject a GCP project number in the Gmail setup wizard#85
ReganBell wants to merge 1 commit into
chrysb:mainfrom
ReganBell:fix/gmail-wizard-reject-project-number

Conversation

@ReganBell

@ReganBell ReganBell commented Jun 4, 2026

Copy link
Copy Markdown

It's pretty easy to accidentally copy in your project number instead of the ID by mistake. This UX tweak will hopefully save others from this speedbump that I personally ran into.

Google API error (400 invalidArgument): Invalid topicName does not match projects/<project-id>/topics/*

Fix

A one-line looksLikeProjectNumber check (a project ID has letters; a bare all-digits string is the project number). The wizard blocks Next and shows a clear inline message when the entry looks like a project number.

Tests

This input path had no tests before. Added two cases in tests/frontend/project-id.test.js for the helper. All green; npm run build:ui succeeds.

🤖 Generated with Claude Code

@ReganBell ReganBell force-pushed the fix/gmail-wizard-reject-project-number branch 4 times, most recently from 2e8ea3b to decb3d6 Compare June 4, 2026 17:13
The wizard's project field accepted any string, but the Pub/Sub and Gmail
APIs require the project *ID* (e.g. `my-gcp-project`), not the numeric
project *number* (e.g. `1030476043583`). Entering the number sails through
every step and only fails at "Enable watch" with an opaque `400
invalidArgument`.

Add a one-line `looksLikeProjectNumber` check; the wizard blocks advancing
when the entry has no letters and shows a clear inline message.

- Add lib/public/js/components/google/project-id.js
- Gate the wizard's Next button + inline error
- Add tests/frontend/project-id.test.js (this path had no tests before)

Signed-off-by: Regan Bell <regan@ycombinator.com>
@ReganBell ReganBell force-pushed the fix/gmail-wizard-reject-project-number branch from decb3d6 to f2e0077 Compare June 4, 2026 17:13

@chrysb chrysb left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good. The wizard now catches the project-number mix-up before saving, and the targeted frontend test passes.

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