feat(init): signpost sanity new to logged-out users#1581
Conversation
📦 Bundle Stats —
|
| Metric | Value | vs stack/mint-and-claim/a1/03-claim-reminders (05a316a) |
|---|---|---|
| Internal (raw) | 2.2 KB | - |
| Internal (gzip) | 838 B | - |
| Bundled (raw) | 11.20 MB | - |
| Bundled (gzip) | 2.11 MB | - |
| Import time | 880ms | -17ms, -1.9% |
bin:sanity
| Metric | Value | vs stack/mint-and-claim/a1/03-claim-reminders (05a316a) |
|---|---|---|
| Internal (raw) | 782 B | - |
| Internal (gzip) | 423 B | - |
| Bundled (raw) | 9.90 MB | - |
| Bundled (gzip) | 1.78 MB | - |
| Import time | 2.12s | -47ms, -2.2% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-core
Compared against stack/mint-and-claim/a1/03-claim-reminders (05a316ac)
| Metric | Value | vs stack/mint-and-claim/a1/03-claim-reminders (05a316a) |
|---|---|---|
| Internal (raw) | 114.1 KB | - |
| Internal (gzip) | 29.2 KB | - |
| Bundled (raw) | 21.76 MB | - |
| Bundled (gzip) | 3.46 MB | - |
| Import time | 792ms | +3ms, +0.3% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-build
Compared against stack/mint-and-claim/a1/03-claim-reminders (05a316ac)
@sanity/cli-build/_internal/build
| Metric | Value | vs stack/mint-and-claim/a1/03-claim-reminders (05a316a) |
|---|---|---|
| Internal (raw) | 113.8 KB | - |
| Internal (gzip) | 28.7 KB | - |
| Bundled (raw) | 17.76 MB | - |
| Bundled (gzip) | 3.56 MB | - |
| Import time | 1.15s | -2ms, -0.2% |
@sanity/cli-build/_internal/env
| Metric | Value | vs stack/mint-and-claim/a1/03-claim-reminders (05a316a) |
|---|---|---|
| Internal (raw) | 1.8 KB | - |
| Internal (gzip) | 644 B | - |
| Bundled (raw) | 1.31 MB | - |
| Bundled (gzip) | 333.8 KB | - |
| Import time | 127ms | +1ms, +1.1% |
@sanity/cli-build/_internal/extract
| Metric | Value | vs stack/mint-and-claim/a1/03-claim-reminders (05a316a) |
|---|---|---|
| Internal (raw) | 8.6 KB | - |
| Internal (gzip) | 2.7 KB | - |
| Bundled (raw) | 155.0 KB | - |
| Bundled (gzip) | 39.5 KB | - |
| Import time | 249ms | +2ms, +0.7% |
🗺️ ./_internal/env · ./_internal/extract · @sanity/cli-build:./_internal/build treemap too large to embed · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — create-sanity
Compared against stack/mint-and-claim/a1/03-claim-reminders (05a316ac)
| Metric | Value | vs stack/mint-and-claim/a1/03-claim-reminders (05a316a) |
|---|---|---|
| Internal (raw) | 908 B | - |
| Internal (gzip) | 483 B | - |
| Bundled (raw) | 931 B | - |
| Bundled (gzip) | 491 B | - |
| Import time | ❌ ChildProcess denied: node | - |
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit bf92b82. Configure here.
Coverage Delta
Comparing 11 changed files against main @ Overall Coverage
|
4d6a8f4 to
72e3837
Compare
bf92b82 to
e437a74
Compare
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0d5a9d9. Configure here.
03a5f1c to
8f81526
Compare
0d5a9d9 to
03e73c6
Compare
e43123f to
3a00415
Compare
bdd6b8c to
6e6e133
Compare
9182188 to
585e0e5
Compare
9270659 to
474423f
Compare
e81a97c to
66a782f
Compare
5b17d16 to
09b0577
Compare
6aa0e48 to
603ef2b
Compare
dc46241 to
890f1e0
Compare
1a26343 to
f254af8
Compare
92ca73f to
0fa3697
Compare
Fourth layer of the mint-and-claim stack: a banner ahead of the interactive login pointing logged-out users at sanity new (three prototype variants behind SANITY_NEW_BANNER, whisper default), and the unattended not-logged-in error now mentions the logged-out path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
7020c9b to
05a316a
Compare
401aa3d to
f7ea2fb
Compare
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 36dfbdb. Configure here.
| boxen( | ||
| `${styleText('bold', 'Two ways to start')} | ||
|
|
||
| ${styleText('cyan', 'sanity init')} Log in and set up a Studio ${styleText('dim', "(you're here)")} |
There was a problem hiding this comment.
I think we can tighten the wording here maybe:
Two ways to start
sanity init Log in/Sign up and make a new project (you're here)
sanity new Create a project without an account. Sign up and claim it within 72 hours to keep it.
AI agents: run sanity new --json to create a new project programatically. Fetch https://sanity.new to learn more.
| if (options.unattended) { | ||
| throw new InitError(LOGIN_REQUIRED_MESSAGE, exitCodes.RUNTIME_ERROR) | ||
| throw new InitError( | ||
| `${LOGIN_REQUIRED_MESSAGE}\n\n` + |
There was a problem hiding this comment.
This is likely to be agent read maybe:
"To create a project without logging in, run sanity new (use --json for
machine-readable output). Claim it with a Sanity account within 72 hours
to keep it. Fetch https://sanity.new to learn more."
|
all feedback addressed on #1592, canceling this PR to consolidate after offline sync |
Description
this PR adds a
sanity newhint tosanity init, with attended + unattended supportStack
(each PR reviews against its base; merge bottom-up only):
stack/mint-and-claim/a1/01-terminal-presentationstack/mint-and-claim/a1/02-mint-corestack/mint-and-claim/a1/03-claim-remindersstack/mint-and-claim/a1/04-init-signpost← this diffstack/mint-and-claim/a1/05-remint-guardrailstack/mint-and-claim/a1/06-ambient-reminderstack/mint-and-claim/a1/07-logout-env-tokenWhat to review
actions/init/newCommandBanner.tsand the unattended not-logged-in path ininitAction.ts.Testing
Layer-scoped unit tests included (test:source ≥ 1:1); every layer validated standalone (full typecheck + targeted tests at each checkout).
🤖 Generated with Claude Code
Note
Low Risk
CLI messaging and UX only; authentication behavior is unchanged aside from additional error and stdout text.
Overview
Logged-out users running
sanity initnow see a one-time cyan boxed "Two ways to start" signpost after the login-required warning and before interactive login, contrastingsanity init(log in, set up Studio) withsanity new(no login, claim within 72 hours) and linking tohttps://sanity.new.When
initruns in unattended mode without a session, theInitErrorstill uses the existing login-required text but adds guidance to usesanity newinstead and points atsanity new --help.New
renderNewCommandBannerhelper and unit/integration test updates cover banner content and the extended error copy; a minor@sanity/clichangeset records the release.Reviewed by Cursor Bugbot for commit 36dfbdb. Bugbot is set up for automated code reviews on this repo. Configure here.