fix(projects): guide users to enable a platform - #96
Merged
Ryan Zhu (underthestars-zhy) merged 1 commit intoJul 30, 2026
Conversation
📝 WalkthroughWalkthroughThe project creation command now prints guidance when no platforms are enabled. Contract tests verify default, explicit iMessage, and JSON scenarios, while the mock server records project creation request payloads. ChangesProject creation guidance
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Henry Zhang (caezium)
force-pushed
the
henry/eng-2058-add-platform-enable-hint-after-project-creation
branch
from
July 29, 2026 16:00
eadee53 to
bb03019
Compare
Henry Zhang (caezium)
force-pushed
the
henry/eng-2058-add-platform-enable-hint-after-project-creation
branch
from
July 29, 2026 16:02
bb03019 to
3203f7a
Compare
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.
Summary
--platformsis omitted.--jsonoutput unchanged.getApi(), Eden treaty, and mock HTTP server.Product decision
New projects created without
--platformsshould start with no enabled platforms. Users explicitly enable the platform they want afterward; the CLI should guide them rather than silently choosing iMessage.Testing before implementation
Before this PR, creating without
--platformsalready sentplatforms: []and created a project with no enabled platforms. The problem was that the success output did not explain this or tell the user how to enable one.Also tested an abandoned implementation that omitted the field. Production then returned
{ "imessage": true }, confirming that omission invokes the server default. Based on the product decision, this PR preservesplatforms: []and only adds actionable guidance.Testing after implementation
bun test tests/contract/projects.contract.test.ts: 10 tests and 35 assertions passed.bun run checkon Node 24.14.1: typecheck, 93 tests / 230 assertions, snapshot, and build passed.platforms: [].{ id, name, env }.Checklist
bun run checkpasses locallyNote
Low Risk
CLI messaging and test-only mock instrumentation only; create API behavior and JSON output contract stay the same.
Overview
When
photon projects createsucceeds with no platforms (the existing default when--platformsis omitted), human-readable output now adds dimmed guidance: that no platforms are enabled, where to see valid names (projects create --help), and a concretephoton spectrum platforms enable … --project '<id>'example.--jsonstill returns only{ id, name, env }with no extra fields or hints.Contract tests cover default create (
platforms: []), suppression of the hint when--platformsis set, and unchanged JSON. The mock server records POST/api/projectsbodies viagetMockProjectCreateRequests, withresetMockStateclearing that list inbeforeEachfor the create tests.Reviewed by Cursor Bugbot for commit 3203f7a. Bugbot is set up for automated code reviews on this repo. Configure here.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
projects createwhen no platforms are enabled, including an example command to enable a platform.--jsonoutput behavior, including when no platforms are selected.--platformsbehavior, and--jsonoutput content.