Reject a GCP project number in the Gmail setup wizard#85
Open
ReganBell wants to merge 1 commit into
Open
Conversation
2e8ea3b to
decb3d6
Compare
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>
decb3d6 to
f2e0077
Compare
chrysb
approved these changes
Jun 11, 2026
chrysb
left a comment
Owner
There was a problem hiding this comment.
Looks good. The wizard now catches the project-number mix-up before saving, and the targeted frontend test passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Fix
A one-line
looksLikeProjectNumbercheck (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.jsfor the helper. All green;npm run build:uisucceeds.🤖 Generated with Claude Code